Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_workspace_types.h
| Context not available. | |||||
| /** \file | /** \file | ||||
| * \ingroup DNA | * \ingroup DNA | ||||
| * | * | ||||
| * Use API in BKE_workspace.h to edit these. | * Use API in BKE_workspace.h! | ||||
| * Struct members marked with DNA_PRIVATE_WORKSPACE will throw a | |||||
| * warning saying it's deprecated when used outside of workspace.c. | |||||
| */ | */ | ||||
| #ifndef __DNA_WORKSPACE_TYPES_H__ | #ifndef __DNA_WORKSPACE_TYPES_H__ | ||||
| Context not available. | |||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| /* Same logic as DNA_DEPRECATED_ALLOW, but throws 'deprecated' | |||||
| * warnings if DNA_PRIVATE_WORKSPACE_ALLOW is not defined */ | |||||
| #ifdef DNA_PRIVATE_WORKSPACE_ALLOW | |||||
| /* allow use of private items */ | |||||
| # define DNA_PRIVATE_WORKSPACE | |||||
| #else | |||||
| # ifndef DNA_PRIVATE_WORKSPACE | |||||
| # define DNA_PRIVATE_WORKSPACE DNA_PRIVATE_ATTR | |||||
| # endif | |||||
| #endif | |||||
| #ifdef DNA_PRIVATE_READ_WRITE_ALLOW | |||||
| # define DNA_PRIVATE_WORKSPACE_READ_WRITE | |||||
| #else | |||||
| # ifndef DNA_PRIVATE_WORKSPACE_READ_WRITE | |||||
| # define DNA_PRIVATE_WORKSPACE_READ_WRITE DNA_PRIVATE_WORKSPACE | |||||
| # endif | |||||
| #endif | |||||
| /* Currently testing, allow to disable. */ | /* Currently testing, allow to disable. */ | ||||
| #define USE_WORKSPACE_TOOL | #define USE_WORKSPACE_TOOL | ||||
| Context not available. | |||||
| /* The name of this layout, we override the RNA name of the screen with this | /* The name of this layout, we override the RNA name of the screen with this | ||||
| * (but not ID name itself) */ | * (but not ID name itself) */ | ||||
| /** MAX_NAME. */ | /** MAX_NAME. */ | ||||
| char name[64]; | char name[64] DNA_PRIVATE_WORKSPACE; | ||||
| } WorkSpaceLayout; | } WorkSpaceLayout; | ||||
| /** Optional tags, which features to use, aligned with #bAddon names by convention. */ | /** Optional tags, which features to use, aligned with #bAddon names by convention. */ | ||||
| typedef struct wmOwnerID { | typedef struct wmOwnerID { | ||||
| struct wmOwnerID *next, *prev; | struct wmOwnerID *next, *prev; | ||||
| /** MAX_NAME. */ | /** MAX_NAME. */ | ||||
| char name[64]; | char name[64] DNA_PRIVATE_WORKSPACE; | ||||
| } wmOwnerID; | } wmOwnerID; | ||||
| typedef struct WorkSpace { | typedef struct WorkSpace { | ||||
| ID id; | ID id; | ||||
| /** WorkSpaceLayout. */ | /** WorkSpaceLayout. */ | ||||
| ListBase layouts; | ListBase layouts DNA_PRIVATE_WORKSPACE; | ||||
| /* Store for each hook (so for each window) which layout has | /* Store for each hook (so for each window) which layout has | ||||
| * been activated the last time this workspace was visible. */ | * been activated the last time this workspace was visible. */ | ||||
| /** WorkSpaceDataRelation. */ | /** WorkSpaceDataRelation. */ | ||||
| ListBase hook_layout_relations; | ListBase hook_layout_relations DNA_PRIVATE_WORKSPACE_READ_WRITE; | ||||
| /* Feature tagging (use for addons) */ | /* Feature tagging (use for addons) */ | ||||
| /** #wmOwnerID. */ | /** #wmOwnerID. */ | ||||
| Context not available. | |||||
| char *status_text; | char *status_text; | ||||
| } WorkSpace; | } WorkSpace; | ||||
| /* internal struct, but exported for read/write */ | |||||
| #if defined(DNA_PRIVATE_READ_WRITE_ALLOW) || defined(DNA_PRIVATE_WORKSPACE_ALLOW) | |||||
| /** | /** | ||||
| * Generic (and simple/primitive) struct for storing a history of assignments/relations | * Generic (and simple/primitive) struct for storing a history of assignments/relations | ||||
| * of workspace data to non-workspace data in a listbase inside the workspace. | * of workspace data to non-workspace data in a listbase inside the workspace. | ||||
| Context not available. | |||||
| void *value; | void *value; | ||||
| } WorkSpaceDataRelation; | } WorkSpaceDataRelation; | ||||
| #endif /* DNA_PRIVATE_WORKSPACE_READ_WRITE */ | |||||
| /** | /** | ||||
| * Little wrapper to store data that is going to be per window, but coming from the workspace. | * Little wrapper to store data that is going to be per window, but coming from the workspace. | ||||
| * It allows us to keep workspace and window data completely separate. | * It allows us to keep workspace and window data completely separate. | ||||
| */ | */ | ||||
| typedef struct WorkSpaceInstanceHook { | typedef struct WorkSpaceInstanceHook { | ||||
| WorkSpace *active; | WorkSpace *active DNA_PRIVATE_WORKSPACE; | ||||
| struct WorkSpaceLayout *act_layout; | struct WorkSpaceLayout *act_layout DNA_PRIVATE_WORKSPACE; | ||||
| /* Needed because we can't change workspaces/layouts in running handler loop, | /* Needed because we can't change workspaces/layouts in running handler loop, | ||||
| * it would break context. */ | * it would break context. */ | ||||
| Context not available. | |||||