/usr/share/gtk-doc/html/clutter/ClutterCanvas.html is in libclutter-1.0-doc 1.24.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ClutterCanvas: Clutter Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Clutter Reference Manual">
<link rel="up" href="ch07.html" title="Content">
<link rel="prev" href="ch07.html" title="Content">
<link rel="next" href="ClutterImage.html" title="ClutterImage">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#ClutterCanvas.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#ClutterCanvas.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span>
<a href="#ClutterCanvas.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span>
<a href="#ClutterCanvas.properties" class="shortcut">Properties</a></span><span id="nav_signals"> <span class="dim">|</span>
<a href="#ClutterCanvas.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch07.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch07.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ClutterImage.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="ClutterCanvas"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="ClutterCanvas.top_of_page"></a>ClutterCanvas</span></h2>
<p>ClutterCanvas — Content for 2D painting</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="ClutterCanvas.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="ClutterContent.html" title="ClutterContent"><span class="returnvalue">ClutterContent</span></a> *
</td>
<td class="function_name">
<a class="link" href="ClutterCanvas.html#clutter-canvas-new" title="clutter_canvas_new ()">clutter_canvas_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ClutterCanvas.html#clutter-canvas-set-size" title="clutter_canvas_set_size ()">clutter_canvas_set_size</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="ClutterCanvas.html#clutter-canvas-set-scale-factor" title="clutter_canvas_set_scale_factor ()">clutter_canvas_set_scale_factor</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="ClutterCanvas.html#clutter-canvas-get-scale-factor" title="clutter_canvas_get_scale_factor ()">clutter_canvas_get_scale_factor</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterCanvas.properties"></a><h2>Properties</h2>
<div class="informaltable"><table border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><span class="type">gint</span></td>
<td class="property_name"><a class="link" href="ClutterCanvas.html#ClutterCanvas--height" title="The “height” property">height</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">gint</span></td>
<td class="property_name"><a class="link" href="ClutterCanvas.html#ClutterCanvas--scale-factor" title="The “scale-factor” property">scale-factor</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">gboolean</span></td>
<td class="property_name"><a class="link" href="ClutterCanvas.html#ClutterCanvas--scale-factor-set" title="The “scale-factor-set” property">scale-factor-set</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><span class="type">gint</span></td>
<td class="property_name"><a class="link" href="ClutterCanvas.html#ClutterCanvas--width" title="The “width” property">width</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterCanvas.signals"></a><h2>Signals</h2>
<div class="informaltable"><table border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody><tr>
<td class="signal_type"><span class="returnvalue">gboolean</span></td>
<td class="signal_name"><a class="link" href="ClutterCanvas.html#ClutterCanvas-draw" title="The “draw” signal">draw</a></td>
<td class="signal_flags">No Recursion</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterCanvas.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="ClutterCanvas.html#ClutterCanvas-struct" title="struct ClutterCanvas">ClutterCanvas</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="ClutterCanvas.html#ClutterCanvasClass" title="struct ClutterCanvasClass">ClutterCanvasClass</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterCanvas.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> GObject
<span class="lineart">╰──</span> ClutterCanvas
</pre>
</div>
<div class="refsect1">
<a name="ClutterCanvas.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
ClutterCanvas implements
<a class="link" href="ClutterContent.html" title="ClutterContent">ClutterContent</a>.</p>
</div>
<div class="refsect1">
<a name="ClutterCanvas.description"></a><h2>Description</h2>
<p>The <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> class is a <a class="link" href="ClutterContent.html" title="ClutterContent"><span class="type">ClutterContent</span></a> implementation that allows
drawing using the Cairo API on a 2D surface.</p>
<p>In order to draw on a <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a>, you should connect a handler to the
<a class="link" href="ClutterCanvas.html#ClutterCanvas-draw" title="The “draw” signal"><span class="type">“draw”</span></a> signal; the signal will receive a <span class="type">cairo_t</span> context
that can be used to draw. <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> will emit the <a class="link" href="ClutterCanvas.html#ClutterCanvas-draw" title="The “draw” signal"><span class="type">“draw”</span></a>
signal when invalidated using <a class="link" href="ClutterContent.html#clutter-content-invalidate" title="clutter_content_invalidate ()"><code class="function">clutter_content_invalidate()</code></a>.</p>
<p>See <a class="ulink" href="https://git.gnome.org/browse/clutter/tree/examples/canvas.c?h=clutter-1.18" target="_top">canvas.c</a>
for an example of how to use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a>.</p>
<p><a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> is available since Clutter 1.10.</p>
</div>
<div class="refsect1">
<a name="ClutterCanvas.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="clutter-canvas-new"></a><h3>clutter_canvas_new ()</h3>
<pre class="programlisting"><a class="link" href="ClutterContent.html" title="ClutterContent"><span class="returnvalue">ClutterContent</span></a> *
clutter_canvas_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new instance of <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a>.</p>
<p>You should call <a class="link" href="ClutterCanvas.html#clutter-canvas-set-size" title="clutter_canvas_set_size ()"><code class="function">clutter_canvas_set_size()</code></a> to set the size of the canvas.</p>
<p>You should call <a class="link" href="ClutterContent.html#clutter-content-invalidate" title="clutter_content_invalidate ()"><code class="function">clutter_content_invalidate()</code></a> every time you wish to
draw the contents of the canvas.</p>
<div class="refsect3">
<a name="id-1.5.8.2.10.2.7"></a><h4>Returns</h4>
<p> The newly allocated instance of
<a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a>. Use <code class="function">g_object_unref()</code> when done. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix12.html#api-index-1.10">1.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-canvas-set-size"></a><h3>clutter_canvas_set_size ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
clutter_canvas_set_size (<em class="parameter"><code><a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> *canvas</code></em>,
<em class="parameter"><code><span class="type">int</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
<p>Sets the size of the <em class="parameter"><code>canvas</code></em>
, and invalidates the content.</p>
<p>This function will cause the <em class="parameter"><code>canvas</code></em>
to be invalidated only
if the size of the canvas surface has changed.</p>
<p>If you want to invalidate the contents of the <em class="parameter"><code>canvas</code></em>
when setting
the size, you can use the return value of the function to conditionally
call <a class="link" href="ClutterContent.html#clutter-content-invalidate" title="clutter_content_invalidate ()"><code class="function">clutter_content_invalidate()</code></a>:</p>
<div class="informalexample"><pre class="programlisting">
if (!clutter_canvas_set_size (canvas, width, height))
clutter_content_invalidate (CLUTTER_CONTENT (canvas));
</pre></div>
<p></p>
<div class="refsect3">
<a name="id-1.5.8.2.10.3.9"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>canvas</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>the width of the canvas, in pixels</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>the height of the canvas, in pixels</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.8.2.10.3.10"></a><h4>Returns</h4>
<p> this function returns <code class="literal">TRUE</code> if the size change
caused a content invalidation, and <code class="literal">FALSE</code> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="ix12.html#api-index-1.10">1.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-canvas-set-scale-factor"></a><h3>clutter_canvas_set_scale_factor ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_canvas_set_scale_factor (<em class="parameter"><code><a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> *canvas</code></em>,
<em class="parameter"><code><span class="type">int</span> scale</code></em>);</pre>
<p>Sets the scaling factor for the Cairo surface used by <em class="parameter"><code>canvas</code></em>
.</p>
<p>This function should rarely be used.</p>
<p>The default scaling factor of a <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> content uses the
<a class="link" href="ClutterSettings.html#ClutterSettings--window-scaling-factor" title="The “window-scaling-factor” property"><span class="type">“window-scaling-factor”</span></a> property, which is set by
the windowing system. By using this function it is possible to
override that setting.</p>
<p>Changing the scale factor will invalidate the <em class="parameter"><code>canvas</code></em>
.</p>
<div class="refsect3">
<a name="id-1.5.8.2.10.4.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>canvas</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scale</p></td>
<td class="parameter_description"><p>the scale factor, or -1 for the default</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix16.html#api-index-1.18">1.18</a></p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-canvas-get-scale-factor"></a><h3>clutter_canvas_get_scale_factor ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
clutter_canvas_get_scale_factor (<em class="parameter"><code><a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> *canvas</code></em>);</pre>
<p>Retrieves the scaling factor of <em class="parameter"><code>canvas</code></em>
, as set using
<a class="link" href="ClutterCanvas.html#clutter-canvas-set-scale-factor" title="clutter_canvas_set_scale_factor ()"><code class="function">clutter_canvas_set_scale_factor()</code></a>.</p>
<div class="refsect3">
<a name="id-1.5.8.2.10.5.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>canvas</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.8.2.10.5.6"></a><h4>Returns</h4>
<p> the scaling factor, or -1 if the <em class="parameter"><code>canvas</code></em>
uses the default from <a class="link" href="ClutterSettings.html" title="ClutterSettings"><span class="type">ClutterSettings</span></a></p>
</div>
<p class="since">Since: <a class="link" href="ix16.html#api-index-1.18">1.18</a></p>
</div>
</div>
<div class="refsect1">
<a name="ClutterCanvas.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="ClutterCanvas-struct"></a><h3>struct ClutterCanvas</h3>
<pre class="programlisting">struct ClutterCanvas;</pre>
<p>The <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> structure contains
private data and should only be accessed using the provided
API.</p>
<p class="since">Since: <a class="link" href="ix12.html#api-index-1.10">1.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterCanvasClass"></a><h3>struct ClutterCanvasClass</h3>
<pre class="programlisting">struct ClutterCanvasClass {
gboolean (* draw) (ClutterCanvas *canvas,
cairo_t *cr,
int width,
int height);
};
</pre>
<p>The <a class="link" href="ClutterCanvas.html#ClutterCanvasClass" title="struct ClutterCanvasClass"><span class="type">ClutterCanvasClass</span></a> structure contains
private data.</p>
<div class="refsect3">
<a name="id-1.5.8.2.11.3.5"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody><tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterCanvasClass.draw"></a>draw</code></em> ()</p></td>
<td class="struct_member_description"><p>class handler for the <a class="link" href="ClutterCanvas.html#ClutterCanvas-draw" title="The “draw” signal"><span class="type">“draw”</span></a> signal</p></td>
<td class="struct_member_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix12.html#api-index-1.10">1.10</a></p>
</div>
</div>
<div class="refsect1">
<a name="ClutterCanvas.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="ClutterCanvas--height"></a><h3>The <code class="literal">“height”</code> property</h3>
<pre class="programlisting"> “height” <span class="type">gint</span></pre>
<p>The height of the canvas.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: >= -1</p>
<p>Default value: -1</p>
<p class="since">Since: <a class="link" href="ix12.html#api-index-1.10">1.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterCanvas--scale-factor"></a><h3>The <code class="literal">“scale-factor”</code> property</h3>
<pre class="programlisting"> “scale-factor” <span class="type">gint</span></pre>
<p>The scaling factor to be applied to the Cairo surface used for
drawing.</p>
<p>If <a class="link" href="ClutterCanvas.html#ClutterCanvas--scale-factor" title="The “scale-factor” property"><span class="type">“scale-factor”</span></a> is set to a negative value, the
value of the <a class="link" href="ClutterSettings.html#ClutterSettings--window-scaling-factor" title="The “window-scaling-factor” property"><span class="type">“window-scaling-factor”</span></a> property is
used instead.</p>
<p>Use <a class="link" href="ClutterCanvas.html#ClutterCanvas--scale-factor-set" title="The “scale-factor-set” property"><span class="type">“scale-factor-set”</span></a> to check if the scale factor
is set.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: [-1,1000]</p>
<p>Default value: -1</p>
<p class="since">Since: <a class="link" href="ix16.html#api-index-1.18">1.18</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterCanvas--scale-factor-set"></a><h3>The <code class="literal">“scale-factor-set”</code> property</h3>
<pre class="programlisting"> “scale-factor-set” <span class="type">gboolean</span></pre>
<p>Whether the <a class="link" href="ClutterCanvas.html#ClutterCanvas--scale-factor" title="The “scale-factor” property"><span class="type">“scale-factor”</span></a> property is set.</p>
<p>If the <a class="link" href="ClutterCanvas.html#ClutterCanvas--scale-factor-set" title="The “scale-factor-set” property"><span class="type">“scale-factor-set”</span></a> property is <code class="literal">FALSE</code>
then <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> will use the <a class="link" href="ClutterSettings.html#ClutterSettings--window-scaling-factor" title="The “window-scaling-factor” property"><span class="type">“window-scaling-factor”</span></a>
property.</p>
<p>Flags: Read</p>
<p>Default value: FALSE</p>
<p class="since">Since: <a class="link" href="ix16.html#api-index-1.18">1.18</a></p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterCanvas--width"></a><h3>The <code class="literal">“width”</code> property</h3>
<pre class="programlisting"> “width” <span class="type">gint</span></pre>
<p>The width of the canvas.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: >= -1</p>
<p>Default value: -1</p>
<p class="since">Since: <a class="link" href="ix12.html#api-index-1.10">1.10</a></p>
</div>
</div>
<div class="refsect1">
<a name="ClutterCanvas.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="ClutterCanvas-draw"></a><h3>The <code class="literal">“draw”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
user_function (<a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> *canvas,
<span class="type">CairoContext</span> *cr,
<span class="type">gint</span> width,
<span class="type">gint</span> height,
<span class="type">gpointer</span> user_data)</pre>
<p>The <a class="link" href="ClutterCanvas.html#ClutterCanvas-draw" title="The “draw” signal"><span class="type">“draw”</span></a> signal is emitted each time a canvas is
invalidated.</p>
<p>It is safe to connect multiple handlers to this signal: each
handler invocation will be automatically protected by <code class="function">cairo_save()</code>
and <code class="function">cairo_restore()</code> pairs.</p>
<div class="refsect3">
<a name="id-1.5.8.2.13.2.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>canvas</p></td>
<td class="parameter_description"><p>the <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> that emitted the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cr</p></td>
<td class="parameter_description"><p>the Cairo context used to draw</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>the width of the <em class="parameter"><code>canvas</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>the height of the <em class="parameter"><code>canvas</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.8.2.13.2.7"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the signal emission should stop, and
<code class="literal">FALSE</code> otherwise</p>
</div>
<p>Flags: No Recursion</p>
<p class="since">Since: <a class="link" href="ix12.html#api-index-1.10">1.10</a></p>
</div>
</div>
<div class="refsect1">
<a name="ClutterCanvas.see-also"></a><h2>See Also</h2>
<p><a class="link" href="ClutterContent.html" title="ClutterContent"><span class="type">ClutterContent</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>
|