Top |
GList * | gdk_devices_list () |
const gchar * | gdk_device_get_name () |
void | gdk_device_set_source () |
GdkInputSource | gdk_device_get_source () |
gboolean | gdk_device_set_mode () |
GdkInputMode | gdk_device_get_mode () |
void | gdk_device_set_key () |
void | gdk_device_get_key () |
void | gdk_device_set_axis_use () |
GdkAxisUse | gdk_device_get_axis_use () |
GdkDevice * | gdk_device_get_core_pointer () |
void | gdk_device_get_state () |
gboolean | gdk_device_get_history () |
void | gdk_device_free_history () |
gboolean | gdk_device_get_axis () |
gint | gdk_device_get_n_axes () |
void | gdk_input_set_extension_events () |
struct | GdkDevice |
enum | GdkInputSource |
enum | GdkInputMode |
struct | GdkDeviceKey |
struct | GdkDeviceAxis |
enum | GdkAxisUse |
struct | GdkTimeCoord |
enum | GdkExtensionMode |
GList *
gdk_devices_list (void
);
Returns the list of available input devices for the default display. The list is statically allocated and should not be freed.
const gchar *
gdk_device_get_name (GdkDevice *device
);
Determines the name of the device.
Since: 2.22
GdkInputSource
gdk_device_get_source (GdkDevice *device
);
Determines the type of the device.
Since: 2.22
GdkInputMode
gdk_device_get_mode (GdkDevice *device
);
Determines the mode of the device.
Since: 2.22
void gdk_device_set_key (GdkDevice *device
,guint index_
,guint keyval
,GdkModifierType modifiers
);
void gdk_device_get_key (GdkDevice *device
,guint index
,guint *keyval
,GdkModifierType *modifiers
);
If index
has a valid keyval, this function will
fill in keyval
and modifiers
with the keyval settings.
device |
a GdkDevice. |
|
index |
the index of the macro button to get. |
|
keyval |
return value for the keyval. |
|
modifiers |
return value for modifiers. |
Since: 2.22
void gdk_device_set_axis_use (GdkDevice *device
,guint index_
,GdkAxisUse use
);
GdkAxisUse gdk_device_get_axis_use (GdkDevice *device
,guint index
);
Returns the axis use for index
.
Since: 2.22
GdkDevice *
gdk_device_get_core_pointer (void
);
Returns the core pointer device for the default display.
void gdk_device_get_state (GdkDevice *device
,GdkWindow *window
,gdouble *axes
,GdkModifierType *mask
);
Gets the current state of a device.
gboolean gdk_device_get_history (GdkDevice *device
,GdkWindow *window
,guint32 start
,guint32 stop
,GdkTimeCoord ***events
,gint *n_events
);
Obtains the motion history for a device; given a starting and
ending timestamp, return all events in the motion history for
the device in the given range of time. Some windowing systems
do not support motion history, in which case, FALSE
will
be returned. (This is not distinguishable from the case where
motion history is supported and no events were found.)
device |
||
window |
the window with respect to which which the event coordinates will be reported |
|
start |
starting timestamp for range of events to return |
|
stop |
ending timestamp for the range of events to return |
|
events |
location to store a newly-allocated array of GdkTimeCoord, or |
[array length=n_events][out][transfer none] |
n_events |
location to store the length of |
void gdk_device_free_history (GdkTimeCoord **events
,gint n_events
);
Frees an array of GdkTimeCoord that was returned by gdk_device_get_history()
.
events |
an array of GdkTimeCoord. |
[inout][transfer none] |
n_events |
the length of the array. |
gboolean gdk_device_get_axis (GdkDevice *device
,gdouble *axes
,GdkAxisUse use
,gdouble *value
);
Interprets an array of double as axis values for a given device, and locates the value in the array for a given axis use.
gint
gdk_device_get_n_axes (GdkDevice *device
);
Gets the number of axes of a device.
Since: 2.22
void gdk_input_set_extension_events (GdkWindow *window
,gint mask
,GdkExtensionMode mode
);
struct GdkDevice { GObject parent_instance; /* All fields are read-only */ gchar *GSEAL (name); GdkInputSource GSEAL (source); GdkInputMode GSEAL (mode); gboolean GSEAL (has_cursor); /* TRUE if the X pointer follows device motion */ gint GSEAL (num_axes); GdkDeviceAxis *GSEAL (axes); gint GSEAL (num_keys); GdkDeviceKey *GSEAL (keys); };