~bratsche/ubuntu/maverick/gtk+2.0/menu-activation-fix

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Cairo Interaction</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
<link rel="start" href="index.html" title="GDK Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk-Pango-Interaction.html" title="Pango Interaction">
<link rel="next" href="gdk-X-Window-System-Interaction.html" title="X Window System Interaction">
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="reference" href="reference.html" title="API Reference">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gdk-Pango-Interaction.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK Reference Manual</th>
<td><a accesskey="n" href="gdk-X-Window-System-Interaction.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2869305" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2869526" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gdk-Cairo-Interaction"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2869305"></a><span class="refentrytitle">Cairo Interaction</span>
</h2>
<p>Cairo Interaction &#8212; Functions to support using Cairo</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;gdk/gdk.h&gt;


<a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
>cairo_t</a>*            <a href="gdk-Cairo-Interaction.html#gdk-cairo-create">gdk_cairo_create</a>                    (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable);
void                <a href="gdk-Cairo-Interaction.html#gdk-cairo-set-source-color">gdk_cairo_set_source_color</a>          (<a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
>cairo_t</a> *cr,
                                                         <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *color);
void                <a href="gdk-Cairo-Interaction.html#gdk-cairo-set-source-pixbuf">gdk_cairo_set_source_pixbuf</a>         (<a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
>cairo_t</a> *cr,
                                                         <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a> *pixbuf,
                                                         double pixbuf_x,
                                                         double pixbuf_y);
void                <a href="gdk-Cairo-Interaction.html#gdk-cairo-set-source-pixmap">gdk_cairo_set_source_pixmap</a>         (<a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
>cairo_t</a> *cr,
                                                         <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a> *pixmap,
                                                         double pixmap_x,
                                                         double pixmap_y);
void                <a href="gdk-Cairo-Interaction.html#gdk-cairo-rectangle">gdk_cairo_rectangle</a>                 (<a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
>cairo_t</a> *cr,
                                                         <a href="gdk-Points-Rectangles-and-Regions.html#GdkRectangle">GdkRectangle</a> *rectangle);
void                <a href="gdk-Cairo-Interaction.html#gdk-cairo-region">gdk_cairo_region</a>                    (<a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
>cairo_t</a> *cr,
                                                         <a href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *region);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2869526"></a><h2>Description</h2>
<p>
Cairo is a graphics 
library that supports vector graphics and image compositing that
can be used with GDK. Since 2.8, GTK+ does most of its drawing
using Cairo. 
</p>
<p>
GDK does not wrap the Cairo API, instead it allows to create Cairo 
contexts which can be used to draw on GDK drawables. Additional
functions allow to convert GDK's rectangles and regions into
Cairo paths and to use pixbufs as sources for drawing operations.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2869557"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2869567"></a><h3>
<a name="gdk-cairo-create"></a>gdk_cairo_create ()</h3>
<a class="indexterm" name="id2869582"></a><pre class="programlisting"><a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
>cairo_t</a>*            gdk_cairo_create                    (<a href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable);</pre>
<p>
Creates a Cairo context for drawing to <em class="parameter"><code>drawable</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></td>
<td> a <a href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> A newly created Cairo context. Free with
 <a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-destroy"
><code class="function">cairo_destroy()</code></a> when you are done drawing.

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2869676"></a><h3>
<a name="gdk-cairo-set-source-color"></a>gdk_cairo_set_source_color ()</h3>
<a class="indexterm" name="id2869692"></a><pre class="programlisting">void                gdk_cairo_set_source_color          (<a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
>cairo_t</a> *cr,
                                                         <a href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *color);</pre>
<p>
Sets the specified <a href="gdk-Colormaps-and-Colors.html#GdkColor"><span class="type">GdkColor</span></a> as the source color of <em class="parameter"><code>cr</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a <a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>color</code></em>&#160;:</span></td>
<td> a <a href="gdk-Colormaps-and-Colors.html#GdkColor"><span class="type">GdkColor</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2869799"></a><h3>
<a name="gdk-cairo-set-source-pixbuf"></a>gdk_cairo_set_source_pixbuf ()</h3>
<a class="indexterm" name="id2869815"></a><pre class="programlisting">void                gdk_cairo_set_source_pixbuf         (<a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
>cairo_t</a> *cr,
                                                         <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a> *pixbuf,
                                                         double pixbuf_x,
                                                         double pixbuf_y);</pre>
<p>
Sets the given pixbuf as the source pattern for the Cairo context.
The pattern has an extend mode of <a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-Patterns.html#CAIRO-EXTEND-NONE:CAPS"
><code class="literal">CAIRO_EXTEND_NONE</code></a> and is aligned
so that the origin of <em class="parameter"><code>pixbuf</code></em> is <em class="parameter"><code>pixbuf_x</code></em>, <em class="parameter"><code>pixbuf_y</code></em></p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a <span class="type">Cairo</span> context
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></td>
<td> a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>pixbuf_x</code></em>&#160;:</span></td>
<td> X coordinate of location to place upper left corner of <em class="parameter"><code>pixbuf</code></em>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>pixbuf_y</code></em>&#160;:</span></td>
<td> Y coordinate of location to place upper left corner of <em class="parameter"><code>pixbuf</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2869996"></a><h3>
<a name="gdk-cairo-set-source-pixmap"></a>gdk_cairo_set_source_pixmap ()</h3>
<a class="indexterm" name="id2870012"></a><pre class="programlisting">void                gdk_cairo_set_source_pixmap         (<a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
>cairo_t</a> *cr,
                                                         <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a> *pixmap,
                                                         double pixmap_x,
                                                         double pixmap_y);</pre>
<p>
Sets the given pixmap as the source pattern for the Cairo context.
The pattern has an extend mode of <a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-Patterns.html#CAIRO-EXTEND-NONE:CAPS"
><code class="literal">CAIRO_EXTEND_NONE</code></a> and is aligned
so that the origin of <em class="parameter"><code>pixmap</code></em> is <em class="parameter"><code>pixmap_x</code></em>, <em class="parameter"><code>pixmap_y</code></em></p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a <span class="type">Cairo</span> context
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>pixmap</code></em>&#160;:</span></td>
<td> a <a href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>pixmap_x</code></em>&#160;:</span></td>
<td> X coordinate of location to place upper left corner of <em class="parameter"><code>pixmap</code></em>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>pixmap_y</code></em>&#160;:</span></td>
<td> Y coordinate of location to place upper left corner of <em class="parameter"><code>pixmap</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2870192"></a><h3>
<a name="gdk-cairo-rectangle"></a>gdk_cairo_rectangle ()</h3>
<a class="indexterm" name="id2870207"></a><pre class="programlisting">void                gdk_cairo_rectangle                 (<a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
>cairo_t</a> *cr,
                                                         <a href="gdk-Points-Rectangles-and-Regions.html#GdkRectangle">GdkRectangle</a> *rectangle);</pre>
<p>
Adds the given rectangle to the current path of <em class="parameter"><code>cr</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a <a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>rectangle</code></em>&#160;:</span></td>
<td> a <a href="gdk-Points-Rectangles-and-Regions.html#GdkRectangle"><span class="type">GdkRectangle</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2870307"></a><h3>
<a name="gdk-cairo-region"></a>gdk_cairo_region ()</h3>
<a class="indexterm" name="id2870322"></a><pre class="programlisting">void                gdk_cairo_region                    (<a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
>cairo_t</a> *cr,
                                                         <a href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *region);</pre>
<p>
Adds the given region to the current path of <em class="parameter"><code>cr</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td>
<td> a <a
href="/home/mclasen/gnome-2.18/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"
><span class="type">cairo_t</span></a>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>region</code></em>&#160;:</span></td>
<td> a <a href="gdk-Points-Rectangles-and-Regions.html#GdkRegion"><span class="type">GdkRegion</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since  2.8
</p>
</div>
</div>
</div>
</body>
</html>