static void OverrideGetSurface(GLib.GType gtype, GetSurfaceNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_surface")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private Cairo.Surface InternalGetSurface(out double x_hot, out double y_hot) { GetSurfaceNativeDelegate unmanaged = class_abi.BaseOverride <GetSurfaceNativeDelegate>(this.LookupGType(), "get_surface"); if (unmanaged == null) { throw new InvalidOperationException("No base method to invoke"); } IntPtr __result = unmanaged(this.Handle, out x_hot, out y_hot); return(Cairo.Surface.Lookup(__result, true)); }
private Cairo.Surface InternalGetSurface(out double x_hot, out double y_hot) { GetSurfaceNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("get_surface")); unmanaged = (GetSurfaceNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetSurfaceNativeDelegate)); } if (unmanaged == null) { throw new InvalidOperationException("No base method to invoke"); } IntPtr __result = unmanaged(this.Handle, out x_hot, out y_hot); return(Cairo.Surface.Lookup(__result, true)); }