Blender V5.3
wm_runtime.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "BKE_report.hh"
10#include "BKE_undo_system.hh"
11#include "BKE_wm_runtime.hh"
12
13#include "BLI_ghash.hh"
14#include "BLI_listbase.hh"
15
16#include "WM_api.hh"
17
18#include "WM_message.hh"
19
20namespace blender::bke {
21
26
28{
30
31 this->notifier_queue.free_no_destruct();
32
33 while (wmOperator *op = static_cast<wmOperator *>(BLI_pophead(&this->operators))) {
35 }
36
37 this->paintcursors.free_no_destruct();
38
39 /* NOTE(@ideasman42): typically timers are associated with windows and timers will have been
40 * freed when the windows are removed. However timers can be created which don't have windows
41 * and in this case it's necessary to free them on exit, see: #109953. */
42 while (wmTimer *timer = static_cast<wmTimer *>(BLI_pophead(&this->timers))) {
44 MEM_delete(timer);
45 }
46
47 while (wmKeyConfig *keyconf = static_cast<wmKeyConfig *>(BLI_pophead(&this->keyconfigs))) {
48 WM_keyconfig_free(keyconf);
49 }
50
52
53 if (this->undo_stack) {
55 }
56
57 if (this->message_bus != nullptr) {
59 }
60}
61
63{
64#ifdef WITH_INPUT_IME
65 /* May be null. */
66 MEM_delete(this->ime_data);
67#endif
69 BLI_assert(this->event_queue.is_empty());
70}
71
72} // namespace blender::bke
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void WM_event_timer_free_data(wmTimer *timer)
void WM_operator_free(wmOperator *op)
Definition wm.cc:277
void WM_msgbus_destroy(wmMsgBus *mbus)
void BKE_reports_free(ReportList *reports)
Definition report.cc:106
void BKE_reports_init(ReportList *reports, int flag)
Definition report.cc:91
void * BLI_pophead(ListBase *listbase) ATTR_NONNULL(1)
Definition listbase.cc:259
void WM_keyconfig_free(wmKeyConfig *keyconf)
Definition wm_keymap.cc:365
void BKE_undosys_stack_destroy(UndoStack *ustack)
void WM_drag_free_list(ListBaseT< wmDrag > *lb)
ListBaseT< wmPaintCursor > paintcursors
ListBaseT< wmKeyConfig > keyconfigs
ListBaseT< wmNotifier > notifier_queue
ListBaseT< wmOperator > operators
ListBaseT< wmEvent > event_queue