diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_workspace.h')
-rw-r--r-- | source/blender/blenkernel/BKE_workspace.h | 76 |
1 files changed, 36 insertions, 40 deletions
diff --git a/source/blender/blenkernel/BKE_workspace.h b/source/blender/blenkernel/BKE_workspace.h index 5595c874e27..43962c2eb35 100644 --- a/source/blender/blenkernel/BKE_workspace.h +++ b/source/blender/blenkernel/BKE_workspace.h @@ -30,10 +30,6 @@ struct bScreen; struct TransformOrientation; -typedef struct WorkSpace WorkSpace; -typedef struct WorkSpaceInstanceHook WorkSpaceInstanceHook; -typedef struct WorkSpaceLayout WorkSpaceLayout; - /** * Plan is to store the object-mode per workspace, not per object anymore. * However, there's quite some work to be done for that, so for now, there is just a basic @@ -48,41 +44,41 @@ typedef struct WorkSpaceLayout WorkSpaceLayout; /* -------------------------------------------------------------------- */ /* Create, delete, init */ -WorkSpace *BKE_workspace_add(struct Main *bmain, const char *name); -void BKE_workspace_free(WorkSpace *workspace); -void BKE_workspace_remove(struct Main *bmain, WorkSpace *workspace); +struct WorkSpace *BKE_workspace_add(struct Main *bmain, const char *name); +void BKE_workspace_free(struct WorkSpace *workspace); +void BKE_workspace_remove(struct Main *bmain, struct WorkSpace *workspace); -WorkSpaceInstanceHook *BKE_workspace_instance_hook_create(const struct Main *bmain); -void BKE_workspace_instance_hook_free(const struct Main *bmain, WorkSpaceInstanceHook *hook); +struct WorkSpaceInstanceHook *BKE_workspace_instance_hook_create(const struct Main *bmain); +void BKE_workspace_instance_hook_free(const struct Main *bmain, struct WorkSpaceInstanceHook *hook); struct WorkSpaceLayout *BKE_workspace_layout_add( - WorkSpace *workspace, + struct WorkSpace *workspace, struct bScreen *screen, const char *name) ATTR_NONNULL(); void BKE_workspace_layout_remove( struct Main *bmain, - WorkSpace *workspace, WorkSpaceLayout *layout) ATTR_NONNULL(); + struct WorkSpace *workspace, struct WorkSpaceLayout *layout) ATTR_NONNULL(); /* -------------------------------------------------------------------- */ /* General Utils */ void BKE_workspace_transform_orientation_remove( - WorkSpace *workspace, struct TransformOrientation *orientation) ATTR_NONNULL(); + struct WorkSpace *workspace, struct TransformOrientation *orientation) ATTR_NONNULL(); struct TransformOrientation *BKE_workspace_transform_orientation_find( - const WorkSpace *workspace, const int index) ATTR_NONNULL(); + const struct WorkSpace *workspace, const int index) ATTR_NONNULL(); int BKE_workspace_transform_orientation_get_index( - const WorkSpace *workspace, const struct TransformOrientation *orientation) ATTR_NONNULL(); + const struct WorkSpace *workspace, const struct TransformOrientation *orientation) ATTR_NONNULL(); -WorkSpaceLayout *BKE_workspace_layout_find( - const WorkSpace *workspace, const struct bScreen *screen) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT; -WorkSpaceLayout *BKE_workspace_layout_find_global( +struct WorkSpaceLayout *BKE_workspace_layout_find( + const struct WorkSpace *workspace, const struct bScreen *screen) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT; +struct WorkSpaceLayout *BKE_workspace_layout_find_global( const struct Main *bmain, const struct bScreen *screen, - WorkSpace **r_workspace) ATTR_NONNULL(1, 2); + struct WorkSpace **r_workspace) ATTR_NONNULL(1, 2); -WorkSpaceLayout *BKE_workspace_layout_iter_circular( - const WorkSpace *workspace, WorkSpaceLayout *start, - bool (*callback)(const WorkSpaceLayout *layout, void *arg), +struct WorkSpaceLayout *BKE_workspace_layout_iter_circular( + const struct WorkSpace *workspace, struct WorkSpaceLayout *start, + bool (*callback)(const struct WorkSpaceLayout *layout, void *arg), void *arg, const bool iter_backward); @@ -92,32 +88,32 @@ WorkSpaceLayout *BKE_workspace_layout_iter_circular( #define GETTER_ATTRS ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT #define SETTER_ATTRS ATTR_NONNULL(1) -WorkSpace *BKE_workspace_active_get(WorkSpaceInstanceHook *hook) GETTER_ATTRS; -void BKE_workspace_active_set(WorkSpaceInstanceHook *hook, WorkSpace *workspace) SETTER_ATTRS; -WorkSpaceLayout *BKE_workspace_active_layout_get(const WorkSpaceInstanceHook *hook) GETTER_ATTRS; -void BKE_workspace_active_layout_set(WorkSpaceInstanceHook *hook, WorkSpaceLayout *layout) SETTER_ATTRS; -struct bScreen *BKE_workspace_active_screen_get(const WorkSpaceInstanceHook *hook) GETTER_ATTRS; +struct WorkSpace *BKE_workspace_active_get(struct WorkSpaceInstanceHook *hook) GETTER_ATTRS; +void BKE_workspace_active_set(struct WorkSpaceInstanceHook *hook, struct WorkSpace *workspace) SETTER_ATTRS; +struct WorkSpaceLayout *BKE_workspace_active_layout_get(const struct WorkSpaceInstanceHook *hook) GETTER_ATTRS; +void BKE_workspace_active_layout_set(struct WorkSpaceInstanceHook *hook, struct WorkSpaceLayout *layout) SETTER_ATTRS; +struct bScreen *BKE_workspace_active_screen_get(const struct WorkSpaceInstanceHook *hook) GETTER_ATTRS; void BKE_workspace_active_screen_set( - WorkSpaceInstanceHook *hook, struct WorkSpace *workspace, struct bScreen *screen) SETTER_ATTRS; -enum ObjectMode BKE_workspace_object_mode_get(const WorkSpace *workspace) GETTER_ATTRS; + struct WorkSpaceInstanceHook *hook, struct WorkSpace *workspace, struct bScreen *screen) SETTER_ATTRS; +enum ObjectMode BKE_workspace_object_mode_get(const struct WorkSpace *workspace) GETTER_ATTRS; #ifdef USE_WORKSPACE_MODE -void BKE_workspace_object_mode_set(WorkSpace *workspace, const enum ObjectMode mode) SETTER_ATTRS; +void BKE_workspace_object_mode_set(struct WorkSpace *workspace, const enum ObjectMode mode) SETTER_ATTRS; #endif -struct ListBase *BKE_workspace_transform_orientations_get(WorkSpace *workspace) GETTER_ATTRS; -struct SceneLayer *BKE_workspace_render_layer_get(const WorkSpace *workspace) GETTER_ATTRS; -void BKE_workspace_render_layer_set(WorkSpace *workspace, struct SceneLayer *layer) SETTER_ATTRS; -struct ListBase *BKE_workspace_layouts_get(WorkSpace *workspace) GETTER_ATTRS; +struct ListBase *BKE_workspace_transform_orientations_get(struct WorkSpace *workspace) GETTER_ATTRS; +struct SceneLayer *BKE_workspace_render_layer_get(const struct WorkSpace *workspace) GETTER_ATTRS; +void BKE_workspace_render_layer_set(struct WorkSpace *workspace, struct SceneLayer *layer) SETTER_ATTRS; +struct ListBase *BKE_workspace_layouts_get(struct WorkSpace *workspace) GETTER_ATTRS; -const char *BKE_workspace_layout_name_get(const WorkSpaceLayout *layout) GETTER_ATTRS; +const char *BKE_workspace_layout_name_get(const struct WorkSpaceLayout *layout) GETTER_ATTRS; void BKE_workspace_layout_name_set( - WorkSpace *workspace, WorkSpaceLayout *layout, const char *new_name) ATTR_NONNULL(); -struct bScreen *BKE_workspace_layout_screen_get(const WorkSpaceLayout *layout) GETTER_ATTRS; -void BKE_workspace_layout_screen_set(WorkSpaceLayout *layout, struct bScreen *screen) SETTER_ATTRS; + struct WorkSpace *workspace, struct WorkSpaceLayout *layout, const char *new_name) ATTR_NONNULL(); +struct bScreen *BKE_workspace_layout_screen_get(const struct WorkSpaceLayout *layout) GETTER_ATTRS; +void BKE_workspace_layout_screen_set(struct WorkSpaceLayout *layout, struct bScreen *screen) SETTER_ATTRS; -WorkSpaceLayout *BKE_workspace_hook_layout_for_workspace_get( - const WorkSpaceInstanceHook *hook, const WorkSpace *workspace) GETTER_ATTRS; +struct WorkSpaceLayout *BKE_workspace_hook_layout_for_workspace_get( + const struct WorkSpaceInstanceHook *hook, const struct WorkSpace *workspace) GETTER_ATTRS; void BKE_workspace_hook_layout_for_workspace_set( - WorkSpaceInstanceHook *hook, WorkSpace *workspace, WorkSpaceLayout *layout) ATTR_NONNULL(); + struct WorkSpaceInstanceHook *hook, struct WorkSpace *workspace, struct WorkSpaceLayout *layout) ATTR_NONNULL(); #undef GETTER_ATTRS #undef SETTER_ATTRS |