3 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version. The Blender
9 * Foundation also sells licenses for use in proprietary software under
10 * the Blender License. See http://www.blender.org/BL/ for information
13 * This program 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
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23 * All rights reserved.
25 * The Original Code is: all of this file.
27 * Contributor(s): none yet.
29 * ***** END GPL/BL DUAL LICENSE BLOCK *****
32 * @file GHOST_ITimerTask.h
33 * Declaration of GHOST_ITimerTask interface class.
36 #ifndef _GHOST_ITIMER_TASK_H_
37 #define _GHOST_ITIMER_TASK_H_
39 #include "GHOST_Types.h"
43 * Interface for a timer task.
44 * Timer tasks are created by the system and can be installed by the system.
45 * After installation, the timer callback-procedure or "timerProc" will be called
46 * periodically. You should not need to inherit this class. It is passed to the
47 * application in the timer-callback.<br>
49 * Note that GHOST processes timers in the UI thread. You should ask GHOST
50 * process messages in order for the timer-callbacks to be called.
51 * @see GHOST_ISystem#installTimer
52 * @see GHOST_TimerProcPtr
53 * @author Maarten Gribnau
56 class GHOST_ITimerTask
62 virtual ~GHOST_ITimerTask()
67 * Returns the timer callback.
68 * @return The timer callback.
70 virtual GHOST_TimerProcPtr getTimerProc() const = 0;
73 * Changes the timer callback.
74 * @param timerProc The timer callback.
76 virtual void setTimerProc(const GHOST_TimerProcPtr timerProc) = 0;
79 * Returns the timer user data.
80 * @return The timer user data.
82 virtual GHOST_TUserDataPtr getUserData() const = 0;
85 * Changes the time user data.
86 * @param data The timer user data.
88 virtual void setUserData(const GHOST_TUserDataPtr userData) = 0;
91 #endif // _GHOST_ITIMER_TASK_H_