Esempio n. 1
0
 static void OverrideDrawGlyphs(GLib.GType gtype, DrawGlyphsNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("draw_glyphs"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Esempio n. 2
0
        private void InternalDrawGlyphs(Pango.Font font, Pango.GlyphString glyphs, int x, int y)
        {
            DrawGlyphsNativeDelegate unmanaged = class_abi.BaseOverride <DrawGlyphsNativeDelegate>(this.LookupGType(), "draw_glyphs");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, font == null ? IntPtr.Zero : font.Handle, glyphs == null ? IntPtr.Zero : glyphs.Handle, x, y);
        }
Esempio n. 3
0
        private void InternalDrawGlyphs(Pango.Font font, Pango.GlyphString glyphs, int x, int y)
        {
            DrawGlyphsNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("draw_glyphs"));
                unmanaged = (DrawGlyphsNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DrawGlyphsNativeDelegate));
            }
            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle, font == null ? IntPtr.Zero : font.Handle, glyphs == null ? IntPtr.Zero : glyphs.Handle, x, y);
        }