static void OverrideObjectRemoved(GLib.GType gtype, ObjectRemovedNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("object_removed")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalObjectRemoved(GES.Clip _object) { ObjectRemovedNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("object_removed")); unmanaged = (ObjectRemovedNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ObjectRemovedNativeDelegate)); } if (unmanaged == null) { return; } unmanaged(this.Handle, _object == null ? IntPtr.Zero : _object.Handle); }