static void OverrideReset(GLib.GType gtype, ResetNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("reset")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalReset() { ResetNativeDelegate unmanaged = class_abi.BaseOverride <ResetNativeDelegate>(this.LookupGType(), "reset"); if (unmanaged == null) { return; } unmanaged(this.Handle); }
private void InternalReset() { ResetNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("reset")); unmanaged = (ResetNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResetNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle); }
static void OverrideReset (GLib.GType gtype, ResetNativeDelegate callback) { GtkIMContextClass class_iface = GetClassStruct (gtype, false); class_iface.Reset = callback; OverrideClassStruct (gtype, class_iface); }