Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Dorota Czaplejewicz
gtk
Commits
bd4609b1
Commit
bd4609b1
authored
May 25, 2010
by
Matthias Clasen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge the xi2-for-master branch
parent
a538f639
Changes
123
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
15103 additions
and
5896 deletions
+15103
-5896
configure.ac
configure.ac
+9
-8
docs/reference/gdk/gdk-docs.sgml
docs/reference/gdk/gdk-docs.sgml
+1
-1
docs/reference/gdk/gdk3-sections.txt
docs/reference/gdk/gdk3-sections.txt
+63
-5
docs/reference/gdk/gdk3.types
docs/reference/gdk/gdk3.types
+2
-0
docs/reference/gdk/tmpl/input_devices.sgml
docs/reference/gdk/tmpl/input_devices.sgml
+0
-309
docs/reference/gtk/compiling.sgml
docs/reference/gtk/compiling.sgml
+7
-0
docs/reference/gtk/gtk-docs.sgml
docs/reference/gtk/gtk-docs.sgml
+1
-0
docs/reference/gtk/gtk3-sections.txt
docs/reference/gtk/gtk3-sections.txt
+20
-8
gdk/Makefile.am
gdk/Makefile.am
+5
-0
gdk/gdk.c
gdk/gdk.c
+23
-0
gdk/gdk.h
gdk/gdk.h
+8
-7
gdk/gdk.symbols
gdk/gdk.symbols
+140
-70
gdk/gdkdevice.c
gdk/gdkdevice.c
+1399
-0
gdk/gdkdevice.h
gdk/gdkdevice.h
+292
-0
gdk/gdkdevicemanager.c
gdk/gdkdevicemanager.c
+302
-0
gdk/gdkdevicemanager.h
gdk/gdkdevicemanager.h
+76
-0
gdk/gdkdeviceprivate.h
gdk/gdkdeviceprivate.h
+135
-0
gdk/gdkdisplay.c
gdk/gdkdisplay.c
+816
-283
gdk/gdkdisplay.h
gdk/gdkdisplay.h
+97
-11
gdk/gdkdnd.h
gdk/gdkdnd.h
+5
-0
gdk/gdkevents.c
gdk/gdkevents.c
+276
-41
gdk/gdkevents.h
gdk/gdkevents.h
+16
-30
gdk/gdkglobals.c
gdk/gdkglobals.c
+1
-0
gdk/gdkinput.h
gdk/gdkinput.h
+8
-140
gdk/gdkinternals.h
gdk/gdkinternals.h
+67
-39
gdk/gdkoffscreenwindow.c
gdk/gdkoffscreenwindow.c
+7
-28
gdk/gdktypes.h
gdk/gdktypes.h
+44
-0
gdk/gdkwindow.c
gdk/gdkwindow.c
+863
-253
gdk/gdkwindow.h
gdk/gdkwindow.h
+29
-3
gdk/gdkwindowimpl.h
gdk/gdkwindowimpl.h
+6
-8
gdk/quartz/Makefile.am
gdk/quartz/Makefile.am
+2
-0
gdk/quartz/gdkdevice-core.c
gdk/quartz/gdkdevice-core.c
+356
-0
gdk/quartz/gdkdevice-core.h
gdk/quartz/gdkdevice-core.h
+51
-0
gdk/quartz/gdkdevicemanager-core.c
gdk/quartz/gdkdevicemanager-core.c
+130
-0
gdk/quartz/gdkdevicemanager-core.h
gdk/quartz/gdkdevicemanager-core.h
+54
-0
gdk/quartz/gdkdisplay-quartz.c
gdk/quartz/gdkdisplay-quartz.c
+11
-0
gdk/quartz/gdkevents-quartz.c
gdk/quartz/gdkevents-quartz.c
+261
-199
gdk/quartz/gdkinput.c
gdk/quartz/gdkinput.c
+102
-265
gdk/quartz/gdkinputprivate.h
gdk/quartz/gdkinputprivate.h
+0
-5
gdk/quartz/gdkprivate-quartz.h
gdk/quartz/gdkprivate-quartz.h
+2
-1
gdk/quartz/gdkwindow-quartz.c
gdk/quartz/gdkwindow-quartz.c
+82
-50
gdk/win32/Makefile.am
gdk/win32/Makefile.am
+6
-2
gdk/win32/gdkdevice-win32.c
gdk/win32/gdkdevice-win32.c
+396
-0
gdk/win32/gdkdevice-win32.h
gdk/win32/gdkdevice-win32.h
+51
-0
gdk/win32/gdkdevice-wintab.c
gdk/win32/gdkdevice-wintab.c
+386
-0
gdk/win32/gdkdevice-wintab.h
gdk/win32/gdkdevice-wintab.h
+79
-0
gdk/win32/gdkdevicemanager-win32.c
gdk/win32/gdkdevicemanager-win32.c
+1089
-0
gdk/win32/gdkdevicemanager-win32.h
gdk/win32/gdkdevicemanager-win32.h
+59
-0
gdk/win32/gdkdnd-win32.c
gdk/win32/gdkdnd-win32.c
+148
-74
gdk/win32/gdkevents-win32.c
gdk/win32/gdkevents-win32.c
+132
-134
gdk/win32/gdkinput-win32.h
gdk/win32/gdkinput-win32.h
+0
-147
gdk/win32/gdkinput.c
gdk/win32/gdkinput.c
+30
-411
gdk/win32/gdkmain-win32.c
gdk/win32/gdkmain-win32.c
+2
-1
gdk/win32/gdkwindow-win32.c
gdk/win32/gdkwindow-win32.c
+62
-184
gdk/x11/Makefile.am
gdk/x11/Makefile.am
+12
-6
gdk/x11/gdkdevice-core.c
gdk/x11/gdkdevice-core.c
+501
-0
gdk/x11/gdkdevice-core.h
gdk/x11/gdkdevice-core.h
+52
-0
gdk/x11/gdkdevice-xi.c
gdk/x11/gdkdevice-xi.c
+624
-0
gdk/x11/gdkdevice-xi.h
gdk/x11/gdkdevice-xi.h
+88
-0
gdk/x11/gdkdevice-xi2.c
gdk/x11/gdkdevice-xi2.c
+621
-0
gdk/x11/gdkdevice-xi2.h
gdk/x11/gdkdevice-xi2.h
+64
-0
gdk/x11/gdkdevicemanager-core.c
gdk/x11/gdkdevicemanager-core.c
+904
-0
gdk/x11/gdkdevicemanager-core.h
gdk/x11/gdkdevicemanager-core.h
+54
-0
gdk/x11/gdkdevicemanager-x11.c
gdk/x11/gdkdevicemanager-x11.c
+76
-0
gdk/x11/gdkdevicemanager-xi.c
gdk/x11/gdkdevicemanager-xi.c
+650
-0
gdk/x11/gdkdevicemanager-xi.h
gdk/x11/gdkdevicemanager-xi.h
+58
-0
gdk/x11/gdkdevicemanager-xi2.c
gdk/x11/gdkdevicemanager-xi2.c
+1146
-0
gdk/x11/gdkdevicemanager-xi2.h
gdk/x11/gdkdevicemanager-xi2.h
+61
-0
gdk/x11/gdkdisplay-x11.c
gdk/x11/gdkdisplay-x11.c
+1245
-58
gdk/x11/gdkdnd-x11.c
gdk/x11/gdkdnd-x11.c
+100
-27
gdk/x11/gdkevents-x11.c
gdk/x11/gdkevents-x11.c
+0
-3088
gdk/x11/gdkeventsource.c
gdk/x11/gdkeventsource.c
+427
-0
gdk/x11/gdkeventsource.h
gdk/x11/gdkeventsource.h
+46
-0
gdk/x11/gdkeventtranslator.c
gdk/x11/gdkeventtranslator.c
+100
-0
gdk/x11/gdkeventtranslator.h
gdk/x11/gdkeventtranslator.h
+65
-0
No files found.
configure.ac
View file @
bd4609b1
...
@@ -1560,22 +1560,22 @@ if test "x$gdktarget" = "xx11"; then
...
@@ -1560,22 +1560,22 @@ if test "x$gdktarget" = "xx11"; then
fi
fi
# set up things for XInput
# set up things for XInput
if test "x$with_xinput" != "xno" && $PKG_CONFIG --exists "xi" ; then
if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
AC_DEFINE(XINPUT_XFREE, 1,
AC_DEFINE(XINPUT_XFREE, 1,
[Define to 1 if XFree XInput should be used])
[Define to 1 if XFree XInput should be used])
if $PKG_CONFIG --exists xi ; then
X_PACKAGES="$X_PACKAGES xi"
X_PACKAGES="$X_PACKAGES xi"
else
AC_CHECK_HEADER(X11/extensions/XInput2.h,
GTK_ADD_LIB(x_extra_libs, Xi)
have_xinput2=yes; AC_DEFINE(XINPUT_2, 1, [Define to 1 if XInput 2.0 is available]))
fi
else
else
AC_DEFINE(XINPUT_NONE, 1,
AC_DEFINE(XINPUT_NONE, 1,
[Define to 1 if no XInput should be used])
[Define to 1 if no XInput should be used])
fi
fi
AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
AM_CONDITIONAL(XINPUT_NONE, test "x$with_xinput" = "xno")
AM_CONDITIONAL(XINPUT_XFREE, test "x$with_xinput" != "xno")
AM_CONDITIONAL(XINPUT_2, test "x$have_xinput2" = "xyes")
# Check for the RANDR extension
# Check for the RANDR extension
if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
...
@@ -1633,6 +1633,7 @@ else
...
@@ -1633,6 +1633,7 @@ else
XPACKAGES=
XPACKAGES=
AM_CONDITIONAL(XINPUT_XFREE, false)
AM_CONDITIONAL(XINPUT_XFREE, false)
AM_CONDITIONAL(XINPUT_2, false)
AM_CONDITIONAL(USE_X11, false)
AM_CONDITIONAL(USE_X11, false)
AM_CONDITIONAL(HAVE_X11R6, false)
AM_CONDITIONAL(HAVE_X11R6, false)
fi
fi
...
...
docs/reference/gdk/gdk-docs.sgml
View file @
bd4609b1
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
<xi:include
href=
"xml/threads.xml"
/>
<xi:include
href=
"xml/threads.xml"
/>
<xi:include
href=
"xml/input.xml"
/>
<xi:include
href=
"xml/input.xml"
/>
<xi:include
href=
"xml/
input_devices
.xml"
/>
<xi:include
href=
"xml/
gdkdevicemanager
.xml"
/>
<xi:include
href=
"xml/pango_interaction.xml"
/>
<xi:include
href=
"xml/pango_interaction.xml"
/>
<xi:include
href=
"xml/cairo_interaction.xml"
/>
<xi:include
href=
"xml/cairo_interaction.xml"
/>
...
...
docs/reference/gdk/gdk3-sections.txt
View file @
bd4609b1
...
@@ -81,6 +81,7 @@ gdk_filter_return_get_type
...
@@ -81,6 +81,7 @@ gdk_filter_return_get_type
gdk_font_type_get_type
gdk_font_type_get_type
gdk_function_get_type
gdk_function_get_type
gdk_gc_values_mask_get_type
gdk_gc_values_mask_get_type
gdk_grab_ownership_get_type
gdk_grab_status_get_type
gdk_grab_status_get_type
gdk_gravity_get_type
gdk_gravity_get_type
gdk_image_type_get_type
gdk_image_type_get_type
...
@@ -110,8 +111,7 @@ gdk_window_type_get_type
...
@@ -110,8 +111,7 @@ gdk_window_type_get_type
gdk_window_type_hint_get_type
gdk_window_type_hint_get_type
gdk_wm_decoration_get_type
gdk_wm_decoration_get_type
gdk_wm_function_get_type
gdk_wm_function_get_type
gdk_pointer_grab_info_libgtk_only
gdk_device_grab_info_libgtk_only
gdk_keyboard_grab_info_libgtk_only
gdk_add_option_entries_libgtk_only
gdk_add_option_entries_libgtk_only
gdk_pre_parse_libgtk_only
gdk_pre_parse_libgtk_only
</SECTION>
</SECTION>
...
@@ -126,9 +126,11 @@ gdk_display_get_name
...
@@ -126,9 +126,11 @@ gdk_display_get_name
gdk_display_get_n_screens
gdk_display_get_n_screens
gdk_display_get_screen
gdk_display_get_screen
gdk_display_get_default_screen
gdk_display_get_default_screen
gdk_display_get_device_manager
gdk_display_pointer_ungrab
gdk_display_pointer_ungrab
gdk_display_keyboard_ungrab
gdk_display_keyboard_ungrab
gdk_display_pointer_is_grabbed
gdk_display_pointer_is_grabbed
gdk_display_device_is_grabbed
gdk_display_beep
gdk_display_beep
gdk_display_sync
gdk_display_sync
gdk_display_flush
gdk_display_flush
...
@@ -141,10 +143,15 @@ gdk_display_add_client_message_filter
...
@@ -141,10 +143,15 @@ gdk_display_add_client_message_filter
gdk_display_set_double_click_time
gdk_display_set_double_click_time
gdk_display_set_double_click_distance
gdk_display_set_double_click_distance
gdk_display_get_pointer
gdk_display_get_pointer
gdk_display_get_device_state
gdk_display_get_window_at_pointer
gdk_display_get_window_at_pointer
gdk_display_get_window_at_device_position
GdkDisplayPointerHooks
GdkDisplayPointerHooks
gdk_display_set_pointer_hooks
gdk_display_set_pointer_hooks
GdkDisplayDeviceHooks
gdk_display_set_device_hooks
gdk_display_warp_pointer
gdk_display_warp_pointer
gdk_display_warp_device
gdk_display_supports_cursor_color
gdk_display_supports_cursor_color
gdk_display_supports_cursor_alpha
gdk_display_supports_cursor_alpha
gdk_display_get_default_cursor_size
gdk_display_get_default_cursor_size
...
@@ -741,6 +748,7 @@ gdk_window_get_origin
...
@@ -741,6 +748,7 @@ gdk_window_get_origin
gdk_window_get_deskrelative_origin
gdk_window_get_deskrelative_origin
gdk_window_get_root_coords
gdk_window_get_root_coords
gdk_window_get_pointer
gdk_window_get_pointer
gdk_window_get_device_position
GdkModifierType
GdkModifierType
gdk_window_get_parent
gdk_window_get_parent
gdk_window_get_toplevel
gdk_window_get_toplevel
...
@@ -762,6 +770,14 @@ gdk_window_set_functions
...
@@ -762,6 +770,14 @@ gdk_window_set_functions
GdkWMFunction
GdkWMFunction
gdk_get_default_root_window
gdk_get_default_root_window
<SUBSECTION>
gdk_window_get_support_multidevice
gdk_window_set_support_multidevice
gdk_window_get_device_cursor
gdk_window_set_device_cursor
gdk_window_get_device_events
gdk_window_set_device_events
<SUBSECTION>
<SUBSECTION>
GdkPointerHooks
GdkPointerHooks
gdk_set_pointer_hooks
gdk_set_pointer_hooks
...
@@ -1027,14 +1043,22 @@ gdk_keymap_get_type
...
@@ -1027,14 +1043,22 @@ gdk_keymap_get_type
</SECTION>
</SECTION>
<SECTION>
<SECTION>
<TITLE>Input Devices</TITLE>
<TITLE>GdkDeviceManager</TITLE>
<FILE>input_devices</FILE>
<FILE>gdkdevicemanager</FILE>
GdkDeviceManager
GdkDevice
GdkDevice
GdkDeviceType
GdkInputSource
GdkInputSource
GdkInputMode
GdkInputMode
GdkDeviceKey
GdkDeviceKey
GdkDeviceAxis
GdkDeviceAxis
GdkAxisUse
GdkAxisUse
GdkGrabOwnership
gdk_enable_multidevice
gdk_device_manager_get_display
gdk_device_manager_list_devices
<SUBSECTION>
gdk_devices_list
gdk_devices_list
gdk_device_get_name
gdk_device_get_name
gdk_device_set_source
gdk_device_set_source
...
@@ -1045,8 +1069,16 @@ gdk_device_set_key
...
@@ -1045,8 +1069,16 @@ gdk_device_set_key
gdk_device_get_key
gdk_device_get_key
gdk_device_set_axis_use
gdk_device_set_axis_use
gdk_device_get_axis_use
gdk_device_get_axis_use
gdk_device_get_core_pointer
gdk_device_get_associated_device
gdk_device_get_device_type
gdk_device_get_display
gdk_device_get_has_cursor
gdk_device_get_has_cursor
gdk_device_get_n_axes
gdk_device_get_core_pointer
<SUBSECTION>
gdk_device_grab
gdk_device_ungrab
<SUBSECTION>
<SUBSECTION>
gdk_device_get_state
gdk_device_get_state
...
@@ -1054,16 +1086,30 @@ gdk_device_get_history
...
@@ -1054,16 +1086,30 @@ gdk_device_get_history
gdk_device_free_history
gdk_device_free_history
GdkTimeCoord
GdkTimeCoord
gdk_device_get_axis
gdk_device_get_axis
gdk_device_list_axes
gdk_device_get_axis_value
<SUBSECTION>
<SUBSECTION>
gdk_input_set_extension_events
gdk_input_set_extension_events
GdkExtensionMode
GdkExtensionMode
<SUBSECTION>
gdk_devices_list
gdk_device_get_core_pointer
<SUBSECTION Standard>
<SUBSECTION Standard>
GDK_TYPE_AXIS_USE
GDK_TYPE_AXIS_USE
GDK_TYPE_EXTENSION_MODE
GDK_TYPE_EXTENSION_MODE
GDK_TYPE_INPUT_MODE
GDK_TYPE_INPUT_MODE
GDK_TYPE_INPUT_SOURCE
GDK_TYPE_INPUT_SOURCE
GDK_TYPE_DEVICE_TYPE
GDK_TYPE_GRAB_OWNERSHIP
GDK_DEVICE_MANAGER
GDK_DEVICE_MANAGER_CLASS
GDK_DEVICE_MANAGER_GET_CLASS
GDK_IS_DEVICE_MANAGER
GDK_IS_DEVICE_MANAGER_CLASS
GDK_TYPE_DEVICE_MANAGER
GDK_DEVICE
GDK_DEVICE
GDK_DEVICE_CLASS
GDK_DEVICE_CLASS
GDK_DEVICE_GET_CLASS
GDK_DEVICE_GET_CLASS
...
@@ -1073,7 +1119,12 @@ GDK_TYPE_DEVICE
...
@@ -1073,7 +1119,12 @@ GDK_TYPE_DEVICE
<SUBSECTION Private>
<SUBSECTION Private>
GdkDeviceClass
GdkDeviceClass
GdkDevicePrivate
GdkDeviceManagerClass
GdkDeviceManagerPrivate
gdk_device_get_type
gdk_device_get_type
gdk_device_manager_get_type
gdk_device_type_get_type
GDK_MAX_TIMECOORD_AXES
GDK_MAX_TIMECOORD_AXES
</SECTION>
</SECTION>
...
@@ -1101,6 +1152,9 @@ gdk_event_get_axis
...
@@ -1101,6 +1152,9 @@ gdk_event_get_axis
gdk_event_get_coords
gdk_event_get_coords
gdk_event_get_root_coords
gdk_event_get_root_coords
gdk_event_request_motions
gdk_event_request_motions
gdk_events_get_angle
gdk_events_get_center
gdk_events_get_distance
<SUBSECTION>
<SUBSECTION>
gdk_event_handler_set
gdk_event_handler_set
...
@@ -1117,6 +1171,8 @@ gdk_get_show_events
...
@@ -1117,6 +1171,8 @@ gdk_get_show_events
gdk_set_show_events
gdk_set_show_events
gdk_event_set_screen
gdk_event_set_screen
gdk_event_get_screen
gdk_event_get_screen
gdk_event_get_device
gdk_event_set_device
<SUBSECTION>
<SUBSECTION>
gdk_setting_get
gdk_setting_get
...
@@ -1240,6 +1296,8 @@ gdk_drag_context_get_action
...
@@ -1240,6 +1296,8 @@ gdk_drag_context_get_action
gdk_drag_context_get_actions
gdk_drag_context_get_actions
gdk_drag_context_get_suggested_action
gdk_drag_context_get_suggested_action
gdk_drag_context_list_targets
gdk_drag_context_list_targets
gdk_drag_context_get_device
gdk_drag_context_set_device
<SUBSECTION Standard>
<SUBSECTION Standard>
GDK_DRAG_CONTEXT
GDK_DRAG_CONTEXT
...
...
docs/reference/gdk/gdk3.types
View file @
bd4609b1
...
@@ -9,3 +9,5 @@ gdk_pango_renderer_get_type
...
@@ -9,3 +9,5 @@ gdk_pango_renderer_get_type
gdk_pixmap_get_type
gdk_pixmap_get_type
gdk_gc_get_type
gdk_gc_get_type
gdk_keymap_get_type
gdk_keymap_get_type
gdk_device_get_type
gdk_device_manager_get_type
docs/reference/gdk/tmpl/input_devices.sgml
deleted
100644 → 0
View file @
a538f639
<!-- ##### SECTION Title ##### -->
Input Devices
<!-- ##### SECTION Short_Description ##### -->
Functions for handling extended input devices
<!-- ##### SECTION Long_Description ##### -->
<para>
In addition to the normal keyboard and mouse input devices, GTK+ also
contains support for <firstterm>extended input devices</firstterm>. In
particular, this support is targeted at graphics tablets. Graphics
tablets typically return sub-pixel positioning information and possibly
information about the pressure and tilt of the stylus. Under
X, the support for extended devices is done through the
<firstterm>XInput</firstterm> extension.
</para>
<para>
Because handling extended input devices may involve considerable
overhead, they need to be turned on for each #GdkWindow
individually using gdk_input_set_extension_events().
(Or, more typically, for GtkWidgets, using gtk_widget_set_extension_events()).
As an additional complication, depending on the support from
the windowing system, its possible that a normal mouse
cursor will not be displayed for a particular extension
device. If an application does not want to deal with displaying
a cursor itself, it can ask only to get extension events
from devices that will display a cursor, by passing the
%GDK_EXTENSION_EVENTS_CURSOR value to
gdk_input_set_extension_events(). Otherwise, the application
must retrieve the device information using gdk_devices_list(),
check the <structfield>has_cursor</structfield> field, and,
if it is %FALSE, draw a cursor itself when it receives
motion events.
</para>
<para>
Each pointing device is assigned a unique integer ID; events from a
particular device can be identified by the
<structfield>deviceid</structfield> field in the event structure. The
events generated by pointer devices have also been extended to contain
<structfield>pressure</structfield>, <structfield>xtilt</structfield>
and <structfield>ytilt</structfield> fields which contain the extended
information reported as additional <firstterm>valuators</firstterm>
from the device. The <structfield>pressure</structfield> field is a
a double value ranging from 0.0 to 1.0, while the tilt fields are
double values ranging from -1.0 to 1.0. (With -1.0 representing the
maximum tilt to the left or up, and 1.0 representing the maximum
tilt to the right or down.)
</para>
<para>
One additional field in each event is the
<structfield>source</structfield> field, which contains an
enumeration value describing the type of device; this currently
can be one of %GDK_SOURCE_MOUSE, %GDK_SOURCE_PEN, %GDK_SOURCE_ERASER,
or %GDK_SOURCE_CURSOR. This field is present to allow simple
applications to (for instance) delete when they detect eraser
devices without having to keep track of complicated per-device
settings.
</para>
<para>
Various aspects of each device may be configured.
The configuration of devices is queried using gdk_devices_list().
Each device must be activated using gdk_device_set_mode(), which
also controls whether the device's range is mapped to the
entire screen or to a single window. The mapping of the valuators of
the device onto the predefined valuator types is set using
gdk_device_set_axis_use(). And the source type for each device
can be set with gdk_device_set_source().
</para>
<para>
Devices may also have associated <firstterm>keys</firstterm>
or macro buttons. Such keys can be globally set to map
into normal X keyboard events. The mapping is set using
gdk_device_set_key().
</para>
<para>
The interfaces in this section will most likely be considerably
modified in the future to accomodate devices that may have different
sets of additional valuators than the pressure <structfield>xtilt</structfield>
and <structfield>ytilt</structfield>.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkDevice ##### -->
<para>
A <structname>GdkDevice</structname> structure contains
a detailed description of an extended input device. All
fields are read-only; but you can use gdk_device_set_source(),
gdk_device_set_mode(), gdk_device_set_key() and gdk_device_set_axis_use()
to configure various aspects of the device.
</para>
@parent_instance: the parent instance
@name: the name of this device.
@source: the type of this device.
@mode: the mode of this device
@has_cursor: %TRUE if the pointer follows device motion.
@num_axes: the length of the @axes array.
@axes: an array of #GdkDeviceAxis, describing the axes of this device.
@num_keys: the length of the @keys array.
@keys: an array of #GdkDeviceKey, describing the mapped macro buttons
of this device.
<!-- ##### ENUM GdkInputSource ##### -->
<para>
An enumeration describing the type of an input device
in general terms.
</para>
@GDK_SOURCE_MOUSE: the device is a mouse. (This will be reported for the core
pointer, even if it is something else, such as a trackball.)
@GDK_SOURCE_PEN: the device is a stylus of a graphics tablet or similar device.
@GDK_SOURCE_ERASER: the device is an eraser. Typically, this would be the other end
of a stylus on a graphics tablet.
@GDK_SOURCE_CURSOR: the device is a graphics tablet "puck" or similar device.
<!-- ##### ENUM GdkInputMode ##### -->
<para>
An enumeration that describes the mode of an input device.
</para>
@GDK_MODE_DISABLED: the device is disabled and will not report any events.
@GDK_MODE_SCREEN: the device is enabled. The device's coordinate space
maps to the entire screen.
@GDK_MODE_WINDOW: the device is enabled. The device's coordinate space
is mapped to a single window. The manner in which this window
is chosen is undefined, but it will typically be the same
way in which the focus window for key events is determined.
<!-- ##### STRUCT GdkDeviceKey ##### -->
<para>
The <structname>GdkDeviceKey</structname> structure contains information
about the mapping of one device macro button onto a normal X key event.
It has the following fields:
</para>
@keyval: the keyval to generate when the macro button is pressed.
If this is 0, no keypress will be generated.
@modifiers: the modifiers set for the generated key event.
<!-- ##### STRUCT GdkDeviceAxis ##### -->
<para>
The <structname>GdkDeviceAxis</structname> structure contains information
about the range and mapping of a device axis.
</para>
@use: specifies how the axis is used.
@min: the minimal value that will be reported by this axis.
@max: the maximal value that will be reported by this axis.
<!-- ##### ENUM GdkAxisUse ##### -->
<para>
An enumeration describing the way in which a device
axis (valuator) maps onto the predefined valuator
types that GTK+ understands.
</para>
@GDK_AXIS_IGNORE: the axis is ignored.
@GDK_AXIS_X: the axis is used as the x axis.
@GDK_AXIS_Y: the axis is used as the y axis.
@GDK_AXIS_PRESSURE: the axis is used for pressure information.
@GDK_AXIS_XTILT: the axis is used for x tilt information.
@GDK_AXIS_YTILT: the axis is used for x tilt information.
@GDK_AXIS_WHEEL: the axis is used for wheel information.
@GDK_AXIS_LAST: a constant equal to the numerically highest axis value.
<!-- ##### FUNCTION gdk_devices_list ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_device_set_source ##### -->
<para>
Sets the source type for an input device.
</para>
@device: a #GdkDevice.
@source: the source type.
<!-- ##### FUNCTION gdk_device_set_mode ##### -->
<para>
Sets a the mode of an input device. The mode controls if the
device is active and whether the device's range is mapped to the
entire screen or to a single window.
</para>
@device: a #GdkDevice.
@mode: the input mode.
@Returns: %TRUE if the mode was successfully changed.
<!-- ##### FUNCTION gdk_device_set_key ##### -->
<para>
Specifies the X key event to generate when a macro button of a device
is pressed.
</para>
@device: a #GdkDevice.
@index_: the index of the macro button to set.
@keyval: the keyval to generate.
@modifiers: the modifiers to set.
<!-- ##### FUNCTION gdk_device_set_axis_use ##### -->
<para>
Specifies how an axis of a device is used.
</para>
@device: a #GdkDevice.
@index_: the index of the axis.
@use: specifies how the axis is used.
<!-- ##### FUNCTION gdk_device_get_core_pointer ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_device_get_state ##### -->
@device:
@window:
@axes:
@mask:
<!-- ##### FUNCTION gdk_device_get_history ##### -->
<para>
</para>
@device:
@window:
@start:
@stop:
@events:
@n_events:
@Returns:
<!-- ##### FUNCTION gdk_device_free_history ##### -->
<para>
Frees an array of #GdkTimeCoord that was returned by gdk_device_get_history().
</para>
@events: an array of #GdkTimeCoord.
@n_events: the length of the array.
<!-- ##### STRUCT GdkTimeCoord ##### -->
<para>
The #GdkTimeCoord structure stores a single event in a
motion history. It contains the following fields:
</para>
@time: The timestamp for this event.
@axes: the values of the device's axes.
<!-- ##### FUNCTION gdk_device_get_axis ##### -->
<para>
</para>
@device:
@axes:
@use: