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

  1.  
  2.  
  3.  
  4. XSetDeviceFocus(3X11)       X FUNCTIONS        XSetDeviceFocus(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XSetDeviceFocus, XGetDeviceFocus - control extension input
  9.        device focus
  10.  
  11. SSYYNNTTAAXX
  12.        XSetDeviceFocus(_d_i_s_p_l_a_y, _d_e_v_i_c_e, _f_o_c_u_s, _r_e_v_e_r_t___t_o, _t_i_m_e)
  13.          Display *_d_i_s_p_l_a_y;
  14.          Display *_d_e_v_i_c_e;
  15.          Window _f_o_c_u_s;
  16.          int _r_e_v_e_r_t___t_o;
  17.          Time _t_i_m_e;
  18.  
  19.        XGetDeviceFocus(_d_i_s_p_l_a_y,          _d_e_v_i_c_e,        _f_o_c_u_s___r_e_t_u_r_n,
  20.        _r_e_v_e_r_t___t_o___r_e_t_u_r_n, _t_i_m_e___r_e_t_u_r_n)
  21.          Display *_d_i_s_p_l_a_y;
  22.          Display *_d_e_v_i_c_e;
  23.          Window *_f_o_c_u_s___r_e_t_u_r_n;
  24.          int *_r_e_v_e_r_t___t_o___r_e_t_u_r_n;
  25.          int *_t_i_m_e___r_e_t_u_r_n;
  26.  
  27. AARRGGUUMMEENNTTSS
  28.        _d_i_s_p_l_a_y       Specifies the connection to the X server.
  29.  
  30.        _d_e_v_i_c_e       Specifies  the  device  whose  focus     is to be
  31.            queried or changed.
  32.  
  33.        _f_o_c_u_s       Specifies the window, _P_o_i_n_t_e_r_R_o_o_t,  _F_o_l_l_o_w_K_e_y_-
  34.            _b_o_a_r_d, or _N_o_n_e.
  35.  
  36.        _f_o_c_u_s___r_e_t_u_r_n
  37.            Returns  the     focus    window, _P_o_i_n_t_e_r_R_o_o_t, _F_o_l_-
  38.            _l_o_w_K_e_y_b_o_a_r_d, or _N_o_n_e.
  39.  
  40.        _r_e_v_e_r_t___t_o   Specifies where the input focus reverts to  if
  41.            the window becomes not viewable.  You can pass
  42.            _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, _R_e_v_e_r_t_T_o_-
  43.            _F_o_l_l_o_w_K_e_y_b_o_a_r_d, or _R_e_v_e_r_t_T_o_N_o_n_e.
  44.  
  45.        _r_e_v_e_r_t___t_o___r_e_t_u_r_n
  46.            Returns  the     current focus state _R_e_v_e_r_t_T_o_P_a_r_-
  47.            _e_n_t,     _R_e_v_e_r_t_T_o_P_o_i_n_t_e_r_R_o_o_t,  _R_e_v_e_r_t_T_o_F_o_l_l_o_w_K_e_y_-
  48.            _b_o_a_r_d, or _R_e_v_e_r_t_T_o_N_o_n_e.
  49.  
  50.        _t_i_m_e___r_e_t_u_r_n Returns the last_focus_time for the device.
  51.  
  52.        _t_i_m_e       Specifies  the  time.   You    can pass either a
  53.            timestamp or _C_u_r_r_e_n_t_T_i_m_e.
  54.  
  55. DDEESSCCRRIIPPTTIIOONN
  56.        The _X_S_e_t_D_e_v_i_c_e_F_o_c_u_s request changes the focus of the spec-
  57.        ified  device  and  its last-focus-change time.    It has no
  58.        effect if the specified time is earlier than  the  current
  59.        last-focus-change  time    or  is    later  than the current X
  60.        server time.  Otherwise, the last-focus-change time is set
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XSetDeviceFocus(3X11)       X FUNCTIONS        XSetDeviceFocus(3X11)
  71.  
  72.  
  73.        to  the specified time _C_u_r_r_e_n_t_T_i_m_e is replaced by the cur-
  74.        rent X server time).  _X_S_e_t_D_e_v_i_c_e_F_o_c_u_s causes the X  server
  75.        to generate _D_e_v_i_c_e_F_o_c_u_s_I_n and _D_e_v_i_c_e_F_o_c_u_s_O_u_t events.
  76.  
  77.        Depending on the focus argument, the following occurs:
  78.  
  79.        +o    If    focus  is  _N_o_n_e , all device events are discarded
  80.         until a new focus window is set,  and  the    revert_to
  81.         argument is ignored.
  82.  
  83.        +o    If    focus  is a window, it becomes the device's focus
  84.         window.  If a generated device event  would     normally
  85.         be    reported  to this window or one of its inferiors,
  86.         the event is reported as usual.  Otherwise, the event
  87.         is reported relative to the focus window.
  88.  
  89.        +o    If    focus is _P_o_i_n_t_e_r_R_o_o_t, the focus window is dynami-
  90.         cally taken to be the root window of whatever  screen
  91.         the     pointer  is  on at each event from the specified
  92.         device.  In this  case,  the  revert_to  argument  is
  93.         ignored.
  94.  
  95.        +o    If    focus  is  _F_o_l_l_o_w_K_e_y_b_o_a_r_d,  the     focus    window is
  96.         dynamically taken to be the window    to  which  the    X
  97.         keyboard focus is set at each input event.
  98.  
  99.        The  specified  focus  window must be viewable at the time
  100.        _X_S_e_t_D_e_v_i_c_e_F_o_c_u_s is called, or a    _B_a_d_M_a_t_c_h  error     results.
  101.        If  the    focus  window  later  becomes not viewable, the X
  102.        server evaluates the revert_to argument to  determine  the
  103.        new focus window as follows:
  104.  
  105.        +o    If    revert_to is _R_e_v_e_r_t_T_o_P_a_r_e_n_t, the focus reverts to
  106.         the parent (or the closest    viewable  ancestor),  and
  107.         the     new revert_to value is taken to be _R_e_v_e_r_t_T_o_N_o_n_e.
  108.  
  109.        +o    If    revert_to  is  _R_e_v_e_r_t_T_o_P_o_i_n_t_e_r_R_o_o_t,  _R_e_v_e_r_t_T_o_F_o_l_-
  110.         _l_o_w_K_e_y_b_o_a_r_d,  or  _R_e_v_e_r_t_T_o_N_o_n_e,  the focus reverts to
  111.         _P_o_i_n_t_e_r_R_o_o_t, _F_o_l_l_o_w_K_e_y_b_o_a_r_d, or _N_o_n_e, respectively.
  112.  
  113.        When the focus reverts, the X server  generates    _D_e_v_i_c_e_F_o_-
  114.        _c_u_s_I_n and _D_e_v_i_c_e_F_o_c_u_s_O_u_t events, but the last-focus-change
  115.        time is not affected.
  116.  
  117.        Input extension devices are not required     to  support  the
  118.        ability    to  be focused.     Attempting to set the focus of a
  119.        device that does not support this request will result in a
  120.        _B_a_d_M_a_t_c_h     error.      Whether or not given device can support
  121.        this request can be determined by the information returned
  122.        by  _X_O_p_e_n_D_e_v_i_c_e.      For  those  devices that support focus,
  123.        _X_O_p_e_n_D_e_v_i_c_e will return an _X_I_n_p_u_t_C_l_a_s_s_I_n_f_o structure  with
  124.        the  input_class     field    equal  to the constant _F_o_c_u_s_C_l_a_s_s
  125.        (defined in the file _X_I_._h).
  126.  
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XSetDeviceFocus(3X11)       X FUNCTIONS        XSetDeviceFocus(3X11)
  137.  
  138.  
  139.        _X_S_e_t_D_e_v_i_c_e_F_o_c_u_s can  generate  _B_a_d_D_e_v_i_c_e,  _B_a_d_M_a_t_c_h,  _B_a_d_-
  140.        _V_a_l_u_e, and _B_a_d_W_i_n_d_o_w errors.
  141.  
  142.        The  _X_G_e_t_D_e_v_i_c_e_F_o_c_u_s  request returns the focus window and
  143.        the current focus state.
  144.  
  145.        Not all input extension devices can be focused.     Attempt-
  146.        ing  to    query  the  focus state of a device that can't be
  147.        focused results in a _B_a_d_M_a_t_c_h error.  A device that can be
  148.        focused    returns information for input Class Focus when an
  149.        _X_O_p_e_n_D_e_v_i_c_e request is made.
  150.  
  151.        _X_G_e_t_D_e_v_i_c_e_F_o_c_u_s    can  generate  _B_a_d_D_e_v_i_c_e,  and     _B_a_d_M_a_t_c_h
  152.        errors.
  153.  
  154. DDIIAAGGNNOOSSTTIICCSS
  155.        _B_a_d_D_e_v_i_c_e   An  invalid    device was specified.  The speci-
  156.            fied device does not exist  or  has    not  been
  157.            opened  by  this  client via _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e.
  158.            This error may also    occur  if  the    specified
  159.            device  is the X keyboard or X pointer device.
  160.  
  161.        _B_a_d_V_a_l_u_e       Some numeric value falls outside the range  of
  162.            values accepted by the request.  Unless a spe-
  163.            cific range is specified for an argument,  the
  164.            full     range    defined by the argument's type is
  165.            accepted.  Any argument defined as  a  set  of
  166.            alternatives can generate this error.
  167.  
  168.        _B_a_d_W_i_n_d_o_w   A  value for a Window argument does not name a
  169.            defined Window.
  170.  
  171.        _B_a_d_M_a_t_c_h       This error may occur if an _X_G_e_t_D_e_v_i_c_e_F_o_c_u_s  or
  172.            _X_S_e_t_D_e_v_i_c_e_F_o_c_u_s  request was made specifying a
  173.            device that the server implementation does not
  174.            allow to be focused.
  175.  
  176. SSEEEE AALLSSOO
  177.        _P_r_o_g_r_a_m_m_i_n_g _w_i_t_h _X_l_i_b
  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.