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