static void OverrideEnd(GLib.GType gtype, EndNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("end")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalEnd() { EndNativeDelegate unmanaged = class_abi.BaseOverride <EndNativeDelegate>(this.LookupGType(), "end"); if (unmanaged == null) { return; } unmanaged(this.Handle); }
private void InternalEnd() { EndNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("end")); unmanaged = (EndNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(EndNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle); }