static void OverrideCancel(GLib.GType gtype, CancelNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("cancel")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalCancel() { CancelNativeDelegate unmanaged = class_abi.BaseOverride <CancelNativeDelegate>(this.LookupGType(), "cancel"); if (unmanaged == null) { return; } unmanaged(this.Handle); }
private bool InternalCancel() { CancelNativeDelegate unmanaged = class_abi.BaseOverride <CancelNativeDelegate>(this.LookupGType(), "cancel"); if (unmanaged == null) { return(false); } bool __result = unmanaged(this.Handle); return(__result); }
private void InternalCancel() { CancelNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("cancel")); unmanaged = (CancelNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CancelNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle); }
static void OverrideCancel (GLib.GType gtype, CancelNativeDelegate callback) { GtkAssistantClass class_iface = GetClassStruct (gtype, false); class_iface.Cancel = callback; OverrideClassStruct (gtype, class_iface); }