Exemple #1
0
// ListDevices() is a wrapper around gdk_device_manager_list_devices().
func (v *DeviceManager) ListDevices(tp DeviceType) *glib.List {
	clist := C.gdk_device_manager_list_devices(v.native(), C.GdkDeviceType(tp))
	if clist == nil {
		return nil
	}
	glist := glib.WrapList(uintptr(unsafe.Pointer(clist)))
	glist.DataWrapper(func(ptr unsafe.Pointer) interface{} {
		return &Device{&glib.Object{glib.ToGObject(ptr)}}
	})
	runtime.SetFinalizer(glist, func(glist *glib.List) {
		glist.Free()
	})
	return glist
}
Exemple #2
0
	TOP_LEFT_CORNER     = C.GdkCursorType(C.GDK_TOP_LEFT_CORNER)
	TOP_RIGHT_CORNER    = C.GdkCursorType(C.GDK_TOP_RIGHT_CORNER)
	TOP_SIDE            = C.GdkCursorType(C.GDK_TOP_SIDE)
	TOP_TEE             = C.GdkCursorType(C.GDK_TOP_TEE)
	TREK                = C.GdkCursorType(C.GDK_TREK)
	UL_ANGLE            = C.GdkCursorType(C.GDK_UL_ANGLE)
	UMBRELLA            = C.GdkCursorType(C.GDK_UMBRELLA)
	UR_ANGLE            = C.GdkCursorType(C.GDK_UR_ANGLE)
	WATCH               = C.GdkCursorType(C.GDK_WATCH)
	XTERM               = C.GdkCursorType(C.GDK_XTERM)
	LAST_CURSOR         = C.GdkCursorType(C.GDK_LAST_CURSOR)
	BLANK_CURSOR        = C.GdkCursorType(C.GDK_BLANK_CURSOR)
	CURSOR_IS_PIXMAP    = C.GdkCursorType(C.GDK_CURSOR_IS_PIXMAP)

	// DeviceType
	DEVICE_TYPE_MASTER   = C.GdkDeviceType(C.GDK_DEVICE_TYPE_MASTER)
	DEVICE_TYPE_SLAVE    = C.GdkDeviceType(C.GDK_DEVICE_TYPE_SLAVE)
	DEVICE_TYPE_FLOATING = C.GdkDeviceType(C.GDK_DEVICE_TYPE_FLOATING)

	// DragProtocol
	DRAG_PROTO_NONE            = C.GdkDragProtocol(C.GDK_DRAG_PROTO_NONE)
	DRAG_PROTO_MOTIF           = C.GdkDragProtocol(C.GDK_DRAG_PROTO_MOTIF)
	DRAG_PROTO_XDND            = C.GdkDragProtocol(C.GDK_DRAG_PROTO_XDND)
	DRAG_PROTO_ROOTWIN         = C.GdkDragProtocol(C.GDK_DRAG_PROTO_ROOTWIN)
	DRAG_PROTO_WIN32_DROPFILES = C.GdkDragProtocol(C.GDK_DRAG_PROTO_WIN32_DROPFILES)
	DRAG_PROTO_OLE2            = C.GdkDragProtocol(C.GDK_DRAG_PROTO_OLE2)
	DRAG_PROTO_LOCAL           = C.GdkDragProtocol(C.GDK_DRAG_PROTO_LOCAL)
	DRAG_PROTO_WAYLAND         = C.GdkDragProtocol(C.GDK_DRAG_PROTO_WAYLAND)

	// EventType
	NOTHING             = C.GdkEventType(C.GDK_NOTHING)