Blender V5.3
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
56 GHOST_TSuccess pushEvent(std::unique_ptr<const GHOST_IEvent> event);
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<std::unique_ptr<const GHOST_IEvent>>;
112
116
118 using TConsumerVector = std::vector<GHOST_IEventConsumer *>;
119
122
123 MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_EventManager")
124};
GHOST_TEventType
GHOST_TSuccess
std::vector< GHOST_IEventConsumer * > TConsumerVector
GHOST_TSuccess addConsumer(GHOST_IEventConsumer *consumer)
GHOST_TSuccess removeConsumer(GHOST_IEventConsumer *consumer)
TConsumerVector consumers_
std::deque< std::unique_ptr< const GHOST_IEvent > > TEventStack
GHOST_TSuccess pushEvent(std::unique_ptr< const GHOST_IEvent > event)
void removeWindowEvents(const GHOST_IWindow *window)
void dispatchEvent(const GHOST_IEvent *event)
void removeTypeEvents(GHOST_TEventType type, const GHOST_IWindow *window=nullptr)