3 * ***** BEGIN GPL 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.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
20 * All rights reserved.
22 * The Original Code is: all of this file.
24 * Contributor(s): none yet.
26 * ***** END GPL LICENSE BLOCK *****
29 * @file GHOST_IEvent.h
30 * Declaration of GHOST_IEvent interface class.
33 #ifndef _GHOST_IEVENT_H_
34 #define _GHOST_IEVENT_H_
36 #include "GHOST_Types.h"
41 * Interface class for events received from GHOST.
42 * You should not need to inherit this class. The system will pass these events
43 * to the GHOST_IEventConsumer::processEvent() method of event consumers.<br>
44 * Use the getType() method to retrieve the type of event and the getData()
45 * method to get the event data out. Using the event type you can cast the
46 * event data to the correct event dat structure.
47 * @see GHOST_IEventConsumer#processEvent
48 * @see GHOST_TEventType
49 * @author Maarten Gribnau
58 virtual ~GHOST_IEvent()
63 * Returns the event type.
64 * @return The event type.
66 virtual GHOST_TEventType getType() = 0;
69 * Returns the time this event was generated.
70 * @return The event generation time.
72 virtual GHOST_TUns64 getTime() = 0;
75 * Returns the window this event was generated on,
76 * or NULL if it is a 'system' event.
77 * @return The generating window.
79 virtual GHOST_IWindow* getWindow() = 0;
82 * Returns the event data.
83 * @return The event data.
85 virtual GHOST_TEventDataPtr getData() = 0;
88 #endif // _GHOST_IEVENT_H_