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

  1.  
  2.  
  3.  
  4. XGrabDevice(3X11)       X FUNCTIONS        XGrabDevice(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XGrabDevice,  XUngrabDevice  -  grab/release the specified
  9.        extension device
  10.  
  11. SSYYNNTTAAXX
  12.        iinntt XXGGrraabbDDeevviiccee((_d_i_s_p_l_a_y,, _d_e_v_i_c_e,, _g_r_a_b___w_i_n_d_o_w,, _o_w_n_e_r___e_v_e_n_t_s,, _e_v_e_n_t___c_o_u_n_t,, _e_v_e_n_t___l_i_s_t,,
  13.        _t_h_i_s___d_e_v_i_c_e___m_o_d_e,, _o_t_h_e_r___d_e_v_i_c_e_s___m_o_d_e,, _t_i_m_e))
  14.          DDiissppllaayy **_d_i_s_p_l_a_y;;
  15.          XXDDeevviiccee **_d_e_v_i_c_e;;
  16.          WWiinnddooww _g_r_a_b___w_i_n_d_o_w;;
  17.          BBooooll _o_w_n_e_r___e_v_e_n_t_s;;
  18.          iinntt _e_v_e_n_t___c_o_u_n_t;;
  19.          XXEEvveennttCCllaassss **_e_v_e_n_t___l_i_s_t;;
  20.          iinntt _t_h_i_s___d_e_v_i_c_e___m_o_d_e,, _o_t_h_e_r___d_e_v_i_c_e_s___m_o_d_e;;
  21.          TTiimmee _t_i_m_e;;
  22.  
  23.        XXUUnnggrraabbDDeevviiccee((_d_i_s_p_l_a_y,, _d_e_v_i_c_e,, _t_i_m_e))
  24.          DDiissppllaayy **_d_i_s_p_l_a_y;;
  25.          XXDDeevviiccee **_d_e_v_i_c_e;;
  26.          TTiimmee _t_i_m_e;;
  27.  
  28.  
  29. AARRGGUUMMEENNTTSS
  30.        _d_i_s_p_l_a_y       Specifies the connection to the X server.
  31.  
  32.        _d_e_v_i_c_e       Specifies  the  device  to    be   grabbed   or
  33.            released.
  34.  
  35.        _g_r_a_b___w_i_n_d_o_w Specifies  the id of a window to be associated
  36.            with the device.
  37.  
  38.        _o_w_n_e_r___e_v_e_n_t_s
  39.            Specifies  a     Boolean  value     that    indicates
  40.            whether  the     events from the device are to be
  41.            reported as usual or reported with respect  to
  42.            the grab window if selected by the event list.
  43.  
  44.        _e_v_e_n_t___c_o_u_n_t Specifies  the  number  of  elements     in   the
  45.            event_list array.
  46.  
  47.        _e_v_e_n_t___l_i_s_t  Specifies a pointer to a list of event classes
  48.            that indicates which events the client  wishes
  49.            to  receive.      These     event    classes must have
  50.            been     obtained  specifying  the  device  being
  51.            grabbed.
  52.  
  53.        _t_h_i_s___d_e_v_i_c_e___m_o_d_e
  54.            Specifies  further  processing  of events from
  55.            this device.     You  can  pass     _G_r_a_b_M_o_d_e_S_y_n_c  or
  56.            _G_r_a_b_M_o_d_e_A_s_y_n_c.
  57.  
  58.        _o_t_h_e_r___d_e_v_i_c_e_s___m_o_d_e
  59.            Specifies  further  processing  of events from
  60.            other devices.  You can pass     _G_r_a_b_M_o_d_e_S_y_n_c  or
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XGrabDevice(3X11)       X FUNCTIONS        XGrabDevice(3X11)
  71.  
  72.  
  73.            _G_r_a_b_M_o_d_e_A_s_y_n_c.
  74.  
  75.        _t_i_m_e       Specifies  the  time.   You    can pass either a
  76.            timestamp or _C_u_r_r_e_n_t_T_i_m_e.
  77.  
  78. DDEESSCCRRIIPPTTIIOONN
  79.        The _X_G_r_a_b_D_e_v_i_c_e request    actively  grabs     control  of  the
  80.        device  and  generates  _D_e_v_i_c_e_F_o_c_u_s_I_n  and  _D_e_v_i_c_e_F_o_c_u_s_O_u_t
  81.        events.    Further device events are reported  only  to  the
  82.        grabbing     client.  _X_G_r_a_b_D_e_v_i_c_e overrides any active device
  83.        grab by this client.  event_list is a pointer to a list of
  84.        event  classes.     This  list  indicates    which  events the
  85.        client wishes to receive while the  grab     is  active.   If
  86.        owner_events  is     _F_a_l_s_e    , all generated device events are
  87.        reported with respect  to  grab_window  if  selected.   If
  88.        owner_events is _T_r_u_e and if a generated device event would
  89.        normally be reported to this client, it is  reported  nor-
  90.        mally;  otherwise,  the    event is reported with respect to
  91.        the grab_window, and is only reported if specified in  the
  92.        event_list.
  93.  
  94.        If the this_device_mode argument is _G_r_a_b_M_o_d_e_A_s_y_n_c , device
  95.        event processing continues as usual.   If  the  device  is
  96.        currently frozen by this client, then processing of device
  97.        events is resumed.  If the this_device_mode   argument  is
  98.        _G_r_a_b_M_o_d_e_S_y_n_c  , the state of the device (as seen by client
  99.        applications) appears to freeze, and the X  server  gener-
  100.        ates  no     further  device events until the grabbing client
  101.        issues a releasing _X_A_l_l_o_w_D_e_v_i_c_e_E_v_e_n_t_s call  or  until  the
  102.        device  grab  is     released.  Actual device changes are not
  103.        lost while the device is frozen; they are simply queued in
  104.        the server for later processing.
  105.  
  106.        If  other_devices_mode  is  _G_r_a_b_M_o_d_e_A_s_y_n_c  , processing of
  107.        events from other devices is unaffected by  activation  of
  108.        the  grab.   If    other_devices_mode  is    _G_r_a_b_M_o_d_e_S_y_n_c, the
  109.        state of all devices except the grabbed device
  110.     (as seen by client applications) appears to  freeze,  and
  111.        the  X  server  generates  no  further  events  from those
  112.        devices until the grabbing client issues a releasing  _X_A_l_-
  113.        _l_o_w_D_e_v_i_c_e_E_v_e_n_t_s call or until the device grab is released.
  114.        Actual events are not lost while the devices  are  frozen;
  115.        they are simply queued in the server for later processing.
  116.  
  117.        If the device is actively grabbed by  some  other  client,
  118.        _X_G_r_a_b_D_e_v_i_c_e   fails   and   returns   _A_l_r_e_a_d_y_G_r_a_b_b_e_d.   If
  119.        grab_window is not viewable, it fails  and  returns  _G_r_a_b_-
  120.        _N_o_t_V_i_e_w_a_b_l_e.  If the device is frozen by an active grab of
  121.        another client, it fails and returns _G_r_a_b_F_r_o_z_e_n.      If  the
  122.        specified  time    is earlier than the last-device-grab time
  123.        or later than the current X  server  time,  it  fails  and
  124.        returns    _G_r_a_b_I_n_v_a_l_i_d_T_i_m_e.  Otherwise, the last-device-grab
  125.        time is    set  to     the  specified     time  _(  _C_u_r_r_e_n_t_T_i_m_e  is
  126.        replaced by the current X server time).
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XGrabDevice(3X11)       X FUNCTIONS        XGrabDevice(3X11)
  137.  
  138.  
  139.        If  a grabbed device is closed by a client while an active
  140.        grab by that client is  in  effect,  the     active     grab  is
  141.        released.   If the device is frozen only by an active grab
  142.        of the requesting client, it is thawed.
  143.  
  144.        _X_G_r_a_b_D_e_v_i_c_e can generate     _B_a_d_C_l_a_s_s,  _B_a_d_D_e_v_i_c_e,    _B_a_d_V_a_l_u_e,
  145.        and _B_a_d_W_i_n_d_o_w errors.
  146.  
  147.        The  _X_U_n_g_r_a_b_D_e_v_i_c_e  request  releases  the  device and any
  148.        queued events if this client has it actively grabbed  from
  149.        either  _X_G_r_a_b_D_e_v_i_c_e  or    _X_G_r_a_b_D_e_v_i_c_e_K_e_y.     If other devices
  150.        are frozen by the grab, _X_U_n_g_r_a_b_D_e_v_i_c_e  thaws  them.   _X_U_n_-
  151.        _g_r_a_b_D_e_v_i_c_e  does     not  release  the  device and any queued
  152.        events if the specified time is    earlier     than  the  last-
  153.        device-grab  time  or  is  later than the current X server
  154.        time.  It also generates _D_e_v_i_c_e_F_o_c_u_s_I_n and  _D_e_v_i_c_e_F_o_c_u_s_O_u_t
  155.        events.     The X server automatically performs an _U_n_g_r_a_b_D_e_-
  156.        _v_i_c_e request if the event window for an active device grab
  157.        becomes not viewable.
  158.  
  159.        _X_U_n_g_r_a_b_D_e_v_i_c_e can generate a _B_a_d_D_e_v_i_c_e error.
  160.  
  161. DDIIAAGGNNOOSSTTIICCSS
  162.        _B_a_d_D_e_v_i_c_e   An  invalid    device was specified.  The speci-
  163.            fied device does not exist  or  has    not  been
  164.            opened  by  this  client via _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e.
  165.            This error may also    occur  if  the    specified
  166.            device  is the X keyboard or X pointer device.
  167.  
  168.        _B_a_d_V_a_l_u_e       Some numeric value falls outside the range  of
  169.            values accepted by the request.  Unless a spe-
  170.            cific range is specified for an argument,  the
  171.            full     range    defined by the argument's type is
  172.            accepted.  Any argument defined as  a  set  of
  173.            alternatives can generate this error.
  174.  
  175.        _B_a_d_W_i_n_d_o_w   A  value for a Window argument does not name a
  176.            defined Window.
  177.  
  178. SSEEEE AALLSSOO
  179.        XAllowDeviceEvents(3X),    XGrabDeviceButton(3X),     XGrabDe-
  180.        viceKey(3X),
  181.        _P_r_o_g_r_a_m_m_i_n_g _W_i_t_h _X_l_i_b
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.