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

  1.  
  2.  
  3.  
  4. XGetDeviceMotionEvents(3X11)X FUNCTIONSXGetDeviceMotionEvents(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XGetDeviceMotionEvents,     XDeviceTimeCoord  -  get  device
  9.        motion history
  10.  
  11. SSYYNNTTAAXX
  12.        XDeviceTimeCoord *XGetDeviceMotionEvents(_d_i_s_p_l_a_y,  _d_e_v_i_c_e,
  13.        _s_t_a_r_t, _s_t_o_p,
  14.        _n_e_v_e_n_t_s___r_e_t_u_r_n, _m_o_d_e___r_e_t_u_r_n, _a_x_i_s___c_o_u_n_t___r_e_t_u_r_n)
  15.          Display *_d_i_s_p_l_a_y;
  16.          XDevice *_d_e_v_i_c_e;
  17.          Time _s_t_a_r_t, _s_t_o_p;
  18.          int *_n_e_v_e_n_t_s___r_e_t_u_r_n;
  19.          int *_m_o_d_e___r_e_t_u_r_n;
  20.          int *_a_x_i_s___c_o_u_n_t___r_e_t_u_r_n;
  21.  
  22. AARRGGUUMMEENNTTSS
  23.        _d_i_s_p_l_a_y       Specifies the connection to the X server.
  24.  
  25.        _d_e_v_i_c_e       Specifies  the  device whose motion history is
  26.            to be queried.
  27.  
  28.        _s_t_a_r_t
  29.        _s_t_o_p       Specify the time interval in which the  events
  30.            are    returned  from the motion history buffer.
  31.            You can pass a timestamp or _C_u_r_r_e_n_t_T_i_m_e.
  32.  
  33.        _n_e_v_e_n_t_s___r_e_t_u_r_n
  34.            Returns the number of events from  the  motion
  35.            history buffer.
  36.  
  37.        _m_o_d_e___r_e_t_u_r_n Returns  the     mode  of the device (_A_b_s_o_l_u_t_e or
  38.            _R_e_l_a_t_i_v_e).
  39.  
  40.        _a_x_i_s___c_o_u_n_t___r_e_t_u_r_n
  41.            Returns the count of axes being reported.
  42.  
  43. DDEESSCCRRIIPPTTIIOONN
  44.        The server may retain the recent     history  of  the  device
  45.        motion  and  do so to a finer granularity than is reported
  46.        by _D_e_v_i_c_e_M_o_t_i_o_n_N_o_t_i_f_y events.  The  _X_G_e_t_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s
  47.        request makes this history available.
  48.  
  49.        The  _X_G_e_t_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s  request returns all events in
  50.        the motion history buffer that fall between the    specified
  51.        start  and  stop     times,     inclusive.  If the start time is
  52.        later than the stop time or if the start time  is  in  the
  53.        future,    no  events  are returned.  If the stop time is in
  54.        the future, it is equivalent to specifying _C_u_r_r_e_n_t_T_i_m_e.
  55.  
  56.        The _m_o_d_e indicates whether the device is     reporting  abso-
  57.        lute  positional     data  (mode=_A_b_s_o_l_u_t_e) or relative motion
  58.        data (mode=_R_e_l_a_t_i_v_e).  Some devices allow their mode to be
  59.        changed    via  the _X_S_e_t_D_e_v_i_c_e_M_o_d_e request.  These constants
  60.        are defined in the file XI.h.  The _a_x_i_s___c_o_u_n_t returns  the
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XGetDeviceMotionEvents(3X11)X FUNCTIONSXGetDeviceMotionEvents(3X11)
  71.  
  72.  
  73.        number  of axes or valuators being reported by the device.
  74.  
  75.        _X_G_e_t_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s can generate a _B_a_d_D_e_v_i_c_e,     or  _B_a_d_-
  76.        _M_a_t_c_h error.
  77.  
  78. SSTTRRUUCCTTUURREESS
  79.        The _X_D_e_v_i_c_e_T_i_m_e_C_o_o_r_d structure contains:
  80.  
  81.        typedef struct {
  82.         Time time;
  83.         int *data;
  84.        } XDeviceTimeCoord;
  85.  
  86.        The  time member is set to the time, in milliseconds.  The
  87.        data member is a pointer to an array of    integers.   These
  88.        integers     are  set  to the values of each valuator or axis
  89.        reported by the device.    There is one element in the array
  90.        per  axis  of motion reported by the device.  The value of
  91.        the array elements depends on the mode of the device.   If
  92.        the mode is _A_b_s_o_l_u_t_e, the values are the raw values gener-
  93.        ated by the device.  These may be scaled     by  client  pro-
  94.        grams  using the maximum values that the device can gener-
  95.        ate.  The maximum value for each axis  of  the  device  is
  96.        reported in the max_val field of the _X_A_x_i_s_I_n_f_o returned by
  97.        the _X_L_i_s_t_I_n_p_u_t_D_e_v_i_c_e_s request.  If the mode  is    _R_e_l_a_t_i_v_e,
  98.        the  data  values are the relative values generated by the
  99.        device.
  100.  
  101.        You should use _X_F_r_e_e_D_e_v_i_c_e_M_o_t_i_o_n_E_v_e_n_t_s to  free    the  data
  102.        returned by this request.
  103.  
  104.        Errors returned by this request: _B_a_d_D_e_v_i_c_e, _B_a_d_M_a_t_c_h.
  105.  
  106. DDIIAAGGNNOOSSTTIICCSS
  107.        _B_a_d_D_e_v_i_c_e   An  invalid    device was specified.  The speci-
  108.            fied device does not exist  or  has    not  been
  109.            opened  by  this  client via _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e.
  110.            This error may also    occur  if  the    specified
  111.            device  is the X keyboard or X pointer device.
  112.  
  113.        _B_a_d_M_a_t_c_h       This error may occur if  an    _X_G_e_t_D_e_v_i_c_e_M_o_t_i_o_n_-
  114.            _E_v_e_n_t_s  request  is    made  specifying a device
  115.            that has no valuators and reports no     axes  of
  116.            motion.
  117.  
  118. SSEEEE AALLSSOO
  119.        _P_r_o_g_r_a_m_m_i_n_g _w_i_t_h _X_l_i_b
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.