This file is indexed.

/usr/share/gtk-doc/html/clutter/ClutterImage.html is in libclutter-1.0-doc 1.16.4-0ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Clutter Reference Manual: ClutterImage</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Clutter Reference Manual">
<link rel="up" href="ch07.html" title="Content">
<link rel="prev" href="ClutterCanvas.html" title="ClutterCanvas">
<link rel="next" href="ch08.html" title="Paint Objects">
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
                  <a href="#ClutterImage.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
                  <a href="#ClutterImage.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span> 
                  <a href="#ClutterImage.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch07.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ClutterCanvas.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ch08.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="ClutterImage"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="ClutterImage.top_of_page"></a>ClutterImage</span></h2>
<p>ClutterImage — Image data content</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="ClutterImage.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="ClutterImage.html#CLUTTER-IMAGE-ERROR:CAPS" title="CLUTTER_IMAGE_ERROR">CLUTTER_IMAGE_ERROR</a></td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="ClutterContent.html" title="ClutterContent"><span class="returnvalue">ClutterContent</span></a> *
</td>
<td class="function_name">
<a class="link" href="ClutterImage.html#clutter-image-new" title="clutter_image_new ()">clutter_image_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ClutterImage.html#clutter-image-set-data" title="clutter_image_set_data ()">clutter_image_set_data</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ClutterImage.html#clutter-image-set-bytes" title="clutter_image_set_bytes ()">clutter_image_set_bytes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ClutterImage.html#clutter-image-set-area" title="clutter_image_set_area ()">clutter_image_set_area</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">CoglTexture</span> *
</td>
<td class="function_name">
<a class="link" href="ClutterImage.html#clutter-image-get-texture" title="clutter_image_get_texture ()">clutter_image_get_texture</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterImage.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="ClutterImage.html#ClutterImage-struct" title="struct ClutterImage">ClutterImage</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="ClutterImage.html#ClutterImageClass" title="struct ClutterImageClass">ClutterImageClass</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="ClutterImage.html#ClutterImageError" title="enum ClutterImageError">ClutterImageError</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterImage.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> ClutterImage
</pre>
</div>
<div class="refsect1">
<a name="ClutterImage.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
ClutterImage implements
 <a class="link" href="ClutterContent.html" title="ClutterContent">ClutterContent</a>.</p>
</div>
<div class="refsect1">
<a name="ClutterImage.description"></a><h2>Description</h2>
<p><a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a> is a <a class="link" href="ClutterContent.html" title="ClutterContent"><span class="type">ClutterContent</span></a> implementation that displays
image data.</p>
<div class="informalexample"><pre class="programlisting">
#include &lt;stdlib.h&gt;
#include &lt;gdk-pixbuf/gdk-pixbuf.h&gt;
#include &lt;clutter/clutter.h&gt;

static const struct {
  ClutterContentGravity gravity;
  const char *name;
} gravities[] = {
  { CLUTTER_CONTENT_GRAVITY_TOP_LEFT, "Top Left" },
  { CLUTTER_CONTENT_GRAVITY_TOP, "Top" },
  { CLUTTER_CONTENT_GRAVITY_TOP_RIGHT, "Top Right" },

  { CLUTTER_CONTENT_GRAVITY_LEFT, "Left" },
  { CLUTTER_CONTENT_GRAVITY_CENTER, "Center" },
  { CLUTTER_CONTENT_GRAVITY_RIGHT, "Right" },

  { CLUTTER_CONTENT_GRAVITY_BOTTOM_LEFT, "Bottom Left" },
  { CLUTTER_CONTENT_GRAVITY_BOTTOM, "Bottom" },
  { CLUTTER_CONTENT_GRAVITY_BOTTOM_RIGHT, "Bottom Right" },

  { CLUTTER_CONTENT_GRAVITY_RESIZE_FILL, "Resize Fill" },
  { CLUTTER_CONTENT_GRAVITY_RESIZE_ASPECT, "Resize Aspect" },
};

static int n_gravities = G_N_ELEMENTS (gravities);
static int cur_gravity = 0;

static void
on_tap (ClutterTapAction *action,
        ClutterActor     *actor,
        ClutterText      *label)
{
  gchar *str;

  clutter_actor_save_easing_state (actor);
  clutter_actor_set_content_gravity (actor, gravities[cur_gravity].gravity);
  clutter_actor_restore_easing_state (actor);

  str = g_strconcat ("Content gravity: ", gravities[cur_gravity].name, NULL);
  clutter_text_set_text (label, str);
  g_free (str);

  cur_gravity += 1;

  if (cur_gravity &gt;= n_gravities)
    cur_gravity = 0;
}

int
main (int argc, char *argv[])
{
  ClutterActor *stage, *text;
  ClutterContent *image;
  ClutterAction *action;
  GdkPixbuf *pixbuf;
  gchar *str;

  if (clutter_init (&amp;argc, &amp;argv) != CLUTTER_INIT_SUCCESS)
    return EXIT_FAILURE;

  stage = clutter_stage_new ();
  clutter_actor_set_name (stage, "Stage");
  clutter_stage_set_title (CLUTTER_STAGE (stage), "Content Box");
  clutter_stage_set_user_resizable (CLUTTER_STAGE (stage), TRUE);
  g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
  clutter_actor_set_margin_top (stage, 12);
  clutter_actor_set_margin_right (stage, 12);
  clutter_actor_set_margin_bottom (stage, 12);
  clutter_actor_set_margin_left (stage, 12);
  clutter_actor_show (stage);

  pixbuf = gdk_pixbuf_new_from_file (TESTS_DATADIR G_DIR_SEPARATOR_S "redhand.png", NULL);
  image = clutter_image_new ();
  clutter_image_set_data (CLUTTER_IMAGE (image),
                          gdk_pixbuf_get_pixels (pixbuf),
                          gdk_pixbuf_get_has_alpha (pixbuf)
                            ? COGL_PIXEL_FORMAT_RGBA_8888
                            : COGL_PIXEL_FORMAT_RGB_888,
                          gdk_pixbuf_get_width (pixbuf),
                          gdk_pixbuf_get_height (pixbuf),
                          gdk_pixbuf_get_rowstride (pixbuf),
                          NULL);
  g_object_unref (pixbuf);

  clutter_actor_set_content_scaling_filters (stage,
                                             CLUTTER_SCALING_FILTER_TRILINEAR,
                                             CLUTTER_SCALING_FILTER_LINEAR);
  clutter_actor_set_content_gravity (stage, gravities[n_gravities - 1].gravity);
  clutter_actor_set_content (stage, image);
  g_object_unref (image);

  str = g_strconcat ("Content gravity: ",
                     gravities[n_gravities - 1].name,
                     NULL);

  text = clutter_text_new ();
  clutter_text_set_text (CLUTTER_TEXT (text), str);
  clutter_actor_add_constraint (text, clutter_align_constraint_new (stage, CLUTTER_ALIGN_BOTH, 0.5));
  clutter_actor_add_child (stage, text);

  g_free (str);

  action = clutter_tap_action_new ();
  g_signal_connect (action, "tap", G_CALLBACK (on_tap), text);
  clutter_actor_add_action (stage, action);

  clutter_main ();

  return EXIT_SUCCESS;
}

</pre></div>
<p><a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a> is available since Clutter 1.10.</p>
</div>
<div class="refsect1">
<a name="ClutterImage.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="CLUTTER-IMAGE-ERROR:CAPS"></a><h3>CLUTTER_IMAGE_ERROR</h3>
<pre class="programlisting">#define CLUTTER_IMAGE_ERROR             (clutter_image_error_quark ())
</pre>
<p>Error domain for the <a class="link" href="ClutterImage.html#ClutterImageError" title="enum ClutterImageError"><span class="type">ClutterImageError</span></a> enumeration.</p>
<p class="since">Since 1.10</p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-image-new"></a><h3>clutter_image_new ()</h3>
<pre class="programlisting"><a class="link" href="ClutterContent.html" title="ClutterContent"><span class="returnvalue">ClutterContent</span></a> *
clutter_image_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new <a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a> instance.</p>
<div class="refsect3">
<a name="id-1.5.8.3.8.3.5"></a><h4>Returns</h4>
<p> the newly created <a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a> instance.
Use <code class="function">g_object_unref()</code> when done. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since 1.10</p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-image-set-data"></a><h3>clutter_image_set_data ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
clutter_image_set_data (<em class="parameter"><code><a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a> *image</code></em>,
                        <em class="parameter"><code>const <span class="type">guint8</span> *data</code></em>,
                        <em class="parameter"><code><span class="type">CoglPixelFormat</span> pixel_format</code></em>,
                        <em class="parameter"><code><span class="type">guint</span> width</code></em>,
                        <em class="parameter"><code><span class="type">guint</span> height</code></em>,
                        <em class="parameter"><code><span class="type">guint</span> row_stride</code></em>,
                        <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Sets the image data to be displayed by <em class="parameter"><code>image</code></em>
.</p>
<p>If the image data was successfully loaded, the <em class="parameter"><code>image</code></em>
 will be invalidated.</p>
<p>In case of error, the <em class="parameter"><code>error</code></em>
 value will be set, and this function will
return <code class="literal">FALSE</code>.</p>
<p>The image data is copied in texture memory.</p>
<div class="refsect3">
<a name="id-1.5.8.3.8.4.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>image</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p> the image data, as an array of bytes. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>pixel_format</p></td>
<td class="parameter_description"><p>the Cogl pixel format of the image data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>the width of the image data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>the height of the image data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>row_stride</p></td>
<td class="parameter_description"><p>the length of each row inside <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for a <span class="type">GError</span>, or <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.8.3.8.4.9"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the image data was successfully loaded,
and <code class="literal">FALSE</code> otherwise.</p>
<p></p>
</div>
<p class="since">Since 1.10</p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-image-set-bytes"></a><h3>clutter_image_set_bytes ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
clutter_image_set_bytes (<em class="parameter"><code><a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a> *image</code></em>,
                         <em class="parameter"><code><span class="type">GBytes</span> *data</code></em>,
                         <em class="parameter"><code><span class="type">CoglPixelFormat</span> pixel_format</code></em>,
                         <em class="parameter"><code><span class="type">guint</span> width</code></em>,
                         <em class="parameter"><code><span class="type">guint</span> height</code></em>,
                         <em class="parameter"><code><span class="type">guint</span> row_stride</code></em>,
                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Sets the image data stored inside a <span class="type">GBytes</span> to be displayed by <em class="parameter"><code>image</code></em>
.</p>
<p>If the image data was successfully loaded, the <em class="parameter"><code>image</code></em>
 will be invalidated.</p>
<p>In case of error, the <em class="parameter"><code>error</code></em>
 value will be set, and this function will
return <code class="literal">FALSE</code>.</p>
<p>The image data contained inside the <span class="type">GBytes</span> is copied in texture memory,
and no additional reference is acquired on the <em class="parameter"><code>data</code></em>
.</p>
<div class="refsect3">
<a name="id-1.5.8.3.8.5.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>image</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>the image data, as a <span class="type">GBytes</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pixel_format</p></td>
<td class="parameter_description"><p>the Cogl pixel format of the image data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>the width of the image data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>the height of the image data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>row_stride</p></td>
<td class="parameter_description"><p>the length of each row inside <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for a <span class="type">GError</span>, or <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.8.3.8.5.9"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the image data was successfully loaded,
and <code class="literal">FALSE</code> otherwise.</p>
<p></p>
</div>
<p class="since">Since 1.12</p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-image-set-area"></a><h3>clutter_image_set_area ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
clutter_image_set_area (<em class="parameter"><code><a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a> *image</code></em>,
                        <em class="parameter"><code>const <span class="type">guint8</span> *data</code></em>,
                        <em class="parameter"><code><span class="type">CoglPixelFormat</span> pixel_format</code></em>,
                        <em class="parameter"><code>const <span class="type">cairo_rectangle_int_t</span> *rect</code></em>,
                        <em class="parameter"><code><span class="type">guint</span> row_stride</code></em>,
                        <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Sets the image data to be display by <em class="parameter"><code>image</code></em>
, using <em class="parameter"><code>rect</code></em>
 to indicate
the position and size of the image data to be set.</p>
<p>If the <em class="parameter"><code>image</code></em>
 does not have any image data set when this function is
called, a new texture will be created with the size of the width and
height of the rectangle, i.e. calling this function on a newly created
<a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a> will be the equivalent of calling <a class="link" href="ClutterImage.html#clutter-image-set-data" title="clutter_image_set_data ()"><code class="function">clutter_image_set_data()</code></a>.</p>
<p>If the image data was successfully loaded, the <em class="parameter"><code>image</code></em>
 will be invalidated.</p>
<p>In case of error, the <em class="parameter"><code>error</code></em>
 value will be set, and this function will
return <code class="literal">FALSE</code>.</p>
<p>The image data is copied in texture memory.</p>
<div class="refsect3">
<a name="id-1.5.8.3.8.6.9"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>image</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p> the image data, as an array of bytes. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>pixel_format</p></td>
<td class="parameter_description"><p>the Cogl pixel format of the image data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>rect</p></td>
<td class="parameter_description"><p>a rectangle indicating the area that should be set</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>row_stride</p></td>
<td class="parameter_description"><p>the length of each row inside <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for a <span class="type">GError</span>, or <code class="literal">NULL</code></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.8.3.8.6.10"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the image data was successfully loaded,
and <code class="literal">FALSE</code> otherwise.</p>
<p></p>
</div>
<p class="since">Since 1.10</p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-image-get-texture"></a><h3>clutter_image_get_texture ()</h3>
<pre class="programlisting"><span class="returnvalue">CoglTexture</span> *
clutter_image_get_texture (<em class="parameter"><code><a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a> *image</code></em>);</pre>
<p>Retrieves a pointer to the Cogl texture used by <em class="parameter"><code>image</code></em>
.</p>
<p>If you change the contents of the returned Cogl texture you will need
to manually invalidate the <em class="parameter"><code>image</code></em>
 with <a class="link" href="ClutterContent.html#clutter-content-invalidate" title="clutter_content_invalidate ()"><code class="function">clutter_content_invalidate()</code></a>
in order to update the actors using <em class="parameter"><code>image</code></em>
 as their content.</p>
<div class="refsect3">
<a name="id-1.5.8.3.8.7.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>image</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.8.3.8.7.7"></a><h4>Returns</h4>
<p> a pointer to the Cogl texture, or <code class="literal">NULL</code>. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since 1.10</p>
<p class="stability">Stability Level: Unstable</p>
</div>
</div>
<div class="refsect1">
<a name="ClutterImage.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="ClutterImage-struct"></a><h3>struct ClutterImage</h3>
<pre class="programlisting">struct ClutterImage;</pre>
<p>The <span class="structname">ClutterImage</span> structure contains
private data and should only be accessed using the provided
API.</p>
<p class="since">Since 1.10</p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterImageClass"></a><h3>struct ClutterImageClass</h3>
<pre class="programlisting">struct ClutterImageClass {
};
</pre>
<p>The <span class="structname">ClutterImageClass</span> structure contains
private data.</p>
<p class="since">Since 1.10</p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterImageError"></a><h3>enum ClutterImageError</h3>
<p>Error enumeration for <a class="link" href="ClutterImage.html" title="ClutterImage"><span class="type">ClutterImage</span></a>.</p>
<div class="refsect3">
<a name="id-1.5.8.3.9.4.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody><tr>
<td class="enum_member_name"><p><a name="CLUTTER-IMAGE-ERROR-INVALID-DATA:CAPS"></a>CLUTTER_IMAGE_ERROR_INVALID_DATA</p></td>
<td class="enum_member_description">
<p>Invalid data passed to the
  <a class="link" href="ClutterImage.html#clutter-image-set-data" title="clutter_image_set_data ()"><code class="function">clutter_image_set_data()</code></a> function.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since 1.10</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.20</div>
</body>
</html>