Blender V5.0
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.h"
14#include "BLI_listbase.h"
15
16#include "WM_api.hh"
17
18#include "WM_message.hh"
19
20namespace blender::bke {
21
26
28{
30
32 if (this->notifier_queue_set) {
33 BLI_gset_free(this->notifier_queue_set, nullptr);
34 }
35
36 while (wmOperator *op = static_cast<wmOperator *>(BLI_pophead(&this->operators))) {
38 }
39
41
42 /* NOTE(@ideasman42): typically timers are associated with windows and timers will have been
43 * freed when the windows are removed. However timers can be created which don't have windows
44 * and in this case it's necessary to free them on exit, see: #109953. */
45 while (wmTimer *timer = static_cast<wmTimer *>(BLI_pophead(&this->timers))) {
48 }
49
50 while (wmKeyConfig *keyconf = static_cast<wmKeyConfig *>(BLI_pophead(&this->keyconfigs))) {
51 WM_keyconfig_free(keyconf);
52 }
53
55
56 if (this->undo_stack) {
58 }
59
60 if (this->message_bus != nullptr) {
62 }
63}
64
66{
67#ifdef WITH_INPUT_IME
68 BLI_assert(this->ime_data == nullptr);
69#endif
72}
73
74} // namespace blender::bke
@ RPT_STORE
Definition BKE_report.hh:56
void BKE_reports_free(ReportList *reports)
Definition report.cc:97
void BKE_reports_init(ReportList *reports, int flag)
Definition report.cc:82
void BKE_undosys_stack_destroy(UndoStack *ustack)
#define BLI_assert(a)
Definition BLI_assert.h:46
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
Definition listbase.cc:497
void * BLI_pophead(ListBase *listbase) ATTR_NONNULL(1)
Definition listbase.cc:252
void MEM_freeN(void *vmemh)
Definition mallocn.cc:113
wmTimer * timer
void WM_operator_free(wmOperator *op)
Definition wm.cc:259
void WM_drag_free_list(ListBase *lb)
void WM_keyconfig_free(wmKeyConfig *keyconf)
Definition wm_keymap.cc:361
void WM_msgbus_destroy(wmMsgBus *mbus)
void WM_event_timer_free_data(wmTimer *timer)