summaryrefslogtreecommitdiff
path: root/gdk/gdkdevice.h
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-01-06 14:38:14 +0100
committerCarlos Garnacho <carlosg@gnome.org>2016-04-06 15:43:29 +0200
commit4ba95b09ba1b42aba68335d4a2df021cd58a5a32 (patch)
treed87c6e24d0694b5e909ad9680c221a06e84f5284 /gdk/gdkdevice.h
parent0f962f107576ceb8adf697c0598fdeed51882e0a (diff)
downloadgtk+-4ba95b09ba1b42aba68335d4a2df021cd58a5a32.tar.gz
gdkdevice: Add GdkDeviceTool to identify device tools
GdkDeviceTool is an opaque object that can be used to identify a given tool (eg. pens on tablets) during the app/device lifetime. Tools are only set on non-master devices, and are owned by these. The accounting functions are made private, the only public call on GdkDeviceTool so far is gdk_device_tool_get_serial(), useful to identify the tool across runs.
Diffstat (limited to 'gdk/gdkdevice.h')
-rw-r--r--gdk/gdkdevice.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdk/gdkdevice.h b/gdk/gdkdevice.h
index ad5bf66e94..84ee37fde3 100644
--- a/gdk/gdkdevice.h
+++ b/gdk/gdkdevice.h
@@ -32,7 +32,12 @@ G_BEGIN_DECLS
#define GDK_DEVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_DEVICE, GdkDevice))
#define GDK_IS_DEVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE))
+#define GDK_TYPE_DEVICE_TOOL (gdk_device_tool_get_type ())
+#define GDK_DEVICE_TOOL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_DEVICE_TOOL, GdkDeviceTool))
+#define GDK_IS_DEVICE_TOOL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE_TOOL))
+
typedef struct _GdkTimeCoord GdkTimeCoord;
+typedef struct _GdkDeviceTool GdkDeviceTool;
/**
* GdkInputSource:
@@ -320,6 +325,12 @@ GdkSeat *gdk_device_get_seat (GdkDevice *device);
GDK_AVAILABLE_IN_3_22
GdkAxisFlags gdk_device_get_axes (GdkDevice *device);
+GDK_AVAILABLE_IN_3_22
+GType gdk_device_tool_get_type (void) G_GNUC_CONST;
+
+GDK_AVAILABLE_IN_3_22
+guint gdk_device_tool_get_serial (GdkDeviceTool *tool);
+
G_END_DECLS
#endif /* __GDK_DEVICE_H__ */