GObject.Object
Gdk.Device
Import line: | Gdk = imports.gi.Gdk; |
GIR File: | Gdk-3.0.gir |
C documentation: | GdkDevice |
Class : | Device |
Extends: | GObject.Object |
Properties | Defined By | |
---|---|---|
associated_device : Gdk.Device
read only
Associated pointer or keyboard with this device, if any.
Associated pointer or keyboard with this device, if any. Devices of type GDK_DEVICE_TYPE_MASTER
always come in keyboard/pointer pairs. Other device types will have a NULL associated device. |
Gdk.Device | |
device_manager : Gdk.DeviceManager
The GdkDeviceManager the GdkDevice pertains to.
The GdkDeviceManager the GdkDevice pertains to.
|
Gdk.Device | |
display : Gdk.Display
The GdkDisplay the GdkDevice pertains to.
The GdkDisplay the GdkDevice pertains to.
|
Gdk.Device | |
has_cursor : gboolean
Whether the device is represented by a cursor on the screen.
Whether the device is represented by a cursor on the screen. Devices of type
GDK_DEVICE_TYPE_MASTER will have TRUE here. |
Gdk.Device | |
n_axes : guint32
read only
Number of axes in the device.
Number of axes in the device.
|
Gdk.Device | |
name : String
The device name.
The device name.
|
Gdk.Device |
Method / Constructor | Defined By | |
---|---|---|
new Gdk.Device
(Object properties)
Create a new Gdk.Device
Create a new Gdk.Device
|
||
Determines information about the current keyboard grab.
Determines information about the current keyboard grab.
This is not public API and must not be used by applications. keyboard grabbed.
|
Gdk.Device | |
get_associated_device
()
:
Gdk.Device
Returns the associated device to device, if device is of type
GDK_DEVICE_TYPE_MASTER, it will return the paired pointer or keyboard.
Returns the associated device to device, if device is of type
GDK_DEVICE_TYPE_MASTER, it will return the paired pointer or keyboard. If device is of type GDK_DEVICE_TYPE_SLAVE, it will return the master device to which device is attached to. If device is of type GDK_DEVICE_TYPE_FLOATING, NULL will be returned, as there is no associated device.
|
Gdk.Device | |
get_axis_use
(guint32 index_)
:
Gdk.AxisUse
Returns the axis use for index_.
Returns the axis use for index_.
|
Gdk.Device | |
get_device_type
()
:
Gdk.DeviceType
Returns the device type for device.
Returns the device type for device.
|
Gdk.Device | |
get_display
()
:
Gdk.Display
Returns the GdkDisplay to which device pertains.
Returns the GdkDisplay to which device pertains.
by GTK+, and must not be freed or unreffed.
|
Gdk.Device | |
get_has_cursor
()
:
gboolean
Determines whether the pointer follows device motion.
Determines whether the pointer follows device motion.
|
Gdk.Device | |
If index_ has a valid keyval, this function will return TRUE
and fill in keyval and modifiers with the keyval settings.
If index_ has a valid keyval, this function will return TRUE
and fill in keyval and modifiers with the keyval settings.
|
Gdk.Device | |
get_mode
()
:
Gdk.InputMode
Determines the mode of the device.
Determines the mode of the device.
|
Gdk.Device | |
get_n_axes
()
:
gint32
Returns the number of axes the device currently has.
Returns the number of axes the device currently has.
|
Gdk.Device | |
get_n_keys
()
:
gint32
Returns the number of keys the device currently has.
Returns the number of keys the device currently has.
|
Gdk.Device | |
get_name
()
:
String
Determines the name of the device.
Determines the name of the device.
|
Gdk.Device | |
get_position
()
:
Object
Gets the current location of device.
Gets the current location of device. As a slave device
coordinates are those of its master pointer, This function may not be called on devices of type GDK_DEVICE_TYPE_SLAVE, unless there is an ongoing grab on them, see gdk_device_grab().
|
Gdk.Device | |
get_source
()
:
Gdk.InputSource
Determines the type of the device.
Determines the type of the device.
|
Gdk.Device | |
get_window_at_position
(Object out_values)
:
Gdk.Window
Obtains the window underneath device, returning the location of the device in win_x and win_y.
Obtains the window underneath device, returning the location of the device in win_x and win_y. Returns
NULL if the window tree under device is not known to GDK (for example, belongs to another application). As a slave device coordinates are those of its master pointer, This function may not be called on devices of type GDK_DEVICE_TYPE_SLAVE, unless there is an ongoing grab on them, see gdk_device_grab().
|
Gdk.Device | |
grab
(Window window, GrabOwnership grab_ownership, gboolean owner_events, EventMask event_mask, Cursor cursor, guint32 time_)
:
Gdk.GrabStatus
Grabs the device so that all events coming from this device are passed to
this application until the device is ungrabbed with gdk_device_ungrab(), or the window becomes unviewable.
Grabs the device so that all events coming from this device are passed to
this application until the device is ungrabbed with gdk_device_ungrab(), or the window becomes unviewable. This overrides any previous grab on the device by this client. Device grabs are used for operations which need complete control over the given device events (either pointer or keyboard). For example in GTK+ this is used for Drag and Drop operations, popup menus and such. Note that if the event mask of an X window has selected both button press and button release events, then a button press event will cause an automatic pointer grab until the button is released. X does this automatically since most applications expect to receive button press and release events in pairs. It is equivalent to a pointer grab on the window with owner_events set to TRUE. If you set up anything at the time you take the grab that needs to be cleaned up when the grab ends, you should handle the GdkEventGrabBroken events that are emitted when the grab ends unvoluntarily.
|
Gdk.Device | |
list_axes
()
:
Array
Returns a GList of GdkAtoms, containing the labels for
the axes that device currently has.
Returns a GList of GdkAtoms, containing the labels for
the axes that device currently has. A GList of GdkAtoms, free with g_list_free().
|
Gdk.Device | |
list_slave_devices
()
:
Array
If the device if of type GDK_DEVICE_TYPE_MASTER, it will return
the list of slave devices attached to it, otherwise it will return NULL slave devices, or NULL.
If the device if of type GDK_DEVICE_TYPE_MASTER, it will return
the list of slave devices attached to it, otherwise it will return NULL slave devices, or NULL. The list must be freed with g_list_free(), the contents of the list are owned by GTK+ and should not be freed.
|
Gdk.Device | |
Specifies how an axis of a device is used.
Specifies how an axis of a device is used.
|
Gdk.Device | |
Specifies the X key event to generate when a macro button of a device
is pressed.
Specifies the X key event to generate when a macro button of a device
is pressed.
|
Gdk.Device | |
Sets a the mode of an input device.
Sets a the mode of an input device. The mode controls if the
device is active and whether the device's range is mapped to the entire screen or to a single window.
|
Gdk.Device | |
ungrab
(guint32 time_)
:
none
Release any grab on device.
Release any grab on device.
|
Gdk.Device | |
Warps device in display to the point x,y on
the screen screen, unless the device is confined to a window by a grab, in which case it will be moved as far as allowed by the grab.
Warps device in display to the point x,y on
the screen screen, unless the device is confined to a window by a grab, in which case it will be moved as far as allowed by the grab. Warping the pointer creates events as if the user had moved the mouse instantaneously to the destination. Note that the pointer should normally be under the control of the user. This function was added to cover some rare use cases like keyboard navigation support for the color picker in the GtkColorSelectionDialog.
|
Gdk.Device |
Event | Defined By | |
---|---|---|
changed (Device self)
:
none
The ::changed signal is emitted either when the GdkDevice
has changed the number of either axes or keys.
The ::changed signal is emitted either when the GdkDevice
has changed the number of either axes or keys. For example In X this will normally happen when the slave device routing events through the master device changes (for example, user switches from the USB mouse to a tablet), in that case the master device will change to reflect the new slave device axes and keys.
|
Gdk.Device |
Class / Namespace | Method / Signal / Properties |
---|---|
Gdk
Method |
Starts a drag and creates a new drag context for it.
|
Gdk.Device
Property |
associated_device : Gdk.Device
read only
Associated pointer or keyboard with this device, if any.
|
Gdk.DeviceManager
Signal |
device_added
(DeviceManager self, Device device)
:
none
The ::device-added signal is emitted either when a new master
pointer is created, or when a slave (Hardware) input device is plugged in. |
Gdk.DeviceManager
Signal |
device_changed
(DeviceManager self, Device device)
:
none
The ::device-changed signal is emitted whenever a device
has changed in the hierarchy, either slave devices being disconnected from their master device or connected to another one, or master devices being added or removed a slave device. |
Gdk.DeviceManager
Signal |
device_removed
(DeviceManager self, Device device)
:
none
The ::device-removed signal is emitted either when a master
pointer is removed, or when a slave (Hardware) input device is unplugged. |
Gdk.DeviceManager
Method |
get_client_pointer
()
:
Gdk.Device
Returns the client pointer, that is, the master pointer that acts as the core pointer
for this application. |
Gdk.Display
Method |
Returns TRUE if there is an ongoing grab on device for display.
|
Gdk.DragContext
Method |
get_device
()
:
Gdk.Device
Returns the GdkDevice associated to the drag context.
|
Gdk.DragContext
Method |
set_device
(Device device)
:
none
Associates a GdkDevice to context, so all Drag and Drop events
for context are emitted as if they came from this device. |
Gdk.Event
Method |
get_device
()
:
Gdk.Device
If the event contains a "device" field, this function will return
it, else it will return NULL. |
Gdk.Event
Method |
get_source_device
()
:
Gdk.Device
This function returns the hardware (slave) GdkDevice that has
triggered the event, falling back to the virtual (master) device (as in gdk_event_get_device()) if the event wasn't caused by interaction with a hardware device. |
Gdk.Event
Method |
set_device
(Device device)
:
none
Sets the device for event to device.
|
Gdk.Event
Method |
set_source_device
(Device device)
:
none
Sets the slave device for event to device.
|
Gdk.Window
Method |
get_device_cursor
(Device device)
:
Gdk.Cursor
Retrieves a GdkCursor pointer for the device currently set on the
specified GdkWindow, or NULL. |
Gdk.Window
Method |
get_device_events
(Device device)
:
Gdk.EventMask
Returns the event mask for window corresponding to an specific device.
|
Gdk.Window
Method |
Obtains the current device position and modifier state.
|
Gdk.Window
Method |
Sets a specific GdkCursor for a given device when it gets inside window.
|
Gdk.Window
Method |
Sets the event mask for a given device (Normally a floating device, not
attached to any visible pointer) to window. |
Gtk
Method |
Adds a GTK+ grab on device, so all the events on device and its
associated pointer or keyboard (if any) are delivered to widget. |
Gtk
Method |
Removes a device grab from the given widget.
|
Gtk
Method |
Gtk.get_current_event_device
()
:
Gdk.Device
If there is a current event and it has a device, return that
device, otherwise return NULL. |
Gtk.ComboBox
Method |
popup_for_device
(Device device)
:
none
Pops up the menu or dropdown list of combo_box, the popup window
will be grabbed so only device and its associated pointer/keyboard are the only GdkDevices able to send events to it. |
Gtk.Menu
Method |
popup_for_device
(Device device, Widget parent_menu_shell, Widget parent_menu_item, Function func, void* data, Function destroy, guint32 button, guint32 activate_time)
:
none
Displays a menu and makes it available for selection.
|
Gtk.Widget
Method |
Adds the device events in the bitfield events to the event mask for
|
Gtk.Widget
Method |
Returns TRUE if device has been shadowed by a GTK+
device grab on another widget, so it would stop sending events to widget. |
Gtk.Widget
Method |
Returns whether device can interact with widget and its
children. |
Gtk.Widget
Method |
get_device_events
(Device device)
:
Gdk.EventMask
Returns the events mask for the widget corresponding to an specific device.
|
Gtk.Widget
Method |
Enables or disables a GdkDevice to interact with widget
and all its children. |
Gtk.Widget
Method |
Sets the device event mask (see GdkEventMask) for a widget.
|
Gtk.WindowGroup
Method |
get_current_device_grab
(Device device)
:
Gtk.Widget
Returns the current grab widget for device, or NULL if none.
|