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

  1.  
  2.  
  3.  
  4. XGetVisualInfo(3X11)      XLIB FUNCTIONS     XGetVisualInfo(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XGetVisualInfo, XMatchVisualInfo, XVisualIDFromVisual,
  9.        XVisualInfo - obtain visual information and visual struc-
  10.        ture
  11.  
  12. SSYYNNTTAAXX
  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. AARRGGUUMMEENNTTSS
  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 struc-
  40.          tures.
  41.  
  42.        _s_c_r_e_e_n     Specifies the screen.
  43.  
  44.        _v_i_s_u_a_l     Specifies the visual type.
  45.  
  46.        _v_i_n_f_o___m_a_s_k
  47.          Specifies the visual mask value.
  48.  
  49.        _v_i_n_f_o___r_e_t_u_r_n
  50.          Returns the matched visual information.
  51.  
  52.        _v_i_n_f_o___t_e_m_p_l_a_t_e
  53.          Specifies the visual attributes that are to be
  54.          used in matching the visual structures.
  55.  
  56. DDEESSCCRRIIPPTTIIOONN
  57.        The _X_G_e_t_V_i_s_u_a_l_I_n_f_o function returns a list of visual
  58.        structures that have attributes equal to the attributes
  59.        specified by vinfo_template.  If no visual structures
  60.        match the template using the specified vinfo_mask,
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XGetVisualInfo(3X11)      XLIB FUNCTIONS     XGetVisualInfo(3X11)
  71.  
  72.  
  73.        _X_G_e_t_V_i_s_u_a_l_I_n_f_o returns a NULL.  To free the data returned
  74.        by this function, use _X_F_r_e_e.
  75.  
  76.        The _X_M_a_t_c_h_V_i_s_u_a_l_I_n_f_o function returns the visual informa-
  77.        tion for a visual that matches the specified depth and
  78.        class for a screen.  Because multiple visuals that match
  79.        the specified depth and class can exist, the exact visual
  80.        chosen is undefined.  If a visual is found, _X_M_a_t_c_h_V_i_s_u_a_l_-
  81.        _I_n_f_o returns nonzero and the information on the visual to
  82.        vinfo_return.  Otherwise, when a visual is not found,
  83.        _X_M_a_t_c_h_V_i_s_u_a_l_I_n_f_o returns zero.
  84.  
  85.        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
  86.        the specified visual type.
  87.  
  88. SSTTRRUUCCTTUURREESS
  89.        The _X_V_i_s_u_a_l_I_n_f_o structure contains:
  90.  
  91.  
  92.        /* Visual information mask bits */
  93.        #define     _V_i_s_u_a_l_N_o_M_a_s_k             0x0
  94.        #define     _V_i_s_u_a_l_I_D_M_a_s_k             0x1
  95.        #define     _V_i_s_u_a_l_S_c_r_e_e_n_M_a_s_k         0x2
  96.        #define     _V_i_s_u_a_l_D_e_p_t_h_M_a_s_k         0x4
  97.        #define     _V_i_s_u_a_l_C_l_a_s_s_M_a_s_k         0x8
  98.        #define     _V_i_s_u_a_l_R_e_d_M_a_s_k_M_a_s_k         0x10
  99.        #define     _V_i_s_u_a_l_G_r_e_e_n_M_a_s_k_M_a_s_k         0x20
  100.        #define     _V_i_s_u_a_l_B_l_u_e_M_a_s_k_M_a_s_k         0x40
  101.        #define     _V_i_s_u_a_l_C_o_l_o_r_m_a_p_S_i_z_e_M_a_s_k         0x80
  102.        #define     _V_i_s_u_a_l_B_i_t_s_P_e_r_R_G_B_M_a_s_k         0x100
  103.        #define     _V_i_s_u_a_l_A_l_l_M_a_s_k             0x1FF
  104.        /* Values */
  105.  
  106.        typedef struct {
  107.         Visual *visual;
  108.         VisualID visualid;
  109.         int screen;
  110.         unsigned int depth;
  111.         int class;
  112.         unsigned long red_mask;
  113.         unsigned long green_mask;
  114.         unsigned long blue_mask;
  115.         int colormap_size;
  116.         int bits_per_rgb;
  117.        } XVisualInfo;
  118.  
  119. SSEEEE AALLSSOO
  120.        XFree(3X11)
  121.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.