Blender V5.0
wm.cc File Reference
#include <cstring>
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
#include "BLT_translation.hh"
#include "BKE_context.hh"
#include "BKE_global.hh"
#include "BKE_idprop.hh"
#include "BKE_idtype.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_main.hh"
#include "BKE_report.hh"
#include "BKE_screen.hh"
#include "BKE_workspace.hh"
#include "WM_api.hh"
#include "WM_keymap.hh"
#include "WM_message.hh"
#include "WM_types.hh"
#include "wm.hh"
#include "wm_draw.hh"
#include "wm_event_system.hh"
#include "wm_window.hh"
#include "BKE_undo_system.hh"
#include "ED_screen.hh"
#include "BLO_read_write.hh"

Go to the source code of this file.

Macros

#define DNA_DEPRECATED_ALLOW
#define MAX_OP_REGISTERED   32

Functions

static void window_manager_free_data (ID *id)
static void window_manager_foreach_id (ID *id, LibraryForeachIDData *data)
static void write_wm_xr_data (BlendWriter *writer, wmXrData *xr_data)
static void window_manager_blend_write (BlendWriter *writer, ID *id, const void *id_address)
static void direct_link_wm_xr_data (BlendDataReader *reader, wmXrData *xr_data)
static void window_manager_blend_read_data (BlendDataReader *reader, ID *id)
static void window_manager_blend_read_after_liblink (BlendLibReader *reader, ID *id)
void WM_operator_free (wmOperator *op)
void WM_operator_free_all_after (wmWindowManager *wm, wmOperator *op)
void WM_operator_type_set (wmOperator *op, wmOperatorType *ot)
static void wm_reports_free (wmWindowManager *wm)
void wm_operator_register (bContext *C, wmOperator *op)
void WM_operator_stack_clear (wmWindowManager *wm)
void WM_operator_handlers_clear (wmWindowManager *wm, wmOperatorType *ot)
void WM_keyconfig_reload (bContext *C)
void WM_keyconfig_init (bContext *C)
void WM_check (bContext *C)
void wm_clear_default_size (bContext *C)
void wm_add_default (Main *bmain, bContext *C)
static void wm_xr_data_free (wmWindowManager *wm)
void wm_close_and_free (bContext *C, wmWindowManager *wm)
void WM_main (bContext *C)

Variables

IDTypeInfo IDType_ID_WM

Detailed Description

Internal functions for managing UI registerable types (operator, UI and menu types).

Also Blender's main event loop (WM_main).

Definition in file wm.cc.

Macro Definition Documentation

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 14 of file wm.cc.

◆ MAX_OP_REGISTERED

#define MAX_OP_REGISTERED   32

Definition at line 257 of file wm.cc.

Referenced by wm_operator_register().

Function Documentation

◆ direct_link_wm_xr_data()

void direct_link_wm_xr_data ( BlendDataReader * reader,
wmXrData * xr_data )
static

◆ window_manager_blend_read_after_liblink()

void window_manager_blend_read_after_liblink ( BlendLibReader * reader,
ID * id )
static

◆ window_manager_blend_read_data()

◆ window_manager_blend_write()

◆ window_manager_foreach_id()

◆ window_manager_free_data()

void window_manager_free_data ( ID * id)
static

Definition at line 64 of file wm.cc.

References wm_close_and_free().

◆ wm_add_default()

◆ WM_check()

◆ wm_clear_default_size()

◆ wm_close_and_free()

◆ WM_keyconfig_init()

◆ WM_keyconfig_reload()

void WM_keyconfig_reload ( bContext * C)

Definition at line 406 of file wm.cc.

References BPY_run_string_eval(), C, CTX_py_init_get(), and G.

Referenced by WM_keyconfig_init(), and wm_userpref_update_when_changed().

◆ WM_main()

◆ WM_operator_free()

◆ WM_operator_free_all_after()

void WM_operator_free_all_after ( wmWindowManager * wm,
wmOperator * op )

◆ WM_operator_handlers_clear()

void WM_operator_handlers_clear ( wmWindowManager * wm,
wmOperatorType * ot )

This function is needed in the case when an addon id disabled while a modal operator it defined is running.

Definition at line 367 of file wm.cc.

References bScreen::areabase, ARRAY_SIZE, wmEventHandler::flag, wmEventHandler_Op::head, i, LISTBASE_FOREACH, SpaceFile::op, wmEventHandler_Op::op, ot, SPACE_FILE, wmOperator::type, wmWindowManager::windows, WM_HANDLER_DO_FREE, WM_HANDLER_TYPE_OP, WM_operator_free(), and WM_window_get_active_screen().

Referenced by WM_event_add().

◆ wm_operator_register()

void wm_operator_register ( bContext * C,
wmOperator * op )

Called on event handling by event_system.c.

All operations get registered in the window-manager here.

Definition at line 333 of file wm.cc.

References BLI_addtail(), BLI_remlink(), C, CTX_wm_manager(), wmOperatorType::flag, MAX_OP_REGISTERED, NC_SPACE, NC_WM, ND_HISTORY, ND_SPACE_INFO_REPORT, OPTYPE_REGISTER, wmOperator::prev, wmWindowManager::runtime, wmOperator::type, WM_event_add_notifier(), and WM_operator_free().

Referenced by wm_block_redo_cb(), and wm_operator_finished().

◆ WM_operator_stack_clear()

◆ WM_operator_type_set()

void WM_operator_type_set ( wmOperator * op,
wmOperatorType * ot )

Use with extreme care! Properties, custom-data etc - must be compatible.

Parameters
opOperator to assign the type to.
otOperator type to assign.

Definition at line 305 of file wm.cc.

References BLI_assert, IDP_SyncGroupTypes(), ot, wmOperator::properties, ptr, wmOperator::ptr, wmOperator::py_instance, PointerRNA::type, wmOperator::type, WM_operator_properties_create_ptr(), WM_operator_properties_default(), and WM_operator_properties_free().

Referenced by blender::ed::transform::transform_modal(), view3d_navigate_modal_fn(), and WM_event_add().

◆ wm_reports_free()

void wm_reports_free ( wmWindowManager * wm)
static

Definition at line 328 of file wm.cc.

References wmWindowManager::runtime, and WM_event_timer_remove().

Referenced by wm_close_and_free().

◆ wm_xr_data_free()

void wm_xr_data_free ( wmWindowManager * wm)
static

◆ write_wm_xr_data()

void write_wm_xr_data ( BlendWriter * writer,
wmXrData * xr_data )
static

Variable Documentation

◆ IDType_ID_WM

IDTypeInfo IDType_ID_WM

Definition at line 225 of file wm.cc.