コード例 #1
0
 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);
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: Gdk_Seat.cs プロジェクト: Kurasuke/gst-plugin-sub
        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);
        }