~diresu/blender/blender-command-port

« back to all changes in this revision

Viewing changes to intern/ghost/GHOST_IEventConsumer.h

  • Committer: theeth
  • Date: 2008-10-14 16:52:04 UTC
  • Revision ID: vcs-imports@canonical.com-20081014165204-r32w2gm6s0osvdhn
copy back trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * $Id: GHOST_IEventConsumer.h 14444 2008-04-16 22:40:48Z hos $
 
3
 * ***** BEGIN GPL LICENSE BLOCK *****
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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.
 
18
 *
 
19
 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
 
20
 * All rights reserved.
 
21
 *
 
22
 * The Original Code is: all of this file.
 
23
 *
 
24
 * Contributor(s): none yet.
 
25
 *
 
26
 * ***** END GPL LICENSE BLOCK *****
 
27
 */
 
28
/**
 
29
 * @file        GHOST_IEventConsumer.h
 
30
 * Declaration of GHOST_IEventConsumer interface class.
 
31
 */
 
32
 
 
33
#ifndef _GHOST_IEVENT_CONSUMER_H_
 
34
#define _GHOST_IEVENT_CONSUMER_H_
 
35
 
 
36
#include "GHOST_IEvent.h"
 
37
 
 
38
/**
 
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
 
46
 * @date        May 14, 2001
 
47
 */
 
48
class GHOST_IEventConsumer
 
49
{
 
50
public:
 
51
        /**
 
52
         * Destructor.
 
53
         */
 
54
        virtual ~GHOST_IEventConsumer()
 
55
        {
 
56
        }
 
57
 
 
58
        /**
 
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.
 
63
         */
 
64
        virtual bool processEvent(GHOST_IEvent* event) = 0;
 
65
};
 
66
 
 
67
#endif // _GHOST_EVENT_CONSUMER_H_
 
68