gdkvisual.h

Go to the documentation of this file.
00001 #ifndef __GDK_VISUAL_H__
00002 #define __GDK_VISUAL_H__
00003 
00004 #include <gdk/gdktypes.h>
00005 
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif                          /* __cplusplus */
00009 
00010 /* Types of visuals.
00011  *   StaticGray:
00012  *   Grayscale:
00013  *   StaticColor:
00014  *   PseudoColor:
00015  *   TrueColor:
00016  *   DirectColor:
00017  */
00018    typedef enum {
00019       GDK_VISUAL_STATIC_GRAY,
00020       GDK_VISUAL_GRAYSCALE,
00021       GDK_VISUAL_STATIC_COLOR,
00022       GDK_VISUAL_PSEUDO_COLOR,
00023       GDK_VISUAL_TRUE_COLOR,
00024       GDK_VISUAL_DIRECT_COLOR
00025    } GdkVisualType;
00026 
00027 /* The visual type.
00028  *   "type" is the type of visual this is (PseudoColor, TrueColor, etc).
00029  *   "depth" is the bit depth of this visual.
00030  *   "colormap_size" is the size of a colormap for this visual.
00031  *   "bits_per_rgb" is the number of significant bits per red, green and blue.
00032  *  The red, green and blue masks, shifts and precisions refer
00033  *   to value needed to calculate pixel values in TrueColor and DirectColor
00034  *   visuals. The "mask" is the significant bits within the pixel. The
00035  *   "shift" is the number of bits left we must shift a primary for it
00036  *   to be in position (according to the "mask"). "prec" refers to how
00037  *   much precision the pixel value contains for a particular primary.
00038  */
00039    struct _GdkVisual {
00040       GdkVisualType type;
00041       gint depth;
00042       GdkByteOrder byte_order;
00043       gint colormap_size;
00044       gint bits_per_rgb;
00045 
00046       guint32 red_mask;
00047       gint red_shift;
00048       gint red_prec;
00049 
00050       guint32 green_mask;
00051       gint green_shift;
00052       gint green_prec;
00053 
00054       guint32 blue_mask;
00055       gint blue_shift;
00056       gint blue_prec;
00057    };
00058 
00059    gint gdk_visual_get_best_depth(void);
00060    GdkVisualType gdk_visual_get_best_type(void);
00061    GdkVisual *gdk_visual_get_system(void);
00062    GdkVisual *gdk_visual_get_best(void);
00063    GdkVisual *gdk_visual_get_best_with_depth(gint depth);
00064    GdkVisual *gdk_visual_get_best_with_type(GdkVisualType visual_type);
00065    GdkVisual *gdk_visual_get_best_with_both(gint depth,
00066                                             GdkVisualType visual_type);
00067 
00068 /* Actually, these are no-ops... */
00069    GdkVisual *gdk_visual_ref(GdkVisual * visual);
00070    void gdk_visual_unref(GdkVisual * visual);
00071 
00072    void gdk_query_depths(gint ** depths, gint * count);
00073    void gdk_query_visual_types(GdkVisualType ** visual_types,
00074                                gint * count);
00075 
00076    GList *gdk_list_visuals(void);
00077 
00078 #ifdef __cplusplus
00079 }
00080 #endif                          /* __cplusplus */
00081 #endif                          /* __GDK_VISUAL_H__ */

Generated on Tue Jul 5 14:14:38 2011 for ROOT_528-00b_version by  doxygen 1.5.1