2
Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
3
2004, 2005 Rob Buis <buis@kde.org>
4
Copyright (C) 2006 Apple Computer, Inc.
6
This file is part of the KDE project
8
This library is free software; you can redistribute it and/or
9
modify it under the terms of the GNU Library General Public
10
License as published by the Free Software Foundation; either
11
version 2 of the License, or (at your option) any later version.
13
This library is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
Library General Public License for more details.
18
You should have received a copy of the GNU Library General Public License
19
along with this library; see the file COPYING.LIB. If not, write to
20
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
Boston, MA 02111-1307, USA.
24
#ifndef TimeScheduler_h
25
#define TimeScheduler_h
28
#include <wtf/HashSet.h>
32
class SVGAnimationElement;
35
template <typename T> class Timer;
37
typedef HashSet<SVGTimer*> SVGTimerSet;
41
TimeScheduler(Document*);
44
// Adds singleShot Timers
45
void addTimer(SVGAnimationElement*, unsigned int ms);
47
// (Dis-)Connects to interval timer with 'staticTimerInterval'
48
void connectIntervalTimer(SVGAnimationElement*);
49
void disconnectIntervalTimer(SVGAnimationElement*);
51
void startAnimations();
52
void toggleAnimations();
53
bool animationsPaused() const;
55
// time elapsed in seconds after creation of this object
56
double elapsed() const;
59
friend class SVGTimer;
60
void timerFired(Timer<TimeScheduler>*);
61
Document* document() const { return m_document; }
64
double m_creationTime;
67
SVGTimerSet m_timerSet;
69
SVGTimer* m_intervalTimer;