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 | |
23 | typedef struct _GdkSeatClass GdkSeatClass; |
24 | |
25 | #include "gdkseat.h" |
26 | |
27 | #define GDK_SEAT_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_SEAT, GdkSeatClass)) |
28 | #define GDK_IS_SEAT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_SEAT)) |
29 | #define GDK_SEAT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_SEAT, GdkSeatClass)) |
30 | |
31 | struct _GdkSeatClass |
32 | { |
33 | GObjectClass parent_class; |
34 | |
35 | void (* device_added) (GdkSeat *seat, |
36 | GdkDevice *device); |
37 | void (* device_removed) (GdkSeat *seat, |
38 | GdkDevice *device); |
39 | void (* device_changed) (GdkSeat *seat, |
40 | GdkDevice *device); |
41 | |
42 | GdkSeatCapabilities (*get_capabilities) (GdkSeat *seat); |
43 | |
44 | GdkGrabStatus (* grab) (GdkSeat *seat, |
45 | GdkWindow *window, |
46 | GdkSeatCapabilities capabilities, |
47 | gboolean owner_events, |
48 | GdkCursor *cursor, |
49 | const GdkEvent *event, |
50 | GdkSeatGrabPrepareFunc prepare_func, |
51 | gpointer prepare_func_data); |
52 | void (* ungrab) (GdkSeat *seat); |
53 | |
54 | GdkDevice * (* get_master) (GdkSeat *seat, |
55 | GdkSeatCapabilities capability); |
56 | GList * (* get_slaves) (GdkSeat *seat, |
57 | GdkSeatCapabilities capabilities); |
58 | |
59 | GdkDeviceTool * (* get_tool) (GdkSeat *seat, |
60 | guint64 serial); |
61 | }; |
62 | |
63 | void gdk_seat_device_added (GdkSeat *seat, |
64 | GdkDevice *device); |
65 | void gdk_seat_device_removed (GdkSeat *seat, |
66 | GdkDevice *device); |
67 | |
68 | void gdk_seat_tool_added (GdkSeat *seat, |
69 | GdkDeviceTool *tool); |
70 | void gdk_seat_tool_removed (GdkSeat *seat, |
71 | GdkDeviceTool *tool); |
72 | |
73 | GdkDeviceTool * |
74 | gdk_seat_get_tool (GdkSeat *seat, |
75 | guint64 serial); |
76 | |
77 | #endif /* __GDK_SEAT_PRIVATE_H__ */ |
78 | |