Exemple #1
0
 static void OverrideTextureFromSurface(GLib.GType gtype, TextureFromSurfaceNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("texture_from_surface"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Exemple #2
0
        private bool InternalTextureFromSurface(Cairo.Surface surface, Cairo.Region region)
        {
            TextureFromSurfaceNativeDelegate unmanaged = class_abi.BaseOverride <TextureFromSurfaceNativeDelegate>(this.LookupGType(), "texture_from_surface");

            if (unmanaged == null)
            {
                return(false);
            }

            bool __result = unmanaged(this.Handle, surface.Handle, region == null ? IntPtr.Zero : region.Handle);

            return(__result);
        }
Exemple #3
0
        private bool InternalTextureFromSurface(Cairo.Surface surface, Cairo.Region region)
        {
            TextureFromSurfaceNativeDelegate unmanaged = null;

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

            bool __result = unmanaged(this.Handle, surface.Handle, region == null ? IntPtr.Zero : region.Handle);

            return(__result);
        }