41
33
<h2><span class="refentrytitle"><a name="ClutterCairoTexture.top_of_page"></a>ClutterCairoTexture</span></h2>
42
34
<p>ClutterCairoTexture — Texture with Cairo integration</p>
44
<td valign="top" align="right"></td>
36
<td class="gallery_image" valign="top" align="right"></td>
45
37
</tr></table></div>
46
<div class="refsynopsisdiv">
47
<a name="ClutterCairoTexture.synopsis"></a><h2>Synopsis</h2>
48
<pre class="synopsis">struct <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-struct" title="struct ClutterCairoTexture">ClutterCairoTexture</a>;
49
struct <a class="link" href="ClutterCairoTexture.html#ClutterCairoTextureClass" title="struct ClutterCairoTextureClass">ClutterCairoTextureClass</a>;
50
<a class="link" href="ClutterActor.html" title="ClutterActor"><span class="returnvalue">ClutterActor</span></a> * <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-new" title="clutter_cairo_texture_new ()">clutter_cairo_texture_new</a> (<em class="parameter"><code><span class="type">guint</span> width</code></em>,
51
<em class="parameter"><code><span class="type">guint</span> height</code></em>);
52
<span class="returnvalue">void</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-set-surface-size" title="clutter_cairo_texture_set_surface_size ()">clutter_cairo_texture_set_surface_size</a>
53
(<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
54
<em class="parameter"><code><span class="type">guint</span> width</code></em>,
55
<em class="parameter"><code><span class="type">guint</span> height</code></em>);
56
<span class="returnvalue">void</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-get-surface-size" title="clutter_cairo_texture_get_surface_size ()">clutter_cairo_texture_get_surface_size</a>
57
(<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
58
<em class="parameter"><code><span class="type">guint</span> *width</code></em>,
59
<em class="parameter"><code><span class="type">guint</span> *height</code></em>);
60
<span class="returnvalue">void</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-set-auto-resize" title="clutter_cairo_texture_set_auto_resize ()">clutter_cairo_texture_set_auto_resize</a>
61
(<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
62
<em class="parameter"><code><span class="type">gboolean</span> value</code></em>);
63
<span class="returnvalue">gboolean</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-get-auto-resize" title="clutter_cairo_texture_get_auto_resize ()">clutter_cairo_texture_get_auto_resize</a>
64
(<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);
66
<a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="returnvalue">cairo_t</span></a> * <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create" title="clutter_cairo_texture_create ()">clutter_cairo_texture_create</a> (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);
67
<a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="returnvalue">cairo_t</span></a> * <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create-region" title="clutter_cairo_texture_create_region ()">clutter_cairo_texture_create_region</a> (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
68
<em class="parameter"><code><span class="type">gint</span> x_offset</code></em>,
69
<em class="parameter"><code><span class="type">gint</span> y_offset</code></em>,
70
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
71
<em class="parameter"><code><span class="type">gint</span> height</code></em>);
73
<span class="returnvalue">void</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()">clutter_cairo_texture_invalidate_rectangle</a>
74
(<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
75
<em class="parameter"><code><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-Types.html#cairo-rectangle-int-t"><span class="type">cairo_rectangle_int_t</span></a> *rect</code></em>);
76
<span class="returnvalue">void</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()">clutter_cairo_texture_invalidate</a> (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);
77
<span class="returnvalue">void</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-clear" title="clutter_cairo_texture_clear ()">clutter_cairo_texture_clear</a> (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);
38
<div class="refsect1">
39
<a name="ClutterCairoTexture.functions"></a><h2>Functions</h2>
40
<div class="informaltable"><table width="100%" border="0">
42
<col width="150px" class="functions_return">
43
<col class="functions_name">
47
<td class="function_type">
48
<a class="link" href="ClutterActor.html" title="ClutterActor"><span class="returnvalue">ClutterActor</span></a> *
50
<td class="function_name">
51
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-new" title="clutter_cairo_texture_new ()">clutter_cairo_texture_new</a> <span class="c_punctuation">()</span>
55
<td class="function_type">
56
<span class="returnvalue">void</span>
58
<td class="function_name">
59
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-set-surface-size" title="clutter_cairo_texture_set_surface_size ()">clutter_cairo_texture_set_surface_size</a> <span class="c_punctuation">()</span>
63
<td class="function_type">
64
<span class="returnvalue">void</span>
66
<td class="function_name">
67
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-get-surface-size" title="clutter_cairo_texture_get_surface_size ()">clutter_cairo_texture_get_surface_size</a> <span class="c_punctuation">()</span>
71
<td class="function_type">
72
<span class="returnvalue">void</span>
74
<td class="function_name">
75
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-set-auto-resize" title="clutter_cairo_texture_set_auto_resize ()">clutter_cairo_texture_set_auto_resize</a> <span class="c_punctuation">()</span>
79
<td class="function_type">
80
<span class="returnvalue">gboolean</span>
82
<td class="function_name">
83
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-get-auto-resize" title="clutter_cairo_texture_get_auto_resize ()">clutter_cairo_texture_get_auto_resize</a> <span class="c_punctuation">()</span>
87
<td class="function_type">
88
<a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="returnvalue">cairo_t</span></a> *
90
<td class="function_name">
91
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create" title="clutter_cairo_texture_create ()">clutter_cairo_texture_create</a> <span class="c_punctuation">()</span>
95
<td class="function_type">
96
<a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="returnvalue">cairo_t</span></a> *
98
<td class="function_name">
99
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create-region" title="clutter_cairo_texture_create_region ()">clutter_cairo_texture_create_region</a> <span class="c_punctuation">()</span>
103
<td class="function_type">
104
<span class="returnvalue">void</span>
106
<td class="function_name">
107
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()">clutter_cairo_texture_invalidate_rectangle</a> <span class="c_punctuation">()</span>
111
<td class="function_type">
112
<span class="returnvalue">void</span>
114
<td class="function_name">
115
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()">clutter_cairo_texture_invalidate</a> <span class="c_punctuation">()</span>
119
<td class="function_type">
120
<span class="returnvalue">void</span>
122
<td class="function_name">
123
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-clear" title="clutter_cairo_texture_clear ()">clutter_cairo_texture_clear</a> <span class="c_punctuation">()</span>
129
<div class="refsect1">
130
<a name="ClutterCairoTexture.properties"></a><h2>Properties</h2>
131
<div class="informaltable"><table border="0">
133
<col width="150px" class="properties_type">
134
<col width="300px" class="properties_name">
135
<col width="200px" class="properties_flags">
139
<td class="property_type"><span class="type">gboolean</span></td>
140
<td class="property_name"><a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture--auto-resize" title="The “auto-resize” property">auto-resize</a></td>
141
<td class="property_flags">Read / Write</td>
144
<td class="property_type"><span class="type">guint</span></td>
145
<td class="property_name"><a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture--surface-height" title="The “surface-height” property">surface-height</a></td>
146
<td class="property_flags">Read / Write</td>
149
<td class="property_type"><span class="type">guint</span></td>
150
<td class="property_name"><a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture--surface-width" title="The “surface-width” property">surface-width</a></td>
151
<td class="property_flags">Read / Write</td>
156
<div class="refsect1">
157
<a name="ClutterCairoTexture.signals"></a><h2>Signals</h2>
158
<div class="informaltable"><table border="0">
160
<col width="150px" class="signals_return">
161
<col width="300px" class="signals_name">
162
<col width="200px" class="signals_flags">
166
<td class="signal_type">
167
<span class="returnvalue">CairoSurface</span>*</td>
168
<td class="signal_name"><a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-create-surface" title="The “create-surface” signal">create-surface</a></td>
169
<td class="signal_flags">No Recursion</td>
172
<td class="signal_type"><span class="returnvalue">gboolean</span></td>
173
<td class="signal_name"><a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title="The “draw” signal">draw</a></td>
174
<td class="signal_flags">No Recursion</td>
179
<div class="refsect1">
180
<a name="ClutterCairoTexture.other"></a><h2>Types and Values</h2>
181
<div class="informaltable"><table width="100%" border="0">
183
<col width="150px" class="name">
184
<col class="description">
188
<td class="datatype_keyword">struct</td>
189
<td class="function_name"><a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-struct" title="struct ClutterCairoTexture">ClutterCairoTexture</a></td>
192
<td class="datatype_keyword">struct</td>
193
<td class="function_name"><a class="link" href="ClutterCairoTexture.html#ClutterCairoTextureClass" title="struct ClutterCairoTextureClass">ClutterCairoTextureClass</a></td>
80
198
<div class="refsect1">
81
199
<a name="ClutterCairoTexture.object-hierarchy"></a><h2>Object Hierarchy</h2>
82
<pre class="synopsis">
84
+----GInitiallyUnowned
85
+----<a class="link" href="ClutterActor.html" title="ClutterActor">ClutterActor</a>
86
+----<a class="link" href="ClutterTexture.html" title="ClutterTexture">ClutterTexture</a>
87
+----ClutterCairoTexture
200
<pre class="screen"> GObject
201
<span class="lineart">╰──</span> GInitiallyUnowned
202
<span class="lineart">╰──</span> <a class="link" href="ClutterActor.html" title="ClutterActor">ClutterActor</a>
203
<span class="lineart">╰──</span> <a class="link" href="ClutterTexture.html" title="ClutterTexture">ClutterTexture</a>
204
<span class="lineart">╰──</span> ClutterCairoTexture
90
207
<div class="refsect1">
94
211
<a class="link" href="ClutterContainer.html" title="ClutterContainer">ClutterContainer</a>, <a class="link" href="ClutterScriptable.html" title="ClutterScriptable">ClutterScriptable</a>, <a class="link" href="ClutterAnimatable.html" title="ClutterAnimatable">ClutterAnimatable</a> and AtkImplementorIface.</p>
96
213
<div class="refsect1">
97
<a name="ClutterCairoTexture.properties"></a><h2>Properties</h2>
98
<pre class="synopsis">
99
"<a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture--auto-resize" title='The "auto-resize" property'>auto-resize</a>" <span class="type">gboolean</span> : Read / Write
100
"<a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture--surface-height" title='The "surface-height" property'>surface-height</a>" <span class="type">guint</span> : Read / Write
101
"<a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture--surface-width" title='The "surface-width" property'>surface-width</a>" <span class="type">guint</span> : Read / Write
104
<div class="refsect1">
105
<a name="ClutterCairoTexture.signals"></a><h2>Signals</h2>
106
<pre class="synopsis">
107
"<a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-create-surface" title='The "create-surface" signal'>create-surface</a>" : <code class="literal">No Recursion</code>
108
"<a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'>draw</a>" : <code class="literal">No Recursion</code>
111
<div class="refsect1">
112
214
<a name="ClutterCairoTexture.description"></a><h2>Description</h2>
114
<a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> is a <a class="link" href="ClutterTexture.html" title="ClutterTexture"><span class="type">ClutterTexture</span></a> that displays the contents
215
<p><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> is a <a class="link" href="ClutterTexture.html" title="ClutterTexture"><span class="type">ClutterTexture</span></a> that displays the contents
115
216
of a Cairo context. The <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> actor will create a
116
217
Cairo image surface which will then be uploaded to a GL texture when
121
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
122
<h3 class="title">Note</h3>
123
219
<p>Since <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> uses a Cairo image surface
124
220
internally all the drawing operations will be performed in
125
221
software and not using hardware acceleration. This can lead to
126
222
performance degradation if the contents of the texture change
132
In order to use a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> you should connect to the
133
<a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal; the signal is emitted each time
224
<p>In order to use a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> you should connect to the
225
<a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title="The “draw” signal"><span class="type">“draw”</span></a> signal; the signal is emitted each time
134
226
the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> has been told to invalidate its contents,
135
by using <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()"><code class="function">clutter_cairo_texture_invalidate_rectangle()</code></a> or its
136
sister function, <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()"><code class="function">clutter_cairo_texture_invalidate()</code></a>.
139
Each callback to the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal will receive
140
a <a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> context which can be used for drawing; the Cairo context
227
by using <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()"><code class="function">clutter_cairo_texture_invalidate_rectangle()</code></a> or its
228
sister function, <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()"><code class="function">clutter_cairo_texture_invalidate()</code></a>.</p>
229
<p>Each callback to the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title="The “draw” signal"><span class="type">“draw”</span></a> signal will receive
230
a <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> context which can be used for drawing; the Cairo context
141
231
is owned by the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> and should not be destroyed
146
<div class="example">
147
<a name="cairo-texture-example"></a><p class="title"><b>Example 24. A simple ClutterCairoTexture canvas</b></p>
148
<div class="example-contents">
149
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
152
<td class="listing_lines" align="right"><pre>1
271
<td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string"><stdlib.h></span>
272
<span class="preproc">#include</span><span class="normal"> </span><span class="string"><math.h></span>
273
<span class="preproc">#include</span><span class="normal"> </span><span class="string"><cairo.h></span>
274
<span class="preproc">#include</span><span class="normal"> </span><span class="string"><clutter/clutter.h></span>
276
<span class="keyword">static</span><span class="normal"> gboolean</span>
277
<span class="function">draw_clock</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ClutterCairoTexture</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">canvas</span><span class="symbol">,</span>
278
<span class="normal"> </span><span class="usertype">cairo_t</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">cr</span><span class="symbol">)</span>
279
<span class="cbracket">{</span>
280
<span class="normal"> </span><span class="usertype">guint</span><span class="normal"> width</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">;</span>
281
<span class="normal"> </span><span class="usertype">GDateTime</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">now</span><span class="symbol">;</span>
282
<span class="normal"> </span><span class="type">float</span><span class="normal"> hours</span><span class="symbol">,</span><span class="normal"> minutes</span><span class="symbol">,</span><span class="normal"> seconds</span><span class="symbol">;</span>
284
<span class="normal"> </span><span class="comment">/* get the current time and compute the angles */</span>
285
<span class="normal"> now </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_date_time_new_now_local</span><span class="normal"> </span><span class="symbol">();</span>
286
<span class="normal"> seconds </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_date_time_get_second</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">now</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> G_PI </span><span class="symbol">/</span><span class="normal"> </span><span class="number">30</span><span class="symbol">;</span>
287
<span class="normal"> minutes </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_date_time_get_minute</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">now</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> G_PI </span><span class="symbol">/</span><span class="normal"> </span><span class="number">30</span><span class="symbol">;</span>
288
<span class="normal"> hours </span><span class="symbol">=</span><span class="normal"> </span><span class="function">g_date_time_get_hour</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">now</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> G_PI </span><span class="symbol">/</span><span class="normal"> </span><span class="number">6</span><span class="symbol">;</span>
290
<span class="normal"> </span><span class="comment">/* clear the contents of the canvas, to avoid painting</span>
291
<span class="comment"> * over the previous frame</span>
292
<span class="comment"> */</span>
293
<span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-texture-clear">clutter_cairo_texture_clear</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">);</span>
295
<span class="normal"> </span><span class="comment">/* scale the modelview to the size of the surface */</span>
296
<span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-texture-get-surface-size">clutter_cairo_texture_get_surface_size</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">width</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">height</span><span class="symbol">);</span>
297
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-Transformations.html#cairo-scale">cairo_scale</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> width</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">);</span>
299
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-line-cap">cairo_set_line_cap</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> <a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#CAIRO-LINE-CAP-ROUND:CAPS">CAIRO_LINE_CAP_ROUND</a></span><span class="symbol">);</span>
300
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-line-width">cairo_set_line_width</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.1</span><span class="symbol">);</span>
302
<span class="normal"> </span><span class="comment">/* the black rail that holds the seconds indicator */</span>
303
<span class="normal"> </span><span class="function">clutter_cairo_set_source_color</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> CLUTTER_COLOR_Black</span><span class="symbol">);</span>
304
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-Transformations.html#cairo-translate">cairo_translate</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.5</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.5</span><span class="symbol">);</span>
305
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-arc">cairo_arc</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.4</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> G_PI </span><span class="symbol">*</span><span class="normal"> </span><span class="number">2</span><span class="symbol">);</span>
306
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-stroke">cairo_stroke</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
308
<span class="normal"> </span><span class="comment">/* the seconds indicator */</span>
309
<span class="normal"> </span><span class="function">clutter_cairo_set_source_color</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> CLUTTER_COLOR_White</span><span class="symbol">);</span>
310
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-move-to">cairo_move_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
311
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-arc">cairo_arc</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="function">sinf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">seconds</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">0.4</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="normal"> </span><span class="function">cosf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">seconds</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">0.4</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.05</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> G_PI </span><span class="symbol">*</span><span class="normal"> </span><span class="number">2</span><span class="symbol">);</span>
312
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-fill">cairo_fill</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
314
<span class="normal"> </span><span class="comment">/* the minutes hand */</span>
315
<span class="normal"> </span><span class="function">clutter_cairo_set_source_color</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> CLUTTER_COLOR_DarkChameleon</span><span class="symbol">);</span>
316
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-move-to">cairo_move_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
317
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-line-to">cairo_line_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="function">sinf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">minutes</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">0.4</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="function">cosf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">minutes</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">0.4</span><span class="symbol">);</span>
318
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-stroke">cairo_stroke</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
320
<span class="normal"> </span><span class="comment">/* the hours hand */</span>
321
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-move-to">cairo_move_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
322
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-line-to">cairo_line_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="function">sinf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">hours</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">0.2</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="function">cosf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">hours</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">0.2</span><span class="symbol">);</span>
323
<span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-stroke">cairo_stroke</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
325
<span class="normal"> </span><span class="function">g_date_time_unref</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">now</span><span class="symbol">);</span>
327
<span class="normal"> </span><span class="comment">/* we're done drawing */</span>
328
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> TRUE</span><span class="symbol">;</span>
329
<span class="cbracket">}</span>
331
<span class="keyword">static</span><span class="normal"> gboolean</span>
332
<span class="function">invalidate_clock</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">gpointer</span><span class="normal"> data_</span><span class="symbol">)</span>
333
<span class="cbracket">{</span>
334
<span class="normal"> </span><span class="comment">/* invalidate the contents of the canvas */</span>
335
<span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate">clutter_cairo_texture_invalidate</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">data_</span><span class="symbol">);</span>
337
<span class="normal"> </span><span class="comment">/* keep the timeout source */</span>
338
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> TRUE</span><span class="symbol">;</span>
339
<span class="cbracket">}</span>
341
<span class="normal">G_MODULE_EXPORT </span><span class="type">int</span>
342
<span class="function">test_cairo_clock_main</span><span class="normal"> </span><span class="symbol">(</span><span class="type">int</span><span class="normal"> argc</span><span class="symbol">,</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">argv</span><span class="symbol">[])</span>
343
<span class="cbracket">{</span>
344
<span class="normal"> </span><span class="usertype">ClutterActor</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">stage</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">canvas</span><span class="symbol">;</span>
346
<span class="normal"> </span><span class="comment">/* initialize Clutter */</span>
347
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="clutter-General.html#clutter-init">clutter_init</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">argc</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">argv</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">!=</span><span class="normal"> <a href="clutter-General.html#CLUTTER-INIT-SUCCESS:CAPS">CLUTTER_INIT_SUCCESS</a></span><span class="symbol">)</span>
348
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> EXIT_FAILURE</span><span class="symbol">;</span>
350
<span class="normal"> </span><span class="comment">/* create a resizable stage */</span>
351
<span class="normal"> stage </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="ClutterStage.html#clutter-stage-new">clutter_stage_new</a></span><span class="normal"> </span><span class="symbol">();</span>
352
<span class="normal"> </span><span class="function"><a href="ClutterStage.html#clutter-stage-set-title">clutter_stage_set_title</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">CLUTTER_STAGE</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">),</span><span class="normal"> </span><span class="string">"2D Clock"</span><span class="symbol">);</span>
353
<span class="normal"> </span><span class="function"><a href="ClutterStage.html#clutter-stage-set-user-resizable">clutter_stage_set_user_resizable</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">CLUTTER_STAGE</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">),</span><span class="normal"> TRUE</span><span class="symbol">);</span>
354
<span class="normal"> </span><span class="function"><a href="ClutterActor.html#clutter-actor-set-background-color">clutter_actor_set_background_color</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">,</span><span class="normal"> CLUTTER_COLOR_LightSkyBlue</span><span class="symbol">);</span>
355
<span class="normal"> </span><span class="function"><a href="ClutterActor.html#clutter-actor-set-size">clutter_actor_set_size</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">,</span><span class="normal"> </span><span class="number">300</span><span class="symbol">,</span><span class="normal"> </span><span class="number">300</span><span class="symbol">);</span>
356
<span class="normal"> </span><span class="function"><a href="ClutterActor.html#clutter-actor-show">clutter_actor_show</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">);</span>
358
<span class="normal"> </span><span class="comment">/* our 2D canvas, courtesy of Cairo */</span>
359
<span class="normal"> canvas </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-texture-new">clutter_cairo_texture_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="number">300</span><span class="symbol">,</span><span class="normal"> </span><span class="number">300</span><span class="symbol">);</span>
360
<span class="normal"> </span><span class="function"><a href="ClutterContainer.html#clutter-container-add-actor">clutter_container_add_actor</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">CLUTTER_CONTAINER</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">),</span><span class="normal"> canvas</span><span class="symbol">);</span>
362
<span class="normal"> </span><span class="comment">/* bind the size of the canvas to that of the stage */</span>
363
<span class="normal"> </span><span class="function"><a href="ClutterActor.html#clutter-actor-add-constraint">clutter_actor_add_constraint</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="ClutterBindConstraint.html#clutter-bind-constraint-new">clutter_bind_constraint_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">,</span><span class="normal"> <a href="ClutterBindConstraint.html#CLUTTER-BIND-SIZE:CAPS">CLUTTER_BIND_SIZE</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">));</span>
365
<span class="normal"> </span><span class="comment">/* make sure to match allocation to canvas size */</span>
366
<span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-texture-set-auto-resize">clutter_cairo_texture_set_auto_resize</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">CLUTTER_CAIRO_TEXTURE</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">),</span><span class="normal"> TRUE</span><span class="symbol">);</span>
368
<span class="normal"> </span><span class="comment">/* quit on destroy */</span>
369
<span class="normal"> </span><span class="function">g_signal_connect</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"destroy"</span><span class="symbol">,</span><span class="normal"> </span><span class="function">G_CALLBACK</span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="clutter-General.html#clutter-main-quit">clutter_main_quit</a></span><span class="symbol">),</span><span class="normal"> NULL</span><span class="symbol">);</span>
371
<span class="normal"> </span><span class="comment">/* connect our drawing code */</span>
372
<span class="normal"> </span><span class="function">g_signal_connect</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"draw"</span><span class="symbol">,</span><span class="normal"> </span><span class="function">G_CALLBACK</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">draw_clock</span><span class="symbol">),</span><span class="normal"> NULL</span><span class="symbol">);</span>
374
<span class="normal"> </span><span class="comment">/* invalidate the canvas, so that we can draw before the main loop starts */</span>
375
<span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate">clutter_cairo_texture_invalidate</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">CLUTTER_CAIRO_TEXTURE</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">));</span>
377
<span class="normal"> </span><span class="comment">/* set up a timer that invalidates the canvas every second */</span>
378
<span class="normal"> </span><span class="function"><a href="clutter-General.html#clutter-threads-add-timeout">clutter_threads_add_timeout</a></span><span class="normal"> </span><span class="symbol">(</span><span class="number">1000</span><span class="symbol">,</span><span class="normal"> invalidate_clock</span><span class="symbol">,</span><span class="normal"> canvas</span><span class="symbol">);</span>
380
<span class="normal"> </span><span class="function"><a href="clutter-General.html#clutter-main">clutter_main</a></span><span class="normal"> </span><span class="symbol">();</span>
382
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> EXIT_SUCCESS</span><span class="symbol">;</span>
383
<span class="cbracket">}</span>
385
<span class="normal">G_MODULE_EXPORT </span><span class="usertype">const</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span>
386
<span class="function">test_cairo_clock_describe</span><span class="normal"> </span><span class="symbol">(</span><span class="type">void</span><span class="symbol">)</span>
387
<span class="cbracket">{</span>
388
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="string">"Simple 2D canvas using a Cairo texture actor"</span><span class="symbol">;</span>
389
<span class="cbracket">}</span></pre></td>
396
<p><br class="example-break">
399
<a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> is available since Clutter 1.0.
402
<a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> is deprecated since Clutter 1.12.
405
<div class="refsect1">
406
<a name="ClutterCairoTexture.details"></a><h2>Details</h2>
233
<p><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> is available since Clutter 1.0.</p>
234
<p><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> is deprecated since Clutter 1.12. You should
235
use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead.</p>
237
<div class="refsect1">
238
<a name="ClutterCairoTexture.functions_details"></a><h2>Functions</h2>
239
<div class="refsect2">
240
<a name="clutter-cairo-texture-new"></a><h3>clutter_cairo_texture_new ()</h3>
241
<pre class="programlisting"><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="returnvalue">ClutterActor</span></a> *
242
clutter_cairo_texture_new (<em class="parameter"><code><span class="type">guint</span> width</code></em>,
243
<em class="parameter"><code><span class="type">guint</span> height</code></em>);</pre>
244
<div class="warning">
245
<p><code class="literal">clutter_cairo_texture_new</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
246
<p>Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
248
<p>Creates a new <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> actor, with a surface of <em class="parameter"><code>width</code></em>
250
<em class="parameter"><code>height</code></em>
252
<div class="refsect3">
253
<a name="id-1.10.13.10.2.7"></a><h4>Parameters</h4>
254
<div class="informaltable"><table width="100%" border="0">
256
<col width="150px" class="parameters_name">
257
<col class="parameters_description">
258
<col width="200px" class="parameters_annotations">
262
<td class="parameter_name"><p>width</p></td>
263
<td class="parameter_description"><p>the width of the surface</p></td>
264
<td class="parameter_annotations"> </td>
267
<td class="parameter_name"><p>height</p></td>
268
<td class="parameter_description"><p>the height of the surface</p></td>
269
<td class="parameter_annotations"> </td>
274
<div class="refsect3">
275
<a name="id-1.10.13.10.2.8"></a><h4>Returns</h4>
276
<p> the newly created <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> actor</p>
279
<p class="since">Since 1.0</p>
282
<div class="refsect2">
283
<a name="clutter-cairo-texture-set-surface-size"></a><h3>clutter_cairo_texture_set_surface_size ()</h3>
284
<pre class="programlisting"><span class="returnvalue">void</span>
285
clutter_cairo_texture_set_surface_size
286
(<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
287
<em class="parameter"><code><span class="type">guint</span> width</code></em>,
288
<em class="parameter"><code><span class="type">guint</span> height</code></em>);</pre>
289
<div class="warning">
290
<p><code class="literal">clutter_cairo_texture_set_surface_size</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
291
<p>Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
293
<p>Resizes the Cairo surface used by <em class="parameter"><code>self</code></em>
294
to <em class="parameter"><code>width</code></em>
295
and <em class="parameter"><code>height</code></em>
297
<p>This function will not invalidate the contents of the Cairo
298
texture: you will have to explicitly call either
299
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()"><code class="function">clutter_cairo_texture_invalidate_rectangle()</code></a> or
300
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()"><code class="function">clutter_cairo_texture_invalidate()</code></a>.</p>
301
<div class="refsect3">
302
<a name="id-1.10.13.10.3.8"></a><h4>Parameters</h4>
303
<div class="informaltable"><table width="100%" border="0">
305
<col width="150px" class="parameters_name">
306
<col class="parameters_description">
307
<col width="200px" class="parameters_annotations">
311
<td class="parameter_name"><p>self</p></td>
312
<td class="parameter_description"><p>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a></p></td>
313
<td class="parameter_annotations"> </td>
316
<td class="parameter_name"><p>width</p></td>
317
<td class="parameter_description"><p>the new width of the surface</p></td>
318
<td class="parameter_annotations"> </td>
321
<td class="parameter_name"><p>height</p></td>
322
<td class="parameter_description"><p>the new height of the surface</p></td>
323
<td class="parameter_annotations"> </td>
328
<p class="since">Since 1.0</p>
331
<div class="refsect2">
332
<a name="clutter-cairo-texture-get-surface-size"></a><h3>clutter_cairo_texture_get_surface_size ()</h3>
333
<pre class="programlisting"><span class="returnvalue">void</span>
334
clutter_cairo_texture_get_surface_size
335
(<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
336
<em class="parameter"><code><span class="type">guint</span> *width</code></em>,
337
<em class="parameter"><code><span class="type">guint</span> *height</code></em>);</pre>
338
<div class="warning">
339
<p><code class="literal">clutter_cairo_texture_get_surface_size</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
340
<p>Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
342
<p>Retrieves the surface width and height for <em class="parameter"><code>self</code></em>
344
<div class="refsect3">
345
<a name="id-1.10.13.10.4.7"></a><h4>Parameters</h4>
346
<div class="informaltable"><table width="100%" border="0">
348
<col width="150px" class="parameters_name">
349
<col class="parameters_description">
350
<col width="200px" class="parameters_annotations">
354
<td class="parameter_name"><p>self</p></td>
355
<td class="parameter_description"><p>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a></p></td>
356
<td class="parameter_annotations"> </td>
359
<td class="parameter_name"><p>width</p></td>
360
<td class="parameter_description"><p> return location for the surface width, or <code class="literal">NULL</code>. </p></td>
361
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
364
<td class="parameter_name"><p>height</p></td>
365
<td class="parameter_description"><p> return location for the surface height, or <code class="literal">NULL</code>. </p></td>
366
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
371
<p class="since">Since 1.0</p>
374
<div class="refsect2">
375
<a name="clutter-cairo-texture-set-auto-resize"></a><h3>clutter_cairo_texture_set_auto_resize ()</h3>
376
<pre class="programlisting"><span class="returnvalue">void</span>
377
clutter_cairo_texture_set_auto_resize (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
378
<em class="parameter"><code><span class="type">gboolean</span> value</code></em>);</pre>
379
<div class="warning">
380
<p><code class="literal">clutter_cairo_texture_set_auto_resize</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
381
<p>Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
383
<p>Sets whether the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> should ensure that the
384
backing Cairo surface used matches the allocation assigned to
385
the actor. If the allocation changes, the contents of the
386
<a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> will also be invalidated automatically.</p>
387
<div class="refsect3">
388
<a name="id-1.10.13.10.5.7"></a><h4>Parameters</h4>
389
<div class="informaltable"><table width="100%" border="0">
391
<col width="150px" class="parameters_name">
392
<col class="parameters_description">
393
<col width="200px" class="parameters_annotations">
397
<td class="parameter_name"><p>self</p></td>
398
<td class="parameter_description"><p>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a></p></td>
399
<td class="parameter_annotations"> </td>
402
<td class="parameter_name"><p>value</p></td>
403
<td class="parameter_description"><p><code class="literal">TRUE</code> if the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> should bind the surface
404
size to the allocation</p></td>
405
<td class="parameter_annotations"> </td>
410
<p class="since">Since 1.8</p>
413
<div class="refsect2">
414
<a name="clutter-cairo-texture-get-auto-resize"></a><h3>clutter_cairo_texture_get_auto_resize ()</h3>
415
<pre class="programlisting"><span class="returnvalue">gboolean</span>
416
clutter_cairo_texture_get_auto_resize (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);</pre>
417
<div class="warning">
418
<p><code class="literal">clutter_cairo_texture_get_auto_resize</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
419
<p>Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
421
<p>Retrieves the value set using <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-set-auto-resize" title="clutter_cairo_texture_set_auto_resize ()"><code class="function">clutter_cairo_texture_set_auto_resize()</code></a>.</p>
422
<div class="refsect3">
423
<a name="id-1.10.13.10.6.7"></a><h4>Parameters</h4>
424
<div class="informaltable"><table width="100%" border="0">
426
<col width="150px" class="parameters_name">
427
<col class="parameters_description">
428
<col width="200px" class="parameters_annotations">
431
<td class="parameter_name"><p>self</p></td>
432
<td class="parameter_description"><p>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a></p></td>
433
<td class="parameter_annotations"> </td>
437
<div class="refsect3">
438
<a name="id-1.10.13.10.6.8"></a><h4>Returns</h4>
439
<p> <code class="literal">TRUE</code> if the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> should track the
440
allocation, and <code class="literal">FALSE</code> otherwise</p>
443
<p class="since">Since 1.8</p>
446
<div class="refsect2">
447
<a name="clutter-cairo-texture-create"></a><h3>clutter_cairo_texture_create ()</h3>
448
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="returnvalue">cairo_t</span></a> *
449
clutter_cairo_texture_create (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);</pre>
450
<div class="warning">
451
<p><code class="literal">clutter_cairo_texture_create</code> has been deprecated since version 1.8 and should not be used in newly-written code.</p>
452
<p>Use the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title="The “draw” signal"><span class="type">“draw”</span></a> signal and
453
the <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()"><code class="function">clutter_cairo_texture_invalidate()</code></a> function to obtain a
454
Cairo context for 2D drawing.</p>
456
<p>Creates a new Cairo context for the <em class="parameter"><code>cairo</code></em>
458
similar to using <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create-region" title="clutter_cairo_texture_create_region ()"><code class="function">clutter_cairo_texture_create_region()</code></a> with <em class="parameter"><code>x_offset</code></em>
460
and <em class="parameter"><code>y_offset</code></em>
461
of 0, <em class="parameter"><code>width</code></em>
462
equal to the <em class="parameter"><code>cairo</code></em>
463
texture surface width
464
and <em class="parameter"><code>height</code></em>
465
equal to the <em class="parameter"><code>cairo</code></em>
466
texture surface height.</p>
467
<p>Do not call this function within the paint virtual
468
function or from a callback to the <a class="link" href="ClutterActor.html#ClutterActor-paint" title="The “paint” signal"><span class="type">“paint”</span></a>
470
<div class="refsect3">
471
<a name="id-1.10.13.10.7.8"></a><h4>Parameters</h4>
472
<div class="informaltable"><table width="100%" border="0">
474
<col width="150px" class="parameters_name">
475
<col class="parameters_description">
476
<col width="200px" class="parameters_annotations">
479
<td class="parameter_name"><p>self</p></td>
480
<td class="parameter_description"><p>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a></p></td>
481
<td class="parameter_annotations"> </td>
485
<div class="refsect3">
486
<a name="id-1.10.13.10.7.9"></a><h4>Returns</h4>
487
<p> a newly created Cairo context. Use <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-destroy"><code class="function">cairo_destroy()</code></a>
488
to upload the contents of the context when done drawing</p>
491
<p class="since">Since 1.0</p>
494
<div class="refsect2">
495
<a name="clutter-cairo-texture-create-region"></a><h3>clutter_cairo_texture_create_region ()</h3>
496
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="returnvalue">cairo_t</span></a> *
497
clutter_cairo_texture_create_region (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
498
<em class="parameter"><code><span class="type">gint</span> x_offset</code></em>,
499
<em class="parameter"><code><span class="type">gint</span> y_offset</code></em>,
500
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
501
<em class="parameter"><code><span class="type">gint</span> height</code></em>);</pre>
502
<div class="warning">
503
<p><code class="literal">clutter_cairo_texture_create_region</code> has been deprecated since version 1.8 and should not be used in newly-written code.</p>
504
<p>Use the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title="The “draw” signal"><span class="type">“draw”</span></a> signal and
505
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()"><code class="function">clutter_cairo_texture_invalidate_rectangle()</code></a> to obtain a
506
clipped Cairo context for 2D drawing.</p>
508
<p>Creates a new Cairo context that will updat the region defined
509
by <em class="parameter"><code>x_offset</code></em>
510
, <em class="parameter"><code>y_offset</code></em>
511
, <em class="parameter"><code>width</code></em>
512
and <em class="parameter"><code>height</code></em>
514
<p>Do not call this function within the paint virtual
515
function or from a callback to the <a class="link" href="ClutterActor.html#ClutterActor-paint" title="The “paint” signal"><span class="type">“paint”</span></a>
517
<div class="refsect3">
518
<a name="id-1.10.13.10.8.8"></a><h4>Parameters</h4>
519
<div class="informaltable"><table width="100%" border="0">
521
<col width="150px" class="parameters_name">
522
<col class="parameters_description">
523
<col width="200px" class="parameters_annotations">
527
<td class="parameter_name"><p>self</p></td>
528
<td class="parameter_description"><p>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a></p></td>
529
<td class="parameter_annotations"> </td>
532
<td class="parameter_name"><p>x_offset</p></td>
533
<td class="parameter_description"><p>offset of the region on the X axis</p></td>
534
<td class="parameter_annotations"> </td>
537
<td class="parameter_name"><p>y_offset</p></td>
538
<td class="parameter_description"><p>offset of the region on the Y axis</p></td>
539
<td class="parameter_annotations"> </td>
542
<td class="parameter_name"><p>width</p></td>
543
<td class="parameter_description"><p>width of the region, or -1 for the full surface width</p></td>
544
<td class="parameter_annotations"> </td>
547
<td class="parameter_name"><p>height</p></td>
548
<td class="parameter_description"><p>height of the region, or -1 for the full surface height</p></td>
549
<td class="parameter_annotations"> </td>
554
<div class="refsect3">
555
<a name="id-1.10.13.10.8.9"></a><h4>Returns</h4>
556
<p> a newly created Cairo context. Use <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-destroy"><code class="function">cairo_destroy()</code></a>
557
to upload the contents of the context when done drawing</p>
560
<p class="since">Since 1.0</p>
563
<div class="refsect2">
564
<a name="clutter-cairo-texture-invalidate-rectangle"></a><h3>clutter_cairo_texture_invalidate_rectangle ()</h3>
565
<pre class="programlisting"><span class="returnvalue">void</span>
566
clutter_cairo_texture_invalidate_rectangle
567
(<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
568
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/cairo/cairo-Types.html#cairo-rectangle-int-t"><span class="type">cairo_rectangle_int_t</span></a> *rect</code></em>);</pre>
569
<div class="warning">
570
<p><code class="literal">clutter_cairo_texture_invalidate_rectangle</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
571
<p>Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
573
<p>Invalidates a rectangular region of a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>.</p>
574
<p>The invalidation will cause the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title="The “draw” signal"><span class="type">“draw”</span></a> signal
576
<p>See also: <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()"><code class="function">clutter_cairo_texture_invalidate()</code></a></p>
577
<div class="refsect3">
578
<a name="id-1.10.13.10.9.9"></a><h4>Parameters</h4>
579
<div class="informaltable"><table width="100%" border="0">
581
<col width="150px" class="parameters_name">
582
<col class="parameters_description">
583
<col width="200px" class="parameters_annotations">
587
<td class="parameter_name"><p>self</p></td>
588
<td class="parameter_description"><p>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a></p></td>
589
<td class="parameter_annotations"> </td>
592
<td class="parameter_name"><p>rect</p></td>
593
<td class="parameter_description"><p> a rectangle with the area to invalida,
594
or <code class="literal">NULL</code> to perform an unbounded invalidation. </p></td>
595
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
600
<p class="since">Since 1.8</p>
603
<div class="refsect2">
604
<a name="clutter-cairo-texture-invalidate"></a><h3>clutter_cairo_texture_invalidate ()</h3>
605
<pre class="programlisting"><span class="returnvalue">void</span>
606
clutter_cairo_texture_invalidate (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);</pre>
607
<div class="warning">
608
<p><code class="literal">clutter_cairo_texture_invalidate</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
609
<p>Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
611
<p>Invalidates the whole surface of a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>.</p>
612
<p>This function will cause the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title="The “draw” signal"><span class="type">“draw”</span></a> signal
614
<p>See also: <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()"><code class="function">clutter_cairo_texture_invalidate_rectangle()</code></a></p>
615
<div class="refsect3">
616
<a name="id-1.10.13.10.10.9"></a><h4>Parameters</h4>
617
<div class="informaltable"><table width="100%" border="0">
619
<col width="150px" class="parameters_name">
620
<col class="parameters_description">
621
<col width="200px" class="parameters_annotations">
624
<td class="parameter_name"><p>self</p></td>
625
<td class="parameter_description"><p>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a></p></td>
626
<td class="parameter_annotations"> </td>
630
<p class="since">Since 1.8</p>
633
<div class="refsect2">
634
<a name="clutter-cairo-texture-clear"></a><h3>clutter_cairo_texture_clear ()</h3>
635
<pre class="programlisting"><span class="returnvalue">void</span>
636
clutter_cairo_texture_clear (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);</pre>
637
<div class="warning">
638
<p><code class="literal">clutter_cairo_texture_clear</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
639
<p>Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
641
<p>Clears <em class="parameter"><code>self</code></em>
642
's internal drawing surface, so that the next upload
643
will replace the previous contents of the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
644
rather than adding to it.</p>
645
<p>Calling this function from within a <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title="The “draw” signal"><span class="type">“draw”</span></a>
646
signal handler will clear the invalidated area.</p>
647
<div class="refsect3">
648
<a name="id-1.10.13.10.11.8"></a><h4>Parameters</h4>
649
<div class="informaltable"><table width="100%" border="0">
651
<col width="150px" class="parameters_name">
652
<col class="parameters_description">
653
<col width="200px" class="parameters_annotations">
656
<td class="parameter_name"><p>self</p></td>
657
<td class="parameter_description"><p>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a></p></td>
658
<td class="parameter_annotations"> </td>
662
<p class="since">Since 1.0</p>
665
<div class="refsect1">
666
<a name="ClutterCairoTexture.other_details"></a><h2>Types and Values</h2>
407
667
<div class="refsect2">
408
668
<a name="ClutterCairoTexture-struct"></a><h3>struct ClutterCairoTexture</h3>
409
669
<pre class="programlisting">struct ClutterCairoTexture;</pre>
410
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
411
<h3 class="title">Warning</h3>
412
<p><code class="literal">ClutterCairoTexture</code> has been deprecated since version 1.12 and should not be used in newly-written code. Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
670
<div class="warning">
671
<p><code class="literal">ClutterCairoTexture</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
672
<p>Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
415
The <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> struct contains only private data.
674
<p>The <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> struct contains only private data.</p>
417
675
<p class="since">Since 1.0</p>
431
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
432
<h3 class="title">Warning</h3>
433
<p><code class="literal">ClutterCairoTextureClass</code> has been deprecated since version 1.12 and should not be used in newly-written code. Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
436
The <a class="link" href="ClutterCairoTexture.html#ClutterCairoTextureClass" title="struct ClutterCairoTextureClass"><span class="type">ClutterCairoTextureClass</span></a> struct contains only private data.
438
<div class="variablelist"><table border="0" class="variablelist">
440
<col align="left" valign="top">
445
<td><p><span class="term"><em class="structfield"><code><a name="ClutterCairoTextureClass.create-surface"></a>create_surface</code></em> ()</span></p></td>
446
<td>class handler for the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-create-surface" title='The "create-surface" signal'><span class="type">"create-surface"</span></a>
450
<td><p><span class="term"><em class="structfield"><code><a name="ClutterCairoTextureClass.draw"></a>draw</code></em> ()</span></p></td>
451
<td>class handler for the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal</td>
455
<p class="since">Since 1.0</p>
458
<div class="refsect2">
459
<a name="clutter-cairo-texture-new"></a><h3>clutter_cairo_texture_new ()</h3>
460
<pre class="programlisting"><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="returnvalue">ClutterActor</span></a> * clutter_cairo_texture_new (<em class="parameter"><code><span class="type">guint</span> width</code></em>,
461
<em class="parameter"><code><span class="type">guint</span> height</code></em>);</pre>
462
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
463
<h3 class="title">Warning</h3>
464
<p><code class="literal">clutter_cairo_texture_new</code> has been deprecated since version 1.12 and should not be used in newly-written code. Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
467
Creates a new <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> actor, with a surface of <em class="parameter"><code>width</code></em> by
468
<em class="parameter"><code>height</code></em> pixels.
470
<div class="variablelist"><table border="0" class="variablelist">
472
<col align="left" valign="top">
477
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
478
<td>the width of the surface</td>
481
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
482
<td>the height of the surface</td>
485
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
486
<td>the newly created <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> actor</td>
490
<p class="since">Since 1.0</p>
493
<div class="refsect2">
494
<a name="clutter-cairo-texture-set-surface-size"></a><h3>clutter_cairo_texture_set_surface_size ()</h3>
495
<pre class="programlisting"><span class="returnvalue">void</span> clutter_cairo_texture_set_surface_size
496
(<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
497
<em class="parameter"><code><span class="type">guint</span> width</code></em>,
498
<em class="parameter"><code><span class="type">guint</span> height</code></em>);</pre>
499
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
500
<h3 class="title">Warning</h3>
501
<p><code class="literal">clutter_cairo_texture_set_surface_size</code> has been deprecated since version 1.12 and should not be used in newly-written code. Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
504
Resizes the Cairo surface used by <em class="parameter"><code>self</code></em> to <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>.
507
This function will not invalidate the contents of the Cairo
508
texture: you will have to explicitly call either
509
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()"><code class="function">clutter_cairo_texture_invalidate_rectangle()</code></a> or
510
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()"><code class="function">clutter_cairo_texture_invalidate()</code></a>.
512
<div class="variablelist"><table border="0" class="variablelist">
514
<col align="left" valign="top">
519
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
520
<td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
524
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
525
<td>the new width of the surface</td>
528
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
529
<td>the new height of the surface</td>
533
<p class="since">Since 1.0</p>
536
<div class="refsect2">
537
<a name="clutter-cairo-texture-get-surface-size"></a><h3>clutter_cairo_texture_get_surface_size ()</h3>
538
<pre class="programlisting"><span class="returnvalue">void</span> clutter_cairo_texture_get_surface_size
539
(<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
540
<em class="parameter"><code><span class="type">guint</span> *width</code></em>,
541
<em class="parameter"><code><span class="type">guint</span> *height</code></em>);</pre>
542
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
543
<h3 class="title">Warning</h3>
544
<p><code class="literal">clutter_cairo_texture_get_surface_size</code> has been deprecated since version 1.12 and should not be used in newly-written code. Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
547
Retrieves the surface width and height for <em class="parameter"><code>self</code></em>.
549
<div class="variablelist"><table border="0" class="variablelist">
551
<col align="left" valign="top">
556
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
557
<td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
561
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
562
<td>return location for the surface width, or <code class="literal">NULL</code>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
566
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
567
<td>return location for the surface height, or <code class="literal">NULL</code>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
572
<p class="since">Since 1.0</p>
575
<div class="refsect2">
576
<a name="clutter-cairo-texture-set-auto-resize"></a><h3>clutter_cairo_texture_set_auto_resize ()</h3>
577
<pre class="programlisting"><span class="returnvalue">void</span> clutter_cairo_texture_set_auto_resize
578
(<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
579
<em class="parameter"><code><span class="type">gboolean</span> value</code></em>);</pre>
580
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
581
<h3 class="title">Warning</h3>
582
<p><code class="literal">clutter_cairo_texture_set_auto_resize</code> has been deprecated since version 1.12 and should not be used in newly-written code. Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
585
Sets whether the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> should ensure that the
586
backing Cairo surface used matches the allocation assigned to
587
the actor. If the allocation changes, the contents of the
588
<a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> will also be invalidated automatically.
590
<div class="variablelist"><table border="0" class="variablelist">
592
<col align="left" valign="top">
597
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
598
<td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
602
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
604
<code class="literal">TRUE</code> if the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> should bind the surface
605
size to the allocation</td>
609
<p class="since">Since 1.8</p>
612
<div class="refsect2">
613
<a name="clutter-cairo-texture-get-auto-resize"></a><h3>clutter_cairo_texture_get_auto_resize ()</h3>
614
<pre class="programlisting"><span class="returnvalue">gboolean</span> clutter_cairo_texture_get_auto_resize
615
(<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);</pre>
616
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
617
<h3 class="title">Warning</h3>
618
<p><code class="literal">clutter_cairo_texture_get_auto_resize</code> has been deprecated since version 1.12 and should not be used in newly-written code. Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
621
Retrieves the value set using <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-set-auto-resize" title="clutter_cairo_texture_set_auto_resize ()"><code class="function">clutter_cairo_texture_set_auto_resize()</code></a>.
623
<div class="variablelist"><table border="0" class="variablelist">
625
<col align="left" valign="top">
630
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
631
<td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
635
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
637
<code class="literal">TRUE</code> if the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> should track the
638
allocation, and <code class="literal">FALSE</code> otherwise</td>
642
<p class="since">Since 1.8</p>
645
<div class="refsect2">
646
<a name="clutter-cairo-texture-create"></a><h3>clutter_cairo_texture_create ()</h3>
647
<pre class="programlisting"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="returnvalue">cairo_t</span></a> * clutter_cairo_texture_create (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);</pre>
648
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
649
<h3 class="title">Warning</h3>
650
<p><code class="literal">clutter_cairo_texture_create</code> has been deprecated since version 1.8 and should not be used in newly-written code. Use the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal and
651
the <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()"><code class="function">clutter_cairo_texture_invalidate()</code></a> function to obtain a
652
Cairo context for 2D drawing.</p>
655
Creates a new Cairo context for the <em class="parameter"><code>cairo</code></em> texture. It is
656
similar to using <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create-region" title="clutter_cairo_texture_create_region ()"><code class="function">clutter_cairo_texture_create_region()</code></a> with <em class="parameter"><code>x_offset</code></em>
657
and <em class="parameter"><code>y_offset</code></em> of 0, <em class="parameter"><code>width</code></em> equal to the <em class="parameter"><code>cairo</code></em> texture surface width
658
and <em class="parameter"><code>height</code></em> equal to the <em class="parameter"><code>cairo</code></em> texture surface height.
662
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
663
<h3 class="title">Warning</h3>
664
<p>Do not call this function within the paint virtual
665
function or from a callback to the <a class="link" href="ClutterActor.html#ClutterActor-paint" title='The "paint" signal'><span class="type">"paint"</span></a>
670
<div class="variablelist"><table border="0" class="variablelist">
672
<col align="left" valign="top">
677
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
678
<td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
682
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
683
<td>a newly created Cairo context. Use <a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-destroy"><code class="function">cairo_destroy()</code></a>
684
to upload the contents of the context when done drawing</td>
688
<p class="since">Since 1.0</p>
691
<div class="refsect2">
692
<a name="clutter-cairo-texture-create-region"></a><h3>clutter_cairo_texture_create_region ()</h3>
693
<pre class="programlisting"><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="returnvalue">cairo_t</span></a> * clutter_cairo_texture_create_region (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
694
<em class="parameter"><code><span class="type">gint</span> x_offset</code></em>,
695
<em class="parameter"><code><span class="type">gint</span> y_offset</code></em>,
696
<em class="parameter"><code><span class="type">gint</span> width</code></em>,
697
<em class="parameter"><code><span class="type">gint</span> height</code></em>);</pre>
698
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
699
<h3 class="title">Warning</h3>
700
<p><code class="literal">clutter_cairo_texture_create_region</code> has been deprecated since version 1.8 and should not be used in newly-written code. Use the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal and
701
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()"><code class="function">clutter_cairo_texture_invalidate_rectangle()</code></a> to obtain a
702
clipped Cairo context for 2D drawing.</p>
705
Creates a new Cairo context that will updat the region defined
706
by <em class="parameter"><code>x_offset</code></em>, <em class="parameter"><code>y_offset</code></em>, <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>.
710
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
711
<h3 class="title">Warning</h3>
712
<p>Do not call this function within the paint virtual
713
function or from a callback to the <a class="link" href="ClutterActor.html#ClutterActor-paint" title='The "paint" signal'><span class="type">"paint"</span></a>
718
<div class="variablelist"><table border="0" class="variablelist">
720
<col align="left" valign="top">
725
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
726
<td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
730
<td><p><span class="term"><em class="parameter"><code>x_offset</code></em> :</span></p></td>
731
<td>offset of the region on the X axis</td>
734
<td><p><span class="term"><em class="parameter"><code>y_offset</code></em> :</span></p></td>
735
<td>offset of the region on the Y axis</td>
738
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
739
<td>width of the region, or -1 for the full surface width</td>
742
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
743
<td>height of the region, or -1 for the full surface height</td>
746
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
747
<td>a newly created Cairo context. Use <a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-destroy"><code class="function">cairo_destroy()</code></a>
748
to upload the contents of the context when done drawing</td>
752
<p class="since">Since 1.0</p>
755
<div class="refsect2">
756
<a name="clutter-cairo-texture-invalidate-rectangle"></a><h3>clutter_cairo_texture_invalidate_rectangle ()</h3>
757
<pre class="programlisting"><span class="returnvalue">void</span> clutter_cairo_texture_invalidate_rectangle
758
(<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
759
<em class="parameter"><code><a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-Types.html#cairo-rectangle-int-t"><span class="type">cairo_rectangle_int_t</span></a> *rect</code></em>);</pre>
760
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
761
<h3 class="title">Warning</h3>
762
<p><code class="literal">clutter_cairo_texture_invalidate_rectangle</code> has been deprecated since version 1.12 and should not be used in newly-written code. Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
765
Invalidates a rectangular region of a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>.
768
The invalidation will cause the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal
772
See also: <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()"><code class="function">clutter_cairo_texture_invalidate()</code></a>
774
<div class="variablelist"><table border="0" class="variablelist">
776
<col align="left" valign="top">
781
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
782
<td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
786
<td><p><span class="term"><em class="parameter"><code>rect</code></em> :</span></p></td>
787
<td>a rectangle with the area to invalida,
788
or <code class="literal">NULL</code> to perform an unbounded invalidation. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
793
<p class="since">Since 1.8</p>
796
<div class="refsect2">
797
<a name="clutter-cairo-texture-invalidate"></a><h3>clutter_cairo_texture_invalidate ()</h3>
798
<pre class="programlisting"><span class="returnvalue">void</span> clutter_cairo_texture_invalidate (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);</pre>
799
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
800
<h3 class="title">Warning</h3>
801
<p><code class="literal">clutter_cairo_texture_invalidate</code> has been deprecated since version 1.12 and should not be used in newly-written code. Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
804
Invalidates the whole surface of a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>.
807
This function will cause the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal
811
See also: <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()"><code class="function">clutter_cairo_texture_invalidate_rectangle()</code></a>
813
<div class="variablelist"><table border="0" class="variablelist">
815
<col align="left" valign="top">
819
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
820
<td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
824
<p class="since">Since 1.8</p>
827
<div class="refsect2">
828
<a name="clutter-cairo-texture-clear"></a><h3>clutter_cairo_texture_clear ()</h3>
829
<pre class="programlisting"><span class="returnvalue">void</span> clutter_cairo_texture_clear (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);</pre>
830
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
831
<h3 class="title">Warning</h3>
832
<p><code class="literal">clutter_cairo_texture_clear</code> has been deprecated since version 1.12 and should not be used in newly-written code. Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
835
Clears <em class="parameter"><code>self</code></em>'s internal drawing surface, so that the next upload
836
will replace the previous contents of the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
837
rather than adding to it.
840
Calling this function from within a <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a>
841
signal handler will clear the invalidated area.
843
<div class="variablelist"><table border="0" class="variablelist">
845
<col align="left" valign="top">
849
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
850
<td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
689
<div class="warning">
690
<p><code class="literal">ClutterCairoTextureClass</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
691
<p>Use <a class="link" href="ClutterCanvas.html" title="ClutterCanvas"><span class="type">ClutterCanvas</span></a> instead</p>
693
<p>The <a class="link" href="ClutterCairoTexture.html#ClutterCairoTextureClass" title="struct ClutterCairoTextureClass"><span class="type">ClutterCairoTextureClass</span></a> struct contains only private data.</p>
694
<div class="refsect3">
695
<a name="id-1.10.13.11.3.7"></a><h4>Members</h4>
696
<div class="informaltable"><table width="100%" border="0">
698
<col width="300px" class="struct_members_name">
699
<col class="struct_members_description">
700
<col width="200px" class="struct_members_annotations">
704
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterCairoTextureClass.create-surface"></a>create_surface</code></em> ()</p></td>
705
<td class="struct_member_description"><p>class handler for the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-create-surface" title="The “create-surface” signal"><span class="type">“create-surface”</span></a>
707
<td class="struct_member_annotations"> </td>
710
<td class="struct_member_name"><p><em class="structfield"><code><a name="ClutterCairoTextureClass.draw"></a>draw</code></em> ()</p></td>
711
<td class="struct_member_description"><p>class handler for the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title="The “draw” signal"><span class="type">“draw”</span></a> signal</p></td>
712
<td class="struct_member_annotations"> </td>
854
717
<p class="since">Since 1.0</p>
857
720
<div class="refsect1">
858
721
<a name="ClutterCairoTexture.property-details"></a><h2>Property Details</h2>
859
722
<div class="refsect2">
860
<a name="ClutterCairoTexture--auto-resize"></a><h3>The <code class="literal">"auto-resize"</code> property</h3>
861
<pre class="programlisting"> "auto-resize" <span class="type">gboolean</span> : Read / Write</pre>
862
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
863
<h3 class="title">Warning</h3>
864
<p><code class="literal">ClutterCairoTexture:auto-resize</code> is deprecated and should not be used in newly-written code. 1.12</p>
867
Controls whether the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> should automatically
723
<a name="ClutterCairoTexture--auto-resize"></a><h3>The <code class="literal">“auto-resize”</code> property</h3>
724
<pre class="programlisting"> “auto-resize” <span class="type">gboolean</span></pre>
725
<p>Controls whether the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> should automatically
868
726
resize the Cairo surface whenever the actor's allocation changes.
869
727
If :auto-resize is set to <code class="literal">TRUE</code> the surface contents will also
870
be invalidated automatically.
728
be invalidated automatically.</p>
729
<div class="warning"><p><code class="literal">ClutterCairoTexture:auto-resize</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p></div>
730
<p>Flags: Read / Write</p>
872
731
<p>Default value: FALSE</p>
873
732
<p class="since">Since 1.8</p>
876
735
<div class="refsect2">
877
<a name="ClutterCairoTexture--surface-height"></a><h3>The <code class="literal">"surface-height"</code> property</h3>
878
<pre class="programlisting"> "surface-height" <span class="type">guint</span> : Read / Write</pre>
879
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
880
<h3 class="title">Warning</h3>
881
<p><code class="literal">ClutterCairoTexture:surface-height</code> is deprecated and should not be used in newly-written code. 1.12</p>
884
The height of the Cairo surface used by the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
736
<a name="ClutterCairoTexture--surface-height"></a><h3>The <code class="literal">“surface-height”</code> property</h3>
737
<pre class="programlisting"> “surface-height” <span class="type">guint</span></pre>
738
<p>The height of the Cairo surface used by the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
739
actor, in pixels.</p>
740
<div class="warning"><p><code class="literal">ClutterCairoTexture:surface-height</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p></div>
741
<p>Flags: Read / Write</p>
887
742
<p>Default value: 0</p>
888
743
<p class="since">Since 1.0</p>
891
746
<div class="refsect2">
892
<a name="ClutterCairoTexture--surface-width"></a><h3>The <code class="literal">"surface-width"</code> property</h3>
893
<pre class="programlisting"> "surface-width" <span class="type">guint</span> : Read / Write</pre>
894
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
895
<h3 class="title">Warning</h3>
896
<p><code class="literal">ClutterCairoTexture:surface-width</code> is deprecated and should not be used in newly-written code. 1.12</p>
899
The width of the Cairo surface used by the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
747
<a name="ClutterCairoTexture--surface-width"></a><h3>The <code class="literal">“surface-width”</code> property</h3>
748
<pre class="programlisting"> “surface-width” <span class="type">guint</span></pre>
749
<p>The width of the Cairo surface used by the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
750
actor, in pixels.</p>
751
<div class="warning"><p><code class="literal">ClutterCairoTexture:surface-width</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p></div>
752
<p>Flags: Read / Write</p>
902
753
<p>Default value: 0</p>
903
754
<p class="since">Since 1.0</p>
906
757
<div class="refsect1">
907
758
<a name="ClutterCairoTexture.signal-details"></a><h2>Signal Details</h2>
908
759
<div class="refsect2">
909
<a name="ClutterCairoTexture-create-surface"></a><h3>The <code class="literal">"create-surface"</code> signal</h3>
910
<pre class="programlisting"><span class="returnvalue">CairoSurface</span>* user_function (<a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *texture,
911
<span class="type">guint</span> width,
912
<span class="type">guint</span> height,
913
<span class="type">gpointer</span> user_data) : <code class="literal">No Recursion</code></pre>
914
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
915
<h3 class="title">Warning</h3>
916
<p><code class="literal">ClutterCairoTexture::create-surface</code> is deprecated and should not be used in newly-written code. 1.12</p>
919
The ::create-surface signal is emitted when a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
760
<a name="ClutterCairoTexture-create-surface"></a><h3>The <code class="literal">“create-surface”</code> signal</h3>
761
<pre class="programlisting"><span class="returnvalue">CairoSurface</span>*
762
user_function (<a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *texture,
763
<span class="type">guint</span> width,
764
<span class="type">guint</span> height,
765
<span class="type">gpointer</span> user_data)</pre>
766
<p>The ::create-surface signal is emitted when a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
920
767
news its surface (re)created, which happens either when the Cairo
921
context is created with <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create" title="clutter_cairo_texture_create ()"><code class="function">clutter_cairo_texture_create()</code></a> or
922
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create-region" title="clutter_cairo_texture_create_region ()"><code class="function">clutter_cairo_texture_create_region()</code></a>, or when the surface is resized
923
through <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-set-surface-size" title="clutter_cairo_texture_set_surface_size ()"><code class="function">clutter_cairo_texture_set_surface_size()</code></a>.
926
The first signal handler that returns a non-<code class="literal">NULL</code>, valid surface will
768
context is created with <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create" title="clutter_cairo_texture_create ()"><code class="function">clutter_cairo_texture_create()</code></a> or
769
<a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create-region" title="clutter_cairo_texture_create_region ()"><code class="function">clutter_cairo_texture_create_region()</code></a>, or when the surface is resized
770
through <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-set-surface-size" title="clutter_cairo_texture_set_surface_size ()"><code class="function">clutter_cairo_texture_set_surface_size()</code></a>.</p>
771
<p>The first signal handler that returns a non-<code class="literal">NULL</code>, valid surface will
927
772
stop any further signal emission, and the returned surface will be
930
<div class="variablelist"><table border="0" class="variablelist">
774
<div class="warning"><p><code class="literal">ClutterCairoTexture::create-surface</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p></div>
775
<div class="refsect3">
776
<a name="id-1.10.13.13.2.8"></a><h4>Parameters</h4>
777
<div class="informaltable"><table width="100%" border="0">
932
<col align="left" valign="top">
779
<col width="150px" class="parameters_name">
780
<col class="parameters_description">
781
<col width="200px" class="parameters_annotations">
937
<td><p><span class="term"><em class="parameter"><code>texture</code></em> :</span></p></td>
938
<td>the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> that emitted the signal</td>
941
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
942
<td>the width of the surface to create</td>
945
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
946
<td>the height of the surface to create</td>
949
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
950
<td>user data set when the signal handler was connected.</td>
953
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
954
<td>the newly created <a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a> for the texture</td>
785
<td class="parameter_name"><p>texture</p></td>
786
<td class="parameter_description"><p>the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> that emitted the signal</p></td>
787
<td class="parameter_annotations"> </td>
790
<td class="parameter_name"><p>width</p></td>
791
<td class="parameter_description"><p>the width of the surface to create</p></td>
792
<td class="parameter_annotations"> </td>
795
<td class="parameter_name"><p>height</p></td>
796
<td class="parameter_description"><p>the height of the surface to create</p></td>
797
<td class="parameter_annotations"> </td>
800
<td class="parameter_name"><p>user_data</p></td>
801
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
802
<td class="parameter_annotations"> </td>
807
<div class="refsect3">
808
<a name="id-1.10.13.13.2.9"></a><h4>Returns</h4>
809
<p> the newly created <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a> for the texture</p>
812
<p>Flags: No Recursion</p>
958
813
<p class="since">Since 1.6</p>
961
816
<div class="refsect2">
962
<a name="ClutterCairoTexture-draw"></a><h3>The <code class="literal">"draw"</code> signal</h3>
963
<pre class="programlisting"><span class="returnvalue">gboolean</span> user_function (<a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *texture,
964
<span class="type">CairoContext</span> *cr,
965
<span class="type">gpointer</span> user_data) : <code class="literal">No Recursion</code></pre>
966
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
967
<h3 class="title">Warning</h3>
968
<p><code class="literal">ClutterCairoTexture::draw</code> is deprecated and should not be used in newly-written code. 1.12</p>
971
The ::draw signal is emitted each time a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> has
975
The passed Cairo context passed will be clipped to the invalidated
979
It is safe to connect multiple callbacks to this signals; the state
817
<a name="ClutterCairoTexture-draw"></a><h3>The <code class="literal">“draw”</code> signal</h3>
818
<pre class="programlisting"><span class="returnvalue">gboolean</span>
819
user_function (<a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *texture,
820
<span class="type">CairoContext</span> *cr,
821
<span class="type">gpointer</span> user_data)</pre>
822
<p>The ::draw signal is emitted each time a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> has
823
been invalidated.</p>
824
<p>The passed Cairo context passed will be clipped to the invalidated
826
<p>It is safe to connect multiple callbacks to this signals; the state
980
827
of the Cairo context passed to each callback is automatically saved
981
and restored, so it's not necessary to call <a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a> and
982
<a href="/home/ebassi/gnome/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a>.
984
<div class="variablelist"><table border="0" class="variablelist">
828
and restored, so it's not necessary to call <a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a> and
829
<a href="/usr/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a>.</p>
830
<div class="warning"><p><code class="literal">ClutterCairoTexture::draw</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p></div>
831
<div class="refsect3">
832
<a name="id-1.10.13.13.3.9"></a><h4>Parameters</h4>
833
<div class="informaltable"><table width="100%" border="0">
986
<col align="left" valign="top">
835
<col width="150px" class="parameters_name">
836
<col class="parameters_description">
837
<col width="200px" class="parameters_annotations">
991
<td><p><span class="term"><em class="parameter"><code>texture</code></em> :</span></p></td>
992
<td>the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> that emitted the signal</td>
995
<td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
996
<td>the Cairo context to use to draw</td>
999
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1000
<td>user data set when the signal handler was connected.</td>
1003
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1005
<code class="literal">TRUE</code> if the signal emission should stop, and <code class="literal">FALSE</code>
841
<td class="parameter_name"><p>texture</p></td>
842
<td class="parameter_description"><p>the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> that emitted the signal</p></td>
843
<td class="parameter_annotations"> </td>
846
<td class="parameter_name"><p>cr</p></td>
847
<td class="parameter_description"><p>the Cairo context to use to draw</p></td>
848
<td class="parameter_annotations"> </td>
851
<td class="parameter_name"><p>user_data</p></td>
852
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
853
<td class="parameter_annotations"> </td>
858
<div class="refsect3">
859
<a name="id-1.10.13.13.3.10"></a><h4>Returns</h4>
860
<p> <code class="literal">TRUE</code> if the signal emission should stop, and <code class="literal">FALSE</code>
864
<p>Flags: No Recursion</p>
1010
865
<p class="since">Since 1.8</p>
1014
869
<div class="footer">
1016
Generated by GTK-Doc V1.18.1</div>
871
Generated by GTK-Doc V1.20.1</div>
b'\\ No newline at end of file'