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, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
27 #if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
28 #error "Only <gdk/gdk.h> can be included directly."
31 #ifndef __GDK_VISUAL_H__
32 #define __GDK_VISUAL_H__
34 #include <gdk/gdktypes.h>
38 #define GDK_TYPE_VISUAL (gdk_visual_get_type ())
39 #define GDK_VISUAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_VISUAL, GdkVisual))
40 #define GDK_IS_VISUAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_VISUAL))
44 * @GDK_VISUAL_STATIC_GRAY: Each pixel value indexes a grayscale value
46 * @GDK_VISUAL_GRAYSCALE: Each pixel is an index into a color map that
47 * maps pixel values into grayscale values. The color map can be
48 * changed by an application.
49 * @GDK_VISUAL_STATIC_COLOR: Each pixel value is an index into a predefined,
50 * unmodifiable color map that maps pixel values into RGB values.
51 * @GDK_VISUAL_PSEUDO_COLOR: Each pixel is an index into a color map that
52 * maps pixel values into rgb values. The color map can be changed by
54 * @GDK_VISUAL_TRUE_COLOR: Each pixel value directly contains red, green,
55 * and blue components. Use gdk_visual_get_red_pixel_details(), etc,
56 * to obtain information about how the components are assembled into
58 * @GDK_VISUAL_DIRECT_COLOR: Each pixel value contains red, green, and blue
59 * components as for %GDK_VISUAL_TRUE_COLOR, but the components are
60 * mapped via a color table into the final output table instead of
61 * being converted directly.
63 * A set of values that describe the manner in which the pixel values
64 * for a visual are converted into RGB values for display.
68 GDK_VISUAL_STATIC_GRAY,
70 GDK_VISUAL_STATIC_COLOR,
71 GDK_VISUAL_PSEUDO_COLOR,
72 GDK_VISUAL_TRUE_COLOR,
73 GDK_VISUAL_DIRECT_COLOR
79 * The #GdkVisual structure contains information about
80 * a particular visual.
83 GType gdk_visual_get_type (void) G_GNUC_CONST;
85 #ifndef GDK_MULTIHEAD_SAFE
86 gint gdk_visual_get_best_depth (void);
87 GdkVisualType gdk_visual_get_best_type (void);
88 GdkVisual* gdk_visual_get_system (void);
89 GdkVisual* gdk_visual_get_best (void);
90 GdkVisual* gdk_visual_get_best_with_depth (gint depth);
91 GdkVisual* gdk_visual_get_best_with_type (GdkVisualType visual_type);
92 GdkVisual* gdk_visual_get_best_with_both (gint depth,
93 GdkVisualType visual_type);
95 void gdk_query_depths (gint **depths,
97 void gdk_query_visual_types (GdkVisualType **visual_types,
100 GList* gdk_list_visuals (void);
103 GdkScreen *gdk_visual_get_screen (GdkVisual *visual);
105 GdkVisualType gdk_visual_get_visual_type (GdkVisual *visual);
106 gint gdk_visual_get_depth (GdkVisual *visual);
107 GdkByteOrder gdk_visual_get_byte_order (GdkVisual *visual);
108 gint gdk_visual_get_colormap_size (GdkVisual *visual);
109 gint gdk_visual_get_bits_per_rgb (GdkVisual *visual);
110 void gdk_visual_get_red_pixel_details (GdkVisual *visual,
114 void gdk_visual_get_green_pixel_details (GdkVisual *visual,
118 void gdk_visual_get_blue_pixel_details (GdkVisual *visual,
125 #endif /* __GDK_VISUAL_H__ */