2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
4
<!ENTITY version "1.0.8">
7
<refentry id="ClutterTexture">
9
<refentrytitle role="top_of_page" id="ClutterTexture.top_of_page">ClutterTexture</refentrytitle>
10
<manvolnum>3</manvolnum>
11
<refmiscinfo>CLUTTER Library</refmiscinfo>
15
<refname>ClutterTexture</refname>
16
<refpurpose>An actor for displaying and manipulating images.</refpurpose>
19
<refsynopsisdiv id="ClutterTexture.synopsis" role="synopsis">
20
<title role="synopsis.title">Synopsis</title>
23
<link linkend="ClutterTexture-struct">ClutterTexture</link>;
24
<link linkend="ClutterTextureClass">ClutterTextureClass</link>;
25
enum <link linkend="ClutterTextureFlags">ClutterTextureFlags</link>;
26
enum <link linkend="ClutterTextureQuality">ClutterTextureQuality</link>;
27
<link linkend="ClutterActor">ClutterActor</link> * <link linkend="clutter-texture-new">clutter_texture_new</link> (void);
28
<link linkend="ClutterActor">ClutterActor</link> * <link linkend="clutter-texture-new-from-file">clutter_texture_new_from_file</link> (const <link linkend="gchar">gchar</link> *filename,
29
<link linkend="GError">GError</link> **error);
30
<link linkend="ClutterActor">ClutterActor</link> * <link linkend="clutter-texture-new-from-actor">clutter_texture_new_from_actor</link> (<link linkend="ClutterActor">ClutterActor</link> *actor);
32
#define <link linkend="CLUTTER-TEXTURE-ERROR--CAPS">CLUTTER_TEXTURE_ERROR</link>
33
enum <link linkend="ClutterTextureError">ClutterTextureError</link>;
34
<link linkend="gboolean">gboolean</link> <link linkend="clutter-texture-set-from-file">clutter_texture_set_from_file</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
35
const <link linkend="gchar">gchar</link> *filename,
36
<link linkend="GError">GError</link> **error);
37
<link linkend="gboolean">gboolean</link> <link linkend="clutter-texture-set-from-rgb-data">clutter_texture_set_from_rgb_data</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
38
const <link linkend="guchar">guchar</link> *data,
39
<link linkend="gboolean">gboolean</link> has_alpha,
40
<link linkend="gint">gint</link> width,
41
<link linkend="gint">gint</link> height,
42
<link linkend="gint">gint</link> rowstride,
43
<link linkend="gint">gint</link> bpp,
44
<link linkend="ClutterTextureFlags">ClutterTextureFlags</link> flags,
45
<link linkend="GError">GError</link> **error);
46
<link linkend="gboolean">gboolean</link> <link linkend="clutter-texture-set-from-yuv-data">clutter_texture_set_from_yuv_data</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
47
const <link linkend="guchar">guchar</link> *data,
48
<link linkend="gint">gint</link> width,
49
<link linkend="gint">gint</link> height,
50
<link linkend="ClutterTextureFlags">ClutterTextureFlags</link> flags,
51
<link linkend="GError">GError</link> **error);
52
<link linkend="gboolean">gboolean</link> <link linkend="clutter-texture-set-area-from-rgb-data">clutter_texture_set_area_from_rgb_data</link>
53
(<link linkend="ClutterTexture">ClutterTexture</link> *texture,
54
const <link linkend="guchar">guchar</link> *data,
55
<link linkend="gboolean">gboolean</link> has_alpha,
56
<link linkend="gint">gint</link> x,
57
<link linkend="gint">gint</link> y,
58
<link linkend="gint">gint</link> width,
59
<link linkend="gint">gint</link> height,
60
<link linkend="gint">gint</link> rowstride,
61
<link linkend="gint">gint</link> bpp,
62
<link linkend="ClutterTextureFlags">ClutterTextureFlags</link> flags,
63
<link linkend="GError">GError</link> **error);
64
<link linkend="void">void</link> <link linkend="clutter-texture-get-base-size">clutter_texture_get_base_size</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
65
<link linkend="gint">gint</link> *width,
66
<link linkend="gint">gint</link> *height);
67
<link linkend="CoglPixelFormat">CoglPixelFormat</link> <link linkend="clutter-texture-get-pixel-format">clutter_texture_get_pixel_format</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture);
68
<link linkend="gint">gint</link> <link linkend="clutter-texture-get-max-tile-waste">clutter_texture_get_max_tile_waste</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture);
69
<link linkend="ClutterTextureQuality">ClutterTextureQuality</link> <link linkend="clutter-texture-get-filter-quality">clutter_texture_get_filter_quality</link>
70
(<link linkend="ClutterTexture">ClutterTexture</link> *texture);
71
<link linkend="void">void</link> <link linkend="clutter-texture-set-filter-quality">clutter_texture_set_filter_quality</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
72
<link linkend="ClutterTextureQuality">ClutterTextureQuality</link> filter_quality);
73
<link linkend="CoglHandle">CoglHandle</link> <link linkend="clutter-texture-get-cogl-texture">clutter_texture_get_cogl_texture</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture);
74
<link linkend="void">void</link> <link linkend="clutter-texture-set-cogl-texture">clutter_texture_set_cogl_texture</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
75
<link linkend="CoglHandle">CoglHandle</link> cogl_tex);
76
<link linkend="CoglHandle">CoglHandle</link> <link linkend="clutter-texture-get-cogl-material">clutter_texture_get_cogl_material</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture);
77
<link linkend="void">void</link> <link linkend="clutter-texture-set-cogl-material">clutter_texture_set_cogl_material</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
78
<link linkend="CoglHandle">CoglHandle</link> cogl_material);
79
<link linkend="gboolean">gboolean</link> <link linkend="clutter-texture-get-sync-size">clutter_texture_get_sync_size</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture);
80
<link linkend="void">void</link> <link linkend="clutter-texture-set-sync-size">clutter_texture_set_sync_size</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
81
<link linkend="gboolean">gboolean</link> sync_size);
82
<link linkend="void">void</link> <link linkend="clutter-texture-get-repeat">clutter_texture_get_repeat</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
83
<link linkend="gboolean">gboolean</link> *repeat_x,
84
<link linkend="gboolean">gboolean</link> *repeat_y);
85
<link linkend="void">void</link> <link linkend="clutter-texture-set-repeat">clutter_texture_set_repeat</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
86
<link linkend="gboolean">gboolean</link> repeat_x,
87
<link linkend="gboolean">gboolean</link> repeat_y);
88
<link linkend="gboolean">gboolean</link> <link linkend="clutter-texture-get-keep-aspect-ratio">clutter_texture_get_keep_aspect_ratio</link>
89
(<link linkend="ClutterTexture">ClutterTexture</link> *texture);
90
<link linkend="void">void</link> <link linkend="clutter-texture-set-keep-aspect-ratio">clutter_texture_set_keep_aspect_ratio</link>
91
(<link linkend="ClutterTexture">ClutterTexture</link> *texture,
92
<link linkend="gboolean">gboolean</link> keep_aspect);
93
<link linkend="gboolean">gboolean</link> <link linkend="clutter-texture-get-load-async">clutter_texture_get_load_async</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture);
94
<link linkend="void">void</link> <link linkend="clutter-texture-set-load-async">clutter_texture_set_load_async</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
95
<link linkend="gboolean">gboolean</link> load_async);
96
<link linkend="gboolean">gboolean</link> <link linkend="clutter-texture-get-load-data-async">clutter_texture_get_load_data_async</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture);
97
<link linkend="void">void</link> <link linkend="clutter-texture-set-load-data-async">clutter_texture_set_load_data_async</link> (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
98
<link linkend="gboolean">gboolean</link> load_async);
102
<refsect1 id="ClutterTexture.object-hierarchy" role="object_hierarchy">
103
<title role="object_hierarchy.title">Object Hierarchy</title>
105
<link linkend="GObject">GObject</link>
106
+----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
107
+----<link linkend="ClutterActor">ClutterActor</link>
109
+----<link linkend="ClutterCairoTexture">ClutterCairoTexture</link>
115
<refsect1 id="ClutterTexture.implemented-interfaces" role="impl_interfaces">
116
<title role="impl_interfaces.title">Implemented Interfaces</title>
118
ClutterTexture implements
119
<link linkend="ClutterScriptable">ClutterScriptable</link>.</para>
123
<refsect1 id="ClutterTexture.properties" role="properties">
124
<title role="properties.title">Properties</title>
126
"<link linkend="ClutterTexture--cogl-material">cogl-material</link>" <link linkend="CoglHandle">CoglHandle</link>* : Read / Write
127
"<link linkend="ClutterTexture--cogl-texture">cogl-texture</link>" <link linkend="CoglHandle">CoglHandle</link>* : Read / Write
128
"<link linkend="ClutterTexture--disable-slicing">disable-slicing</link>" <link linkend="gboolean">gboolean</link> : Read / Write / Construct Only
129
"<link linkend="ClutterTexture--filename">filename</link>" <link linkend="gchar">gchar</link>* : Write
130
"<link linkend="ClutterTexture--filter-quality">filter-quality</link>" <link linkend="ClutterTextureQuality">ClutterTextureQuality</link> : Read / Write / Construct
131
"<link linkend="ClutterTexture--keep-aspect-ratio">keep-aspect-ratio</link>" <link linkend="gboolean">gboolean</link> : Read / Write
132
"<link linkend="ClutterTexture--load-async">load-async</link>" <link linkend="gboolean">gboolean</link> : Write
133
"<link linkend="ClutterTexture--load-data-async">load-data-async</link>" <link linkend="gboolean">gboolean</link> : Write
134
"<link linkend="ClutterTexture--pixel-format">pixel-format</link>" <link linkend="CoglPixelFormat">CoglPixelFormat</link> : Read
135
"<link linkend="ClutterTexture--repeat-x">repeat-x</link>" <link linkend="gboolean">gboolean</link> : Read / Write
136
"<link linkend="ClutterTexture--repeat-y">repeat-y</link>" <link linkend="gboolean">gboolean</link> : Read / Write
137
"<link linkend="ClutterTexture--sync-size">sync-size</link>" <link linkend="gboolean">gboolean</link> : Read / Write
138
"<link linkend="ClutterTexture--tile-waste">tile-waste</link>" <link linkend="gint">gint</link> : Read
142
<refsect1 id="ClutterTexture.signals" role="signal_proto">
143
<title role="signal_proto.title">Signals</title>
145
"<link linkend="ClutterTexture-load-finished">load-finished</link>" : Run Last
146
"<link linkend="ClutterTexture-pixbuf-change">pixbuf-change</link>" : Run Last
147
"<link linkend="ClutterTexture-size-change">size-change</link>" : Run Last
152
<refsect1 id="ClutterTexture.description" role="desc">
153
<title role="desc.title">Description</title>
155
<link linkend="ClutterTexture"><type>ClutterTexture</type></link> is a base class for displaying and manipulating pixel
159
The <link linkend="clutter-texture-set-from-rgb-data"><function>clutter_texture_set_from_rgb_data()</function></link> and
160
<link linkend="clutter-texture-set-from-file"><function>clutter_texture_set_from_file()</function></link> functions are used to copy image
161
data into texture memory and subsequently realize the texture.
164
If texture reads are supported by underlying GL implementation,
165
unrealizing frees image data from texture memory moving to main
166
system memory. Re-realizing then performs the opposite operation.
167
This process allows basic management of commonly limited available
171
Note: a ClutterTexture will scale its contents to fit the bounding
172
box requested using <link linkend="clutter-actor-set-size"><function>clutter_actor_set_size()</function></link>. To display an area of
173
a texture without scaling, you should set the clip area using
174
<link linkend="clutter-actor-set-clip"><function>clutter_actor_set_clip()</function></link>.</para>
179
<refsect1 id="ClutterTexture.details" role="details">
180
<title role="details.title">Details</title>
181
<refsect2 id="ClutterTexture-struct" role="struct">
182
<title>ClutterTexture</title>
183
<indexterm zone="ClutterTexture-struct" role="0.1"><primary sortas="Texture">ClutterTexture</primary></indexterm><programlisting>typedef struct _ClutterTexture ClutterTexture;</programlisting>
185
The <link linkend="ClutterTexture"><type>ClutterTexture</type></link> structure contains only private data
186
and should be accessed using the provided API</para>
188
</para><para role="since">Since 0.1</para></refsect2>
189
<refsect2 id="ClutterTextureClass" role="struct" condition="since:0.1">
190
<title>ClutterTextureClass</title>
191
<indexterm zone="ClutterTextureClass" role="0.1"><primary sortas="TextureClass">ClutterTextureClass</primary></indexterm><programlisting>typedef struct {
192
void (* size_change) (ClutterTexture *texture,
195
void (* pixbuf_change) (ClutterTexture *texture);
196
void (* load_finished) (ClutterTexture *texture,
197
const GError *error);
198
} ClutterTextureClass;
201
The <link linkend="ClutterTextureClass"><type>ClutterTextureClass</type></link> structure contains only private data</para>
203
</para><variablelist role="struct">
205
<term><structfield>size_change</structfield> ()</term>
206
<listitem><simpara> handler for the <link linkend="ClutterTexture-size-change"><type>"size-change"</type></link> signal
207
</simpara></listitem>
210
<term><structfield>pixbuf_change</structfield> ()</term>
211
<listitem><simpara> handler for the <link linkend="ClutterTexture-pixbuf-change"><type>"pixbuf-change"</type></link> signal
212
</simpara></listitem>
215
<term><structfield>load_finished</structfield> ()</term>
216
<listitem><simpara> handler for the <link linkend="ClutterTexture-load-finished"><type>"load-finished"</type></link> signal
217
</simpara></listitem>
219
</variablelist><para role="since">Since 0.1</para></refsect2>
220
<refsect2 id="ClutterTextureFlags" role="enum" condition="since:0.4">
221
<title>enum ClutterTextureFlags</title>
222
<indexterm zone="ClutterTextureFlags" role="0.4"><primary sortas="TextureFlags">ClutterTextureFlags</primary></indexterm><programlisting>typedef enum { /*< prefix=CLUTTER_TEXTURE >*/
223
CLUTTER_TEXTURE_NONE = 0,
224
CLUTTER_TEXTURE_RGB_FLAG_BGR = 1 << 1,
225
CLUTTER_TEXTURE_RGB_FLAG_PREMULT = 1 << 2, /* FIXME: not handled */
226
CLUTTER_TEXTURE_YUV_FLAG_YUV2 = 1 << 3
228
/* FIXME: add compressed types ? */
229
} ClutterTextureFlags;
232
Flags for <link linkend="clutter-texture-set-from-rgb-data"><function>clutter_texture_set_from_rgb_data()</function></link> and
233
<link linkend="clutter-texture-set-from-yuv-data"><function>clutter_texture_set_from_yuv_data()</function></link>.</para>
235
</para><variablelist role="enum">
236
<varlistentry id="CLUTTER-TEXTURE-NONE--CAPS" role="constant">
237
<term><literal>CLUTTER_TEXTURE_NONE</literal></term>
238
<listitem><simpara> No flags
239
</simpara></listitem>
241
<varlistentry id="CLUTTER-TEXTURE-RGB-FLAG-BGR--CAPS" role="constant">
242
<term><literal>CLUTTER_TEXTURE_RGB_FLAG_BGR</literal></term>
243
<listitem><simpara> FIXME
244
</simpara></listitem>
246
<varlistentry id="CLUTTER-TEXTURE-RGB-FLAG-PREMULT--CAPS" role="constant">
247
<term><literal>CLUTTER_TEXTURE_RGB_FLAG_PREMULT</literal></term>
248
<listitem><simpara> FIXME
249
</simpara></listitem>
251
<varlistentry id="CLUTTER-TEXTURE-YUV-FLAG-YUV2--CAPS" role="constant">
252
<term><literal>CLUTTER_TEXTURE_YUV_FLAG_YUV2</literal></term>
253
<listitem><simpara> FIXME
254
</simpara></listitem>
256
</variablelist><para role="since">Since 0.4</para></refsect2>
257
<refsect2 id="ClutterTextureQuality" role="enum" condition="since:0.8">
258
<title>enum ClutterTextureQuality</title>
259
<indexterm zone="ClutterTextureQuality" role="0.8"><primary sortas="TextureQuality">ClutterTextureQuality</primary></indexterm><programlisting>typedef enum { /*< prefix=CLUTTER_TEXTURE_QUALITY >*/
260
CLUTTER_TEXTURE_QUALITY_LOW,
261
CLUTTER_TEXTURE_QUALITY_MEDIUM,
262
CLUTTER_TEXTURE_QUALITY_HIGH
263
} ClutterTextureQuality;
266
Enumaration controlling the texture quality.</para>
268
</para><variablelist role="enum">
269
<varlistentry id="CLUTTER-TEXTURE-QUALITY-LOW--CAPS" role="constant">
270
<term><literal>CLUTTER_TEXTURE_QUALITY_LOW</literal></term>
271
<listitem><simpara> fastest rendering will use nearest neighbour
272
interpolation when rendering. good setting.
273
</simpara></listitem>
275
<varlistentry id="CLUTTER-TEXTURE-QUALITY-MEDIUM--CAPS" role="constant">
276
<term><literal>CLUTTER_TEXTURE_QUALITY_MEDIUM</literal></term>
277
<listitem><simpara> higher quality rendering without using
279
</simpara></listitem>
281
<varlistentry id="CLUTTER-TEXTURE-QUALITY-HIGH--CAPS" role="constant">
282
<term><literal>CLUTTER_TEXTURE_QUALITY_HIGH</literal></term>
283
<listitem><simpara> render the texture with the best quality
284
available using extra memory.
285
</simpara></listitem>
287
</variablelist><para role="since">Since 0.8</para></refsect2>
288
<refsect2 id="clutter-texture-new" role="function">
289
<title>clutter_texture_new ()</title>
290
<indexterm zone="clutter-texture-new"><primary sortas="texture_new">clutter_texture_new</primary></indexterm><programlisting><link linkend="ClutterActor">ClutterActor</link> * clutter_texture_new (void);</programlisting>
292
Creates a new empty <link linkend="ClutterTexture"><type>ClutterTexture</type></link> object.</para>
294
</para><variablelist role="params">
295
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A newly created <link linkend="ClutterTexture"><type>ClutterTexture</type></link> object.
296
</simpara></listitem></varlistentry>
297
</variablelist></refsect2>
298
<refsect2 id="clutter-texture-new-from-file" role="function" condition="since:0.8">
299
<title>clutter_texture_new_from_file ()</title>
300
<indexterm zone="clutter-texture-new-from-file" role="0.8"><primary sortas="texture_new_from_file">clutter_texture_new_from_file</primary></indexterm><programlisting><link linkend="ClutterActor">ClutterActor</link> * clutter_texture_new_from_file (const <link linkend="gchar">gchar</link> *filename,
301
<link linkend="GError">GError</link> **error);</programlisting>
303
Creates a new ClutterTexture actor to display the image contained a
304
file. If the image failed to load then NULL is returned and <parameter>error</parameter>
307
</para><variablelist role="params">
308
<varlistentry><term><parameter>filename</parameter> :</term>
309
<listitem><simpara> The name of an image file to load.
310
</simpara></listitem></varlistentry>
311
<varlistentry><term><parameter>error</parameter> :</term>
312
<listitem><simpara> Return locatoin for an error.
313
</simpara></listitem></varlistentry>
314
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A newly created <link linkend="ClutterTexture"><type>ClutterTexture</type></link> object or NULL on
317
</simpara></listitem></varlistentry>
318
</variablelist><para role="since">Since 0.8</para></refsect2>
319
<refsect2 id="clutter-texture-new-from-actor" role="function" condition="since:0.6">
320
<title>clutter_texture_new_from_actor ()</title>
321
<indexterm zone="clutter-texture-new-from-actor" role="0.6"><primary sortas="texture_new_from_actor">clutter_texture_new_from_actor</primary></indexterm><programlisting><link linkend="ClutterActor">ClutterActor</link> * clutter_texture_new_from_actor (<link linkend="ClutterActor">ClutterActor</link> *actor);</programlisting>
323
Creates a new <link linkend="ClutterTexture"><type>ClutterTexture</type></link> object with its source a prexisting
324
actor (and associated children). The textures content will contain
325
'live' redirected output of the actors scene.
328
Note this function is intented as a utility call for uniformly applying
329
shaders to groups and other potential visual effects. It requires that
330
the <link linkend="CLUTTER-FEATURE-OFFSCREEN--CAPS"><literal>CLUTTER_FEATURE_OFFSCREEN</literal></link> feature is supported by the current backend
331
and the target system.
339
<para>The source actor must be made visible (i.e by calling
340
<link linkend="clutter-actor-show"><type>clutter_actor_show</type></link>).</para>
343
<para>The source actor must have a parent in order for it to be
344
allocated a size from the layouting mechanism. If the source
345
actor does not have a parent when this function is called then
346
the ClutterTexture will adopt it and allocate it at its
347
preferred size. Using this you can clone an actor that is
348
otherwise not displayed. Because of this feature if you do
349
intend to display the source actor then you must make sure that
350
the actor is parented before calling
351
<link linkend="clutter-texture-new-from-actor"><function>clutter_texture_new_from_actor()</function></link> or that you unparent it before
352
adding it to a container.</para>
355
<para>When getting the image for the clone texture, Clutter
356
will attempt to render the source actor exactly as it would
357
appear if it was rendered on screen. The source actor's parent
358
transformations are taken into account. Therefore if your
359
source actor is rotated along the X or Y axes so that it has
360
some depth, the texture will appear differently depending on
361
the on-screen location of the source actor. While painting the
362
source actor, Clutter will set up a temporary asymmetric
363
perspective matrix as the projection matrix so that the source
364
actor will be projected as if a small section of the screen was
365
being viewed. Before version 0.8.2, an orthogonal identity
366
projection was used which meant that the source actor would be
367
clipped if any part of it was not on the zero Z-plane.</para>
370
<para>Avoid reparenting the source with the created texture.</para>
373
<para>A group can be padded with a transparent rectangle as to
374
provide a border to contents for shader output (blurring text
378
<para>The texture will automatically resize to contain a further
379
transformed source. However, this involves overhead and can be
380
avoided by placing the source actor in a bounding group
381
sized large enough to contain any child tranformations.</para>
384
<para>Uploading pixel data to the texture (e.g by using
385
<link linkend="clutter-actor-set-from-file"><function>clutter_actor_set_from_file()</function></link>) will destroy the offscreen texture data
386
and end redirection.</para>
389
<para><link linkend="cogl-texture-get-data"><function>cogl_texture_get_data()</function></link> with the handle returned by
390
<link linkend="clutter-texture-get-cogl-texture"><function>clutter_texture_get_cogl_texture()</function></link> can be used to read the
391
offscreen texture pixels into a pixbuf.</para>
393
</itemizedlist></para>
395
</para><variablelist role="params">
396
<varlistentry><term><parameter>actor</parameter> :</term>
397
<listitem><simpara> A source <link linkend="ClutterActor"><type>ClutterActor</type></link>
398
</simpara></listitem></varlistentry>
399
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A newly created <link linkend="ClutterTexture"><type>ClutterTexture</type></link> object, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> on failure.
401
</simpara></listitem></varlistentry>
402
</variablelist><para role="since">Since 0.6</para></refsect2>
403
<refsect2 id="CLUTTER-TEXTURE-ERROR--CAPS" role="macro" condition="since:0.4">
404
<title>CLUTTER_TEXTURE_ERROR</title>
405
<indexterm zone="CLUTTER-TEXTURE-ERROR--CAPS" role="0.4"><primary sortas="TEXTURE_ERROR">CLUTTER_TEXTURE_ERROR</primary></indexterm><programlisting>#define CLUTTER_TEXTURE_ERROR (clutter_texture_error_quark ())
408
Error domain for <link linkend="ClutterTexture"><type>ClutterTexture</type></link> errors</para>
410
</para><para role="since">Since 0.4</para></refsect2>
411
<refsect2 id="ClutterTextureError" role="enum" condition="since:0.4">
412
<title>enum ClutterTextureError</title>
413
<indexterm zone="ClutterTextureError" role="0.4"><primary sortas="TextureError">ClutterTextureError</primary></indexterm><programlisting>typedef enum {
414
CLUTTER_TEXTURE_ERROR_OUT_OF_MEMORY,
415
CLUTTER_TEXTURE_ERROR_NO_YUV,
416
CLUTTER_TEXTURE_ERROR_BAD_FORMAT
417
} ClutterTextureError;
420
Error enumeration for <link linkend="ClutterTexture"><type>ClutterTexture</type></link></para>
422
</para><variablelist role="enum">
423
<varlistentry id="CLUTTER-TEXTURE-ERROR-OUT-OF-MEMORY--CAPS" role="constant">
424
<term><literal>CLUTTER_TEXTURE_ERROR_OUT_OF_MEMORY</literal></term>
425
<listitem><simpara> OOM condition
426
</simpara></listitem>
428
<varlistentry id="CLUTTER-TEXTURE-ERROR-NO-YUV--CAPS" role="constant">
429
<term><literal>CLUTTER_TEXTURE_ERROR_NO_YUV</literal></term>
430
<listitem><simpara> YUV operation attempted but no YUV support
432
</simpara></listitem>
434
<varlistentry id="CLUTTER-TEXTURE-ERROR-BAD-FORMAT--CAPS" role="constant">
435
<term><literal>CLUTTER_TEXTURE_ERROR_BAD_FORMAT</literal></term>
436
<listitem><simpara> The requested format for
437
clutter_texture_set_from_rgb_data or
438
clutter_texture_set_from_yuv_data is unsupported.
439
</simpara></listitem>
441
</variablelist><para role="since">Since 0.4</para></refsect2>
442
<refsect2 id="clutter-texture-set-from-file" role="function" condition="since:0.8">
443
<title>clutter_texture_set_from_file ()</title>
444
<indexterm zone="clutter-texture-set-from-file" role="0.8"><primary sortas="texture_set_from_file">clutter_texture_set_from_file</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> clutter_texture_set_from_file (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
445
const <link linkend="gchar">gchar</link> *filename,
446
<link linkend="GError">GError</link> **error);</programlisting>
448
Sets the <link linkend="ClutterTexture"><type>ClutterTexture</type></link> image data from an image file. In case of
449
failure, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> is returned and <parameter>error</parameter> is set.
452
If <link linkend="ClutterTexture--load-async"><type>"load-async"</type></link> is set to <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, this function
453
will return as soon as possible, and the actual image loading
454
from disk will be performed asynchronously. <link linkend="ClutterTexture-size-change"><type>"size-change"</type></link>
455
will be emitten when the size of the texture is available and
456
<link linkend="ClutterTexture-load-finished"><type>"load-finished"</type></link> will be emitted when the image has been
457
loaded or if an error occurred.</para>
459
</para><variablelist role="params">
460
<varlistentry><term><parameter>texture</parameter> :</term>
461
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
462
</simpara></listitem></varlistentry>
463
<varlistentry><term><parameter>filename</parameter> :</term>
464
<listitem><simpara> The filename of the image in GLib file name encoding
465
</simpara></listitem></varlistentry>
466
<varlistentry><term><parameter>error</parameter> :</term>
467
<listitem><simpara> Return location for a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
468
</simpara></listitem></varlistentry>
469
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the image was successfully loaded and set
471
</simpara></listitem></varlistentry>
472
</variablelist><para role="since">Since 0.8</para></refsect2>
473
<refsect2 id="clutter-texture-set-from-rgb-data" role="function" condition="since:0.4.">
474
<title>clutter_texture_set_from_rgb_data ()</title>
475
<indexterm zone="clutter-texture-set-from-rgb-data" role="0.4."><primary sortas="texture_set_from_rgb_data">clutter_texture_set_from_rgb_data</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> clutter_texture_set_from_rgb_data (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
476
const <link linkend="guchar">guchar</link> *data,
477
<link linkend="gboolean">gboolean</link> has_alpha,
478
<link linkend="gint">gint</link> width,
479
<link linkend="gint">gint</link> height,
480
<link linkend="gint">gint</link> rowstride,
481
<link linkend="gint">gint</link> bpp,
482
<link linkend="ClutterTextureFlags">ClutterTextureFlags</link> flags,
483
<link linkend="GError">GError</link> **error);</programlisting>
485
Sets <link linkend="ClutterTexture"><type>ClutterTexture</type></link> image data.</para>
487
</para><variablelist role="params">
488
<varlistentry><term><parameter>texture</parameter> :</term>
489
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
490
</simpara></listitem></varlistentry>
491
<varlistentry><term><parameter>data</parameter> :</term>
492
<listitem><simpara> Image data in RGBA type colorspace.
493
</simpara></listitem></varlistentry>
494
<varlistentry><term><parameter>has_alpha</parameter> :</term>
495
<listitem><simpara> Set to TRUE if image data has an alpha channel.
496
</simpara></listitem></varlistentry>
497
<varlistentry><term><parameter>width</parameter> :</term>
498
<listitem><simpara> Width in pixels of image data.
499
</simpara></listitem></varlistentry>
500
<varlistentry><term><parameter>height</parameter> :</term>
501
<listitem><simpara> Height in pixels of image data
502
</simpara></listitem></varlistentry>
503
<varlistentry><term><parameter>rowstride</parameter> :</term>
504
<listitem><simpara> Distance in bytes between row starts.
505
</simpara></listitem></varlistentry>
506
<varlistentry><term><parameter>bpp</parameter> :</term>
507
<listitem><simpara> bytes per pixel (Currently only 3 and 4 supported,
508
depending on <parameter>has_alpha</parameter>)
509
</simpara></listitem></varlistentry>
510
<varlistentry><term><parameter>flags</parameter> :</term>
511
<listitem><simpara> <link linkend="ClutterTextureFlags"><type>ClutterTextureFlags</type></link>
512
</simpara></listitem></varlistentry>
513
<varlistentry><term><parameter>error</parameter> :</term>
514
<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
515
</simpara></listitem></varlistentry>
516
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> on success, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> on failure.
518
</simpara></listitem></varlistentry>
519
</variablelist><para role="since">Since 0.4.</para></refsect2>
520
<refsect2 id="clutter-texture-set-from-yuv-data" role="function" condition="since:0.4">
521
<title>clutter_texture_set_from_yuv_data ()</title>
522
<indexterm zone="clutter-texture-set-from-yuv-data" role="0.4"><primary sortas="texture_set_from_yuv_data">clutter_texture_set_from_yuv_data</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> clutter_texture_set_from_yuv_data (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
523
const <link linkend="guchar">guchar</link> *data,
524
<link linkend="gint">gint</link> width,
525
<link linkend="gint">gint</link> height,
526
<link linkend="ClutterTextureFlags">ClutterTextureFlags</link> flags,
527
<link linkend="GError">GError</link> **error);</programlisting>
529
Sets a <link linkend="ClutterTexture"><type>ClutterTexture</type></link> from YUV image data. If an error occurred,
530
<link linkend="FALSE--CAPS"><literal>FALSE</literal></link> is returned and <parameter>error</parameter> is set.</para>
532
</para><variablelist role="params">
533
<varlistentry><term><parameter>texture</parameter> :</term>
534
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
535
</simpara></listitem></varlistentry>
536
<varlistentry><term><parameter>data</parameter> :</term>
537
<listitem><simpara> Image data in YUV type colorspace.
538
</simpara></listitem></varlistentry>
539
<varlistentry><term><parameter>width</parameter> :</term>
540
<listitem><simpara> Width in pixels of image data.
541
</simpara></listitem></varlistentry>
542
<varlistentry><term><parameter>height</parameter> :</term>
543
<listitem><simpara> Height in pixels of image data
544
</simpara></listitem></varlistentry>
545
<varlistentry><term><parameter>flags</parameter> :</term>
546
<listitem><simpara> <link linkend="ClutterTextureFlags"><type>ClutterTextureFlags</type></link>
547
</simpara></listitem></varlistentry>
548
<varlistentry><term><parameter>error</parameter> :</term>
549
<listitem><simpara> Return location for a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
550
</simpara></listitem></varlistentry>
551
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the texture was successfully updated
553
</simpara></listitem></varlistentry>
554
</variablelist><para role="since">Since 0.4</para></refsect2>
555
<refsect2 id="clutter-texture-set-area-from-rgb-data" role="function" condition="since:0.6">
556
<title>clutter_texture_set_area_from_rgb_data ()</title>
557
<indexterm zone="clutter-texture-set-area-from-rgb-data" role="0.6"><primary sortas="texture_set_area_from_rgb_data">clutter_texture_set_area_from_rgb_data</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> clutter_texture_set_area_from_rgb_data
558
(<link linkend="ClutterTexture">ClutterTexture</link> *texture,
559
const <link linkend="guchar">guchar</link> *data,
560
<link linkend="gboolean">gboolean</link> has_alpha,
561
<link linkend="gint">gint</link> x,
562
<link linkend="gint">gint</link> y,
563
<link linkend="gint">gint</link> width,
564
<link linkend="gint">gint</link> height,
565
<link linkend="gint">gint</link> rowstride,
566
<link linkend="gint">gint</link> bpp,
567
<link linkend="ClutterTextureFlags">ClutterTextureFlags</link> flags,
568
<link linkend="GError">GError</link> **error);</programlisting>
570
Updates a sub-region of the pixel data in a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>.</para>
572
</para><variablelist role="params">
573
<varlistentry><term><parameter>texture</parameter> :</term>
574
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
575
</simpara></listitem></varlistentry>
576
<varlistentry><term><parameter>data</parameter> :</term>
577
<listitem><simpara> Image data in RGB type colorspace.
578
</simpara></listitem></varlistentry>
579
<varlistentry><term><parameter>has_alpha</parameter> :</term>
580
<listitem><simpara> Set to TRUE if image data has an alpha channel.
581
</simpara></listitem></varlistentry>
582
<varlistentry><term><parameter>x</parameter> :</term>
583
<listitem><simpara> X coordinate of upper left corner of region to update.
584
</simpara></listitem></varlistentry>
585
<varlistentry><term><parameter>y</parameter> :</term>
586
<listitem><simpara> Y coordinate of upper left corner of region to update.
587
</simpara></listitem></varlistentry>
588
<varlistentry><term><parameter>width</parameter> :</term>
589
<listitem><simpara> Width in pixels of region to update.
590
</simpara></listitem></varlistentry>
591
<varlistentry><term><parameter>height</parameter> :</term>
592
<listitem><simpara> Height in pixels of region to update.
593
</simpara></listitem></varlistentry>
594
<varlistentry><term><parameter>rowstride</parameter> :</term>
595
<listitem><simpara> Distance in bytes between row starts on source buffer.
596
</simpara></listitem></varlistentry>
597
<varlistentry><term><parameter>bpp</parameter> :</term>
598
<listitem><simpara> bytes per pixel (Currently only 3 and 4 supported,
599
depending on <parameter>has_alpha</parameter>)
600
</simpara></listitem></varlistentry>
601
<varlistentry><term><parameter>flags</parameter> :</term>
602
<listitem><simpara> <link linkend="ClutterTextureFlags"><type>ClutterTextureFlags</type></link>
603
</simpara></listitem></varlistentry>
604
<varlistentry><term><parameter>error</parameter> :</term>
605
<listitem><simpara> return location for a <link linkend="GError"><type>GError</type></link>, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
606
</simpara></listitem></varlistentry>
607
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> on success, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> on failure.
609
</simpara></listitem></varlistentry>
610
</variablelist><para role="since">Since 0.6</para></refsect2>
611
<refsect2 id="clutter-texture-get-base-size" role="function">
612
<title>clutter_texture_get_base_size ()</title>
613
<indexterm zone="clutter-texture-get-base-size"><primary sortas="texture_get_base_size">clutter_texture_get_base_size</primary></indexterm><programlisting><link linkend="void">void</link> clutter_texture_get_base_size (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
614
<link linkend="gint">gint</link> *width,
615
<link linkend="gint">gint</link> *height);</programlisting>
617
Gets the size in pixels of the untransformed underlying image</para>
619
</para><variablelist role="params">
620
<varlistentry><term><parameter>texture</parameter> :</term>
621
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
622
</simpara></listitem></varlistentry>
623
<varlistentry><term><parameter>width</parameter> :</term>
624
<listitem><simpara> return location for the width, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>. <acronym>out</acronym>. </simpara></listitem></varlistentry>
625
<varlistentry><term><parameter>height</parameter> :</term>
626
<listitem><simpara> return location for the height, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>. <acronym>out</acronym>. </simpara></listitem></varlistentry>
627
</variablelist></refsect2>
628
<refsect2 id="clutter-texture-get-pixel-format" role="function" condition="since:1.0">
629
<title>clutter_texture_get_pixel_format ()</title>
630
<indexterm zone="clutter-texture-get-pixel-format" role="1.0"><primary sortas="texture_get_pixel_format">clutter_texture_get_pixel_format</primary></indexterm><programlisting><link linkend="CoglPixelFormat">CoglPixelFormat</link> clutter_texture_get_pixel_format (<link linkend="ClutterTexture">ClutterTexture</link> *texture);</programlisting>
632
Retrieves the pixel format used by <parameter>texture</parameter>. This is
636
<informalexample><programlisting>
637
handle = clutter_texture_get_pixel_format (texture);
639
if (handle != COGL_INVALID_HANDLE)
640
format = cogl_texture_get_format (handle);
641
</programlisting></informalexample></para>
643
</para><variablelist role="params">
644
<varlistentry><term><parameter>texture</parameter> :</term>
645
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
646
</simpara></listitem></varlistentry>
647
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a <link linkend="CoglPixelFormat"><type>CoglPixelFormat</type></link> value
649
</simpara></listitem></varlistentry>
650
</variablelist><para role="since">Since 1.0</para></refsect2>
651
<refsect2 id="clutter-texture-get-max-tile-waste" role="function" condition="since:0.8">
652
<title>clutter_texture_get_max_tile_waste ()</title>
653
<indexterm zone="clutter-texture-get-max-tile-waste" role="0.8"><primary sortas="texture_get_max_tile_waste">clutter_texture_get_max_tile_waste</primary></indexterm><programlisting><link linkend="gint">gint</link> clutter_texture_get_max_tile_waste (<link linkend="ClutterTexture">ClutterTexture</link> *texture);</programlisting>
655
Gets the maximum waste that will be used when creating a texture or
656
-1 if slicing is disabled.</para>
658
</para><variablelist role="params">
659
<varlistentry><term><parameter>texture</parameter> :</term>
660
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
661
</simpara></listitem></varlistentry>
662
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The maximum waste or -1 if the texture waste is
665
</simpara></listitem></varlistentry>
666
</variablelist><para role="since">Since 0.8</para></refsect2>
667
<refsect2 id="clutter-texture-get-filter-quality" role="function" condition="since:0.8">
668
<title>clutter_texture_get_filter_quality ()</title>
669
<indexterm zone="clutter-texture-get-filter-quality" role="0.8"><primary sortas="texture_get_filter_quality">clutter_texture_get_filter_quality</primary></indexterm><programlisting><link linkend="ClutterTextureQuality">ClutterTextureQuality</link> clutter_texture_get_filter_quality
670
(<link linkend="ClutterTexture">ClutterTexture</link> *texture);</programlisting>
672
Gets the filter quality used when scaling a texture.</para>
674
</para><variablelist role="params">
675
<varlistentry><term><parameter>texture</parameter> :</term>
676
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
677
</simpara></listitem></varlistentry>
678
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The filter quality value.
680
</simpara></listitem></varlistentry>
681
</variablelist><para role="since">Since 0.8</para></refsect2>
682
<refsect2 id="clutter-texture-set-filter-quality" role="function" condition="since:0.8">
683
<title>clutter_texture_set_filter_quality ()</title>
684
<indexterm zone="clutter-texture-set-filter-quality" role="0.8"><primary sortas="texture_set_filter_quality">clutter_texture_set_filter_quality</primary></indexterm><programlisting><link linkend="void">void</link> clutter_texture_set_filter_quality (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
685
<link linkend="ClutterTextureQuality">ClutterTextureQuality</link> filter_quality);</programlisting>
687
Sets the filter quality when scaling a texture. The quality is an
688
enumeration currently the following values are supported:
689
<link linkend="CLUTTER-TEXTURE-QUALITY-LOW--CAPS"><literal>CLUTTER_TEXTURE_QUALITY_LOW</literal></link> which is fast but only uses nearest neighbour
690
interpolation. <link linkend="CLUTTER-TEXTURE-QUALITY-MEDIUM--CAPS"><literal>CLUTTER_TEXTURE_QUALITY_MEDIUM</literal></link> which is computationally a
691
bit more expensive (bilinear interpolation), and
692
<link linkend="CLUTTER-TEXTURE-QUALITY-HIGH--CAPS"><literal>CLUTTER_TEXTURE_QUALITY_HIGH</literal></link> which uses extra texture memory resources to
693
improve scaled down rendering as well (by using mipmaps). The default value
694
is <link linkend="CLUTTER-TEXTURE-QUALITY-MEDIUM--CAPS"><literal>CLUTTER_TEXTURE_QUALITY_MEDIUM</literal></link>.</para>
696
</para><variablelist role="params">
697
<varlistentry><term><parameter>texture</parameter> :</term>
698
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
699
</simpara></listitem></varlistentry>
700
<varlistentry><term><parameter>filter_quality</parameter> :</term>
701
<listitem><simpara> new filter quality value
702
</simpara></listitem></varlistentry>
703
</variablelist><para role="since">Since 0.8</para></refsect2>
704
<refsect2 id="clutter-texture-get-cogl-texture" role="function" condition="since:0.8">
705
<title>clutter_texture_get_cogl_texture ()</title>
706
<indexterm zone="clutter-texture-get-cogl-texture" role="0.8"><primary sortas="texture_get_cogl_texture">clutter_texture_get_cogl_texture</primary></indexterm><programlisting><link linkend="CoglHandle">CoglHandle</link> clutter_texture_get_cogl_texture (<link linkend="ClutterTexture">ClutterTexture</link> *texture);</programlisting>
708
Retrieves the handle to the underlying COGL texture used for drawing
709
the actor. No extra reference is taken so if you need to keep the
710
handle then you should call <link linkend="cogl-handle-ref"><function>cogl_handle_ref()</function></link> on it.
713
The texture handle returned is the first layer of the material
714
handle used by the <link linkend="ClutterTexture"><type>ClutterTexture</type></link>. If you need to access the other
715
layers you should use <link linkend="clutter-texture-get-cogl-material"><function>clutter_texture_get_cogl_material()</function></link> instead
716
and use the <link linkend="CoglMaterial"><type>CoglMaterial</type></link> API.</para>
718
</para><variablelist role="params">
719
<varlistentry><term><parameter>texture</parameter> :</term>
720
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
721
</simpara></listitem></varlistentry>
722
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> COGL texture handle
723
</simpara></listitem></varlistentry>
724
</variablelist><para role="since">Since 0.8</para></refsect2>
725
<refsect2 id="clutter-texture-set-cogl-texture" role="function" condition="since:0.8">
726
<title>clutter_texture_set_cogl_texture ()</title>
727
<indexterm zone="clutter-texture-set-cogl-texture" role="0.8"><primary sortas="texture_set_cogl_texture">clutter_texture_set_cogl_texture</primary></indexterm><programlisting><link linkend="void">void</link> clutter_texture_set_cogl_texture (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
728
<link linkend="CoglHandle">CoglHandle</link> cogl_tex);</programlisting>
730
Replaces the underlying COGL texture drawn by this actor with
731
<parameter>cogl_tex</parameter>. A reference to the texture is taken so if the handle is
732
no longer needed it should be deref'd with cogl_handle_unref.
735
This should not be called on an unrealizable texture (one that
736
isn't inside a stage). (Currently the ClutterTexture
737
implementation relies on being able to have a GL texture while
738
unrealized, which means you can get away with it, but it's
739
not correct and may change in the future.)</para>
741
</para><variablelist role="params">
742
<varlistentry><term><parameter>texture</parameter> :</term>
743
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
744
</simpara></listitem></varlistentry>
745
<varlistentry><term><parameter>cogl_tex</parameter> :</term>
746
<listitem><simpara> A CoglHandle for a texture
747
</simpara></listitem></varlistentry>
748
</variablelist><para role="since">Since 0.8</para></refsect2>
749
<refsect2 id="clutter-texture-get-cogl-material" role="function" condition="since:1.0">
750
<title>clutter_texture_get_cogl_material ()</title>
751
<indexterm zone="clutter-texture-get-cogl-material" role="1.0"><primary sortas="texture_get_cogl_material">clutter_texture_get_cogl_material</primary></indexterm><programlisting><link linkend="CoglHandle">CoglHandle</link> clutter_texture_get_cogl_material (<link linkend="ClutterTexture">ClutterTexture</link> *texture);</programlisting>
753
Returns a handle to the underlying COGL material used for drawing
754
the actor. No extra reference is taken so if you need to keep the
755
handle then you should call <link linkend="cogl-handle-ref"><function>cogl_handle_ref()</function></link> on it.</para>
757
</para><variablelist role="params">
758
<varlistentry><term><parameter>texture</parameter> :</term>
759
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
760
</simpara></listitem></varlistentry>
761
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> COGL material handle
762
</simpara></listitem></varlistentry>
763
</variablelist><para role="since">Since 1.0</para></refsect2>
764
<refsect2 id="clutter-texture-set-cogl-material" role="function" condition="since:0.8">
765
<title>clutter_texture_set_cogl_material ()</title>
766
<indexterm zone="clutter-texture-set-cogl-material" role="0.8"><primary sortas="texture_set_cogl_material">clutter_texture_set_cogl_material</primary></indexterm><programlisting><link linkend="void">void</link> clutter_texture_set_cogl_material (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
767
<link linkend="CoglHandle">CoglHandle</link> cogl_material);</programlisting>
769
Replaces the underlying Cogl material drawn by this actor with
770
<parameter>cogl_material</parameter>. A reference to the material is taken so if the
771
handle is no longer needed it should be deref'd with
772
cogl_handle_unref. Texture data is attached to the material so
773
calling this function also replaces the Cogl
774
texture. <link linkend="ClutterTexture"><type>ClutterTexture</type></link> requires that the material have a texture
775
layer so you should set one on the material before calling this
778
</para><variablelist role="params">
779
<varlistentry><term><parameter>texture</parameter> :</term>
780
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
781
</simpara></listitem></varlistentry>
782
<varlistentry><term><parameter>cogl_material</parameter> :</term>
783
<listitem><simpara> A CoglHandle for a material
784
</simpara></listitem></varlistentry>
785
</variablelist><para role="since">Since 0.8</para></refsect2>
786
<refsect2 id="clutter-texture-get-sync-size" role="function" condition="since:1.0">
787
<title>clutter_texture_get_sync_size ()</title>
788
<indexterm zone="clutter-texture-get-sync-size" role="1.0"><primary sortas="texture_get_sync_size">clutter_texture_get_sync_size</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> clutter_texture_get_sync_size (<link linkend="ClutterTexture">ClutterTexture</link> *texture);</programlisting>
790
Retrieves the value set with <link linkend="clutter-texture-get-sync-size"><function>clutter_texture_get_sync_size()</function></link></para>
792
</para><variablelist role="params">
793
<varlistentry><term><parameter>texture</parameter> :</term>
794
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
795
</simpara></listitem></varlistentry>
796
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <link linkend="ClutterTexture"><type>ClutterTexture</type></link> should have the same
797
preferred size of the underlying image data
799
</simpara></listitem></varlistentry>
800
</variablelist><para role="since">Since 1.0</para></refsect2>
801
<refsect2 id="clutter-texture-set-sync-size" role="function" condition="since:1.0">
802
<title>clutter_texture_set_sync_size ()</title>
803
<indexterm zone="clutter-texture-set-sync-size" role="1.0"><primary sortas="texture_set_sync_size">clutter_texture_set_sync_size</primary></indexterm><programlisting><link linkend="void">void</link> clutter_texture_set_sync_size (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
804
<link linkend="gboolean">gboolean</link> sync_size);</programlisting>
806
Sets whether <parameter>texture</parameter> should have the same preferred size as the
807
underlying image data.</para>
809
</para><variablelist role="params">
810
<varlistentry><term><parameter>texture</parameter> :</term>
811
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
812
</simpara></listitem></varlistentry>
813
<varlistentry><term><parameter>sync_size</parameter> :</term>
814
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the texture should have the same size of the
815
underlying image data
816
</simpara></listitem></varlistentry>
817
</variablelist><para role="since">Since 1.0</para></refsect2>
818
<refsect2 id="clutter-texture-get-repeat" role="function" condition="since:1.0">
819
<title>clutter_texture_get_repeat ()</title>
820
<indexterm zone="clutter-texture-get-repeat" role="1.0"><primary sortas="texture_get_repeat">clutter_texture_get_repeat</primary></indexterm><programlisting><link linkend="void">void</link> clutter_texture_get_repeat (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
821
<link linkend="gboolean">gboolean</link> *repeat_x,
822
<link linkend="gboolean">gboolean</link> *repeat_y);</programlisting>
824
Retrieves the horizontal and vertical repeat values set
825
using <link linkend="clutter-texture-set-repeat"><function>clutter_texture_set_repeat()</function></link></para>
827
</para><variablelist role="params">
828
<varlistentry><term><parameter>texture</parameter> :</term>
829
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
830
</simpara></listitem></varlistentry>
831
<varlistentry><term><parameter>repeat_x</parameter> :</term>
832
<listitem><simpara> return location for the horizontal repeat. <acronym>out</acronym>. </simpara></listitem></varlistentry>
833
<varlistentry><term><parameter>repeat_y</parameter> :</term>
834
<listitem><simpara> return location for the vertical repeat. <acronym>out</acronym>. </simpara></listitem></varlistentry>
835
</variablelist><para role="since">Since 1.0</para></refsect2>
836
<refsect2 id="clutter-texture-set-repeat" role="function" condition="since:1.0">
837
<title>clutter_texture_set_repeat ()</title>
838
<indexterm zone="clutter-texture-set-repeat" role="1.0"><primary sortas="texture_set_repeat">clutter_texture_set_repeat</primary></indexterm><programlisting><link linkend="void">void</link> clutter_texture_set_repeat (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
839
<link linkend="gboolean">gboolean</link> repeat_x,
840
<link linkend="gboolean">gboolean</link> repeat_y);</programlisting>
842
Sets whether the <parameter>texture</parameter> should repeat horizontally or
843
vertically when the actor size is bigger than the image size</para>
845
</para><variablelist role="params">
846
<varlistentry><term><parameter>texture</parameter> :</term>
847
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
848
</simpara></listitem></varlistentry>
849
<varlistentry><term><parameter>repeat_x</parameter> :</term>
850
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the texture should repeat horizontally
851
</simpara></listitem></varlistentry>
852
<varlistentry><term><parameter>repeat_y</parameter> :</term>
853
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the texture should repeat vertically
854
</simpara></listitem></varlistentry>
855
</variablelist><para role="since">Since 1.0</para></refsect2>
856
<refsect2 id="clutter-texture-get-keep-aspect-ratio" role="function" condition="since:1.0">
857
<title>clutter_texture_get_keep_aspect_ratio ()</title>
858
<indexterm zone="clutter-texture-get-keep-aspect-ratio" role="1.0"><primary sortas="texture_get_keep_aspect_ratio">clutter_texture_get_keep_aspect_ratio</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> clutter_texture_get_keep_aspect_ratio
859
(<link linkend="ClutterTexture">ClutterTexture</link> *texture);</programlisting>
861
Retrieves the value set using <link linkend="clutter-texture-get-keep-aspect-ratio"><function>clutter_texture_get_keep_aspect_ratio()</function></link></para>
863
</para><variablelist role="params">
864
<varlistentry><term><parameter>texture</parameter> :</term>
865
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
866
</simpara></listitem></varlistentry>
867
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <link linkend="ClutterTexture"><type>ClutterTexture</type></link> should maintain the
868
aspect ratio of the underlying image
870
</simpara></listitem></varlistentry>
871
</variablelist><para role="since">Since 1.0</para></refsect2>
872
<refsect2 id="clutter-texture-set-keep-aspect-ratio" role="function" condition="since:1.0">
873
<title>clutter_texture_set_keep_aspect_ratio ()</title>
874
<indexterm zone="clutter-texture-set-keep-aspect-ratio" role="1.0"><primary sortas="texture_set_keep_aspect_ratio">clutter_texture_set_keep_aspect_ratio</primary></indexterm><programlisting><link linkend="void">void</link> clutter_texture_set_keep_aspect_ratio
875
(<link linkend="ClutterTexture">ClutterTexture</link> *texture,
876
<link linkend="gboolean">gboolean</link> keep_aspect);</programlisting>
878
Sets whether <parameter>texture</parameter> should have a preferred size maintaining
879
the aspect ratio of the underlying image</para>
881
</para><variablelist role="params">
882
<varlistentry><term><parameter>texture</parameter> :</term>
883
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
884
</simpara></listitem></varlistentry>
885
<varlistentry><term><parameter>keep_aspect</parameter> :</term>
886
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> to maintain aspect ratio
887
</simpara></listitem></varlistentry>
888
</variablelist><para role="since">Since 1.0</para></refsect2>
889
<refsect2 id="clutter-texture-get-load-async" role="function" condition="since:1.0">
890
<title>clutter_texture_get_load_async ()</title>
891
<indexterm zone="clutter-texture-get-load-async" role="1.0"><primary sortas="texture_get_load_async">clutter_texture_get_load_async</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> clutter_texture_get_load_async (<link linkend="ClutterTexture">ClutterTexture</link> *texture);</programlisting>
893
Retrieves the value set using <link linkend="clutter-texture-get-load-async"><function>clutter_texture_get_load_async()</function></link></para>
895
</para><variablelist role="params">
896
<varlistentry><term><parameter>texture</parameter> :</term>
897
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
898
</simpara></listitem></varlistentry>
899
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <link linkend="ClutterTexture"><type>ClutterTexture</type></link> should load the data from
902
</simpara></listitem></varlistentry>
903
</variablelist><para role="since">Since 1.0</para></refsect2>
904
<refsect2 id="clutter-texture-set-load-async" role="function" condition="since:1.0">
905
<title>clutter_texture_set_load_async ()</title>
906
<indexterm zone="clutter-texture-set-load-async" role="1.0"><primary sortas="texture_set_load_async">clutter_texture_set_load_async</primary></indexterm><programlisting><link linkend="void">void</link> clutter_texture_set_load_async (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
907
<link linkend="gboolean">gboolean</link> load_async);</programlisting>
909
Sets whether <parameter>texture</parameter> should use a worker thread to load the data
910
from disk asynchronously. Setting <parameter>load_async</parameter> to <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> will make
911
<link linkend="clutter-texture-set-from-file"><function>clutter_texture_set_from_file()</function></link> return immediately.
914
See the <link linkend="ClutterTexture--load-async"><type>"load-async"</type></link> property documentation, and
915
<link linkend="clutter-texture-set-load-data-async"><function>clutter_texture_set_load_data_async()</function></link>.</para>
917
</para><variablelist role="params">
918
<varlistentry><term><parameter>texture</parameter> :</term>
919
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
920
</simpara></listitem></varlistentry>
921
<varlistentry><term><parameter>load_async</parameter> :</term>
922
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the texture should asynchronously load data
924
</simpara></listitem></varlistentry>
925
</variablelist><para role="since">Since 1.0</para></refsect2>
926
<refsect2 id="clutter-texture-get-load-data-async" role="function" condition="since:1.0">
927
<title>clutter_texture_get_load_data_async ()</title>
928
<indexterm zone="clutter-texture-get-load-data-async" role="1.0"><primary sortas="texture_get_load_data_async">clutter_texture_get_load_data_async</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> clutter_texture_get_load_data_async (<link linkend="ClutterTexture">ClutterTexture</link> *texture);</programlisting>
930
Retrieves the value set by <link linkend="clutter-texture-set-load-data-async"><function>clutter_texture_set_load_data_async()</function></link></para>
932
</para><variablelist role="params">
933
<varlistentry><term><parameter>texture</parameter> :</term>
934
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
935
</simpara></listitem></varlistentry>
936
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the <link linkend="ClutterTexture"><type>ClutterTexture</type></link> should load the image
937
data from a file asynchronously
939
</simpara></listitem></varlistentry>
940
</variablelist><para role="since">Since 1.0</para></refsect2>
941
<refsect2 id="clutter-texture-set-load-data-async" role="function" condition="since:1.0">
942
<title>clutter_texture_set_load_data_async ()</title>
943
<indexterm zone="clutter-texture-set-load-data-async" role="1.0"><primary sortas="texture_set_load_data_async">clutter_texture_set_load_data_async</primary></indexterm><programlisting><link linkend="void">void</link> clutter_texture_set_load_data_async (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
944
<link linkend="gboolean">gboolean</link> load_async);</programlisting>
946
Sets whether <parameter>texture</parameter> should use a worker thread to load the data
947
from disk asynchronously. Setting <parameter>load_async</parameter> to <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> will make
948
<link linkend="clutter-texture-set-from-file"><function>clutter_texture_set_from_file()</function></link> block until the <link linkend="ClutterTexture"><type>ClutterTexture</type></link> has
949
determined the width and height of the image data.
952
See the <link linkend="ClutterTexture--load-async"><type>"load-async"</type></link> property documentation, and
953
<link linkend="clutter-texture-set-load-async"><function>clutter_texture_set_load_async()</function></link>.</para>
955
</para><variablelist role="params">
956
<varlistentry><term><parameter>texture</parameter> :</term>
957
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
958
</simpara></listitem></varlistentry>
959
<varlistentry><term><parameter>load_async</parameter> :</term>
960
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the texture should asynchronously load data
962
</simpara></listitem></varlistentry>
963
</variablelist><para role="since">Since 1.0</para></refsect2>
966
<refsect1 id="ClutterTexture.property-details" role="property_details">
967
<title role="property_details.title">Property Details</title>
968
<refsect2 id="ClutterTexture--cogl-material" role="property"><title>The <literal>"cogl-material"</literal> property</title>
969
<indexterm zone="ClutterTexture--cogl-material"><primary sortas="Texture:cogl-material">ClutterTexture:cogl-material</primary></indexterm><programlisting> "cogl-material" <link linkend="CoglHandle">CoglHandle</link>* : Read / Write</programlisting>
970
<para>The underlying COGL material handle used to draw this actor.</para></refsect2>
971
<refsect2 id="ClutterTexture--cogl-texture" role="property"><title>The <literal>"cogl-texture"</literal> property</title>
972
<indexterm zone="ClutterTexture--cogl-texture"><primary sortas="Texture:cogl-texture">ClutterTexture:cogl-texture</primary></indexterm><programlisting> "cogl-texture" <link linkend="CoglHandle">CoglHandle</link>* : Read / Write</programlisting>
973
<para>The underlying COGL texture handle used to draw this actor.</para></refsect2>
974
<refsect2 id="ClutterTexture--disable-slicing" role="property"><title>The <literal>"disable-slicing"</literal> property</title>
975
<indexterm zone="ClutterTexture--disable-slicing"><primary sortas="Texture:disable-slicing">ClutterTexture:disable-slicing</primary></indexterm><programlisting> "disable-slicing" <link linkend="gboolean">gboolean</link> : Read / Write / Construct Only</programlisting>
976
<para>Force the underlying texture to be singlularand not made of of smaller space saving inidivual textures.</para><para>Default value: FALSE</para>
978
<refsect2 id="ClutterTexture--filename" role="property"><title>The <literal>"filename"</literal> property</title>
979
<indexterm zone="ClutterTexture--filename"><primary sortas="Texture:filename">ClutterTexture:filename</primary></indexterm><programlisting> "filename" <link linkend="gchar">gchar</link>* : Write</programlisting>
980
<para>The full path of the file containing the texture.</para><para>Default value: NULL</para>
982
<refsect2 id="ClutterTexture--filter-quality" role="property"><title>The <literal>"filter-quality"</literal> property</title>
983
<indexterm zone="ClutterTexture--filter-quality"><primary sortas="Texture:filter-quality">ClutterTexture:filter-quality</primary></indexterm><programlisting> "filter-quality" <link linkend="ClutterTextureQuality">ClutterTextureQuality</link> : Read / Write / Construct</programlisting>
984
<para>Rendering quality used when drawing the texture.</para><para>Default value: CLUTTER_TEXTURE_QUALITY_MEDIUM</para>
986
<refsect2 id="ClutterTexture--keep-aspect-ratio" role="property"><title>The <literal>"keep-aspect-ratio"</literal> property</title>
987
<indexterm zone="ClutterTexture--keep-aspect-ratio"><primary sortas="Texture:keep-aspect-ratio">ClutterTexture:keep-aspect-ratio</primary></indexterm><programlisting> "keep-aspect-ratio" <link linkend="gboolean">gboolean</link> : Read / Write</programlisting>
988
<para>Keep the aspect ratio of the texture when requesting the preferred width or height.</para><para>Default value: FALSE</para>
990
<refsect2 id="ClutterTexture--load-async" role="property"><title>The <literal>"load-async"</literal> property</title>
991
<indexterm zone="ClutterTexture--load-async" role="1.0"><primary sortas="Texture:load-async">ClutterTexture:load-async</primary></indexterm><programlisting> "load-async" <link linkend="gboolean">gboolean</link> : Write</programlisting>
993
Tries to load a texture from a filename by using a local thread to perform
994
the read operations. The initially created texture has dimensions 0x0 when
995
the true size becomes available the <link linkend="ClutterTexture-size-change"><type>"size-change"</type></link> signal is
996
emitted and when the image has completed loading the
997
<link linkend="ClutterTexture-load-finished"><type>"load-finished"</type></link> signal is emitted.
1000
Threading is only enabled if <link linkend="g-thread-init"><function>g_thread_init()</function></link> has been called prior to
1001
<link linkend="clutter-init"><function>clutter_init()</function></link>, otherwise <link linkend="ClutterTexture"><type>ClutterTexture</type></link> will use the main loop to load
1005
The upload of the texture data on the GL pipeline is not asynchronous, as
1006
it must be performed from within the same thread that called
1007
<link linkend="clutter-main"><function>clutter_main()</function></link>.</para>
1009
</para><para>Default value: FALSE</para>
1010
<para>Since 1.0</para>
1012
<refsect2 id="ClutterTexture--load-data-async" role="property"><title>The <literal>"load-data-async"</literal> property</title>
1013
<indexterm zone="ClutterTexture--load-data-async" role="1.0"><primary sortas="Texture:load-data-async">ClutterTexture:load-data-async</primary></indexterm><programlisting> "load-data-async" <link linkend="gboolean">gboolean</link> : Write</programlisting>
1015
Like <link linkend="ClutterTexture--load-async"><type>"load-async"</type></link> but loads the width and height
1016
synchronously causing some blocking.</para>
1018
</para><para>Default value: FALSE</para>
1019
<para>Since 1.0</para>
1021
<refsect2 id="ClutterTexture--pixel-format" role="property"><title>The <literal>"pixel-format"</literal> property</title>
1022
<indexterm zone="ClutterTexture--pixel-format"><primary sortas="Texture:pixel-format">ClutterTexture:pixel-format</primary></indexterm><programlisting> "pixel-format" <link linkend="CoglPixelFormat">CoglPixelFormat</link> : Read</programlisting>
1023
<para>CoglPixelFormat to use.</para><para>Default value: COGL_PIXEL_FORMAT_RGBA_8888</para>
1025
<refsect2 id="ClutterTexture--repeat-x" role="property"><title>The <literal>"repeat-x"</literal> property</title>
1026
<indexterm zone="ClutterTexture--repeat-x"><primary sortas="Texture:repeat-x">ClutterTexture:repeat-x</primary></indexterm><programlisting> "repeat-x" <link linkend="gboolean">gboolean</link> : Read / Write</programlisting>
1027
<para>Repeat underlying pixbuf rather than scale in x direction.</para><para>Default value: FALSE</para>
1029
<refsect2 id="ClutterTexture--repeat-y" role="property"><title>The <literal>"repeat-y"</literal> property</title>
1030
<indexterm zone="ClutterTexture--repeat-y"><primary sortas="Texture:repeat-y">ClutterTexture:repeat-y</primary></indexterm><programlisting> "repeat-y" <link linkend="gboolean">gboolean</link> : Read / Write</programlisting>
1031
<para>Repeat underlying pixbuf rather than scale in y direction.</para><para>Default value: FALSE</para>
1033
<refsect2 id="ClutterTexture--sync-size" role="property"><title>The <literal>"sync-size"</literal> property</title>
1034
<indexterm zone="ClutterTexture--sync-size"><primary sortas="Texture:sync-size">ClutterTexture:sync-size</primary></indexterm><programlisting> "sync-size" <link linkend="gboolean">gboolean</link> : Read / Write</programlisting>
1035
<para>Auto sync size of actor to underlying pixbuf dimensions.</para><para>Default value: TRUE</para>
1037
<refsect2 id="ClutterTexture--tile-waste" role="property"><title>The <literal>"tile-waste"</literal> property</title>
1038
<indexterm zone="ClutterTexture--tile-waste"><primary sortas="Texture:tile-waste">ClutterTexture:tile-waste</primary></indexterm><programlisting> "tile-waste" <link linkend="gint">gint</link> : Read</programlisting>
1039
<para>Maximum waste area of a sliced texture.</para><para>Allowed values: >= -1</para>
1040
<para>Default value: 127</para>
1044
<refsect1 id="ClutterTexture.signal-details" role="signals">
1045
<title role="signals.title">Signal Details</title>
1046
<refsect2 id="ClutterTexture-load-finished" role="signal"><title>The <literal>"load-finished"</literal> signal</title>
1047
<indexterm zone="ClutterTexture-load-finished" role="1.0"><primary sortas="Texture::load-finished">ClutterTexture::load-finished</primary></indexterm><programlisting><link linkend="void">void</link> user_function (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
1048
<link linkend="gpointer">gpointer</link> error,
1049
<link linkend="gpointer">gpointer</link> user_data) : Run Last</programlisting>
1051
The ::load-finished signal is emitted when a texture load has
1052
completed. If there was an error during loading, <parameter>error</parameter> will
1053
be set, otherwise it will be <link linkend="NULL--CAPS"><literal>NULL</literal></link></para>
1055
</para><variablelist role="params">
1056
<varlistentry><term><parameter>texture</parameter> :</term>
1057
<listitem><simpara> the texture which received the signal
1058
</simpara></listitem></varlistentry>
1059
<varlistentry><term><parameter>error</parameter> :</term>
1060
<listitem><simpara> A set error, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
1061
</simpara></listitem></varlistentry>
1062
<varlistentry><term><parameter>user_data</parameter> :</term>
1063
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
1064
</variablelist><para>Since 1.0</para></refsect2><refsect2 id="ClutterTexture-pixbuf-change" role="signal"><title>The <literal>"pixbuf-change"</literal> signal</title>
1065
<indexterm zone="ClutterTexture-pixbuf-change"><primary sortas="Texture::pixbuf-change">ClutterTexture::pixbuf-change</primary></indexterm><programlisting><link linkend="void">void</link> user_function (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
1066
<link linkend="gpointer">gpointer</link> user_data) : Run Last</programlisting>
1068
The ::pixbuf-change signal is emitted each time the pixbuf
1069
used by <parameter>texture</parameter> changes.</para>
1071
</para><variablelist role="params">
1072
<varlistentry><term><parameter>texture</parameter> :</term>
1073
<listitem><simpara> the texture which received the signal
1074
</simpara></listitem></varlistentry>
1075
<varlistentry><term><parameter>user_data</parameter> :</term>
1076
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
1077
</variablelist></refsect2><refsect2 id="ClutterTexture-size-change" role="signal"><title>The <literal>"size-change"</literal> signal</title>
1078
<indexterm zone="ClutterTexture-size-change"><primary sortas="Texture::size-change">ClutterTexture::size-change</primary></indexterm><programlisting><link linkend="void">void</link> user_function (<link linkend="ClutterTexture">ClutterTexture</link> *texture,
1079
<link linkend="gint">gint</link> width,
1080
<link linkend="gint">gint</link> height,
1081
<link linkend="gpointer">gpointer</link> user_data) : Run Last</programlisting>
1083
The ::size-change signal is emitted each time the size of the
1084
pixbuf used by <parameter>texture</parameter> changes. The new size is given as
1085
argument to the callback.</para>
1087
</para><variablelist role="params">
1088
<varlistentry><term><parameter>texture</parameter> :</term>
1089
<listitem><simpara> the texture which received the signal
1090
</simpara></listitem></varlistentry>
1091
<varlistentry><term><parameter>width</parameter> :</term>
1092
<listitem><simpara> the width of the new texture
1093
</simpara></listitem></varlistentry>
1094
<varlistentry><term><parameter>height</parameter> :</term>
1095
<listitem><simpara> the height of the new texture
1096
</simpara></listitem></varlistentry>
1097
<varlistentry><term><parameter>user_data</parameter> :</term>
1098
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
1099
</variablelist></refsect2>