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

  1.  
  2.  
  3.  
  4. XGrabDeviceKey(3X11)       X FUNCTIONS         XGrabDeviceKey(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XGrabDeviceKey,    XUngrabDeviceKey  - grab/ungrab extension
  9.        input device Keys
  10.  
  11. SSYYNNTTAAXX
  12.        XGrabDeviceKey(_d_i_s_p_l_a_y,      _d_e_v_i_c_e,     _K_e_y,     _m_o_d_i_f_i_e_r_s,
  13.        _m_o_d_i_f_i_e_r___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,
  14.        _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,
  15.        _o_t_h_e_r___d_e_v_i_c_e_s___m_o_d_e)
  16.          Display *_d_i_s_p_l_a_y;
  17.          XDevice *_d_e_v_i_c_e;
  18.          unsigned int _K_e_y;
  19.          unsigned int _m_o_d_i_f_i_e_r_s;
  20.          XDevice *_m_o_d_i_f_i_e_r___d_e_v_i_c_e;
  21.          Window _g_r_a_b___w_i_n_d_o_w;
  22.          Bool _o_w_n_e_r___e_v_e_n_t_s;
  23.          unsigned int _e_v_e_n_t___c_o_u_n_t;
  24.          XEventClass _e_v_e_n_t___l_i_s_t;
  25.          int _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;
  26.  
  27.        XUngrabDeviceKey(_d_i_s_p_l_a_y,    _d_e_v_i_c_e,    _K_e_y,    _m_o_d_i_f_i_e_r_s,
  28.        _m_o_d_i_f_i_e_r___d_e_v_i_c_e, _g_r_a_b___w_i_n_d_o_w)
  29.          Display *_d_i_s_p_l_a_y;
  30.          XDevice *_d_e_v_i_c_e;
  31.          unsigned int _K_e_y;
  32.          unsigned int _m_o_d_i_f_i_e_r_s;
  33.          XDevice *_m_o_d_i_f_i_e_r___d_e_v_i_c_e;
  34.          Window _g_r_a_b___w_i_n_d_o_w;
  35.  
  36. AARRGGUUMMEENNTTSS
  37.        _d_i_s_p_l_a_y       Specifies the connection to the X server.
  38.  
  39.        _d_e_v_i_c_e       Specifies  the device that is to be grabbed or
  40.            released
  41.  
  42.        _K_e_y       Specifies the device Key that is to be grabbed
  43.            or released or _A_n_y_K_e_y.
  44.  
  45.        _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.
  46.            The mask is the bitwise inclusive  OR  of  the
  47.            valid  keymask  bits.   Valid bits are: Shift-
  48.            Mask,   LockMask,    ControlMask,    Mod1Mask,
  49.            Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask.
  50.  
  51.        _m_o_d_i_f_i_e_r___d_e_v_i_c_e
  52.            Specifies the device whose modifiers are to be
  53.            used.  If a modifier_device of NULL is  speci-
  54.            fied, the X keyboard will be used as the modi-
  55.            fier_device.
  56.  
  57.        _g_r_a_b___w_i_n_d_o_w Specifies the grab window.
  58.  
  59.        _o_w_n_e_r___e_v_e_n_t_s
  60.            Specifies  a     Boolean  value     that    indicates
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XGrabDeviceKey(3X11)       X FUNCTIONS         XGrabDeviceKey(3X11)
  71.  
  72.  
  73.            whether  the     device events are to be reported
  74.            as usual or reported with respect to the  grab
  75.            window if selected by the event list.
  76.  
  77.        _e_v_e_n_t___c_o_u_n_t Specifies  the  number of event classes in the
  78.            event list.
  79.  
  80.        _e_v_e_n_t___l_i_s_t  Specifies which device events are reported  to
  81.            the client.
  82.  
  83.        _t_h_i_s___d_e_v_i_c_e___m_o_d_e
  84.            Specifies  further  processing  of events from
  85.            this device.     You  can  pass     _G_r_a_b_M_o_d_e_S_y_n_c  or
  86.            _G_r_a_b_M_o_d_e_A_s_y_n_c.
  87.  
  88.        _o_t_h_e_r___d_e_v_i_c_e_s___m_o_d_e
  89.            Specifies  further  processing  of events from
  90.            other devices.  You can pass     _G_r_a_b_M_o_d_e_S_y_n_c  or
  91.            _G_r_a_b_M_o_d_e_A_s_y_n_c.
  92.  
  93. DDEESSCCRRIIPPTTIIOONN
  94.        The _X_G_r_a_b_D_e_v_i_c_e_K_e_y request establishes a passive grab.  In
  95.        the future, the device is actively grabbed (as for  _X_G_r_a_b_-
  96.        _D_e_v_i_c_e,    the  last-device-grab  time is set to the time at
  97.        which  the  Key    was  pressed  (as  transmitted     in   the
  98.        _D_e_v_i_c_e_K_e_y_P_r_e_s_s  event),    and  the  _D_e_v_i_c_e_K_e_y_P_r_e_s_s event is
  99.        reported if all of the following conditions are true:
  100.  
  101.        +o    The device is not grabbed, and the specified  key  is
  102.         logically  pressed    when  the specified modifier keys
  103.         are logically down, and no    other  keys  or     modifier
  104.         keys are logically down.
  105.  
  106.        +o    The grab_window is an ancestor (or is) the focus win-
  107.         dow OR the grab window is a descendant of  the  focus
  108.         window and contains the device.
  109.  
  110.        +o    The confine_to window (if any) is viewable.
  111.  
  112.        +o    A  passive    grab on the same key/modifier combination
  113.         does not exist on any ancestor of grab_window.
  114.  
  115.        The interpretation of the remaining arguments  is  as  for
  116.        _X_G_r_a_b_D_e_v_i_c_e .  The active grab is terminated automatically
  117.        when the logical state of the device has the specified key
  118.        released.
  119.  
  120.        Note  that the logical state of a device (as seen by means
  121.        of the X protocol ) may lag the physical state  if  device
  122.        event processing is frozen.
  123.  
  124.        If  the    key is not _A_n_y_K_e_y, it must be in the range speci-
  125.        fied by min_keycode and max_keycode  as    returned  by  the
  126.        _X_L_i_s_t_I_n_p_u_t_D_e_v_i_c_e_s  request.   Otherwise,     a _B_a_d_V_a_l_u_e error
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XGrabDeviceKey(3X11)       X FUNCTIONS         XGrabDeviceKey(3X11)
  137.  
  138.  
  139.        results.
  140.  
  141.        This request overrides all  previous  grabs  by    the  same
  142.        client  on  the same Key/modifier combinations on the same
  143.        window.    A modifier of _A_n_y_M_o_d_i_f_i_e_r is equivalent to  issu-
  144.        ing  the     grab  request for all possible modifier combina-
  145.        tions (including the combination of no modifiers).  It  is
  146.        not  required  that all modifiers specified have currently
  147.        assigned KeyCodes.  A key of _A_n_y_K_e_y is equivalent to issu-
  148.        ing  the     request for all possible keys.     Otherwise, it is
  149.        not required that the specified key currently be     assigned
  150.        to a physical Key.
  151.  
  152.        If  a modifier_device of NULL is specified, the X keyboard
  153.        will be used as the modifier_device.
  154.  
  155.        If some other client has already issued    a  _X_G_r_a_b_D_e_v_i_c_e_K_e_y
  156.        with the same Key/modifier combination on the same window,
  157.        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  or
  158.        _A_n_y_K_e_y  ,  the  request    fails completely, and a _B_a_d_A_c_c_e_s_s
  159.        error results (no grabs are established)     if  there  is    a
  160.        conflicting  grab for any combination.  _X_G_r_a_b_D_e_v_i_c_e_K_e_y has
  161.        no effect on an active grab.
  162.  
  163.        _X_G_r_a_b_D_e_v_i_c_e_K_e_y can generate  _B_a_d_A_c_c_e_s_s,    _B_a_d_C_l_a_s_s,  _B_a_d_D_e_-
  164.        _v_i_c_e,   _B_a_d_M_a_t_c_h,  _B_a_d_V_a_l_u_e,  and  _B_a_d_W_i_n_d_o_w  errors.   It
  165.        returns _S_u_c_c_e_s_s on successful completion of the request.
  166.  
  167.        The _X_U_n_g_r_a_b_D_e_v_i_c_e_K_e_y request releases the passive grab for
  168.        a  key/modifier    combination on the specified window if it
  169.        was grabbed by this client.  A modifier of _A_n_y_M_o_d_i_f_i_e_r  is
  170.        equivalent  to issuing the ungrab request for all possible
  171.        modifier combinations, including     the  combination  of  no
  172.        modifiers.   A  Key of _A_n_y_K_e_y is equivalent to issuing the
  173.        request for all possible Keys.    _X_U_n_g_r_a_b_D_e_v_i_c_e_K_e_y  has  no
  174.        effect on an active grab.
  175.  
  176.        If  a modifier_device of NULL is specified, the X keyboard
  177.        will be used as the modifier_device.
  178.  
  179.        _X_U_n_g_r_a_b_D_e_v_i_c_e_K_e_y can generate  _B_a_d_D_e_v_i_c_e,  _B_a_d_M_a_t_c_h,  _B_a_d_-
  180.        _V_a_l_u_e and _B_a_d_W_i_n_d_o_w errors.
  181.  
  182. DDIIAAGGNNOOSSTTIICCSS
  183.        _B_a_d_D_e_v_i_c_e   An  invalid    device was specified.  The speci-
  184.            fied device does not exist  or  has    not  been
  185.            opened  by  this  client via _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e.
  186.            This error may also    occur  if  the    specified
  187.            device  is the X keyboard or X pointer device.
  188.  
  189.        _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_K_e_y
  190.            request  was made specifying a device that has
  191.            no keys, or a  modifier  device  that  has  no
  192.            keys.
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. XGrabDeviceKey(3X11)       X FUNCTIONS         XGrabDeviceKey(3X11)
  203.  
  204.  
  205.        _B_a_d_V_a_l_u_e       Some     numeric value falls outside the range of
  206.            values accepted by the request.  Unless a spe-
  207.            cific  range is specified for an argument, the
  208.            full range defined by the argument's     type  is
  209.            accepted.   Any  argument  defined as a set of
  210.            alternatives can generate this error.
  211.  
  212.        _B_a_d_W_i_n_d_o_w   A value for a Window argument does not name    a
  213.            defined Window.
  214.  
  215. SSEEEE AALLSSOO
  216.        XAllowDeviceEvents(3X),
  217.        XGrabDevice(3X),
  218.        XGrabDeviceButton(3X),
  219.        _P_r_o_g_r_a_m_m_i_n_g _w_i_t_h _X_l_i_b
  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.