~oem-solutions-group/unity-2d/clutter-1.0

« back to all changes in this revision

Viewing changes to doc/reference/clutter/xml/clutter-texture.xml

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
ImportĀ upstreamĀ versionĀ 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0"?>
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">
5
 
]>
6
 
 
7
 
<refentry id="ClutterTexture">
8
 
<refmeta>
9
 
<refentrytitle role="top_of_page" id="ClutterTexture.top_of_page">ClutterTexture</refentrytitle>
10
 
<manvolnum>3</manvolnum>
11
 
<refmiscinfo>CLUTTER Library</refmiscinfo>
12
 
</refmeta>
13
 
 
14
 
<refnamediv>
15
 
<refname>ClutterTexture</refname>
16
 
<refpurpose>An actor for displaying and manipulating images.</refpurpose>
17
 
</refnamediv>
18
 
 
19
 
<refsynopsisdiv id="ClutterTexture.synopsis" role="synopsis">
20
 
<title role="synopsis.title">Synopsis</title>
21
 
 
22
 
<synopsis>
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);
31
 
 
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);
99
 
</synopsis>
100
 
</refsynopsisdiv>
101
 
 
102
 
<refsect1 id="ClutterTexture.object-hierarchy" role="object_hierarchy">
103
 
<title role="object_hierarchy.title">Object Hierarchy</title>
104
 
<synopsis>
105
 
  <link linkend="GObject">GObject</link>
106
 
   +----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
107
 
         +----<link linkend="ClutterActor">ClutterActor</link>
108
 
               +----ClutterTexture
109
 
                     +----<link linkend="ClutterCairoTexture">ClutterCairoTexture</link>
110
 
</synopsis>
111
 
</refsect1>
112
 
 
113
 
 
114
 
 
115
 
<refsect1 id="ClutterTexture.implemented-interfaces" role="impl_interfaces">
116
 
<title role="impl_interfaces.title">Implemented Interfaces</title>
117
 
<para>
118
 
ClutterTexture implements
119
 
 <link linkend="ClutterScriptable">ClutterScriptable</link>.</para>
120
 
</refsect1>
121
 
 
122
 
 
123
 
<refsect1 id="ClutterTexture.properties" role="properties">
124
 
<title role="properties.title">Properties</title>
125
 
<synopsis>
126
 
  &quot;<link linkend="ClutterTexture--cogl-material">cogl-material</link>&quot;            <link linkend="CoglHandle">CoglHandle</link>*           : Read / Write
127
 
  &quot;<link linkend="ClutterTexture--cogl-texture">cogl-texture</link>&quot;             <link linkend="CoglHandle">CoglHandle</link>*           : Read / Write
128
 
  &quot;<link linkend="ClutterTexture--disable-slicing">disable-slicing</link>&quot;          <link linkend="gboolean">gboolean</link>              : Read / Write / Construct Only
129
 
  &quot;<link linkend="ClutterTexture--filename">filename</link>&quot;                 <link linkend="gchar">gchar</link>*                : Write
130
 
  &quot;<link linkend="ClutterTexture--filter-quality">filter-quality</link>&quot;           <link linkend="ClutterTextureQuality">ClutterTextureQuality</link>  : Read / Write / Construct
131
 
  &quot;<link linkend="ClutterTexture--keep-aspect-ratio">keep-aspect-ratio</link>&quot;        <link linkend="gboolean">gboolean</link>              : Read / Write
132
 
  &quot;<link linkend="ClutterTexture--load-async">load-async</link>&quot;               <link linkend="gboolean">gboolean</link>              : Write
133
 
  &quot;<link linkend="ClutterTexture--load-data-async">load-data-async</link>&quot;          <link linkend="gboolean">gboolean</link>              : Write
134
 
  &quot;<link linkend="ClutterTexture--pixel-format">pixel-format</link>&quot;             <link linkend="CoglPixelFormat">CoglPixelFormat</link>       : Read
135
 
  &quot;<link linkend="ClutterTexture--repeat-x">repeat-x</link>&quot;                 <link linkend="gboolean">gboolean</link>              : Read / Write
136
 
  &quot;<link linkend="ClutterTexture--repeat-y">repeat-y</link>&quot;                 <link linkend="gboolean">gboolean</link>              : Read / Write
137
 
  &quot;<link linkend="ClutterTexture--sync-size">sync-size</link>&quot;                <link linkend="gboolean">gboolean</link>              : Read / Write
138
 
  &quot;<link linkend="ClutterTexture--tile-waste">tile-waste</link>&quot;               <link linkend="gint">gint</link>                  : Read
139
 
</synopsis>
140
 
</refsect1>
141
 
 
142
 
<refsect1 id="ClutterTexture.signals" role="signal_proto">
143
 
<title role="signal_proto.title">Signals</title>
144
 
<synopsis>
145
 
  &quot;<link linkend="ClutterTexture-load-finished">load-finished</link>&quot;                                  : Run Last
146
 
  &quot;<link linkend="ClutterTexture-pixbuf-change">pixbuf-change</link>&quot;                                  : Run Last
147
 
  &quot;<link linkend="ClutterTexture-size-change">size-change</link>&quot;                                    : Run Last
148
 
</synopsis>
149
 
</refsect1>
150
 
 
151
 
 
152
 
<refsect1 id="ClutterTexture.description" role="desc">
153
 
<title role="desc.title">Description</title>
154
 
<para>
155
 
<link linkend="ClutterTexture"><type>ClutterTexture</type></link> is a base class for displaying and manipulating pixel
156
 
buffer type data.
157
 
</para>
158
 
<para>
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.
162
 
</para>
163
 
<para>
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
168
 
texture memory.
169
 
</para>
170
 
<para>
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>
175
 
<para>
176
 
</para>
177
 
</refsect1>
178
 
 
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>
184
 
<para>
185
 
The <link linkend="ClutterTexture"><type>ClutterTexture</type></link> structure contains only private data
186
 
and should be accessed using the provided API</para>
187
 
<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,
193
 
                          gint            width,
194
 
                          gint            height);
195
 
  void (* pixbuf_change) (ClutterTexture *texture);
196
 
  void (* load_finished) (ClutterTexture *texture,
197
 
                          const GError   *error);
198
 
} ClutterTextureClass;
199
 
</programlisting>
200
 
<para>
201
 
The <link linkend="ClutterTextureClass"><type>ClutterTextureClass</type></link> structure contains only private data</para>
202
 
<para>
203
 
</para><variablelist role="struct">
204
 
<varlistentry>
205
 
<term><structfield>size_change</structfield>&#160;()</term>
206
 
<listitem><simpara> handler for the <link linkend="ClutterTexture-size-change"><type>"size-change"</type></link> signal
207
 
</simpara></listitem>
208
 
</varlistentry>
209
 
<varlistentry>
210
 
<term><structfield>pixbuf_change</structfield>&#160;()</term>
211
 
<listitem><simpara> handler for the <link linkend="ClutterTexture-pixbuf-change"><type>"pixbuf-change"</type></link> signal
212
 
</simpara></listitem>
213
 
</varlistentry>
214
 
<varlistentry>
215
 
<term><structfield>load_finished</structfield>&#160;()</term>
216
 
<listitem><simpara> handler for the <link linkend="ClutterTexture-load-finished"><type>"load-finished"</type></link> signal
217
 
</simpara></listitem>
218
 
</varlistentry>
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 { /*&lt; prefix=CLUTTER_TEXTURE &gt;*/
223
 
  CLUTTER_TEXTURE_NONE             = 0,
224
 
  CLUTTER_TEXTURE_RGB_FLAG_BGR     = 1 &lt;&lt; 1,
225
 
  CLUTTER_TEXTURE_RGB_FLAG_PREMULT = 1 &lt;&lt; 2, /* FIXME: not handled */
226
 
  CLUTTER_TEXTURE_YUV_FLAG_YUV2    = 1 &lt;&lt; 3
227
 
 
228
 
  /* FIXME: add compressed types ? */
229
 
} ClutterTextureFlags;
230
 
</programlisting>
231
 
<para>
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>
234
 
<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>
240
 
</varlistentry>
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>
245
 
</varlistentry>
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>
250
 
</varlistentry>
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>
255
 
</varlistentry>
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 { /*&lt; prefix=CLUTTER_TEXTURE_QUALITY &gt;*/
260
 
  CLUTTER_TEXTURE_QUALITY_LOW,
261
 
  CLUTTER_TEXTURE_QUALITY_MEDIUM,
262
 
  CLUTTER_TEXTURE_QUALITY_HIGH
263
 
} ClutterTextureQuality;
264
 
</programlisting>
265
 
<para>
266
 
Enumaration controlling the texture quality.</para>
267
 
<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>
274
 
</varlistentry>
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
278
 
  extra resources.
279
 
</simpara></listitem>
280
 
</varlistentry>
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>
286
 
</varlistentry>
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>
291
 
<para>
292
 
Creates a new empty <link linkend="ClutterTexture"><type>ClutterTexture</type></link> object.</para>
293
 
<para>
294
 
</para><variablelist role="params">
295
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</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>
302
 
<para>
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>
305
 
is set.</para>
306
 
<para>
307
 
</para><variablelist role="params">
308
 
<varlistentry><term><parameter>filename</parameter>&#160;:</term>
309
 
<listitem><simpara> The name of an image file to load.
310
 
</simpara></listitem></varlistentry>
311
 
<varlistentry><term><parameter>error</parameter>&#160;:</term>
312
 
<listitem><simpara> Return locatoin for an error.
313
 
</simpara></listitem></varlistentry>
314
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A newly created <link linkend="ClutterTexture"><type>ClutterTexture</type></link> object or NULL on
315
 
error.
316
 
 
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>
322
 
<para>
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.
326
 
</para>
327
 
<para>
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.
332
 
</para>
333
 
<para>
334
 
Some tips on usage:
335
 
</para>
336
 
<para>
337
 
<itemizedlist>
338
 
  <listitem>
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>
341
 
  </listitem>
342
 
  <listitem>
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>
353
 
  </listitem>
354
 
  <listitem>
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>
368
 
  </listitem>
369
 
  <listitem>
370
 
    <para>Avoid reparenting the source with the created texture.</para>
371
 
  </listitem>
372
 
  <listitem>
373
 
    <para>A group can be padded with a transparent rectangle as to
374
 
    provide a border to contents for shader output (blurring text
375
 
    for example).</para>
376
 
  </listitem>
377
 
  <listitem>
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>
382
 
  </listitem>
383
 
  <listitem>
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>
387
 
  </listitem>
388
 
  <listitem>
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>
392
 
  </listitem>
393
 
</itemizedlist></para>
394
 
<para>
395
 
</para><variablelist role="params">
396
 
<varlistentry><term><parameter>actor</parameter>&#160;:</term>
397
 
<listitem><simpara> A source <link linkend="ClutterActor"><type>ClutterActor</type></link>
398
 
</simpara></listitem></varlistentry>
399
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</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.
400
 
 
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 ())
406
 
</programlisting>
407
 
<para>
408
 
Error domain for <link linkend="ClutterTexture"><type>ClutterTexture</type></link> errors</para>
409
 
<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;
418
 
</programlisting>
419
 
<para>
420
 
Error enumeration for <link linkend="ClutterTexture"><type>ClutterTexture</type></link></para>
421
 
<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>
427
 
</varlistentry>
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
431
 
  found
432
 
</simpara></listitem>
433
 
</varlistentry>
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>
440
 
</varlistentry>
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>
447
 
<para>
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.
450
 
</para>
451
 
<para>
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>
458
 
<para>
459
 
</para><variablelist role="params">
460
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
461
 
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
462
 
</simpara></listitem></varlistentry>
463
 
<varlistentry><term><parameter>filename</parameter>&#160;:</term>
464
 
<listitem><simpara> The filename of the image in GLib file name encoding
465
 
</simpara></listitem></varlistentry>
466
 
<varlistentry><term><parameter>error</parameter>&#160;:</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>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the image was successfully loaded and set
470
 
 
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>
484
 
<para>
485
 
Sets <link linkend="ClutterTexture"><type>ClutterTexture</type></link> image data.</para>
486
 
<para>
487
 
</para><variablelist role="params">
488
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
489
 
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
490
 
</simpara></listitem></varlistentry>
491
 
<varlistentry><term><parameter>data</parameter>&#160;:</term>
492
 
<listitem><simpara> Image data in RGBA type colorspace.
493
 
</simpara></listitem></varlistentry>
494
 
<varlistentry><term><parameter>has_alpha</parameter>&#160;:</term>
495
 
<listitem><simpara> Set to TRUE if image data has an alpha channel.
496
 
</simpara></listitem></varlistentry>
497
 
<varlistentry><term><parameter>width</parameter>&#160;:</term>
498
 
<listitem><simpara> Width in pixels of image data.
499
 
</simpara></listitem></varlistentry>
500
 
<varlistentry><term><parameter>height</parameter>&#160;:</term>
501
 
<listitem><simpara> Height in pixels of image data
502
 
</simpara></listitem></varlistentry>
503
 
<varlistentry><term><parameter>rowstride</parameter>&#160;:</term>
504
 
<listitem><simpara> Distance in bytes between row starts.
505
 
</simpara></listitem></varlistentry>
506
 
<varlistentry><term><parameter>bpp</parameter>&#160;:</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>&#160;:</term>
511
 
<listitem><simpara> <link linkend="ClutterTextureFlags"><type>ClutterTextureFlags</type></link>
512
 
</simpara></listitem></varlistentry>
513
 
<varlistentry><term><parameter>error</parameter>&#160;:</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>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> on success, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> on failure.
517
 
 
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>
528
 
<para>
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>
531
 
<para>
532
 
</para><variablelist role="params">
533
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
534
 
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
535
 
</simpara></listitem></varlistentry>
536
 
<varlistentry><term><parameter>data</parameter>&#160;:</term>
537
 
<listitem><simpara> Image data in YUV type colorspace.
538
 
</simpara></listitem></varlistentry>
539
 
<varlistentry><term><parameter>width</parameter>&#160;:</term>
540
 
<listitem><simpara> Width in pixels of image data.
541
 
</simpara></listitem></varlistentry>
542
 
<varlistentry><term><parameter>height</parameter>&#160;:</term>
543
 
<listitem><simpara> Height in pixels of image data
544
 
</simpara></listitem></varlistentry>
545
 
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
546
 
<listitem><simpara> <link linkend="ClutterTextureFlags"><type>ClutterTextureFlags</type></link>
547
 
</simpara></listitem></varlistentry>
548
 
<varlistentry><term><parameter>error</parameter>&#160;:</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>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the texture was successfully updated
552
 
 
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>
569
 
<para>
570
 
Updates a sub-region of the pixel data in a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>.</para>
571
 
<para>
572
 
</para><variablelist role="params">
573
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
574
 
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
575
 
</simpara></listitem></varlistentry>
576
 
<varlistentry><term><parameter>data</parameter>&#160;:</term>
577
 
<listitem><simpara> Image data in RGB type colorspace.
578
 
</simpara></listitem></varlistentry>
579
 
<varlistentry><term><parameter>has_alpha</parameter>&#160;:</term>
580
 
<listitem><simpara> Set to TRUE if image data has an alpha channel.
581
 
</simpara></listitem></varlistentry>
582
 
<varlistentry><term><parameter>x</parameter>&#160;:</term>
583
 
<listitem><simpara> X coordinate of upper left corner of region to update.
584
 
</simpara></listitem></varlistentry>
585
 
<varlistentry><term><parameter>y</parameter>&#160;:</term>
586
 
<listitem><simpara> Y coordinate of upper left corner of region to update.
587
 
</simpara></listitem></varlistentry>
588
 
<varlistentry><term><parameter>width</parameter>&#160;:</term>
589
 
<listitem><simpara> Width in pixels of region to update.
590
 
</simpara></listitem></varlistentry>
591
 
<varlistentry><term><parameter>height</parameter>&#160;:</term>
592
 
<listitem><simpara> Height in pixels of region to update.
593
 
</simpara></listitem></varlistentry>
594
 
<varlistentry><term><parameter>rowstride</parameter>&#160;:</term>
595
 
<listitem><simpara> Distance in bytes between row starts on source buffer.
596
 
</simpara></listitem></varlistentry>
597
 
<varlistentry><term><parameter>bpp</parameter>&#160;:</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>&#160;:</term>
602
 
<listitem><simpara> <link linkend="ClutterTextureFlags"><type>ClutterTextureFlags</type></link>
603
 
</simpara></listitem></varlistentry>
604
 
<varlistentry><term><parameter>error</parameter>&#160;:</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>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> on success, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> on failure.
608
 
 
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>
616
 
<para>
617
 
Gets the size in pixels of the untransformed underlying image</para>
618
 
<para>
619
 
</para><variablelist role="params">
620
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
621
 
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
622
 
</simpara></listitem></varlistentry>
623
 
<varlistentry><term><parameter>width</parameter>&#160;:</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>&#160;:</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>
631
 
<para>
632
 
Retrieves the pixel format used by <parameter>texture</parameter>. This is
633
 
equivalent to:
634
 
</para>
635
 
<para>
636
 
<informalexample><programlisting>
637
 
  handle = clutter_texture_get_pixel_format (texture);
638
 
 
639
 
  if (handle != COGL_INVALID_HANDLE)
640
 
    format = cogl_texture_get_format (handle);
641
 
</programlisting></informalexample></para>
642
 
<para>
643
 
</para><variablelist role="params">
644
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
645
 
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
646
 
</simpara></listitem></varlistentry>
647
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="CoglPixelFormat"><type>CoglPixelFormat</type></link> value
648
 
 
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>
654
 
<para>
655
 
Gets the maximum waste that will be used when creating a texture or
656
 
-1 if slicing is disabled.</para>
657
 
<para>
658
 
</para><variablelist role="params">
659
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
660
 
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
661
 
</simpara></listitem></varlistentry>
662
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The maximum waste or -1 if the texture waste is
663
 
  unlimited.
664
 
 
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>
671
 
<para>
672
 
Gets the filter quality used when scaling a texture.</para>
673
 
<para>
674
 
</para><variablelist role="params">
675
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
676
 
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
677
 
</simpara></listitem></varlistentry>
678
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The filter quality value.
679
 
 
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>
686
 
<para>
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>
695
 
<para>
696
 
</para><variablelist role="params">
697
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
698
 
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
699
 
</simpara></listitem></varlistentry>
700
 
<varlistentry><term><parameter>filter_quality</parameter>&#160;:</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>
707
 
<para>
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.
711
 
</para>
712
 
<para>
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>
717
 
<para>
718
 
</para><variablelist role="params">
719
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
720
 
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
721
 
</simpara></listitem></varlistentry>
722
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</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>
729
 
<para>
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.
733
 
</para>
734
 
<para>
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>
740
 
<para>
741
 
</para><variablelist role="params">
742
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
743
 
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
744
 
</simpara></listitem></varlistentry>
745
 
<varlistentry><term><parameter>cogl_tex</parameter>&#160;:</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>
752
 
<para>
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>
756
 
<para>
757
 
</para><variablelist role="params">
758
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
759
 
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
760
 
</simpara></listitem></varlistentry>
761
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</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>
768
 
<para>
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
776
 
function.</para>
777
 
<para>
778
 
</para><variablelist role="params">
779
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
780
 
<listitem><simpara> A <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
781
 
</simpara></listitem></varlistentry>
782
 
<varlistentry><term><parameter>cogl_material</parameter>&#160;:</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>
789
 
<para>
790
 
Retrieves the value set with <link linkend="clutter-texture-get-sync-size"><function>clutter_texture_get_sync_size()</function></link></para>
791
 
<para>
792
 
</para><variablelist role="params">
793
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
794
 
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
795
 
</simpara></listitem></varlistentry>
796
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</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
798
 
 
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>
805
 
<para>
806
 
Sets whether <parameter>texture</parameter> should have the same preferred size as the
807
 
underlying image data.</para>
808
 
<para>
809
 
</para><variablelist role="params">
810
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
811
 
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
812
 
</simpara></listitem></varlistentry>
813
 
<varlistentry><term><parameter>sync_size</parameter>&#160;:</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>
823
 
<para>
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>
826
 
<para>
827
 
</para><variablelist role="params">
828
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
829
 
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
830
 
</simpara></listitem></varlistentry>
831
 
<varlistentry><term><parameter>repeat_x</parameter>&#160;:</term>
832
 
<listitem><simpara> return location for the horizontal repeat. <acronym>out</acronym>. </simpara></listitem></varlistentry>
833
 
<varlistentry><term><parameter>repeat_y</parameter>&#160;:</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>
841
 
<para>
842
 
Sets whether the <parameter>texture</parameter> should repeat horizontally or
843
 
vertically when the actor size is bigger than the image size</para>
844
 
<para>
845
 
</para><variablelist role="params">
846
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
847
 
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
848
 
</simpara></listitem></varlistentry>
849
 
<varlistentry><term><parameter>repeat_x</parameter>&#160;:</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>&#160;:</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>
860
 
<para>
861
 
Retrieves the value set using <link linkend="clutter-texture-get-keep-aspect-ratio"><function>clutter_texture_get_keep_aspect_ratio()</function></link></para>
862
 
<para>
863
 
</para><variablelist role="params">
864
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
865
 
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
866
 
</simpara></listitem></varlistentry>
867
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</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
869
 
 
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>
877
 
<para>
878
 
Sets whether <parameter>texture</parameter> should have a preferred size maintaining
879
 
the aspect ratio of the underlying image</para>
880
 
<para>
881
 
</para><variablelist role="params">
882
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
883
 
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
884
 
</simpara></listitem></varlistentry>
885
 
<varlistentry><term><parameter>keep_aspect</parameter>&#160;:</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>
892
 
<para>
893
 
Retrieves the value set using <link linkend="clutter-texture-get-load-async"><function>clutter_texture_get_load_async()</function></link></para>
894
 
<para>
895
 
</para><variablelist role="params">
896
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
897
 
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
898
 
</simpara></listitem></varlistentry>
899
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</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
900
 
  disk asynchronously
901
 
 
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>
908
 
<para>
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.
912
 
</para>
913
 
<para>
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>
916
 
<para>
917
 
</para><variablelist role="params">
918
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
919
 
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
920
 
</simpara></listitem></varlistentry>
921
 
<varlistentry><term><parameter>load_async</parameter>&#160;:</term>
922
 
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the texture should asynchronously load data
923
 
  from a filename
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>
929
 
<para>
930
 
Retrieves the value set by <link linkend="clutter-texture-set-load-data-async"><function>clutter_texture_set_load_data_async()</function></link></para>
931
 
<para>
932
 
</para><variablelist role="params">
933
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
934
 
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
935
 
</simpara></listitem></varlistentry>
936
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</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
938
 
 
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>
945
 
<para>
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.
950
 
</para>
951
 
<para>
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>
954
 
<para>
955
 
</para><variablelist role="params">
956
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
957
 
<listitem><simpara> a <link linkend="ClutterTexture"><type>ClutterTexture</type></link>
958
 
</simpara></listitem></varlistentry>
959
 
<varlistentry><term><parameter>load_async</parameter>&#160;:</term>
960
 
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the texture should asynchronously load data
961
 
  from a filename
962
 
</simpara></listitem></varlistentry>
963
 
</variablelist><para role="since">Since 1.0</para></refsect2>
964
 
 
965
 
</refsect1>
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>&quot;cogl-material&quot;</literal> property</title>
969
 
<indexterm zone="ClutterTexture--cogl-material"><primary sortas="Texture:cogl-material">ClutterTexture:cogl-material</primary></indexterm><programlisting>  &quot;cogl-material&quot;            <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>&quot;cogl-texture&quot;</literal> property</title>
972
 
<indexterm zone="ClutterTexture--cogl-texture"><primary sortas="Texture:cogl-texture">ClutterTexture:cogl-texture</primary></indexterm><programlisting>  &quot;cogl-texture&quot;             <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>&quot;disable-slicing&quot;</literal> property</title>
975
 
<indexterm zone="ClutterTexture--disable-slicing"><primary sortas="Texture:disable-slicing">ClutterTexture:disable-slicing</primary></indexterm><programlisting>  &quot;disable-slicing&quot;          <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>
977
 
</refsect2>
978
 
<refsect2 id="ClutterTexture--filename" role="property"><title>The <literal>&quot;filename&quot;</literal> property</title>
979
 
<indexterm zone="ClutterTexture--filename"><primary sortas="Texture:filename">ClutterTexture:filename</primary></indexterm><programlisting>  &quot;filename&quot;                 <link linkend="gchar">gchar</link>*                : Write</programlisting>
980
 
<para>The full path of the file containing the texture.</para><para>Default value: NULL</para>
981
 
</refsect2>
982
 
<refsect2 id="ClutterTexture--filter-quality" role="property"><title>The <literal>&quot;filter-quality&quot;</literal> property</title>
983
 
<indexterm zone="ClutterTexture--filter-quality"><primary sortas="Texture:filter-quality">ClutterTexture:filter-quality</primary></indexterm><programlisting>  &quot;filter-quality&quot;           <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>
985
 
</refsect2>
986
 
<refsect2 id="ClutterTexture--keep-aspect-ratio" role="property"><title>The <literal>&quot;keep-aspect-ratio&quot;</literal> property</title>
987
 
<indexterm zone="ClutterTexture--keep-aspect-ratio"><primary sortas="Texture:keep-aspect-ratio">ClutterTexture:keep-aspect-ratio</primary></indexterm><programlisting>  &quot;keep-aspect-ratio&quot;        <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>
989
 
</refsect2>
990
 
<refsect2 id="ClutterTexture--load-async" role="property"><title>The <literal>&quot;load-async&quot;</literal> property</title>
991
 
<indexterm zone="ClutterTexture--load-async" role="1.0"><primary sortas="Texture:load-async">ClutterTexture:load-async</primary></indexterm><programlisting>  &quot;load-async&quot;               <link linkend="gboolean">gboolean</link>              : Write</programlisting>
992
 
<para>
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.
998
 
</para>
999
 
<para>
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
1002
 
the image.
1003
 
</para>
1004
 
<para>
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>
1008
 
<para>
1009
 
</para><para>Default value: FALSE</para>
1010
 
<para>Since 1.0</para>
1011
 
</refsect2>
1012
 
<refsect2 id="ClutterTexture--load-data-async" role="property"><title>The <literal>&quot;load-data-async&quot;</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>  &quot;load-data-async&quot;          <link linkend="gboolean">gboolean</link>              : Write</programlisting>
1014
 
<para>
1015
 
Like <link linkend="ClutterTexture--load-async"><type>"load-async"</type></link> but loads the width and height
1016
 
synchronously causing some blocking.</para>
1017
 
<para>
1018
 
</para><para>Default value: FALSE</para>
1019
 
<para>Since 1.0</para>
1020
 
</refsect2>
1021
 
<refsect2 id="ClutterTexture--pixel-format" role="property"><title>The <literal>&quot;pixel-format&quot;</literal> property</title>
1022
 
<indexterm zone="ClutterTexture--pixel-format"><primary sortas="Texture:pixel-format">ClutterTexture:pixel-format</primary></indexterm><programlisting>  &quot;pixel-format&quot;             <link linkend="CoglPixelFormat">CoglPixelFormat</link>       : Read</programlisting>
1023
 
<para>CoglPixelFormat to use.</para><para>Default value: COGL_PIXEL_FORMAT_RGBA_8888</para>
1024
 
</refsect2>
1025
 
<refsect2 id="ClutterTexture--repeat-x" role="property"><title>The <literal>&quot;repeat-x&quot;</literal> property</title>
1026
 
<indexterm zone="ClutterTexture--repeat-x"><primary sortas="Texture:repeat-x">ClutterTexture:repeat-x</primary></indexterm><programlisting>  &quot;repeat-x&quot;                 <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>
1028
 
</refsect2>
1029
 
<refsect2 id="ClutterTexture--repeat-y" role="property"><title>The <literal>&quot;repeat-y&quot;</literal> property</title>
1030
 
<indexterm zone="ClutterTexture--repeat-y"><primary sortas="Texture:repeat-y">ClutterTexture:repeat-y</primary></indexterm><programlisting>  &quot;repeat-y&quot;                 <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>
1032
 
</refsect2>
1033
 
<refsect2 id="ClutterTexture--sync-size" role="property"><title>The <literal>&quot;sync-size&quot;</literal> property</title>
1034
 
<indexterm zone="ClutterTexture--sync-size"><primary sortas="Texture:sync-size">ClutterTexture:sync-size</primary></indexterm><programlisting>  &quot;sync-size&quot;                <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>
1036
 
</refsect2>
1037
 
<refsect2 id="ClutterTexture--tile-waste" role="property"><title>The <literal>&quot;tile-waste&quot;</literal> property</title>
1038
 
<indexterm zone="ClutterTexture--tile-waste"><primary sortas="Texture:tile-waste">ClutterTexture:tile-waste</primary></indexterm><programlisting>  &quot;tile-waste&quot;               <link linkend="gint">gint</link>                  : Read</programlisting>
1039
 
<para>Maximum waste area of a sliced texture.</para><para>Allowed values: &gt;= -1</para>
1040
 
<para>Default value: 127</para>
1041
 
</refsect2>
1042
 
</refsect1>
1043
 
 
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>&quot;load-finished&quot;</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>
1050
 
<para>
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>
1054
 
<para>
1055
 
</para><variablelist role="params">
1056
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
1057
 
<listitem><simpara> the texture which received the signal
1058
 
</simpara></listitem></varlistentry>
1059
 
<varlistentry><term><parameter>error</parameter>&#160;:</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>&#160;:</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>&quot;pixbuf-change&quot;</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>
1067
 
<para>
1068
 
The ::pixbuf-change signal is emitted each time the pixbuf
1069
 
used by <parameter>texture</parameter> changes.</para>
1070
 
<para>
1071
 
</para><variablelist role="params">
1072
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
1073
 
<listitem><simpara> the texture which received the signal
1074
 
</simpara></listitem></varlistentry>
1075
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</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>&quot;size-change&quot;</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>
1082
 
<para>
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>
1086
 
<para>
1087
 
</para><variablelist role="params">
1088
 
<varlistentry><term><parameter>texture</parameter>&#160;:</term>
1089
 
<listitem><simpara> the texture which received the signal
1090
 
</simpara></listitem></varlistentry>
1091
 
<varlistentry><term><parameter>width</parameter>&#160;:</term>
1092
 
<listitem><simpara> the width of the new texture
1093
 
</simpara></listitem></varlistentry>
1094
 
<varlistentry><term><parameter>height</parameter>&#160;:</term>
1095
 
<listitem><simpara> the height of the new texture
1096
 
</simpara></listitem></varlistentry>
1097
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
1098
 
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
1099
 
</variablelist></refsect2>
1100
 
</refsect1>
1101
 
 
1102
 
 
1103
 
 
1104
 
</refentry>