~inkscape.dev/inkscape-devlibs/devlibs-gtk3

« back to all changes in this revision

Viewing changes to share/gtk-doc/html/gdk2/gdk2-Visuals.html

  • Committer: JazzyNico
  • Date: 2013-01-21 10:11:05 UTC
  • Revision ID: nicoduf@yahoo.fr-20130121101105-i8d8slkq9ng4olx8
Adding gtk2 libraries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
5
<title>Visuals</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
 
7
<link rel="home" href="index.html" title="GDK 2 Reference Manual">
 
8
<link rel="up" href="reference.html" title="API Reference">
 
9
<link rel="prev" href="gdk2-Colormaps-and-Colors.html" title="Colormaps and Colors">
 
10
<link rel="next" href="gdk2-Fonts.html" title="Fonts">
 
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
</head>
 
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
16
<tr valign="middle">
 
17
<td><a accesskey="p" href="gdk2-Colormaps-and-Colors.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
18
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
20
<th width="100%" align="center">GDK 2 Reference Manual</th>
 
21
<td><a accesskey="n" href="gdk2-Fonts.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
22
</tr>
 
23
<tr><td colspan="5" class="shortcuts">
 
24
<a href="#gdk2-Visuals.synopsis" class="shortcut">Top</a>
 
25
                   | 
 
26
                  <a href="#gdk2-Visuals.description" class="shortcut">Description</a>
 
27
</td></tr>
 
28
</table>
 
29
<div class="refentry">
 
30
<a name="gdk2-Visuals"></a><div class="titlepage"></div>
 
31
<div class="refnamediv"><table width="100%"><tr>
 
32
<td valign="top">
 
33
<h2><span class="refentrytitle"><a name="gdk2-Visuals.top_of_page"></a>Visuals</span></h2>
 
34
<p>Visuals — Low-level display hardware information</p>
 
35
</td>
 
36
<td valign="top" align="right"></td>
 
37
</tr></table></div>
 
38
<div class="refsynopsisdiv">
 
39
<a name="gdk2-Visuals.synopsis"></a><h2>Synopsis</h2>
 
40
<pre class="synopsis">
 
41
#include &lt;gdk/gdk.h&gt;
 
42
 
 
43
                    <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual">GdkVisual</a>;
 
44
enum                <a class="link" href="gdk2-Visuals.html#GdkVisualType" title="enum GdkVisualType">GdkVisualType</a>;
 
45
enum                <a class="link" href="gdk2-Visuals.html#GdkByteOrder" title="enum GdkByteOrder">GdkByteOrder</a>;
 
46
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Visuals.html#gdk-query-depths" title="gdk_query_depths ()">gdk_query_depths</a>                    (<em class="parameter"><code><span class="type">gint</span> **depths</code></em>,
 
47
                                                         <em class="parameter"><code><span class="type">gint</span> *count</code></em>);
 
48
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Visuals.html#gdk-query-visual-types" title="gdk_query_visual_types ()">gdk_query_visual_types</a>              (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="type">GdkVisualType</span></a> **visual_types</code></em>,
 
49
                                                         <em class="parameter"><code><span class="type">gint</span> *count</code></em>);
 
50
<span class="returnvalue">GList</span> *             <a class="link" href="gdk2-Visuals.html#gdk-list-visuals" title="gdk_list_visuals ()">gdk_list_visuals</a>                    (<em class="parameter"><code><span class="type">void</span></code></em>);
 
51
<span class="returnvalue">gint</span>                <a class="link" href="gdk2-Visuals.html#gdk-visual-get-best-depth" title="gdk_visual_get_best_depth ()">gdk_visual_get_best_depth</a>           (<em class="parameter"><code><span class="type">void</span></code></em>);
 
52
<a class="link" href="gdk2-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="returnvalue">GdkVisualType</span></a>       <a class="link" href="gdk2-Visuals.html#gdk-visual-get-best-type" title="gdk_visual_get_best_type ()">gdk_visual_get_best_type</a>            (<em class="parameter"><code><span class="type">void</span></code></em>);
 
53
<a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="returnvalue">GdkVisual</span></a> *         <a class="link" href="gdk2-Visuals.html#gdk-visual-get-system" title="gdk_visual_get_system ()">gdk_visual_get_system</a>               (<em class="parameter"><code><span class="type">void</span></code></em>);
 
54
<a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="returnvalue">GdkVisual</span></a> *         <a class="link" href="gdk2-Visuals.html#gdk-visual-get-best" title="gdk_visual_get_best ()">gdk_visual_get_best</a>                 (<em class="parameter"><code><span class="type">void</span></code></em>);
 
55
<a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="returnvalue">GdkVisual</span></a> *         <a class="link" href="gdk2-Visuals.html#gdk-visual-get-best-with-depth" title="gdk_visual_get_best_with_depth ()">gdk_visual_get_best_with_depth</a>      (<em class="parameter"><code><span class="type">gint</span> depth</code></em>);
 
56
<a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="returnvalue">GdkVisual</span></a> *         <a class="link" href="gdk2-Visuals.html#gdk-visual-get-best-with-type" title="gdk_visual_get_best_with_type ()">gdk_visual_get_best_with_type</a>       (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="type">GdkVisualType</span></a> visual_type</code></em>);
 
57
<a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="returnvalue">GdkVisual</span></a> *         <a class="link" href="gdk2-Visuals.html#gdk-visual-get-best-with-both" title="gdk_visual_get_best_with_both ()">gdk_visual_get_best_with_both</a>       (<em class="parameter"><code><span class="type">gint</span> depth</code></em>,
 
58
                                                         <em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="type">GdkVisualType</span></a> visual_type</code></em>);
 
59
#define             <a class="link" href="gdk2-Visuals.html#gdk-visual-ref" title="gdk_visual_ref()">gdk_visual_ref</a>                      (v)
 
60
#define             <a class="link" href="gdk2-Visuals.html#gdk-visual-unref" title="gdk_visual_unref()">gdk_visual_unref</a>                    (v)
 
61
<a class="link" href="GdkScreen.html" title="GdkScreen"><span class="returnvalue">GdkScreen</span></a> *         <a class="link" href="gdk2-Visuals.html#gdk-visual-get-screen" title="gdk_visual_get_screen ()">gdk_visual_get_screen</a>               (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);
 
62
<span class="returnvalue">gint</span>                <a class="link" href="gdk2-Visuals.html#gdk-visual-get-bits-per-rgb" title="gdk_visual_get_bits_per_rgb ()">gdk_visual_get_bits_per_rgb</a>         (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);
 
63
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Visuals.html#gdk-visual-get-blue-pixel-details" title="gdk_visual_get_blue_pixel_details ()">gdk_visual_get_blue_pixel_details</a>   (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>,
 
64
                                                         <em class="parameter"><code><span class="type">guint32</span> *mask</code></em>,
 
65
                                                         <em class="parameter"><code><span class="type">gint</span> *shift</code></em>,
 
66
                                                         <em class="parameter"><code><span class="type">gint</span> *precision</code></em>);
 
67
<a class="link" href="gdk2-Visuals.html#GdkByteOrder" title="enum GdkByteOrder"><span class="returnvalue">GdkByteOrder</span></a>        <a class="link" href="gdk2-Visuals.html#gdk-visual-get-byte-order" title="gdk_visual_get_byte_order ()">gdk_visual_get_byte_order</a>           (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);
 
68
<span class="returnvalue">gint</span>                <a class="link" href="gdk2-Visuals.html#gdk-visual-get-colormap-size" title="gdk_visual_get_colormap_size ()">gdk_visual_get_colormap_size</a>        (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);
 
69
<span class="returnvalue">gint</span>                <a class="link" href="gdk2-Visuals.html#gdk-visual-get-depth" title="gdk_visual_get_depth ()">gdk_visual_get_depth</a>                (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);
 
70
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Visuals.html#gdk-visual-get-green-pixel-details" title="gdk_visual_get_green_pixel_details ()">gdk_visual_get_green_pixel_details</a>  (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>,
 
71
                                                         <em class="parameter"><code><span class="type">guint32</span> *mask</code></em>,
 
72
                                                         <em class="parameter"><code><span class="type">gint</span> *shift</code></em>,
 
73
                                                         <em class="parameter"><code><span class="type">gint</span> *precision</code></em>);
 
74
<span class="returnvalue">void</span>                <a class="link" href="gdk2-Visuals.html#gdk-visual-get-red-pixel-details" title="gdk_visual_get_red_pixel_details ()">gdk_visual_get_red_pixel_details</a>    (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>,
 
75
                                                         <em class="parameter"><code><span class="type">guint32</span> *mask</code></em>,
 
76
                                                         <em class="parameter"><code><span class="type">gint</span> *shift</code></em>,
 
77
                                                         <em class="parameter"><code><span class="type">gint</span> *precision</code></em>);
 
78
<a class="link" href="gdk2-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="returnvalue">GdkVisualType</span></a>       <a class="link" href="gdk2-Visuals.html#gdk-visual-get-visual-type" title="gdk_visual_get_visual_type ()">gdk_visual_get_visual_type</a>          (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);
 
79
</pre>
 
80
</div>
 
81
<div class="refsect1">
 
82
<a name="gdk2-Visuals.description"></a><h2>Description</h2>
 
83
<p>
 
84
A <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> describes a particular video hardware display format. It includes
 
85
information about the number of bits used for each color, the way the bits are
 
86
translated into an RGB value for display, and the way the bits are stored in
 
87
memory. For example, a piece of display hardware might support 24-bit color,
 
88
16-bit color, or 8-bit color; meaning 24/16/8-bit pixel sizes. For a given
 
89
pixel size, pixels can be in different formats; for example the "red" element
 
90
of an RGB pixel may be in the top 8 bits of the pixel, or may be in the lower
 
91
4 bits.
 
92
</p>
 
93
<p>
 
94
Usually you can avoid thinking about visuals in GTK+. Visuals are useful to
 
95
interpret the contents of a <a class="link" href="gdk2-Images.html#GdkImage" title="GdkImage"><span class="type">GdkImage</span></a>, but you should avoid <a class="link" href="gdk2-Images.html#GdkImage" title="GdkImage"><span class="type">GdkImage</span></a> precisely
 
96
because its contents depend on the display hardware; use <a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> instead, for
 
97
all but the most low-level purposes. Also, anytime you provide a <a class="link" href="gdk2-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a>,
 
98
the visual is implied as part of the colormap (<a class="link" href="gdk2-Colormaps-and-Colors.html#gdk-colormap-get-visual" title="gdk_colormap_get_visual ()"><code class="function">gdk_colormap_get_visual()</code></a>), so
 
99
you won't have to provide a visual in addition.
 
100
</p>
 
101
<p>
 
102
There are several standard visuals. The visual returned
 
103
by <a class="link" href="gdk2-Visuals.html#gdk-visual-get-system" title="gdk_visual_get_system ()"><code class="function">gdk_visual_get_system()</code></a> is the system's default
 
104
visual. <a class="link" href="gdk2-GdkRGB.html#gdk-rgb-get-visual" title="gdk_rgb_get_visual ()"><code class="function">gdk_rgb_get_visual()</code></a> return the visual most
 
105
suited to displaying full-color image data. If you
 
106
use the calls in <span class="type">GdkRGB</span>, you should create your windows
 
107
using this visual (and the colormap returned by
 
108
<a class="link" href="gdk2-GdkRGB.html#gdk-rgb-get-colormap" title="gdk_rgb_get_colormap ()"><code class="function">gdk_rgb_get_colormap()</code></a>).
 
109
</p>
 
110
<p>
 
111
A number of functions are provided for determining
 
112
the "best" available visual. For the purposes of
 
113
making this determination, higher bit depths are
 
114
considered better, and for visuals of the same
 
115
bit depth, <a class="link" href="gdk2-Visuals.html#GDK-VISUAL-PSEUDO-COLOR:CAPS"><code class="literal">GDK_VISUAL_PSEUDO_COLOR</code></a> is preferred at
 
116
8bpp, otherwise, the visual types are ranked in the
 
117
order of (highest to lowest) <a class="link" href="gdk2-Visuals.html#GDK-VISUAL-DIRECT-COLOR:CAPS"><code class="literal">GDK_VISUAL_DIRECT_COLOR</code></a>,
 
118
<a class="link" href="gdk2-Visuals.html#GDK-VISUAL-TRUE-COLOR:CAPS"><code class="literal">GDK_VISUAL_TRUE_COLOR</code></a>, <a class="link" href="gdk2-Visuals.html#GDK-VISUAL-PSEUDO-COLOR:CAPS"><code class="literal">GDK_VISUAL_PSEUDO_COLOR</code></a>,
 
119
<a class="link" href="gdk2-Visuals.html#GDK-VISUAL-STATIC-COLOR:CAPS"><code class="literal">GDK_VISUAL_STATIC_COLOR</code></a>, <a class="link" href="gdk2-Visuals.html#GDK-VISUAL-GRAYSCALE:CAPS"><code class="literal">GDK_VISUAL_GRAYSCALE</code></a>,
 
120
then <a class="link" href="gdk2-Visuals.html#GDK-VISUAL-STATIC-GRAY:CAPS"><code class="literal">GDK_VISUAL_STATIC_GRAY</code></a>.
 
121
</p>
 
122
</div>
 
123
<div class="refsect1">
 
124
<a name="gdk2-Visuals.details"></a><h2>Details</h2>
 
125
<div class="refsect2">
 
126
<a name="GdkVisual"></a><h3>GdkVisual</h3>
 
127
<pre class="programlisting">typedef struct {
 
128
  GObject parent_instance;
 
129
  
 
130
  GdkVisualType GSEAL (type);
 
131
  gint GSEAL (depth);
 
132
  GdkByteOrder GSEAL (byte_order);
 
133
  gint GSEAL (colormap_size);
 
134
  gint GSEAL (bits_per_rgb);
 
135
 
 
136
  guint32 GSEAL (red_mask);
 
137
  gint GSEAL (red_shift);
 
138
  gint GSEAL (red_prec);
 
139
 
 
140
  guint32 GSEAL (green_mask);
 
141
  gint GSEAL (green_shift);
 
142
  gint GSEAL (green_prec);
 
143
 
 
144
  guint32 GSEAL (blue_mask);
 
145
  gint GSEAL (blue_shift);
 
146
  gint GSEAL (blue_prec);
 
147
} GdkVisual;
 
148
</pre>
 
149
<p>
 
150
The <span class="type">GdkVisual</span> structure contains information about
 
151
a particular visual.
 
152
</p>
 
153
<div class="example">
 
154
<a name="rgbmask"></a><p class="title"><b>Example 5. Constructing a pixel value from components</b></p>
 
155
<div class="example-contents">
 
156
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
157
    <tbody>
 
158
      <tr>
 
159
        <td class="listing_lines" align="right"><pre>1
 
160
2
 
161
3
 
162
4
 
163
5
 
164
6
 
165
7
 
166
8</pre></td>
 
167
        <td class="listing_code"><pre class="programlisting"><span class="normal">guint</span>
 
168
<span class="function">pixel_from_rgb</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GdkVisual</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">visual</span><span class="symbol">,</span>
 
169
<span class="normal">                </span><span class="usertype">guchar</span><span class="normal"> r</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">guchar</span><span class="normal"> b</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">guchar</span><span class="normal"> g</span><span class="symbol">)</span>
 
170
<span class="cbracket">{</span>
 
171
<span class="normal">  </span><span class="keyword">return</span><span class="normal"> </span><span class="symbol">((</span><span class="normal">r </span><span class="symbol">&gt;&gt;</span><span class="normal"> </span><span class="symbol">(</span><span class="number">16</span><span class="normal"> </span><span class="symbol">-</span><span class="normal"> visual</span><span class="symbol">-&gt;</span><span class="normal">red_prec</span><span class="symbol">))</span><span class="normal">   </span><span class="symbol">&lt;&lt;</span><span class="normal"> visual</span><span class="symbol">-&gt;</span><span class="normal">red_shift</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">|</span>
 
172
<span class="normal">         </span><span class="symbol">((</span><span class="normal">g </span><span class="symbol">&gt;&gt;</span><span class="normal"> </span><span class="symbol">(</span><span class="number">16</span><span class="normal"> </span><span class="symbol">-</span><span class="normal"> visual</span><span class="symbol">-&gt;</span><span class="normal">green_prec</span><span class="symbol">))</span><span class="normal"> </span><span class="symbol">&lt;&lt;</span><span class="normal"> visual</span><span class="symbol">-&gt;</span><span class="normal">green_shift</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">|</span>
 
173
<span class="normal">         </span><span class="symbol">((</span><span class="normal">r </span><span class="symbol">&gt;&gt;</span><span class="normal"> </span><span class="symbol">(</span><span class="number">16</span><span class="normal"> </span><span class="symbol">-</span><span class="normal"> visual</span><span class="symbol">-&gt;</span><span class="normal">blue_prec</span><span class="symbol">))</span><span class="normal">  </span><span class="symbol">&lt;&lt;</span><span class="normal"> visual</span><span class="symbol">-&gt;</span><span class="normal">blue_shift</span><span class="symbol">);</span>
 
174
<span class="cbracket">}</span></pre></td>
 
175
      </tr>
 
176
    </tbody>
 
177
  </table>
 
178
</div>
 
179
 
 
180
</div>
 
181
<br class="example-break"><div class="variablelist"><table border="0" class="variablelist">
 
182
<colgroup>
 
183
<col align="left" valign="top">
 
184
<col>
 
185
</colgroup>
 
186
<tbody><tr>
 
187
<td><p><span class="term"><span class="type">GObject</span> <em class="structfield"><code><a name="GdkVisual.parent-instance"></a>parent_instance</code></em>;</span></p></td>
 
188
<td>inherited portion from <span class="type">GObject</span>
 
189
</td>
 
190
</tr></tbody>
 
191
</table></div>
 
192
</div>
 
193
<hr>
 
194
<div class="refsect2">
 
195
<a name="GdkVisualType"></a><h3>enum GdkVisualType</h3>
 
196
<pre class="programlisting">typedef enum {
 
197
  GDK_VISUAL_STATIC_GRAY,
 
198
  GDK_VISUAL_GRAYSCALE,
 
199
  GDK_VISUAL_STATIC_COLOR,
 
200
  GDK_VISUAL_PSEUDO_COLOR,
 
201
  GDK_VISUAL_TRUE_COLOR,
 
202
  GDK_VISUAL_DIRECT_COLOR
 
203
} GdkVisualType;
 
204
</pre>
 
205
<p>
 
206
A set of values that describe the manner in which the
 
207
pixel values for a visual are converted into RGB
 
208
values for display.
 
209
</p>
 
210
<div class="variablelist"><table border="0" class="variablelist">
 
211
<colgroup>
 
212
<col align="left" valign="top">
 
213
<col>
 
214
</colgroup>
 
215
<tbody>
 
216
<tr>
 
217
<td><p><a name="GDK-VISUAL-STATIC-GRAY:CAPS"></a><span class="term"><code class="literal">GDK_VISUAL_STATIC_GRAY</code></span></p></td>
 
218
<td>Each pixel value indexes a grayscale value directly.
 
219
</td>
 
220
</tr>
 
221
<tr>
 
222
<td><p><a name="GDK-VISUAL-GRAYSCALE:CAPS"></a><span class="term"><code class="literal">GDK_VISUAL_GRAYSCALE</code></span></p></td>
 
223
<td>Each pixel is an index into a color map that maps pixel 
 
224
   values into grayscale values. The color map can be changed by an application.
 
225
</td>
 
226
</tr>
 
227
<tr>
 
228
<td><p><a name="GDK-VISUAL-STATIC-COLOR:CAPS"></a><span class="term"><code class="literal">GDK_VISUAL_STATIC_COLOR</code></span></p></td>
 
229
<td>Each pixel value is an index into a predefined,
 
230
   unmodifiable color map that maps pixel values into RGB values.
 
231
</td>
 
232
</tr>
 
233
<tr>
 
234
<td><p><a name="GDK-VISUAL-PSEUDO-COLOR:CAPS"></a><span class="term"><code class="literal">GDK_VISUAL_PSEUDO_COLOR</code></span></p></td>
 
235
<td>Each pixel is an index into a color map that maps
 
236
   pixel values into rgb values. The color map can be changed by an application.
 
237
</td>
 
238
</tr>
 
239
<tr>
 
240
<td><p><a name="GDK-VISUAL-TRUE-COLOR:CAPS"></a><span class="term"><code class="literal">GDK_VISUAL_TRUE_COLOR</code></span></p></td>
 
241
<td>Each pixel value directly contains red, green,
 
242
   and blue components. The <em class="structfield"><code>red_mask</code></em>,
 
243
   <em class="structfield"><code>green_mask</code></em>, and
 
244
   <em class="structfield"><code>blue_mask</code></em> fields of the <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a>
 
245
   structure describe how the components are assembled into a pixel value.
 
246
</td>
 
247
</tr>
 
248
<tr>
 
249
<td><p><a name="GDK-VISUAL-DIRECT-COLOR:CAPS"></a><span class="term"><code class="literal">GDK_VISUAL_DIRECT_COLOR</code></span></p></td>
 
250
<td>Each pixel value contains red, green, and blue
 
251
   components as for <a class="link" href="gdk2-Visuals.html#GDK-VISUAL-TRUE-COLOR:CAPS"><code class="literal">GDK_VISUAL_TRUE_COLOR</code></a>, but the components are mapped via a
 
252
   color table into the final output table instead of being converted directly.
 
253
</td>
 
254
</tr>
 
255
</tbody>
 
256
</table></div>
 
257
</div>
 
258
<hr>
 
259
<div class="refsect2">
 
260
<a name="GdkByteOrder"></a><h3>enum GdkByteOrder</h3>
 
261
<pre class="programlisting">typedef enum {
 
262
  GDK_LSB_FIRST,
 
263
  GDK_MSB_FIRST
 
264
} GdkByteOrder;
 
265
</pre>
 
266
<p>
 
267
A set of values describing the possible byte-orders
 
268
for storing pixel values in memory.
 
269
</p>
 
270
<div class="variablelist"><table border="0" class="variablelist">
 
271
<colgroup>
 
272
<col align="left" valign="top">
 
273
<col>
 
274
</colgroup>
 
275
<tbody>
 
276
<tr>
 
277
<td><p><a name="GDK-LSB-FIRST:CAPS"></a><span class="term"><code class="literal">GDK_LSB_FIRST</code></span></p></td>
 
278
<td>The values are stored with the least-significant byte
 
279
  first. For instance, the 32-bit value 0xffeecc would be stored
 
280
  in memory as 0xcc, 0xee, 0xff, 0x00.
 
281
</td>
 
282
</tr>
 
283
<tr>
 
284
<td><p><a name="GDK-MSB-FIRST:CAPS"></a><span class="term"><code class="literal">GDK_MSB_FIRST</code></span></p></td>
 
285
<td>The values are stored with the most-significant byte
 
286
first. For instance, the 32-bit value 0xffeecc would be stored
 
287
in memory as 0x00, 0xcc, 0xee, 0xff.
 
288
</td>
 
289
</tr>
 
290
</tbody>
 
291
</table></div>
 
292
</div>
 
293
<hr>
 
294
<div class="refsect2">
 
295
<a name="gdk-query-depths"></a><h3>gdk_query_depths ()</h3>
 
296
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_query_depths                    (<em class="parameter"><code><span class="type">gint</span> **depths</code></em>,
 
297
                                                         <em class="parameter"><code><span class="type">gint</span> *count</code></em>);</pre>
 
298
<p>
 
299
This function returns the available bit depths for the default
 
300
screen. It's equivalent to listing the visuals
 
301
(<a class="link" href="gdk2-Visuals.html#gdk-list-visuals" title="gdk_list_visuals ()"><code class="function">gdk_list_visuals()</code></a>) and then looking at the depth field in each
 
302
visual, removing duplicates.
 
303
</p>
 
304
<p>
 
305
The array returned by this function should not be freed.
 
306
</p>
 
307
<div class="variablelist"><table border="0" class="variablelist">
 
308
<colgroup>
 
309
<col align="left" valign="top">
 
310
<col>
 
311
</colgroup>
 
312
<tbody>
 
313
<tr>
 
314
<td><p><span class="term"><em class="parameter"><code>depths</code></em> :</span></p></td>
 
315
<td>return location for available depths. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>]</span>
 
316
</td>
 
317
</tr>
 
318
<tr>
 
319
<td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td>
 
320
<td>return location for number of available depths. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
 
321
</td>
 
322
</tr>
 
323
</tbody>
 
324
</table></div>
 
325
</div>
 
326
<hr>
 
327
<div class="refsect2">
 
328
<a name="gdk-query-visual-types"></a><h3>gdk_query_visual_types ()</h3>
 
329
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_query_visual_types              (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="type">GdkVisualType</span></a> **visual_types</code></em>,
 
330
                                                         <em class="parameter"><code><span class="type">gint</span> *count</code></em>);</pre>
 
331
<p>
 
332
This function returns the available visual types for the default
 
333
screen. It's equivalent to listing the visuals
 
334
(<a class="link" href="gdk2-Visuals.html#gdk-list-visuals" title="gdk_list_visuals ()"><code class="function">gdk_list_visuals()</code></a>) and then looking at the type field in each
 
335
visual, removing duplicates.
 
336
</p>
 
337
<p>
 
338
The array returned by this function should not be freed.
 
339
</p>
 
340
<div class="variablelist"><table border="0" class="variablelist">
 
341
<colgroup>
 
342
<col align="left" valign="top">
 
343
<col>
 
344
</colgroup>
 
345
<tbody>
 
346
<tr>
 
347
<td><p><span class="term"><em class="parameter"><code>visual_types</code></em> :</span></p></td>
 
348
<td>return location for the available visual types</td>
 
349
</tr>
 
350
<tr>
 
351
<td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td>
 
352
<td>return location for the number of available visual types</td>
 
353
</tr>
 
354
</tbody>
 
355
</table></div>
 
356
</div>
 
357
<hr>
 
358
<div class="refsect2">
 
359
<a name="gdk-list-visuals"></a><h3>gdk_list_visuals ()</h3>
 
360
<pre class="programlisting"><span class="returnvalue">GList</span> *             gdk_list_visuals                    (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 
361
<p>
 
362
Lists the available visuals for the default screen.
 
363
(See <a class="link" href="GdkScreen.html#gdk-screen-list-visuals" title="gdk_screen_list_visuals ()"><code class="function">gdk_screen_list_visuals()</code></a>)
 
364
A visual describes a hardware image data format.
 
365
For example, a visual might support 24-bit color, or 8-bit color,
 
366
and might expect pixels to be in a certain format.
 
367
</p>
 
368
<p>
 
369
Call <code class="function">g_list_free()</code> on the return value when you're finished with it.
 
370
</p>
 
371
<div class="variablelist"><table border="0" class="variablelist">
 
372
<colgroup>
 
373
<col align="left" valign="top">
 
374
<col>
 
375
</colgroup>
 
376
<tbody><tr>
 
377
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
378
<td>a list of visuals; the list must be freed, but not its contents. <span class="annotation">[<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GdkVisual]</span>
 
379
</td>
 
380
</tr></tbody>
 
381
</table></div>
 
382
</div>
 
383
<hr>
 
384
<div class="refsect2">
 
385
<a name="gdk-visual-get-best-depth"></a><h3>gdk_visual_get_best_depth ()</h3>
 
386
<pre class="programlisting"><span class="returnvalue">gint</span>                gdk_visual_get_best_depth           (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 
387
<p>
 
388
Get the best available depth for the default GDK screen.  "Best"
 
389
means "largest," i.e. 32 preferred over 24 preferred over 8 bits
 
390
per pixel.
 
391
</p>
 
392
<div class="variablelist"><table border="0" class="variablelist">
 
393
<colgroup>
 
394
<col align="left" valign="top">
 
395
<col>
 
396
</colgroup>
 
397
<tbody><tr>
 
398
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
399
<td>best available depth</td>
 
400
</tr></tbody>
 
401
</table></div>
 
402
</div>
 
403
<hr>
 
404
<div class="refsect2">
 
405
<a name="gdk-visual-get-best-type"></a><h3>gdk_visual_get_best_type ()</h3>
 
406
<pre class="programlisting"><a class="link" href="gdk2-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="returnvalue">GdkVisualType</span></a>       gdk_visual_get_best_type            (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 
407
<p>
 
408
Return the best available visual type for the default GDK screen.
 
409
</p>
 
410
<div class="variablelist"><table border="0" class="variablelist">
 
411
<colgroup>
 
412
<col align="left" valign="top">
 
413
<col>
 
414
</colgroup>
 
415
<tbody><tr>
 
416
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
417
<td>best visual type</td>
 
418
</tr></tbody>
 
419
</table></div>
 
420
</div>
 
421
<hr>
 
422
<div class="refsect2">
 
423
<a name="gdk-visual-get-system"></a><h3>gdk_visual_get_system ()</h3>
 
424
<pre class="programlisting"><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="returnvalue">GdkVisual</span></a> *         gdk_visual_get_system               (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 
425
<p>
 
426
Get the system's default visual for the default GDK screen.
 
427
This is the visual for the root window of the display.
 
428
The return value should not be freed.
 
429
</p>
 
430
<div class="variablelist"><table border="0" class="variablelist">
 
431
<colgroup>
 
432
<col align="left" valign="top">
 
433
<col>
 
434
</colgroup>
 
435
<tbody><tr>
 
436
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
437
<td>system visual. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
438
</td>
 
439
</tr></tbody>
 
440
</table></div>
 
441
</div>
 
442
<hr>
 
443
<div class="refsect2">
 
444
<a name="gdk-visual-get-best"></a><h3>gdk_visual_get_best ()</h3>
 
445
<pre class="programlisting"><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="returnvalue">GdkVisual</span></a> *         gdk_visual_get_best                 (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 
446
<p>
 
447
Get the visual with the most available colors for the default
 
448
GDK screen. The return value should not be freed.
 
449
</p>
 
450
<div class="variablelist"><table border="0" class="variablelist">
 
451
<colgroup>
 
452
<col align="left" valign="top">
 
453
<col>
 
454
</colgroup>
 
455
<tbody><tr>
 
456
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
457
<td>best visual. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
458
</td>
 
459
</tr></tbody>
 
460
</table></div>
 
461
</div>
 
462
<hr>
 
463
<div class="refsect2">
 
464
<a name="gdk-visual-get-best-with-depth"></a><h3>gdk_visual_get_best_with_depth ()</h3>
 
465
<pre class="programlisting"><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="returnvalue">GdkVisual</span></a> *         gdk_visual_get_best_with_depth      (<em class="parameter"><code><span class="type">gint</span> depth</code></em>);</pre>
 
466
<p>
 
467
Get the best visual with depth <em class="parameter"><code>depth</code></em> for the default GDK screen.
 
468
Color visuals and visuals with mutable colormaps are preferred
 
469
over grayscale or fixed-colormap visuals. The return value should not
 
470
be freed. <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> may be returned if no visual supports <em class="parameter"><code>depth</code></em>.
 
471
</p>
 
472
<div class="variablelist"><table border="0" class="variablelist">
 
473
<colgroup>
 
474
<col align="left" valign="top">
 
475
<col>
 
476
</colgroup>
 
477
<tbody>
 
478
<tr>
 
479
<td><p><span class="term"><em class="parameter"><code>depth</code></em> :</span></p></td>
 
480
<td>a bit depth</td>
 
481
</tr>
 
482
<tr>
 
483
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
484
<td>best visual for the given depth. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
485
</td>
 
486
</tr>
 
487
</tbody>
 
488
</table></div>
 
489
</div>
 
490
<hr>
 
491
<div class="refsect2">
 
492
<a name="gdk-visual-get-best-with-type"></a><h3>gdk_visual_get_best_with_type ()</h3>
 
493
<pre class="programlisting"><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="returnvalue">GdkVisual</span></a> *         gdk_visual_get_best_with_type       (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="type">GdkVisualType</span></a> visual_type</code></em>);</pre>
 
494
<p>
 
495
Get the best visual of the given <em class="parameter"><code>visual_type</code></em> for the default GDK screen.
 
496
Visuals with higher color depths are considered better. The return value
 
497
should not be freed. <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> may be returned if no visual has type
 
498
<em class="parameter"><code>visual_type</code></em>.
 
499
</p>
 
500
<div class="variablelist"><table border="0" class="variablelist">
 
501
<colgroup>
 
502
<col align="left" valign="top">
 
503
<col>
 
504
</colgroup>
 
505
<tbody>
 
506
<tr>
 
507
<td><p><span class="term"><em class="parameter"><code>visual_type</code></em> :</span></p></td>
 
508
<td>a visual type</td>
 
509
</tr>
 
510
<tr>
 
511
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
512
<td>best visual of the given type. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
513
</td>
 
514
</tr>
 
515
</tbody>
 
516
</table></div>
 
517
</div>
 
518
<hr>
 
519
<div class="refsect2">
 
520
<a name="gdk-visual-get-best-with-both"></a><h3>gdk_visual_get_best_with_both ()</h3>
 
521
<pre class="programlisting"><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="returnvalue">GdkVisual</span></a> *         gdk_visual_get_best_with_both       (<em class="parameter"><code><span class="type">gint</span> depth</code></em>,
 
522
                                                         <em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="type">GdkVisualType</span></a> visual_type</code></em>);</pre>
 
523
<p>
 
524
Combines <a class="link" href="gdk2-Visuals.html#gdk-visual-get-best-with-depth" title="gdk_visual_get_best_with_depth ()"><code class="function">gdk_visual_get_best_with_depth()</code></a> and <a class="link" href="gdk2-Visuals.html#gdk-visual-get-best-with-type" title="gdk_visual_get_best_with_type ()"><code class="function">gdk_visual_get_best_with_type()</code></a>.
 
525
</p>
 
526
<div class="variablelist"><table border="0" class="variablelist">
 
527
<colgroup>
 
528
<col align="left" valign="top">
 
529
<col>
 
530
</colgroup>
 
531
<tbody>
 
532
<tr>
 
533
<td><p><span class="term"><em class="parameter"><code>depth</code></em> :</span></p></td>
 
534
<td>a bit depth</td>
 
535
</tr>
 
536
<tr>
 
537
<td><p><span class="term"><em class="parameter"><code>visual_type</code></em> :</span></p></td>
 
538
<td>a visual type</td>
 
539
</tr>
 
540
<tr>
 
541
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
542
<td>best visual with both <em class="parameter"><code>depth</code></em> and
 
543
<em class="parameter"><code>visual_type</code></em>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
544
</td>
 
545
</tr>
 
546
</tbody>
 
547
</table></div>
 
548
</div>
 
549
<hr>
 
550
<div class="refsect2">
 
551
<a name="gdk-visual-ref"></a><h3>gdk_visual_ref()</h3>
 
552
<pre class="programlisting">#define gdk_visual_ref(v) g_object_ref(v)
 
553
</pre>
 
554
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
555
<h3 class="title">Warning</h3>
 
556
<p><code class="literal">gdk_visual_ref</code> is deprecated and should not be used in newly-written code.</p>
 
557
</div>
 
558
<p>
 
559
Deprecated equivalent of <code class="function">g_object_ref()</code>.
 
560
</p>
 
561
<div class="variablelist"><table border="0" class="variablelist">
 
562
<colgroup>
 
563
<col align="left" valign="top">
 
564
<col>
 
565
</colgroup>
 
566
<tbody>
 
567
<tr>
 
568
<td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td>
 
569
<td>a <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a>
 
570
</td>
 
571
</tr>
 
572
<tr>
 
573
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
574
<td>the same visual</td>
 
575
</tr>
 
576
</tbody>
 
577
</table></div>
 
578
</div>
 
579
<hr>
 
580
<div class="refsect2">
 
581
<a name="gdk-visual-unref"></a><h3>gdk_visual_unref()</h3>
 
582
<pre class="programlisting">#define gdk_visual_unref(v) g_object_unref(v)
 
583
</pre>
 
584
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
585
<h3 class="title">Warning</h3>
 
586
<p><code class="literal">gdk_visual_unref</code> is deprecated and should not be used in newly-written code.</p>
 
587
</div>
 
588
<p>
 
589
Deprecated equivalent of <code class="function">g_object_unref()</code>.
 
590
</p>
 
591
<div class="variablelist"><table border="0" class="variablelist">
 
592
<colgroup>
 
593
<col align="left" valign="top">
 
594
<col>
 
595
</colgroup>
 
596
<tbody><tr>
 
597
<td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td>
 
598
<td>a <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a>
 
599
</td>
 
600
</tr></tbody>
 
601
</table></div>
 
602
</div>
 
603
<hr>
 
604
<div class="refsect2">
 
605
<a name="gdk-visual-get-screen"></a><h3>gdk_visual_get_screen ()</h3>
 
606
<pre class="programlisting"><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="returnvalue">GdkScreen</span></a> *         gdk_visual_get_screen               (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);</pre>
 
607
<p>
 
608
Gets the screen to which this visual belongs
 
609
</p>
 
610
<div class="variablelist"><table border="0" class="variablelist">
 
611
<colgroup>
 
612
<col align="left" valign="top">
 
613
<col>
 
614
</colgroup>
 
615
<tbody>
 
616
<tr>
 
617
<td><p><span class="term"><em class="parameter"><code>visual</code></em> :</span></p></td>
 
618
<td>a <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a>
 
619
</td>
 
620
</tr>
 
621
<tr>
 
622
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
623
<td>the screen to which this visual belongs. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
624
</td>
 
625
</tr>
 
626
</tbody>
 
627
</table></div>
 
628
<p class="since">Since 2.2</p>
 
629
</div>
 
630
<hr>
 
631
<div class="refsect2">
 
632
<a name="gdk-visual-get-bits-per-rgb"></a><h3>gdk_visual_get_bits_per_rgb ()</h3>
 
633
<pre class="programlisting"><span class="returnvalue">gint</span>                gdk_visual_get_bits_per_rgb         (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);</pre>
 
634
<p>
 
635
Returns the number of significant bits per red, green and blue value.
 
636
</p>
 
637
<div class="variablelist"><table border="0" class="variablelist">
 
638
<colgroup>
 
639
<col align="left" valign="top">
 
640
<col>
 
641
</colgroup>
 
642
<tbody>
 
643
<tr>
 
644
<td><p><span class="term"><em class="parameter"><code>visual</code></em> :</span></p></td>
 
645
<td>a <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a>
 
646
</td>
 
647
</tr>
 
648
<tr>
 
649
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
650
<td>The number of significant bits per color value for <em class="parameter"><code>visual</code></em>.</td>
 
651
</tr>
 
652
</tbody>
 
653
</table></div>
 
654
<p class="since">Since 2.22</p>
 
655
</div>
 
656
<hr>
 
657
<div class="refsect2">
 
658
<a name="gdk-visual-get-blue-pixel-details"></a><h3>gdk_visual_get_blue_pixel_details ()</h3>
 
659
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_visual_get_blue_pixel_details   (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>,
 
660
                                                         <em class="parameter"><code><span class="type">guint32</span> *mask</code></em>,
 
661
                                                         <em class="parameter"><code><span class="type">gint</span> *shift</code></em>,
 
662
                                                         <em class="parameter"><code><span class="type">gint</span> *precision</code></em>);</pre>
 
663
<p>
 
664
Obtains values that are needed to calculate blue pixel values in TrueColor
 
665
and DirectColor.  The "mask" is the significant bits within the pixel.
 
666
The "shift" is the number of bits left we must shift a primary for it
 
667
to be in position (according to the "mask").  Finally, "precision" refers
 
668
to how much precision the pixel value contains for a particular primary.
 
669
</p>
 
670
<div class="variablelist"><table border="0" class="variablelist">
 
671
<colgroup>
 
672
<col align="left" valign="top">
 
673
<col>
 
674
</colgroup>
 
675
<tbody>
 
676
<tr>
 
677
<td><p><span class="term"><em class="parameter"><code>visual</code></em> :</span></p></td>
 
678
<td>a <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a>
 
679
</td>
 
680
</tr>
 
681
<tr>
 
682
<td><p><span class="term"><em class="parameter"><code>mask</code></em> :</span></p></td>
 
683
<td>A pointer to a <span class="type">guint32</span> to be filled in, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
684
</td>
 
685
</tr>
 
686
<tr>
 
687
<td><p><span class="term"><em class="parameter"><code>shift</code></em> :</span></p></td>
 
688
<td>A pointer to a <span class="type">gint</span> to be filled in, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
689
</td>
 
690
</tr>
 
691
<tr>
 
692
<td><p><span class="term"><em class="parameter"><code>precision</code></em> :</span></p></td>
 
693
<td>A pointer to a <span class="type">gint</span> to be filled in, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
694
</td>
 
695
</tr>
 
696
</tbody>
 
697
</table></div>
 
698
<p class="since">Since 2.22</p>
 
699
</div>
 
700
<hr>
 
701
<div class="refsect2">
 
702
<a name="gdk-visual-get-byte-order"></a><h3>gdk_visual_get_byte_order ()</h3>
 
703
<pre class="programlisting"><a class="link" href="gdk2-Visuals.html#GdkByteOrder" title="enum GdkByteOrder"><span class="returnvalue">GdkByteOrder</span></a>        gdk_visual_get_byte_order           (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);</pre>
 
704
<p>
 
705
Returns the byte order of this visual.
 
706
</p>
 
707
<div class="variablelist"><table border="0" class="variablelist">
 
708
<colgroup>
 
709
<col align="left" valign="top">
 
710
<col>
 
711
</colgroup>
 
712
<tbody>
 
713
<tr>
 
714
<td><p><span class="term"><em class="parameter"><code>visual</code></em> :</span></p></td>
 
715
<td>A <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a>.</td>
 
716
</tr>
 
717
<tr>
 
718
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
719
<td>A <a class="link" href="gdk2-Visuals.html#GdkByteOrder" title="enum GdkByteOrder"><span class="type">GdkByteOrder</span></a> stating the byte order of <em class="parameter"><code>visual</code></em>.</td>
 
720
</tr>
 
721
</tbody>
 
722
</table></div>
 
723
<p class="since">Since 2.22</p>
 
724
</div>
 
725
<hr>
 
726
<div class="refsect2">
 
727
<a name="gdk-visual-get-colormap-size"></a><h3>gdk_visual_get_colormap_size ()</h3>
 
728
<pre class="programlisting"><span class="returnvalue">gint</span>                gdk_visual_get_colormap_size        (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);</pre>
 
729
<p>
 
730
Returns the size of a colormap for this visual.
 
731
</p>
 
732
<div class="variablelist"><table border="0" class="variablelist">
 
733
<colgroup>
 
734
<col align="left" valign="top">
 
735
<col>
 
736
</colgroup>
 
737
<tbody>
 
738
<tr>
 
739
<td><p><span class="term"><em class="parameter"><code>visual</code></em> :</span></p></td>
 
740
<td>A <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a>.</td>
 
741
</tr>
 
742
<tr>
 
743
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
744
<td>The size of a colormap that is suitable for <em class="parameter"><code>visual</code></em>.</td>
 
745
</tr>
 
746
</tbody>
 
747
</table></div>
 
748
<p class="since">Since 2.22</p>
 
749
</div>
 
750
<hr>
 
751
<div class="refsect2">
 
752
<a name="gdk-visual-get-depth"></a><h3>gdk_visual_get_depth ()</h3>
 
753
<pre class="programlisting"><span class="returnvalue">gint</span>                gdk_visual_get_depth                (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);</pre>
 
754
<p>
 
755
Returns the bit depth of this visual.
 
756
</p>
 
757
<div class="variablelist"><table border="0" class="variablelist">
 
758
<colgroup>
 
759
<col align="left" valign="top">
 
760
<col>
 
761
</colgroup>
 
762
<tbody>
 
763
<tr>
 
764
<td><p><span class="term"><em class="parameter"><code>visual</code></em> :</span></p></td>
 
765
<td>A <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a>.</td>
 
766
</tr>
 
767
<tr>
 
768
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
769
<td>The bit depth of this visual.</td>
 
770
</tr>
 
771
</tbody>
 
772
</table></div>
 
773
<p class="since">Since 2.22</p>
 
774
</div>
 
775
<hr>
 
776
<div class="refsect2">
 
777
<a name="gdk-visual-get-green-pixel-details"></a><h3>gdk_visual_get_green_pixel_details ()</h3>
 
778
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_visual_get_green_pixel_details  (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>,
 
779
                                                         <em class="parameter"><code><span class="type">guint32</span> *mask</code></em>,
 
780
                                                         <em class="parameter"><code><span class="type">gint</span> *shift</code></em>,
 
781
                                                         <em class="parameter"><code><span class="type">gint</span> *precision</code></em>);</pre>
 
782
<p>
 
783
Obtains values that are needed to calculate green pixel values in TrueColor
 
784
and DirectColor.  The "mask" is the significant bits within the pixel.
 
785
The "shift" is the number of bits left we must shift a primary for it
 
786
to be in position (according to the "mask").  Finally, "precision" refers
 
787
to how much precision the pixel value contains for a particular primary.
 
788
</p>
 
789
<div class="variablelist"><table border="0" class="variablelist">
 
790
<colgroup>
 
791
<col align="left" valign="top">
 
792
<col>
 
793
</colgroup>
 
794
<tbody>
 
795
<tr>
 
796
<td><p><span class="term"><em class="parameter"><code>visual</code></em> :</span></p></td>
 
797
<td>a <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a>
 
798
</td>
 
799
</tr>
 
800
<tr>
 
801
<td><p><span class="term"><em class="parameter"><code>mask</code></em> :</span></p></td>
 
802
<td>A pointer to a <span class="type">guint32</span> to be filled in, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
803
</td>
 
804
</tr>
 
805
<tr>
 
806
<td><p><span class="term"><em class="parameter"><code>shift</code></em> :</span></p></td>
 
807
<td>A pointer to a <span class="type">gint</span> to be filled in, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
808
</td>
 
809
</tr>
 
810
<tr>
 
811
<td><p><span class="term"><em class="parameter"><code>precision</code></em> :</span></p></td>
 
812
<td>A pointer to a <span class="type">gint</span> to be filled in, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
813
</td>
 
814
</tr>
 
815
</tbody>
 
816
</table></div>
 
817
<p class="since">Since 2.22</p>
 
818
</div>
 
819
<hr>
 
820
<div class="refsect2">
 
821
<a name="gdk-visual-get-red-pixel-details"></a><h3>gdk_visual_get_red_pixel_details ()</h3>
 
822
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_visual_get_red_pixel_details    (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>,
 
823
                                                         <em class="parameter"><code><span class="type">guint32</span> *mask</code></em>,
 
824
                                                         <em class="parameter"><code><span class="type">gint</span> *shift</code></em>,
 
825
                                                         <em class="parameter"><code><span class="type">gint</span> *precision</code></em>);</pre>
 
826
<p>
 
827
Obtains values that are needed to calculate red pixel values in TrueColor
 
828
and DirectColor.  The "mask" is the significant bits within the pixel.
 
829
The "shift" is the number of bits left we must shift a primary for it
 
830
to be in position (according to the "mask").  Finally, "precision" refers
 
831
to how much precision the pixel value contains for a particular primary.
 
832
</p>
 
833
<div class="variablelist"><table border="0" class="variablelist">
 
834
<colgroup>
 
835
<col align="left" valign="top">
 
836
<col>
 
837
</colgroup>
 
838
<tbody>
 
839
<tr>
 
840
<td><p><span class="term"><em class="parameter"><code>visual</code></em> :</span></p></td>
 
841
<td>A <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a>.</td>
 
842
</tr>
 
843
<tr>
 
844
<td><p><span class="term"><em class="parameter"><code>mask</code></em> :</span></p></td>
 
845
<td>A pointer to a <span class="type">guint32</span> to be filled in, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
846
</td>
 
847
</tr>
 
848
<tr>
 
849
<td><p><span class="term"><em class="parameter"><code>shift</code></em> :</span></p></td>
 
850
<td>A pointer to a <span class="type">gint</span> to be filled in, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
851
</td>
 
852
</tr>
 
853
<tr>
 
854
<td><p><span class="term"><em class="parameter"><code>precision</code></em> :</span></p></td>
 
855
<td>A pointer to a <span class="type">gint</span> to be filled in, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
856
</td>
 
857
</tr>
 
858
</tbody>
 
859
</table></div>
 
860
<p class="since">Since 2.22</p>
 
861
</div>
 
862
<hr>
 
863
<div class="refsect2">
 
864
<a name="gdk-visual-get-visual-type"></a><h3>gdk_visual_get_visual_type ()</h3>
 
865
<pre class="programlisting"><a class="link" href="gdk2-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="returnvalue">GdkVisualType</span></a>       gdk_visual_get_visual_type          (<em class="parameter"><code><a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);</pre>
 
866
<p>
 
867
Returns the type of visual this is (PseudoColor, TrueColor, etc).
 
868
</p>
 
869
<div class="variablelist"><table border="0" class="variablelist">
 
870
<colgroup>
 
871
<col align="left" valign="top">
 
872
<col>
 
873
</colgroup>
 
874
<tbody>
 
875
<tr>
 
876
<td><p><span class="term"><em class="parameter"><code>visual</code></em> :</span></p></td>
 
877
<td>A <a class="link" href="gdk2-Visuals.html#GdkVisual" title="GdkVisual"><span class="type">GdkVisual</span></a>.</td>
 
878
</tr>
 
879
<tr>
 
880
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
881
<td>A <a class="link" href="gdk2-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="type">GdkVisualType</span></a> stating the type of <em class="parameter"><code>visual</code></em>.</td>
 
882
</tr>
 
883
</tbody>
 
884
</table></div>
 
885
<p class="since">Since 2.22</p>
 
886
</div>
 
887
</div>
 
888
<div class="refsect1">
 
889
<a name="gdk2-Visuals.see-also"></a><h2>See Also</h2>
 
890
<p>
 
891
<a class="link" href="gdk2-Images.html#GdkImage" title="GdkImage"><span class="type">GdkImage</span></a>, <a class="link" href="gdk2-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a>, <span class="type">GdkRGB</span>
 
892
</p>
 
893
</div>
 
894
</div>
 
895
<div class="footer">
 
896
<hr>
 
897
          Generated by GTK-Doc V1.18</div>
 
898
</body>
 
899
</html>
 
 
b'\\ No newline at end of file'