Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/gtk-doc/html/cairo/cairo-XLib-Surfaces.html @ 68:5028fdace37b
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 16:23:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 68:5028fdace37b |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
2 <html> | |
3 <head> | |
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
5 <title>XLib Surfaces: Cairo: A Vector Graphics Library</title> | |
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> | |
7 <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library"> | |
8 <link rel="up" href="cairo-surfaces.html" title="Surfaces"> | |
9 <link rel="prev" href="cairo-XCB-Surfaces.html" title="XCB Surfaces"> | |
10 <link rel="next" href="cairo-XLib-XRender-Backend.html" title="XLib-XRender Backend"> | |
11 <meta name="generator" content="GTK-Doc V1.27 (XML mode)"> | |
12 <link rel="stylesheet" href="style.css" type="text/css"> | |
13 </head> | |
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> | |
16 <td width="100%" align="left" class="shortcuts"> | |
17 <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> | |
18 <a href="#cairo-XLib-Surfaces.description" class="shortcut">Description</a></span> | |
19 </td> | |
20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> | |
21 <td><a accesskey="u" href="cairo-surfaces.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> | |
22 <td><a accesskey="p" href="cairo-XCB-Surfaces.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
23 <td><a accesskey="n" href="cairo-XLib-XRender-Backend.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
24 </tr></table> | |
25 <div class="refentry"> | |
26 <a name="cairo-XLib-Surfaces"></a><div class="titlepage"></div> | |
27 <div class="refnamediv"><table width="100%"><tr> | |
28 <td valign="top"> | |
29 <h2><span class="refentrytitle"><a name="cairo-XLib-Surfaces.top_of_page"></a>XLib Surfaces</span></h2> | |
30 <p>XLib Surfaces — X Window System rendering using XLib</p> | |
31 </td> | |
32 <td class="gallery_image" valign="top" align="right"></td> | |
33 </tr></table></div> | |
34 <div class="refsect1"> | |
35 <a name="cairo-XLib-Surfaces.functions"></a><h2>Functions</h2> | |
36 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
37 <colgroup> | |
38 <col width="150px" class="functions_return"> | |
39 <col class="functions_name"> | |
40 </colgroup> | |
41 <tbody> | |
42 <tr> | |
43 <td class="function_type"> | |
44 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * | |
45 </td> | |
46 <td class="function_name"> | |
47 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-create" title="cairo_xlib_surface_create ()">cairo_xlib_surface_create</a> <span class="c_punctuation">()</span> | |
48 </td> | |
49 </tr> | |
50 <tr> | |
51 <td class="function_type"> | |
52 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * | |
53 </td> | |
54 <td class="function_name"> | |
55 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-create-for-bitmap" title="cairo_xlib_surface_create_for_bitmap ()">cairo_xlib_surface_create_for_bitmap</a> <span class="c_punctuation">()</span> | |
56 </td> | |
57 </tr> | |
58 <tr> | |
59 <td class="function_type"> | |
60 <span class="returnvalue">void</span> | |
61 </td> | |
62 <td class="function_name"> | |
63 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-set-size" title="cairo_xlib_surface_set_size ()">cairo_xlib_surface_set_size</a> <span class="c_punctuation">()</span> | |
64 </td> | |
65 </tr> | |
66 <tr> | |
67 <td class="function_type"> | |
68 <span class="returnvalue">Display</span> * | |
69 </td> | |
70 <td class="function_name"> | |
71 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-get-display" title="cairo_xlib_surface_get_display ()">cairo_xlib_surface_get_display</a> <span class="c_punctuation">()</span> | |
72 </td> | |
73 </tr> | |
74 <tr> | |
75 <td class="function_type"> | |
76 <span class="returnvalue">Screen</span> * | |
77 </td> | |
78 <td class="function_name"> | |
79 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-get-screen" title="cairo_xlib_surface_get_screen ()">cairo_xlib_surface_get_screen</a> <span class="c_punctuation">()</span> | |
80 </td> | |
81 </tr> | |
82 <tr> | |
83 <td class="function_type"> | |
84 <span class="returnvalue">void</span> | |
85 </td> | |
86 <td class="function_name"> | |
87 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-set-drawable" title="cairo_xlib_surface_set_drawable ()">cairo_xlib_surface_set_drawable</a> <span class="c_punctuation">()</span> | |
88 </td> | |
89 </tr> | |
90 <tr> | |
91 <td class="function_type"> | |
92 <span class="returnvalue">Drawable</span> | |
93 </td> | |
94 <td class="function_name"> | |
95 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-get-drawable" title="cairo_xlib_surface_get_drawable ()">cairo_xlib_surface_get_drawable</a> <span class="c_punctuation">()</span> | |
96 </td> | |
97 </tr> | |
98 <tr> | |
99 <td class="function_type"> | |
100 <span class="returnvalue">Visual</span> * | |
101 </td> | |
102 <td class="function_name"> | |
103 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-get-visual" title="cairo_xlib_surface_get_visual ()">cairo_xlib_surface_get_visual</a> <span class="c_punctuation">()</span> | |
104 </td> | |
105 </tr> | |
106 <tr> | |
107 <td class="function_type"> | |
108 <span class="returnvalue">int</span> | |
109 </td> | |
110 <td class="function_name"> | |
111 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-get-width" title="cairo_xlib_surface_get_width ()">cairo_xlib_surface_get_width</a> <span class="c_punctuation">()</span> | |
112 </td> | |
113 </tr> | |
114 <tr> | |
115 <td class="function_type"> | |
116 <span class="returnvalue">int</span> | |
117 </td> | |
118 <td class="function_name"> | |
119 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-get-height" title="cairo_xlib_surface_get_height ()">cairo_xlib_surface_get_height</a> <span class="c_punctuation">()</span> | |
120 </td> | |
121 </tr> | |
122 <tr> | |
123 <td class="function_type"> | |
124 <span class="returnvalue">int</span> | |
125 </td> | |
126 <td class="function_name"> | |
127 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-get-depth" title="cairo_xlib_surface_get_depth ()">cairo_xlib_surface_get_depth</a> <span class="c_punctuation">()</span> | |
128 </td> | |
129 </tr> | |
130 <tr> | |
131 <td class="function_type"> | |
132 <span class="returnvalue">void</span> | |
133 </td> | |
134 <td class="function_name"> | |
135 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-device-debug-cap-xrender-version" title="cairo_xlib_device_debug_cap_xrender_version ()">cairo_xlib_device_debug_cap_xrender_version</a> <span class="c_punctuation">()</span> | |
136 </td> | |
137 </tr> | |
138 <tr> | |
139 <td class="function_type"> | |
140 <span class="returnvalue">int</span> | |
141 </td> | |
142 <td class="function_name"> | |
143 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-device-debug-get-precision" title="cairo_xlib_device_debug_get_precision ()">cairo_xlib_device_debug_get_precision</a> <span class="c_punctuation">()</span> | |
144 </td> | |
145 </tr> | |
146 <tr> | |
147 <td class="function_type"> | |
148 <span class="returnvalue">void</span> | |
149 </td> | |
150 <td class="function_name"> | |
151 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-device-debug-set-precision" title="cairo_xlib_device_debug_set_precision ()">cairo_xlib_device_debug_set_precision</a> <span class="c_punctuation">()</span> | |
152 </td> | |
153 </tr> | |
154 </tbody> | |
155 </table></div> | |
156 </div> | |
157 <div class="refsect1"> | |
158 <a name="cairo-XLib-Surfaces.other"></a><h2>Types and Values</h2> | |
159 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
160 <colgroup> | |
161 <col width="150px" class="name"> | |
162 <col class="description"> | |
163 </colgroup> | |
164 <tbody><tr> | |
165 <td class="define_keyword">#define</td> | |
166 <td class="function_name"><a class="link" href="cairo-XLib-Surfaces.html#CAIRO-HAS-XLIB-SURFACE:CAPS" title="CAIRO_HAS_XLIB_SURFACE">CAIRO_HAS_XLIB_SURFACE</a></td> | |
167 </tr></tbody> | |
168 </table></div> | |
169 </div> | |
170 <div class="refsect1"> | |
171 <a name="cairo-XLib-Surfaces.description"></a><h2>Description</h2> | |
172 <p>The XLib surface is used to render cairo graphics to X Window System | |
173 windows and pixmaps using the XLib library.</p> | |
174 <p>Note that the XLib surface automatically takes advantage of X render extension | |
175 if it is available.</p> | |
176 </div> | |
177 <div class="refsect1"> | |
178 <a name="cairo-XLib-Surfaces.functions_details"></a><h2>Functions</h2> | |
179 <div class="refsect2"> | |
180 <a name="cairo-xlib-surface-create"></a><h3>cairo_xlib_surface_create ()</h3> | |
181 <pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * | |
182 cairo_xlib_surface_create (<em class="parameter"><code><span class="type">Display</span> *dpy</code></em>, | |
183 <em class="parameter"><code><span class="type">Drawable</span> drawable</code></em>, | |
184 <em class="parameter"><code><span class="type">Visual</span> *visual</code></em>, | |
185 <em class="parameter"><code><span class="type">int</span> width</code></em>, | |
186 <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre> | |
187 <p>Creates an Xlib surface that draws to the given drawable. | |
188 The way that colors are represented in the drawable is specified | |
189 by the provided visual.</p> | |
190 <p>Note: If <em class="parameter"><code>drawable</code></em> | |
191 is a Window, then the function | |
192 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-set-size" title="cairo_xlib_surface_set_size ()"><code class="function">cairo_xlib_surface_set_size()</code></a> must be called whenever the size of the | |
193 window changes.</p> | |
194 <p>When <em class="parameter"><code>drawable</code></em> | |
195 is a Window containing child windows then drawing to | |
196 the created surface will be clipped by those child windows. When | |
197 the created surface is used as a source, the contents of the | |
198 children will be included.</p> | |
199 <div class="refsect3"> | |
200 <a name="cairo-xlib-surface-create.parameters"></a><h4>Parameters</h4> | |
201 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
202 <colgroup> | |
203 <col width="150px" class="parameters_name"> | |
204 <col class="parameters_description"> | |
205 <col width="200px" class="parameters_annotations"> | |
206 </colgroup> | |
207 <tbody> | |
208 <tr> | |
209 <td class="parameter_name"><p>dpy</p></td> | |
210 <td class="parameter_description"><p>an X Display</p></td> | |
211 <td class="parameter_annotations"> </td> | |
212 </tr> | |
213 <tr> | |
214 <td class="parameter_name"><p>drawable</p></td> | |
215 <td class="parameter_description"><p>an X Drawable, (a Pixmap or a Window)</p></td> | |
216 <td class="parameter_annotations"> </td> | |
217 </tr> | |
218 <tr> | |
219 <td class="parameter_name"><p>visual</p></td> | |
220 <td class="parameter_description"><p>the visual to use for drawing to <em class="parameter"><code>drawable</code></em> | |
221 . The depth | |
222 of the visual must match the depth of the drawable. | |
223 Currently, only TrueColor visuals are fully supported.</p></td> | |
224 <td class="parameter_annotations"> </td> | |
225 </tr> | |
226 <tr> | |
227 <td class="parameter_name"><p>width</p></td> | |
228 <td class="parameter_description"><p>the current width of <em class="parameter"><code>drawable</code></em> | |
229 .</p></td> | |
230 <td class="parameter_annotations"> </td> | |
231 </tr> | |
232 <tr> | |
233 <td class="parameter_name"><p>height</p></td> | |
234 <td class="parameter_description"><p>the current height of <em class="parameter"><code>drawable</code></em> | |
235 .</p></td> | |
236 <td class="parameter_annotations"> </td> | |
237 </tr> | |
238 </tbody> | |
239 </table></div> | |
240 </div> | |
241 <div class="refsect3"> | |
242 <a name="cairo-xlib-surface-create.returns"></a><h4>Returns</h4> | |
243 <p> the newly created surface</p> | |
244 </div> | |
245 <p class="since">Since: 1.0</p> | |
246 </div> | |
247 <hr> | |
248 <div class="refsect2"> | |
249 <a name="cairo-xlib-surface-create-for-bitmap"></a><h3>cairo_xlib_surface_create_for_bitmap ()</h3> | |
250 <pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> * | |
251 cairo_xlib_surface_create_for_bitmap (<em class="parameter"><code><span class="type">Display</span> *dpy</code></em>, | |
252 <em class="parameter"><code><span class="type">Pixmap</span> bitmap</code></em>, | |
253 <em class="parameter"><code><span class="type">Screen</span> *screen</code></em>, | |
254 <em class="parameter"><code><span class="type">int</span> width</code></em>, | |
255 <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre> | |
256 <p>Creates an Xlib surface that draws to the given bitmap. | |
257 This will be drawn to as a <a class="link" href="cairo-Image-Surfaces.html#CAIRO-FORMAT-A1:CAPS"><code class="literal">CAIRO_FORMAT_A1</code></a> object.</p> | |
258 <div class="refsect3"> | |
259 <a name="cairo-xlib-surface-create-for-bitmap.parameters"></a><h4>Parameters</h4> | |
260 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
261 <colgroup> | |
262 <col width="150px" class="parameters_name"> | |
263 <col class="parameters_description"> | |
264 <col width="200px" class="parameters_annotations"> | |
265 </colgroup> | |
266 <tbody> | |
267 <tr> | |
268 <td class="parameter_name"><p>dpy</p></td> | |
269 <td class="parameter_description"><p>an X Display</p></td> | |
270 <td class="parameter_annotations"> </td> | |
271 </tr> | |
272 <tr> | |
273 <td class="parameter_name"><p>bitmap</p></td> | |
274 <td class="parameter_description"><p>an X Drawable, (a depth-1 Pixmap)</p></td> | |
275 <td class="parameter_annotations"> </td> | |
276 </tr> | |
277 <tr> | |
278 <td class="parameter_name"><p>screen</p></td> | |
279 <td class="parameter_description"><p>the X Screen associated with <em class="parameter"><code>bitmap</code></em> | |
280 </p></td> | |
281 <td class="parameter_annotations"> </td> | |
282 </tr> | |
283 <tr> | |
284 <td class="parameter_name"><p>width</p></td> | |
285 <td class="parameter_description"><p>the current width of <em class="parameter"><code>bitmap</code></em> | |
286 .</p></td> | |
287 <td class="parameter_annotations"> </td> | |
288 </tr> | |
289 <tr> | |
290 <td class="parameter_name"><p>height</p></td> | |
291 <td class="parameter_description"><p>the current height of <em class="parameter"><code>bitmap</code></em> | |
292 .</p></td> | |
293 <td class="parameter_annotations"> </td> | |
294 </tr> | |
295 </tbody> | |
296 </table></div> | |
297 </div> | |
298 <div class="refsect3"> | |
299 <a name="cairo-xlib-surface-create-for-bitmap.returns"></a><h4>Returns</h4> | |
300 <p> the newly created surface</p> | |
301 </div> | |
302 <p class="since">Since: 1.0</p> | |
303 </div> | |
304 <hr> | |
305 <div class="refsect2"> | |
306 <a name="cairo-xlib-surface-set-size"></a><h3>cairo_xlib_surface_set_size ()</h3> | |
307 <pre class="programlisting"><span class="returnvalue">void</span> | |
308 cairo_xlib_surface_set_size (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>, | |
309 <em class="parameter"><code><span class="type">int</span> width</code></em>, | |
310 <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre> | |
311 <p>Informs cairo of the new size of the X Drawable underlying the | |
312 surface. For a surface created for a Window (rather than a Pixmap), | |
313 this function must be called each time the size of the window | |
314 changes. (For a subwindow, you are normally resizing the window | |
315 yourself, but for a toplevel window, it is necessary to listen for | |
316 ConfigureNotify events.)</p> | |
317 <p>A Pixmap can never change size, so it is never necessary to call | |
318 this function on a surface created for a Pixmap.</p> | |
319 <div class="refsect3"> | |
320 <a name="cairo-xlib-surface-set-size.parameters"></a><h4>Parameters</h4> | |
321 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
322 <colgroup> | |
323 <col width="150px" class="parameters_name"> | |
324 <col class="parameters_description"> | |
325 <col width="200px" class="parameters_annotations"> | |
326 </colgroup> | |
327 <tbody> | |
328 <tr> | |
329 <td class="parameter_name"><p>surface</p></td> | |
330 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> for the XLib backend</p></td> | |
331 <td class="parameter_annotations"> </td> | |
332 </tr> | |
333 <tr> | |
334 <td class="parameter_name"><p>width</p></td> | |
335 <td class="parameter_description"><p>the new width of the surface</p></td> | |
336 <td class="parameter_annotations"> </td> | |
337 </tr> | |
338 <tr> | |
339 <td class="parameter_name"><p>height</p></td> | |
340 <td class="parameter_description"><p>the new height of the surface</p></td> | |
341 <td class="parameter_annotations"> </td> | |
342 </tr> | |
343 </tbody> | |
344 </table></div> | |
345 </div> | |
346 <p class="since">Since: 1.0</p> | |
347 </div> | |
348 <hr> | |
349 <div class="refsect2"> | |
350 <a name="cairo-xlib-surface-get-display"></a><h3>cairo_xlib_surface_get_display ()</h3> | |
351 <pre class="programlisting"><span class="returnvalue">Display</span> * | |
352 cairo_xlib_surface_get_display (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre> | |
353 <p>Get the X Display for the underlying X Drawable.</p> | |
354 <div class="refsect3"> | |
355 <a name="cairo-xlib-surface-get-display.parameters"></a><h4>Parameters</h4> | |
356 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
357 <colgroup> | |
358 <col width="150px" class="parameters_name"> | |
359 <col class="parameters_description"> | |
360 <col width="200px" class="parameters_annotations"> | |
361 </colgroup> | |
362 <tbody><tr> | |
363 <td class="parameter_name"><p>surface</p></td> | |
364 <td class="parameter_description"><p>a <span class="type">cairo_xlib_surface_t</span></p></td> | |
365 <td class="parameter_annotations"> </td> | |
366 </tr></tbody> | |
367 </table></div> | |
368 </div> | |
369 <div class="refsect3"> | |
370 <a name="cairo-xlib-surface-get-display.returns"></a><h4>Returns</h4> | |
371 <p> the display.</p> | |
372 </div> | |
373 <p class="since">Since: 1.2</p> | |
374 </div> | |
375 <hr> | |
376 <div class="refsect2"> | |
377 <a name="cairo-xlib-surface-get-screen"></a><h3>cairo_xlib_surface_get_screen ()</h3> | |
378 <pre class="programlisting"><span class="returnvalue">Screen</span> * | |
379 cairo_xlib_surface_get_screen (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre> | |
380 <p>Get the X Screen for the underlying X Drawable.</p> | |
381 <div class="refsect3"> | |
382 <a name="cairo-xlib-surface-get-screen.parameters"></a><h4>Parameters</h4> | |
383 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
384 <colgroup> | |
385 <col width="150px" class="parameters_name"> | |
386 <col class="parameters_description"> | |
387 <col width="200px" class="parameters_annotations"> | |
388 </colgroup> | |
389 <tbody><tr> | |
390 <td class="parameter_name"><p>surface</p></td> | |
391 <td class="parameter_description"><p>a <span class="type">cairo_xlib_surface_t</span></p></td> | |
392 <td class="parameter_annotations"> </td> | |
393 </tr></tbody> | |
394 </table></div> | |
395 </div> | |
396 <div class="refsect3"> | |
397 <a name="cairo-xlib-surface-get-screen.returns"></a><h4>Returns</h4> | |
398 <p> the screen.</p> | |
399 </div> | |
400 <p class="since">Since: 1.2</p> | |
401 </div> | |
402 <hr> | |
403 <div class="refsect2"> | |
404 <a name="cairo-xlib-surface-set-drawable"></a><h3>cairo_xlib_surface_set_drawable ()</h3> | |
405 <pre class="programlisting"><span class="returnvalue">void</span> | |
406 cairo_xlib_surface_set_drawable (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>, | |
407 <em class="parameter"><code><span class="type">Drawable</span> drawable</code></em>, | |
408 <em class="parameter"><code><span class="type">int</span> width</code></em>, | |
409 <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre> | |
410 <p>Informs cairo of a new X Drawable underlying the | |
411 surface. The drawable must match the display, screen | |
412 and format of the existing drawable or the application | |
413 will get X protocol errors and will probably terminate. | |
414 No checks are done by this function to ensure this | |
415 compatibility.</p> | |
416 <div class="refsect3"> | |
417 <a name="cairo-xlib-surface-set-drawable.parameters"></a><h4>Parameters</h4> | |
418 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
419 <colgroup> | |
420 <col width="150px" class="parameters_name"> | |
421 <col class="parameters_description"> | |
422 <col width="200px" class="parameters_annotations"> | |
423 </colgroup> | |
424 <tbody> | |
425 <tr> | |
426 <td class="parameter_name"><p>surface</p></td> | |
427 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> for the XLib backend</p></td> | |
428 <td class="parameter_annotations"> </td> | |
429 </tr> | |
430 <tr> | |
431 <td class="parameter_name"><p>drawable</p></td> | |
432 <td class="parameter_description"><p>the new drawable for the surface</p></td> | |
433 <td class="parameter_annotations"> </td> | |
434 </tr> | |
435 <tr> | |
436 <td class="parameter_name"><p>width</p></td> | |
437 <td class="parameter_description"><p>the width of the new drawable</p></td> | |
438 <td class="parameter_annotations"> </td> | |
439 </tr> | |
440 <tr> | |
441 <td class="parameter_name"><p>height</p></td> | |
442 <td class="parameter_description"><p>the height of the new drawable</p></td> | |
443 <td class="parameter_annotations"> </td> | |
444 </tr> | |
445 </tbody> | |
446 </table></div> | |
447 </div> | |
448 <p class="since">Since: 1.0</p> | |
449 </div> | |
450 <hr> | |
451 <div class="refsect2"> | |
452 <a name="cairo-xlib-surface-get-drawable"></a><h3>cairo_xlib_surface_get_drawable ()</h3> | |
453 <pre class="programlisting"><span class="returnvalue">Drawable</span> | |
454 cairo_xlib_surface_get_drawable (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre> | |
455 <p>Get the underlying X Drawable used for the surface.</p> | |
456 <div class="refsect3"> | |
457 <a name="cairo-xlib-surface-get-drawable.parameters"></a><h4>Parameters</h4> | |
458 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
459 <colgroup> | |
460 <col width="150px" class="parameters_name"> | |
461 <col class="parameters_description"> | |
462 <col width="200px" class="parameters_annotations"> | |
463 </colgroup> | |
464 <tbody><tr> | |
465 <td class="parameter_name"><p>surface</p></td> | |
466 <td class="parameter_description"><p>a <span class="type">cairo_xlib_surface_t</span></p></td> | |
467 <td class="parameter_annotations"> </td> | |
468 </tr></tbody> | |
469 </table></div> | |
470 </div> | |
471 <div class="refsect3"> | |
472 <a name="cairo-xlib-surface-get-drawable.returns"></a><h4>Returns</h4> | |
473 <p> the drawable.</p> | |
474 </div> | |
475 <p class="since">Since: 1.2</p> | |
476 </div> | |
477 <hr> | |
478 <div class="refsect2"> | |
479 <a name="cairo-xlib-surface-get-visual"></a><h3>cairo_xlib_surface_get_visual ()</h3> | |
480 <pre class="programlisting"><span class="returnvalue">Visual</span> * | |
481 cairo_xlib_surface_get_visual (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre> | |
482 <p>Gets the X Visual associated with <em class="parameter"><code>surface</code></em> | |
483 , suitable for use with the | |
484 underlying X Drawable. If <em class="parameter"><code>surface</code></em> | |
485 was created by | |
486 <a class="link" href="cairo-XLib-Surfaces.html#cairo-xlib-surface-create" title="cairo_xlib_surface_create ()"><code class="function">cairo_xlib_surface_create()</code></a>, the return value is the Visual passed to that | |
487 constructor.</p> | |
488 <div class="refsect3"> | |
489 <a name="cairo-xlib-surface-get-visual.parameters"></a><h4>Parameters</h4> | |
490 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
491 <colgroup> | |
492 <col width="150px" class="parameters_name"> | |
493 <col class="parameters_description"> | |
494 <col width="200px" class="parameters_annotations"> | |
495 </colgroup> | |
496 <tbody><tr> | |
497 <td class="parameter_name"><p>surface</p></td> | |
498 <td class="parameter_description"><p>a <span class="type">cairo_xlib_surface_t</span></p></td> | |
499 <td class="parameter_annotations"> </td> | |
500 </tr></tbody> | |
501 </table></div> | |
502 </div> | |
503 <div class="refsect3"> | |
504 <a name="cairo-xlib-surface-get-visual.returns"></a><h4>Returns</h4> | |
505 <p> the Visual or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is no appropriate Visual for | |
506 <em class="parameter"><code>surface</code></em> | |
507 .</p> | |
508 </div> | |
509 <p class="since">Since: 1.2</p> | |
510 </div> | |
511 <hr> | |
512 <div class="refsect2"> | |
513 <a name="cairo-xlib-surface-get-width"></a><h3>cairo_xlib_surface_get_width ()</h3> | |
514 <pre class="programlisting"><span class="returnvalue">int</span> | |
515 cairo_xlib_surface_get_width (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre> | |
516 <p>Get the width of the X Drawable underlying the surface in pixels.</p> | |
517 <div class="refsect3"> | |
518 <a name="cairo-xlib-surface-get-width.parameters"></a><h4>Parameters</h4> | |
519 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
520 <colgroup> | |
521 <col width="150px" class="parameters_name"> | |
522 <col class="parameters_description"> | |
523 <col width="200px" class="parameters_annotations"> | |
524 </colgroup> | |
525 <tbody><tr> | |
526 <td class="parameter_name"><p>surface</p></td> | |
527 <td class="parameter_description"><p>a <span class="type">cairo_xlib_surface_t</span></p></td> | |
528 <td class="parameter_annotations"> </td> | |
529 </tr></tbody> | |
530 </table></div> | |
531 </div> | |
532 <div class="refsect3"> | |
533 <a name="cairo-xlib-surface-get-width.returns"></a><h4>Returns</h4> | |
534 <p> the width of the surface in pixels.</p> | |
535 </div> | |
536 <p class="since">Since: 1.2</p> | |
537 </div> | |
538 <hr> | |
539 <div class="refsect2"> | |
540 <a name="cairo-xlib-surface-get-height"></a><h3>cairo_xlib_surface_get_height ()</h3> | |
541 <pre class="programlisting"><span class="returnvalue">int</span> | |
542 cairo_xlib_surface_get_height (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre> | |
543 <p>Get the height of the X Drawable underlying the surface in pixels.</p> | |
544 <div class="refsect3"> | |
545 <a name="cairo-xlib-surface-get-height.parameters"></a><h4>Parameters</h4> | |
546 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
547 <colgroup> | |
548 <col width="150px" class="parameters_name"> | |
549 <col class="parameters_description"> | |
550 <col width="200px" class="parameters_annotations"> | |
551 </colgroup> | |
552 <tbody><tr> | |
553 <td class="parameter_name"><p>surface</p></td> | |
554 <td class="parameter_description"><p>a <span class="type">cairo_xlib_surface_t</span></p></td> | |
555 <td class="parameter_annotations"> </td> | |
556 </tr></tbody> | |
557 </table></div> | |
558 </div> | |
559 <div class="refsect3"> | |
560 <a name="cairo-xlib-surface-get-height.returns"></a><h4>Returns</h4> | |
561 <p> the height of the surface in pixels.</p> | |
562 </div> | |
563 <p class="since">Since: 1.2</p> | |
564 </div> | |
565 <hr> | |
566 <div class="refsect2"> | |
567 <a name="cairo-xlib-surface-get-depth"></a><h3>cairo_xlib_surface_get_depth ()</h3> | |
568 <pre class="programlisting"><span class="returnvalue">int</span> | |
569 cairo_xlib_surface_get_depth (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>);</pre> | |
570 <p>Get the number of bits used to represent each pixel value.</p> | |
571 <div class="refsect3"> | |
572 <a name="cairo-xlib-surface-get-depth.parameters"></a><h4>Parameters</h4> | |
573 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
574 <colgroup> | |
575 <col width="150px" class="parameters_name"> | |
576 <col class="parameters_description"> | |
577 <col width="200px" class="parameters_annotations"> | |
578 </colgroup> | |
579 <tbody><tr> | |
580 <td class="parameter_name"><p>surface</p></td> | |
581 <td class="parameter_description"><p>a <span class="type">cairo_xlib_surface_t</span></p></td> | |
582 <td class="parameter_annotations"> </td> | |
583 </tr></tbody> | |
584 </table></div> | |
585 </div> | |
586 <div class="refsect3"> | |
587 <a name="cairo-xlib-surface-get-depth.returns"></a><h4>Returns</h4> | |
588 <p> the depth of the surface in bits.</p> | |
589 </div> | |
590 <p class="since">Since: 1.2</p> | |
591 </div> | |
592 <hr> | |
593 <div class="refsect2"> | |
594 <a name="cairo-xlib-device-debug-cap-xrender-version"></a><h3>cairo_xlib_device_debug_cap_xrender_version ()</h3> | |
595 <pre class="programlisting"><span class="returnvalue">void</span> | |
596 cairo_xlib_device_debug_cap_xrender_version | |
597 (<em class="parameter"><code><a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="type">cairo_device_t</span></a> *device</code></em>, | |
598 <em class="parameter"><code><span class="type">int</span> major_version</code></em>, | |
599 <em class="parameter"><code><span class="type">int</span> minor_version</code></em>);</pre> | |
600 <p>Restricts all future Xlib surfaces for this devices to the specified version | |
601 of the RENDER extension. This function exists solely for debugging purpose. | |
602 It lets you find out how cairo would behave with an older version of | |
603 the RENDER extension.</p> | |
604 <p>Use the special values -1 and -1 for disabling the RENDER extension.</p> | |
605 <div class="refsect3"> | |
606 <a name="cairo-xlib-device-debug-cap-xrender-version.parameters"></a><h4>Parameters</h4> | |
607 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
608 <colgroup> | |
609 <col width="150px" class="parameters_name"> | |
610 <col class="parameters_description"> | |
611 <col width="200px" class="parameters_annotations"> | |
612 </colgroup> | |
613 <tbody> | |
614 <tr> | |
615 <td class="parameter_name"><p>device</p></td> | |
616 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="type">cairo_device_t</span></a> for the Xlib backend</p></td> | |
617 <td class="parameter_annotations"> </td> | |
618 </tr> | |
619 <tr> | |
620 <td class="parameter_name"><p>major_version</p></td> | |
621 <td class="parameter_description"><p>major version to restrict to</p></td> | |
622 <td class="parameter_annotations"> </td> | |
623 </tr> | |
624 <tr> | |
625 <td class="parameter_name"><p>minor_version</p></td> | |
626 <td class="parameter_description"><p>minor version to restrict to</p></td> | |
627 <td class="parameter_annotations"> </td> | |
628 </tr> | |
629 </tbody> | |
630 </table></div> | |
631 </div> | |
632 <p class="since">Since: 1.12</p> | |
633 </div> | |
634 <hr> | |
635 <div class="refsect2"> | |
636 <a name="cairo-xlib-device-debug-get-precision"></a><h3>cairo_xlib_device_debug_get_precision ()</h3> | |
637 <pre class="programlisting"><span class="returnvalue">int</span> | |
638 cairo_xlib_device_debug_get_precision (<em class="parameter"><code><a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="type">cairo_device_t</span></a> *device</code></em>);</pre> | |
639 <p>Get the Xrender precision mode.</p> | |
640 <div class="refsect3"> | |
641 <a name="cairo-xlib-device-debug-get-precision.parameters"></a><h4>Parameters</h4> | |
642 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
643 <colgroup> | |
644 <col width="150px" class="parameters_name"> | |
645 <col class="parameters_description"> | |
646 <col width="200px" class="parameters_annotations"> | |
647 </colgroup> | |
648 <tbody><tr> | |
649 <td class="parameter_name"><p>device</p></td> | |
650 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="type">cairo_device_t</span></a> for the Xlib backend</p></td> | |
651 <td class="parameter_annotations"> </td> | |
652 </tr></tbody> | |
653 </table></div> | |
654 </div> | |
655 <div class="refsect3"> | |
656 <a name="cairo-xlib-device-debug-get-precision.returns"></a><h4>Returns</h4> | |
657 <p> the render precision mode</p> | |
658 </div> | |
659 <p class="since">Since: 1.12</p> | |
660 </div> | |
661 <hr> | |
662 <div class="refsect2"> | |
663 <a name="cairo-xlib-device-debug-set-precision"></a><h3>cairo_xlib_device_debug_set_precision ()</h3> | |
664 <pre class="programlisting"><span class="returnvalue">void</span> | |
665 cairo_xlib_device_debug_set_precision (<em class="parameter"><code><a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="type">cairo_device_t</span></a> *device</code></em>, | |
666 <em class="parameter"><code><span class="type">int</span> precision</code></em>);</pre> | |
667 <p>Render supports two modes of precision when rendering trapezoids. Set | |
668 the precision to the desired mode.</p> | |
669 <div class="refsect3"> | |
670 <a name="cairo-xlib-device-debug-set-precision.parameters"></a><h4>Parameters</h4> | |
671 <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
672 <colgroup> | |
673 <col width="150px" class="parameters_name"> | |
674 <col class="parameters_description"> | |
675 <col width="200px" class="parameters_annotations"> | |
676 </colgroup> | |
677 <tbody> | |
678 <tr> | |
679 <td class="parameter_name"><p>device</p></td> | |
680 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-device-t.html#cairo-device-t" title="cairo_device_t"><span class="type">cairo_device_t</span></a> for the Xlib backend</p></td> | |
681 <td class="parameter_annotations"> </td> | |
682 </tr> | |
683 <tr> | |
684 <td class="parameter_name"><p>precision</p></td> | |
685 <td class="parameter_description"><p>the precision to use</p></td> | |
686 <td class="parameter_annotations"> </td> | |
687 </tr> | |
688 </tbody> | |
689 </table></div> | |
690 </div> | |
691 <p class="since">Since: 1.12</p> | |
692 </div> | |
693 </div> | |
694 <div class="refsect1"> | |
695 <a name="cairo-XLib-Surfaces.other_details"></a><h2>Types and Values</h2> | |
696 <div class="refsect2"> | |
697 <a name="CAIRO-HAS-XLIB-SURFACE:CAPS"></a><h3>CAIRO_HAS_XLIB_SURFACE</h3> | |
698 <pre class="programlisting">#define CAIRO_HAS_XLIB_SURFACE 1 | |
699 </pre> | |
700 <p>Defined if the Xlib surface backend is available. | |
701 This macro can be used to conditionally compile backend-specific code.</p> | |
702 <p class="since">Since: 1.0</p> | |
703 </div> | |
704 </div> | |
705 <div class="refsect1"> | |
706 <a name="cairo-XLib-Surfaces.see-also"></a><h2>See Also</h2> | |
707 <p><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p> | |
708 </div> | |
709 </div> | |
710 <div class="footer"> | |
711 <hr>Generated by GTK-Doc V1.27</div> | |
712 </body> | |
713 </html> |