static void OverrideCanceled(GLib.GType gtype, CanceledNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("cancel")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalCanceled() { CanceledNativeDelegate unmanaged = class_abi.BaseOverride <CanceledNativeDelegate>(this.LookupGType(), "cancel"); if (unmanaged == null) { return; } unmanaged(this.Handle); }
private void InternalCanceled() { CanceledNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("cancel")); unmanaged = (CanceledNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CanceledNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle); }
static void OverrideCanceled (GLib.GType gtype, CanceledNativeDelegate callback) { gtksharp_menushell_override_cancel (gtype.GetClassPtr (), callback); }
static extern void gtksharp_menushell_override_cancel (IntPtr class_struct, CanceledNativeDelegate cb);