NAME

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

SYNTAX

XVisualInfo *XGetVisualInfo(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(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(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 */

lw(.5i) lw(2.5i) lw(.8i).
T{
#define
T}      T{
_V_i_s_u_a_l_N_o_M_a_s_k
T}      T{
0x0
T}
T{
#define
T}      T{
_V_i_s_u_a_l_I_D_M_a_s_k
T}      T{
0x1
T}
T{
#define
T}      T{
_V_i_s_u_a_l_S_c_r_e_e_n_M_a_s_k
T}      T{
0x2
T}
T{
#define
T}      T{
_V_i_s_u_a_l_D_e_p_t_h_M_a_s_k
T}      T{
0x4
T}
T{
#define
T}      T{
_V_i_s_u_a_l_C_l_a_s_s_M_a_s_k
T}      T{
0x8
T}
T{
#define
T}      T{
_V_i_s_u_a_l_R_e_d_M_a_s_k_M_a_s_k
T}      T{
0x10
T}
T{
#define
T}      T{
_V_i_s_u_a_l_G_r_e_e_n_M_a_s_k_M_a_s_k
T}      T{
0x20
T}
T{
#define
T}      T{
_V_i_s_u_a_l_B_l_u_e_M_a_s_k_M_a_s_k
T}      T{
0x40
T}
T{
#define
T}      T{
_V_i_s_u_a_l_C_o_l_o_r_m_a_p_S_i_z_e_M_a_s_k
T}      T{
0x80
T}
T{
#define
T}      T{
_V_i_s_u_a_l_B_i_t_s_P_e_r_R_G_B_M_a_s_k
T}      T{
0x100
T}
T{
#define
T}      T{
_V_i_s_u_a_l_A_l_l_M_a_s_k
T}      T{
0x1FF
T}

/* 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