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

  1.  
  2.  
  3.  
  4. XSetInputFocus(3X11)      XLIB FUNCTIONS     XSetInputFocus(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XSetInputFocus, XGetInputFocus - control input focus
  9.  
  10. SSYYNNTTAAXX
  11.        XSetInputFocus(_d_i_s_p_l_a_y, _f_o_c_u_s, _r_e_v_e_r_t___t_o, _t_i_m_e)
  12.          Display *_d_i_s_p_l_a_y;
  13.          Window _f_o_c_u_s;
  14.          int _r_e_v_e_r_t___t_o;
  15.          Time _t_i_m_e;
  16.  
  17.        XGetInputFocus(_d_i_s_p_l_a_y, _f_o_c_u_s___r_e_t_u_r_n, _r_e_v_e_r_t___t_o___r_e_t_u_r_n)
  18.          Display *_d_i_s_p_l_a_y;
  19.          Window *_f_o_c_u_s___r_e_t_u_r_n;
  20.          int *_r_e_v_e_r_t___t_o___r_e_t_u_r_n;
  21.  
  22. AARRGGUUMMEENNTTSS
  23.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  24.  
  25.        _f_o_c_u_s     Specifies the window, _P_o_i_n_t_e_r_R_o_o_t, or _N_o_n_e.
  26.  
  27.        _f_o_c_u_s___r_e_t_u_r_n
  28.          Returns the focus window, _P_o_i_n_t_e_r_R_o_o_t, or _N_o_n_e.
  29.  
  30.        _r_e_v_e_r_t___t_o Specifies where the input focus reverts to if
  31.          the window becomes not viewable.  You can pass
  32.          _R_e_v_e_r_t_T_o_P_a_r_e_n_t, _R_e_v_e_r_t_T_o_P_o_i_n_t_e_r_R_o_o_t, or
  33.          _R_e_v_e_r_t_T_o_N_o_n_e.
  34.  
  35.        _r_e_v_e_r_t___t_o___r_e_t_u_r_n
  36.          Returns the current focus state (_R_e_v_e_r_t_T_o_P_a_r_e_n_t,
  37.          _R_e_v_e_r_t_T_o_P_o_i_n_t_e_r_R_o_o_t, or _R_e_v_e_r_t_T_o_N_o_n_e).
  38.  
  39.        _t_i_m_e     Specifies the time.  You can pass either a
  40.          timestamp or _C_u_r_r_e_n_t_T_i_m_e.
  41.  
  42. DDEESSCCRRIIPPTTIIOONN
  43.        The _X_S_e_t_I_n_p_u_t_F_o_c_u_s function changes the input focus and
  44.        the last-focus-change time.  It has no effect if the spec-
  45.        ified time is earlier than the current last-focus-change
  46.        time or is later than the current X server time.     Other-
  47.        wise, the last-focus-change time is set to the specified
  48.        time (_C_u_r_r_e_n_t_T_i_m_e is replaced by the current X server
  49.        time).  _X_S_e_t_I_n_p_u_t_F_o_c_u_s causes the X server to generate
  50.        _F_o_c_u_s_I_n and _F_o_c_u_s_O_u_t events.
  51.  
  52.        Depending on the focus argument, the following occurs:
  53.  
  54.        +o    If focus is _N_o_n_e, all keyboard events are discarded
  55.         until a new focus window is set, and the revert_to
  56.         argument is ignored.
  57.  
  58.        +o    If focus is a window, it becomes the keyboard's focus
  59.         window.  If a generated keyboard event would normally
  60.         be reported to this window or one of its inferiors,
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XSetInputFocus(3X11)      XLIB FUNCTIONS     XSetInputFocus(3X11)
  71.  
  72.  
  73.         the event is reported as usual.  Otherwise, the event
  74.         is reported relative to the focus window.
  75.  
  76.        +o    If focus is _P_o_i_n_t_e_r_R_o_o_t, the focus window is dynami-
  77.         cally taken to be the root window of whatever screen
  78.         the pointer is on at each keyboard event.  In this
  79.         case, the revert_to argument is ignored.
  80.  
  81.        The specified focus window must be viewable at the time
  82.        _X_S_e_t_I_n_p_u_t_F_o_c_u_s is called, or a _B_a_d_M_a_t_c_h error results.  If
  83.        the focus window later becomes not viewable, the X server
  84.        evaluates the revert_to argument to determine the new
  85.        focus window as follows:
  86.  
  87.        +o    If revert_to is _R_e_v_e_r_t_T_o_P_a_r_e_n_t, the focus reverts to
  88.         the parent (or the closest viewable ancestor), and
  89.         the new revert_to value is taken to be _R_e_v_e_r_t_T_o_N_o_n_e.
  90.  
  91.        +o    If revert_to is _R_e_v_e_r_t_T_o_P_o_i_n_t_e_r_R_o_o_t or _R_e_v_e_r_t_T_o_N_o_n_e,
  92.         the focus reverts to _P_o_i_n_t_e_r_R_o_o_t or _N_o_n_e, respec-
  93.         tively.  When the focus reverts, the X server gener-
  94.         ates _F_o_c_u_s_I_n and _F_o_c_u_s_O_u_t events, but the last-focus-
  95.         change time is not affected.
  96.  
  97.        _X_S_e_t_I_n_p_u_t_F_o_c_u_s can generate _B_a_d_M_a_t_c_h, _B_a_d_V_a_l_u_e, and _B_a_d_-
  98.        _W_i_n_d_o_w errors.
  99.  
  100.        The _X_G_e_t_I_n_p_u_t_F_o_c_u_s function returns the focus window and
  101.        the current focus state.
  102.  
  103. DDIIAAGGNNOOSSTTIICCSS
  104.        _B_a_d_V_a_l_u_e     Some numeric value falls outside the range of
  105.          values accepted by the request.  Unless a spe-
  106.          cific range is specified for an argument, the
  107.          full range defined by the argument's type is
  108.          accepted.  Any argument defined as a set of
  109.          alternatives can generate this error.
  110.  
  111.        _B_a_d_W_i_n_d_o_w A value for a Window argument does not name a
  112.          defined Window.
  113.  
  114. SSEEEE AALLSSOO
  115.        XWarpPointer(3X11)
  116.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.