static void OverrideSyncValues(GLib.GType gtype, SyncValuesNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("sync_values")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private bool InternalSyncValues(Gst.Object _object, ulong timestamp, ulong last_sync) { SyncValuesNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("sync_values")); unmanaged = (SyncValuesNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SyncValuesNativeDelegate)); } if (unmanaged == null) { return(false); } bool __result = unmanaged(this.Handle, _object == null ? IntPtr.Zero : _object.Handle, timestamp, last_sync); return(__result); }