Blender V4.5
wm.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2007 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
12
13/* Allow using deprecated functionality for .blend file I/O. */
14#define DNA_DEPRECATED_ALLOW
15
16#include <cstring>
17
19
20#include "MEM_guardedalloc.h"
21
22#include "BLI_ghash.h"
23#include "BLI_listbase.h"
24#include "BLI_string.h"
25#include "BLI_utildefines.h"
26
27#include "BLT_translation.hh"
28
29#include "BKE_context.hh"
30#include "BKE_global.hh"
31#include "BKE_idprop.hh"
32#include "BKE_idtype.hh"
33#include "BKE_lib_id.hh"
34#include "BKE_lib_query.hh"
35#include "BKE_main.hh"
36#include "BKE_report.hh"
37#include "BKE_screen.hh"
38#include "BKE_workspace.hh"
39
40#include "WM_api.hh"
41#include "WM_keymap.hh"
42#include "WM_message.hh"
43#include "WM_types.hh"
44#include "wm.hh"
45#include "wm_draw.hh"
46#include "wm_event_system.hh"
47#include "wm_window.hh"
48#ifdef WITH_XR_OPENXR
49# include "wm_xr.hh"
50#endif
51
52#include "BKE_undo_system.hh"
53#include "ED_screen.hh"
54
55#ifdef WITH_PYTHON
56# include "BPY_extern.hh"
57# include "BPY_extern_run.hh"
58#endif
59
60#include "BLO_read_write.hh"
61
62/* ****************************************************** */
63
65{
66 wm_close_and_free(nullptr, (wmWindowManager *)id);
67}
68
70{
71 wmWindowManager *wm = reinterpret_cast<wmWindowManager *>(id);
73
74 LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
76
77 /* This pointer can be nullptr during old files reading. */
78 if (win->workspace_hook != nullptr) {
79 ID *workspace = (ID *)BKE_workspace_active_get(win->workspace_hook);
81 /* Allow callback to set a different workspace. */
82 BKE_workspace_active_set(win->workspace_hook, (WorkSpace *)workspace);
84 return;
85 }
86 }
87
89
90 if (flag & IDWALK_INCLUDE_UI) {
91 LISTBASE_FOREACH (ScrArea *, area, &win->global_areas.areabase) {
94 }
95 }
96
99 }
100 }
101
104}
105
106static void write_wm_xr_data(BlendWriter *writer, wmXrData *xr_data)
107{
109}
110
111static void window_manager_blend_write(BlendWriter *writer, ID *id, const void *id_address)
112{
114
115 wm->runtime = nullptr;
116
117 BLO_write_id_struct(writer, wmWindowManager, id_address, &wm->id);
118 BKE_id_blend_write(writer, &wm->id);
119 write_wm_xr_data(writer, &wm->xr);
120
121 LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
122 /* Update deprecated screen member (for so loading in 2.7x uses the correct screen). */
123 win->screen = BKE_workspace_active_screen_get(win->workspace_hook);
124
125 BLO_write_struct(writer, wmWindow, win);
126 BLO_write_struct(writer, WorkSpaceInstanceHook, win->workspace_hook);
127 BLO_write_struct(writer, Stereo3dFormat, win->stereo3d_format);
128
129 BKE_screen_area_map_blend_write(writer, &win->global_areas);
130
131 /* Data is written, clear deprecated data again. */
132 win->screen = nullptr;
133 }
134}
135
140
142{
144
145 id_us_ensure_real(&wm->id);
147
148 LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
149 BLO_read_struct(reader, wmWindow, &win->parent);
150
151 WorkSpaceInstanceHook *hook = win->workspace_hook;
152 BLO_read_struct(reader, WorkSpaceInstanceHook, &win->workspace_hook);
153
154 /* This will be nullptr for any pre-2.80 blend file. */
155 if (win->workspace_hook != nullptr) {
156 /* We need to restore a pointer to this later when reading workspaces,
157 * so store in global oldnew-map.
158 * Note that this is only needed for versioning of older .blend files now. */
159 BLO_read_data_globmap_add(reader, hook, win->workspace_hook);
160 /* Cleanup pointers to data outside of this data-block scope. */
161 win->workspace_hook->act_layout = nullptr;
162 win->workspace_hook->temp_workspace_store = nullptr;
163 win->workspace_hook->temp_layout_store = nullptr;
164 }
165
166 BKE_screen_area_map_blend_read_data(reader, &win->global_areas);
167
168 win->ghostwin = nullptr;
169 win->gpuctx = nullptr;
170 win->eventstate = nullptr;
171 win->eventstate_prev_press_time_ms = 0;
172 win->event_last_handled = nullptr;
173 win->cursor_keymap_status = nullptr;
174
175 BLI_listbase_clear(&win->handlers);
176 BLI_listbase_clear(&win->modalhandlers);
177 BLI_listbase_clear(&win->gesture);
178
179 win->active = 0;
180
181 win->cursor = 0;
182 win->lastcursor = 0;
183 win->modalcursor = 0;
184 win->grabcursor = 0;
185 win->addmousemove = true;
186 win->event_queue_check_click = 0;
187 win->event_queue_check_drag = 0;
188 win->event_queue_check_drag_handled = 0;
189 win->event_queue_consecutive_gesture_type = EVENT_NONE;
190 win->event_queue_consecutive_gesture_data = nullptr;
191 BLO_read_struct(reader, Stereo3dFormat, &win->stereo3d_format);
192
193 /* Multi-view always falls back to anaglyph at file opening
194 * otherwise quad-buffer saved files can break Blender. */
195 if (win->stereo3d_format) {
196 win->stereo3d_format->display_mode = S3D_DISPLAY_ANAGLYPH;
197 }
198 win->runtime = MEM_new<blender::bke::WindowRuntime>(__func__);
199 }
200
201 direct_link_wm_xr_data(reader, &wm->xr);
202
206
208 wm->defaultconf = nullptr;
209 wm->addonconf = nullptr;
210 wm->userconf = nullptr;
211 wm->undo_stack = nullptr;
212
213 wm->message_bus = nullptr;
214
215 wm->xr.runtime = nullptr;
216
219
220 wm->windrawable = nullptr;
221 wm->winactive = nullptr;
222 wm->init_flag = 0;
223 wm->op_undo_depth = 0;
225 wm->extensions_blocked = 0;
226
227 BLI_assert(wm->runtime == nullptr);
228 wm->runtime = MEM_new<blender::bke::WindowManagerRuntime>(__func__);
229}
230
232{
233 wmWindowManager *wm = reinterpret_cast<wmWindowManager *>(id);
234
235 LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
236 LISTBASE_FOREACH (ScrArea *, area, &win->global_areas.areabase) {
238 }
239 }
240}
241
243 /*id_code*/ wmWindowManager::id_type,
244 /*id_filter*/ FILTER_ID_WM,
245 /*dependencies_id_types*/ FILTER_ID_SCE | FILTER_ID_WS,
246 /*main_listbase_index*/ INDEX_ID_WM,
247 /*struct_size*/ sizeof(wmWindowManager),
248 /*name*/ "WindowManager",
249 /*name_plural*/ N_("window_managers"),
250 /*translation_context*/ BLT_I18NCONTEXT_ID_WINDOWMANAGER,
253 /*asset_type_info*/ nullptr,
254
255 /*init_data*/ nullptr,
256 /*copy_data*/ nullptr,
257 /*free_data*/ window_manager_free_data,
258 /*make_local*/ nullptr,
259 /*foreach_id*/ window_manager_foreach_id,
260 /*foreach_cache*/ nullptr,
261 /*foreach_path*/ nullptr,
262 /*owner_pointer_get*/ nullptr,
263
264 /*blend_write*/ window_manager_blend_write,
265 /*blend_read_data*/ window_manager_blend_read_data,
266 /*blend_read_after_liblink*/ window_manager_blend_read_after_liblink,
267
268 /*blend_read_undo_preserve*/ nullptr,
269
270 /*lib_override_apply_post*/ nullptr,
271};
272
273#define MAX_OP_REGISTERED 32
274
276{
277
278#ifdef WITH_PYTHON
279 if (op->py_instance) {
280 /* Do this first in case there are any __del__ functions or similar that use properties. */
282 }
283#endif
284
285 if (op->ptr) {
286 op->properties = static_cast<IDProperty *>(op->ptr->data);
287 MEM_delete(op->ptr);
288 }
289
290 if (op->properties) {
292 }
293
294 if (op->reports && (op->reports->flag & RPT_FREE)) {
296 MEM_freeN(op->reports);
297 }
298
299 if (op->macro.first) {
300 wmOperator *opm, *opmnext;
301 for (opm = static_cast<wmOperator *>(op->macro.first); opm; opm = opmnext) {
302 opmnext = opm->next;
303 WM_operator_free(opm);
304 }
305 }
306
307 MEM_freeN(op);
308}
309
311{
312 op = op->next;
313 while (op != nullptr) {
314 wmOperator *op_next = op->next;
315 BLI_remlink(&wm->operators, op);
317 op = op_next;
318 }
319}
320
322{
323 /* Not supported for Python. */
324 BLI_assert(op->py_instance == nullptr);
325
326 op->type = ot;
327 op->ptr->type = ot->srna;
328
329 /* Ensure compatible properties. */
330 if (op->properties) {
333
335
336 if (ptr.data) {
337 IDP_SyncGroupTypes(op->properties, static_cast<const IDProperty *>(ptr.data), true);
338 }
339
341 }
342}
343
345{
346 WM_event_timer_remove(wm, nullptr, wm->runtime->reports.reporttimer);
347}
348
350{
352 int tot = 0;
353
354 BLI_addtail(&wm->operators, op);
355
356 /* Only count registered operators. */
357 while (op) {
358 wmOperator *op_prev = op->prev;
359 if (op->type->flag & OPTYPE_REGISTER) {
360 tot += 1;
361 }
362 if (tot > MAX_OP_REGISTERED) {
363 BLI_remlink(&wm->operators, op);
365 }
366 op = op_prev;
367 }
368
369 /* So the console is redrawn. */
372}
373
375{
376 while (wmOperator *op = static_cast<wmOperator *>(BLI_pophead(&wm->operators))) {
378 }
379
381}
382
384{
385 LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
387 LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
388 switch (area->spacetype) {
389 case SPACE_FILE: {
390 SpaceFile *sfile = static_cast<SpaceFile *>(area->spacedata.first);
391 if (sfile->op && sfile->op->type == ot) {
392 /* Freed as part of the handler. */
393 sfile->op = nullptr;
394 }
395 break;
396 }
397 }
398 }
399 }
400
401 LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
402 ListBase *lb[2] = {&win->handlers, &win->modalhandlers};
403 for (int i = 0; i < ARRAY_SIZE(lb); i++) {
404 LISTBASE_FOREACH (wmEventHandler *, handler_base, lb[i]) {
405 if (handler_base->type == WM_HANDLER_TYPE_OP) {
406 wmEventHandler_Op *handler = (wmEventHandler_Op *)handler_base;
407 if (handler->op && handler->op->type == ot) {
408 /* Don't run op->cancel because it needs the context,
409 * assume whoever unregisters the operator will cleanup. */
410 handler->head.flag |= WM_HANDLER_DO_FREE;
411 WM_operator_free(handler->op);
412 handler->op = nullptr;
413 }
414 }
415 }
416 }
417 }
418}
419
420/* ****************************************** */
421
423{
424 if (CTX_py_init_get(C) && !G.background) {
425#ifdef WITH_PYTHON
426 const char *imports[] = {"bpy", nullptr};
427 BPY_run_string_eval(C, imports, "bpy.utils.keyconfig_init()");
428#endif
429 }
430}
431
433{
435
436 /* Create standard key configuration. */
437 if (wm->defaultconf == nullptr) {
438 /* Keep lowercase to match the preset filename. */
440 }
441 if (wm->addonconf == nullptr) {
442 wm->addonconf = WM_keyconfig_new(wm, WM_KEYCONFIG_STR_DEFAULT " addon", false);
443 }
444 if (wm->userconf == nullptr) {
445 wm->userconf = WM_keyconfig_new(wm, WM_KEYCONFIG_STR_DEFAULT " user", false);
446 }
447
448 /* Initialize only after python init is done, for keymaps that use python operators. */
449 if (CTX_py_init_get(C) && (wm->init_flag & WM_INIT_FLAG_KEYCONFIG) == 0) {
450 /* Create default key config, only initialize once,
451 * it's persistent across sessions. */
452 if (!(wm->defaultconf->flag & KEYCONF_INIT_DEFAULT)) {
455
457
459 }
460
461 /* Harmless, but no need to update in background mode. */
462 if (!G.background) {
463 WM_keyconfig_update_tag(nullptr, nullptr);
464 }
465 /* Don't call #WM_keyconfig_update here because add-ons have not yet been registered yet. */
466
468 }
469}
470
472{
473 Main *bmain = CTX_data_main(C);
475
476 /* WM context. */
477 if (wm == nullptr) {
478 wm = static_cast<wmWindowManager *>(bmain->wm.first);
480 }
481
482 if (wm == nullptr || BLI_listbase_is_empty(&wm->windows)) {
483 return;
484 }
485
486 /* Run before loading the keyconfig. */
487 if (wm->message_bus == nullptr) {
489 }
490
491 if (!G.background) {
492 /* Case: file-read. */
493 if ((wm->init_flag & WM_INIT_FLAG_WINDOW) == 0) {
496 }
497
498 /* Case: no open windows at all, for old file reads. */
500 }
501
502 /* Case: file-read. */
503 /* NOTE: this runs in background mode to set the screen context cb. */
504 if ((wm->init_flag & WM_INIT_FLAG_WINDOW) == 0) {
505 ED_screens_init(C, bmain, wm);
507 }
508}
509
511{
513
514 /* WM context. */
515 if (wm == nullptr) {
516 wm = static_cast<wmWindowManager *>(CTX_data_main(C)->wm.first);
518 }
519
520 if (wm == nullptr || BLI_listbase_is_empty(&wm->windows)) {
521 return;
522 }
523
524 LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
525 win->sizex = 0;
526 win->sizey = 0;
527 win->posx = 0;
528 win->posy = 0;
529 }
530}
531
533{
534 wmWindowManager *wm = static_cast<wmWindowManager *>(
535 BKE_libblock_alloc(bmain, ID_WM, "WinMan", 0));
536 wmWindow *win;
537 bScreen *screen = CTX_wm_screen(C); /* XXX: from file read hrmf. */
538 WorkSpace *workspace;
539 WorkSpaceLayout *layout = BKE_workspace_layout_find_global(bmain, screen, &workspace);
540
541 BKE_reports_init(&wm->runtime->reports, RPT_STORE);
542
544 win = wm_window_new(bmain, wm, nullptr, false);
545 win->scene = CTX_data_scene(C);
548 BKE_workspace_active_layout_set(win->workspace_hook, win->winid, workspace, layout);
549 screen->winid = win->winid;
550
551 wm->winactive = win;
552 wm->file_saved = 1;
553 wm->runtime = MEM_new<blender::bke::WindowManagerRuntime>(__func__);
555}
556
558{
559 /* NOTE: this also runs when built without `WITH_XR_OPENXR`.
560 * It's necessary to prevent leaks when XR data is created or loaded into non XR builds.
561 * This can occur when Python reads all properties (see the `bl_rna_paths` test). */
562
563 /* Note that non-runtime data in `wm->xr` is freed as part of freeing the window manager. */
566 wm->xr.session_settings.shading.prop = nullptr;
567 }
568}
569
571{
572 if (wm->autosavetimer) {
574 }
575
576#ifdef WITH_XR_OPENXR
577 /* May send notifier, so do before freeing notifier queue. */
578 wm_xr_exit(wm);
579#endif
580 wm_xr_data_free(wm);
581
582 while (wmWindow *win = static_cast<wmWindow *>(BLI_pophead(&wm->windows))) {
583 /* Prevent draw clear to use screen. */
584 BKE_workspace_active_set(win->workspace_hook, nullptr);
585 wm_window_free(C, wm, win);
586 }
587
588 while (wmOperator *op = static_cast<wmOperator *>(BLI_pophead(&wm->operators))) {
590 }
591
592 while (wmKeyConfig *keyconf = static_cast<wmKeyConfig *>(BLI_pophead(&wm->keyconfigs))) {
593 WM_keyconfig_free(keyconf);
594 }
595
596 if (wm->message_bus != nullptr) {
598 }
599
600#ifdef WITH_PYTHON
602#endif
604
606
607 wm_reports_free(wm);
608
609 /* NOTE(@ideasman42): typically timers are associated with windows and timers will have been
610 * freed when the windows are removed. However timers can be created which don't have windows
611 * and in this case it's necessary to free them on exit, see: #109953. */
613
614 if (wm->undo_stack) {
616 wm->undo_stack = nullptr;
617 }
618
619 if (C && CTX_wm_manager(C) == wm) {
620 CTX_wm_manager_set(C, nullptr);
621 }
622
623 MEM_delete(wm->runtime);
624}
625
627{
628 /* Single refresh before handling events.
629 * This ensures we don't run operators before the depsgraph has been evaluated. */
631
632 while (true) {
633
634 /* Get events from ghost, handle window events, add to window queues. */
636
637 /* Per window, all events to the window, screen, area and region handlers. */
639
640 /* Events have left notes about changes, we handle and cache it. */
642
643 /* Execute cached changes draw. */
645 }
646}
bScreen * CTX_wm_screen(const bContext *C)
bool CTX_py_init_get(bContext *C)
void CTX_wm_manager_set(bContext *C, wmWindowManager *wm)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
void IDP_FreeProperty(IDProperty *prop)
Definition idprop.cc:1243
void IDP_SyncGroupTypes(IDProperty *dest, const IDProperty *src, bool do_arraylen) ATTR_NONNULL()
Definition idprop.cc:607
@ IDTYPE_FLAGS_NO_ANIMDATA
Definition BKE_idtype.hh:46
@ IDTYPE_FLAGS_NO_COPY
Definition BKE_idtype.hh:30
@ IDTYPE_FLAGS_NO_LIBLINKING
Definition BKE_idtype.hh:32
@ IDTYPE_FLAGS_NO_MEMFILE_UNDO
Definition BKE_idtype.hh:55
@ IDTYPE_FLAGS_NEVER_UNUSED
Definition BKE_idtype.hh:69
IDTypeInfo IDType_ID_WM
Definition wm.cc:242
void * BKE_libblock_alloc(Main *bmain, short type, const char *name, int flag) ATTR_WARN_UNUSED_RESULT
Definition lib_id.cc:1428
void id_us_ensure_real(ID *id)
Definition lib_id.cc:308
void BKE_id_blend_write(BlendWriter *writer, ID *id)
Definition lib_id.cc:2611
#define BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL(data_, func_call_)
void BKE_lib_query_foreachid_process(LibraryForeachIDData *data, ID **id_pp, LibraryForeachIDCallbackFlag cb_flag)
Definition lib_query.cc:78
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(data_, id_super_, cb_flag_)
@ IDWALK_CB_USER_ONE
@ IDWALK_CB_USER
@ IDWALK_CB_NOP
LibraryForeachIDFlag BKE_lib_query_foreachid_process_flags_get(const LibraryForeachIDData *data)
Definition lib_query.cc:129
bool BKE_lib_query_foreachid_iter_stop(const LibraryForeachIDData *data)
Definition lib_query.cc:73
@ IDWALK_DO_DEPRECATED_POINTERS
@ IDWALK_INCLUDE_UI
void BKE_reports_free(ReportList *reports)
Definition report.cc:70
void BKE_reports_init(ReportList *reports, int flag)
Definition report.cc:55
void BKE_screen_view3d_shading_blend_read_data(BlendDataReader *reader, View3DShading *shading)
Definition screen.cc:1090
void BKE_screen_area_map_blend_write(BlendWriter *writer, ScrAreaMap *area_map)
Definition screen.cc:1191
void BKE_screen_area_blend_read_after_liblink(BlendLibReader *reader, ID *parent_id, ScrArea *area)
Definition screen.cc:1458
void BKE_screen_view3d_shading_blend_write(BlendWriter *writer, View3DShading *shading)
Definition screen.cc:1083
bool BKE_screen_area_map_blend_read_data(BlendDataReader *reader, ScrAreaMap *area_map)
Definition screen.cc:1412
void BKE_screen_foreach_id_screen_area(LibraryForeachIDData *data, ScrArea *area)
Definition screen.cc:92
void BKE_undosys_stack_destroy(UndoStack *ustack)
void BKE_workspace_active_layout_set(WorkSpaceInstanceHook *hook, int winid, WorkSpace *workspace, WorkSpaceLayout *layout) SETTER_ATTRS
Activate a layout.
Definition workspace.cc:603
bScreen * BKE_workspace_active_screen_get(const WorkSpaceInstanceHook *hook) GETTER_ATTRS
Definition workspace.cc:612
WorkSpace * BKE_workspace_active_get(WorkSpaceInstanceHook *hook) GETTER_ATTRS
Definition workspace.cc:561
void BKE_workspace_active_set(WorkSpaceInstanceHook *hook, WorkSpace *workspace) SETTER_ATTRS
Definition workspace.cc:565
WorkSpaceLayout * BKE_workspace_layout_find_global(const Main *bmain, const bScreen *screen, WorkSpace **r_workspace) ATTR_NONNULL(1
#define BLI_assert(a)
Definition BLI_assert.h:46
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
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_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:111
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:131
void * BLI_pophead(ListBase *listbase) ATTR_NONNULL(1)
Definition listbase.cc:252
char * STRNCPY(char(&dst)[N], const char *src)
Definition BLI_string.h:688
#define ARRAY_SIZE(arr)
#define BLO_write_id_struct(writer, struct_name, id_address, id)
#define BLO_write_struct(writer, struct_name, data_ptr)
void BLO_read_data_globmap_add(BlendDataReader *reader, void *oldaddr, void *newaddr)
Definition readfile.cc:5490
#define BLO_read_struct_list(reader, struct_name, list)
#define BLO_read_struct(reader, struct_name, ptr_p)
#define BLT_I18NCONTEXT_ID_WINDOWMANAGER
void BPY_DECREF_RNA_INVALIDATE(void *pyob_ptr)
void BPY_callback_wm_free(wmWindowManager *wm)
bool BPY_run_string_eval(bContext *C, const char *imports[], const char *expr)
@ INDEX_ID_WM
Definition DNA_ID.h:1263
@ ID_WM
@ S3D_DISPLAY_ANAGLYPH
@ SPACE_FILE
@ WM_INIT_FLAG_KEYCONFIG
@ WM_INIT_FLAG_WINDOW
@ KEYCONF_INIT_DEFAULT
#define WM_KEYCONFIG_STR_DEFAULT
@ WM_EXTENSIONS_UPDATE_UNSET
void ED_spacetypes_keymap(wmKeyConfig *keyconf)
void ED_screens_init(bContext *C, Main *bmain, wmWindowManager *wm)
Read Guarded memory(de)allocation.
#define C
Definition RandGen.cpp:29
@ WM_HANDLER_DO_FREE
Definition WM_api.hh:549
#define NC_WM
Definition WM_types.hh:371
@ OPTYPE_REGISTER
Definition WM_types.hh:180
#define ND_SPACE_INFO_REPORT
Definition WM_types.hh:517
#define ND_HISTORY
Definition WM_types.hh:412
#define NC_SPACE
Definition WM_types.hh:389
BMesh const char void * data
#define FILTER_ID_WM
#define FILTER_ID_WS
#define FILTER_ID_SCE
void MEM_freeN(void *vmemh)
Definition mallocn.cc:113
#define G(x, y, z)
Definition DNA_ID.h:404
void * first
ListBase wm
Definition BKE_main.hh:276
StructRNA * type
Definition RNA_types.hh:52
void * data
Definition RNA_types.hh:53
struct wmOperator * op
struct IDProperty * prop
Wrapper for bScreen.
Object * base_pose_object
struct View3DShading shading
ListBase areabase
wmEventHandler head
eWM_EventHandlerFlag flag
struct ReportList * reports
IDProperty * properties
struct wmOperator * next
struct wmOperator * prev
struct wmOperatorType * type
struct PointerRNA * ptr
struct wmMsgBus * message_bus
struct wmKeyConfig * defaultconf
WindowManagerRuntimeHandle * runtime
struct UndoStack * undo_stack
struct wmWindow * winactive
struct wmKeyConfig * userconf
struct wmTimer * autosavetimer
struct wmWindow * windrawable
struct wmKeyConfig * addonconf
struct wmWindow * parent
struct Scene * scene
struct WorkSpaceInstanceHook * workspace_hook
XrSessionSettings session_settings
struct wmXrRuntimeData * runtime
i
Definition text_draw.cc:230
#define N_(msgid)
void WM_main(bContext *C)
Definition wm.cc:626
void wm_close_and_free(bContext *C, wmWindowManager *wm)
Definition wm.cc:570
static void wm_xr_data_free(wmWindowManager *wm)
Definition wm.cc:557
void wm_clear_default_size(bContext *C)
Definition wm.cc:510
void WM_operator_stack_clear(wmWindowManager *wm)
Definition wm.cc:374
static void window_manager_blend_read_data(BlendDataReader *reader, ID *id)
Definition wm.cc:141
static void window_manager_free_data(ID *id)
Definition wm.cc:64
void WM_operator_type_set(wmOperator *op, wmOperatorType *ot)
Definition wm.cc:321
static void window_manager_blend_read_after_liblink(BlendLibReader *reader, ID *id)
Definition wm.cc:231
static void direct_link_wm_xr_data(BlendDataReader *reader, wmXrData *xr_data)
Definition wm.cc:136
void WM_keyconfig_init(bContext *C)
Definition wm.cc:432
void wm_operator_register(bContext *C, wmOperator *op)
Definition wm.cc:349
static void wm_reports_free(wmWindowManager *wm)
Definition wm.cc:344
void WM_operator_handlers_clear(wmWindowManager *wm, wmOperatorType *ot)
Definition wm.cc:383
void WM_check(bContext *C)
Definition wm.cc:471
void WM_keyconfig_reload(bContext *C)
Definition wm.cc:422
static void window_manager_blend_write(BlendWriter *writer, ID *id, const void *id_address)
Definition wm.cc:111
#define MAX_OP_REGISTERED
Definition wm.cc:273
void wm_add_default(Main *bmain, bContext *C)
Definition wm.cc:532
static void write_wm_xr_data(BlendWriter *writer, wmXrData *xr_data)
Definition wm.cc:106
void WM_operator_free_all_after(wmWindowManager *wm, wmOperator *op)
Definition wm.cc:310
void WM_operator_free(wmOperator *op)
Definition wm.cc:275
static void window_manager_foreach_id(ID *id, LibraryForeachIDData *data)
Definition wm.cc:69
void WM_drag_free_list(ListBase *lb)
void wm_draw_update(bContext *C)
Definition wm_draw.cc:1581
void wm_event_do_handlers(bContext *C)
void wm_event_do_refresh_wm_and_depsgraph(bContext *C)
void WM_main_add_notifier(uint type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void wm_event_do_notifiers(bContext *C)
@ WM_HANDLER_TYPE_OP
@ EVENT_NONE
void WM_file_autosave_init(wmWindowManager *wm)
Definition wm_files.cc:2382
void wm_autosave_timer_end(wmWindowManager *wm)
Definition wm_files.cc:2374
PointerRNA * ptr
Definition wm_files.cc:4226
wmOperatorType * ot
Definition wm_files.cc:4225
wmKeyConfig * WM_keyconfig_new(wmWindowManager *wm, const char *idname, bool user_defined)
Definition wm_keymap.cc:291
void WM_keyconfig_free(wmKeyConfig *keyconf)
Definition wm_keymap.cc:361
void WM_keyconfig_update_tag(wmKeyMap *keymap, wmKeyMapItem *kmi)
void WM_msgbus_destroy(wmMsgBus *mbus)
wmMsgBus * WM_msgbus_create()
void wm_window_keymap(wmKeyConfig *keyconf)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
bool WM_operator_properties_default(PointerRNA *ptr, const bool do_update)
void WM_operator_properties_free(PointerRNA *ptr)
wmWindow * wm_window_new(const Main *bmain, wmWindowManager *wm, wmWindow *parent, bool dialog)
Definition wm_window.cc:313
void WM_event_timers_free_all(wmWindowManager *wm)
void wm_window_events_process(const bContext *C)
void wm_window_make_drawable(wmWindowManager *wm, wmWindow *win)
void wm_window_free(bContext *C, wmWindowManager *wm, wmWindow *win)
Definition wm_window.cc:239
void WM_event_timer_remove(wmWindowManager *wm, wmWindow *, wmTimer *timer)
void wm_window_ghostwindows_ensure(wmWindowManager *wm)
Definition wm_window.cc:989
bScreen * WM_window_get_active_screen(const wmWindow *win)
uint8_t flag
Definition wm_window.cc:139
void wm_xr_exit(wmWindowManager *wm)
Definition wm_xr.cc:132