static void OverridePause(GLib.GType gtype, PauseNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("pause")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalPause() { PauseNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("pause")); unmanaged = (PauseNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PauseNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle); }