Пример #1
0
        public Gdk.GrabStatus Grab(Gdk.Window window, Gdk.SeatCapabilities capabilities, bool owner_events, Gdk.Cursor cursor, Gdk.Event evnt, Gdk.SeatGrabPrepareFunc prepare_func)
        {
            GdkSharp.SeatGrabPrepareFuncWrapper prepare_func_wrapper = new GdkSharp.SeatGrabPrepareFuncWrapper(prepare_func);
            int raw_ret = gdk_seat_grab(Handle, window == null ? IntPtr.Zero : window.Handle, (int)capabilities, owner_events, cursor == null ? IntPtr.Zero : cursor.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, prepare_func_wrapper.NativeDelegate, IntPtr.Zero);

            Gdk.GrabStatus ret = (Gdk.GrabStatus)raw_ret;
            return(ret);
        }
Пример #2
0
        private Gdk.GrabStatus InternalGrab(Gdk.Window window, Gdk.SeatCapabilities capabilities, bool owner_events, Gdk.Cursor cursor, Gdk.Event evnt, Gdk.SeatGrabPrepareFunc prepare_func)
        {
            GrabNativeDelegate unmanaged = class_abi.BaseOverride <GrabNativeDelegate>(this.LookupGType(), "grab");

            if (unmanaged == null)
            {
                return((Gdk.GrabStatus) 0);
            }

            GdkSharp.SeatGrabPrepareFuncWrapper prepare_func_wrapper = new GdkSharp.SeatGrabPrepareFuncWrapper(prepare_func);
            int __result = unmanaged(this.Handle, window == null ? IntPtr.Zero : window.Handle, (int)capabilities, owner_events, cursor == null ? IntPtr.Zero : cursor.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, prepare_func_wrapper.NativeDelegate, IntPtr.Zero);

            return((Gdk.GrabStatus)__result);
        }
Пример #3
0
        private Gdk.GrabStatus InternalGrab(Gdk.Window window, Gdk.SeatCapabilities capabilities, bool owner_events, Gdk.Cursor cursor, Gdk.Event evnt, Gdk.SeatGrabPrepareFunc prepare_func)
        {
            GrabNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("grab"));
                unmanaged = (GrabNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GrabNativeDelegate));
            }
            if (unmanaged == null)
            {
                return((Gdk.GrabStatus) 0);
            }

            GdkSharp.SeatGrabPrepareFuncWrapper prepare_func_wrapper = new GdkSharp.SeatGrabPrepareFuncWrapper(prepare_func);
            int __result = unmanaged(this.Handle, window == null ? IntPtr.Zero : window.Handle, (int)capabilities, owner_events, cursor == null ? IntPtr.Zero : cursor.Handle, evnt == null ? IntPtr.Zero : evnt.Handle, prepare_func_wrapper.NativeDelegate, IntPtr.Zero);

            return((Gdk.GrabStatus)__result);
        }