gdk-Input-Devices           package:RGtk2           R Documentation

_I_n_p_u_t _D_e_v_i_c_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Functions for handling extended input devices

_M_e_t_h_o_d_s _a_n_d _F_u_n_c_t_i_o_n_s:

     'gdkDevicesList()'
      'gdkDeviceSetSource(object, source)'
      'gdkDeviceSetMode(object, mode)'
      'gdkDeviceSetKey(object, index, keyval, modifiers)'
      'gdkDeviceSetAxisUse(object, index, use)'
      'gdkDeviceGetCorePointer()'
      'gdkDeviceGetState(object, window)'
      'gdkDeviceGetHistory(object, window, start, stop)'
      'gdkDeviceGetAxis(object, axes, use)'
      'gdkInputSetExtensionEvents(object, mask, mode)'

_D_e_t_a_i_l_e_d _D_e_s_c_r_i_p_t_i_o_n:

     In addition to the normal keyboard and mouse input devices, GTK+
     also contains support for extended input devices. 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  XInput
     extension.

     Because handling extended input devices may involve considerable
     overhead, they need to be turned on for each 'GdkWindow'
     individually using 'gdkInputSetExtensionEvents'. (Or, more
     typically, for GtkWidgets, using 'gtkWidgetSetExtensionEvents').
     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
     'gdkInputSetExtensionEvents'. Otherwise, the application must
     retrieve the device information using 'gdkDevicesList', check the
     'has_cursor' field, and,  if it is 'FALSE', draw a cursor itself
     when it receives  motion events.

     Each pointing device is assigned a unique integer ID; events from
     a particular device can be identified by the 'deviceid' field in
     the event structure. The events generated by pointer devices have
     also been extended to contain 'pressure', 'xtilt' and 'ytilt'
     fields which contain the extended information reported as
     additional valuators from the device. The 'pressure' 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.)

     One additional field in each event is the 'source' 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.

     Various aspects of each device may be configured. The easiest way
     of creating a GUI to allow the user to configure such a device is
     to use the 'GtkInputDialog' widget in GTK+.  However, even when
     using this widget, application writers will need to directly query
     and set the configuration parameters in order to save the state
     between invocations of the application. The configuration of
     devices is queried using 'gdkDevicesList'. Each device must be
     activated using 'gdkDeviceSetMode', 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 'gdkDeviceSetAxisUse'. And
     the source type for each device can be set with
     'gdkDeviceSetSource'.

     Devices may also have associated keys or function buttons. Such
     keys can be globally set to map into normal X keyboard events. The
     mapping is set using 'gdkDeviceSetKey'.

     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 'xtilt'
     and 'ytilt'.

_S_t_r_u_c_t_u_r_e_s:


     '_G_d_k_D_e_v_i_c_e' A 'GdkDevice' structure contains a detailed
          description of an extended input device. All fields are
          read-only; but you can use 'gdkDeviceSetSource',
          'gdkDeviceSetMode', 'gdkDeviceSetKey' and
          'gdkDeviceSetAxisUse' to configure various aspects of the
          device.

          '_n_a_m_e' [character] the parent instance

          '_s_o_u_r_c_e' ['GdkInputSource'] the name of this device.

          '_m_o_d_e' ['GdkInputMode'] the type of this device.

          '_h_a_s_C_u_r_s_o_r' [logical] the mode of this device

          '_n_u_m_A_x_e_s' [integer] 'TRUE' if the pointer follows device
               motion.

          '_a_x_e_s' ['GdkDeviceAxis'] the length of the 'axes' list.

          '_n_u_m_K_e_y_s' [integer] a list of 'GdkDeviceAxis', describing the
               axes of this device.

          '_k_e_y_s' ['GdkDeviceKey'] the length of the 'keys' list.


     '_G_d_k_D_e_v_i_c_e_K_e_y' The 'GdkDeviceKey' structure contains information
          about the mapping of one device function button onto a normal
          X key event.  It has the following fields:

          '_k_e_y_v_a_l' [numeric] the keyval to generate when the function
               button is pressed. If this is 0, no keypress will be
               generated.

          '_m_o_d_i_f_i_e_r_s' ['GdkModifierType'] the modifiers set for the
               generated key event.


     '_G_d_k_D_e_v_i_c_e_A_x_i_s' The 'GdkDeviceAxis' structure contains information
          about the range and mapping of a device axis.

          '_u_s_e' ['GdkAxisUse'] specifies how the axis is used.

          '_m_i_n' [numeric] the minimal value that will be reported by
               this axis.

          '_m_a_x' [numeric] the maximal value that will be reported by
               this axis.


     '_G_d_k_T_i_m_e_C_o_o_r_d' The 'GdkTimeCoord' structure stores a single event
          in a motion history. It contains the following fields:
          *'GdkTimeCoord' is a transparent-type.*

          '_t_i_m_e' [numeric] The timestamp for this event.

          '_a_x_e_s' [numeric] the values of the device's axes.


_E_n_u_m_s _a_n_d _F_l_a_g_s:


     '_G_d_k_I_n_p_u_t_S_o_u_r_c_e' An enumeration describing the type of an input
          device in general terms.

          '_m_o_u_s_e' the device is a mouse. (This will be reported for the
               core pointer, even if it is something else, such as a
               trackball.)

          '_p_e_n' the device is a stylus of a graphics tablet or similar
               device.

          '_e_r_a_s_e_r' the device is an eraser. Typically, this would be
               the other end of a stylus on a graphics tablet.

          '_c_u_r_s_o_r' the device is a graphics tablet "puck" or similar
               device.


     '_G_d_k_I_n_p_u_t_M_o_d_e' An enumeration that describes the mode of an input
          device.

          '_d_i_s_a_b_l_e_d' the device is disabled and will not report any
               events.

          '_s_c_r_e_e_n' the device is enabled. The device's coordinate space
               maps to the entire screen.

          '_w_i_n_d_o_w' 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.


     '_G_d_k_A_x_i_s_U_s_e' An enumeration describing the way in which a device
          axis (valuator) maps onto the predefined valuator types that
          GTK+ understands.

          '_i_g_n_o_r_e' the axis is ignored.

          '_x' the axis is used as the x axis.

          '_y' the axis is used as the y axis.

          '_p_r_e_s_s_u_r_e' the axis is used for pressure information.

          '_x_t_i_l_t' the axis is used for x tilt information.

          '_y_t_i_l_t' the axis is used for x tilt information.

          '_w_h_e_e_l' the axis is used for wheel information.

          '_l_a_s_t' a constant equal to the numerically highest axis
               value.


     '_G_d_k_E_x_t_e_n_s_i_o_n_M_o_d_e' An enumeration used to specify which extension
          events are desired for a particular widget.

          '_n_o_n_e' no extension events are desired.

          '_a_l_l' all extension events are desired.

          '_c_u_r_s_o_r' extension events are desired only if a cursor will
               be displayed for the device.


_A_u_t_h_o_r(_s):

     Derived by RGtkGen from GTK+ documentation

_R_e_f_e_r_e_n_c_e_s:

     <URL:
     http://developer.gnome.org/doc/API/2.0/gdk/gdk-Input-Devices.html>

