~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy

« back to all changes in this revision

Viewing changes to docs/reference/gdk/html/gdk-Images.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-05-04 12:24:25 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20070504122425-0m8midgzrp40y8w2
Tags: 2.10.12-1ubuntu1
* Sync with Debian
* New upstream version:
  Fixed bugs:
  - 379414 file chooser warnings when changing path in the entry
  - 418585 GtkFileChooserDefault sizing code is not DPI independent
  - 419568 Crash in search if start with special letter
  - 435062 build dies with icon cache validation
  - 379399 Segfault to call gtk_print_operation_run twice.
  - 387889 cups backend has problems when there are too many printers
  - 418531 invalid read to gtkicontheme.c gtk_icon_theme_lookup_icon...
  - 423916 crash in color scheme code
  - 424042 Segmentation fault while quickly pressing Alt+arrows
  - 415260 Protect against negative indices when setting values in G...
  - 419171 XGetVisualInfo() may not set nxvisuals
  - 128852 Gdk cursors don't look good on win32
  - 344657 Ctrl-H doesn't toggle "Show Hidden Files" setting
  - 345345 PrintOperation::paginate is not emitted for class handler
  - 347567 GtkPrintOperation::end-print is not emitted if it's cance...
  - 369112 gtk_ui_manager_add_ui should accept unnamed separator
  - 392015 Selected menu item invisible on Windows Vista
  - 399253 MS-Windows Theme Bottom Tab placement rendering glitches
  - 399425 gtk_input_dialog_fill_axes() adds child to gtkscrolledwin...
  - 403251 [patch] little memory leak in GtkPrintJob
  - 403267 [patch] memory leak in GtkPageSetupUnixDialog
  - 403470 MS-Windows Theme tab placement other than on top leaks a ...
  - 404506 Windows system fonts that have multi-byte font names cann...
  - 405089 Incorrect window placement for GtkEventBox private window
  - 405515 Minor leak in gtkfilesystemmodel.c
  - 405539 gdk_pixbuf_save() for PNG saver can return FALSE without ...
  - 415681 gdk_window_clear_area includes an extra line and column o...
  - 418219 GtkRecentChooser should apply filter before sorting and c...
  - 418403 Scroll to printer after selecting it from settings
  - 421985 _gtk_print_operation_platform_backend_launch_preview
  - 421990 gtk_print_job_get_surface
  - 421993 gtk_print_operation_init
  - 423064 Conditional jump or move depends on uninitialised value(s...
  - 423722 Fix printing header in gtk-demo
  - 424168 gtk_print_operation_run on async preview
  - 425655 Don't install gtk+-unix-print-2.0.pc on non-UNIX platforms
  - 425786 GDK segfaults if XineramaQueryScreens fails
  - 428665 Lpr Backend gets stuck in infinite loop during gtk_enumer...
  - 429902 GtkPrintOperation leaks cairo contextes
  - 431997 First delay of GdkPixbufAnimationIter is wrong
  - 433242 Inconsistent scroll arrow position calculations
  - 433972 Placing gtk.Expander inside a gtk.TextView() changes gtk....
  - 434261 _gtk_toolbar_elide_underscores incorrectly handles some s...
  - 383354 ctrl-L should make 'Location' entry disappear
  - 418673 gtk_recent_manager_add_item
  - 429732 gtk_accel_group_finalize accesses invalid memory
  - 435028 WM_CLIENT_LEADER is wrong on the leader_window
  - 431067 Background of the header window is not updated
  - 338843 add recent files support inside the ui manager
  - 148535 add drop shadow to menus, tooltips, etc. under Windows XP
* debian/control.in:
  - Conflicts on ubuntulooks (<= 0.9.11-1)
* debian/patches/15_default-fallback-icon-theme.patch:
  - patch from Debian, fallback on gnome icon theme

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=US-ASCII">
 
5
<title>Images</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
 
7
<link rel="start" href="index.html" title="GDK Reference Manual">
 
8
<link rel="up" href="reference.html" title="API Reference">
 
9
<link rel="prev" href="gdk-GdkRGB.html" title="GdkRGB">
 
10
<link rel="next" href="gdk-Pixbufs.html" title="Pixbufs">
 
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
<link rel="reference" href="reference.html" title="API Reference">
 
14
<link rel="index" href="ix01.html" title="Index">
 
15
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
 
16
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
 
17
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
 
18
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
 
19
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
 
20
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
 
21
</head>
 
22
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
23
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
24
<tr valign="middle">
 
25
<td><a accesskey="p" href="gdk-GdkRGB.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
26
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
27
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
28
<th width="100%" align="center">GDK Reference Manual</th>
 
29
<td><a accesskey="n" href="gdk-Pixbufs.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
30
</tr>
 
31
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2649109" class="shortcut">Top</a>
 
32
                  &#160;|&#160;
 
33
                  <a href="#id2649478" class="shortcut">Description</a></nobr></td></tr>
 
34
</table>
 
35
<div class="refentry" lang="en">
 
36
<a name="gdk-Images"></a><div class="titlepage"></div>
 
37
<div class="refnamediv"><table width="100%"><tr>
 
38
<td valign="top">
 
39
<h2>
 
40
<a name="id2649109"></a><span class="refentrytitle">Images</span>
 
41
</h2>
 
42
<p>Images &#8212; A client-side area for bit-mapped graphics</p>
 
43
</td>
 
44
<td valign="top" align="right"></td>
 
45
</tr></table></div>
 
46
<div class="refsynopsisdiv">
 
47
<h2>Synopsis</h2>
 
48
<pre class="synopsis">
 
49
 
 
50
#include &lt;gdk/gdk.h&gt;
 
51
 
 
52
 
 
53
                    <a href="gdk-Images.html#GdkImage">GdkImage</a>;
 
54
<a href="gdk-Images.html#GdkImage">GdkImage</a>*           <a href="gdk-Images.html#gdk-image-new">gdk_image_new</a>                       (<a href="gdk-Images.html#GdkImageType">GdkImageType</a> type,
 
55
                                                         <a href="gdk-Visuals.html#GdkVisual">GdkVisual</a> *visual,
 
56
                                                         gint width,
 
57
                                                         gint height);
 
58
enum                <a href="gdk-Images.html#GdkImageType">GdkImageType</a>;
 
59
<a href="gdk-Images.html#GdkImage">GdkImage</a>*           <a href="gdk-Images.html#gdk-image-new-bitmap">gdk_image_new_bitmap</a>                (<a href="gdk-Visuals.html#GdkVisual">GdkVisual</a> *visual,
 
60
                                                         gpointer data,
 
61
                                                         gint width,
 
62
                                                         gint height);
 
63
<a href="gdk-Images.html#GdkImage">GdkImage</a>*           <a href="gdk-Images.html#gdk-image-get">gdk_image_get</a>                       (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
 
64
                                                         gint x,
 
65
                                                         gint y,
 
66
                                                         gint width,
 
67
                                                         gint height);
 
68
<a href="gdk-Images.html#GdkImage">GdkImage</a>*           <a href="gdk-Images.html#gdk-image-ref">gdk_image_ref</a>                       (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);
 
69
void                <a href="gdk-Images.html#gdk-image-unref">gdk_image_unref</a>                     (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);
 
70
#define             <a href="gdk-Images.html#gdk-image-destroy">gdk_image_destroy</a>
 
71
<a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a>*        <a href="gdk-Images.html#gdk-image-get-colormap">gdk_image_get_colormap</a>              (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);
 
72
void                <a href="gdk-Images.html#gdk-image-set-colormap">gdk_image_set_colormap</a>              (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
 
73
                                                         <a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap);
 
74
 
 
75
void                <a href="gdk-Images.html#gdk-image-put-pixel">gdk_image_put_pixel</a>                 (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
 
76
                                                         gint x,
 
77
                                                         gint y,
 
78
                                                         guint32 pixel);
 
79
guint32             <a href="gdk-Images.html#gdk-image-get-pixel">gdk_image_get_pixel</a>                 (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
 
80
                                                         gint x,
 
81
                                                         gint y);
 
82
 
 
83
 
 
84
</pre>
 
85
</div>
 
86
<div class="refsect1" lang="en">
 
87
<a name="id2649478"></a><h2>Description</h2>
 
88
<p>
 
89
The <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> type represents an area for drawing graphics.
 
90
It has now been superceded to a large extent by the much more flexible
 
91
<a href="gdk-GdkRGB.html" title="GdkRGB">GdkRGB</a> functions.
 
92
</p>
 
93
<p>
 
94
To create an empty <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> use <a href="gdk-Images.html#gdk-image-new"><code class="function">gdk_image_new()</code></a>.
 
95
To create a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> from bitmap data use <a href="gdk-Images.html#gdk-image-new-bitmap"><code class="function">gdk_image_new_bitmap()</code></a>.
 
96
To create an image from part of a <a href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> use <a href="gdk-Drawing-Primitives.html#gdk-drawable-get-image"><code class="function">gdk_drawable_get_image()</code></a>.
 
97
</p>
 
98
<p>
 
99
The image can be manipulated with <a href="gdk-Images.html#gdk-image-get-pixel"><code class="function">gdk_image_get_pixel()</code></a> and
 
100
<a href="gdk-Images.html#gdk-image-put-pixel"><code class="function">gdk_image_put_pixel()</code></a>, or alternatively by changing the actual pixel data.
 
101
Though manipulating the pixel data requires complicated code to cope with
 
102
the different formats that may be used.
 
103
</p>
 
104
<p>
 
105
To draw a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> in a <a href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> or <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> use <a href="gdk-Drawing-Primitives.html#gdk-draw-image"><code class="function">gdk_draw_image()</code></a>.
 
106
</p>
 
107
<p>
 
108
To destroy a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> use <a href="gdk-Images.html#gdk-image-destroy"><code class="function">gdk_image_destroy()</code></a>.
 
109
</p>
 
110
</div>
 
111
<div class="refsect1" lang="en">
 
112
<a name="id2649658"></a><h2>Details</h2>
 
113
<div class="refsect2" lang="en">
 
114
<a name="id2649669"></a><h3>
 
115
<a name="GdkImage"></a>GdkImage</h3>
 
116
<a class="indexterm" name="id2649681"></a><pre class="programlisting">typedef struct {
 
117
  GObject parent_instance;
 
118
 
 
119
  
 
120
  GdkImageType  type; /* read only. */
 
121
  GdkVisual    *visual;     /* read only. visual used to create the image */
 
122
  GdkByteOrder  byte_order; /* read only. */
 
123
  gint          width; /* read only. */
 
124
  gint          height; /* read only. */
 
125
  guint16       depth; /* read only. */
 
126
  guint16       bpp;            /* read only. bytes per pixel */
 
127
  guint16       bpl;            /* read only. bytes per line */
 
128
  guint16       bits_per_pixel; /* read only. bits per pixel */
 
129
  gpointer      mem;
 
130
 
 
131
  GdkColormap  *colormap; /* read only. */
 
132
} GdkImage;
 
133
</pre>
 
134
<p>
 
135
The <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> struct contains information on the image and the pixel data.
 
136
</p>
 
137
<div class="variablelist"><table border="0">
 
138
<col align="left" valign="top">
 
139
<tbody>
 
140
<tr>
 
141
<td><span class="term">GObject&#160;<em class="structfield"><code>parent_instance</code></em>;</span></td>
 
142
<td>the parent instance
 
143
</td>
 
144
</tr>
 
145
<tr>
 
146
<td><span class="term"><a href="gdk-Images.html#GdkImageType">GdkImageType</a>&#160;<em class="structfield"><code>type</code></em>;</span></td>
 
147
<td>the type of the image.
 
148
</td>
 
149
</tr>
 
150
<tr>
 
151
<td><span class="term"><a href="gdk-Visuals.html#GdkVisual">GdkVisual</a>&#160;*<em class="structfield"><code>visual</code></em>;</span></td>
 
152
<td>the visual.
 
153
</td>
 
154
</tr>
 
155
<tr>
 
156
<td><span class="term"><a href="gdk-Visuals.html#GdkByteOrder">GdkByteOrder</a>&#160;<em class="structfield"><code>byte_order</code></em>;</span></td>
 
157
<td>the byte order.
 
158
</td>
 
159
</tr>
 
160
<tr>
 
161
<td><span class="term">gint&#160;<em class="structfield"><code>width</code></em>;</span></td>
 
162
<td>the width of the image in pixels.
 
163
</td>
 
164
</tr>
 
165
<tr>
 
166
<td><span class="term">gint&#160;<em class="structfield"><code>height</code></em>;</span></td>
 
167
<td>the height of the image in pixels.
 
168
</td>
 
169
</tr>
 
170
<tr>
 
171
<td><span class="term">guint16&#160;<em class="structfield"><code>depth</code></em>;</span></td>
 
172
<td>the depth of the image, i.e. the number of bits per pixel.
 
173
</td>
 
174
</tr>
 
175
<tr>
 
176
<td><span class="term">guint16&#160;<em class="structfield"><code>bpp</code></em>;</span></td>
 
177
<td>the number of bytes per pixel.
 
178
</td>
 
179
</tr>
 
180
<tr>
 
181
<td><span class="term">guint16&#160;<em class="structfield"><code>bpl</code></em>;</span></td>
 
182
<td>the number of bytes per line of the image.
 
183
</td>
 
184
</tr>
 
185
<tr>
 
186
<td><span class="term">guint16&#160;<em class="structfield"><code>bits_per_pixel</code></em>;</span></td>
 
187
<td>the number of bits per pixel.
 
188
</td>
 
189
</tr>
 
190
<tr>
 
191
<td><span class="term">gpointer&#160;<em class="structfield"><code>mem</code></em>;</span></td>
 
192
<td>the pixel data.
 
193
</td>
 
194
</tr>
 
195
<tr>
 
196
<td><span class="term"><a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a>&#160;*<em class="structfield"><code>colormap</code></em>;</span></td>
 
197
<td>the <a href="gdk-Colormaps-and-Colors.html#GdkColormap"><span class="type">GdkColormap</span></a> associated with the image
 
198
 
 
199
</td>
 
200
</tr>
 
201
</tbody>
 
202
</table></div>
 
203
</div>
 
204
<hr>
 
205
<div class="refsect2" lang="en">
 
206
<a name="id2649978"></a><h3>
 
207
<a name="gdk-image-new"></a>gdk_image_new ()</h3>
 
208
<a class="indexterm" name="id2649990"></a><pre class="programlisting"><a href="gdk-Images.html#GdkImage">GdkImage</a>*           gdk_image_new                       (<a href="gdk-Images.html#GdkImageType">GdkImageType</a> type,
 
209
                                                         <a href="gdk-Visuals.html#GdkVisual">GdkVisual</a> *visual,
 
210
                                                         gint width,
 
211
                                                         gint height);</pre>
 
212
<p>
 
213
Creates a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
 
214
</p>
 
215
<div class="variablelist"><table border="0">
 
216
<col align="left" valign="top">
 
217
<tbody>
 
218
<tr>
 
219
<td><span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
 
220
<td>the type of the <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>, one of <a href="gdk-Images.html#GDK-IMAGE-NORMAL:CAPS"><code class="literal">GDK_IMAGE_NORMAL</code></a>, <a href="gdk-Images.html#GDK-IMAGE-SHARED:CAPS"><code class="literal">GDK_IMAGE_SHARED</code></a>
 
221
and <a href="gdk-Images.html#GDK-IMAGE-FASTEST:CAPS"><code class="literal">GDK_IMAGE_FASTEST</code></a>. <a href="gdk-Images.html#GDK-IMAGE-FASTEST:CAPS"><code class="literal">GDK_IMAGE_FASTEST</code></a> is probably the best choice, since
 
222
it will try creating a <a href="gdk-Images.html#GDK-IMAGE-SHARED:CAPS"><code class="literal">GDK_IMAGE_SHARED</code></a> image first and if that fails it will
 
223
then use <a href="gdk-Images.html#GDK-IMAGE-NORMAL:CAPS"><code class="literal">GDK_IMAGE_NORMAL</code></a>.
 
224
</td>
 
225
</tr>
 
226
<tr>
 
227
<td><span class="term"><em class="parameter"><code>visual</code></em>&#160;:</span></td>
 
228
<td>the <a href="gdk-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> to use for the image.
 
229
</td>
 
230
</tr>
 
231
<tr>
 
232
<td><span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
 
233
<td>the width of the image in pixels.
 
234
</td>
 
235
</tr>
 
236
<tr>
 
237
<td><span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
 
238
<td>the height of the image in pixels.
 
239
</td>
 
240
</tr>
 
241
<tr>
 
242
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
243
<td>a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>, or <a
 
244
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
 
245
><code class="literal">NULL</code></a> if the image could not be created.
 
246
 
 
247
 
 
248
</td>
 
249
</tr>
 
250
</tbody>
 
251
</table></div>
 
252
</div>
 
253
<hr>
 
254
<div class="refsect2" lang="en">
 
255
<a name="id2650226"></a><h3>
 
256
<a name="GdkImageType"></a>enum GdkImageType</h3>
 
257
<a class="indexterm" name="id2650238"></a><pre class="programlisting">typedef enum
 
258
{
 
259
  GDK_IMAGE_NORMAL,
 
260
  GDK_IMAGE_SHARED,
 
261
  GDK_IMAGE_FASTEST
 
262
} GdkImageType;
 
263
</pre>
 
264
<p>
 
265
Specifies the type of a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
 
266
</p>
 
267
<div class="variablelist"><table border="0">
 
268
<col align="left" valign="top">
 
269
<tbody>
 
270
<tr>
 
271
<td><span class="term"><a name="GDK-IMAGE-NORMAL:CAPS"></a><code class="literal">GDK_IMAGE_NORMAL</code></span></td>
 
272
<td>The original X image type, which is quite slow since the
 
273
image has to be transferred from the client to the server to display it.
 
274
</td>
 
275
</tr>
 
276
<tr>
 
277
<td><span class="term"><a name="GDK-IMAGE-SHARED:CAPS"></a><code class="literal">GDK_IMAGE_SHARED</code></span></td>
 
278
<td>A faster image type, which uses shared memory to transfer
 
279
the image data between client and server. However this will only be available
 
280
if client and server are on the same machine and the shared memory extension
 
281
is supported by the server.
 
282
</td>
 
283
</tr>
 
284
<tr>
 
285
<td><span class="term"><a name="GDK-IMAGE-FASTEST:CAPS"></a><code class="literal">GDK_IMAGE_FASTEST</code></span></td>
 
286
<td>Specifies that <a href="gdk-Images.html#GDK-IMAGE-SHARED:CAPS"><code class="literal">GDK_IMAGE_SHARED</code></a> should be tried first,
 
287
and if that fails then <a href="gdk-Images.html#GDK-IMAGE-NORMAL:CAPS"><code class="literal">GDK_IMAGE_NORMAL</code></a> will be used.
 
288
 
 
289
</td>
 
290
</tr>
 
291
</tbody>
 
292
</table></div>
 
293
</div>
 
294
<hr>
 
295
<div class="refsect2" lang="en">
 
296
<a name="id2650362"></a><h3>
 
297
<a name="gdk-image-new-bitmap"></a>gdk_image_new_bitmap ()</h3>
 
298
<a class="indexterm" name="id2650377"></a><pre class="programlisting"><a href="gdk-Images.html#GdkImage">GdkImage</a>*           gdk_image_new_bitmap                (<a href="gdk-Visuals.html#GdkVisual">GdkVisual</a> *visual,
 
299
                                                         gpointer data,
 
300
                                                         gint width,
 
301
                                                         gint height);</pre>
 
302
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
303
<h3 class="title">Warning</h3>
 
304
<p><code class="literal">gdk_image_new_bitmap</code> is deprecated and should not be used in newly-written code.</p>
 
305
</div>
 
306
<p>
 
307
Creates a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> with a depth of 1 from the given data.
 
308
</p>
 
309
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
310
<h3 class="title">Warning</h3>
 
311
<p>THIS FUNCTION IS INCREDIBLY BROKEN. The passed-in data must 
 
312
be allocated by <code class="function">malloc()</code> (NOT <code class="function">g_malloc()</code>) and will be freed when the 
 
313
image is freed.</p>
 
314
</div>
 
315
<p>
 
316
</p>
 
317
<div class="variablelist"><table border="0">
 
318
<col align="left" valign="top">
 
319
<tbody>
 
320
<tr>
 
321
<td><span class="term"><em class="parameter"><code>visual</code></em>&#160;:</span></td>
 
322
<td> the <a href="gdk-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> to use for the image.
 
323
</td>
 
324
</tr>
 
325
<tr>
 
326
<td><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
 
327
<td> the pixel data. 
 
328
</td>
 
329
</tr>
 
330
<tr>
 
331
<td><span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
 
332
<td> the width of the image in pixels. 
 
333
</td>
 
334
</tr>
 
335
<tr>
 
336
<td><span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
 
337
<td> the height of the image in pixels. 
 
338
</td>
 
339
</tr>
 
340
<tr>
 
341
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
342
<td> a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
 
343
</td>
 
344
</tr>
 
345
</tbody>
 
346
</table></div>
 
347
</div>
 
348
<hr>
 
349
<div class="refsect2" lang="en">
 
350
<a name="id2650569"></a><h3>
 
351
<a name="gdk-image-get"></a>gdk_image_get ()</h3>
 
352
<a class="indexterm" name="id2650585"></a><pre class="programlisting"><a href="gdk-Images.html#GdkImage">GdkImage</a>*           gdk_image_get                       (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,
 
353
                                                         gint x,
 
354
                                                         gint y,
 
355
                                                         gint width,
 
356
                                                         gint height);</pre>
 
357
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
358
<h3 class="title">Warning</h3>
 
359
<p><code class="literal">gdk_image_get</code> is deprecated and should not be used in newly-written code.</p>
 
360
</div>
 
361
<p>
 
362
This is a deprecated wrapper for <a href="gdk-Drawing-Primitives.html#gdk-drawable-get-image"><code class="function">gdk_drawable_get_image()</code></a>;
 
363
<a href="gdk-Drawing-Primitives.html#gdk-drawable-get-image"><code class="function">gdk_drawable_get_image()</code></a> should be used instead. Or even better: in
 
364
most cases <a href="gdk-Pixbufs.html#gdk-pixbuf-get-from-drawable"><code class="function">gdk_pixbuf_get_from_drawable()</code></a> is the most convenient
 
365
choice.</p>
 
366
<p>
 
367
</p>
 
368
<div class="variablelist"><table border="0">
 
369
<col align="left" valign="top">
 
370
<tbody>
 
371
<tr>
 
372
<td><span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
 
373
<td> a <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>
 
374
</td>
 
375
</tr>
 
376
<tr>
 
377
<td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
 
378
<td> x coordinate in <em class="parameter"><code>window</code></em>
 
379
</td>
 
380
</tr>
 
381
<tr>
 
382
<td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
 
383
<td> y coordinate in <em class="parameter"><code>window</code></em>
 
384
</td>
 
385
</tr>
 
386
<tr>
 
387
<td><span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></td>
 
388
<td> width of area in <em class="parameter"><code>window</code></em>
 
389
</td>
 
390
</tr>
 
391
<tr>
 
392
<td><span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></td>
 
393
<td> height of area in <em class="parameter"><code>window</code></em>
 
394
</td>
 
395
</tr>
 
396
<tr>
 
397
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
398
<td> a new <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> or <a
 
399
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
 
400
><code class="literal">NULL</code></a>
 
401
</td>
 
402
</tr>
 
403
</tbody>
 
404
</table></div>
 
405
</div>
 
406
<hr>
 
407
<div class="refsect2" lang="en">
 
408
<a name="id2650827"></a><h3>
 
409
<a name="gdk-image-ref"></a>gdk_image_ref ()</h3>
 
410
<a class="indexterm" name="id2650842"></a><pre class="programlisting"><a href="gdk-Images.html#GdkImage">GdkImage</a>*           gdk_image_ref                       (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);</pre>
 
411
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
412
<h3 class="title">Warning</h3>
 
413
<p><code class="literal">gdk_image_ref</code> is deprecated and should not be used in newly-written code.</p>
 
414
</div>
 
415
<p>
 
416
Deprecated function; use <code class="function">g_object_ref()</code> instead.</p>
 
417
<p>
 
418
 
 
419
</p>
 
420
<div class="variablelist"><table border="0">
 
421
<col align="left" valign="top">
 
422
<tbody>
 
423
<tr>
 
424
<td><span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
 
425
<td> a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>
 
426
</td>
 
427
</tr>
 
428
<tr>
 
429
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
430
<td> the image
 
431
</td>
 
432
</tr>
 
433
</tbody>
 
434
</table></div>
 
435
</div>
 
436
<hr>
 
437
<div class="refsect2" lang="en">
 
438
<a name="id2650933"></a><h3>
 
439
<a name="gdk-image-unref"></a>gdk_image_unref ()</h3>
 
440
<a class="indexterm" name="id2650949"></a><pre class="programlisting">void                gdk_image_unref                     (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);</pre>
 
441
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
442
<h3 class="title">Warning</h3>
 
443
<p><code class="literal">gdk_image_unref</code> is deprecated and should not be used in newly-written code.</p>
 
444
</div>
 
445
<p>
 
446
Deprecated function; use <code class="function">g_object_unref()</code> instead.</p>
 
447
<p>
 
448
 
 
449
</p>
 
450
<div class="variablelist"><table border="0">
 
451
<col align="left" valign="top">
 
452
<tbody><tr>
 
453
<td><span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
 
454
<td> a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>
 
455
</td>
 
456
</tr></tbody>
 
457
</table></div>
 
458
</div>
 
459
<hr>
 
460
<div class="refsect2" lang="en">
 
461
<a name="id2651029"></a><h3>
 
462
<a name="gdk-image-destroy"></a>gdk_image_destroy</h3>
 
463
<a class="indexterm" name="id2651045"></a><pre class="programlisting">#define gdk_image_destroy              gdk_image_unref
 
464
</pre>
 
465
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
466
<h3 class="title">Warning</h3>
 
467
<p><code class="literal">gdk_image_destroy</code> is deprecated and should not be used in newly-written code.</p>
 
468
</div>
 
469
<p>
 
470
Destroys a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>, freeing any resources allocated for it.
 
471
</p>
 
472
</div>
 
473
<hr>
 
474
<div class="refsect2" lang="en">
 
475
<a name="id2651082"></a><h3>
 
476
<a name="gdk-image-get-colormap"></a>gdk_image_get_colormap ()</h3>
 
477
<a class="indexterm" name="id2651095"></a><pre class="programlisting"><a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a>*        gdk_image_get_colormap              (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image);</pre>
 
478
<p>
 
479
Retrieves the colormap for a given image, if it exists.  An image
 
480
will have a colormap if the drawable from which it was created has
 
481
a colormap, or if a colormap was set explicitely with
 
482
<a href="gdk-Images.html#gdk-image-set-colormap"><code class="function">gdk_image_set_colormap()</code></a>.</p>
 
483
<p>
 
484
 
 
485
</p>
 
486
<div class="variablelist"><table border="0">
 
487
<col align="left" valign="top">
 
488
<tbody>
 
489
<tr>
 
490
<td><span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
 
491
<td> a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>
 
492
</td>
 
493
</tr>
 
494
<tr>
 
495
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
496
<td> colormap for the image
 
497
</td>
 
498
</tr>
 
499
</tbody>
 
500
</table></div>
 
501
</div>
 
502
<hr>
 
503
<div class="refsect2" lang="en">
 
504
<a name="id2651177"></a><h3>
 
505
<a name="gdk-image-set-colormap"></a>gdk_image_set_colormap ()</h3>
 
506
<a class="indexterm" name="id2651190"></a><pre class="programlisting">void                gdk_image_set_colormap              (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
 
507
                                                         <a href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap);</pre>
 
508
<p>
 
509
Sets the colormap for the image to the given colormap.  Normally
 
510
there's no need to use this function, images are created with the
 
511
correct colormap if you get the image from a drawable. If you
 
512
create the image from scratch, use the colormap of the drawable you
 
513
intend to render the image to.</p>
 
514
<p>
 
515
 
 
516
</p>
 
517
<div class="variablelist"><table border="0">
 
518
<col align="left" valign="top">
 
519
<tbody>
 
520
<tr>
 
521
<td><span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
 
522
<td> a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>
 
523
</td>
 
524
</tr>
 
525
<tr>
 
526
<td><span class="term"><em class="parameter"><code>colormap</code></em>&#160;:</span></td>
 
527
<td> a <a href="gdk-Colormaps-and-Colors.html#GdkColormap"><span class="type">GdkColormap</span></a>
 
528
</td>
 
529
</tr>
 
530
</tbody>
 
531
</table></div>
 
532
</div>
 
533
<hr>
 
534
<div class="refsect2" lang="en">
 
535
<a name="id2651282"></a><h3>
 
536
<a name="gdk-image-put-pixel"></a>gdk_image_put_pixel ()</h3>
 
537
<a class="indexterm" name="id2651295"></a><pre class="programlisting">void                gdk_image_put_pixel                 (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
 
538
                                                         gint x,
 
539
                                                         gint y,
 
540
                                                         guint32 pixel);</pre>
 
541
<p>
 
542
Sets a pixel in a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a> to a given pixel value.
 
543
</p>
 
544
<div class="variablelist"><table border="0">
 
545
<col align="left" valign="top">
 
546
<tbody>
 
547
<tr>
 
548
<td><span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
 
549
<td>a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
 
550
</td>
 
551
</tr>
 
552
<tr>
 
553
<td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
 
554
<td>the x coordinate of the pixel to set.
 
555
</td>
 
556
</tr>
 
557
<tr>
 
558
<td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
 
559
<td>the y coordinate of the pixel to set.
 
560
</td>
 
561
</tr>
 
562
<tr>
 
563
<td><span class="term"><em class="parameter"><code>pixel</code></em>&#160;:</span></td>
 
564
<td>the pixel value to set.
 
565
 
 
566
 
 
567
</td>
 
568
</tr>
 
569
</tbody>
 
570
</table></div>
 
571
</div>
 
572
<hr>
 
573
<div class="refsect2" lang="en">
 
574
<a name="id2651422"></a><h3>
 
575
<a name="gdk-image-get-pixel"></a>gdk_image_get_pixel ()</h3>
 
576
<a class="indexterm" name="id2651436"></a><pre class="programlisting">guint32             gdk_image_get_pixel                 (<a href="gdk-Images.html#GdkImage">GdkImage</a> *image,
 
577
                                                         gint x,
 
578
                                                         gint y);</pre>
 
579
<p>
 
580
Gets a pixel value at a specified position in a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
 
581
</p>
 
582
<div class="variablelist"><table border="0">
 
583
<col align="left" valign="top">
 
584
<tbody>
 
585
<tr>
 
586
<td><span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
 
587
<td>a <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>.
 
588
</td>
 
589
</tr>
 
590
<tr>
 
591
<td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
 
592
<td>the x coordinate of the pixel to get.
 
593
</td>
 
594
</tr>
 
595
<tr>
 
596
<td><span class="term"><em class="parameter"><code>y</code></em>&#160;:</span></td>
 
597
<td>the y coordinate of the pixel to get.
 
598
</td>
 
599
</tr>
 
600
<tr>
 
601
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
602
<td>the pixel value at the given position.
 
603
 
 
604
 
 
605
</td>
 
606
</tr>
 
607
</tbody>
 
608
</table></div>
 
609
</div>
 
610
</div>
 
611
<div class="refsect1" lang="en">
 
612
<a name="id2651554"></a><h2>See Also</h2>
 
613
<p>
 
614
</p>
 
615
<div class="variablelist"><table border="0">
 
616
<col align="left" valign="top">
 
617
<tbody>
 
618
<tr>
 
619
<td><span class="term"><a href="gdk-Bitmaps-and-Pixmaps.html" title="Bitmaps and Pixmaps">Bitmaps and Pixmaps</a></span></td>
 
620
<td><p>
 
621
Graphics which are stored on the X Windows server.
 
622
Since these are stored on the server they can be drawn very quickly, and all
 
623
of the <a href="gdk-Drawing-Primitives.html" title="Drawing Primitives">Drawing Primitives</a> can be
 
624
used to draw on them. Their main disadvantage is that manipulating individual
 
625
pixels can be very slow.
 
626
</p></td>
 
627
</tr>
 
628
<tr>
 
629
<td><span class="term"><a href="gdk-GdkRGB.html" title="GdkRGB">GdkRGB</a></span></td>
 
630
<td><p>
 
631
Built on top of <a href="gdk-Images.html#GdkImage"><span class="type">GdkImage</span></a>, this provides much more functionality,
 
632
including the dithering of colors to produce better output on low-color
 
633
displays.
 
634
</p></td>
 
635
</tr>
 
636
</tbody>
 
637
</table></div>
 
638
<p>
 
639
</p>
 
640
</div>
 
641
</div>
 
642
</body>
 
643
</html>