Blender
V3.3
|
#include "BLI_compiler_attrs.h"
Go to the source code of this file.
#define GETTER_ATTRS ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT |
Definition at line 97 of file BKE_workspace.h.
#define SETTER_ATTRS ATTR_NONNULL(1) |
Definition at line 98 of file BKE_workspace.h.
struct WorkSpace* BKE_workspace_active_get | ( | struct WorkSpaceInstanceHook * | hook | ) |
Definition at line 516 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 | ||
) |
Get the layout to be activated should workspace become or be the active workspace in hook.
Referenced by BLO_update_defaults_startup_blend(), and workspace_change_get_new_layout().
struct WorkSpaceLayout* BKE_workspace_active_layout_get | ( | const struct WorkSpaceInstanceHook * | hook | ) |
Get the layout that is active for hook (which is the visible layout for the active workspace in hook).
Referenced by ED_workspace_duplicate(), ED_workspace_layout_cycle(), screen_new_exec(), wm_window_close(), WM_window_get_active_layout(), and workspace_layout_delete_doit().
void BKE_workspace_active_layout_set | ( | struct WorkSpaceInstanceHook * | hook, |
int | winid, | ||
struct WorkSpace * | workspace, | ||
struct 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 557 of file workspace.c.
References WorkSpaceInstanceHook::act_layout, WorkSpace::hook_layout_relations, winid, 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_spreadsheet_context_paths_set_geometry_node(), ED_workspace_change(), ED_workspace_scene_data_sync(), find_screen_to_search_for_context(), find_spreadsheet_editors(), blender::ed::space_node::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, |
int | winid, | ||
struct WorkSpace * | workspace, | ||
struct bScreen * | screen | ||
) |
Definition at line 570 of file workspace.c.
References WorkSpaceInstanceHook::active, BKE_workspace_active_layout_set(), BKE_workspace_layout_find(), and winid.
Referenced by WM_window_set_active_screen().
void BKE_workspace_active_set | ( | struct WorkSpaceInstanceHook * | hook, |
struct WorkSpace * | workspace | ||
) |
Definition at line 520 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 314 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().
Definition at line 500 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_tag(), and WM_toolsystem_refresh_active().
struct WorkSpaceInstanceHook* BKE_workspace_instance_hook_create | ( | const struct Main * | bmain, |
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 | ( | struct Main * | bmain, |
struct WorkSpace * | workspace, | ||
struct bScreen * | screen, | ||
const char * | name | ||
) |
Add a new layout to workspace for screen.
Definition at line 364 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 | ||
) |
Find the layout for screen without knowing which workspace to look in. Can also be used to find the workspace that contains screen.
r_workspace | Optionally return the workspace that contains the looked up layout (if found). |
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, | ||
bool | iter_backward | ||
) |
Circular workspace layout iterator.
callback | Custom function which gets executed for each layout. Can return false to stop iterating. |
arg | Custom data passed to each callback call. |
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 584 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 383 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().
Referenced by panel_add_check(), WM_gizmo_group_type_poll(), WM_keymap_poll(), and WM_menutype_poll().
Definition at line 394 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().