summaryrefslogtreecommitdiff
path: root/gdk/gdkdeviceprivate.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/gdkdeviceprivate.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/gdkdeviceprivate.h')
-rw-r--r--gdk/gdkdeviceprivate.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdk/gdkdeviceprivate.h b/gdk/gdkdeviceprivate.h
index bdfc93a1e0..a0dad3ce46 100644
--- a/gdk/gdkdeviceprivate.h
+++ b/gdk/gdkdeviceprivate.h
@@ -30,8 +30,20 @@ G_BEGIN_DECLS
#define GDK_DEVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE, GdkDeviceClass))
typedef struct _GdkDeviceClass GdkDeviceClass;
+typedef struct _GdkDeviceToolClass GdkDeviceToolClass;
typedef struct _GdkDeviceKey GdkDeviceKey;
+struct _GdkDeviceTool
+{
+ GObject parent_instance;
+ guint64 serial;
+};
+
+struct _GdkDeviceToolClass
+{
+ GObjectClass parent_class;
+};
+
struct _GdkDeviceKey
{
guint keyval;
@@ -184,6 +196,9 @@ GdkWindow * _gdk_device_window_at_position (GdkDevice *device,
void gdk_device_set_seat (GdkDevice *device,
GdkSeat *seat);
+/* Device tools */
+GdkDeviceTool *gdk_device_tool_new (guint64 serial);
+
G_END_DECLS
#endif /* __GDK_DEVICE_PRIVATE_H__ */