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

  1.  
  2.  
  3.  
  4. XGrabKeyboard(3X11)      XLIB FUNCTIONS      XGrabKeyboard(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XGrabKeyboard, XUngrabKeyboard - grab the keyboard
  9.  
  10. SSYYNNTTAAXX
  11.        int XGrabKeyboard(_d_i_s_p_l_a_y, _g_r_a_b___w_i_n_d_o_w, _o_w_n_e_r___e_v_e_n_t_s,
  12.        _p_o_i_n_t_e_r___m_o_d_e, _k_e_y_b_o_a_r_d___m_o_d_e, _t_i_m_e)
  13.          Display *_d_i_s_p_l_a_y;
  14.          Window _g_r_a_b___w_i_n_d_o_w;
  15.          Bool _o_w_n_e_r___e_v_e_n_t_s;
  16.          int _p_o_i_n_t_e_r___m_o_d_e, _k_e_y_b_o_a_r_d___m_o_d_e;
  17.          Time _t_i_m_e;
  18.  
  19.        XUngrabKeyboard(_d_i_s_p_l_a_y, _t_i_m_e)
  20.          Display *_d_i_s_p_l_a_y;
  21.          Time _t_i_m_e;
  22.  
  23. AARRGGUUMMEENNTTSS
  24.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  25.  
  26.        _g_r_a_b___w_i_n_d_o_w
  27.          Specifies the grab window.
  28.  
  29.        _k_e_y_b_o_a_r_d___m_o_d_e
  30.          Specifies further processing of keyboard events.
  31.          You can pass _G_r_a_b_M_o_d_e_S_y_n_c or _G_r_a_b_M_o_d_e_A_s_y_n_c.
  32.  
  33.        _o_w_n_e_r___e_v_e_n_t_s
  34.          Specifies a Boolean value that indicates whether
  35.          the keyboard events are to be reported as usual.
  36.  
  37.        _p_o_i_n_t_e_r___m_o_d_e
  38.          Specifies further processing of pointer events.
  39.          You can pass _G_r_a_b_M_o_d_e_S_y_n_c or _G_r_a_b_M_o_d_e_A_s_y_n_c.
  40.  
  41.        _t_i_m_e     Specifies the time.  You can pass either a
  42.          timestamp or _C_u_r_r_e_n_t_T_i_m_e.
  43.  
  44. DDEESSCCRRIIPPTTIIOONN
  45.        The _X_G_r_a_b_K_e_y_b_o_a_r_d function actively grabs control of the
  46.        keyboard and generates _F_o_c_u_s_I_n and _F_o_c_u_s_O_u_t events.  Fur-
  47.        ther key events are reported only to the grabbing client.
  48.        _X_G_r_a_b_K_e_y_b_o_a_r_d overrides any active keyboard grab by this
  49.        client.    If owner_events is _F_a_l_s_e, all generated key
  50.        events are reported with respect to grab_window.     If
  51.        owner_events is _T_r_u_e and if a generated key event would
  52.        normally be reported to this client, it is reported nor-
  53.        mally; otherwise, the event is reported with respect to
  54.        the grab_window.     Both _K_e_y_P_r_e_s_s and _K_e_y_R_e_l_e_a_s_e events are
  55.        always reported, independent of any event selection made
  56.        by the client.
  57.  
  58.        If the keyboard_mode argument is _G_r_a_b_M_o_d_e_A_s_y_n_c, keyboard
  59.        event processing continues as usual.  If the keyboard is
  60.        currently frozen by this client, then processing of
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XGrabKeyboard(3X11)      XLIB FUNCTIONS      XGrabKeyboard(3X11)
  71.  
  72.  
  73.        keyboard events is resumed.  If the keyboard_mode  argu-
  74.        ment is _G_r_a_b_M_o_d_e_S_y_n_c, the state of the keyboard (as seen
  75.        by client applications) appears to freeze, and the X
  76.        server generates no further keyboard events until the
  77.        grabbing client issues a releasing _X_A_l_l_o_w_E_v_e_n_t_s call or
  78.        until the keyboard grab is released.  Actual keyboard
  79.        changes are not lost while the keyboard is frozen; they
  80.        are simply queued in the server for later processing.
  81.  
  82.        If pointer_mode is _G_r_a_b_M_o_d_e_A_s_y_n_c, pointer event processing
  83.        is unaffected by activation of the grab.     If pointer_mode
  84.        is _G_r_a_b_M_o_d_e_S_y_n_c, the state of the pointer (as seen by
  85.        client applications) appears to freeze, and the X server
  86.        generates no further pointer events until the grabbing
  87.        client issues a releasing _X_A_l_l_o_w_E_v_e_n_t_s call or until the
  88.        keyboard grab is released.  Actual pointer changes are not
  89.        lost while the pointer is frozen; they are simply queued
  90.        in the server for later processing.
  91.  
  92.        If the keyboard is actively grabbed by some other client,
  93.        _X_G_r_a_b_K_e_y_b_o_a_r_d fails and returns _A_l_r_e_a_d_y_G_r_a_b_b_e_d.    If
  94.        grab_window is not viewable, it fails and returns
  95.        _G_r_a_b_N_o_t_V_i_e_w_a_b_l_e.     If the keyboard is frozen by an active
  96.        grab of another client, it fails and returns _G_r_a_b_F_r_o_z_e_n.
  97.        If the specified time is earlier than the last-keyboard-
  98.        grab time or later than the current X server time, it
  99.        fails and returns _G_r_a_b_I_n_v_a_l_i_d_T_i_m_e.  Otherwise, the last-
  100.        keyboard-grab time is set to the specified time (_C_u_r_r_e_n_t_-
  101.        _T_i_m_e is replaced by the current X server time).
  102.  
  103.        _X_G_r_a_b_K_e_y_b_o_a_r_d can generate _B_a_d_V_a_l_u_e and _B_a_d_W_i_n_d_o_w errors.
  104.  
  105.        The _X_U_n_g_r_a_b_K_e_y_b_o_a_r_d function releases the keyboard and any
  106.        queued events if this client has it actively grabbed from
  107.        either _X_G_r_a_b_K_e_y_b_o_a_r_d or _X_G_r_a_b_K_e_y.  _X_U_n_g_r_a_b_K_e_y_b_o_a_r_d does
  108.        not release the keyboard and any queued events if the
  109.        specified time is earlier than the last-keyboard-grab time
  110.        or is later than the current X server time.  It also gen-
  111.        erates _F_o_c_u_s_I_n and _F_o_c_u_s_O_u_t events.  The X server automat-
  112.        ically performs an _U_n_g_r_a_b_K_e_y_b_o_a_r_d request if the event
  113.        window for an active keyboard grab becomes not viewable.
  114.  
  115. DDIIAAGGNNOOSSTTIICCSS
  116.        _B_a_d_V_a_l_u_e     Some numeric value falls outside the range of
  117.          values accepted by the request.  Unless a spe-
  118.          cific range is specified for an argument, the
  119.          full range defined by the argument's type is
  120.          accepted.  Any argument defined as a set of
  121.          alternatives can generate this error.
  122.  
  123.        _B_a_d_W_i_n_d_o_w A value for a Window argument does not name a
  124.          defined Window.
  125.  
  126.  
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XGrabKeyboard(3X11)      XLIB FUNCTIONS      XGrabKeyboard(3X11)
  137.  
  138.  
  139. SSEEEE AALLSSOO
  140.        XAllowEvents(3X11), XGrabButton(3X11), XGrabKey(3X11),
  141.        XGrabPointer(3X11)
  142.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  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.