summaryrefslogtreecommitdiff
path: root/gdk/gdkdevice.h
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-01-27 21:35:40 +0000
committerCarlos Garnacho <carlosg@gnome.org>2016-04-06 15:43:29 +0200
commit0f962f107576ceb8adf697c0598fdeed51882e0a (patch)
treee81de2198d244e0e3474e90d8ee52c304fc38ace /gdk/gdkdevice.h
parent32d7ba76b3642aefe83d183464a762a1ed152f19 (diff)
downloadgtk+-0f962f107576ceb8adf697c0598fdeed51882e0a.tar.gz
device: Add gdk_device_get_axes(), and ::axes property
This returns a GdkAxisFlags, holding the axes currently available through this device.
Diffstat (limited to 'gdk/gdkdevice.h')
-rw-r--r--gdk/gdkdevice.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/gdk/gdkdevice.h b/gdk/gdkdevice.h
index d171f8fc01..ad5bf66e94 100644
--- a/gdk/gdkdevice.h
+++ b/gdk/gdkdevice.h
@@ -114,6 +114,35 @@ typedef enum
} GdkAxisUse;
/**
+ * GdkAxisFlags:
+ * @GDK_AXIS_FLAG_X: X axis is present
+ * @GDK_AXIS_FLAG_Y: Y axis is present
+ * @GDK_AXIS_FLAG_PRESSURE: Pressure axis is present
+ * @GDK_AXIS_FLAG_XTILT: X tilt axis is present
+ * @GDK_AXIS_FLAG_YTILT: Y tilt axis is present
+ * @GDK_AXIS_FLAG_WHEEL: Wheel axis is present
+ * @GDK_AXIS_FLAG_DISTANCE: Distance axis is present
+ * @GDK_AXIS_FLAG_ROTATION: Z-axis rotation is present
+ * @GDK_AXIS_FLAG_SLIDER: Slider axis is present
+ *
+ * Flags describing the current capabilities of a device/tool.
+ *
+ * Since: 3.22
+ */
+typedef enum
+{
+ GDK_AXIS_FLAG_X = 1 << GDK_AXIS_X,
+ GDK_AXIS_FLAG_Y = 1 << GDK_AXIS_Y,
+ GDK_AXIS_FLAG_PRESSURE = 1 << GDK_AXIS_PRESSURE,
+ GDK_AXIS_FLAG_XTILT = 1 << GDK_AXIS_XTILT,
+ GDK_AXIS_FLAG_YTILT = 1 << GDK_AXIS_YTILT,
+ GDK_AXIS_FLAG_WHEEL = 1 << GDK_AXIS_WHEEL,
+ GDK_AXIS_FLAG_DISTANCE = 1 << GDK_AXIS_DISTANCE,
+ GDK_AXIS_FLAG_ROTATION = 1 << GDK_AXIS_ROTATION,
+ GDK_AXIS_FLAG_SLIDER = 1 << GDK_AXIS_SLIDER,
+} GdkAxisFlags;
+
+/**
* GdkDeviceType:
* @GDK_DEVICE_TYPE_MASTER: Device is a master (or virtual) device. There will
* be an associated focus indicator on the screen.
@@ -288,6 +317,9 @@ const gchar *gdk_device_get_product_id (GdkDevice *device);
GDK_AVAILABLE_IN_3_20
GdkSeat *gdk_device_get_seat (GdkDevice *device);
+GDK_AVAILABLE_IN_3_22
+GdkAxisFlags gdk_device_get_axes (GdkDevice *device);
+
G_END_DECLS
#endif /* __GDK_DEVICE_H__ */