home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / man / cat3 / xquerydevicestate.0 < prev    next >
Encoding:
Text File  |  1996-10-17  |  2.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. XQueryDeviceState(3X11)       X FUNCTIONS      XQueryDeviceState(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XQueryDeviceState  - query the state of an extension input
  9.        device.
  10.  
  11. SSYYNNTTAAXX
  12.        XQueryDeviceState(_d_i_s_p_l_a_y, _d_e_v_i_c_e)
  13.          Display *_d_i_s_p_l_a_y;
  14.          XDevice *_d_e_v_i_c_e;
  15.  
  16. AARRGGUUMMEENNTTSS
  17.        _d_i_s_p_l_a_y       Specifies the connection to the X server.
  18.  
  19.        _d_e_v_i_c_e       Specifies the device     whose    state  is  to  be
  20.            queried.
  21.  
  22. DDEESSCCRRIIPPTTIIOONN
  23.        The  _X_Q_u_e_r_y_D_e_v_i_c_e_S_t_a_t_e  request    queries     the  state of an
  24.        input device.  The current state of keys and  buttons  (up
  25.        or  down),  and valuators (current value) on the device is
  26.        reported by this request.  Each key or  button  is  repre-
  27.        sented  by  a  bit  in  the _X_D_e_v_i_c_e_S_t_a_t_e structure that is
  28.        returned.  Valuators on the device report 0  if    they  are
  29.        reporting  relative  information, and the current value if
  30.        they are reporting absolute information.
  31.  
  32.        _X_Q_u_e_r_y_D_e_v_i_c_e_S_t_a_t_e can generate a _B_a_d_D_e_v_i_c_e error.
  33.  
  34. SSTTRRUUCCTTUURREESS
  35.        The _X_D_e_v_i_c_e_S_t_a_t_e structure contains:
  36.  
  37.        typedef struct {
  38.         XID device_id;
  39.         int num_classes;
  40.         XInputClass *data;
  41.        } XDeviceState;
  42.  
  43.        The _X_V_a_l_u_a_t_o_r_S_t_a_t_e structure contains:
  44.  
  45.        typedef struct {
  46.         unsigned char class;
  47.         unsigned char length;
  48.         unsigned char num_valuators;
  49.         unsigned char mode;
  50.         int *valuators;
  51.        } XValuatorState;
  52.  
  53.        The _X_K_e_y_S_t_a_t_e structure contains:
  54.  
  55.        typedef struct {
  56.         unsigned char class;
  57.         unsigned char length;
  58.         short      num_keys;
  59.         char keys[32];
  60.        } XKeyState;
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XQueryDeviceState(3X11)       X FUNCTIONS      XQueryDeviceState(3X11)
  71.  
  72.  
  73.        The _X_B_u_t_t_o_n_S_t_a_t_e structure contains:
  74.  
  75.        typedef struct {
  76.         unsigned char class;
  77.         unsigned char length;
  78.         short      num_buttons;
  79.         char buttons[32];
  80.        } XButtonState;
  81.  
  82. DDIIAAGGNNOOSSTTIICCSS
  83.        _B_a_d_D_e_v_i_c_e   An invalid device was specified.   The  speci-
  84.            fied     device     does  not  exist or has not been
  85.            opened by this  client  via    _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e.
  86.            This error may also occur if some other client
  87.            has caused the specified device to become  the
  88.            X   keyboard     or  X    pointer     device     via  the
  89.            _X_C_h_a_n_g_e_K_e_y_b_o_a_r_d_D_e_v_i_c_e or  _X_C_h_a_n_g_e_P_o_i_n_t_e_r_D_e_v_i_c_e
  90.            requests.
  91.  
  92. SSEEEE AALLSSOO
  93.        _P_r_o_g_r_a_m_m_i_n_g _w_i_t_h _X_l_i_b
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.