Ardour  8.7-14-g57a6773833
gdkvisual.h
Go to the documentation of this file.
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
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.
8  *
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.
13  *
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.
18  */
19 
20 /*
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/.
25  */
26 
27 #ifndef __GDK_VISUAL_H__
28 #define __GDK_VISUAL_H__
29 
30 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
31 #error "Only <gdk/gdk.h> can be included directly."
32 #endif
33 
34 #include <gdk/gdktypes.h>
35 
36 G_BEGIN_DECLS
37 
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_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_VISUAL, GdkVisualClass))
41 #define GDK_IS_VISUAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_VISUAL))
42 #define GDK_IS_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_VISUAL))
43 #define GDK_VISUAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_VISUAL, GdkVisualClass))
44 
45 typedef struct _GdkVisualClass GdkVisualClass;
46 
47 /* Types of visuals.
48  * StaticGray:
49  * Grayscale:
50  * StaticColor:
51  * PseudoColor:
52  * TrueColor:
53  * DirectColor:
54  */
55 typedef enum
56 {
64 
65 /* The visual type.
66  * "type" is the type of visual this is (PseudoColor, TrueColor, etc).
67  * "depth" is the bit depth of this visual.
68  * "colormap_size" is the size of a colormap for this visual.
69  * "bits_per_rgb" is the number of significant bits per red, green and blue.
70  * The red, green and blue masks, shifts and precisions refer
71  * to value needed to calculate pixel values in TrueColor and DirectColor
72  * visuals. The "mask" is the significant bits within the pixel. The
73  * "shift" is the number of bits left we must shift a primary for it
74  * to be in position (according to the "mask"). "prec" refers to how
75  * much precision the pixel value contains for a particular primary.
76  */
77 struct _GdkVisual
78 {
79  GObject parent_instance;
80 
82  gint GSEAL (depth);
83  GdkByteOrder GSEAL (byte_order);
84  gint GSEAL (colormap_size);
85  gint GSEAL (bits_per_rgb);
86 
87  guint32 GSEAL (red_mask);
88  gint GSEAL (red_shift);
89  gint GSEAL (red_prec);
90 
91  guint32 GSEAL (green_mask);
92  gint GSEAL (green_shift);
93  gint GSEAL (green_prec);
94 
95  guint32 GSEAL (blue_mask);
96  gint GSEAL (blue_shift);
97  gint GSEAL (blue_prec);
98 };
99 
100 GType gdk_visual_get_type (void) G_GNUC_CONST;
101 
102 #ifndef GDK_MULTIHEAD_SAFE
110  GdkVisualType visual_type);
111 
112 void gdk_query_depths (gint **depths,
113  gint *count);
115  gint *count);
116 
117 GList* gdk_list_visuals (void);
118 #endif
119 
121 
128  guint32 *mask,
129  gint *shift,
130  gint *precision);
132  guint32 *mask,
133  gint *shift,
134  gint *precision);
136  guint32 *mask,
137  gint *shift,
138  gint *precision);
139 
140 #ifndef GDK_DISABLE_DEPRECATED
141 #define gdk_visual_ref(v) g_object_ref(v)
142 #define gdk_visual_unref(v) g_object_unref(v)
143 #endif
144 
145 G_END_DECLS
146 
147 #endif /* __GDK_VISUAL_H__ */
GdkByteOrder
Definition: gdktypes.h:119
gint gdk_visual_get_depth(GdkVisual *visual)
GdkScreen * gdk_visual_get_screen(GdkVisual *visual)
GdkVisual * gdk_visual_get_best_with_type(GdkVisualType visual_type)
GdkVisual * gdk_visual_get_best_with_both(gint depth, GdkVisualType visual_type)
GdkVisualType
Definition: gdkvisual.h:56
@ GDK_VISUAL_STATIC_GRAY
Definition: gdkvisual.h:57
@ GDK_VISUAL_STATIC_COLOR
Definition: gdkvisual.h:59
@ GDK_VISUAL_GRAYSCALE
Definition: gdkvisual.h:58
@ GDK_VISUAL_PSEUDO_COLOR
Definition: gdkvisual.h:60
@ GDK_VISUAL_TRUE_COLOR
Definition: gdkvisual.h:61
@ GDK_VISUAL_DIRECT_COLOR
Definition: gdkvisual.h:62
void gdk_visual_get_blue_pixel_details(GdkVisual *visual, guint32 *mask, gint *shift, gint *precision)
gint gdk_visual_get_best_depth(void)
GdkVisualType gdk_visual_get_visual_type(GdkVisual *visual)
GdkVisualType gdk_visual_get_best_type(void)
void gdk_query_depths(gint **depths, gint *count)
GdkVisual * gdk_visual_get_system(void)
GdkVisual * gdk_visual_get_best(void)
gint gdk_visual_get_bits_per_rgb(GdkVisual *visual)
GdkVisual * gdk_visual_get_best_with_depth(gint depth)
void gdk_query_visual_types(GdkVisualType **visual_types, gint *count)
void gdk_visual_get_red_pixel_details(GdkVisual *visual, guint32 *mask, gint *shift, gint *precision)
GType gdk_visual_get_type(void) G_GNUC_CONST
void gdk_visual_get_green_pixel_details(GdkVisual *visual, guint32 *mask, gint *shift, gint *precision)
GdkByteOrder gdk_visual_get_byte_order(GdkVisual *visual)
GList * gdk_list_visuals(void)
gint gdk_visual_get_colormap_size(GdkVisual *visual)
PBD::PropertyDescriptor< float > shift
gint GSEAL(blue_shift)
gint GSEAL(bits_per_rgb)
guint32 GSEAL(red_mask)
GObject parent_instance
Definition: gdkvisual.h:79
gint GSEAL(red_prec)
gint GSEAL(blue_prec)
guint32 GSEAL(green_mask)
guint32 GSEAL(blue_mask)
gint GSEAL(depth)
GdkVisualType GSEAL(type)
GdkByteOrder GSEAL(byte_order)
gint GSEAL(green_prec)
gint GSEAL(red_shift)
gint GSEAL(green_shift)
gint GSEAL(colormap_size)