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

  1.  
  2.  
  3.  
  4. XSendEvent(3X11)      XLIB FUNCTIONS     XSendEvent(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XSendEvent, XDisplayMotionBufferSize, XGetMotionEvents,
  9.        XTimeCoord - send events and pointer motion history struc-
  10.        ture
  11.  
  12. SSYYNNTTAAXX
  13.        Status XSendEvent(_d_i_s_p_l_a_y, _w, _p_r_o_p_a_g_a_t_e, _e_v_e_n_t___m_a_s_k,
  14.        _e_v_e_n_t___s_e_n_d)
  15.          Display *_d_i_s_p_l_a_y;
  16.          Window _w;
  17.          Bool _p_r_o_p_a_g_a_t_e;
  18.          long _e_v_e_n_t___m_a_s_k;
  19.          XEvent *_e_v_e_n_t___s_e_n_d;
  20.  
  21.        unsigned long XDisplayMotionBufferSize(_d_i_s_p_l_a_y)
  22.            Display *_d_i_s_p_l_a_y;
  23.  
  24.        XTimeCoord *XGetMotionEvents(_d_i_s_p_l_a_y, _w, _s_t_a_r_t, _s_t_o_p,
  25.        _n_e_v_e_n_t_s___r_e_t_u_r_n)
  26.          Display *_d_i_s_p_l_a_y;
  27.          Window _w;
  28.          Time _s_t_a_r_t, _s_t_o_p;
  29.          int *_n_e_v_e_n_t_s___r_e_t_u_r_n;
  30.  
  31. AARRGGUUMMEENNTTSS
  32.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  33.  
  34.        _e_v_e_n_t___m_a_s_k
  35.          Specifies the event mask.
  36.  
  37.        _e_v_e_n_t___s_e_n_d
  38.          Specifies the event that is to be sent.
  39.  
  40.        _n_e_v_e_n_t_s___r_e_t_u_r_n
  41.          Returns the number of events from the motion
  42.          history buffer.
  43.  
  44.        _p_r_o_p_a_g_a_t_e Specifies a Boolean value.
  45.  
  46.        _s_t_a_r_t
  47.        _s_t_o_p     Specify the time interval in which the events
  48.          are returned from the motion history buffer.
  49.          You can pass a timestamp or _C_u_r_r_e_n_t_T_i_m_e.
  50.          _P_o_i_n_t_e_r_W_i_n_d_o_w,
  51.  
  52.        _w     Specifies the window the window the event is to
  53.          be sent to,.
  54.  
  55. DDEESSCCRRIIPPTTIIOONN
  56.        The _X_S_e_n_d_E_v_e_n_t function identifies the destination window,
  57.        determines which clients should receive the specified
  58.        events, and ignores any active grabs.  This function
  59.        requires you to pass an event mask.  For a discussion of
  60.        the valid event mask names, see section 10.3.  This
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XSendEvent(3X11)      XLIB FUNCTIONS     XSendEvent(3X11)
  71.  
  72.  
  73.        function uses the w argument to identify the destination
  74.        window as follows:
  75.  
  76.        +o    If w is _P_o_i_n_t_e_r_W_i_n_d_o_w, the destination window is the
  77.         window that contains the pointer.
  78.  
  79.        +o    If w is _I_n_p_u_t_F_o_c_u_s and if the focus window contains
  80.         the pointer, the destination window is the window
  81.         that contains the pointer; otherwise, the destination
  82.         window is the focus window.
  83.  
  84.        To determine which clients should receive the specified
  85.        events, _X_S_e_n_d_E_v_e_n_t uses the propagate argument as follows:
  86.  
  87.        +o    If event_mask is the empty set, the event is sent to
  88.         the client that created the destination window.  If
  89.         that client no longer exists, no event is sent.
  90.  
  91.        +o    If propagate is _F_a_l_s_e, the event is sent to every
  92.         client selecting on destination any of the event
  93.         types in the event_mask argument.
  94.  
  95.        +o    If propagate is _T_r_u_e and no clients have selected on
  96.         destination any of the event types in event-mask, the
  97.         destination is replaced with the closest ancestor of
  98.         destination for which some client has selected a type
  99.         in event-mask and for which no intervening window has
  100.         that type in its do-not-propagate-mask.  If no such
  101.         window exists or if the window is an ancestor of the
  102.         focus window and _I_n_p_u_t_F_o_c_u_s was originally specified
  103.         as the destination, the event is not sent to any
  104.         clients.  Otherwise, the event is reported to every
  105.         client selecting on the final destination any of the
  106.         types specified in event_mask.
  107.  
  108.        The event in the _X_E_v_e_n_t structure must be one of the core
  109.        events or one of the events defined by an extension (or a
  110.        _B_a_d_V_a_l_u_e error results) so that the X server can correctly
  111.        byte-swap the contents as necessary.  The contents of the
  112.        event are otherwise unaltered and unchecked by the X
  113.        server except to force send_event to _T_r_u_e in the forwarded
  114.        event and to set the serial number in the event correctly;
  115.        therefore these fields and the display field are ignored
  116.        by _X_S_e_n_d_E_v_e_n_t.
  117.  
  118.        _X_S_e_n_d_E_v_e_n_t returns zero if the conversion to wire protocol
  119.        format failed and returns nonzero otherwise.  _X_S_e_n_d_E_v_e_n_t
  120.        can generate _B_a_d_V_a_l_u_e and _B_a_d_W_i_n_d_o_w errors.
  121.  
  122.        The server may retain the recent history of the pointer
  123.        motion and do so to a finer granularity than is reported
  124.        by _M_o_t_i_o_n_N_o_t_i_f_y events.    The _X_G_e_t_M_o_t_i_o_n_E_v_e_n_t_s function
  125.        makes this history available.
  126.  
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XSendEvent(3X11)      XLIB FUNCTIONS     XSendEvent(3X11)
  137.  
  138.  
  139.        The _X_G_e_t_M_o_t_i_o_n_E_v_e_n_t_s function returns all events in the
  140.        motion history buffer that fall between the specified
  141.        start and stop times, inclusive, and that have coordinates
  142.        that lie within the specified window (including its bor-
  143.        ders) at its present placement.    If the server does not
  144.        support motion history, if the start time is later than
  145.        the stop time, or if the start time is in the future, no
  146.        events are returned; _X_G_e_t_M_o_t_i_o_n_E_v_e_n_t_s returns NULL.  If
  147.        the stop time is in the future, it is equivalent to speci-
  148.        fying _C_u_r_r_e_n_t_T_i_m_e.  _X_G_e_t_M_o_t_i_o_n_E_v_e_n_t_s can generate a _B_a_d_-
  149.        _W_i_n_d_o_w error.
  150.  
  151. SSTTRRUUCCTTUURREESS
  152.        The _X_T_i_m_e_C_o_o_r_d structure contains:
  153.  
  154.        typedef struct {
  155.         Time time;
  156.         short x, y;
  157.        } XTimeCoord;
  158.  
  159.        The time member is set to the time, in milliseconds.  The
  160.        x and y members are set to the coordinates of the pointer
  161.        and are reported relative to the origin of the specified
  162.        window.
  163.  
  164. DDIIAAGGNNOOSSTTIICCSS
  165.        _B_a_d_V_a_l_u_e     Some numeric value falls outside the range of
  166.          values accepted by the request.  Unless a spe-
  167.          cific range is specified for an argument, the
  168.          full range defined by the argument's type is
  169.          accepted.  Any argument defined as a set of
  170.          alternatives can generate this error.
  171.  
  172.        _B_a_d_W_i_n_d_o_w A value for a Window argument does not name a
  173.          defined Window.
  174.  
  175. SSEEEE AALLSSOO
  176.        XAnyEvent(3X11), XIfEvent(3X11), XNextEvent(3X11), XPut-
  177.        BackEvent(3X11)
  178.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  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.