pango: Re-indent code that was moved inside partial classes
No real code change, just whitespace.
This commit is contained in:
parent
094a49f69a
commit
5b22918f4f
3 changed files with 54 additions and 53 deletions
|
@ -26,33 +26,34 @@ namespace Pango {
|
|||
|
||||
public partial class Layout {
|
||||
|
||||
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
static extern IntPtr pango_layout_get_lines(IntPtr raw);
|
||||
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
static extern IntPtr pango_layout_get_lines(IntPtr raw);
|
||||
|
||||
public LayoutLine[] Lines {
|
||||
get {
|
||||
IntPtr list_ptr = pango_layout_get_lines(Handle);
|
||||
if (list_ptr == IntPtr.Zero)
|
||||
return new LayoutLine [0];
|
||||
GLib.SList list = new GLib.SList(list_ptr, typeof (IntPtr));
|
||||
LayoutLine[] result = new LayoutLine [list.Count];
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
result[i] = new LayoutLine ((IntPtr)list[i]);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
public LayoutLine[] Lines {
|
||||
get {
|
||||
IntPtr list_ptr = pango_layout_get_lines(Handle);
|
||||
if (list_ptr == IntPtr.Zero)
|
||||
return new LayoutLine [0];
|
||||
GLib.SList list = new GLib.SList(list_ptr, typeof (IntPtr));
|
||||
LayoutLine[] result = new LayoutLine [list.Count];
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
result[i] = new LayoutLine ((IntPtr)list[i]);
|
||||
|
||||
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
static extern void pango_layout_set_markup_with_accel (IntPtr raw, IntPtr markup, int length, uint accel_marker, out uint accel_char);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetMarkupWithAccel (string markup, char accel_marker, out char accel_char)
|
||||
{
|
||||
uint ucs4_accel_char;
|
||||
IntPtr native_markup = GLib.Marshaller.StringToPtrGStrdup (markup);
|
||||
pango_layout_set_markup_with_accel (Handle, native_markup, -1, GLib.Marshaller.CharToGUnichar (accel_marker), out ucs4_accel_char);
|
||||
GLib.Marshaller.Free (native_markup);
|
||||
accel_char = GLib.Marshaller.GUnicharToChar (ucs4_accel_char);
|
||||
}
|
||||
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
static extern void pango_layout_set_markup_with_accel (IntPtr raw, IntPtr markup, int length, uint accel_marker, out uint accel_char);
|
||||
|
||||
public void SetMarkupWithAccel (string markup, char accel_marker, out char accel_char)
|
||||
{
|
||||
uint ucs4_accel_char;
|
||||
IntPtr native_markup = GLib.Marshaller.StringToPtrGStrdup (markup);
|
||||
pango_layout_set_markup_with_accel (Handle, native_markup, -1, GLib.Marshaller.CharToGUnichar (accel_marker), out ucs4_accel_char);
|
||||
GLib.Marshaller.Free (native_markup);
|
||||
accel_char = GLib.Marshaller.GUnicharToChar (ucs4_accel_char);
|
||||
}
|
||||
|
||||
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
static extern void g_free (IntPtr raw);
|
||||
|
|
|
@ -26,28 +26,28 @@ namespace Pango {
|
|||
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);
|
||||
[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);
|
||||
#endif
|
||||
|
||||
public void GetXRanges(int start_index, int end_index, out int[][] ranges)
|
||||
{
|
||||
// FIXME: this is broken
|
||||
throw new NotImplementedException ();
|
||||
public void GetXRanges(int start_index, int end_index, out int[][] ranges)
|
||||
{
|
||||
// FIXME: this is broken
|
||||
throw new NotImplementedException ();
|
||||
#if NOT_BROKEN
|
||||
int count;
|
||||
IntPtr array_ptr;
|
||||
pango_layout_line_get_x_ranges(Handle, start_index, end_index, out array_ptr, out count);
|
||||
ranges = new int[count] [];
|
||||
for (int i = 0; i < count; i++) {
|
||||
IntPtr tmp = new IntPtr (array_ptr + 2 * i * IntPtr.Size);
|
||||
IntPtr rng_ptr = Marshal.ReadIntPtr (tmp);
|
||||
IntPtr end_ptr = Marshal.ReadIntPtr (tmp, IntPtr.Size);
|
||||
|
||||
}
|
||||
Marshal.Copy (array_ptr, ranges, 0, count);
|
||||
g_free (array_ptr);
|
||||
int count;
|
||||
IntPtr array_ptr;
|
||||
pango_layout_line_get_x_ranges(Handle, start_index, end_index, out array_ptr, out count);
|
||||
ranges = new int[count] [];
|
||||
for (int i = 0; i < count; i++) {
|
||||
IntPtr tmp = new IntPtr (array_ptr + 2 * i * IntPtr.Size);
|
||||
IntPtr rng_ptr = Marshal.ReadIntPtr (tmp);
|
||||
IntPtr end_ptr = Marshal.ReadIntPtr (tmp, IntPtr.Size);
|
||||
|
||||
}
|
||||
Marshal.Copy (array_ptr, ranges, 0, count);
|
||||
g_free (array_ptr);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,17 +24,17 @@ namespace Pango {
|
|||
|
||||
public partial struct Matrix {
|
||||
|
||||
static Matrix ()
|
||||
{
|
||||
Identity.Xx = 1.0;
|
||||
Identity.Xy = 0.0;
|
||||
Identity.Yx = 0.0;
|
||||
Identity.Yy = 1.0;
|
||||
Identity.X0 = 0.0;
|
||||
Identity.Y0 = 0.0;
|
||||
}
|
||||
static Matrix ()
|
||||
{
|
||||
Identity.Xx = 1.0;
|
||||
Identity.Xy = 0.0;
|
||||
Identity.Yx = 0.0;
|
||||
Identity.Yy = 1.0;
|
||||
Identity.X0 = 0.0;
|
||||
Identity.Y0 = 0.0;
|
||||
}
|
||||
|
||||
public static Matrix Identity;
|
||||
public static Matrix Identity;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue