Blender  V2.93
GHOST_EventManager.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
25 #pragma once
26 
27 #include <deque>
28 #include <vector>
29 
30 #include "GHOST_IEventConsumer.h"
31 
41  public:
46 
51 
57 
64 
72 
76  void dispatchEvent(GHOST_IEvent *event);
77 
82  void dispatchEvent();
83 
88  void dispatchEvents();
89 
96 
103 
108  void removeWindowEvents(GHOST_IWindow *window);
109 
118 
119  protected:
123  void disposeEvents();
124 
126  typedef std::deque<GHOST_IEvent *> TEventStack;
127 
129  std::deque<GHOST_IEvent *> m_events;
130  std::deque<GHOST_IEvent *> m_handled_events;
131 
133  typedef std::vector<GHOST_IEventConsumer *> TConsumerVector;
134 
137 
138 #ifdef WITH_CXX_GUARDEDALLOC
139  MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_EventManager")
140 #endif
141 };
unsigned int GHOST_TUns32
Definition: GHOST_Types.h:64
GHOST_TEventType
Definition: GHOST_Types.h:177
GHOST_TSuccess
Definition: GHOST_Types.h:91
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
void removeWindowEvents(GHOST_IWindow *window)
GHOST_TUns32 getNumEvents()
GHOST_TSuccess addConsumer(GHOST_IEventConsumer *consumer)
GHOST_TSuccess removeConsumer(GHOST_IEventConsumer *consumer)
std::deque< GHOST_IEvent * > m_handled_events
std::deque< GHOST_IEvent * > m_events
TConsumerVector m_consumers
GHOST_TSuccess pushEvent(GHOST_IEvent *event)
std::vector< GHOST_IEventConsumer * > TConsumerVector
std::deque< GHOST_IEvent * > TEventStack
void removeTypeEvents(GHOST_TEventType type, GHOST_IWindow *window=NULL)