|
Blender
V2.93
|
#include "BLI_compiler_attrs.h"Go to the source code of this file.
Macros | |
| #define | GETTER_ATTRS ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT |
| #define | SETTER_ATTRS ATTR_NONNULL(1) |
| #define GETTER_ATTRS ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT |
Definition at line 78 of file BKE_workspace.h.
| #define SETTER_ATTRS ATTR_NONNULL(1) |
Definition at line 79 of file BKE_workspace.h.
| struct WorkSpace* BKE_workspace_active_get | ( | struct WorkSpaceInstanceHook * | hook | ) |
Definition at line 535 of file workspace.c.
References WorkSpaceInstanceHook::active.
Referenced by BKE_workspace_id_tag_all_visible(), blo_lib_link_restore(), CTX_wm_window_set(), ED_screen_change(), ED_screens_init(), lib_link_workspace_instance_hook(), screen_change_update(), screen_new_exec(), window_manager_foreach_id(), and WM_window_get_active_workspace().
| struct WorkSpaceLayout* BKE_workspace_active_layout_for_workspace_get | ( | const struct WorkSpaceInstanceHook * | hook, |
| const struct WorkSpace * | workspace | ||
| ) |
Referenced by BLO_update_defaults_startup_blend(), and workspace_change_get_new_layout().
| struct WorkSpaceLayout* BKE_workspace_active_layout_get | ( | const struct WorkSpaceInstanceHook * | hook | ) |
| void BKE_workspace_active_layout_set | ( | WorkSpaceInstanceHook * | hook, |
| const int | winid, | ||
| WorkSpace * | workspace, | ||
| WorkSpaceLayout * | layout | ||
| ) |
Activate a layout.
Sets layout as active for workspace when activated through or already active in hook. So when the active workspace of hook is workspace, layout becomes the active layout of hook too. See BKE_workspace_active_set().
workspace does not need to be active for this.
WorkSpaceInstanceHook.act_layout should only be modified directly to update the layout pointer.
Definition at line 594 of file workspace.c.
References WorkSpaceInstanceHook::act_layout, WorkSpace::hook_layout_relations, and workspace_relation_ensure_updated().
Referenced by BKE_workspace_active_screen_set(), BKE_workspace_instance_hook_create(), do_version_workspaces_after_lib_link(), ED_workspace_change(), wm_add_default(), wm_window_copy(), and WM_window_set_active_layout().
| struct bScreen* BKE_workspace_active_screen_get | ( | const struct WorkSpaceInstanceHook * | hook | ) |
Referenced by check_rendered_viewport_visible(), CTX_wm_window_set(), current_screen_compat(), do_versions_after_linking_280(), ED_area_init(), ED_screen_global_areas_refresh(), ED_screen_global_areas_sync(), ED_workspace_change(), ED_workspace_scene_data_sync(), find_spreadsheet_editors(), has_workbench_in_texture_color(), image_walk_id_all_users(), lib_link_window_scene_data_restore(), window_manager_blend_write(), WM_window_get_active_screen(), and WM_window_set_active_view_layer().
| void BKE_workspace_active_screen_set | ( | struct WorkSpaceInstanceHook * | hook, |
| const int | winid, | ||
| struct WorkSpace * | workspace, | ||
| struct bScreen * | screen | ||
| ) |
Definition at line 607 of file workspace.c.
References WorkSpaceInstanceHook::active, BKE_workspace_active_layout_set(), and BKE_workspace_layout_find().
Referenced by WM_window_set_active_screen().
| void BKE_workspace_active_set | ( | struct WorkSpaceInstanceHook * | hook, |
| struct WorkSpace * | workspace | ||
| ) |
Definition at line 539 of file workspace.c.
References WorkSpaceInstanceHook::act_layout, WorkSpaceInstanceHook::active, WorkSpace::hook_layout_relations, and workspace_relation_get_data_matching_parent().
Referenced by blo_lib_link_restore(), do_version_workspaces_after_lib_link(), ED_screens_init(), ED_workspace_change(), lib_link_workspace_instance_hook(), window_manager_foreach_id(), wm_add_default(), wm_close_and_free(), wm_window_copy(), wm_window_match_keep_current_wm(), and WM_window_open().
Definition at line 307 of file workspace.c.
References BKE_id_new(), WorkSpace::id, id_us_ensure_real(), and ID_WS.
Referenced by do_version_workspaces_create_from_screens(), and ED_workspace_add().
| void BKE_workspace_id_tag_all_visible | ( | struct Main * | bmain, |
| int | tag | ||
| ) |
Definition at line 519 of file workspace.c.
References BKE_main_id_tag_listbase(), BKE_workspace_active_get(), ListBase::first, WorkSpace::id, LISTBASE_FOREACH, ID::tag, wmWindowManager::windows, Main::wm, and Main::workspaces.
Referenced by id_delete(), and WM_toolsystem_refresh_active().
| struct WorkSpaceInstanceHook* BKE_workspace_instance_hook_create | ( | const struct Main * | bmain, |
| const int | winid | ||
| ) |
Referenced by do_version_workspaces_after_lib_link(), and wm_window_new().
| void BKE_workspace_instance_hook_free | ( | const struct Main * | bmain, |
| struct WorkSpaceInstanceHook * | hook | ||
| ) |
Referenced by wm_window_free().
| struct WorkSpaceLayout* BKE_workspace_layout_add | ( | Main * | bmain, |
| WorkSpace * | workspace, | ||
| bScreen * | screen, | ||
| const char * | name | ||
| ) |
Add a new layout to workspace for screen.
Definition at line 367 of file workspace.c.
References BLI_addtail(), BLI_assert, bScreen::id, id_us_plus(), WorkSpace::layouts, MEM_callocN, WorkSpaceLayout::screen, UNUSED_VARS, workspace_layout_name_set(), and workspaces_is_screen_used().
Referenced by do_version_workspaces_create_from_screens(), and ED_workspace_layout_add().
| struct WorkSpaceLayout* BKE_workspace_layout_find | ( | const struct WorkSpace * | workspace, |
| const struct bScreen * | screen | ||
| ) |
| struct WorkSpaceLayout* BKE_workspace_layout_find_global | ( | const struct Main * | bmain, |
| const struct bScreen * | screen, | ||
| struct WorkSpace ** | r_workspace | ||
| ) |
Referenced by wm_add_default(), and wm_window_match_keep_current_wm().
| struct WorkSpaceLayout struct WorkSpaceLayout* BKE_workspace_layout_iter_circular | ( | const struct WorkSpace * | workspace, |
| struct WorkSpaceLayout * | start, | ||
| bool(*)(const struct WorkSpaceLayout *layout, void *arg) | callback, | ||
| void * | arg, | ||
| const bool | iter_backward | ||
| ) |
Referenced by ED_workspace_layout_cycle(), and ED_workspace_screen_change_ensure_unused_layout().
| const char* BKE_workspace_layout_name_get | ( | const struct WorkSpaceLayout * | layout | ) |
Referenced by ED_workspace_layout_duplicate().
| void BKE_workspace_layout_name_set | ( | struct WorkSpace * | workspace, |
| struct WorkSpaceLayout * | layout, | ||
| const char * | new_name | ||
| ) |
Definition at line 621 of file workspace.c.
References workspace_layout_name_set().
| void BKE_workspace_layout_remove | ( | struct Main * | bmain, |
| struct WorkSpace * | workspace, | ||
| struct WorkSpaceLayout * | layout | ||
| ) |
Definition at line 386 of file workspace.c.
References BKE_id_free(), BLI_freelinkN(), bScreen::id, id_us_min(), WorkSpace::layouts, and WorkSpaceLayout::screen.
Referenced by BKE_workspace_remove(), BLO_update_defaults_startup_blend(), ED_screen_state_toggle(), wm_window_close(), workspace_blend_read_lib(), and workspace_layout_delete_doit().
| struct bScreen* BKE_workspace_layout_screen_get | ( | const struct WorkSpaceLayout * | layout | ) |
Referenced by ED_screen_change(), ED_screen_state_toggle(), ED_workspace_change(), ED_workspace_layout_cycle(), ED_workspace_layout_delete(), ED_workspace_layout_duplicate(), ED_workspace_screen_change_ensure_unused_layout(), lib_link_workspace_layout_restore(), screen_state_to_nonnormal(), wm_event_do_notifiers(), wm_window_close(), WM_window_open(), workspace_layout_delete_doit(), and workspace_layout_set_poll().
| bool BKE_workspace_owner_id_check | ( | const struct WorkSpace * | workspace, |
| const char * | owner_id | ||
| ) |
Referenced by panel_add_check(), WM_gizmo_group_type_poll(), WM_keymap_poll(), and WM_menutype_poll().
| void BKE_workspace_relations_free | ( | ListBase * | relation_list | ) |
Definition at line 397 of file workspace.c.
References ListBase::first, and workspace_relation_remove().
Referenced by workspace_free_data().
Remove workspace by freeing itself and its data. This is a higher-level wrapper that calls workspace_free_data (through BKE_id_free) to free the workspace data, and frees other data-blocks owned by workspace and its layouts (currently that is screens only).
Always use this to remove (and free) workspaces. Don't free non-ID workspace members here.
Definition at line 321 of file workspace.c.
References BKE_id_free(), BKE_workspace_layout_remove(), ListBase::first, and WorkSpace::layouts.
Referenced by blo_do_versions_280(), and BLO_update_defaults_workspace().