mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-06 06:53:24 +02:00
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
@ -26,33 +26,34 @@ namespace Pango {
|
|||||||
|
|
||||||
public partial class Layout {
|
public partial class Layout {
|
||||||
|
|
||||||
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern IntPtr pango_layout_get_lines(IntPtr raw);
|
static extern IntPtr pango_layout_get_lines(IntPtr raw);
|
||||||
|
|
||||||
public LayoutLine[] Lines {
|
public LayoutLine[] Lines {
|
||||||
get {
|
get {
|
||||||
IntPtr list_ptr = pango_layout_get_lines(Handle);
|
IntPtr list_ptr = pango_layout_get_lines(Handle);
|
||||||
if (list_ptr == IntPtr.Zero)
|
if (list_ptr == IntPtr.Zero)
|
||||||
return new LayoutLine [0];
|
return new LayoutLine [0];
|
||||||
GLib.SList list = new GLib.SList(list_ptr, typeof (IntPtr));
|
GLib.SList list = new GLib.SList(list_ptr, typeof (IntPtr));
|
||||||
LayoutLine[] result = new LayoutLine [list.Count];
|
LayoutLine[] result = new LayoutLine [list.Count];
|
||||||
for (int i = 0; i < list.Count; i++)
|
for (int i = 0; i < list.Count; i++)
|
||||||
result[i] = new LayoutLine ((IntPtr)list[i]);
|
result[i] = new LayoutLine ((IntPtr)list[i]);
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
return result;
|
||||||
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)
|
[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);
|
||||||
uint ucs4_accel_char;
|
|
||||||
IntPtr native_markup = GLib.Marshaller.StringToPtrGStrdup (markup);
|
public void SetMarkupWithAccel (string markup, char accel_marker, out char accel_char)
|
||||||
pango_layout_set_markup_with_accel (Handle, native_markup, -1, GLib.Marshaller.CharToGUnichar (accel_marker), out ucs4_accel_char);
|
{
|
||||||
GLib.Marshaller.Free (native_markup);
|
uint ucs4_accel_char;
|
||||||
accel_char = GLib.Marshaller.GUnicharToChar (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)]
|
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern void g_free (IntPtr raw);
|
static extern void g_free (IntPtr raw);
|
||||||
|
@ -26,28 +26,28 @@ namespace Pango {
|
|||||||
public partial class LayoutLine {
|
public partial class LayoutLine {
|
||||||
|
|
||||||
#if NOT_BROKEN
|
#if NOT_BROKEN
|
||||||
[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[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);
|
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
|
#endif
|
||||||
|
|
||||||
public void GetXRanges(int start_index, int end_index, out int[][] ranges)
|
public void GetXRanges(int start_index, int end_index, out int[][] ranges)
|
||||||
{
|
{
|
||||||
// FIXME: this is broken
|
// FIXME: this is broken
|
||||||
throw new NotImplementedException ();
|
throw new NotImplementedException ();
|
||||||
#if NOT_BROKEN
|
#if NOT_BROKEN
|
||||||
int count;
|
int count;
|
||||||
IntPtr array_ptr;
|
IntPtr array_ptr;
|
||||||
pango_layout_line_get_x_ranges(Handle, start_index, end_index, out array_ptr, out count);
|
pango_layout_line_get_x_ranges(Handle, start_index, end_index, out array_ptr, out count);
|
||||||
ranges = new int[count] [];
|
ranges = new int[count] [];
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
IntPtr tmp = new IntPtr (array_ptr + 2 * i * IntPtr.Size);
|
IntPtr tmp = new IntPtr (array_ptr + 2 * i * IntPtr.Size);
|
||||||
IntPtr rng_ptr = Marshal.ReadIntPtr (tmp);
|
IntPtr rng_ptr = Marshal.ReadIntPtr (tmp);
|
||||||
IntPtr end_ptr = Marshal.ReadIntPtr (tmp, IntPtr.Size);
|
IntPtr end_ptr = Marshal.ReadIntPtr (tmp, IntPtr.Size);
|
||||||
|
|
||||||
}
|
}
|
||||||
Marshal.Copy (array_ptr, ranges, 0, count);
|
Marshal.Copy (array_ptr, ranges, 0, count);
|
||||||
g_free (array_ptr);
|
g_free (array_ptr);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,17 +24,17 @@ namespace Pango {
|
|||||||
|
|
||||||
public partial struct Matrix {
|
public partial struct Matrix {
|
||||||
|
|
||||||
static Matrix ()
|
static Matrix ()
|
||||||
{
|
{
|
||||||
Identity.Xx = 1.0;
|
Identity.Xx = 1.0;
|
||||||
Identity.Xy = 0.0;
|
Identity.Xy = 0.0;
|
||||||
Identity.Yx = 0.0;
|
Identity.Yx = 0.0;
|
||||||
Identity.Yy = 1.0;
|
Identity.Yy = 1.0;
|
||||||
Identity.X0 = 0.0;
|
Identity.X0 = 0.0;
|
||||||
Identity.Y0 = 0.0;
|
Identity.Y0 = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Matrix Identity;
|
public static Matrix Identity;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user