Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gdkdevice.h
Go to the documentation of this file.
1/* GDK - The GIMP Drawing Kit
2 * Copyright (C) 2009 Carlos Garnacho <carlosg@gnome.org>
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
18#pragma once
19
20#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
21#error "Only <gdk/gdk.h> can be included directly."
22#endif
23
24#include <gdk/gdktypes.h>
25#include <gdk/gdkdevicetool.h>
26#include <gdk/gdkenums.h>
27
29
30#define GDK_TYPE_DEVICE (gdk_device_get_type ())
31#define GDK_DEVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_DEVICE, GdkDevice))
32#define GDK_IS_DEVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE))
33
35
36/**
37 * GdkInputSource:
38 * @GDK_SOURCE_MOUSE: the device is a mouse. (This will be reported for the core
39 * pointer, even if it is something else, such as a trackball.)
40 * @GDK_SOURCE_PEN: the device is a stylus of a graphics tablet or similar device.
41 * @GDK_SOURCE_KEYBOARD: the device is a keyboard.
42 * @GDK_SOURCE_TOUCHSCREEN: the device is a direct-input touch device, such
43 * as a touchscreen or tablet
44 * @GDK_SOURCE_TOUCHPAD: the device is an indirect touch device, such
45 * as a touchpad
46 * @GDK_SOURCE_TRACKPOINT: the device is a trackpoint
47 * @GDK_SOURCE_TABLET_PAD: the device is a "pad", a collection of buttons,
48 * rings and strips found in drawing tablets
49 *
50 * An enumeration describing the type of an input device in general terms.
51 */
62
63/**
64 * GdkTimeCoord:
65 * @time: The timestamp for this event
66 * @flags: Flags indicating what axes are present, see [flags@Gdk.AxisFlags]
67 * @axes: (array fixed-size=12): axis values, indexed by [enum@Gdk.AxisUse]
68 *
69 * A `GdkTimeCoord` stores a single event in a motion history.
70 *
71 * To check whether an axis is present, check whether the corresponding
72 * flag from the [flags@Gdk.AxisFlags] enumeration is set in the @flags
73 * To access individual axis values, use the values of the values of
74 * the [enum@Gdk.AxisUse] enumerations as indices.
75 */
82
85
87const char * gdk_device_get_name (GdkDevice *device);
89const char * gdk_device_get_vendor_id (GdkDevice *device);
91const char * gdk_device_get_product_id (GdkDevice *device);
92
99
118
121 double *win_x,
122 double *win_y);
123
126
128
130
#define GDK_AVAILABLE_IN_4_2
#define GDK_AVAILABLE_IN_ALL
GDK_AVAILABLE_IN_4_2 guint32 gdk_device_get_timestamp(GdkDevice *device)
GDK_AVAILABLE_IN_ALL GType gdk_device_get_type(void) G_GNUC_CONST
GDK_AVAILABLE_IN_ALL const char * gdk_device_get_name(GdkDevice *device)
GDK_AVAILABLE_IN_ALL gboolean gdk_device_get_num_lock_state(GdkDevice *device)
GDK_AVAILABLE_IN_ALL GdkDeviceTool * gdk_device_get_device_tool(GdkDevice *device)
GDK_AVAILABLE_IN_ALL GdkSeat * gdk_device_get_seat(GdkDevice *device)
GDK_AVAILABLE_IN_ALL gboolean gdk_device_has_bidi_layouts(GdkDevice *device)
GdkInputSource
Definition gdkdevice.h:53
@ GDK_SOURCE_TABLET_PAD
Definition gdkdevice.h:60
@ GDK_SOURCE_TOUCHSCREEN
Definition gdkdevice.h:57
@ GDK_SOURCE_TRACKPOINT
Definition gdkdevice.h:59
@ GDK_SOURCE_KEYBOARD
Definition gdkdevice.h:56
@ GDK_SOURCE_TOUCHPAD
Definition gdkdevice.h:58
@ GDK_SOURCE_PEN
Definition gdkdevice.h:55
@ GDK_SOURCE_MOUSE
Definition gdkdevice.h:54
GDK_AVAILABLE_IN_ALL gboolean gdk_device_get_caps_lock_state(GdkDevice *device)
GDK_AVAILABLE_IN_ALL PangoDirection gdk_device_get_direction(GdkDevice *device)
GDK_AVAILABLE_IN_ALL GdkModifierType gdk_device_get_modifier_state(GdkDevice *device)
GDK_AVAILABLE_IN_ALL const char * gdk_device_get_product_id(GdkDevice *device)
GDK_AVAILABLE_IN_ALL GdkInputSource gdk_device_get_source(GdkDevice *device)
GDK_AVAILABLE_IN_ALL const char * gdk_device_get_vendor_id(GdkDevice *device)
GDK_AVAILABLE_IN_ALL GdkDisplay * gdk_device_get_display(GdkDevice *device)
GDK_AVAILABLE_IN_ALL gboolean gdk_device_get_scroll_lock_state(GdkDevice *device)
GDK_AVAILABLE_IN_ALL gboolean gdk_device_get_has_cursor(GdkDevice *device)
GDK_AVAILABLE_IN_ALL guint gdk_device_get_num_touches(GdkDevice *device)
GDK_AVAILABLE_IN_ALL GdkSurface * gdk_device_get_surface_at_position(GdkDevice *device, double *win_x, double *win_y)
struct _GdkDeviceTool GdkDeviceTool
GdkAxisFlags
Definition gdkenums.h:259
@ GDK_AXIS_LAST
Definition gdkenums.h:239
GdkModifierType
Definition gdkenums.h:116
struct _GdkDevice GdkDevice
Definition gdktypes.h:84
struct _GdkDisplay GdkDisplay
Definition gdktypes.h:90
struct _GdkSurface GdkSurface
Definition gdktypes.h:91
unsigned int guint32
Definition glibconfig.h:57
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
Definition gmacros.h:1400
GOBJECT_AVAILABLE_IN_ALL void g_object_unref(gpointer object)
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
unsigned int guint
Definition gtypes.h:61
PangoDirection
GdkAxisFlags flags
Definition gdkdevice.h:79
guint32 time
Definition gdkdevice.h:78
double axes[GDK_AXIS_LAST]
Definition gdkdevice.h:80