2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
19 * All rights reserved.
21 * The Original Code is: all of this file.
23 * Contributor(s): none yet.
25 * ***** END GPL LICENSE BLOCK *****
28 /** \file ghost/GHOST_IEvent.h
30 * Declaration of GHOST_IEvent interface class.
33 #ifndef __GHOST_IEVENT_H__
34 #define __GHOST_IEVENT_H__
37 #include "GHOST_Types.h"
42 * Interface class for events received from GHOST.
43 * You should not need to inherit this class. The system will pass these events
44 * to the GHOST_IEventConsumer::processEvent() method of event consumers.<br>
45 * Use the getType() method to retrieve the type of event and the getData()
46 * method to get the event data out. Using the event type you can cast the
47 * event data to the correct event dat structure.
48 * \see GHOST_IEventConsumer#processEvent
49 * \see GHOST_TEventType
50 * \author Maarten Gribnau
59 virtual ~GHOST_IEvent()
64 * Returns the event type.
65 * \return The event type.
67 virtual GHOST_TEventType getType() = 0;
70 * Returns the time this event was generated.
71 * \return The event generation time.
73 virtual GHOST_TUns64 getTime() = 0;
76 * Returns the window this event was generated on,
77 * or NULL if it is a 'system' event.
78 * \return The generating window.
80 virtual GHOST_IWindow *getWindow() = 0;
83 * Returns the event data.
84 * \return The event data.
86 virtual GHOST_TEventDataPtr getData() = 0;
88 #ifdef WITH_CXX_GUARDEDALLOC
89 MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IEvent")
93 #endif // __GHOST_IEVENT_H__