3
{$IFDEF read_forward_definitions}
4
PGdkDevice = ^TGdkDevice;
5
PGdkTimeCoord = ^TGdkTimeCoord;
6
PPGdkTimeCoord = ^PGdkTimeCoord;
7
{$ENDIF read_forward_definitions}
9
//------------------------------------------------------------------------------
11
{$IFDEF read_interface_types}
12
PGdkExtensionMode = ^TGdkExtensionMode;
14
GDK_EXTENSION_EVENTS_NONE,
15
GDK_EXTENSION_EVENTS_ALL,
16
GDK_EXTENSION_EVENTS_CURSOR
19
PGdkInputSource = ^TGdkInputSource;
27
PGdkInputMode = ^TGdkInputMode;
34
PGdkAxisUse = ^TGdkAxisUse;
35
TGdkAxisUse = longint;
37
PGdkDeviceKey = ^TGdkDeviceKey;
38
TGdkDeviceKey = record
40
modifiers : TGdkModifierType;
43
PGdkDeviceAxis = ^TGdkDeviceAxis;
44
TGdkDeviceAxis = record
50
{ All fields are read-only }
51
{ TRUE if the X pointer follows device motion }
53
parent_instance : TGObject;
55
source : TGdkInputSource;
57
has_cursor : gboolean;
59
axes : PGdkDeviceAxis;
64
{ We don't allocate each coordinate this big, but we use it to
65
be ANSI compliant and avoid accessing past the defined limits.
68
TGdkTimeCoord = record
70
axes : array[0..(GDK_MAX_TIMECOORD_AXES)-1] of gdouble;
73
{$ENDIF read_interface_types}
75
//------------------------------------------------------------------------------
77
{$IFDEF read_interface_rest}
82
GDK_AXIS_PRESSURE = 3;
89
function GDK_TYPE_DEVICE : GType;
90
function GDK_DEVICE(anObject : Pointer) : PGdkDevice;
91
function GDK_DEVICE_CLASS(klass : Pointer) : PGdkDeviceClass;
92
function GDK_IS_DEVICE(anObject : Pointer) : boolean;
93
function GDK_IS_DEVICE_CLASS(klass : Pointer) : boolean;
94
function GDK_DEVICE_GET_CLASS(obj : Pointer) : PGdkDeviceClass;
97
function gdk_device_get_type:GType; cdecl; external gdklib;
99
{$ifndef GDK_MULTIHEAD_SAFE}
100
{ Returns a list of GdkDevice }
101
function gdk_devices_list:PGList; cdecl; external gdklib;
103
{ GDK_MULTIHEAD_SAFE }
106
{ Functions to configure a device }
108
procedure gdk_device_set_source(device:PGdkDevice; source:TGdkInputSource); cdecl; external gdklib;
109
function gdk_device_set_mode(device:PGdkDevice; mode:TGdkInputMode):gboolean; cdecl; external gdklib;
110
procedure gdk_device_set_key(device:PGdkDevice; index:guint; keyval:guint; modifiers:TGdkModifierType); cdecl; external gdklib;
111
procedure gdk_device_set_axis_use(device:PGdkDevice; index:guint; use:TGdkAxisUse); cdecl; external gdklib;
112
procedure gdk_device_get_state(device:PGdkDevice; window:PGdkWindow; axes:Pgdouble; mask:PGdkModifierType); cdecl; external gdklib;
113
function gdk_device_get_history(device:PGdkDevice; window:PGdkWindow; start:guint32; stop:guint32; var events:PPGdkTimeCoord;
114
n_events:Pgint):gboolean; cdecl; external gdklib;
115
procedure gdk_device_free_history(events:PPGdkTimeCoord; n_events:gint); cdecl; external gdklib;
116
function gdk_device_get_axis(device:PGdkDevice; axes:Pgdouble; use:TGdkAxisUse; value:Pgdouble):gboolean; cdecl; external gdklib;
117
procedure gdk_input_set_extension_events(window:PGdkWindow; mask:gint; mode:TGdkExtensionMode); cdecl; external gdklib;
118
function gdk_device_get_core_pointer:PGdkDevice; cdecl; external gdklib;
119
{$endif read_interface_rest}
121
//------------------------------------------------------------------------------
123
{$IFDEF read_implementation}
124
function GDK_TYPE_DEVICE : GType;
126
GDK_TYPE_DEVICE:=gdk_device_get_type;
129
function GDK_DEVICE(anObject : Pointer) : PGdkDevice;
131
GDK_DEVICE:=PGdkDevice(G_TYPE_CHECK_INSTANCE_CAST(anObject,GDK_TYPE_DEVICE));
134
function GDK_DEVICE_CLASS(klass : Pointer) : PGdkDeviceClass;
136
GDK_DEVICE_CLASS:=PGdkDeviceClass(G_TYPE_CHECK_CLASS_CAST(klass,GDK_TYPE_DEVICE));
139
function GDK_IS_DEVICE(anObject : Pointer) : boolean;
141
GDK_IS_DEVICE:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GDK_TYPE_DEVICE);
144
function GDK_IS_DEVICE_CLASS(klass : Pointer) : boolean;
146
GDK_IS_DEVICE_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GDK_TYPE_DEVICE);
149
function GDK_DEVICE_GET_CLASS(obj : Pointer) : PGdkDeviceClass;
151
GDK_DEVICE_GET_CLASS:=PGdkDeviceClass(G_TYPE_INSTANCE_GET_CLASS(obj,GDK_TYPE_DEVICE));