This file is indexed.

/usr/share/gtk-doc/html/clutter/migrating-ClutterBehaviour.html is in libclutter-1.0-doc 1.24.2-1.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Migrating from ClutterBehaviour: Clutter Reference Manual</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="migration.html" title="Part IX. Migrating from previous version of Clutter">
<link rel="prev" href="using-cairo.html" title="Integration with Cairo">
<link rel="next" href="migrating-ClutterAnimation.html" title="Migrating from ClutterAnimation">
<meta name="generator" content="GTK-Doc V1.24 (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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></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="migration.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="using-cairo.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="migrating-ClutterAnimation.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="migrating-ClutterBehaviour"></a>Migrating from ClutterBehaviour</h2></div>
<div><div class="author">
<h3 class="author">
<span class="firstname">Emmanuele</span> <span class="surname">Bassi</span>
</h3>
<div class="affiliation"><div class="address"><p><br>
          <code class="email">&lt;<a class="email" href="mailto:ebassilinux.intel.com">ebassi<em class="parameter"><code>linux.intel.com</code></em></a>&gt;</code><br>
        </p></div></div>
</div></div>
</div></div>
<p>The <a class="link" href="ClutterBehaviour.html" title="ClutterBehaviour"><span class="type">ClutterBehaviour</span></a> class and its sub-classes have been deprecated
  since Clutter 1.6. The animation framework provided by <a class="link" href="clutter-Implicit-Animations.html#ClutterAnimation"><span class="type">ClutterAnimation</span></a>,
  <a class="link" href="ClutterAnimator.html" title="ClutterAnimator"><span class="type">ClutterAnimator</span></a> and <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> fully replaces all functionality from the
  <a class="link" href="ClutterBehaviour.html" title="ClutterBehaviour"><span class="type">ClutterBehaviour</span></a> classes.</p>
<p>Generally, animations using <a class="link" href="ClutterBehaviour.html" title="ClutterBehaviour"><span class="type">ClutterBehaviour</span></a> sub-classes can be
  effectively re-implemented just by using <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="type">ClutterActor</span></a> properties.</p>
<p>Here is an example of an animation using a
  <a class="link" href="ClutterBehaviourOpacity.html" title="ClutterBehaviourOpacity"><span class="type">ClutterBehaviourOpacity</span></a> instance:</p>
<div class="informalexample"><pre class="programlisting">
  ClutterTimeline *timeline = clutter_timeline_new (250);
  ClutterAlpha *alpha = clutter_alpha_new_full (timeline, CLUTTER_LINEAR);
  ClutterBehaviour *behaviour = clutter_behaviour_opacity_new (alpha, 255, 0);

  clutter_behaviour_apply (behaviour, some_actor);

  clutter_timeline_start (timeline);
    </pre></div>
<p>The same effect can be achieved by using <a class="link" href="clutter-Implicit-Animations.html#clutter-actor-animate" title="clutter_actor_animate ()"><code class="function">clutter_actor_animate()</code></a> and
  the <a class="link" href="ClutterActor.html#ClutterActor--opacity" title="The “opacity” property"><span class="type">“opacity”</span></a> property:</p>
<div class="informalexample"><pre class="programlisting">
  clutter_actor_set_opacity (some_actor, 255);
  clutter_actor_animate (some_actor, CLUTTER_LINEAR, 250,
                         "opacity", 0,
                         NULL);
    </pre></div>
<p><a class="link" href="ClutterBehaviour.html" title="ClutterBehaviour"><span class="type">ClutterBehaviour</span></a>s used for continuous animations with looping
  timelines can still be effectively replaced by looping animations; for
  instance, the following example of a "pulsating" actor using
  <a class="link" href="ClutterBehaviourScale.html" title="ClutterBehaviourScale"><span class="type">ClutterBehaviourScale</span></a>:</p>
<div class="informalexample"><pre class="programlisting">
static void
reverse_timeline (ClutterTimeline *timeline)
{
  ClutterTimelineDirection dir = clutter_timeline_get_direction (timeline);

  if (dir == CLUTTER_TIMELINE_FORWARD)
    dir = CLUTTER_TIMELINE_BACKWARD;
  else
    dir = CLUTTER_TIMELINE_FORWARD;

  clutter_timeline_set_direction (timeline, dir);
}

  ClutterTimeline *timeline = clutter_timeline_new (500);
  ClutterAlpha *alpha = clutter_alpha_new_full (timeline, CLUTTER_LINEAR);
  ClutterBehaviour *behaviour;

  g_object_set (some_actor, "scale-gravity", CLUTTER_GRAVITY_CENTER, NULL);
  behaviour = clutter_behaviour_scale_new (alpha,
                                           1.0, 2.0,
                                           1.0, 2.0);
  clutter_behaviour_apply (behaviour, some_actor);

  g_signal_connect (timeline,
                    "completed", G_CALLBACK (reverse_timeline),
                    NULL);

  clutter_timeline_set_loop (timeline);
  clutter_timeline_start (timeline);
    </pre></div>
<p>The same effect can be achieved using a <a class="link" href="clutter-Implicit-Animations.html#ClutterAnimation"><span class="type">ClutterAnimation</span></a>:</p>
<div class="informalexample"><pre class="programlisting">
  ClutterAnimation *animation =
    clutter_actor_animate (some_actor, CLUTTER_LINEAR, 500,
                           "scale-x", 2.0,
                           "scale-y", 2.0,
                           "fixed::scale-gravity", CLUTTER_GRAVITY_CENTER,
                           NULL);

  ClutterTimeline *timeline = clutter_animation_get_timeline (animation);
  clutter_timeline_set_repeat_count (timeline, -1);
  clutter_timeline_set_auto_reverse (timeline, TRUE);
    </pre></div>
<p><a class="link" href="ClutterBehaviour.html" title="ClutterBehaviour"><span class="type">ClutterBehaviour</span></a> sub-classes can be applied to multiple actors, in
  order to share the duration and the easing mode. It is possible to use the
  same underlying <a class="link" href="ClutterTimeline.html" title="ClutterTimeline"><span class="type">ClutterTimeline</span></a> and <a class="link" href="ClutterAlpha.html" title="ClutterAlpha"><span class="type">ClutterAlpha</span></a> instances with
  <a class="link" href="clutter-Implicit-Animations.html#ClutterAnimation"><span class="type">ClutterAnimation</span></a> to achieve the same effect. Complex animations, spanning
  multiple actors, should use the <a class="link" href="ClutterAnimator.html" title="ClutterAnimator"><span class="type">ClutterAnimator</span></a> and <a class="link" href="ClutterState.html" title="ClutterState"><span class="type">ClutterState</span></a> classes
  instead.</p>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>