static void OverrideGetMaster(GLib.GType gtype, GetMasterNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_master")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private Gdk.Device InternalGetMaster(Gdk.SeatCapabilities capability) { GetMasterNativeDelegate unmanaged = class_abi.BaseOverride <GetMasterNativeDelegate>(this.LookupGType(), "get_master"); if (unmanaged == null) { return(null); } IntPtr __result = unmanaged(this.Handle, (int)capability); return(GLib.Object.GetObject(__result) as Gdk.Device); }
private Gdk.Device InternalGetMaster(Gdk.SeatCapabilities capability) { GetMasterNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("get_master")); unmanaged = (GetMasterNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetMasterNativeDelegate)); } if (unmanaged == null) { return(null); } IntPtr __result = unmanaged(this.Handle, (int)capability); return(GLib.Object.GetObject(__result) as Gdk.Device); }