home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / Xi / XGrabDeviceKey.z / XGrabDeviceKey
Encoding:
Text File  |  1998-10-30  |  11.8 KB  |  265 lines

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