1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
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">
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">
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>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#gdk2-Visuals.synopsis" class="shortcut">Top</a>
26
<a href="#gdk2-Visuals.description" class="shortcut">Description</a>
29
<div class="refentry">
30
<a name="gdk2-Visuals"></a><div class="titlepage"></div>
31
<div class="refnamediv"><table width="100%"><tr>
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>
36
<td valign="top" align="right"></td>
38
<div class="refsynopsisdiv">
39
<a name="gdk2-Visuals.synopsis"></a><h2>Synopsis</h2>
40
<pre class="synopsis">
41
#include <gdk/gdk.h>
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>);
81
<div class="refsect1">
82
<a name="gdk2-Visuals.description"></a><h2>Description</h2>
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
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.
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>).
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>.
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;
130
GdkVisualType GSEAL (type);
132
GdkByteOrder GSEAL (byte_order);
133
gint GSEAL (colormap_size);
134
gint GSEAL (bits_per_rgb);
136
guint32 GSEAL (red_mask);
137
gint GSEAL (red_shift);
138
gint GSEAL (red_prec);
140
guint32 GSEAL (green_mask);
141
gint GSEAL (green_shift);
142
gint GSEAL (green_prec);
144
guint32 GSEAL (blue_mask);
145
gint GSEAL (blue_shift);
146
gint GSEAL (blue_prec);
150
The <span class="type">GdkVisual</span> structure contains information about
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">
159
<td class="listing_lines" align="right"><pre>1
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">>></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">-></span><span class="normal">red_prec</span><span class="symbol">))</span><span class="normal"> </span><span class="symbol"><<</span><span class="normal"> visual</span><span class="symbol">-></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">>></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">-></span><span class="normal">green_prec</span><span class="symbol">))</span><span class="normal"> </span><span class="symbol"><<</span><span class="normal"> visual</span><span class="symbol">-></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">>></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">-></span><span class="normal">blue_prec</span><span class="symbol">))</span><span class="normal"> </span><span class="symbol"><<</span><span class="normal"> visual</span><span class="symbol">-></span><span class="normal">blue_shift</span><span class="symbol">);</span>
174
<span class="cbracket">}</span></pre></td>
181
<br class="example-break"><div class="variablelist"><table border="0" class="variablelist">
183
<col align="left" valign="top">
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>
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
206
A set of values that describe the manner in which the
207
pixel values for a visual are converted into RGB
210
<div class="variablelist"><table border="0" class="variablelist">
212
<col align="left" valign="top">
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.
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.
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.
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.
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.
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.
259
<div class="refsect2">
260
<a name="GdkByteOrder"></a><h3>enum GdkByteOrder</h3>
261
<pre class="programlisting">typedef enum {
267
A set of values describing the possible byte-orders
268
for storing pixel values in memory.
270
<div class="variablelist"><table border="0" class="variablelist">
272
<col align="left" valign="top">
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.
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.
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>
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.
305
The array returned by this function should not be freed.
307
<div class="variablelist"><table border="0" class="variablelist">
309
<col align="left" valign="top">
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>
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>
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>
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.
338
The array returned by this function should not be freed.
340
<div class="variablelist"><table border="0" class="variablelist">
342
<col align="left" valign="top">
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>
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>
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>
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.
369
Call <code class="function">g_list_free()</code> on the return value when you're finished with it.
371
<div class="variablelist"><table border="0" class="variablelist">
373
<col align="left" valign="top">
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>
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>
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
392
<div class="variablelist"><table border="0" class="variablelist">
394
<col align="left" valign="top">
398
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
399
<td>best available depth</td>
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>
408
Return the best available visual type for the default GDK screen.
410
<div class="variablelist"><table border="0" class="variablelist">
412
<col align="left" valign="top">
416
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
417
<td>best visual type</td>
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>
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.
430
<div class="variablelist"><table border="0" class="variablelist">
432
<col align="left" valign="top">
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>
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>
447
Get the visual with the most available colors for the default
448
GDK screen. The return value should not be freed.
450
<div class="variablelist"><table border="0" class="variablelist">
452
<col align="left" valign="top">
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>
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>
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>.
472
<div class="variablelist"><table border="0" class="variablelist">
474
<col align="left" valign="top">
479
<td><p><span class="term"><em class="parameter"><code>depth</code></em> :</span></p></td>
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>
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>
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>.
500
<div class="variablelist"><table border="0" class="variablelist">
502
<col align="left" valign="top">
507
<td><p><span class="term"><em class="parameter"><code>visual_type</code></em> :</span></p></td>
508
<td>a visual type</td>
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>
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>
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>.
526
<div class="variablelist"><table border="0" class="variablelist">
528
<col align="left" valign="top">
533
<td><p><span class="term"><em class="parameter"><code>depth</code></em> :</span></p></td>
537
<td><p><span class="term"><em class="parameter"><code>visual_type</code></em> :</span></p></td>
538
<td>a visual type</td>
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>
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)
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>
559
Deprecated equivalent of <code class="function">g_object_ref()</code>.
561
<div class="variablelist"><table border="0" class="variablelist">
563
<col align="left" valign="top">
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>
573
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
574
<td>the same visual</td>
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)
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>
589
Deprecated equivalent of <code class="function">g_object_unref()</code>.
591
<div class="variablelist"><table border="0" class="variablelist">
593
<col align="left" valign="top">
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>
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>
608
Gets the screen to which this visual belongs
610
<div class="variablelist"><table border="0" class="variablelist">
612
<col align="left" valign="top">
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>
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>
628
<p class="since">Since 2.2</p>
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>
635
Returns the number of significant bits per red, green and blue value.
637
<div class="variablelist"><table border="0" class="variablelist">
639
<col align="left" valign="top">
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>
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>
654
<p class="since">Since 2.22</p>
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>
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.
670
<div class="variablelist"><table border="0" class="variablelist">
672
<col align="left" valign="top">
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>
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>
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>
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>
698
<p class="since">Since 2.22</p>
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>
705
Returns the byte order of this visual.
707
<div class="variablelist"><table border="0" class="variablelist">
709
<col align="left" valign="top">
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>
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>
723
<p class="since">Since 2.22</p>
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>
730
Returns the size of a colormap for this visual.
732
<div class="variablelist"><table border="0" class="variablelist">
734
<col align="left" valign="top">
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>
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>
748
<p class="since">Since 2.22</p>
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>
755
Returns the bit depth of this visual.
757
<div class="variablelist"><table border="0" class="variablelist">
759
<col align="left" valign="top">
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>
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>
773
<p class="since">Since 2.22</p>
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>
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.
789
<div class="variablelist"><table border="0" class="variablelist">
791
<col align="left" valign="top">
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>
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>
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>
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>
817
<p class="since">Since 2.22</p>
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>
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.
833
<div class="variablelist"><table border="0" class="variablelist">
835
<col align="left" valign="top">
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>
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>
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>
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>
860
<p class="since">Since 2.22</p>
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>
867
Returns the type of visual this is (PseudoColor, TrueColor, etc).
869
<div class="variablelist"><table border="0" class="variablelist">
871
<col align="left" valign="top">
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>
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>
885
<p class="since">Since 2.22</p>
888
<div class="refsect1">
889
<a name="gdk2-Visuals.see-also"></a><h2>See Also</h2>
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>
897
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'