This file is indexed.

/usr/include/plasma/animator.h is in kdelibs5-dev 4:4.8.4-4+deb7u1.

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
/*
 *   Copyright 2007 Aaron Seigo <aseigo@kde.org>
 *                 2007 Alexis Ménard <darktears31@gmail.com>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Library General Public License as
 *   published by the Free Software Foundation; either version 2, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details
 *
 *   You should have received a copy of the GNU Library General Public
 *   License along with this program; if not, write to the
 *   Free Software Foundation, Inc.,
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef PLASMA_ANIMATOR_H
#define PLASMA_ANIMATOR_H

#include <QtGui/QImage>
#include <QtCore/QObject>
#include <QtCore/QAbstractAnimation>
#include <QtCore/QEasingCurve>

#include <plasma/plasma_export.h>

class QGraphicsItem;
class QGraphicsWidget;
class QTimeLine;

namespace Plasma
{

class AnimatorPrivate;
class Animation;

/**
 * @class Animator plasma/animator.h <Plasma/Animator>
 *
 * @short A system for applying effects to Plasma elements
 */
class PLASMA_EXPORT Animator : public QObject
{
    Q_OBJECT
    Q_ENUMS(Animation)
    Q_ENUMS(CurveShape)
    Q_ENUMS(Movement)

public:

    enum Animation {
        AppearAnimation = 0, /*<< Animate the appearance of an element */
        DisappearAnimation,  /*<< Animate the disappearance of an element */
        ActivateAnimation,    /*<< When something is activated or launched,
                                such as an app icon being clicked */
        FadeAnimation, /*<< Can be used for both fade in and out */
        GrowAnimation, /*<< Grow animated object geometry */
        PulseAnimation, /*<< Pulse animated object (opacity/geometry/scale) */
        RotationAnimation, /*<< Rotate an animated object */
        RotationStackedAnimation, /*<< for flipping one object with another */
        SlideAnimation, /*<< Move the position of animated object */
        GeometryAnimation, /*<< Geometry animation*/
        ZoomAnimation, /*<<Zoom animation */
        PixmapTransitionAnimation, /*<< Transition between two pixmaps*/
        WaterAnimation /*<< Water animation using ripple effect */,
        LastAnimation = 1024
    };

    enum CurveShape {
        EaseInCurve = 0,
        EaseOutCurve,
        EaseInOutCurve,
        LinearCurve,
        PendularCurve
    };

    enum Movement {
        SlideInMovement = 0,
        SlideOutMovement,
        FastSlideInMovement,
        FastSlideOutMovement
    };

    /**
     * Singleton accessor
     **/
#ifndef KDE_NO_DEPRECATED
    static KDE_DEPRECATED Animator *self();
#endif

    /**
     * Factory to build new animation objects. To control their behavior,
     * check \ref AbstractAnimation properties.
     * @since 4.4
     **/
    static Plasma::Animation *create(Animator::Animation type, QObject *parent = 0);

    /**
     * Factory to build new animation objects from Javascript files. To control their behavior,
     * check \ref AbstractAnimation properties.
     * @since 4.5
     **/
    static Plasma::Animation *create(const QString &animationName, QObject *parent = 0);

    /**
     * Factory to build new custom easing curves.
     * @since 4.5
     */
    static QEasingCurve create(Animator::CurveShape type);

    /**
     * Starts a standard animation on a QGraphicsItem.
     *
     * @param item the item to animate in some fashion
     * @param anim the type of animation to perform
     * @return the id of the animation
     * @deprecated use new Animator API with Qt Kinetic
     **/
#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED Q_INVOKABLE int animateItem(QGraphicsItem *item,Animation anim);
#endif

    /**
     * Stops an item animation before the animation is complete.
     * Note that it is not necessary to call
     * this on normal completion of the animation.
     *
     * @param id the id of the animation as returned by animateItem
     * @deprecated use new Animator API with Qt Kinetic
     */
#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED Q_INVOKABLE void stopItemAnimation(int id);
#endif

    /**
     * Starts a standard animation on a QGraphicsItem.
     *
     * @param item the item to animate in some fashion
     * @param anim the type of animation to perform
     * @return the id of the animation
     * @deprecated use new Animator API with Qt Kinetic
     **/
#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED Q_INVOKABLE int moveItem(QGraphicsItem *item, Movement movement, const QPoint &destination);
#endif

    /**
     * Stops an item movement before the animation is complete.
     * Note that it is not necessary to call
     * this on normal completion of the animation.
     *
     * @param id the id of the animation as returned by moveItem
     * @deprecated use new Animator API with Qt Kinetic
     */
#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED Q_INVOKABLE void stopItemMovement(int id);
#endif

    /**
     * Starts a custom animation, preventing the need to create a timeline
     * with its own timer tick.
     *
     * @param frames the number of frames this animation should persist for
     * @param duration the length, in milliseconds, the animation will take
     * @param curve the curve applied to the frame rate
     * @param receive the object that will handle the actual animation
     * @param method the method name of slot to be invoked on each update.
     *             It must take a qreal. So if the slot is animate(qreal),
     *             pass in "animate" as the method parameter.
     *             It has an optional integer paramenter that takes an
     *             integer that reapresents the animation id, useful if
     *             you want to manage multiple animations with a sigle slot
     *
     * @return an id that can be used to identify this animation.
     * @deprecated use new Animator API with Qt Kinetic
     */
#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED Q_INVOKABLE int customAnimation(int frames, int duration,
        Animator::CurveShape curve, QObject *receiver, const char *method);
#endif

    /**
     * Stops a custom animation. Note that it is not necessary to call
     * this on object destruction, as custom animations associated with
     * a given QObject are cleaned up automatically on QObject destruction.
     *
     * @param id the id of the animation as returned by customAnimation
     * @deprecated use new Animator API with Qt Kinetic
     */
#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED Q_INVOKABLE void stopCustomAnimation(int id);
#endif

#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED Q_INVOKABLE int animateElement(QGraphicsItem *obj, Animation);
#endif
#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED Q_INVOKABLE void stopElementAnimation(int id);
#endif
#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED Q_INVOKABLE void setInitialPixmap(int id, const QPixmap &pixmap);
#endif
#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED Q_INVOKABLE QPixmap currentPixmap(int id);
#endif

    /**
     * Can be used to query if there are other animations happening. This way
     * heavy operations can be delayed until all animations are finished.
     * @return true if there are animations going on.
     * @since 4.1
     * @deprecated use new Animator API with Qt Kinetic
     */
#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED Q_INVOKABLE bool isAnimating() const;
#endif

    /**
     * Register a widget as a scrolling widget.
     * This function is deprecated:
     * use a ScrollWidget, with setWidget() as your widget instead.
     *
     * @param widget the widget that offers a scrolling behaviour
     * @since 4.4
     */
#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED void registerScrollingManager(QGraphicsWidget *widget);
#endif

    /**
     * unregister the scrolling manager of a certain widget
     * This function is deprecated: use ScrollWidget instead.
     *
     * @param widget the widget we don't want no longer animated
     * @since 4.4
     */
#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED void unregisterScrollingManager(QGraphicsWidget *widget);
#endif

Q_SIGNALS:
    void animationFinished(QGraphicsItem *item, Plasma::Animator::Animation anim);
    void movementFinished(QGraphicsItem *item);
    void elementAnimationFinished(int id);
    void customAnimationFinished(int id);
#ifndef KDE_NO_DEPRECATED
    KDE_DEPRECATED void scrollStateChanged(QGraphicsWidget *widget, QAbstractAnimation::State newState,
            QAbstractAnimation::State oldState);
#endif

#ifndef KDE_NO_DEPRECATED
protected:
    void timerEvent(QTimerEvent *event);
#endif

private:
#ifndef KDE_NO_DEPRECATED
    friend class AnimatorSingleton;
    explicit Animator(QObject * parent = 0);
    ~Animator();

    Q_PRIVATE_SLOT(d, void animatedItemDestroyed(QObject*))
    Q_PRIVATE_SLOT(d, void movingItemDestroyed(QObject*))
    Q_PRIVATE_SLOT(d, void animatedElementDestroyed(QObject*))
    Q_PRIVATE_SLOT(d, void customAnimReceiverDestroyed(QObject*))
    Q_PRIVATE_SLOT(d, void scrollStateChanged(QAbstractAnimation::State,
                QAbstractAnimation::State))
#else
    Animator();
#endif

    friend class AnimatorPrivate;
    AnimatorPrivate * const d;
};

} // namespace Plasma

#endif