예제 #1
0
파일: gdk.go 프로젝트: yamnikov-oleg/gotk3
// Grab() is a wrapper around gdk_device_grab().
func (v *Device) Grab(w *Window, ownership GrabOwnership, owner_events bool, event_mask EventMask, cursor *Cursor, time uint32) GrabStatus {
	ret := C.gdk_device_grab(
		v.native(),
		w.native(),
		C.GdkGrabOwnership(ownership),
		gbool(owner_events),
		C.GdkEventMask(event_mask),
		cursor.native(),
		C.guint32(time),
	)
	return GrabStatus(ret)
}
예제 #2
0
파일: gdk_enums.go 프로젝트: reusee/ggir
	TOUCH_UPDATE        = C.GdkEventType(C.GDK_TOUCH_UPDATE)
	TOUCH_END           = C.GdkEventType(C.GDK_TOUCH_END)
	TOUCH_CANCEL        = C.GdkEventType(C.GDK_TOUCH_CANCEL)
	EVENT_LAST          = C.GdkEventType(C.GDK_EVENT_LAST)

	// FilterReturn
	FILTER_CONTINUE  = C.GdkFilterReturn(C.GDK_FILTER_CONTINUE)
	FILTER_TRANSLATE = C.GdkFilterReturn(C.GDK_FILTER_TRANSLATE)
	FILTER_REMOVE    = C.GdkFilterReturn(C.GDK_FILTER_REMOVE)

	// FullscreenMode
	FULLSCREEN_ON_CURRENT_MONITOR = C.GdkFullscreenMode(C.GDK_FULLSCREEN_ON_CURRENT_MONITOR)
	FULLSCREEN_ON_ALL_MONITORS    = C.GdkFullscreenMode(C.GDK_FULLSCREEN_ON_ALL_MONITORS)

	// GrabOwnership
	OWNERSHIP_NONE        = C.GdkGrabOwnership(C.GDK_OWNERSHIP_NONE)
	OWNERSHIP_WINDOW      = C.GdkGrabOwnership(C.GDK_OWNERSHIP_WINDOW)
	OWNERSHIP_APPLICATION = C.GdkGrabOwnership(C.GDK_OWNERSHIP_APPLICATION)

	// GrabStatus
	GRAB_SUCCESS         = C.GdkGrabStatus(C.GDK_GRAB_SUCCESS)
	GRAB_ALREADY_GRABBED = C.GdkGrabStatus(C.GDK_GRAB_ALREADY_GRABBED)
	GRAB_INVALID_TIME    = C.GdkGrabStatus(C.GDK_GRAB_INVALID_TIME)
	GRAB_NOT_VIEWABLE    = C.GdkGrabStatus(C.GDK_GRAB_NOT_VIEWABLE)
	GRAB_FROZEN          = C.GdkGrabStatus(C.GDK_GRAB_FROZEN)

	// Gravity
	GRAVITY_NORTH_WEST = C.GdkGravity(C.GDK_GRAVITY_NORTH_WEST)
	GRAVITY_NORTH      = C.GdkGravity(C.GDK_GRAVITY_NORTH)
	GRAVITY_NORTH_EAST = C.GdkGravity(C.GDK_GRAVITY_NORTH_EAST)
	GRAVITY_WEST       = C.GdkGravity(C.GDK_GRAVITY_WEST)