Blender V5.0
GHOST_EventManager.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9
10#pragma once
11
12#include <deque>
13#include <vector>
14
16
26 public:
31
36
41 uint32_t getNumEvents();
42
48 uint32_t getNumEvents(GHOST_TEventType type);
49
57
61 void dispatchEvent(const GHOST_IEvent *event);
62
67 void dispatchEvent();
68
73 void dispatchEvents();
74
81
88
93 void removeWindowEvents(const GHOST_IWindow *window);
94
102 void removeTypeEvents(GHOST_TEventType type, const GHOST_IWindow *window = nullptr);
103
104 protected:
108 void disposeEvents();
109
111 using TEventStack = std::deque<const GHOST_IEvent *>;
112
114 std::deque<const GHOST_IEvent *> events_;
115 std::deque<const GHOST_IEvent *> handled_events_;
116
118 using TConsumerVector = std::vector<GHOST_IEventConsumer *>;
119
122
123 MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_EventManager")
124};
#define pushEvent
GHOST_TEventType
GHOST_TSuccess
Definition GHOST_Types.h:57
std::deque< const GHOST_IEvent * > events_
std::vector< GHOST_IEventConsumer * > TConsumerVector
GHOST_TSuccess addConsumer(GHOST_IEventConsumer *consumer)
std::deque< const GHOST_IEvent * > handled_events_
GHOST_TSuccess removeConsumer(GHOST_IEventConsumer *consumer)
TConsumerVector consumers_
std::deque< const GHOST_IEvent * > TEventStack
void removeWindowEvents(const GHOST_IWindow *window)
void removeTypeEvents(GHOST_TEventType type, const GHOST_IWindow *window=nullptr)