static void OverrideApply(GLib.GType gtype, ApplyNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("apply")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalApply() { ApplyNativeDelegate unmanaged = class_abi.BaseOverride <ApplyNativeDelegate>(this.LookupGType(), "apply"); if (unmanaged == null) { return; } unmanaged(this.Handle); }
private void InternalApply() { ApplyNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("apply")); unmanaged = (ApplyNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ApplyNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle); }
static void OverrideApply (GLib.GType gtype, ApplyNativeDelegate callback) { GtkAssistantClass class_iface = GetClassStruct (gtype, false); class_iface.Apply = callback; OverrideClassStruct (gtype, class_iface); }