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

  1.  
  2.  
  3.  
  4. XGrabDeviceButton(3X11)       X FUNCTIONS      XGrabDeviceButton(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XGrabDeviceButton,   XUngrabDeviceButton      -   grab/ungrab
  9.        extension input device buttons
  10.  
  11. SSYYNNTTAAXX
  12.        XXGGrraabbDDeevviicceeBBuuttttoonn((_d_i_s_p_l_a_y,, _d_e_v_i_c_e,, _b_u_t_t_o_n,, _m_o_d_i_f_i_e_r_s,, _m_o_d_i_f_i_e_r___d_e_v_i_c_e,, _g_r_a_b___w_i_n_d_o_w,,
  13.        _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,, _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))
  14.          DDiissppllaayy **_d_i_s_p_l_a_y;;
  15.          XXDDeevviiccee **_d_e_v_i_c_e;;
  16.          uunnssiiggnneedd iinntt _b_u_t_t_o_n;;
  17.          uunnssiiggnneedd iinntt _m_o_d_i_f_i_e_r_s;;
  18.          XXDDeevviiccee **_m_o_d_i_f_i_e_r___d_e_v_i_c_e;;
  19.          WWiinnddooww _g_r_a_b___w_i_n_d_o_w;;
  20.          BBooooll _o_w_n_e_r___e_v_e_n_t_s;;
  21.          uunnssiiggnneedd iinntt _e_v_e_n_t___c_o_u_n_t;;
  22.          XXEEvveennttCCllaassss **_e_v_e_n_t___l_i_s_t;;
  23.          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;;
  24.  
  25.        XXUUnnggrraabbDDeevviicceeBBuuttttoonn((_d_i_s_p_l_a_y,, _d_e_v_i_c_e,, _b_u_t_t_o_n,, _m_o_d_i_f_i_e_r_s,, _m_o_d_i_f_i_e_r___d_e_v_i_c_e,, _g_r_a_b___w_i_n_d_o_w))
  26.          DDiissppllaayy **_d_i_s_p_l_a_y;;
  27.          XXDDeevviiccee **_d_e_v_i_c_e;;
  28.          uunnssiiggnneedd iinntt _b_u_t_t_o_n;;
  29.          uunnssiiggnneedd iinntt _m_o_d_i_f_i_e_r_s;;
  30.          XXDDeevviiccee **_m_o_d_i_f_i_e_r___d_e_v_i_c_e;;
  31.          WWiinnddooww _g_r_a_b___w_i_n_d_o_w;;
  32.  
  33.  
  34. AARRGGUUMMEENNTTSS
  35.        _d_i_s_p_l_a_y       Specifies the connection to the X server.
  36.  
  37.        _d_e_v_i_c_e       Specifies the device that is to be grabbed  or
  38.            released
  39.  
  40.        _b_u_t_t_o_n       Specifies  the  device  button  that     is to be
  41.            grabbed or released or _A_n_y_B_u_t_t_o_n.
  42.  
  43.        _m_o_d_i_f_i_e_r_s   Specifies the set of keymasks or  _A_n_y_M_o_d_i_f_i_e_r.
  44.            The    mask  is  the bitwise inclusive OR of the
  45.            valid keymask bits.    Valid  bits  are:  Shift-
  46.            mask,    LockMask,     ControlMask,    Mod1Mask,
  47.            Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask.
  48.  
  49.        _m_o_d_i_f_i_e_r___d_e_v_i_c_e
  50.            specifies the device whose modifiers are to be
  51.            used.   If  the  modifier_device  specified is
  52.            NULL, the X keyboard will be used as the modi-
  53.            fier_device.
  54.  
  55.        _g_r_a_b___w_i_n_d_o_w Specifies the grab window.
  56.  
  57.        _o_w_n_e_r___e_v_e_n_t_s
  58.            Specifies   a  Boolean  value  that    indicates
  59.            whether the device events are to  be     reported
  60.            as  usual or reported with respect to the grab
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XGrabDeviceButton(3X11)       X FUNCTIONS      XGrabDeviceButton(3X11)
  71.  
  72.  
  73.            window if selected by the event list.
  74.  
  75.        _e_v_e_n_t___c_o_u_n_t Specifies the number of event classes  in  the
  76.            event list.
  77.  
  78.        _e_v_e_n_t___l_i_s_t  Specifies  which  events  are  reported to the
  79.            client.
  80.  
  81.        _t_h_i_s___d_e_v_i_c_e___m_o_d_e
  82.            Specifies further processing     of  events  from
  83.            this     device.   You    can  pass _G_r_a_b_M_o_d_e_S_y_n_c or
  84.            _G_r_a_b_M_o_d_e_A_s_y_n_c.
  85.  
  86.        _o_t_h_e_r___d_e_v_i_c_e_s___m_o_d_e
  87.            Specifies further processing     of  events  from
  88.            all    other devices.    You can pass _G_r_a_b_M_o_d_e_S_y_n_c
  89.            or _G_r_a_b_M_o_d_e_A_s_y_n_c.
  90.  
  91. DDEESSCCRRIIPPTTIIOONN
  92.        The _X_G_r_a_b_D_e_v_i_c_e_B_u_t_t_o_n request establishes a passive  grab.
  93.        In  the    future,     the  device  is actively grabbed (as for
  94.        _X_G_r_a_b_D_e_v_i_c_e, the last-grab time is  set    to  the     time  at
  95.        which  the  button  was    pressed     (as  transmitted  in the
  96.        _D_e_v_i_c_e_B_u_t_t_o_n_P_r_e_s_s event), and the _D_e_v_i_c_e_B_u_t_t_o_n_P_r_e_s_s  event
  97.        is reported if all of the following conditions are true:
  98.  
  99.        +o    The     device     is not grabbed, and the specified button
  100.         is logically pressed when the specified modifier keys
  101.         are     logically  down on the specified modifier device
  102.         and no other buttons or modifier keys  are    logically
  103.         down.
  104.  
  105.        +o    Either  the grab window is an ancestor of (or is) the
  106.         focus window, OR the grab window is a  descendent  of
  107.         the focus window and contains the device.
  108.  
  109.        +o    A  passive    grab on the same button/modifier combina-
  110.         tion does not exist on any ancestor of grab_window.
  111.  
  112.        The interpretation of the remaining arguments  is  as  for
  113.        _X_G_r_a_b_D_e_v_i_c_e.   The active grab is terminated automatically
  114.        when the logical state  of  the    device    has  all  buttons
  115.        released (independent of the logical state of the modifier
  116.        keys).
  117.  
  118.        Note that the logical state of a device (as seen by client
  119.        applications)  may  lag the physical state if device event
  120.        processing is frozen.
  121.  
  122.        This request overrides all  previous  grabs  by    the  same
  123.        client  on  the    same  button/modifier combinations on the
  124.        same window.  A modifiers of _A_n_y_M_o_d_i_f_i_e_r is equivalent  to
  125.        issuing    the grab request for all possible modifier combi-
  126.        nations (including the combination of no     modifiers).   It
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XGrabDeviceButton(3X11)       X FUNCTIONS      XGrabDeviceButton(3X11)
  137.  
  138.  
  139.        is  not    required  that    all modifiers specified have cur-
  140.        rently assigned KeyCodes.  A button of _A_n_y_B_u_t_t_o_n is equiv-
  141.        alent  to  issuing  the    request for all possible buttons.
  142.        Otherwise, it is not required that  the    specified  button
  143.        currently be assigned to a physical button.
  144.  
  145.        A modifier_device of NULL indicates that the X keyboard is
  146.        to be used as the modifier_device.
  147.  
  148.        If some other client has already issued a  _X_G_r_a_b_D_e_v_i_c_e_B_u_t_-
  149.        _t_o_n  with the same button/modifier combination on the same
  150.        window, a _B_a_d_A_c_c_e_s_s error results.  When using _A_n_y_M_o_d_i_f_i_e_r
  151.        or  _A_n_y_B_u_t_t_o_n , the request fails completely, and a _B_a_d_A_c_-
  152.        _c_e_s_s error results (no grabs are established) if there  is
  153.        a conflicting grab for any combination.    _X_G_r_a_b_D_e_v_i_c_e_B_u_t_t_o_n
  154.        has no effect on an active grab.
  155.  
  156.        _X_G_r_a_b_D_e_v_i_c_e_B_u_t_t_o_n can generate _B_a_d_C_l_a_s_s,     _B_a_d_D_e_v_i_c_e,  _B_a_d_-
  157.        _M_a_t_c_h, _B_a_d_V_a_l_u_e, and _B_a_d_W_i_n_d_o_w errors.
  158.  
  159.        The  _X_U_n_g_r_a_b_D_e_v_i_c_e_B_u_t_t_o_n request releases the passive grab
  160.        for a button/modifier combination on the specified  window
  161.        if  it was grabbed by this client.  A modifier of _A_n_y_M_o_d_i_-
  162.        _f_i_e_r is equivalent to issuing the ungrab request     for  all
  163.        possible     modifier combinations, including the combination
  164.        of no modifiers.     A button of _A_n_y_B_u_t_t_o_n is  equivalent  to
  165.        issuing    the request for all possible buttons.  _X_U_n_g_r_a_b_D_e_-
  166.        _v_i_c_e_B_u_t_t_o_n has no effect on an active grab.
  167.  
  168.        A modifier_device of NULL indicates that     the  X     keyboard
  169.        should be used as the modifier_device.
  170.  
  171.        _X_U_n_g_r_a_b_D_e_v_i_c_e_B_u_t_t_o_n can generate _B_a_d_D_e_v_i_c_e, _B_a_d_M_a_t_c_h, _B_a_d_-
  172.        _V_a_l_u_e and _B_a_d_W_i_n_d_o_w errors.
  173.  
  174. DDIIAAGGNNOOSSTTIICCSS
  175.        _B_a_d_D_e_v_i_c_e   An invalid device was specified.   The  speci-
  176.            fied     device     does  not  exist or has not been
  177.            opened by this  client  via    _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e.
  178.            This     error    may  also  occur if the specified
  179.            device is the X keyboard or X pointer  device.
  180.  
  181.        _B_a_d_M_a_t_c_h       This     error    may occur if an _X_G_r_a_b_D_e_v_i_c_e_B_u_t_t_o_n
  182.            request was made specifying a device that  has
  183.            no  buttons,     or  specifying a modifier device
  184.            that has no keys.
  185.  
  186.        _B_a_d_V_a_l_u_e       Some numeric value falls outside the range  of
  187.            values accepted by the request.  Unless a spe-
  188.            cific range is specified for an argument,  the
  189.            full     range    defined by the argument's type is
  190.            accepted.  Any argument defined as  a  set  of
  191.            alternatives can generate this error.
  192.  
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. XGrabDeviceButton(3X11)       X FUNCTIONS      XGrabDeviceButton(3X11)
  203.  
  204.  
  205.        _B_a_d_W_i_n_d_o_w   A  value for a Window argument does not name a
  206.            defined Window.
  207.  
  208. SSEEEE AALLSSOO
  209.        XAllowDeviceEvents(3X),
  210.        XGrabDevice(3X),
  211.        XGrabDeviceKey(3X),
  212.        _P_r_o_g_r_a_m_m_i_n_g _W_i_t_h _X_l_i_b
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262. X Version 11           Release 6.1                4
  263.  
  264.  
  265.