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_H__
21#define __GDK_SEAT_H__
22
23#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
24#error "Only <gdk/gdk.h> can be included directly."
25#endif
26
27#include <glib-object.h>
28#include <gdk/gdksurface.h>
29#include <gdk/gdkevents.h>
30#include <gdk/gdktypes.h>
31
32G_BEGIN_DECLS
33
34#define GDK_TYPE_SEAT (gdk_seat_get_type ())
35#define GDK_SEAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_SEAT, GdkSeat))
36#define GDK_IS_SEAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_SEAT))
37
38/**
39 * GdkSeatCapabilities:
40 * @GDK_SEAT_CAPABILITY_NONE: No input capabilities
41 * @GDK_SEAT_CAPABILITY_POINTER: The seat has a pointer (e.g. mouse)
42 * @GDK_SEAT_CAPABILITY_TOUCH: The seat has touchscreen(s) attached
43 * @GDK_SEAT_CAPABILITY_TABLET_STYLUS: The seat has drawing tablet(s) attached
44 * @GDK_SEAT_CAPABILITY_KEYBOARD: The seat has keyboard(s) attached
45 * @GDK_SEAT_CAPABILITY_TABLET_PAD: The seat has drawing tablet pad(s) attached
46 * @GDK_SEAT_CAPABILITY_ALL_POINTING: The union of all pointing capabilities
47 * @GDK_SEAT_CAPABILITY_ALL: The union of all capabilities
48 *
49 * Flags describing the seat capabilities.
50 */
51typedef enum {
52 GDK_SEAT_CAPABILITY_NONE = 0,
53 GDK_SEAT_CAPABILITY_POINTER = 1 << 0,
54 GDK_SEAT_CAPABILITY_TOUCH = 1 << 1,
55 GDK_SEAT_CAPABILITY_TABLET_STYLUS = 1 << 2,
56 GDK_SEAT_CAPABILITY_KEYBOARD = 1 << 3,
57 GDK_SEAT_CAPABILITY_TABLET_PAD = 1 << 4,
58 GDK_SEAT_CAPABILITY_ALL_POINTING = (GDK_SEAT_CAPABILITY_POINTER | GDK_SEAT_CAPABILITY_TOUCH | GDK_SEAT_CAPABILITY_TABLET_STYLUS),
59 GDK_SEAT_CAPABILITY_ALL = (GDK_SEAT_CAPABILITY_ALL_POINTING | GDK_SEAT_CAPABILITY_KEYBOARD)
60} GdkSeatCapabilities;
61
62struct _GdkSeat
63{
64 GObject parent_instance;
65};
66
67GDK_AVAILABLE_IN_ALL
68GType gdk_seat_get_type (void) G_GNUC_CONST;
69
70GDK_AVAILABLE_IN_ALL
71GdkDisplay * gdk_seat_get_display (GdkSeat *seat);
72
73GDK_AVAILABLE_IN_ALL
74GdkSeatCapabilities
75 gdk_seat_get_capabilities (GdkSeat *seat);
76
77GDK_AVAILABLE_IN_ALL
78GList * gdk_seat_get_devices (GdkSeat *seat,
79 GdkSeatCapabilities capabilities);
80
81GDK_AVAILABLE_IN_ALL
82GList * gdk_seat_get_tools (GdkSeat *seat);
83
84GDK_AVAILABLE_IN_ALL
85GdkDevice * gdk_seat_get_pointer (GdkSeat *seat);
86GDK_AVAILABLE_IN_ALL
87GdkDevice * gdk_seat_get_keyboard (GdkSeat *seat);
88
89G_END_DECLS
90
91#endif /* __GDK_SEAT_H__ */
92

source code of gtk/gdk/gdkseat.h