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_IEventConsumer.h
30 * Declaration of GHOST_IEventConsumer interface class.
33 #ifndef _GHOST_IEVENT_CONSUMER_H_
34 #define _GHOST_IEVENT_CONSUMER_H_
36 #include "GHOST_IEvent.h"
39 * Interface class for objects interested in receiving events.
40 * Objects interested in events should inherit this class and implement the
41 * processEvent() method. They should then be registered with the system that
42 * they want to receive events. The system will call the processEvent() method
43 * for every installed event consumer to pass events.
44 * @see GHOST_ISystem#addEventConsumer
45 * @author Maarten Gribnau
48 class GHOST_IEventConsumer
54 virtual ~GHOST_IEventConsumer()
59 * This method is called by the system when it has events to dispatch.
60 * @see GHOST_ISystem#dispatchEvents
61 * @param event The event that can be handled or ignored.
62 * @return Indication as to whether the event was handled.
64 virtual bool processEvent(GHOST_IEvent* event) = 0;
67 #endif // _GHOST_EVENT_CONSUMER_H_