Blender V4.3
DNA_windowmanager_types.h File Reference
#include "DNA_listBase.h"
#include "DNA_screen_types.h"
#include "DNA_xr_types.h"
#include "DNA_ID.h"

Go to the source code of this file.

Classes

struct  Report
 
struct  ReportList
 
struct  ReportTimerInfo
 
struct  wmXrData
 
struct  wmWindowManager
 
struct  wmWindow
 
struct  wmOperatorTypeMacro
 
struct  wmKeyMapItem
 
struct  wmKeyMapDiffItem
 
struct  wmKeyMap
 
struct  wmKeyConfigPref
 
struct  wmKeyConfig
 
struct  wmOperator
 

Macros

#define std_mutex_type   void
 
#define OP_MAX_TYPENAME   64
 
#define KMAP_MAX_NAME   64
 
#define RPT_DEBUG_ALL   (RPT_DEBUG)
 
#define RPT_INFO_ALL   (RPT_INFO)
 
#define RPT_OPERATOR_ALL   (RPT_OPERATOR)
 
#define RPT_PROPERTY_ALL   (RPT_PROPERTY)
 
#define RPT_WARNING_ALL   (RPT_WARNING)
 
#define RPT_ERROR_ALL    (RPT_ERROR | RPT_ERROR_INVALID_INPUT | RPT_ERROR_INVALID_CONTEXT | RPT_ERROR_OUT_OF_MEMORY)
 
#define WM_KEYCONFIG_ARRAY_P(wm)   &(wm)->defaultconf, &(wm)->addonconf, &(wm)->userconf
 
#define WM_OUTLINER_SYNC_SELECT_FROM_ALL
 
#define WM_KEYCONFIG_STR_DEFAULT   "Blender"
 
#define OPERATOR_FLAGS_ALL
 
#define OPERATOR_RETVAL_CHECK(ret)    (void)ret, BLI_assert(ret != 0 && (ret & OPERATOR_FLAGS_ALL) == ret)
 

Typedefs

typedef struct WindowManagerRuntimeHandle WindowManagerRuntimeHandle
 
typedef enum eReportType eReportType
 
typedef struct Report Report
 
typedef struct ReportList ReportList
 
typedef struct ReportTimerInfo ReportTimerInfo
 
typedef struct wmXrData wmXrData
 
typedef struct wmWindowManager wmWindowManager
 
typedef struct wmWindow wmWindow
 
typedef struct wmOperatorTypeMacro wmOperatorTypeMacro
 
typedef struct wmKeyMapItem wmKeyMapItem
 
typedef struct wmKeyMapDiffItem wmKeyMapDiffItem
 
typedef struct wmKeyMap wmKeyMap
 
typedef struct wmKeyConfigPref wmKeyConfigPref
 
typedef struct wmKeyConfig wmKeyConfig
 
typedef struct wmOperator wmOperator
 

Enumerations

enum  eReportType {
  RPT_DEBUG = (1 << 0) , RPT_INFO = (1 << 1) , RPT_OPERATOR = (1 << 2) , RPT_PROPERTY = (1 << 3) ,
  RPT_WARNING = (1 << 4) , RPT_ERROR = (1 << 5) , RPT_ERROR_INVALID_INPUT = (1 << 6) , RPT_ERROR_INVALID_CONTEXT = (1 << 7) ,
  RPT_ERROR_OUT_OF_MEMORY = (1 << 8)
}
 
enum  ReportListFlags {
  RPT_PRINT = (1 << 0) , RPT_STORE = (1 << 1) , RPT_FREE = (1 << 2) , RPT_OP_HOLD = (1 << 3) ,
  RPT_PRINT_HANDLED_BY_OWNER = (1 << 4)
}
 
enum  { WM_EXTENSIONS_UPDATE_UNSET = -2 , WM_EXTENSIONS_UPDATE_CHECKING = -1 }
 
enum  { WM_INIT_FLAG_WINDOW = (1 << 0) , WM_INIT_FLAG_KEYCONFIG = (1 << 1) }
 
enum  { WM_OUTLINER_SYNC_SELECT_FROM_OBJECT = (1 << 0) , WM_OUTLINER_SYNC_SELECT_FROM_EDIT_BONE = (1 << 1) , WM_OUTLINER_SYNC_SELECT_FROM_POSE_BONE = (1 << 2) , WM_OUTLINER_SYNC_SELECT_FROM_SEQUENCE = (1 << 3) }
 
enum  {
  KMI_INACTIVE = (1 << 0) , KMI_EXPANDED = (1 << 1) , KMI_USER_MODIFIED = (1 << 2) , KMI_UPDATE = (1 << 3) ,
  KMI_REPEAT_IGNORE = (1 << 4)
}
 
enum  {
  KMI_TYPE_KEYBOARD = 0 , KMI_TYPE_MOUSE = 1 , KMI_TYPE_TEXTINPUT = 3 , KMI_TYPE_TIMER = 4 ,
  KMI_TYPE_NDOF = 5
}
 
enum  {
  KEYMAP_MODAL = (1 << 0) , KEYMAP_USER = (1 << 1) , KEYMAP_EXPANDED = (1 << 2) , KEYMAP_CHILDREN_EXPANDED = (1 << 3) ,
  KEYMAP_DIFF = (1 << 4) , KEYMAP_USER_MODIFIED = (1 << 5) , KEYMAP_UPDATE = (1 << 6) , KEYMAP_TOOL = (1 << 7)
}
 
enum  { KEYCONF_USER = (1 << 1) , KEYCONF_INIT_DEFAULT = (1 << 2) }
 
enum  {
  OPERATOR_RUNNING_MODAL = (1 << 0) , OPERATOR_CANCELLED = (1 << 1) , OPERATOR_FINISHED = (1 << 2) , OPERATOR_PASS_THROUGH = (1 << 3) ,
  OPERATOR_HANDLED = (1 << 4) , OPERATOR_INTERFACE = (1 << 5)
}
 
enum  {
  OP_IS_INVOKE = (1 << 0) , OP_IS_REPEAT = (1 << 1) , OP_IS_REPEAT_LAST = (1 << 2) , OP_IS_MODAL_GRAB_CURSOR = (1 << 3) ,
  OP_IS_MODAL_CURSOR_REGION = (1 << 4)
}
 

Macro Definition Documentation

◆ KMAP_MAX_NAME

◆ OP_MAX_TYPENAME

◆ OPERATOR_FLAGS_ALL

◆ OPERATOR_RETVAL_CHECK

◆ RPT_DEBUG_ALL

◆ RPT_ERROR_ALL

◆ RPT_INFO_ALL

◆ RPT_OPERATOR_ALL

#define RPT_OPERATOR_ALL   (RPT_OPERATOR)

Definition at line 78 of file DNA_windowmanager_types.h.

Referenced by info_report_mask(), and report_replay_exec().

◆ RPT_PROPERTY_ALL

#define RPT_PROPERTY_ALL   (RPT_PROPERTY)

Definition at line 79 of file DNA_windowmanager_types.h.

Referenced by info_report_mask(), and report_replay_exec().

◆ RPT_WARNING_ALL

◆ std_mutex_type

#define std_mutex_type   void

Definition at line 21 of file DNA_windowmanager_types.h.

◆ WM_KEYCONFIG_ARRAY_P

#define WM_KEYCONFIG_ARRAY_P ( wm)    &(wm)->defaultconf, &(wm)->addonconf, &(wm)->userconf

Definition at line 237 of file DNA_windowmanager_types.h.

Referenced by WM_keyconfig_remove().

◆ WM_KEYCONFIG_STR_DEFAULT

#define WM_KEYCONFIG_STR_DEFAULT   "Blender"

◆ WM_OUTLINER_SYNC_SELECT_FROM_ALL

Typedef Documentation

◆ eReportType

typedef enum eReportType eReportType

Keep in sync with 'rna_enum_wm_report_items' in wm_rna.c.

◆ Report

typedef struct Report Report

◆ ReportList

typedef struct ReportList ReportList
Note
Saved in the wmWindowManager, don't remove.

◆ ReportTimerInfo

typedef struct ReportTimerInfo ReportTimerInfo

◆ WindowManagerRuntimeHandle

Workaround to forward-declare C++ type in C header.

Definition at line 31 of file DNA_windowmanager_types.h.

◆ wmKeyConfig

typedef struct wmKeyConfig wmKeyConfig

◆ wmKeyConfigPref

typedef struct wmKeyConfigPref wmKeyConfigPref

This is similar to addon-preferences, however unlike add-ons key-configurations aren't saved to disk.

wmKeyConfigPref is written to DNA, wmKeyConfigPrefType_Runtime has the RNA type.

◆ wmKeyMap

typedef struct wmKeyMap wmKeyMap

Stored in WM, the actively used key-maps.

◆ wmKeyMapDiffItem

typedef struct wmKeyMapDiffItem wmKeyMapDiffItem

Used instead of wmKeyMapItem for diff keymaps.

◆ wmKeyMapItem

typedef struct wmKeyMapItem wmKeyMapItem

Partial copy of the event, for matching by event handler.

◆ wmOperator

typedef struct wmOperator wmOperator

This one is the operator itself, stored in files for macros etc. operator + operator-type should be able to redo entirely, but for different context's.

◆ wmOperatorTypeMacro

typedef struct wmOperatorTypeMacro wmOperatorTypeMacro

◆ wmWindow

typedef struct wmWindow wmWindow

The saveable part, the rest of the data is local in GHOST.

◆ wmWindowManager

typedef struct wmWindowManager wmWindowManager

Window-manager is saved, tag WMAN.

◆ wmXrData

typedef struct wmXrData wmXrData

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

wmWindowManager.extensions_updates

Enumerator
WM_EXTENSIONS_UPDATE_UNSET 
WM_EXTENSIONS_UPDATE_CHECKING 

Definition at line 240 of file DNA_windowmanager_types.h.

◆ anonymous enum

anonymous enum

wmWindowManager.init_flag

Enumerator
WM_INIT_FLAG_WINDOW 
WM_INIT_FLAG_KEYCONFIG 

Definition at line 246 of file DNA_windowmanager_types.h.

◆ anonymous enum

anonymous enum

wmWindowManager.outliner_sync_select_dirty

Enumerator
WM_OUTLINER_SYNC_SELECT_FROM_OBJECT 
WM_OUTLINER_SYNC_SELECT_FROM_EDIT_BONE 
WM_OUTLINER_SYNC_SELECT_FROM_POSE_BONE 
WM_OUTLINER_SYNC_SELECT_FROM_SEQUENCE 

Definition at line 252 of file DNA_windowmanager_types.h.

◆ anonymous enum

anonymous enum

wmKeyMapItem.flag

Enumerator
KMI_INACTIVE 
KMI_EXPANDED 
KMI_USER_MODIFIED 
KMI_UPDATE 
KMI_REPEAT_IGNORE 

When set, ignore events with wmEvent.flag & WM_EVENT_IS_REPEAT enabled.

Note
this flag isn't cleared when editing/loading the key-map items, so it may be set in cases which don't make sense (modifier-keys or mouse-motion for example).

Knowing if an event may repeat is something set at the operating-systems event handling level so rely on WM_EVENT_IS_REPEAT being false non keyboard events instead of checking if this flag makes sense.

Only used when: ISKEYBOARD(kmi->type) || (kmi->type == KM_TEXTINPUT) as mouse, 3d-mouse, timer... etc never repeat.

Definition at line 505 of file DNA_windowmanager_types.h.

◆ anonymous enum

anonymous enum

wmKeyMapItem.maptype

Enumerator
KMI_TYPE_KEYBOARD 
KMI_TYPE_MOUSE 
KMI_TYPE_TEXTINPUT 
KMI_TYPE_TIMER 
KMI_TYPE_NDOF 

Definition at line 527 of file DNA_windowmanager_types.h.

◆ anonymous enum

anonymous enum

wmKeyMap.flag

Enumerator
KEYMAP_MODAL 

Modal map, not using operator-names.

KEYMAP_USER 

User key-map.

KEYMAP_EXPANDED 
KEYMAP_CHILDREN_EXPANDED 
KEYMAP_DIFF 

Diff key-map for user preferences.

KEYMAP_USER_MODIFIED 

Key-map has user modifications.

KEYMAP_UPDATE 
KEYMAP_TOOL 

key-map for active tool system.

Definition at line 569 of file DNA_windowmanager_types.h.

◆ anonymous enum

anonymous enum

wmKeyConfig.flag

Enumerator
KEYCONF_USER 
KEYCONF_INIT_DEFAULT 

Definition at line 614 of file DNA_windowmanager_types.h.

◆ anonymous enum

anonymous enum

Operator type return flags: exec(), invoke() modal(), return values.

Enumerator
OPERATOR_RUNNING_MODAL 
OPERATOR_CANCELLED 
OPERATOR_FINISHED 
OPERATOR_PASS_THROUGH 

Add this flag if the event should pass through.

OPERATOR_HANDLED 

In case operator got executed outside WM code (like via file-select).

OPERATOR_INTERFACE 

Used for operators that act indirectly (eg. popup menu).

Note
this isn't great design (using operators to trigger UI) avoid where possible.

Definition at line 658 of file DNA_windowmanager_types.h.

◆ anonymous enum

anonymous enum

wmOperator.flag

Enumerator
OP_IS_INVOKE 

Low level flag so exec() operators can tell if they were invoked, use with care. Typically this shouldn't make any difference, but it rare cases its needed (see smooth-view).

OP_IS_REPEAT 

So we can detect if an operators exec() call is activated by adjusting the last action.

OP_IS_REPEAT_LAST 

So we can detect if an operators exec() call is activated from SCREEN_OT_repeat_last.

This difference can be important because previous settings may be used, even with PROP_SKIP_SAVE the repeat last operator will use the previous settings. Unlike OP_IS_REPEAT the selection (and context generally) may be different each time. See #60777 for an example of when this is needed.

OP_IS_MODAL_GRAB_CURSOR 

When the cursor is grabbed

OP_IS_MODAL_CURSOR_REGION 

Allow modal operators to have the region under the cursor for their context (the region-type is maintained to prevent errors).

Definition at line 681 of file DNA_windowmanager_types.h.

◆ eReportType

Keep in sync with 'rna_enum_wm_report_items' in wm_rna.c.

Enumerator
RPT_DEBUG 
RPT_INFO 
RPT_OPERATOR 
RPT_PROPERTY 
RPT_WARNING 
RPT_ERROR 
RPT_ERROR_INVALID_INPUT 
RPT_ERROR_INVALID_CONTEXT 
RPT_ERROR_OUT_OF_MEMORY 

Definition at line 63 of file DNA_windowmanager_types.h.

◆ ReportListFlags

Enumerator
RPT_PRINT 
RPT_STORE 
RPT_FREE 
RPT_OP_HOLD 
RPT_PRINT_HANDLED_BY_OWNER 

Don't print (the owner of the ReportList will handle printing to the stdout).

Definition at line 84 of file DNA_windowmanager_types.h.