home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / X11 / XGetVisualInfo.z / XGetVisualInfo
Encoding:
Text File  |  2002-10-03  |  6.6 KB  |  166 lines

  1.  
  2.  
  3.  
  4.      XXXXGGGGeeeettttVVVViiiissssuuuuaaaallllIIIInnnnffffoooo((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXGGGGeeeettttVVVViiiissssuuuuaaaallllIIIInnnnffffoooo((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XGetVisualInfo, XMatchVisualInfo, XVisualIDFromVisual,
  10.           XVisualInfo - obtain visual information and visual structure
  11.  
  12.      SSSSYYYYNNNNTTTTAAAAXXXX
  13.           XVisualInfo *XGetVisualInfo(_d_i_s_p_l_a_y, _v_i_n_f_o__m_a_s_k,
  14.           _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)
  15.                 Display *_d_i_s_p_l_a_y;
  16.                 long _v_i_n_f_o__m_a_s_k;
  17.                 XVisualInfo *_v_i_n_f_o__t_e_m_p_l_a_t_e;
  18.                 int *_n_i_t_e_m_s__r_e_t_u_r_n;
  19.  
  20.           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,
  21.           _v_i_n_f_o__r_e_t_u_r_n)
  22.                 Display *_d_i_s_p_l_a_y;
  23.                 int _s_c_r_e_e_n;
  24.                 int _d_e_p_t_h;
  25.                 int _c_l_a_s_s;
  26.                 XVisualInfo *_v_i_n_f_o__r_e_t_u_r_n;
  27.  
  28.           VisualID XVisualIDFromVisual(_v_i_s_u_a_l)
  29.                  Visual *_v_i_s_u_a_l;
  30.  
  31.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  32.           _c_l_a_s_s     Specifies the class of the screen.
  33.  
  34.           _d_e_p_t_h     Specifies the depth of the screen.
  35.  
  36.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  37.  
  38.           _n_i_t_e_m_s__r_e_t_u_r_n
  39.                     Returns the number of matching visual structures.
  40.  
  41.           _s_c_r_e_e_n    Specifies the screen.
  42.  
  43.           _v_i_s_u_a_l    Specifies the visual type.
  44.  
  45.           _v_i_n_f_o__m_a_s_k
  46.                     Specifies the visual mask value.
  47.  
  48.           _v_i_n_f_o__r_e_t_u_r_n
  49.                     Returns the matched visual information.
  50.  
  51.           _v_i_n_f_o__t_e_m_p_l_a_t_e
  52.                     Specifies the visual attributes that are to be
  53.                     used in matching the visual structures.
  54.  
  55.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  56.           The _X_G_e_t_V_i_s_u_a_l_I_n_f_o function returns a list of visual
  57.           structures that have attributes equal to the attributes
  58.           specified by vinfo_template.  If no visual structures match
  59.           the template using the specified vinfo_mask, _X_G_e_t_V_i_s_u_a_l_I_n_f_o
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 10/3/02)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXGGGGeeeettttVVVViiiissssuuuuaaaallllIIIInnnnffffoooo((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXGGGGeeeettttVVVViiiissssuuuuaaaallllIIIInnnnffffoooo((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           returns a NULL.  To free the data returned by this function,
  75.           use _X_F_r_e_e.
  76.  
  77.           The _X_M_a_t_c_h_V_i_s_u_a_l_I_n_f_o function returns the visual information
  78.           for a visual that matches the specified depth and class for
  79.           a screen.  Because multiple visuals that match the specified
  80.           depth and class can exist, the exact visual chosen is
  81.           undefined.  If a visual is found, _X_M_a_t_c_h_V_i_s_u_a_l_I_n_f_o returns
  82.           nonzero and the information on the visual to vinfo_return.
  83.           Otherwise, when a visual is not found, _X_M_a_t_c_h_V_i_s_u_a_l_I_n_f_o
  84.           returns zero.
  85.  
  86.           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
  87.           the specified visual type.
  88.  
  89.      SSSSTTTTRRRRUUUUCCCCTTTTUUUURRRREEEESSSS
  90.           The _X_V_i_s_u_a_l_I_n_f_o structure contains:
  91.  
  92.           /* Visual information mask bits */
  93.           #define
  94.                     _V_i_s_u_a_l_N_o_M_a_s_k
  95.                                                 0x0
  96.           #define
  97.                     _V_i_s_u_a_l_I_D_M_a_s_k
  98.                                                 0x1
  99.           #define
  100.                     _V_i_s_u_a_l_S_c_r_e_e_n_M_a_s_k
  101.                                                 0x2
  102.           #define
  103.                     _V_i_s_u_a_l_D_e_p_t_h_M_a_s_k
  104.                                                 0x4
  105.           #define
  106.                     _V_i_s_u_a_l_C_l_a_s_s_M_a_s_k
  107.                                                 0x8
  108.           #define
  109.                     _V_i_s_u_a_l_R_e_d_M_a_s_k_M_a_s_k
  110.                                                 0x10
  111.           #define
  112.                     _V_i_s_u_a_l_G_r_e_e_n_M_a_s_k_M_a_s_k
  113.                                                 0x20
  114.           #define
  115.                     _V_i_s_u_a_l_B_l_u_e_M_a_s_k_M_a_s_k
  116.                                                 0x40
  117.           #define
  118.                     _V_i_s_u_a_l_C_o_l_o_r_m_a_p_S_i_z_e_M_a_s_k
  119.                                                 0x80
  120.           #define
  121.                     _V_i_s_u_a_l_B_i_t_s_P_e_r_R_G_B_M_a_s_k
  122.                                                 0x100
  123.           #define
  124.                     _V_i_s_u_a_l_A_l_l_M_a_s_k
  125.                                                 0x1FF
  126.           /* Values */
  127.  
  128.           typedef struct {
  129.                Visual *visual;
  130.                VisualID visualid;
  131.                int screen;
  132.                unsigned int depth;
  133.                int class;
  134.                unsigned long red_mask;
  135.                unsigned long green_mask;
  136.                unsigned long blue_mask;
  137.                int colormap_size;
  138.                int bits_per_rgb;
  139.           } XVisualInfo;
  140.  
  141.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  142.           XFree(3X11)
  143.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.      Page 2                                          (printed 10/3/02)
  152.  
  153.  
  154.  
  155.