This file is indexed.

/usr/share/gtk-doc/html/clutter/ClutterBinLayout.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
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
<!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: ClutterBinLayout</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="ch03.html" title="Layout managers">
<link rel="prev" href="ClutterFixedLayout.html" title="ClutterFixedLayout">
<link rel="next" href="ClutterFlowLayout.html" title="ClutterFlowLayout">
<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="#ClutterBinLayout.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
                  <a href="#ClutterBinLayout.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> 
                  <a href="#ClutterBinLayout.properties" class="shortcut">Properties</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="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ClutterFixedLayout.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ClutterFlowLayout.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="ClutterBinLayout"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="ClutterBinLayout.top_of_page"></a>ClutterBinLayout</span></h2>
<p>ClutterBinLayout — A simple layout manager</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="ClutterBinLayout.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="ClutterLayoutManager.html" title="ClutterLayoutManager"><span class="returnvalue">ClutterLayoutManager</span></a> *
</td>
<td class="function_name">
<a class="link" href="ClutterBinLayout.html#clutter-bin-layout-new" title="clutter_bin_layout_new ()">clutter_bin_layout_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="ClutterBinLayout.html#clutter-bin-layout-set-alignment" title="clutter_bin_layout_set_alignment ()">clutter_bin_layout_set_alignment</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="ClutterBinLayout.html#clutter-bin-layout-get-alignment" title="clutter_bin_layout_get_alignment ()">clutter_bin_layout_get_alignment</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="ClutterBinLayout.html#clutter-bin-layout-add" title="clutter_bin_layout_add ()">clutter_bin_layout_add</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterBinLayout.properties"></a><h2>Properties</h2>
<div class="informaltable"><table border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><a class="link" href="ClutterBinLayout.html#ClutterBinAlignment" title="enum ClutterBinAlignment"><span class="type">ClutterBinAlignment</span></a></td>
<td class="property_name"><a class="link" href="ClutterBinLayout.html#ClutterBinLayout--x-align" title="The “x-align” property">x-align</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a class="link" href="ClutterBinLayout.html#ClutterBinAlignment" title="enum ClutterBinAlignment"><span class="type">ClutterBinAlignment</span></a></td>
<td class="property_name"><a class="link" href="ClutterBinLayout.html#ClutterBinLayout--y-align" title="The “y-align” property">y-align</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterBinLayout.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">enum</td>
<td class="function_name"><a class="link" href="ClutterBinLayout.html#ClutterBinAlignment" title="enum ClutterBinAlignment">ClutterBinAlignment</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="ClutterBinLayout.html#ClutterBinLayout-struct" title="struct ClutterBinLayout">ClutterBinLayout</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="ClutterBinLayout.html#ClutterBinLayoutClass" title="struct ClutterBinLayoutClass">ClutterBinLayoutClass</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ClutterBinLayout.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> GInitiallyUnowned
        <span class="lineart">╰──</span> <a class="link" href="ClutterLayoutManager.html" title="ClutterLayoutManager">ClutterLayoutManager</a>
            <span class="lineart">╰──</span> ClutterBinLayout
</pre>
</div>
<div class="refsect1">
<a name="ClutterBinLayout.description"></a><h2>Description</h2>
<p><a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a> is a layout manager which implements the following
policy:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">the preferred size is the maximum preferred size
  between all the children of the container using the
  layout;</li>
<li class="listitem">each child is allocated in "layers", on on top
  of the other;</li>
<li class="listitem">for each layer there are horizontal and vertical
  alignment policies.</li>
</ul></div>
<div class="figure">
<a name="bin-layout"></a><p class="title"><b>Figure 4. Bin layout</b></p>
<div class="figure-contents">
<p>The image shows a <a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a> with three layers:
  a background <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>, set to fill on both the X
  and Y axis; a <a class="link" href="ClutterTexture.html" title="ClutterTexture"><span class="type">ClutterTexture</span></a>, set to center on both the X and
  Y axis; and a <a class="link" href="ClutterRectangle.html" title="ClutterRectangle"><span class="type">ClutterRectangle</span></a>, set to <a class="link" href="ClutterBinLayout.html#CLUTTER-BIN-ALIGNMENT-END:CAPS"><code class="literal">CLUTTER_BIN_ALIGNMENT_END</code></a>
  on both the X and Y axis.</p>
<div><img src="bin-layout.png" alt="Bin layout"></div>
</div>
</div>
<br class="figure-break"><div class="example">
<a name="example-clutter-bin-layout"></a><p class="title"><b>Example 4. How to pack actors inside a BinLayout</b></p>
<div class="example-contents"><pre class="programlisting">
#include &lt;stdlib.h&gt;
#include &lt;cairo.h&gt;
#include &lt;gdk-pixbuf/gdk-pixbuf.h&gt;
#include &lt;clutter/clutter.h&gt;

static const ClutterColor bg_color = { 0xcc, 0xcc, 0xcc, 0x99 };

static gboolean is_expanded = FALSE;

static gboolean
on_canvas_draw (ClutterCanvas *canvas,
                cairo_t      *cr,
                gint          width,
                gint          height)
{
  cairo_pattern_t *pat;
  gfloat x, y;

  g_print (G_STRLOC ": Painting at %d x %d\n", width, height);

  cairo_save (cr);
  cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
  cairo_paint (cr);
  cairo_restore (cr);

#define BG_ROUND_RADIUS         12

  x = y = 0;

  cairo_move_to (cr, BG_ROUND_RADIUS, y);
  cairo_line_to (cr, width - BG_ROUND_RADIUS, y);
  cairo_curve_to (cr, width, y, width, y, width, BG_ROUND_RADIUS);
  cairo_line_to (cr, width, height - BG_ROUND_RADIUS);
  cairo_curve_to (cr, width, height, width, height, width - BG_ROUND_RADIUS, height);
  cairo_line_to (cr, BG_ROUND_RADIUS, height);
  cairo_curve_to (cr, x, height, x, height, x, height - BG_ROUND_RADIUS);
  cairo_line_to (cr, x, BG_ROUND_RADIUS);
  cairo_curve_to (cr, x, y, x, y, BG_ROUND_RADIUS, y);

  cairo_close_path (cr);

  clutter_cairo_set_source_color (cr, &amp;bg_color);
  cairo_stroke (cr);

  x += 4;
  y += 4;
  width -= 4;
  height -= 4;

  cairo_move_to (cr, BG_ROUND_RADIUS, y);
  cairo_line_to (cr, width - BG_ROUND_RADIUS, y);
  cairo_curve_to (cr, width, y, width, y, width, BG_ROUND_RADIUS);
  cairo_line_to (cr, width, height - BG_ROUND_RADIUS);
  cairo_curve_to (cr, width, height, width, height, width - BG_ROUND_RADIUS, height);
  cairo_line_to (cr, BG_ROUND_RADIUS, height);
  cairo_curve_to (cr, x, height, x, height, x, height - BG_ROUND_RADIUS);
  cairo_line_to (cr, x, BG_ROUND_RADIUS);
  cairo_curve_to (cr, x, y, x, y, BG_ROUND_RADIUS, y);

  cairo_close_path (cr);

  pat = cairo_pattern_create_linear (0, 0, 0, height);
  cairo_pattern_add_color_stop_rgba (pat, 1, .85, .85, .85, 1);
  cairo_pattern_add_color_stop_rgba (pat, .95, 1, 1, 1, 1);
  cairo_pattern_add_color_stop_rgba (pat, .05, 1, 1, 1, 1);
  cairo_pattern_add_color_stop_rgba (pat, 0, .85, .85, .85, 1);

  cairo_set_source (cr, pat);
  cairo_fill (cr);

  cairo_pattern_destroy (pat);

#undef BG_ROUND_RADIUS

  return TRUE;
}

static gboolean
on_box_enter (ClutterActor *box,
              ClutterEvent *event,
              ClutterActor *emblem)
{
  /* we ease the opacity linearly */
  clutter_actor_save_easing_state (emblem);
  clutter_actor_set_easing_mode (emblem, CLUTTER_LINEAR);
  clutter_actor_set_opacity (emblem, 255);
  clutter_actor_restore_easing_state (emblem);

  return CLUTTER_EVENT_STOP;
}

static gboolean
on_box_leave (ClutterActor *box,
              ClutterEvent *event,
              ClutterActor *emblem)
{
  clutter_actor_save_easing_state (emblem);
  clutter_actor_set_easing_mode (emblem, CLUTTER_LINEAR);
  clutter_actor_set_opacity (emblem, 0);
  clutter_actor_restore_easing_state (emblem);

  return CLUTTER_EVENT_STOP;
}

static void
on_emblem_clicked (ClutterClickAction *action,
                   ClutterActor       *emblem,
                   ClutterActor       *box)
{
  /* we add a little bounce to the resizing of the box */
  clutter_actor_save_easing_state (box);
  clutter_actor_set_easing_mode (box, CLUTTER_EASE_OUT_BOUNCE);
  clutter_actor_set_easing_duration (box, 500);

  if (!is_expanded)
    clutter_actor_set_size (box, 400, 400);
  else
    clutter_actor_set_size (box, 200, 200);

  clutter_actor_restore_easing_state (box);

  is_expanded = !is_expanded;
}

static gboolean
on_emblem_long_press (ClutterClickAction    *action,
                      ClutterActor          *emblem,
                      ClutterLongPressState  state,
                      ClutterActor          *box)
{
  switch (state)
    {
    case CLUTTER_LONG_PRESS_QUERY:
      g_print ("*** long press: query ***\n");
      return is_expanded;

    case CLUTTER_LONG_PRESS_CANCEL:
      g_print ("*** long press: cancel ***\n");
      break;

    case CLUTTER_LONG_PRESS_ACTIVATE:
      g_print ("*** long press: activate ***\n");
      break;
    }

  return TRUE;
}

static void
redraw_canvas (ClutterActor  *actor,
               ClutterCanvas *canvas)
{
  /* we want to invalidate the canvas and redraw its contents
   * only when the size changes at the end of the animation,
   * to avoid drawing all the states inbetween
   */
  clutter_canvas_set_size (canvas,
                           clutter_actor_get_width (actor),
                           clutter_actor_get_height (actor));
}

int
main (int argc, char *argv[])
{
  ClutterActor *stage, *box, *bg, *icon, *emblem, *label;
  ClutterLayoutManager *layout;
  ClutterContent *canvas, *image;
  ClutterColor *color;
  ClutterAction *action;
  GdkPixbuf *pixbuf;

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

  /* prepare the stage */
  stage = clutter_stage_new ();
  clutter_stage_set_title (CLUTTER_STAGE (stage), "BinLayout");
  clutter_actor_set_background_color (stage, CLUTTER_COLOR_Aluminium2);
  clutter_actor_set_size (stage, 640, 480);
  clutter_actor_show (stage);
  g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);

  /* this is our BinLayout, with its default alignments */
  layout = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_CENTER,
                                   CLUTTER_BIN_ALIGNMENT_CENTER);

  /* the main container; this actor will use the BinLayout to lay
   * out its children; we use the anchor point to keep it centered
   * on the same position even when we change its size
   */
  box = clutter_actor_new ();
  clutter_actor_set_layout_manager (box, layout);
  clutter_actor_add_constraint (box, clutter_align_constraint_new (stage, CLUTTER_ALIGN_BOTH, 0.5));
  clutter_actor_set_position (box, 320, 240);
  clutter_actor_set_reactive (box, TRUE);
  clutter_actor_set_name (box, "box");
  clutter_actor_add_child (stage, box);

  /* the background is drawn using a canvas content */
  canvas = clutter_canvas_new ();
  g_signal_connect (canvas, "draw", G_CALLBACK (on_canvas_draw), NULL);
  clutter_canvas_set_size (CLUTTER_CANVAS (canvas), 200, 200);

  /* this is the background actor; we want it to fill the whole
   * of the allocation given to it by its parent
   */
  bg = clutter_actor_new ();
  clutter_actor_set_name (bg, "background");
  clutter_actor_set_size (bg, 200, 200);
  clutter_actor_set_content (bg, canvas);
  clutter_actor_set_x_expand (bg, TRUE);
  clutter_actor_set_y_expand (bg, TRUE);
  clutter_actor_set_x_align (bg, CLUTTER_ACTOR_ALIGN_FILL);
  clutter_actor_set_y_align (bg, CLUTTER_ACTOR_ALIGN_FILL);
  clutter_actor_add_child (box, bg);
  /* we use the ::transitions-completed signal to get notification
   * of the end of the sizing animation; this allows us to redraw
   * the canvas only once the animation has stopped
   */
  g_signal_connect (box, "transitions-completed",
                    G_CALLBACK (redraw_canvas),
                    canvas);

  /* we use GdkPixbuf to load an image from our data directory */
  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);

  /* this is the icon; it's going to be centered inside the box actor.
   * we use the content gravity to keep the aspect ratio of the image,
   * and the scaling filters to get a better result when scaling the
   * image down.
   */
  icon = clutter_actor_new ();
  clutter_actor_set_name (icon, "icon");
  clutter_actor_set_size (icon, 196, 196);
  clutter_actor_set_x_expand (icon, TRUE);
  clutter_actor_set_y_expand (icon, TRUE);
  clutter_actor_set_x_align (icon, CLUTTER_ACTOR_ALIGN_CENTER);
  clutter_actor_set_y_align (icon, CLUTTER_ACTOR_ALIGN_CENTER);
  clutter_actor_set_content_gravity (icon, CLUTTER_CONTENT_GRAVITY_RESIZE_ASPECT);
  clutter_actor_set_content_scaling_filters (icon,
                                             CLUTTER_SCALING_FILTER_TRILINEAR,
                                             CLUTTER_SCALING_FILTER_LINEAR);
  clutter_actor_set_content (icon, image);
  clutter_actor_add_child (box, icon);

  color = clutter_color_new (g_random_int_range (0, 255),
                             g_random_int_range (0, 255),
                             g_random_int_range (0, 255),
                             224);

  /* this is the emblem: a small rectangle with a random color, that we
   * want to put in the bottom right corner
   */
  emblem = clutter_actor_new ();
  clutter_actor_set_name (emblem, "emblem");
  clutter_actor_set_size (emblem, 48, 48);
  clutter_actor_set_background_color (emblem, color);
  clutter_actor_set_x_expand (emblem, TRUE);
  clutter_actor_set_y_expand (emblem, TRUE);
  clutter_actor_set_x_align (emblem, CLUTTER_ACTOR_ALIGN_END);
  clutter_actor_set_y_align (emblem, CLUTTER_ACTOR_ALIGN_END);
  clutter_actor_set_reactive (emblem, TRUE);
  clutter_actor_set_opacity (emblem, 0);
  clutter_actor_add_child (box, emblem);
  clutter_color_free (color);

  /* when clicking on the emblem, we want to perform an action */
  action = clutter_click_action_new ();
  clutter_actor_add_action (emblem, action);
  g_signal_connect (action, "clicked", G_CALLBACK (on_emblem_clicked), box);
  g_signal_connect (action, "long-press", G_CALLBACK (on_emblem_long_press), box);

  /* whenever the pointer enters the box, we show the emblem; we hide
   * the emblem when the pointer leaves the box
   */
  g_signal_connect (box,
                    "enter-event", G_CALLBACK (on_box_enter),
                    emblem);
  g_signal_connect (box,
                    "leave-event", G_CALLBACK (on_box_leave),
                    emblem);

  /* a label, that we want to position at the top and center of the box */
  label = clutter_text_new ();
  clutter_actor_set_name (label, "text");
  clutter_text_set_text (CLUTTER_TEXT (label), "A simple test");
  clutter_actor_set_x_expand (label, TRUE);
  clutter_actor_set_x_align (label, CLUTTER_ACTOR_ALIGN_CENTER);
  clutter_actor_set_y_expand (label, TRUE);
  clutter_actor_set_y_align (label, CLUTTER_ACTOR_ALIGN_START);
  clutter_actor_add_child (box, label);

  clutter_main ();

  return EXIT_SUCCESS;
}

 </pre></div>
</div>
<br class="example-break"><p><a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a> is available since Clutter 1.2</p>
</div>
<div class="refsect1">
<a name="ClutterBinLayout.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="clutter-bin-layout-new"></a><h3>clutter_bin_layout_new ()</h3>
<pre class="programlisting"><a class="link" href="ClutterLayoutManager.html" title="ClutterLayoutManager"><span class="returnvalue">ClutterLayoutManager</span></a> *
clutter_bin_layout_new (<em class="parameter"><code><a class="link" href="ClutterBinLayout.html#ClutterBinAlignment" title="enum ClutterBinAlignment"><span class="type">ClutterBinAlignment</span></a> x_align</code></em>,
                        <em class="parameter"><code><a class="link" href="ClutterBinLayout.html#ClutterBinAlignment" title="enum ClutterBinAlignment"><span class="type">ClutterBinAlignment</span></a> y_align</code></em>);</pre>
<p>Creates a new <a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a> layout manager</p>
<div class="refsect3">
<a name="id-1.5.4.3.8.2.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>x_align</p></td>
<td class="parameter_description"><p>the default alignment policy to be used on the
horizontal axis</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y_align</p></td>
<td class="parameter_description"><p>the default alignment policy to be used on the
vertical axis</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.4.3.8.2.6"></a><h4>Returns</h4>
<p> the newly created layout manager</p>
<p></p>
</div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-bin-layout-set-alignment"></a><h3>clutter_bin_layout_set_alignment ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_bin_layout_set_alignment (<em class="parameter"><code><a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a> *self</code></em>,
                                  <em class="parameter"><code><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> *child</code></em>,
                                  <em class="parameter"><code><a class="link" href="ClutterBinLayout.html#ClutterBinAlignment" title="enum ClutterBinAlignment"><span class="type">ClutterBinAlignment</span></a> x_align</code></em>,
                                  <em class="parameter"><code><a class="link" href="ClutterBinLayout.html#ClutterBinAlignment" title="enum ClutterBinAlignment"><span class="type">ClutterBinAlignment</span></a> y_align</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_bin_layout_set_alignment</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
<p>Use the <a class="link" href="ClutterActor.html#ClutterActor--x-align" title="The “x-align” property"><span class="type">“x-align”</span></a> and
  <a class="link" href="ClutterActor.html#ClutterActor--y-align" title="The “y-align” property"><span class="type">“y-align”</span></a> properties of <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> instead.</p>
</div>
<p>Sets the horizontal and vertical alignment policies to be applied
to a <em class="parameter"><code>child</code></em>
 of <em class="parameter"><code>self</code></em>
</p>
<p>If <em class="parameter"><code>child</code></em>
 is <code class="literal">NULL</code> then the <em class="parameter"><code>x_align</code></em>
 and <em class="parameter"><code>y_align</code></em>
 values will
be set as the default alignment policies</p>
<div class="refsect3">
<a name="id-1.5.4.3.8.3.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>self</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>child</p></td>
<td class="parameter_description"><p> a child of <em class="parameter"><code>container</code></em>
. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>x_align</p></td>
<td class="parameter_description"><p>the horizontal alignment policy to be used for the <em class="parameter"><code>child</code></em>
inside <em class="parameter"><code>container</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y_align</p></td>
<td class="parameter_description"><p>the vertical aligment policy to be used on the <em class="parameter"><code>child</code></em>
inside <em class="parameter"><code>container</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-bin-layout-get-alignment"></a><h3>clutter_bin_layout_get_alignment ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_bin_layout_get_alignment (<em class="parameter"><code><a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a> *self</code></em>,
                                  <em class="parameter"><code><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> *child</code></em>,
                                  <em class="parameter"><code><a class="link" href="ClutterBinLayout.html#ClutterBinAlignment" title="enum ClutterBinAlignment"><span class="type">ClutterBinAlignment</span></a> *x_align</code></em>,
                                  <em class="parameter"><code><a class="link" href="ClutterBinLayout.html#ClutterBinAlignment" title="enum ClutterBinAlignment"><span class="type">ClutterBinAlignment</span></a> *y_align</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_bin_layout_get_alignment</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
<p>Use the <a class="link" href="ClutterActor.html#ClutterActor--x-align" title="The “x-align” property"><span class="type">“x-align”</span></a> and the
  <a class="link" href="ClutterActor.html#ClutterActor--y-align" title="The “y-align” property"><span class="type">“y-align”</span></a> properties of <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> instead.</p>
</div>
<p>Retrieves the horizontal and vertical alignment policies for
a child of <em class="parameter"><code>self</code></em>
</p>
<p>If <em class="parameter"><code>child</code></em>
 is <code class="literal">NULL</code> the default alignment policies will be returned
instead</p>
<div class="refsect3">
<a name="id-1.5.4.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>self</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>child</p></td>
<td class="parameter_description"><p> a child of <em class="parameter"><code>container</code></em>
. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>x_align</p></td>
<td class="parameter_description"><p> return location for the horizontal
alignment policy. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>y_align</p></td>
<td class="parameter_description"><p> return location for the vertical
alignment policy. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="clutter-bin-layout-add"></a><h3>clutter_bin_layout_add ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
clutter_bin_layout_add (<em class="parameter"><code><a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a> *self</code></em>,
                        <em class="parameter"><code><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> *child</code></em>,
                        <em class="parameter"><code><a class="link" href="ClutterBinLayout.html#ClutterBinAlignment" title="enum ClutterBinAlignment"><span class="type">ClutterBinAlignment</span></a> x_align</code></em>,
                        <em class="parameter"><code><a class="link" href="ClutterBinLayout.html#ClutterBinAlignment" title="enum ClutterBinAlignment"><span class="type">ClutterBinAlignment</span></a> y_align</code></em>);</pre>
<div class="warning">
<p><code class="literal">clutter_bin_layout_add</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
<p>Use <a class="link" href="ClutterActor.html#clutter-actor-add-child" title="clutter_actor_add_child ()"><code class="function">clutter_actor_add_child()</code></a> instead.</p>
</div>
<p>Adds a <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> to the container using <em class="parameter"><code>self</code></em>
 and
sets the alignment policies for it</p>
<p>This function is equivalent to <a class="link" href="ClutterContainer.html#clutter-container-add-actor" title="clutter_container_add_actor ()"><code class="function">clutter_container_add_actor()</code></a>
and <a class="link" href="ClutterLayoutManager.html#clutter-layout-manager-child-set-property" title="clutter_layout_manager_child_set_property ()"><code class="function">clutter_layout_manager_child_set_property()</code></a> but it does not
require a pointer to the <a class="link" href="ClutterContainer.html" title="ClutterContainer"><span class="type">ClutterContainer</span></a> associated to the
<a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a></p>
<div class="refsect3">
<a name="id-1.5.4.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>self</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>child</p></td>
<td class="parameter_description"><p>a <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>x_align</p></td>
<td class="parameter_description"><p>horizontal alignment policy for <em class="parameter"><code>child</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>y_align</p></td>
<td class="parameter_description"><p>vertical alignment policy for <em class="parameter"><code>child</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since 1.2</p>
</div>
</div>
<div class="refsect1">
<a name="ClutterBinLayout.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="ClutterBinAlignment"></a><h3>enum ClutterBinAlignment</h3>
<div class="warning">
<p><code class="literal">ClutterBinAlignment</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
<p>Use <a class="link" href="ClutterActor.html#ClutterActorAlign" title="enum ClutterActorAlign"><span class="type">ClutterActorAlign</span></a> and the <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a>
  API instead</p>
</div>
<p>The alignment policies available on each axis for <a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a></p>
<div class="refsect3">
<a name="id-1.5.4.3.9.2.6"></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-BIN-ALIGNMENT-FIXED:CAPS"></a>CLUTTER_BIN_ALIGNMENT_FIXED</p></td>
<td class="enum_member_description">
<p>Fixed position alignment; the
  <a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a> will honour the fixed position provided
  by the actors themselves when allocating them</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="CLUTTER-BIN-ALIGNMENT-FILL:CAPS"></a>CLUTTER_BIN_ALIGNMENT_FILL</p></td>
<td class="enum_member_description">
<p>Fill the allocation size</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="CLUTTER-BIN-ALIGNMENT-START:CAPS"></a>CLUTTER_BIN_ALIGNMENT_START</p></td>
<td class="enum_member_description">
<p>Position the actors at the top
  or left side of the container, depending on the axis</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="CLUTTER-BIN-ALIGNMENT-END:CAPS"></a>CLUTTER_BIN_ALIGNMENT_END</p></td>
<td class="enum_member_description">
<p>Position the actors at the bottom
  or right side of the container, depending on the axis</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="CLUTTER-BIN-ALIGNMENT-CENTER:CAPS"></a>CLUTTER_BIN_ALIGNMENT_CENTER</p></td>
<td class="enum_member_description">
<p>Position the actors at the
  center of the container, depending on the axis</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterBinLayout-struct"></a><h3>struct ClutterBinLayout</h3>
<pre class="programlisting">struct ClutterBinLayout;</pre>
<p>The <a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a> structure contains only private data
and should be accessed using the provided API</p>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterBinLayoutClass"></a><h3>struct ClutterBinLayoutClass</h3>
<pre class="programlisting">struct ClutterBinLayoutClass {
};
</pre>
<p>The <a class="link" href="ClutterBinLayout.html#ClutterBinLayoutClass" title="struct ClutterBinLayoutClass"><span class="type">ClutterBinLayoutClass</span></a> structure contains only private
data and should be accessed using the provided API</p>
<p class="since">Since 1.2</p>
</div>
</div>
<div class="refsect1">
<a name="ClutterBinLayout.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="ClutterBinLayout--x-align"></a><h3>The <code class="literal">“x-align”</code> property</h3>
<pre class="programlisting">  “x-align”                  <a class="link" href="ClutterBinLayout.html#ClutterBinAlignment" title="enum ClutterBinAlignment"><span class="type">ClutterBinAlignment</span></a></pre>
<p>The default horizontal alignment policy for actors managed
by the <a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a></p>
<div class="warning">
<p><code class="literal">ClutterBinLayout:x-align</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
<p>Use the <a class="link" href="ClutterActor.html#ClutterActor--x-expand" title="The “x-expand” property"><span class="type">“x-expand”</span></a> and the
  <a class="link" href="ClutterActor.html#ClutterActor--x-align" title="The “x-align” property"><span class="type">“x-align”</span></a> properties on <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> instead.</p>
</div>
<p>Flags: Read / Write</p>
<p>Default value: CLUTTER_BIN_ALIGNMENT_CENTER</p>
<p class="since">Since 1.2</p>
</div>
<hr>
<div class="refsect2">
<a name="ClutterBinLayout--y-align"></a><h3>The <code class="literal">“y-align”</code> property</h3>
<pre class="programlisting">  “y-align”                  <a class="link" href="ClutterBinLayout.html#ClutterBinAlignment" title="enum ClutterBinAlignment"><span class="type">ClutterBinAlignment</span></a></pre>
<p>The default vertical alignment policy for actors managed
by the <a class="link" href="ClutterBinLayout.html" title="ClutterBinLayout"><span class="type">ClutterBinLayout</span></a></p>
<div class="warning">
<p><code class="literal">ClutterBinLayout:y-align</code> has been deprecated since version 1.12 and should not be used in newly-written code.</p>
<p>Use the <a class="link" href="ClutterActor.html#ClutterActor--y-expand" title="The “y-expand” property"><span class="type">“y-expand”</span></a> and the
  <a class="link" href="ClutterActor.html#ClutterActor--y-align" title="The “y-align” property"><span class="type">“y-align”</span></a> properties on <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> instead.</p>
</div>
<p>Flags: Read / Write</p>
<p>Default value: CLUTTER_BIN_ALIGNMENT_CENTER</p>
<p class="since">Since 1.2</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.20</div>
</body>
</html>