Blender  V3.3
Classes | Macros | Typedefs | Enumerations
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 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_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 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) }
 
enum  { WM_WINDOW_IS_INIT = (1 << 0) , WM_KEYCONFIG_IS_INIT = (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 << 1) , OP_IS_MODAL_GRAB_CURSOR = (1 << 2) ,
  OP_IS_MODAL_CURSOR_REGION = (1 << 3)
}
 

Macro Definition Documentation

◆ KMAP_MAX_NAME

#define KMAP_MAX_NAME   64

Definition at line 45 of file DNA_windowmanager_types.h.

◆ OP_MAX_TYPENAME

#define OP_MAX_TYPENAME   64

Definition at line 44 of file DNA_windowmanager_types.h.

◆ OPERATOR_FLAGS_ALL

#define OPERATOR_FLAGS_ALL
Value:

Definition at line 571 of file DNA_windowmanager_types.h.

◆ OPERATOR_RETVAL_CHECK

#define OPERATOR_RETVAL_CHECK (   ret)     (void)ret, BLI_assert(ret != 0 && (ret & OPERATOR_FLAGS_ALL) == ret)

Definition at line 576 of file DNA_windowmanager_types.h.

◆ RPT_DEBUG_ALL

#define RPT_DEBUG_ALL   (RPT_DEBUG)

Definition at line 60 of file DNA_windowmanager_types.h.

◆ RPT_ERROR_ALL

Definition at line 65 of file DNA_windowmanager_types.h.

◆ RPT_INFO_ALL

#define RPT_INFO_ALL   (RPT_INFO)

Definition at line 61 of file DNA_windowmanager_types.h.

◆ RPT_OPERATOR_ALL

#define RPT_OPERATOR_ALL   (RPT_OPERATOR)

Definition at line 62 of file DNA_windowmanager_types.h.

◆ RPT_PROPERTY_ALL

#define RPT_PROPERTY_ALL   (RPT_PROPERTY)

Definition at line 63 of file DNA_windowmanager_types.h.

◆ RPT_WARNING_ALL

#define RPT_WARNING_ALL   (RPT_WARNING)

Definition at line 64 of file DNA_windowmanager_types.h.

◆ WM_KEYCONFIG_STR_DEFAULT

#define WM_KEYCONFIG_STR_DEFAULT   "Blender"

Definition at line 213 of file DNA_windowmanager_types.h.

◆ WM_OUTLINER_SYNC_SELECT_FROM_ALL

#define WM_OUTLINER_SYNC_SELECT_FROM_ALL
Value:
WM_OUTLINER_SYNC_SELECT_FROM_POSE_BONE | WM_OUTLINER_SYNC_SELECT_FROM_SEQUENCE)
@ WM_OUTLINER_SYNC_SELECT_FROM_SEQUENCE
@ WM_OUTLINER_SYNC_SELECT_FROM_OBJECT
@ WM_OUTLINER_SYNC_SELECT_FROM_EDIT_BONE

Definition at line 209 of file DNA_windowmanager_types.h.

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 wm, don't remove.

◆ ReportTimerInfo

◆ wmKeyConfig

typedef struct wmKeyConfig wmKeyConfig

◆ wmKeyConfigPref

This is similar to addon-preferences, however unlike add-ons key-config's 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

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

◆ wmWindow

typedef struct wmWindow wmWindow

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

◆ wmWindowManager

Window-manager is saved, tag WMAN.

◆ wmXrData

typedef struct wmXrData wmXrData

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

wmWindowManager.initialized

Enumerator
WM_WINDOW_IS_INIT 
WM_KEYCONFIG_IS_INIT 

Definition at line 196 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 202 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 404 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 426 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 468 of file DNA_windowmanager_types.h.

◆ anonymous enum

anonymous enum

wmKeyConfig.flag

Enumerator
KEYCONF_USER 
KEYCONF_INIT_DEFAULT 

Definition at line 513 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 557 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 T60777 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 580 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 48 of file DNA_windowmanager_types.h.

◆ ReportListFlags

Enumerator
RPT_PRINT 
RPT_STORE 
RPT_FREE 
RPT_OP_HOLD 

Definition at line 68 of file DNA_windowmanager_types.h.