


XMBUF(3X11)							  XMBUF(3X11)
X11R5									X11R5



NAME
  XmbufQueryExtension, XmbufGetVersion,	XmbufCreateBuffers, XmbufDestroy-
  Buffers, XmbufDisplayBuffers,	XmbufGetWindowAttributes, XmbufChangeWin-
  dowAttributes, XmbufGetBufferAttributes, XmbufChangeBufferAttributes,
  XmbufGetScreenInfo, XmbufCreateStereoWindow -	X multibuffering functions

SYNTAX

  #include <X11/extensions/multibuf.h>

  Bool XmbufQueryExtension(
      Display *dpy,
      Display *dpy,
      int *event_base_return,
      int *error_base_return);

  Status XmbufGetVersion(
      Display *dpy,
      int *major_version_return,
      int *minor_version_return);

  int XmbufCreateBuffers(
      Display *dpy,
      Window window,
      int count,
      int update_action,
      int update_hint,
      Multibuffer *buffers_update);

  void XmbufDestroyBuffers(
      Display *dpy,
      Window window);

  void XmbufDisplayBuffers(
      Display *dpy,
      int count,
      Multibuffer *buffers,
      int min_delay,
      int max_delay);

  Status XmbufGetWindowAttributes(
      Display *dpy,
      Window window,
      XmbufWindowAttributes *attributes);

  void XmbufChangeWindowAttributes(
      Display *dpy,
      Window window,
      unsigned long valuemask,
      XmbufSetWindowAttributes *attributes);


  Status XmbufGetBufferAttributes(
      Display *dpy,
      Multibuffer buffer,
      XmbufBufferAttributes *attributes);


  void XmbufChangeBufferAttributes(
      Display *dpy,
      Multibuffer buffer,
      unsigned long valuemask,
      XmbufSetBufferAttributes *attributes);

  Status XmbufGetScreenInfo(
      Display *dpy,
      Drawable drawable,
      int *nmono_return,
      XmbufBufferInfo **mono_info_return,
      int *nstereo_return,
      XmbufBufferInfo **stereo_info_return);

  Window XmbufCreateStereoWindow(
      Display *dpy,
      Window parent,
      int x,
      int y,
      unsigned int width,
      unsigned int height,
      unsigned int border_width,
      int depth,
      unsigned int class,		  /* InputOutput, InputOnly*/
      Visual *visual,
      unsigned long valuemask,
      XSetWindowAttributes *attributes,
      Multibuffer *left_return,
      Multibuffer *right_return);

STRUCTURES
  _E_v_e_n_t_s:
  typedef struct {
      int type;	  /* of	event */
      unsigned long serial;	  /* # of last request processed by server */
      int send_event;	  /* true if this came from a SendEvent	request	*/
      Display *display;	  /* Display the event was read	from */
      Multibuffer buffer; /* buffer of event */
      int state;  /* see Clobbered constants above */
  } XmbufClobberNotifyEvent;

  typedef struct {
      int type;	  /* of	event */
      unsigned long serial;	  /* # of last request processed by server */
      int send_event;	  /* true if this came from a SendEvent	request	*/
      Display *display;	  /* Display the event was read	from */
      Multibuffer buffer; /* buffer of event */
  } XmbufUpdateNotifyEvent;

  _P_e_r-_w_i_n_d_o_w _a_t_t_r_i_b_u_t_e_s	_t_h_a_t _c_a_n _b_e _g_o_t:
  typedef struct {
      int displayed_index;	  /* which buffer is being displayed */
      int update_action;  /* Undefined,	Background, Untouched, Copied */
      int update_hint;	  /* Frequent, Intermittent, Static */
      int window_mode;	  /* Mono, Stereo */
      int nbuffers;	  /* Number of buffers */
      Multibuffer *buffers;	  /* Buffers */
  } XmbufWindowAttributes;


  _P_e_r-_w_i_n_d_o_w _a_t_t_r_i_b_u_t_e_s	_t_h_a_t _c_a_n _b_e _s_e_t:
  typedef struct {
      int update_hint;	  /* Frequent, Intermittent, Static */
  } XmbufSetWindowAttributes;


  _P_e_r-_b_u_f_f_e_r _a_t_t_r_i_b_u_t_e_s	_t_h_a_t _c_a_n _b_e _g_o_t:
  typedef struct {
      Window window;	  /* which window this belongs to */
      unsigned long event_mask;	  /* events that have been selected */
      int buffer_index;	  /* which buffer is this */
      int side;	  /* Mono, Left, Right */
  } XmbufBufferAttributes;

  _P_e_r-_b_u_f_f_e_r _a_t_t_r_i_b_u_t_e_s	_t_h_a_t _c_a_n _b_e _s_e_t:
  typedef struct {
      unsigned long event_mask;	  /* events that have been selected */
  } XmbufSetBufferAttributes;

  _P_e_r-_s_c_r_e_e_n _b_u_f_f_e_r _i_n_f_o (_t_h_e_r_e	_w_i_l_l _b_e	_l_i_s_t_s _o_f _t_h_e_m):
  typedef struct {
      VisualID visualid;  /* visual usable at this depth */
      int max_buffers;	  /* most buffers for this visual */
      int depth;  /* depth of buffers to be created */
  } XmbufBufferInfo;

DESCRIPTION
  The application programming library for the _X_1_1 _D_o_u_b_l_e-_B_u_f_f_e_r_i_n_g, _M_u_l_t_i-
  _B_u_f_f_e_r_i_n_g, _a_n_d _S_t_e_r_e_o	_E_x_t_e_n_s_i_o_n contains the interfaces described below.
  With the exception of	_X_m_b_u_f_Q_u_e_r_y_E_x_t_e_n_s_i_o_n, if	any of these routines are
  called with a	display	that does not support the extension, the ExtensionEr-
  rorHandler (which can	be set with _X_S_e_t_E_x_t_e_n_s_i_o_n_E_r_r_o_r_H_a_n_d_l_e_r and functions
  the same way as _X_S_e_t_E_r_r_o_r_H_a_n_d_l_e_r) will be called and the function will then
  return.

  _X_m_b_u_f_Q_u_e_r_y_E_x_t_e_n_s_i_o_n returns _T_r_u_e if the multibuffering/stereo	extension is
  available on the given display.  If the extension exists, the	value of the
  first	event code (which should be added to the event type constants _M_u_l_t_i_-
  _b_u_f_f_e_r_C_l_o_b_b_e_r_N_o_t_i_f_y and _M_u_l_t_i_b_u_f_f_e_r_U_p_d_a_t_e_N_o_t_i_f_y to get the actual values)
  is stored into event_base_return and the value of the	first error code
  (which should	be added to the	error type constant _M_u_l_t_i_b_u_f_f_e_r_B_a_d_B_u_f_f_e_r to
  get the actual value)	is stored into error_base_return.

  _X_m_b_u_f_G_e_t_V_e_r_s_i_o_n gets the major and minor version numbers of the extension.
  The return value is zero if an error occurs or non-zero if no	error hap-
  pens.

  _X_m_b_u_f_C_r_e_a_t_e_B_u_f_f_e_r_s requests that "count" buffers be created with the given
  update_action	and update_hint	and be associated with the indicated window.
  The number of	buffers	created	is returned (zero if an	error occurred)	and
  buffers_update is filled in with that	many Multibuffer identifiers.

  _X_m_b_u_f_D_e_s_t_r_o_y_B_u_f_f_e_r_s destroys the buffers associated with the given window.

  _X_m_b_u_f_D_i_s_p_l_a_y_B_u_f_f_e_r_s displays the indicated buffers their appropriate win-
  dows within max_delay	milliseconds after min_delay milliseconds have
  passed.  No two buffers may be associated with the same window or else a
  Matc error is	generated.

  _X_m_b_u_f_G_e_t_W_i_n_d_o_w_A_t_t_r_i_b_u_t_e_s gets	the multibuffering attributes that apply to
  all buffers associated with the given	window.	 The list of buffers returns
  may be freed with _X_F_r_e_e.  Returns non-zero on	success	and zero if an error
  occurs.

  _X_m_b_u_f_C_h_a_n_g_e_W_i_n_d_o_w_A_t_t_r_i_b_u_t_e_s sets the multibuffering attributes that apply
  to all buffers associated with the given window.  This is currently limited
  to the update_hint.

  _X_m_b_u_f_G_e_t_B_u_f_f_e_r_A_t_t_r_i_b_u_t_e_s gets	the attributes for the indicated buffer.
  Returns non-zero on success and zero if an error occurs.


  _X_m_b_u_f_C_h_a_n_g_e_B_u_f_f_e_r_A_t_t_r_i_b_u_t_e_s sets the attributes for the indicated buffer.
  This is currently limited to the event_mask.

  _X_m_b_u_f_G_e_t_S_c_r_e_e_n_I_n_f_o gets the parameters controlling how mono and stereo win-
  dows may be created on the screen of the given drawable.  The	numbers	of
  sets of visual and depths are	returned in nmono_return and nstereo_return.
  If nmono_return is greater than zero,	then mono_info_return is set to	the
  address of an	array of _X_m_b_u_f_B_u_f_f_e_r_I_n_f_o structures describing the various
  visuals and depths that may be used.	Otherwise, mono_info_return is set to
  NULL.	 Similarly, stereo_info_return is set according	to nstereo_return.
  The storage returned in mono_info_return and stereo_info_return may be
  released by _X_F_r_e_e.  If no errors are encounted, non-zero will	be returned.

  _X_m_b_u_f_C_r_e_a_t_e_S_t_e_r_e_o_W_i_n_d_o_w creates a stereo window in the same way that
  _X_C_r_e_a_t_e_W_i_n_d_o_w	creates	a mono window.	The buffer ids for the left and	right
  buffers are returned in left_return and right_return,	respectively.  If an
  extension error handler that returns is installed, _N_o_n_e will be returned if
  the extension	is not available on this display.

PREDEFINED VALUES

  Update_action	field:
       _M_u_l_t_i_b_u_f_f_e_r_U_p_d_a_t_e_A_c_t_i_o_n_U_n_d_e_f_i_n_e_d
       _M_u_l_t_i_b_u_f_f_e_r_U_p_d_a_t_e_A_c_t_i_o_n_B_a_c_k_g_r_o_u_n_d
       _M_u_l_t_i_b_u_f_f_e_r_U_p_d_a_t_e_A_c_t_i_o_n_U_n_t_o_u_c_h_e_d
       _M_u_l_t_i_b_u_f_f_e_r_U_p_d_a_t_e_A_c_t_i_o_n_C_o_p_i_e_d

  Update_hint field:
       _M_u_l_t_i_b_u_f_f_e_r_U_p_d_a_t_e_H_i_n_t_F_r_e_q_u_e_n_t
       _M_u_l_t_i_b_u_f_f_e_r_U_p_d_a_t_e_H_i_n_t_I_n_t_e_r_m_i_t_t_e_n_t
       _M_u_l_t_i_b_u_f_f_e_r_U_p_d_a_t_e_H_i_n_t_S_t_a_t_i_c

  Valuemask fields:
       _M_u_l_t_i_b_u_f_f_e_r_W_i_n_d_o_w_U_p_d_a_t_e_H_i_n_t
       _M_u_l_t_i_b_u_f_f_e_r_B_u_f_f_e_r_E_v_e_n_t_M_a_s_k

  Mono vs. stereo and left vs. right:
       _M_u_l_t_i_b_u_f_f_e_r_M_o_d_e_M_o_n_o
       _M_u_l_t_i_b_u_f_f_e_r_M_o_d_e_S_t_e_r_e_o
       _M_u_l_t_i_b_u_f_f_e_r_S_i_d_e_M_o_n_o
       _M_u_l_t_i_b_u_f_f_e_r_S_i_d_e_L_e_f_t
       _M_u_l_t_i_b_u_f_f_e_r_S_i_d_e_R_i_g_h_t

  Clobber state:
       _M_u_l_t_i_b_u_f_f_e_r_U_n_c_l_o_b_b_e_r_e_d
       _M_u_l_t_i_b_u_f_f_e_r_P_a_r_t_i_a_l_l_y_C_l_o_b_b_e_r_e_d
       _M_u_l_t_i_b_u_f_f_e_r_F_u_l_l_y_C_l_o_b_b_e_r_e_d

  Event	stuff:
       _M_u_l_t_i_b_u_f_f_e_r_C_l_o_b_b_e_r_N_o_t_i_f_y_M_a_s_k
       _M_u_l_t_i_b_u_f_f_e_r_U_p_d_a_t_e_N_o_t_i_f_y_M_a_s_k
       _M_u_l_t_i_b_u_f_f_e_r_C_l_o_b_b_e_r_N_o_t_i_f_y
       _M_u_l_t_i_b_u_f_f_e_r_U_p_d_a_t_e_N_o_t_i_f_y
       _M_u_l_t_i_b_u_f_f_e_r_N_u_m_b_e_r_E_v_e_n_t_s
       _M_u_l_t_i_b_u_f_f_e_r_B_a_d_B_u_f_f_e_r
       _M_u_l_t_i_b_u_f_f_e_r_N_u_m_b_e_r_E_r_r_o_r_s




BUGS
  This manual page needs more work.




SEE ALSO
  _E_x_t_e_n_d_i_n_g _X _f_o_r _D_o_u_b_l_e _B_u_f_f_e_r_i_n_g, _M_u_l_t_i-_B_u_f_f_e_r_i_n_g, _a_n_d _S_t_e_r_e_o
































































