1/* GDK - The GIMP Drawing Kit
2 * Copyright (C) 2015 Red Hat
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Author: Carlos Garnacho <carlosg@gnome.org>
18 */
19
20#ifndef __GDK_SEAT_PRIVATE_H__
21#define __GDK_SEAT_PRIVATE_H__
22
23typedef struct _GdkSeatClass GdkSeatClass;
24
25#include "gdkseat.h"
26#include "gdkdeviceprivate.h"
27
28typedef void (* GdkSeatGrabPrepareFunc) (GdkSeat *seat,
29 GdkSurface *surface,
30 gpointer user_data);
31
32#define GDK_SEAT_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_SEAT, GdkSeatClass))
33#define GDK_IS_SEAT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_SEAT))
34#define GDK_SEAT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_SEAT, GdkSeatClass))
35
36struct _GdkSeatClass
37{
38 GObjectClass parent_class;
39
40 void (* device_added) (GdkSeat *seat,
41 GdkDevice *device);
42 void (* device_removed) (GdkSeat *seat,
43 GdkDevice *device);
44 void (* device_changed) (GdkSeat *seat,
45 GdkDevice *device);
46
47 GdkSeatCapabilities (*get_capabilities) (GdkSeat *seat);
48
49 GdkGrabStatus (* grab) (GdkSeat *seat,
50 GdkSurface *surface,
51 GdkSeatCapabilities capabilities,
52 gboolean owner_events,
53 GdkCursor *cursor,
54 GdkEvent *event,
55 GdkSeatGrabPrepareFunc prepare_func,
56 gpointer prepare_func_data);
57 void (* ungrab) (GdkSeat *seat);
58
59 GdkDevice * (* get_logical_device) (GdkSeat *seat,
60 GdkSeatCapabilities capability);
61 GList * (* get_devices) (GdkSeat *seat,
62 GdkSeatCapabilities capabilities);
63
64 GList * (* get_tools) (GdkSeat *seat);
65};
66
67void gdk_seat_device_added (GdkSeat *seat,
68 GdkDevice *device);
69void gdk_seat_device_removed (GdkSeat *seat,
70 GdkDevice *device);
71
72void gdk_seat_tool_added (GdkSeat *seat,
73 GdkDeviceTool *tool);
74void gdk_seat_tool_removed (GdkSeat *seat,
75 GdkDeviceTool *tool);
76
77GdkDeviceTool *
78 gdk_seat_get_tool (GdkSeat *seat,
79 guint64 serial,
80 guint64 hw_id,
81 GdkDeviceToolType type);
82
83GdkGrabStatus gdk_seat_grab (GdkSeat *seat,
84 GdkSurface *surface,
85 GdkSeatCapabilities capabilities,
86 gboolean owner_events,
87 GdkCursor *cursor,
88 GdkEvent *event,
89 GdkSeatGrabPrepareFunc prepare_func,
90 gpointer prepare_func_data);
91void gdk_seat_ungrab (GdkSeat *seat);
92
93
94#endif /* __GDK_SEAT_PRIVATE_H__ */
95

source code of gtk/gdk/gdkseatprivate.h