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

  1.  
  2.  
  3.  
  4. XFlush(3X11)          XLIB FUNCTIONS         XFlush(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XFlush, XSync, XEventsQueued, XPending - handle output
  9.        buffer or event queue
  10.  
  11. SSYYNNTTAAXX
  12.        XFlush(_d_i_s_p_l_a_y)
  13.          Display *_d_i_s_p_l_a_y;
  14.  
  15.        XSync(_d_i_s_p_l_a_y, _d_i_s_c_a_r_d)
  16.          Display *_d_i_s_p_l_a_y;
  17.          Bool _d_i_s_c_a_r_d;
  18.  
  19.        int XEventsQueued(_d_i_s_p_l_a_y, _m_o_d_e)
  20.         Display *_d_i_s_p_l_a_y;
  21.         int _m_o_d_e;
  22.  
  23.        int XPending(_d_i_s_p_l_a_y)
  24.          Display *_d_i_s_p_l_a_y;
  25.  
  26. AARRGGUUMMEENNTTSS
  27.        _d_i_s_c_a_r_d     Specifies a Boolean value that indicates whether
  28.          _X_S_y_n_c discards all events on the event queue.
  29.  
  30.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  31.  
  32.        _m_o_d_e     Specifies the mode.  You can pass _Q_u_e_u_e_d_A_l_r_e_a_d_y,
  33.          _Q_u_e_u_e_d_A_f_t_e_r_F_l_u_s_h, or _Q_u_e_u_e_d_A_f_t_e_r_R_e_a_d_i_n_g.
  34.  
  35. DDEESSCCRRIIPPTTIIOONN
  36.        The _X_F_l_u_s_h function flushes the output buffer.  Most
  37.        client applications need not use this function because the
  38.        output buffer is automatically flushed as needed by calls
  39.        to _X_P_e_n_d_i_n_g, _X_N_e_x_t_E_v_e_n_t, and _X_W_i_n_d_o_w_E_v_e_n_t.  Events gener-
  40.        ated by the server may be enqueued into the library's
  41.        event queue.
  42.  
  43.        The _X_S_y_n_c function flushes the output buffer and then
  44.        waits until all requests have been received and processed
  45.        by the X server.     Any errors generated must be handled by
  46.        the error handler.  For each protocol error received by
  47.        Xlib, _X_S_y_n_c calls the client application's error handling
  48.        routine (see section 11.8.2).  Any events generated by the
  49.        server are enqueued into the library's event queue.
  50.  
  51.        Finally, if you passed _F_a_l_s_e, _X_S_y_n_c does not discard the
  52.        events in the queue.  If you passed _T_r_u_e, _X_S_y_n_c discards
  53.        all events in the queue, including those events that were
  54.        on the queue before _X_S_y_n_c was called.  Client applications
  55.        seldom need to call _X_S_y_n_c.
  56.  
  57.        If mode is _Q_u_e_u_e_d_A_l_r_e_a_d_y, _X_E_v_e_n_t_s_Q_u_e_u_e_d returns the number
  58.        of events already in the event queue (and never performs a
  59.        system call).  If mode is _Q_u_e_u_e_d_A_f_t_e_r_F_l_u_s_h, _X_E_v_e_n_t_s_Q_u_e_u_e_d
  60.        returns the number of events already in the queue if the
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XFlush(3X11)          XLIB FUNCTIONS         XFlush(3X11)
  71.  
  72.  
  73.        number is nonzero.  If there are no events in the queue,
  74.        _X_E_v_e_n_t_s_Q_u_e_u_e_d flushes the output buffer, attempts to read
  75.        more events out of the application's connection, and
  76.        returns the number read.     If mode is _Q_u_e_u_e_d_A_f_t_e_r_R_e_a_d_i_n_g,
  77.        _X_E_v_e_n_t_s_Q_u_e_u_e_d returns the number of events already in the
  78.        queue if the number is nonzero.    If there are no events in
  79.        the queue, _X_E_v_e_n_t_s_Q_u_e_u_e_d attempts to read more events out
  80.        of the application's connection without flushing the out-
  81.        put buffer and returns the number read.
  82.  
  83.        _X_E_v_e_n_t_s_Q_u_e_u_e_d always returns immediately without I/O if
  84.        there are events already in the queue.  _X_E_v_e_n_t_s_Q_u_e_u_e_d with
  85.        mode _Q_u_e_u_e_d_A_f_t_e_r_F_l_u_s_h is identical in behavior to
  86.        _X_P_e_n_d_i_n_g.  _X_E_v_e_n_t_s_Q_u_e_u_e_d with mode _Q_u_e_u_e_d_A_l_r_e_a_d_y is iden-
  87.        tical to the _X_Q_L_e_n_g_t_h function.
  88.  
  89.        The _X_P_e_n_d_i_n_g function returns the number of events that
  90.        have been received from the X server but have not been
  91.        removed from the event queue.  _X_P_e_n_d_i_n_g is identical to
  92.        _X_E_v_e_n_t_s_Q_u_e_u_e_d with the mode _Q_u_e_u_e_d_A_f_t_e_r_F_l_u_s_h specified.
  93.  
  94. SSEEEE AALLSSOO
  95.        AllPlanes(3X11), XIfEvent(3X11), XNextEvent(3X11), XPut-
  96.        BackEvent(3X11)
  97.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.