1 /* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
20 * file for a list of people on the GTK+ Team. See the ChangeLog
21 * files for a list of changes. These files are distributed with
22 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25 #ifndef __GDK_VISUAL_H__
26 #define __GDK_VISUAL_H__
28 #if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
29 #error "Only <gdk/gdk.h> can be included directly."
32 #include <gdk/gdktypes.h>
36 #define GDK_TYPE_VISUAL (gdk_visual_get_type ())
37 #define GDK_VISUAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_VISUAL, GdkVisual))
38 #define GDK_IS_VISUAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_VISUAL))
42 * @GDK_VISUAL_STATIC_GRAY: Each pixel value indexes a grayscale value
44 * @GDK_VISUAL_GRAYSCALE: Each pixel is an index into a color map that
45 * maps pixel values into grayscale values. The color map can be
46 * changed by an application.
47 * @GDK_VISUAL_STATIC_COLOR: Each pixel value is an index into a predefined,
48 * unmodifiable color map that maps pixel values into RGB values.
49 * @GDK_VISUAL_PSEUDO_COLOR: Each pixel is an index into a color map that
50 * maps pixel values into rgb values. The color map can be changed by
52 * @GDK_VISUAL_TRUE_COLOR: Each pixel value directly contains red, green,
53 * and blue components. Use gdk_visual_get_red_pixel_details(), etc,
54 * to obtain information about how the components are assembled into
56 * @GDK_VISUAL_DIRECT_COLOR: Each pixel value contains red, green, and blue
57 * components as for %GDK_VISUAL_TRUE_COLOR, but the components are
58 * mapped via a color table into the final output table instead of
59 * being converted directly.
61 * A set of values that describe the manner in which the pixel values
62 * for a visual are converted into RGB values for display.
66 GDK_VISUAL_STATIC_GRAY,
68 GDK_VISUAL_STATIC_COLOR,
69 GDK_VISUAL_PSEUDO_COLOR,
70 GDK_VISUAL_TRUE_COLOR,
71 GDK_VISUAL_DIRECT_COLOR
77 * The #GdkVisual structure contains information about
78 * a particular visual.
81 GType gdk_visual_get_type (void) G_GNUC_CONST;
83 #ifndef GDK_MULTIHEAD_SAFE
84 gint gdk_visual_get_best_depth (void);
85 GdkVisualType gdk_visual_get_best_type (void);
86 GdkVisual* gdk_visual_get_system (void);
87 GdkVisual* gdk_visual_get_best (void);
88 GdkVisual* gdk_visual_get_best_with_depth (gint depth);
89 GdkVisual* gdk_visual_get_best_with_type (GdkVisualType visual_type);
90 GdkVisual* gdk_visual_get_best_with_both (gint depth,
91 GdkVisualType visual_type);
93 void gdk_query_depths (gint **depths,
95 void gdk_query_visual_types (GdkVisualType **visual_types,
98 GList* gdk_list_visuals (void);
101 GdkScreen *gdk_visual_get_screen (GdkVisual *visual);
103 GdkVisualType gdk_visual_get_visual_type (GdkVisual *visual);
104 gint gdk_visual_get_depth (GdkVisual *visual);
105 GdkByteOrder gdk_visual_get_byte_order (GdkVisual *visual);
106 gint gdk_visual_get_colormap_size (GdkVisual *visual);
107 gint gdk_visual_get_bits_per_rgb (GdkVisual *visual);
108 void gdk_visual_get_red_pixel_details (GdkVisual *visual,
112 void gdk_visual_get_green_pixel_details (GdkVisual *visual,
116 void gdk_visual_get_blue_pixel_details (GdkVisual *visual,
123 #endif /* __GDK_VISUAL_H__ */