pango: Move all .custom files to partial classes

No real code change, just renaming and adding boilerplate.

Files will be re-indented in another commit, to avoid confusing git.
This commit is contained in:
Bertrand Lorentz 2012-08-05 17:51:13 +02:00
parent a8e1e8fd7d
commit 094a49f69a
18 changed files with 182 additions and 81 deletions

View file

@ -1,11 +1,9 @@
// Pango.Analysis.custom - Pango Analysis class customizations
// Pango.Analysis.cs - Pango Analysis class customizations
//
// Authors: Mike Kestner <mkestner@novell.com>
//
// Copyright (c) 2004 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -20,6 +18,12 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
public partial struct Analysis {
public Attribute[] ExtraAttrs {
get {
GLib.SList list = new GLib.SList (_extra_attrs, typeof (IntPtr));
@ -62,4 +66,5 @@
}
set { _language = value == null ? IntPtr.Zero : value.Handle; }
}
}
}

View file

@ -1,11 +1,9 @@
// Pango.AttrIterator.custom - Pango AttrIterator class customizations
// Pango.AttrIterator.cs - Pango AttrIterator class customizations
//
// Author: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -20,6 +18,12 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
using System.Runtime.InteropServices;
public partial class AttrIterator {
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void pango_attr_iterator_get_font(IntPtr raw, IntPtr desc, out IntPtr language, out IntPtr extra_attrs);
@ -58,3 +62,5 @@
return attrs;
}
}
}
}

View file

@ -1,11 +1,9 @@
// Pango.AttrList.custom - Pango AttrList customizations
// Pango.AttrList.cs - Pango AttrList customizations
//
// Authors: Mike Kestner <mkestner@novell.com>
//
// Copyright (c) 2008 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -20,6 +18,13 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
using System.Runtime.InteropServices;
public partial class AttrList {
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr pango_attribute_copy (IntPtr raw);
@ -38,4 +43,5 @@
{
pango_attr_list_insert_before (Handle, pango_attribute_copy (attr.Handle));
}
}
}

View file

@ -1,11 +1,9 @@
// Pango.Context.custom - Pango Context class customizations
// Pango.Context.cs - Pango Context class customizations
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -20,6 +18,13 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
using System.Runtime.InteropServices;
public partial class Context {
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void g_free (IntPtr raw);
@ -53,4 +58,5 @@
pango_context_list_families(Handle, families.Handle, out n_families);
return n_families;
}
}
}

View file

@ -1,11 +1,9 @@
// Pango.Coverage.custom - Pango Coverage class customizations
// Pango.Coverage.cs - Pango Coverage class customizations
//
// Author: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -20,6 +18,13 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
using System.Runtime.InteropServices;
public partial class Coverage {
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void g_free (IntPtr raw);
@ -35,4 +40,5 @@
Marshal.Copy (array_ptr, bytes, 0, count);
g_free (array_ptr);
}
}
}

View file

@ -1,11 +1,9 @@
// Pango.FontFamily.custom - Pango FontFamily class customizations
// Pango.FontFamily.cs - Pango FontFamily class customizations
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -20,6 +18,13 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
using System.Runtime.InteropServices;
public partial class FontFamily {
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void g_free (IntPtr raw);
@ -53,4 +58,5 @@
pango_font_family_list_faces(Handle, faces.Handle, out n_faces);
return n_faces;
}
}
}

View file

@ -1,11 +1,9 @@
// Pango.FontMap.custom - Pango FontMap class customizations
// Pango.FontMap.cs - Pango FontMap class customizations
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -20,6 +18,13 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
using System.Runtime.InteropServices;
public partial class FontMap {
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void g_free (IntPtr raw);
@ -53,4 +58,5 @@
pango_font_map_list_families(Handle, families.Handle, out n_families);
return n_families;
}
}
}

View file

@ -1,11 +1,9 @@
// Pango.Global.custom - Pango Global class customizations
// Pango.Global.cs - Pango Global class customizations
//
// Authors: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -20,6 +18,13 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
using System.Runtime.InteropServices;
public partial class Global {
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool pango_scan_int(IntPtr pos, out int out_param);
@ -48,5 +53,7 @@
attrs = new Pango.AttrList (attrs_handle);
return result;
}
}
}

View file

@ -1,11 +1,9 @@
// Pango.GlyphItem.custom - Pango GlyphItem class customizations
// Pango.GlyphItem.cs - Pango GlyphItem class customizations
//
// Author: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004-2005 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -20,6 +18,12 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
using System.Runtime.InteropServices;
public partial struct GlyphItem {
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr pango_glyph_item_apply_attrs(ref Pango.GlyphItem raw, IntPtr text, IntPtr list);
@ -48,3 +52,5 @@
public Pango.Item item {
get { return Item; }
}
}
}

View file

@ -1,9 +1,7 @@
// Pango.GlyphString.custom - Pango GlyphString class customizations
// Pango.GlyphString.cs - Pango GlyphString class customizations
//
// Copyright (c) 2005 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -18,6 +16,12 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
public partial class GlyphString {
[Obsolete("Pango.GlyphString is a reference type now, use null")]
public static GlyphString Zero = null;
@ -32,3 +36,5 @@
{
return new GlyphString ();
}
}
}

View file

@ -1,9 +1,7 @@
// Pango.Item.custom - Pango Item class customizations
// Pango.Item.cs - Pango Item class customizations
//
// Copyright (c) 2005 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -18,6 +16,12 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
public partial class Item {
[Obsolete("Pango.Item is a reference type now, use null")]
public static Item Zero = null;
@ -32,3 +36,5 @@
{
return new Item ();
}
}
}

View file

@ -1,12 +1,10 @@
// Pango.Layout.custom - Pango Layout class customizations
// Pango.Layout.cs - Pango Layout class customizations
//
// Authors: Pedro Abelleira Seco <pedroabelleira@yahoo.es>
// Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -21,6 +19,13 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
using System.Runtime.InteropServices;
public partial class Layout {
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr pango_layout_get_lines(IntPtr raw);
@ -92,3 +97,5 @@ public void SetMarkupWithAccel (string markup, char accel_marker, out char accel
pango_layout_set_markup (Handle, native_markup, -1);
GLib.Marshaller.Free (native_markup);
}
}
}

View file

@ -1,12 +1,10 @@
// Pango.LayoutLine.custom - Pango LayoutLine class customizations
// Pango.LayoutLine.cs - Pango LayoutLine class customizations
//
// Authors: Jeroen Zwartepoorte <jeroen@xs4all.nl
// Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -21,6 +19,12 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
public partial class LayoutLine {
#if NOT_BROKEN
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void pango_layout_line_get_x_ranges(IntPtr raw, int start_index, int end_index, out IntPtr ranges_handle, out int n_ranges);
@ -45,4 +49,5 @@ public void GetXRanges(int start_index, int end_index, out int[][] ranges)
g_free (array_ptr);
#endif
}
}
}

View file

@ -1,9 +1,7 @@
// Pango.LayoutRun.custom - Pango.LayoutRun class customizations
// Pango.LayoutRun.cs - Pango.LayoutRun class customizations
//
// Copyright (c) 2005 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -18,6 +16,12 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
public partial struct LayoutRun {
[Obsolete ("Replaced by Glyphs property")]
public Pango.GlyphString glyphs {
get { return Glyphs; }
@ -27,3 +31,5 @@
public Pango.Item item {
get { return Item; }
}
}
}

View file

@ -8,7 +8,7 @@ references = $(top_builddir)/glib/glib-sharp.dll $(top_builddir)/cairo/cairo-sha
glue_includes = pango/pango.h
sources = \
Attribute.cs \
Analysis.cs \
AttrBackground.cs \
AttrColor.cs \
AttrFallback.cs \
@ -18,42 +18,40 @@ sources = \
AttrForeground.cs \
AttrGravity.cs \
AttrGravityHint.cs \
Attribute.cs \
AttrInt.cs \
AttrIterator.cs \
AttrLanguage.cs \
AttrLetterSpacing.cs \
AttrList.cs \
AttrRise.cs \
AttrScale.cs \
AttrShape.cs \
AttrSize.cs \
AttrStretch.cs \
AttrStrikethroughColor.cs \
AttrStrikethrough.cs \
AttrStrikethroughColor.cs \
AttrStyle.cs \
AttrUnderlineColor.cs \
AttrUnderline.cs \
AttrUnderlineColor.cs \
AttrVariant.cs \
AttrWeight.cs \
Context.cs \
Coverage.cs \
FontFamily.cs \
FontMap.cs \
Global.cs \
GlyphItem.cs \
GlyphString.cs \
Item.cs \
Layout.cs \
LayoutLine.cs \
LayoutRun.cs \
Matrix.cs \
Scale.cs \
ScriptIter.cs
customs = \
Analysis.custom \
AttrIterator.custom \
AttrList.custom \
Context.custom \
Coverage.custom \
FontFamily.custom \
FontMap.custom \
Global.custom \
GlyphItem.custom \
GlyphString.custom \
Item.custom \
Layout.custom \
LayoutLine.custom \
LayoutRun.custom \
Matrix.custom \
TabArray.custom \
Units.custom
ScriptIter.cs \
TabArray.cs \
Units.cs
add_dist =

View file

@ -1,11 +1,9 @@
// Pango.Matrix.custom - Pango Matrix class customizations
// Pango.Matrix.cs - Pango Matrix class customizations
//
// Authors: John Luke <john.luke@gmail.com>
//
// Copyright (c) 2005 John Luke.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -20,6 +18,12 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
public partial struct Matrix {
static Matrix ()
{
Identity.Xx = 1.0;
@ -32,3 +36,5 @@
public static Matrix Identity;
}
}

View file

@ -1,11 +1,9 @@
// Pango.TabArray.custom - Pango TabArray class customizations
// Pango.TabArray.cs - Pango TabArray class customizations
//
// Author: Mike Kestner <mkestner@ximian.com>
//
// Copyright (c) 2004 Novell, Inc.
//
// This code is inserted after the automatically generated code.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General
// Public License as published by the Free Software Foundation.
@ -20,6 +18,13 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
using System.Runtime.InteropServices;
public partial class TabArray {
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void g_free (IntPtr raw);
@ -43,4 +48,5 @@
g_free (align_ptr);
g_free (loc_ptr);
}
}
}

View file

@ -1,4 +1,4 @@
// Pango.Units.custom - Unit customizations.
// Pango.Units.cs - Unit customizations.
//
// Author: Mike Kestner <mkestner@novell.com>
//
@ -18,6 +18,12 @@
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
namespace Pango {
using System;
public partial class Units {
private Units () {}
public static int FromPixels (int pixels)
@ -29,4 +35,5 @@
{
return (units + 512) >> 10;
}
}
}