


XGetVisualInfo(3X11)					 XGetVisualInfo(3X11)
X11R5									X11R5



NAME
  XGetVisualInfo, XMatchVisualInfo, XVisualIDFromVisual, XVisualInfo - obtain
  visual information and visual	structure

SYNTAX
  XVisualInfo *XGetVisualInfo(_d_i_s_p_l_a_y, _v_i_n_f_o__m_a_s_k, _v_i_n_f_o__t_e_m_p_l_a_t_e,
  _n_i_t_e_m_s__r_e_t_u_r_n)
	Display	*_d_i_s_p_l_a_y;
	long _v_i_n_f_o__m_a_s_k;
	XVisualInfo *_v_i_n_f_o__t_e_m_p_l_a_t_e;
	int *_n_i_t_e_m_s__r_e_t_u_r_n;

  Status XMatchVisualInfo(_d_i_s_p_l_a_y, _s_c_r_e_e_n, _d_e_p_t_h, _c_l_a_s_s, _v_i_n_f_o__r_e_t_u_r_n)
	Display	*_d_i_s_p_l_a_y;
	int _s_c_r_e_e_n;
	int _d_e_p_t_h;
	int _c_l_a_s_s;
	XVisualInfo *_v_i_n_f_o__r_e_t_u_r_n;

  VisualID XVisualIDFromVisual(_v_i_s_u_a_l)
	 Visual	*_v_i_s_u_a_l;

ARGUMENTS

  _c_l_a_s_s	    Specifies the class	of the screen.

  _d_e_p_t_h	    Specifies the depth	of the screen.

  _d_i_s_p_l_a_y   Specifies the connection to	the X server.

  _n_i_t_e_m_s__r_e_t_u_r_n
	    Returns the	number of matching visual structures.

  _s_c_r_e_e_n    Specifies the screen.

  _v_i_s_u_a_l    Specifies the visual type.

  _v_i_n_f_o__m_a_s_k
	    Specifies the visual mask value.

  _v_i_n_f_o__r_e_t_u_r_n
	    Returns the	matched	visual information.

  _v_i_n_f_o__t_e_m_p_l_a_t_e
	    Specifies the visual attributes that are to	be used	in matching
	    the	visual structures.

DESCRIPTION
  The _X_G_e_t_V_i_s_u_a_l_I_n_f_o function returns a	list of	visual structures that have
  attributes equal to the attributes specified by vinfo_template.  If no
  visual structures match the template using the specified vinfo_mask, _X_G_e_t_-
  _V_i_s_u_a_l_I_n_f_o returns a NULL.  To free the data returned	by this	function, use
  _X_F_r_e_e.

  The _X_M_a_t_c_h_V_i_s_u_a_l_I_n_f_o function	returns	the visual information for a visual
  that matches the specified depth and class for a screen.  Because multiple
  visuals that match the specified depth and class can exist, the exact
  visual chosen	is undefined.  If a visual is found, _X_M_a_t_c_h_V_i_s_u_a_l_I_n_f_o returns
  nonzero and the information on the visual to vinfo_return.  Otherwise, when
  a visual is not found, _X_M_a_t_c_h_V_i_s_u_a_l_I_n_f_o returns zero.

  The _X_V_i_s_u_a_l_I_D_F_r_o_m_V_i_s_u_a_l function returns the visual ID for the specified
  visual type.

STRUCTURES
  The _X_V_i_s_u_a_l_I_n_f_o structure contains:

  /* Visual information	mask bits */


  #define

	    _V_i_s_u_a_l_N_o_M_a_s_k

				  0x0


  #define

	    _V_i_s_u_a_l_I_D_M_a_s_k

				  0x1


  #define

	    _V_i_s_u_a_l_S_c_r_e_e_n_M_a_s_k

				  0x2


  #define

	    _V_i_s_u_a_l_D_e_p_t_h_M_a_s_k

				  0x4


  #define

	    _V_i_s_u_a_l_C_l_a_s_s_M_a_s_k

				  0x8


  #define

	    _V_i_s_u_a_l_R_e_d_M_a_s_k_M_a_s_k

				  0x10


  #define

	    _V_i_s_u_a_l_G_r_e_e_n_M_a_s_k_M_a_s_k

				  0x20


  #define

	    _V_i_s_u_a_l_B_l_u_e_M_a_s_k_M_a_s_k

				  0x40


  #define

	    _V_i_s_u_a_l_C_o_l_o_r_m_a_p-
	    _S_i_z_e_M_a_s_k


				  0x80



  #define

	    _V_i_s_u_a_l-
	    _B_i_t_s_P_e_r_R_G_B_M_a_s_k


				  0x100



  #define

	    _V_i_s_u_a_l_A_l_l_M_a_s_k

				  0x1FF

  /* Values */

  typedef struct {
	  Visual *visual;
	  VisualID visualid;
	  int screen;
	  unsigned int depth;
	  int class;
	  unsigned long	red_mask;
	  unsigned long	green_mask;
	  unsigned long	blue_mask;
	  int colormap_size;
	  int bits_per_rgb;
  } XVisualInfo;

SEE ALSO
  XFree(3X11)
  _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
























