public static void ShowGlyphItem(Cairo.Context cr, string text, Pango.GlyphItem glyph_item) { IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup(text); IntPtr native_glyph_item = GLib.Marshaller.StructureToPtrAlloc(glyph_item); pango_cairo_show_glyph_item(cr == null ? IntPtr.Zero : cr.Handle, native_text, native_glyph_item); GLib.Marshaller.Free(native_text); Marshal.FreeHGlobal(native_glyph_item); }
public void DrawGlyphItem(string text, Pango.GlyphItem glyph_item, int x, int y) { IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup(text); IntPtr native_glyph_item = GLib.Marshaller.StructureToPtrAlloc(glyph_item); pango_renderer_draw_glyph_item(Handle, native_text, native_glyph_item, x, y); GLib.Marshaller.Free(native_text); Marshal.FreeHGlobal(native_glyph_item); }
public Pango.GlyphItem Split(string text, int split_index) { IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal(System.Runtime.InteropServices.Marshal.SizeOf(this)); System.Runtime.InteropServices.Marshal.StructureToPtr(this, this_as_native, false); IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup(text); IntPtr raw_ret = pango_glyph_item_split(this_as_native, native_text, split_index); Pango.GlyphItem ret = Pango.GlyphItem.New(raw_ret); ReadNative(this_as_native, ref this); System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native); GLib.Marshaller.Free(native_text); return(ret); }
private void InternalDrawGlyphItem(string text, Pango.GlyphItem glyph_item, int x, int y) { DrawGlyphItemNativeDelegate unmanaged = class_abi.BaseOverride <DrawGlyphItemNativeDelegate>(this.LookupGType(), "draw_glyph_item"); if (unmanaged == null) { return; } IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup(text); IntPtr native_glyph_item = GLib.Marshaller.StructureToPtrAlloc(glyph_item); unmanaged(this.Handle, native_text, native_glyph_item, x, y); GLib.Marshaller.Free(native_text); Marshal.FreeHGlobal(native_glyph_item); }
public bool InitStart(Pango.GlyphItem glyph_item, string text) { IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal(System.Runtime.InteropServices.Marshal.SizeOf(this)); System.Runtime.InteropServices.Marshal.StructureToPtr(this, this_as_native, false); IntPtr native_glyph_item = GLib.Marshaller.StructureToPtrAlloc(glyph_item); IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup(text); bool raw_ret = pango_glyph_item_iter_init_start(this_as_native, native_glyph_item, native_text); bool ret = raw_ret; ReadNative(this_as_native, ref this); System.Runtime.InteropServices.Marshal.FreeHGlobal(this_as_native); Marshal.FreeHGlobal(native_glyph_item); GLib.Marshaller.Free(native_text); return(ret); }
private void InternalDrawGlyphItem(string text, Pango.GlyphItem glyph_item, int x, int y) { DrawGlyphItemNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("draw_glyph_item")); unmanaged = (DrawGlyphItemNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DrawGlyphItemNativeDelegate)); } if (unmanaged == null) { return; } IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup(text); IntPtr native_glyph_item = GLib.Marshaller.StructureToPtrAlloc(glyph_item); unmanaged(this.Handle, native_text, native_glyph_item, x, y); GLib.Marshaller.Free(native_text); Marshal.FreeHGlobal(native_glyph_item); }
protected virtual void OnDrawGlyphItem(string text, Pango.GlyphItem glyph_item, int x, int y) { InternalDrawGlyphItem(text, glyph_item, x, y); }
static extern IntPtr pango_glyph_item_apply_attrs(ref Pango.GlyphItem raw, IntPtr text, IntPtr list);
static void ReadNative(IntPtr native, ref Pango.GlyphItem target) { target = New(native); }