|
Blender V4.5
|
#include <algorithm>#include <chrono>#include <cmath>#include <cstdio>#include <cstdlib>#include <cstring>#include <thread>#include <fmt/format.h>#include "CLG_log.h"#include "DNA_listBase.h"#include "DNA_screen_types.h"#include "DNA_windowmanager_types.h"#include "DNA_workspace_types.h"#include "MEM_guardedalloc.h"#include "GHOST_C-api.h"#include "BLI_listbase.h"#include "BLI_math_vector.h"#include "BLI_path_utils.hh"#include "BLI_rect.h"#include "BLI_string.h"#include "BLI_string_utf8.h"#include "BLI_system.h"#include "BLI_time.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_blender_version.h"#include "BKE_context.hh"#include "BKE_global.hh"#include "BKE_icons.h"#include "BKE_layer.hh"#include "BKE_main.hh"#include "BKE_report.hh"#include "BKE_screen.hh"#include "BKE_wm_runtime.hh"#include "BKE_workspace.hh"#include "RNA_access.hh"#include "RNA_enum_types.hh"#include "WM_api.hh"#include "WM_keymap.hh"#include "WM_types.hh"#include "wm.hh"#include "wm_draw.hh"#include "wm_event_system.hh"#include "wm_files.hh"#include "wm_window.hh"#include "wm_window_private.hh"#include "ED_anim_api.hh"#include "ED_fileselect.hh"#include "ED_render.hh"#include "ED_scene.hh"#include "ED_screen.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "UI_interface.hh"#include "UI_interface_icons.hh"#include "BLF_api.hh"#include "GPU_context.hh"#include "GPU_framebuffer.hh"#include "GPU_init_exit.hh"#include "UI_resources.hh"#include "BLI_threads.h"Go to the source code of this file.
Classes | |
| struct | WMInitStruct |
| struct | [struct].g_modifier_table |
| struct | [struct].g_wm_clipboard_text_simulate |
Macros | |
| #define | GHOST_WINDOW_STATE_DEFAULT GHOST_kWindowStateMaximized |
Enumerations | |
| enum | eWinOverrideFlag { WIN_OVERRIDE_GEOM = (1 << 0) , WIN_OVERRIDE_WINSTATE = (1 << 1) } |
Variables | |
| static GHOST_SystemHandle | g_system = nullptr |
| static const char * | g_system_backend_id = nullptr |
| static struct WMInitStruct | wm_init_state |
Modifier Constants | |
| enum | ModSide { MOD_SIDE_LEFT = 0 , MOD_SIDE_RIGHT = 1 } |
| static const struct | g_modifier_table [] |
Clipboard Wrappers | |
GHOST function wrappers that support a "fake" clipboard used when simulating events. This is useful user actions can be simulated while the system is in use without the system's clipboard getting overwritten. | |
| struct * | g_wm_clipboard_text_simulate = nullptr |
| void | wm_clipboard_free () |
| static char * | wm_clipboard_text_get_impl (bool selection) |
| static void | wm_clipboard_text_set_impl (const char *buf, bool selection) |
Window management, wrap GHOST.
Definition in file wm_window.cc.
| #define GHOST_WINDOW_STATE_DEFAULT GHOST_kWindowStateMaximized |
Definition at line 107 of file wm_window.cc.
Referenced by wm_window_ghostwindow_ensure().
| enum eWinOverrideFlag |
| Enumerator | |
|---|---|
| WIN_OVERRIDE_GEOM | |
| WIN_OVERRIDE_WINSTATE | |
Definition at line 101 of file wm_window.cc.
| enum ModSide |
| Enumerator | |
|---|---|
| MOD_SIDE_LEFT | |
| MOD_SIDE_RIGHT | |
Definition at line 160 of file wm_window.cc.
Definition at line 2205 of file wm_window.cc.
References ALERT_ICON_ERROR, block_create_gpu_backend_fallback(), C, uiLayout::column(), blender::ui::Emboss, uiLayout::label(), RPT_, uiLayout::separator(), Space, UI_block_begin(), UI_block_bounds_set_centered(), UI_block_emboss_set(), UI_BLOCK_THEME_STYLE_POPUP, UI_block_theme_style_set(), UI_SCALE_FAC, uiItemL_ex(), uiItemsAlertBox(), and uiLayoutSetScaleY().
Referenced by block_create_gpu_backend_fallback(), and wm_test_gpu_backend_fallback().
Definition at line 2104 of file wm_window.cc.
References ALERT_ICON_ERROR, BLF_DRAW_STR_DUMMY_MAX, BLF_width(), block_create_opengl_usage_warning(), C, uiLayout::column(), uiStyle::columnspace, blender::ui::Emboss, G, uiLayout::label(), RPT_, uiLayout::separator(), SNPRINTF, Space, UI_block_begin(), UI_block_bounds_set_centered(), UI_block_emboss_set(), UI_BLOCK_THEME_STYLE_POPUP, UI_block_theme_style_set(), UI_fontstyle_set(), UI_SCALE_FAC, UI_style_get_dpi(), uiFontStyle::uifont_id, uiItemL_ex(), uiItemsAlertBox(), uiLayoutSetScaleY(), and uiStyle::widget.
Referenced by block_create_opengl_usage_warning(), and wm_test_opengl_deprecation_warning().
|
static |
Definition at line 301 of file wm_window.cc.
References find_free_winid(), LISTBASE_FOREACH, and wmWindowManager::windows.
Referenced by find_free_winid(), and wm_window_new().
|
static |
Called by ghost, here we handle events for windows themselves or send to event system.
Mouse coordinate conversion happens here.
Definition at line 1505 of file wm_window.cc.
References wmWindow::active, wmWindow::addmousemove, BKE_icon_changed(), BLF_cache_clear(), C, CLOG_INFO, copy_v2_v2_int(), GHOST_TStringArray::count, CTX_wm_manager(), CTX_wm_window_set(), data, GHOST_TEventDragnDropData::data, GHOST_TEventDragnDropData::dataType, wmWindowManager::drags, ED_file_extension_icon(), EVENT_NONE, wmWindow::eventstate, EVT_DATA_DRAGDROP, EVT_DROP, G, G_DEBUG_EVENTS, g_system, ghost_event_proc(), ghost_event_proc_timestamp_warning(), GHOST_GetEventData(), GHOST_GetEventTime(), GHOST_GetEventType(), GHOST_GetEventWindow(), GHOST_GetWindowState(), GHOST_GetWindowUserData(), GHOST_kDragnDropTypeFilenames, GHOST_kDragnDropTypeString, GHOST_kEventButtonDown, GHOST_kEventButtonUp, GHOST_kEventDraggingDropDone, GHOST_kEventNativeResolutionChange, GHOST_kEventOpenMainFile, GHOST_kEventQuitRequest, GHOST_kEventWindowActivate, GHOST_kEventWindowClose, GHOST_kEventWindowDeactivate, GHOST_kEventWindowDPIHintChanged, GHOST_kEventWindowMove, GHOST_kEventWindowSize, GHOST_kEventWindowUpdate, GHOST_kEventWindowUpdateDecor, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, GHOST_ValidWindow(), wmWindow::ghostwin, ID::icon_id, bScreen::id, wmWindowManager::init_flag, wmEvent::keymodifier, KM_NOTHING, KM_RELEASE, wmWindow::modalhandlers, MOUSEMOVE, NA_EDITED, NC_SCREEN, NC_WINDOW, wmWindow::posx, wmWindow::posy, wmEvent::prev_xy, printf, RNA_boolean_set(), RNA_string_set(), wmWindow::sizex, wmWindow::sizey, state, str, GHOST_TStringArray::strings, U, UI_popup_handlers_remove_all(), wmWindowManager::winactive, wmWindow::windowstate, wmWindow::winid, wm_cursor_position_from_ghost_screen_coords(), WM_drag_create_path_data(), WM_DRAG_FREE_DATA, WM_DRAG_NOP, WM_DRAG_PATH, WM_DRAG_STRING, wm_draw_update(), WM_event_add(), wm_event_add_ghostevent(), WM_event_add_notifier_ex(), wm_event_do_handlers(), wm_event_do_notifiers(), wm_event_init_from_window(), WM_event_start_drag(), wm_exit_schedule_delayed(), WM_INIT_FLAG_WINDOW, WM_LOG_EVENTS, WM_main_add_notifier(), WM_OP_INVOKE_DEFAULT, WM_operator_name_call_ptr(), WM_operator_properties_create_ptr(), WM_operator_properties_free(), WM_operatortype_find(), wm_quit_with_optional_confirmation_prompt(), wm_window_close(), WM_window_get_active_screen(), wm_window_make_drawable(), WM_window_set_dpi(), wm_window_swap_buffers(), wm_window_timers_process(), wm_window_update_eventstate(), wm_window_update_eventstate_modifiers(), wm_window_update_eventstate_modifiers_clear(), wm_window_update_size_position(), GHOST_TEventDragnDropData::x, and wmEvent::xy.
|
static |
Time-stamp validation that uses basic heuristics to warn about bad time-stamps. Issues here should be resolved in GHOST.
Definition at line 1427 of file wm_window.cc.
References ARRAY_SIZE, g_system, ghost_event_proc_timestamp_warning(), GHOST_GetEventTime(), GHOST_GetEventType(), GHOST_GetMilliSeconds(), i, and PRIu64.
Referenced by ghost_event_proc(), and ghost_event_proc_timestamp_warning().
| eWM_CapabilitiesFlag WM_capabilities_flag | ( | ) |
Return the capabilities of the windowing system.
Definition at line 2258 of file wm_window.cc.
References GHOST_GetCapabilities(), GHOST_kCapabilityClipboardImages, GHOST_kCapabilityCursorWarp, GHOST_kCapabilityDesktopSample, GHOST_kCapabilityGPUReadFrontBuffer, GHOST_kCapabilityInputIME, GHOST_kCapabilityKeyboardHyperKey, GHOST_kCapabilityPrimaryClipboard, GHOST_kCapabilityTrackpadPhysicalDirection, GHOST_kCapabilityWindowDecorationStyles, GHOST_kCapabilityWindowPosition, WM_capabilities_flag(), WM_CAPABILITY_CLIPBOARD_IMAGES, WM_CAPABILITY_CURSOR_WARP, WM_CAPABILITY_DESKTOP_SAMPLE, WM_CAPABILITY_GPU_FRONT_BUFFER_READ, WM_CAPABILITY_INITIALIZED, WM_CAPABILITY_INPUT_IME, WM_CAPABILITY_KEYBOARD_HYPER_KEY, WM_CAPABILITY_PRIMARY_CLIPBOARD, WM_CAPABILITY_TRACKPAD_PHYSICAL_DIRECTION, WM_CAPABILITY_WINDOW_DECORATION_STYLES, and WM_CAPABILITY_WINDOW_POSITION.
Referenced by bpy_wm_capabilities(), console_select_update_primary_clipboard(), ED_area_newspace(), ED_screen_do_listen(), eyedropper_color_sample_fl(), font_select_update_primary_clipboard(), text_select_update_primary_clipboard(), WM_capabilities_flag(), wm_event_add_ghostevent(), wm_event_cursor_other_windows(), wm_paintcursor_draw(), wm_software_cursor_needed(), WM_window_decoration_style_apply(), WM_window_decoration_style_flags_set(), WM_window_find_under_cursor(), wm_window_ghostwindow_add(), wm_window_ghostwindow_ensure(), WM_window_pixels_read(), WM_window_pixels_read_sample(), WM_window_pixels_read_sample_from_frontbuffer(), and wm_window_update_size_position().
| void wm_clipboard_free | ( | ) |
Definition at line 2453 of file wm_window.cc.
References ARRAY_SIZE, g_wm_clipboard_text_simulate, i, MEM_freeN(), and wm_clipboard_free().
Referenced by wm_clipboard_free(), and WM_exit_ex().
| bool WM_clipboard_image_available | ( | ) |
Returns true if the clipboard contains an image.
Definition at line 2616 of file wm_window.cc.
References G, GHOST_hasClipboardImage(), and WM_clipboard_image_available().
Referenced by image_clipboard_paste_poll(), and WM_clipboard_image_available().
| ImBuf * WM_clipboard_image_get | ( | ) |
Get image data from the clipboard.
Definition at line 2624 of file wm_window.cc.
References free(), G, GHOST_getClipboardImage(), IMB_allocFromBuffer(), and WM_clipboard_image_get().
Referenced by image_clipboard_paste_exec(), and WM_clipboard_image_get().
| bool WM_clipboard_image_set_byte_buffer | ( | ImBuf * | ibuf | ) |
Put image data to the clipboard.
| ibuf | the image to set the clipboard to. |
Definition at line 2643 of file wm_window.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, G, GHOST_putClipboardImage(), WM_clipboard_image_set_byte_buffer(), ImBuf::x, and ImBuf::y.
Referenced by image_clipboard_copy_exec(), and WM_clipboard_image_set_byte_buffer().
| char * WM_clipboard_text_get | ( | bool | selection, |
| bool | ensure_utf8, | ||
| int * | r_len ) |
Return text from the clipboard.
| selection | Use the "primary" clipboard, see: WM_CAPABILITY_PRIMARY_CLIPBOARD. |
| ensure_utf8 | Ensure the resulting string does not contain invalid UTF8 encoding. |
Definition at line 2567 of file wm_window.cc.
References WM_clipboard_text_get(), and wm_clipboard_text_get_ex().
Referenced by console_paste_exec(), paste_text_exec(), pyrna_WindowManager_clipboard_get(), blender::ed::vse::sequencer_text_edit_paste_exec(), text_paste_exec(), and WM_clipboard_text_get().
|
static |
Definition at line 2509 of file wm_window.cc.
References BLI_str_utf8_invalid_strip(), ELEM, free(), G, MEM_malloc_arrayN(), wm_clipboard_text_get_ex(), and wm_clipboard_text_get_impl().
Referenced by WM_clipboard_text_get(), wm_clipboard_text_get_ex(), and WM_clipboard_text_get_firstline().
| char * WM_clipboard_text_get_firstline | ( | bool | selection, |
| bool | ensure_utf8, | ||
| int * | r_len ) |
Convenience function for pasting to areas of Blender which don't support newlines.
Definition at line 2572 of file wm_window.cc.
References wm_clipboard_text_get_ex(), and WM_clipboard_text_get_firstline().
Referenced by handleNumInput(), ui_but_get_pasted_text_from_clipboard(), ui_textedit_copypaste(), and WM_clipboard_text_get_firstline().
|
static |
Definition at line 2468 of file wm_window.cc.
References G, G_FLAG_EVENT_SIMULATE, g_wm_clipboard_text_simulate, GHOST_getClipboard(), size(), UNLIKELY, and wm_clipboard_text_get_impl().
Referenced by wm_clipboard_text_get_ex(), and wm_clipboard_text_get_impl().
| void WM_clipboard_text_set | ( | const char * | buf, |
| bool | selection ) |
Definition at line 2577 of file wm_window.cc.
References G, MEM_calloc_arrayN(), MEM_freeN(), WM_clipboard_text_set(), and wm_clipboard_text_set_impl().
Referenced by console_copy_exec(), console_select_update_primary_clipboard(), copy_data_path_button_exec(), copy_python_command_button_exec(), copy_selection(), font_select_update_primary_clipboard(), handleNumInput(), pyrna_WindowManager_clipboard_set(), report_copy_exec(), blender::ed::vse::text_edit_copy(), text_select_update_primary_clipboard(), txt_copy_clipboard(), ui_but_copy(), ui_textedit_copypaste(), and WM_clipboard_text_set().
|
static |
Definition at line 2487 of file wm_window.cc.
References BLI_strdup(), G, G_FLAG_EVENT_SIMULATE, g_wm_clipboard_text_simulate, GHOST_putClipboard(), MEM_callocN(), MEM_SAFE_FREE, UNLIKELY, and wm_clipboard_text_set_impl().
Referenced by WM_clipboard_text_set(), and wm_clipboard_text_set_impl().
|
static |
Call the confirm dialog on quitting. It's displayed in the context window so caller should set it as desired.
Definition at line 394 of file wm_window.cc.
References C, wmGenericCallback::exec, MEM_callocN(), wm_close_file_dialog(), wm_confirm_quit(), and wm_save_file_on_quit_dialog_callback().
Referenced by wm_confirm_quit(), and wm_quit_with_optional_confirmation_prompt().
| void wm_cursor_position_from_ghost_client_coords | ( | wmWindow * | win, |
| int * | x, | ||
| int * | y ) |
Definition at line 1304 of file wm_window.cc.
References GHOST_GetNativePixelSize(), wmWindow::ghostwin, wmWindow::sizey, wm_cursor_position_from_ghost_client_coords(), x, and y.
Referenced by wm_cursor_position_from_ghost_client_coords(), wm_cursor_position_from_ghost_screen_coords(), and wm_cursor_position_get().
| void wm_cursor_position_from_ghost_screen_coords | ( | wmWindow * | win, |
| int * | x, | ||
| int * | y ) |
Definition at line 1322 of file wm_window.cc.
References GHOST_ScreenToClient(), wmWindow::ghostwin, wm_cursor_position_from_ghost_client_coords(), wm_cursor_position_from_ghost_screen_coords(), x, and y.
Referenced by ghost_event_proc(), wm_cursor_position_from_ghost_screen_coords(), wm_event_add_ghostevent(), and WM_window_find_under_cursor().
| bool wm_cursor_position_get | ( | wmWindow * | win, |
| int * | r_x, | ||
| int * | r_y ) |
Definition at line 1334 of file wm_window.cc.
References wmWindow::eventstate, G, G_FLAG_EVENT_SIMULATE, g_system, GHOST_GetCursorPosition(), GHOST_kSuccess, wmWindow::ghostwin, UNLIKELY, wm_cursor_position_from_ghost_client_coords(), wm_cursor_position_get(), and wmEvent::xy.
Referenced by area_join_update_data(), wm_cursor_position_get(), wm_cursor_warp_relative(), wm_drags_draw(), wm_handler_fileselect_do(), wm_paintcursor_draw(), and wm_window_update_eventstate().
| void wm_cursor_position_to_ghost_client_coords | ( | wmWindow * | win, |
| int * | x, | ||
| int * | y ) |
Definition at line 1313 of file wm_window.cc.
References GHOST_GetNativePixelSize(), wmWindow::ghostwin, wmWindow::sizey, wm_cursor_position_to_ghost_client_coords(), x, and y.
Referenced by wm_cursor_position_to_ghost_client_coords(), wm_cursor_position_to_ghost_screen_coords(), and WM_cursor_warp().
| void wm_cursor_position_to_ghost_screen_coords | ( | wmWindow * | win, |
| int * | x, | ||
| int * | y ) |
Definition at line 1328 of file wm_window.cc.
References GHOST_ClientToScreen(), wmWindow::ghostwin, wm_cursor_position_to_ghost_client_coords(), wm_cursor_position_to_ghost_screen_coords(), x, and y.
Referenced by WM_cursor_grab_disable(), WM_cursor_grab_enable(), wm_cursor_position_to_ghost_screen_coords(), and WM_window_find_under_cursor().
| uint WM_cursor_preferred_logical_size | ( | ) |
Definition at line 2870 of file wm_window.cc.
References g_system, GHOST_GetCursorPreferredLogicalSize(), and WM_cursor_preferred_logical_size().
Referenced by window_size_calc(), WM_cursor_preferred_logical_size(), and wm_software_cursor_draw_crosshair().
| void WM_cursor_warp | ( | wmWindow * | win, |
| int | x, | ||
| int | y ) |
Set the cursor location in window coordinates (compatible with wmEvent.xy).
Definition at line 2850 of file wm_window.cc.
References wmWindow::eventstate, g_system, GHOST_SetCursorPosition(), wmWindow::ghostwin, wmEvent::prev_xy, wm_cursor_position_to_ghost_client_coords(), WM_cursor_warp(), x, wmEvent::xy, and y.
Referenced by initFlyInfo(), WM_cursor_warp(), wm_cursor_warp_relative(), and wm_gizmomap_modal_set().
| wmTimer * WM_event_timer_add | ( | wmWindowManager * | wm, |
| wmWindow * | win, | ||
| wmEventType | event_type, | ||
| double | time_step ) |
At maximum, every time_step seconds it triggers event_type events.
Definition at line 2330 of file wm_window.cc.
References BLI_addtail(), BLI_assert, BLI_time_now_seconds(), wmTimer::event_type, ISTIMER, MEM_callocN(), wmTimer::time_last, wmTimer::time_next, wmTimer::time_start, wmTimer::time_step, wmWindowManager::timers, wmTimer::win, and WM_event_timer_add().
Referenced by button_activate_state(), ED_region_visibility_change_update_animated(), ED_screen_animation_timer(), ED_uvedit_live_unwrap_begin(), ED_view3d_smooth_view_ex(), file_params_invoke_rename_postscroll(), image_view_zoom_init(), initFlyInfo(), initWalkInfo(), minimize_stretch_invoke(), blender::ed::space_node::node_add_image_exec(), blender::ed::space_node::node_add_import_node_exec(), blender::ed::space_node::node_insert_offset_invoke(), blender::ed::sculpt_paint::paint_stroke_modal(), panel_handle_data_ensure(), text_cursor_timer_ensure(), ui_handle_button_event(), ui_handle_menu_event(), ui_pie_handler(), UI_view2d_smooth_view(), uv_sculpt_stroke_invoke(), view_zoom_init(), view_zoomdrag_invoke(), viewzoom_invoke_impl(), wm_autosave_timer_begin_ex(), WM_event_add(), WM_event_timer_add(), WM_jobs_start(), WM_report_banner_show(), WM_tooltip_init(), and WM_tooltip_timer_init_ex().
| wmTimer * WM_event_timer_add_notifier | ( | wmWindowManager * | wm, |
| wmWindow * | win, | ||
| const uint | type, | ||
| const double | time_step ) |
Definition at line 2352 of file wm_window.cc.
References BLI_addtail(), BLI_assert, BLI_time_now_seconds(), wmTimer::customdata, wmTimer::event_type, wmTimer::flags, MEM_callocN(), POINTER_FROM_UINT, wmTimer::time_last, wmTimer::time_next, wmTimer::time_start, wmTimer::time_step, TIMERNOTIFIER, wmWindowManager::timers, wmTimer::win, WM_event_timer_add_notifier(), and WM_TIMER_NO_FREE_CUSTOM_DATA.
Referenced by file_draw_list(), WM_event_add(), and WM_event_timer_add_notifier().
| void WM_event_timer_free_data | ( | wmTimer * | timer | ) |
Definition at line 2387 of file wm_window.cc.
References wmTimer::customdata, wmTimer::flags, MEM_freeN(), WM_event_timer_free_data(), and WM_TIMER_NO_FREE_CUSTOM_DATA.
Referenced by WM_event_add(), WM_event_timer_free_data(), WM_event_timer_remove(), and WM_event_timers_free_all().
| void WM_event_timer_remove | ( | wmWindowManager * | wm, |
| wmWindow * | win, | ||
| wmTimer * | timer ) |
Mark the given timer to be removed, actual removal and deletion is deferred and handled internally by the window manager code.
Definition at line 2405 of file wm_window.cc.
References BLI_findindex(), EVENT_NONE, wmTimer::flags, LISTBASE_FOREACH, wmWindowManager::runtime, wmWindowManager::timers, wmWindowManager::windows, WM_event_timer_free_data(), WM_event_timer_remove(), and WM_TIMER_TAGGED_FOR_REMOVAL.
Referenced by area_offscreen_exit(), button_activate_state(), ED_region_exit(), ED_screen_animation_timer(), ED_screen_exit(), ED_screen_state_toggle(), ED_uvedit_live_unwrap_end(), ED_view3d_smooth_view_ex(), ViewOpsData::end_navigation(), file_params_smoothscroll_timer_clear(), flyEnd(), image_view_zoom_exit(), minimize_stretch_exit(), blender::ed::space_node::node_add_nodes_modal(), blender::ed::space_node::node_insert_offset_modal(), blender::ed::sculpt_paint::paint_stroke_free(), panel_activate_state(), region_blend_end(), text_cursor_timer_remove(), UI_but_tooltip_timer_remove(), ui_handle_button_event(), ui_popup_block_remove(), UI_view2d_smooth_view(), update_reports_display_invoke(), uv_sculpt_stroke_exit(), view2d_smoothview_invoke(), view3d_smoothview_apply_and_finish_ex(), view_zoom_exit(), view_zoomdrag_exit(), walkEnd(), wm_autosave_timer_end(), WM_event_add(), WM_event_timer_remove(), WM_event_timer_remove_notifier(), wm_jobs_kill_job(), WM_jobs_start(), wm_jobs_timer(), WM_report_banner_show(), WM_report_banners_cancel(), wm_reports_free(), WM_tooltip_timer_clear(), and wm_window_free().
| void WM_event_timer_remove_notifier | ( | wmWindowManager * | wm, |
| wmWindow * | win, | ||
| wmTimer * | timer ) |
Definition at line 2433 of file wm_window.cc.
References wmTimer::customdata, WM_event_timer_remove(), and WM_event_timer_remove_notifier().
Referenced by file_draw_list(), file_exit(), file_refresh(), WM_event_add(), and WM_event_timer_remove_notifier().
| void WM_event_timer_sleep | ( | wmWindowManager * | wm, |
| wmWindow * | win, | ||
| wmTimer * | timer, | ||
| bool | do_sleep ) |
To (de)activate running timers temporary.
Definition at line 2316 of file wm_window.cc.
References BLI_findindex(), wmTimer::flags, wmTimer::sleep, wmWindowManager::timers, WM_event_timer_sleep(), and WM_TIMER_TAGGED_FOR_REMOVAL.
Referenced by screen_change_prepare(), screen_refresh_if_needed(), WM_event_add(), and WM_event_timer_sleep().
| void WM_event_timers_free_all | ( | wmWindowManager * | wm | ) |
Free all timers immediately.
Definition at line 2395 of file wm_window.cc.
References BLI_assert_msg, BLI_listbase_is_empty(), BLI_pophead(), MEM_freeN(), wmWindowManager::timers, wmWindowManager::windows, WM_event_timer_free_data(), and WM_event_timers_free_all().
Referenced by wm_close_and_free(), WM_event_add(), and WM_event_timers_free_all().
| bool wm_get_desktopsize | ( | int | r_size[2] | ) |
Size of all screens (desktop), useful since the mouse is bound by this.
Definition at line 186 of file wm_window.cc.
References g_system, GHOST_GetAllDisplayDimensions(), GHOST_kFailure, and wm_get_desktopsize().
Referenced by wm_get_desktopsize(), wm_window_ghostwindow_add(), and wm_window_update_size_position().
| bool wm_get_screensize | ( | int | r_size[2] | ) |
This one should correctly check for apple top header... done for Cocoa: returns window contents (and not frame) max size.
Definition at line 175 of file wm_window.cc.
References g_system, GHOST_GetMainDisplayDimensions(), GHOST_kFailure, and wm_get_screensize().
Referenced by wm_get_screensize(), wm_window_check_size(), and wm_window_ghostwindows_ensure().
| const char * WM_ghost_backend | ( | ) |
Return an identifier for the underlying GHOST implementation.
Definition at line 2060 of file wm_window.cc.
References g_system, g_system_backend_id, and WM_ghost_backend().
Referenced by bpy_ghost_backend(), and WM_ghost_backend().
| GHOST_TDrawingContextType wm_ghost_drawing_context_type | ( | const eGPUBackendType | gpu_backend | ) |
Definition at line 2072 of file wm_window.cc.
References BLI_assert_unreachable, GHOST_kDrawingContextTypeNone, GPU_BACKEND_ANY, GPU_BACKEND_METAL, GPU_BACKEND_NONE, GPU_BACKEND_OPENGL, GPU_BACKEND_VULKAN, and wm_ghost_drawing_context_type().
Referenced by playanim_window_open(), wm_ghost_drawing_context_type(), WM_system_gpu_context_create(), and wm_window_ghostwindow_add().
| void wm_ghost_exit | ( | ) |
Definition at line 2052 of file wm_window.cc.
References g_system, GHOST_DisposeSystem(), and wm_ghost_exit().
Referenced by WM_exit_ex(), and wm_ghost_exit().
| void wm_ghost_init | ( | bContext * | C | ) |
Definition at line 1986 of file wm_window.cc.
References BLI_assert, BLI_assert_msg, BLI_system_backtrace(), C, GHOST_Debug::flags, G, G_DEBUG_GHOST, G_DEBUG_WINTAB, g_system, g_system_backend_id, GHOST_AddEventConsumer(), GHOST_CreateEventConsumer(), GHOST_CreateSystem(), ghost_event_proc(), GHOST_kDebugDefault, GHOST_kDebugWintab, GHOST_SetBacktraceHandler(), GHOST_SystemBackend(), GHOST_SystemInitDebug(), GHOST_UseNativePixels(), GHOST_UseWindowFocus(), GPU_backend_ghost_system_set(), WMInitStruct::native_pixels, UNLIKELY, WMInitStruct::window_focus, wm_ghost_init(), and wm_init_state.
Referenced by wm_ghost_init(), and WM_init().
| void wm_ghost_init_background | ( | ) |
Definition at line 2032 of file wm_window.cc.
References BLI_system_backtrace(), GHOST_Debug::flags, G, G_DEBUG_GHOST, g_system, GHOST_CreateSystemBackground(), GHOST_kDebugDefault, GHOST_SetBacktraceHandler(), GHOST_SystemInitDebug(), GPU_backend_ghost_system_set(), and wm_ghost_init_background().
Referenced by wm_ghost_init_background(), and WM_init_gpu().
|
static |
Check if specified modifier key type is pressed.
Definition at line 1353 of file wm_window.cc.
References ARRAY_SIZE, g_modifier_table, g_system, GHOST_GetModifierKeyState(), i, result, and wm_ghost_modifier_query().
Referenced by wm_ghost_modifier_query(), wm_window_update_eventstate_modifiers(), and wm_window_update_eventstate_modifiers_clear().
| void WM_ghost_show_message_box | ( | const char * | title, |
| const char * | message, | ||
| const char * | help_label, | ||
| const char * | continue_label, | ||
| const char * | link, | ||
| GHOST_DialogOptions | dialog_options ) |
Definition at line 3248 of file wm_window.cc.
References BLI_assert, g_system, GHOST_ShowMessageBox(), and WM_ghost_show_message_box().
Referenced by WM_ghost_show_message_box(), and WM_platform_support_perform_checks().
|
static |
Definition at line 211 of file wm_window.cc.
References g_system, GHOST_ActivateWindowDrawingContext(), GHOST_DisposeWindow(), wmWindow::ghostwin, GPU_context_active_set(), GPU_context_discard(), wmWindow::gpuctx, UNLIKELY, wmWindowManager::winactive, wm_ghostwindow_destroy(), and wm_window_clear_drawable().
Referenced by wm_ghostwindow_destroy(), and wm_window_free().
| void WM_init_input_devices | ( | ) |
Definition at line 2828 of file wm_window.cc.
References g_system, GHOST_kTabletAutomatic, GHOST_kTabletWinPointer, GHOST_kTabletWintab, GHOST_SetMultitouchGestures(), GHOST_SetTabletAPI(), U, UNLIKELY, USER_NO_MULTITOUCH_GESTURES, USER_TABLET_AUTOMATIC, USER_TABLET_NATIVE, USER_TABLET_WINTAB, and WM_init_input_devices().
Referenced by WM_init_input_devices(), and wm_init_userdef().
| void WM_init_native_pixels | ( | bool | do_it | ) |
Definition at line 2817 of file wm_window.cc.
References WMInitStruct::native_pixels, WM_init_native_pixels(), and wm_init_state.
Referenced by arg_handle_native_pixels_set(), and WM_init_native_pixels().
| void WM_init_state_fullscreen_set | ( | ) |
For border-less and border windows set from command-line.
Definition at line 2794 of file wm_window.cc.
References GHOST_kWindowStateFullScreen, WMInitStruct::override_flag, WIN_OVERRIDE_WINSTATE, WMInitStruct::windowstate, wm_init_state, and WM_init_state_fullscreen_set().
Referenced by arg_handle_without_borders(), and WM_init_state_fullscreen_set().
| void WM_init_state_maximized_set | ( | ) |
Definition at line 2806 of file wm_window.cc.
References GHOST_kWindowStateMaximized, WMInitStruct::override_flag, WIN_OVERRIDE_WINSTATE, WMInitStruct::windowstate, wm_init_state, and WM_init_state_maximized_set().
Referenced by arg_handle_window_maximized(), and WM_init_state_maximized_set().
| void WM_init_state_normal_set | ( | ) |
Definition at line 2800 of file wm_window.cc.
References GHOST_kWindowStateNormal, WMInitStruct::override_flag, WIN_OVERRIDE_WINSTATE, WMInitStruct::windowstate, wm_init_state, and WM_init_state_normal_set().
Referenced by arg_handle_with_borders(), and WM_init_state_normal_set().
| void WM_init_state_size_set | ( | int | stax, |
| int | stay, | ||
| int | sizx, | ||
| int | sizy ) |
Called when no ghost system was initialized.
Definition at line 2787 of file wm_window.cc.
References WMInitStruct::override_flag, WMInitStruct::size, WMInitStruct::start, WIN_OVERRIDE_GEOM, wm_init_state, and WM_init_state_size_set().
Referenced by arg_handle_window_geometry(), and WM_init_state_size_set().
| void WM_init_window_focus_set | ( | bool | do_it | ) |
Definition at line 2812 of file wm_window.cc.
References WMInitStruct::window_focus, wm_init_state, and WM_init_window_focus_set().
Referenced by arg_handle_no_window_focus(), and WM_init_window_focus_set().
| void WM_progress_clear | ( | wmWindow * | win | ) |
Definition at line 2671 of file wm_window.cc.
References GHOST_EndProgressBar(), wmWindow::ghostwin, and WM_progress_clear().
Referenced by redraw_timer_exec(), wm_jobs_update_progress_bars(), and WM_progress_clear().
| void WM_progress_set | ( | wmWindow * | win, |
| float | progress ) |
Definition at line 2663 of file wm_window.cc.
References GHOST_SetProgressBar(), wmWindow::ghostwin, progress, and WM_progress_set().
Referenced by redraw_timer_step(), wm_jobs_update_progress_bars(), and WM_progress_set().
Call the quit confirmation prompt or exit directly if needed. The use can still cancel via the confirmation popup. Also, this may not quit Blender immediately, but rather schedule the closing.
| win | The window to show the confirmation popup/window in. |
Definition at line 401 of file wm_window.cc.
References C, CTX_data_main(), CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), G, U, USER_SAVE_PROMPT, wm_confirm_quit(), wm_exit_schedule_delayed(), wm_file_or_session_data_has_unsaved_changes(), wm_quit_with_optional_confirmation_prompt(), and wm_window_raise().
Referenced by ghost_event_proc(), wm_exit_blender_invoke(), wm_quit_with_optional_confirmation_prompt(), and wm_window_close().
|
static |
Definition at line 385 of file wm_window.cc.
References C, wm_exit_schedule_delayed(), and wm_save_file_on_quit_dialog_callback().
Referenced by wm_confirm_quit(), and wm_save_file_on_quit_dialog_callback().
| void WM_system_gpu_context_activate | ( | void * | context | ) |
Definition at line 3236 of file wm_window.cc.
References BLI_assert, GHOST_ActivateGPUContext(), GPU_framebuffer_active_get(), GPU_framebuffer_back_get(), and WM_system_gpu_context_activate().
Referenced by ContextShared::ContextShared(), DRW_gpu_context_activate(), DRW_system_gpu_render_context_enable(), ContextShared::enable(), blender::render::Compositor::execute(), RE_blender_gpu_context_free(), RE_engine_gpu_context_create(), RE_engine_gpu_context_destroy(), RE_engine_gpu_context_enable(), RE_system_gpu_context_free(), wm_surface_set_drawable(), WM_system_gpu_context_activate(), and ContextShared::~ContextShared().
| void * WM_system_gpu_context_create | ( | ) |
Definition at line 3203 of file wm_window.cc.
References BLI_assert, BLI_thread_is_main(), GHOST_GPUSettings::context_type, GHOST_GPUDevice::device_id, GHOST_GPUSettings::flags, G, G_DEBUG_GPU, g_system, GHOST_CreateGPUContext(), GHOST_gpuDebugContext, GPU_backend_type_selection_get(), GPU_framebuffer_active_get(), GPU_framebuffer_back_get(), GHOST_GPUDevice::index, GHOST_GPUSettings::preferred_device, U, GHOST_GPUDevice::vendor_id, wm_ghost_drawing_context_type(), and WM_system_gpu_context_create().
Referenced by ContextShared::ContextShared(), blender::eevee::LightBake::LightBake(), RE_engine_gpu_context_create(), RE_system_gpu_context_ensure(), and WM_system_gpu_context_create().
| void WM_system_gpu_context_dispose | ( | void * | context | ) |
Definition at line 3230 of file wm_window.cc.
References BLI_assert, g_system, GHOST_DisposeGPUContext(), GPU_framebuffer_active_get(), GPU_framebuffer_back_get(), and WM_system_gpu_context_dispose().
Referenced by RE_engine_gpu_context_destroy(), RE_system_gpu_context_free(), WM_system_gpu_context_dispose(), and ContextShared::~ContextShared().
| void WM_system_gpu_context_release | ( | void * | context | ) |
Definition at line 3242 of file wm_window.cc.
References BLI_assert, GHOST_ReleaseGPUContext(), GPU_framebuffer_active_get(), GPU_framebuffer_back_get(), and WM_system_gpu_context_release().
Referenced by ContextShared::disable(), DRW_gpu_context_create(), DRW_gpu_context_release(), DRW_system_gpu_render_context_disable(), blender::render::Compositor::execute(), RE_engine_gpu_context_create(), RE_engine_gpu_context_disable(), RE_system_gpu_context_ensure(), wm_surface_clear_drawable(), and WM_system_gpu_context_release().
| void wm_test_gpu_backend_fallback | ( | bContext * | C | ) |
Definition at line 2230 of file wm_window.cc.
References block_create_gpu_backend_fallback(), C, CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), ListBase::first, G, G_FLAG_GPU_BACKEND_FALLBACK, G_FLAG_GPU_BACKEND_FALLBACK_QUIET, wmWindow::parent, UI_popup_block_invoke(), wmWindowManager::winactive, wmWindowManager::windows, and wm_test_gpu_backend_fallback().
Referenced by wm_event_do_notifiers(), and wm_test_gpu_backend_fallback().
| void wm_test_opengl_deprecation_warning | ( | bContext * | C | ) |
Definition at line 2167 of file wm_window.cc.
References BKE_report(), block_create_opengl_usage_warning(), C, CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), ListBase::first, G, wmWindow::parent, RPT_ERROR, wmWindowManager::runtime, UI_popup_block_invoke(), wmWindowManager::winactive, wmWindowManager::windows, and wm_test_opengl_deprecation_warning().
Referenced by wm_event_do_notifiers(), and wm_test_opengl_deprecation_warning().
|
static |
Keeps size within monitor bounds.
Definition at line 198 of file wm_window.cc.
References BLI_rcti_resize_x(), BLI_rcti_resize_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), wm_get_screensize(), and wm_window_check_size().
Referenced by wm_window_check_size(), and WM_window_open().
| void wm_window_clear_drawable | ( | wmWindowManager * | wm | ) |
Definition at line 1377 of file wm_window.cc.
References wmWindowManager::windrawable, and wm_window_clear_drawable().
Referenced by blend_file_thumb_from_camera(), wm_draw_surface(), wm_draw_update(), wm_file_read_setup_wm_use_new(), wm_ghostwindow_destroy(), wm_userpref_read_exec(), wm_window_clear_drawable(), wm_window_ghostwindow_add(), wm_window_make_drawable(), and wm_window_reset_drawable().
| void wm_window_close | ( | bContext * | C, |
| wmWindowManager * | wm, | ||
| wmWindow * | win ) |
This is event from ghost, or exit-Blender operator.
Definition at line 433 of file wm_window.cc.
References BKE_workspace_active_layout_get(), BKE_workspace_layout_remove(), BKE_workspace_layout_screen_get(), BLI_assert, BLI_remlink(), C, CTX_data_main(), CTX_wm_window_set(), ED_screen_exit(), ListBase::first, wmWindow::handlers, LISTBASE_FOREACH_MUTABLE, wmWindow::modalhandlers, NA_REMOVED, NC_SCREEN, NC_WINDOW, ND_LAYOUTDELETE, wmWindow::next, wmWindow::parent, bScreen::temp, wmWindowManager::windows, WM_event_add_notifier(), WM_event_remove_handlers(), WM_main_add_notifier(), wm_quit_with_optional_confirmation_prompt(), wm_window_close(), wm_window_free(), WM_window_get_active_screen(), WM_window_get_active_workspace(), WM_window_is_temp_screen(), and wmWindow::workspace_hook.
Referenced by area_join_modal(), ghost_event_proc(), render_view_cancel_exec(), wm_handler_fileselect_do(), wm_homefile_write_exec(), wm_stereo3d_set_exec(), wm_window_close(), wm_window_close_exec(), wm_window_copy_test(), wm_window_ghostwindows_remove_invalid(), and WM_window_open().
| wmOperatorStatus wm_window_close_exec | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 1227 of file wm_window.cc.
References C, CTX_wm_manager(), CTX_wm_window(), OPERATOR_FINISHED, wm_window_close(), and wm_window_close_exec().
Referenced by WM_OT_window_close(), and wm_window_close_exec().
| wmWindow * wm_window_copy | ( | Main * | bmain, |
| wmWindowManager * | wm, | ||
| wmWindow * | win_src, | ||
| bool | duplicate_layout, | ||
| bool | child ) |
Part of wm_window.cc API.
Definition at line 329 of file wm_window.cc.
References BKE_workspace_active_layout_set(), BKE_workspace_active_set(), ED_workspace_layout_duplicate(), GHOST_IsDialogWindow(), wmWindow::ghostwin, wmWindow::parent, wmWindow::posx, wmWindow::posy, wmWindow::scene, wmWindow::sizex, wmWindow::sizey, wmWindow::stereo3d_format, STRNCPY(), wmWindow::view_layer_name, wmWindow::winid, wm_window_copy(), WM_window_get_active_layout(), WM_window_get_active_workspace(), wm_window_new(), and wmWindow::workspace_hook.
Referenced by wm_window_copy(), and wm_window_copy_test().
| wmWindow * wm_window_copy_test | ( | bContext * | C, |
| wmWindow * | win_src, | ||
| bool | duplicate_layout, | ||
| bool | child ) |
A higher level version of copy that tests the new window can be added. (called from the operator directly).
Definition at line 359 of file wm_window.cc.
References C, CTX_data_main(), CTX_wm_manager(), CTX_wm_window(), wmWindow::ghostwin, NA_ADDED, NC_WINDOW, WM_check(), WM_event_add_notifier_ex(), wm_window_close(), wm_window_copy(), and wm_window_copy_test().
Referenced by wm_stereo3d_set_exec(), wm_window_copy_test(), and wm_window_new_main_exec().
Apply the window decoration style using the current style flags and by parsing style settings from the current Blender theme. The screen parameter is optional, and can be passed for enhanced theme parsing.
Definition at line 687 of file wm_window.cc.
References BLI_assert, GHOST_ApplyWindowDecorationStyle(), wmWindow::ghostwin, WM_capabilities_flag(), WM_CAPABILITY_WINDOW_DECORATION_STYLES, WM_window_decoration_style_apply(), and wm_window_decoration_style_set_from_theme().
Referenced by ED_screen_do_listen(), WM_window_decoration_style_apply(), and wm_window_ghostwindow_ensure().
| eWM_WindowDecorationStyleFlag WM_window_decoration_style_flags_get | ( | const wmWindow * | win | ) |
Get the window decoration style flags.
Definition at line 627 of file wm_window.cc.
References GHOST_GetWindowDecorationStyleFlags(), GHOST_kDecorationColoredTitleBar, wmWindow::ghostwin, WM_WINDOW_DECORATION_STYLE_COLORED_TITLEBAR, WM_window_decoration_style_flags_get(), and WM_WINDOW_DECORATION_STYLE_NONE.
Referenced by WM_window_decoration_style_flags_get().
| void WM_window_decoration_style_flags_set | ( | const wmWindow * | win, |
| eWM_WindowDecorationStyleFlag | style_flags ) |
Set window decoration style flags. Use before calling WM_window_decoration_style_apply.
Definition at line 641 of file wm_window.cc.
References BLI_assert, GHOST_kDecorationColoredTitleBar, GHOST_kDecorationNone, GHOST_SetWindowDecorationStyleFlags(), wmWindow::ghostwin, WM_capabilities_flag(), WM_CAPABILITY_WINDOW_DECORATION_STYLES, WM_WINDOW_DECORATION_STYLE_COLORED_TITLEBAR, and WM_window_decoration_style_flags_set().
Referenced by WM_window_decoration_style_flags_set(), and wm_window_ghostwindow_ensure().
|
static |
Definition at line 656 of file wm_window.cc.
References bScreen::areabase, BLI_listbase_is_single(), GHOST_WindowDecorationStyleSettings::colored_titlebar_bg_color, GHOST_WindowDecorationStyleSettings::colored_titlebar_fg_color, copy_v3_v3(), ListBase::first, GHOST_SetWindowDecorationStyleSettings(), wmWindow::ghostwin, RGN_TYPE_HEADER, RGN_TYPE_WINDOW, SPACE_TOPBAR, ScrArea::spacetype, TH_BACK, TH_BUTBACK_TEXT, UI_GetThemeColor3fv(), UI_SetTheme(), wm_window_decoration_style_set_from_theme(), and WM_window_is_main_top_level().
Referenced by WM_window_decoration_style_apply(), and wm_window_decoration_style_set_from_theme().
| void WM_window_ensure_active_view_layer | ( | wmWindow * | win | ) |
Definition at line 3089 of file wm_window.cc.
References BKE_view_layer_default_view(), BKE_view_layer_find(), ViewLayer::name, STRNCPY(), wmWindow::view_layer_name, WM_window_ensure_active_view_layer(), and WM_window_get_active_scene().
Referenced by ED_screen_scene_change(), and WM_window_ensure_active_view_layer().
|
static |
Definition at line 805 of file wm_window.cc.
References wmWindow::eventstate, MEM_callocN(), wm_window_ensure_eventstate(), and wm_window_update_eventstate().
Referenced by wm_window_ensure_eventstate(), wm_window_ghostwindow_add(), and wm_window_ghostwindow_ensure().
| void wm_window_events_process | ( | const bContext * | C | ) |
Definition at line 1937 of file wm_window.cc.
References BLI_assert, BLI_thread_is_main(), BLI_time_sleep_ms(), C, CTX_wm_manager(), G, G_FLAG_EVENT_SIMULATE, g_system, GHOST_DispatchEvents(), GHOST_ProcessEvents(), GPU_render_begin(), GPU_render_end(), wm_window_events_process(), wm_window_timers_process(), and wm_xr_events_handle().
Referenced by WM_main(), and wm_window_events_process().
| wmWindow * WM_window_find_by_area | ( | wmWindowManager * | wm, |
| const ScrArea * | area ) |
Knowing the area, return its screen.
Definition at line 2770 of file wm_window.cc.
References bScreen::areabase, BLI_findindex(), LISTBASE_FOREACH, wmWindowManager::windows, WM_window_find_by_area(), and WM_window_get_active_screen().
Referenced by area_join_init(), area_join_update_data(), graph_init(), nla_init(), and WM_window_find_by_area().
| wmWindow * WM_window_find_under_cursor | ( | wmWindow * | win, |
| const int | event_xy[2], | ||
| int | r_event_xy_other[2] ) |
Definition at line 2738 of file wm_window.cc.
References BLI_rcti_isect_pt_v(), copy_v2_v2_int(), g_system, GHOST_GetWindowUnderCursor(), GHOST_GetWindowUserData(), WM_capabilities_flag(), WM_CAPABILITY_WINDOW_POSITION, wm_cursor_position_from_ghost_screen_coords(), wm_cursor_position_to_ghost_screen_coords(), WM_window_find_under_cursor(), and WM_window_rect_calc().
Referenced by ED_area_find_under_cursor(), eyedropper_color_sample_fl(), eyedropper_cryptomatte_sample_fl(), eyedropper_win_area_find(), view_edge_pan_modal(), wm_drags_exit(), wm_event_cursor_other_windows(), and WM_window_find_under_cursor().
| void wm_window_free | ( | bContext * | C, |
| wmWindowManager * | wm, | ||
| wmWindow * | win ) |
Including window itself.
| C | can be NULL. |
Definition at line 239 of file wm_window.cc.
References BKE_screen_area_map_free(), BKE_workspace_instance_hook_free(), C, CTX_wm_window(), CTX_wm_window_set(), wmWindow::cursor_keymap_status, wmWindow::event_last_handled, wmWindow::event_queue_consecutive_gesture_data, wmWindow::eventstate, G_MAIN, wmWindow::global_areas, wmWindow::handlers, LISTBASE_FOREACH_MUTABLE, MEM_freeN(), wmWindow::modalhandlers, wmWindow::runtime, wmWindow::stereo3d_format, TIMERJOBS, wmWindowManager::timers, WM_event_consecutive_data_free(), wm_event_free_all(), WM_event_remove_handlers(), WM_event_timer_remove(), WM_gestures_free_all(), wm_ghostwindow_destroy(), wm_jobs_timer_end(), WM_TIMER_TAGGED_FOR_REMOVAL, wm_window_free(), wm_window_timers_delete_removed(), and wmWindow::workspace_hook.
Referenced by wm_close_and_free(), wm_window_close(), and wm_window_free().
| wmOperatorStatus wm_window_fullscreen_toggle_exec | ( | bContext * | C, |
| wmOperator * | op ) |
Full-screen operator callback.
Definition at line 1276 of file wm_window.cc.
References C, CTX_wm_window(), G, GHOST_GetWindowState(), GHOST_kWindowStateFullScreen, GHOST_kWindowStateNormal, GHOST_SetWindowState(), wmWindow::ghostwin, OPERATOR_CANCELLED, OPERATOR_FINISHED, state, and wm_window_fullscreen_toggle_exec().
Referenced by WM_OT_window_fullscreen_toggle(), and wm_window_fullscreen_toggle_exec().
| WorkSpaceLayout * WM_window_get_active_layout | ( | const wmWindow * | win | ) |
Definition at line 3124 of file wm_window.cc.
References BKE_workspace_active_layout_get(), LIKELY, WM_window_get_active_layout(), WM_window_get_active_workspace(), and wmWindow::workspace_hook.
Referenced by ED_screen_state_toggle(), wm_event_do_notifiers(), wm_file_read_setup_wm_keep_old(), wm_window_copy(), WM_window_get_active_layout(), and workspace_change_get_new_layout().
Definition at line 3017 of file wm_window.cc.
References wmWindow::scene, and WM_window_get_active_scene().
Referenced by buttons_context_path(), buttons_shading_context(), buttons_shading_new_context(), ED_area_init(), ED_area_newspace(), ED_area_offscreen_create(), ED_editors_init_for_undo(), ED_scene_add(), ED_screen_exit(), ED_screen_scene_find_with_window(), ED_view3d_gizmo_ruler_remove_by_gpencil_layer(), find_area_showing_render_result(), graph_init(), image_listener(), nla_init(), blender::ed::object::object_delete_exec(), RE_FreeUnusedGPUResources(), screen_change_update(), screen_ctx_active_annotation_layer(), screen_ctx_active_bone(), screen_ctx_active_object(), screen_ctx_active_pose_bone(), screen_ctx_active_sequence_strip(), screen_ctx_active_strip(), screen_ctx_annotation_data(), screen_ctx_annotation_data_owner(), screen_ctx_edit_object(), screen_ctx_editable_objects(), screen_ctx_grease_pencil_data(), screen_ctx_image_paint_object(), screen_ctx_object(), screen_ctx_objects_in_mode(), screen_ctx_objects_in_mode_unique_data(), screen_ctx_particle_edit_object(), screen_ctx_pose_object(), screen_ctx_scene(), screen_ctx_sculpt_object(), screen_ctx_selectable_objects(), screen_ctx_selected_bones_(), screen_ctx_selected_editable_objects(), screen_ctx_selected_editable_sequences(), screen_ctx_selected_editable_strips(), screen_ctx_selected_objects(), screen_ctx_selected_pose_bones(), screen_ctx_selected_pose_bones_from_active_object(), screen_ctx_selected_sequences(), screen_ctx_selected_strips(), screen_ctx_sequences(), screen_ctx_strips(), screen_ctx_vertex_paint_object(), screen_ctx_visible_objects(), screen_ctx_visible_or_editable_bones_(), screen_ctx_visible_pose_bones(), screen_ctx_weight_paint_object(), screen_global_area_refresh(), sound_jack_sync_callback(), toolsystem_brush_activate_from_toolref_for_object_paint(), toolsystem_brush_activate_from_toolref_for_object_particle(), toolsystem_brush_clear_paint_reference(), toolsystem_refresh_screen_from_active_tool(), blender::ed::outliner::tree_element_viewlayer_activate(), view3d_main_region_cursor(), wm_draw_area_offscreen(), wm_draw_region_test(), wm_draw_update_test_window(), wm_draw_window(), wm_draw_window_offscreen(), wm_event_do_depsgraph(), wm_event_do_handlers(), wm_event_do_notifiers(), WM_event_handler_region_marker_poll(), WM_event_handler_region_v2d_mask_no_marker_poll(), WM_stereo3d_enabled(), WM_toolsystem_do_msg_notify_tag_refresh(), WM_toolsystem_ref_sync_from_context(), WM_toolsystem_refresh_active(), WM_toolsystem_refresh_screen_window(), WM_toolsystem_reinit_all(), WM_window_cursor_keymap_status_refresh(), WM_window_ensure_active_view_layer(), WM_window_get_active_scene(), WM_window_get_active_view_layer(), WM_window_open(), WM_window_pixels_read_from_offscreen(), WM_window_set_active_view_layer(), WM_windows_scene_data_sync(), WM_windows_scene_get_from_screen(), wm_xr_session_scene_and_depsgraph_get(), workspace_exit(), and workspace_scene_pinning_update().
Get the active screen of the active workspace in win.
Definition at line 3135 of file wm_window.cc.
References BKE_workspace_active_screen_get(), LIKELY, WM_window_get_active_screen(), WM_window_get_active_workspace(), and wmWindow::workspace_hook.
Referenced by actionzone_area_poll(), area_docking_apply(), area_join_dock_cb_window(), area_join_modal(), bpy_rna_context_temp_override_enter(), bpy_rna_context_temp_override_enter_ok_or_error(), bpy_rna_context_temp_override_exit(), bpy_rna_context_temp_set_screen_for_window(), button_activate_init(), button_tooltip_timer_reset(), blender::ed::space_node::compo_get_recalc_flags(), blender::ed::space_node::compositor_is_in_use(), context_find_graph_editor(), ED_area_find_under_cursor(), ED_area_type_hud_clear(), ED_area_update_region_sizes(), ED_areas_do_frame_follow(), ED_clip_update_frame(), ED_editors_init(), ED_fileselect_handler_area_find(), ED_fileselect_handler_area_find_any_with_op(), ED_info_stats_clear(), ED_region_do_draw(), ED_render_scene_update(), ED_render_view3d_update(), ED_screen_animation_no_scrub(), ED_screen_animation_playing(), ED_screen_draw_edges(), ED_screen_refresh(), ED_screen_scene_change(), ED_screen_scene_find_with_window(), ED_screen_set_active_region(), ED_screen_state_toggle(), ED_screen_window_find(), ED_space_image_paint_update(), ED_space_image_sync(), ED_view3d_gizmo_ruler_remove_by_gpencil_layer(), blender::ed::animrig::ensure_asset_ui_visible(), eyedropper_color_sample_fl(), eyedropper_cryptomatte_sample_fl(), eyedropper_win_area_find(), find_area_showing_render_result(), blender::ed::sculpt_paint::flush_update_done(), blender::ed::asset::list::foreach_visible_asset_browser_showing_library(), get_compositor_needed_outputs(), ghost_event_proc(), gizmo_mesh_spin_redo_setup(), menu_items_from_ui_create(), RE_FreeUnusedGPUResources(), redraw_timer_step(), region_cursor_set(), region_cursor_set_ex(), render_image_restore_layer(), render_image_update_pass_and_layer(), render_view_show_invoke(), screen_animation_step_invoke(), screen_cursor_set(), screen_geom_select_connected_edge(), screen_refresh_if_needed(), screen_state_to_nonnormal(), blender::ed::asset::shelf::show_catalog_in_visible_shelves(), toolsystem_refresh_screen_from_active_tool(), UI_but_tooltip_refresh(), UI_popup_block_close(), ui_popup_block_remove(), wm_drags_exit(), wm_draw_region_clear(), wm_draw_update_clear_window(), wm_draw_update_test_window(), wm_draw_window(), wm_draw_window_offscreen(), wm_draw_window_onscreen(), wm_dropbox_active(), wm_dropbox_invoke(), wm_event_do_depsgraph(), wm_event_do_handlers(), wm_event_do_notifiers(), wm_event_do_refresh_wm_and_depsgraph(), wm_event_drag_and_drop_test(), WM_exit_ex(), wm_file_read_setup_wm_init(), wm_file_read_setup_wm_keep_old(), wm_gesture_tag_redraw(), wm_handler_fileselect_do(), wm_handler_op_context_get_if_valid(), WM_keyconfig_update_ex(), WM_operator_handlers_clear(), wm_operator_winactive_normal(), wm_operator_winactive_not_full(), WM_paint_cursor_tag_redraw(), wm_paintcursor_draw(), wm_region_tag_draw_on_gizmo_delay_refresh_for_tweak(), WM_stereo3d_enabled(), wm_stereo3d_set_exec(), WM_toolsystem_do_msg_notify_tag_refresh(), WM_toolsystem_refresh_active(), WM_toolsystem_refresh_screen_window(), WM_toolsystem_reinit_all(), WM_tooltip_clear(), WM_tooltip_immediate_init(), WM_tooltip_init(), WM_tooltip_refresh(), WM_tooltip_timer_clear(), WM_tooltip_timer_init_ex(), wm_window_close(), WM_window_cursor_keymap_status_refresh(), WM_window_find_by_area(), WM_window_get_active_screen(), WM_window_is_temp_screen(), WM_window_open(), WM_window_set_active_workspace(), WM_window_status_area_tag_redraw(), WM_window_title(), WM_windows_scene_get_from_screen(), WM_windows_view_layer_get_from_screen(), and WM_windows_workspace_get_from_screen().
Definition at line 3051 of file wm_window.cc.
References BKE_view_layer_default_view(), BKE_view_layer_find(), wmWindow::view_layer_name, WM_window_get_active_scene(), WM_window_get_active_view_layer(), and WM_window_set_active_view_layer().
Referenced by buttons_context_path(), buttons_context_path_brush(), buttons_context_path_view_layer(), buttons_shading_context(), buttons_shading_new_context(), buttons_texture_users_from_context(), clean_viewport_memory(), ED_area_init(), ED_editors_init_for_undo(), ED_info_stats_clear(), ED_screen_scene_change(), ED_undo_object_editmode_validate_scene_from_windows(), image_listener(), screen_animation_step_invoke(), screen_ctx_active_bone(), screen_ctx_active_object(), screen_ctx_active_pose_bone(), screen_ctx_edit_object(), screen_ctx_editable_objects(), screen_ctx_grease_pencil_data(), screen_ctx_image_paint_object(), screen_ctx_object(), screen_ctx_objects_in_mode(), screen_ctx_objects_in_mode_unique_data(), screen_ctx_particle_edit_object(), screen_ctx_pose_object(), screen_ctx_sculpt_object(), screen_ctx_selectable_objects(), screen_ctx_selected_bones_(), screen_ctx_selected_editable_objects(), screen_ctx_selected_objects(), screen_ctx_selected_pose_bones(), screen_ctx_selected_pose_bones_from_active_object(), screen_ctx_vertex_paint_object(), screen_ctx_visible_objects(), screen_ctx_visible_or_editable_bones_(), screen_ctx_visible_pose_bones(), screen_ctx_weight_paint_object(), sound_jack_sync_callback(), toolsystem_refresh_screen_from_active_tool(), blender::ed::outliner::tree_element_object_activate(), view3d_main_region_cursor(), view3d_main_region_listener(), view_layer_add_exec(), wm_draw_update_test_window(), wm_event_do_depsgraph(), WM_toolsystem_do_msg_notify_tag_refresh(), WM_toolsystem_ref_sync_from_context(), WM_toolsystem_refresh_active(), WM_toolsystem_refresh_screen_window(), WM_toolsystem_reinit_all(), WM_window_cursor_keymap_status_refresh(), WM_window_get_active_view_layer(), WM_window_set_active_scene(), WM_windows_view_layer_get_from_screen(), and wm_xr_session_scene_and_depsgraph_get().
Definition at line 3100 of file wm_window.cc.
References BKE_workspace_active_get(), WM_window_get_active_workspace(), and wmWindow::workspace_hook.
Referenced by ED_area_init(), ED_screen_state_toggle(), ED_workspace_change(), ED_workspace_delete(), screen_state_to_nonnormal(), space_workspace_cycle_invoke(), template_id_workspace_pin_extra_icon(), toolsystem_brush_activate_from_toolref_for_object_paint(), toolsystem_brush_activate_from_toolref_for_object_particle(), toolsystem_brush_clear_paint_reference(), toolsystem_refresh_screen_from_active_tool(), wm_event_do_handlers(), wm_event_do_notifiers(), WM_toolsystem_do_msg_notify_tag_refresh(), WM_toolsystem_ref_sync_from_context(), WM_toolsystem_refresh_active(), WM_toolsystem_refresh_screen_window(), WM_toolsystem_reinit_all(), WM_toolsystem_update_from_context_view3d(), wm_window_close(), wm_window_copy(), WM_window_cursor_keymap_status_refresh(), WM_window_get_active_layout(), WM_window_get_active_screen(), WM_window_get_active_workspace(), WM_window_open(), and WM_windows_workspace_get_from_screen().
| bool wm_window_get_swap_interval | ( | wmWindow * | win, |
| int * | r_interval ) |
Definition at line 2727 of file wm_window.cc.
References GHOST_GetSwapInterval(), wmWindow::ghostwin, and wm_window_get_swap_interval().
Referenced by wm_window_get_swap_interval().
|
static |
Definition at line 818 of file wm_window.cc.
References GHOST_GPUSettings::context_type, GHOST_GPUDevice::device_id, Stereo3dFormat::display_mode, GHOST_GPUSettings::flags, G, G_DEBUG_GPU, g_system, GHOST_CreateWindow(), GHOST_GetWindowState(), GHOST_gpuDebugContext, GHOST_gpuStereoVisual, GHOST_kWindowStateMinimized, GHOST_SetWindowState(), GHOST_SetWindowUserData(), wmWindow::ghostwin, GPU_backend_type_selection_get(), GPU_clear_color(), GPU_context_create(), GPU_init(), GPU_render_begin(), GPU_render_end(), wmWindow::gpuctx, GHOST_GPUDevice::index, wmWindow::parent, wmWindow::posx, wmWindow::posy, GHOST_GPUSettings::preferred_device, RGN_TYPE_HEADER, S3D_DISPLAY_PAGEFLIP, wmWindow::sizex, wmWindow::sizey, SPACE_TOPBAR, wmWindow::stereo3d_format, TH_BACK, U, UI_GetThemeColor3fv(), UI_SetTheme(), GHOST_GPUDevice::vendor_id, WMInitStruct::window_focus, wmWindow::windowstate, wmWindowManager::windrawable, WM_capabilities_flag(), WM_CAPABILITY_WINDOW_POSITION, wm_get_desktopsize(), wm_ghost_drawing_context_type(), wm_init_state, wm_window_clear_drawable(), wm_window_ensure_eventstate(), wm_window_ghostwindow_add(), WM_window_set_dpi(), wm_window_set_drawable(), wm_window_swap_buffers(), and wm_window_update_size_position().
Referenced by wm_window_ghostwindow_add(), and wm_window_ghostwindow_ensure().
|
static |
Definition at line 921 of file wm_window.cc.
References wmWindow::cursor, wmWindowManager::defaultconf, ED_screen_global_areas_refresh(), GHOST_kWindowStateNormal, GHOST_WINDOW_STATE_DEFAULT, wmWindow::ghostwin, wmWindow::handlers, wmWindow::modalhandlers, WMInitStruct::override_flag, wmWindow::posx, wmWindow::posy, RGN_TYPE_WINDOW, WMInitStruct::size, wmWindow::sizex, wmWindow::sizey, SPACE_EMPTY, WMInitStruct::start, WIN_OVERRIDE_GEOM, WIN_OVERRIDE_WINSTATE, WMInitStruct::windowstate, wmWindow::windowstate, WM_capabilities_flag(), WM_CAPABILITY_WINDOW_DECORATION_STYLES, WM_CURSOR_DEFAULT, WM_dropboxmap_find(), WM_event_add_dropbox_handler(), WM_event_add_keymap_handler(), wm_init_state, WM_keymap_ensure(), WM_window_decoration_style_apply(), WM_WINDOW_DECORATION_STYLE_COLORED_TITLEBAR, WM_window_decoration_style_flags_set(), wm_window_ensure_eventstate(), wm_window_ghostwindow_add(), wm_window_ghostwindow_ensure(), WM_window_set_dpi(), and WM_window_title().
Referenced by wm_window_ghostwindow_ensure(), wm_window_ghostwindows_ensure(), and WM_window_open().
| void wm_window_ghostwindows_ensure | ( | wmWindowManager * | wm | ) |
Initialize wmWindow without ghostwin, open these and clear.
Window size is read from window, if 0 it uses prefsize called in WM_check, also initialize stuff after file read.
Definition at line 989 of file wm_window.cc.
References BLI_assert, G, LISTBASE_FOREACH, WMInitStruct::size, WMInitStruct::start, UNLIKELY, wmWindowManager::windows, wm_get_screensize(), wm_init_state, wm_window_ghostwindow_ensure(), and wm_window_ghostwindows_ensure().
Referenced by WM_check(), and wm_window_ghostwindows_ensure().
| void wm_window_ghostwindows_remove_invalid | ( | bContext * | C, |
| wmWindowManager * | wm ) |
Call after wm_window_ghostwindows_ensure or WM_check (after loading a new file) in the unlikely event a window couldn't be created.
Definition at line 1014 of file wm_window.cc.
References BLI_assert, C, G, LISTBASE_FOREACH_MUTABLE, wmWindowManager::windows, wm_window_close(), and wm_window_ghostwindows_remove_invalid().
Referenced by wm_file_read_post(), and wm_window_ghostwindows_remove_invalid().
| bool WM_window_is_fullscreen | ( | const wmWindow * | win | ) |
Definition at line 2947 of file wm_window.cc.
References GHOST_kWindowStateFullScreen, wmWindow::windowstate, and WM_window_is_fullscreen().
Referenced by area_azone_init(), wm_stereo3d_set_exec(), and WM_window_is_fullscreen().
| bool WM_window_is_main_top_level | ( | const wmWindow * | win | ) |
Return whether the window is a main/top-level window. In which case it is expected to contain global areas (top-bar/status-bar).
Definition at line 2957 of file wm_window.cc.
References BKE_workspace_active_screen_get(), wmWindow::parent, bScreen::temp, WM_window_is_main_top_level(), and wmWindow::workspace_hook.
Referenced by ED_screen_global_areas_refresh(), wm_window_decoration_style_set_from_theme(), and WM_window_is_main_top_level().
| bool WM_window_is_maximized | ( | const wmWindow * | win | ) |
Definition at line 2952 of file wm_window.cc.
References GHOST_kWindowStateMaximized, wmWindow::windowstate, and WM_window_is_maximized().
Referenced by ED_fileselect_window_params_get(), and WM_window_is_maximized().
| bool WM_window_is_temp_screen | ( | const wmWindow * | win | ) |
Definition at line 3147 of file wm_window.cc.
References bScreen::temp, WM_window_get_active_screen(), and WM_window_is_temp_screen().
Referenced by ED_fileselect_exit(), ED_screen_exit(), render_view_cancel_exec(), render_view_show_invoke(), screen_maximize_area_poll(), space_workspace_cycle_invoke(), wm_handler_fileselect_do(), wm_homefile_write_exec(), wm_window_close(), WM_window_is_temp_screen(), and WM_window_title().
| void wm_window_lower | ( | wmWindow * | win | ) |
Definition at line 2695 of file wm_window.cc.
References GHOST_kWindowOrderBottom, GHOST_SetWindowOrder(), wmWindow::ghostwin, and wm_window_lower().
Referenced by render_view_show_invoke(), and wm_window_lower().
| void wm_window_make_drawable | ( | wmWindowManager * | wm, |
| wmWindow * | win ) |
Definition at line 1384 of file wm_window.cc.
References BLI_assert, G, G_DEBUG_EVENTS, wmWindow::ghostwin, GPU_framebuffer_active_get(), GPU_framebuffer_back_get(), printf, wmWindowManager::windrawable, wmWindow::winid, wm_window_clear_drawable(), wm_window_make_drawable(), WM_window_set_dpi(), and wm_window_set_drawable().
Referenced by blend_file_thumb_from_camera(), ghost_event_proc(), redraw_timer_exec(), wm_add_default(), wm_draw_update(), wm_event_do_handlers(), wm_handler_fileselect_do(), and wm_window_make_drawable().
| void WM_window_native_pixel_coords | ( | const wmWindow * | win, |
| int * | x, | ||
| int * | y ) |
Definition at line 2901 of file wm_window.cc.
References GHOST_GetNativePixelSize(), wmWindow::ghostwin, WM_window_native_pixel_coords(), x, and y.
Referenced by area_docking_target(), and WM_window_native_pixel_coords().
| blender::int2 WM_window_native_pixel_size | ( | const wmWindow * | win | ) |
Definition at line 2894 of file wm_window.cc.
References GHOST_GetNativePixelSize(), wmWindow::ghostwin, wmWindow::sizex, wmWindow::sizey, and WM_window_native_pixel_size().
Referenced by blender::ed::asset::clamp_point_to_window(), ED_fileselect_window_params_get(), screen_global_statusbar_area_refresh(), screen_global_topbar_area_refresh(), blender::ed::asset::screenshot_preview_draw(), blender::ed::asset::screenshot_preview_modal(), blender::ed::asset::square_points_clamp_to_window(), ui_block_bounds_calc_centered(), ui_block_bounds_calc_popup(), ui_popup_block_clip(), ui_popup_block_position(), ui_popup_block_refresh(), ui_tooltip_create_with_data(), ui_update_window_matrix(), wm_draw_window(), wm_drop_update_active(), wm_event_cursor_other_windows(), wm_gesture_draw_cross(), wm_handler_fileselect_do(), wm_stereo3d_draw_sidebyside(), wm_stereo3d_draw_topbottom(), WM_window_native_pixel_size(), WM_window_pixels_read_from_frontbuffer(), WM_window_pixels_read_from_offscreen(), WM_window_pixels_read_sample_from_offscreen(), WM_window_rect_calc(), and wmWindowViewport_ex().
| int WM_window_native_pixel_x | ( | const wmWindow * | win | ) |
Support for native pixel size
Definition at line 2881 of file wm_window.cc.
References GHOST_GetNativePixelSize(), wmWindow::ghostwin, wmWindow::sizex, and WM_window_native_pixel_x().
Referenced by area_azone_init(), blender::ed::asset::shelf::layout_width_units_clamped(), screen_draw_area_drag_tip(), ui_def_but_rna__menu(), ui_searchbox_region_layout_fn(), wm_block_splash_create(), wm_stereo3d_mouse_offset_apply(), and WM_window_native_pixel_x().
| int WM_window_native_pixel_y | ( | const wmWindow * | win | ) |
Definition at line 2887 of file wm_window.cc.
References GHOST_GetNativePixelSize(), wmWindow::ghostwin, wmWindow::sizey, and WM_window_native_pixel_y().
Referenced by ui_def_but_rna__menu(), wm_drag_draw_tooltip(), wm_software_cursor_draw(), wm_stereo3d_mouse_offset_apply(), and WM_window_native_pixel_y().
| wmWindow * wm_window_new | ( | const Main * | bmain, |
| wmWindowManager * | wm, | ||
| wmWindow * | parent, | ||
| bool | dialog ) |
Don't change context itself.
Definition at line 313 of file wm_window.cc.
References BKE_workspace_instance_hook_create(), BLI_addtail(), find_free_winid(), MEM_callocN(), wmWindow::parent, wmWindow::runtime, wmWindow::stereo3d_format, wmWindowManager::windows, wmWindow::winid, wm_window_new(), and wmWindow::workspace_hook.
Referenced by wm_add_default(), wm_window_copy(), wm_window_new(), and WM_window_open().
| wmOperatorStatus wm_window_new_exec | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 1235 of file wm_window.cc.
References BKE_report(), BKE_screen_find_big_area(), C, CTX_wm_screen(), CTX_wm_window(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, wmWindow::sizex, wmWindow::sizey, SPACE_TYPE_ANY, ScrArea::spacetype, WIN_ALIGN_PARENT_CENTER, wm_window_new_exec(), and WM_window_open().
Referenced by WM_OT_window_new(), and wm_window_new_exec().
| wmOperatorStatus wm_window_new_main_exec | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 1264 of file wm_window.cc.
References BKE_report(), C, CTX_wm_window(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, wm_window_copy_test(), and wm_window_new_main_exec().
Referenced by WM_OT_window_new_main(), and wm_window_new_main_exec().
| wmWindow * WM_window_open | ( | bContext * | C, |
| const char * | title, | ||
| const rcti * | rect_unscaled, | ||
| int | space_type, | ||
| bool | toplevel, | ||
| bool | dialog, | ||
| bool | temp, | ||
| eWindowAlignment | alignment, | ||
| void(* | area_setup_fn )(bScreen *screen, ScrArea *area, void *user_data), | ||
| void * | area_setup_user_data ) |
Definition at line 1059 of file wm_window.cc.
References bScreen::areabase, BKE_workspace_active_set(), BKE_workspace_layout_screen_get(), BLI_assert, BLI_listbase_is_single(), BLI_rcti_size_x(), BLI_rcti_size_y(), ScrArea::butspacetype, C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), ED_area_newspace(), ED_screen_change(), ED_screen_refresh(), ED_screen_scene_change(), ED_workspace_layout_add(), ListBase::first, GHOST_GetNativePixelSize(), wmWindow::ghostwin, LISTBASE_FOREACH, ViewLayer::name, wmWindow::posx, wmWindow::posy, wmWindow::sizex, wmWindow::sizey, SPACE_EMPTY, ScrArea::spacetype, wmWindow::stereo3d_format, STRNCPY(), bScreen::temp, wmWindow::view_layer_name, WIN_ALIGN_LOCATION_CENTER, WIN_ALIGN_PARENT_CENTER, wmWindowManager::windows, WM_check(), wm_window_check_size(), wm_window_close(), WM_window_get_active_scene(), WM_window_get_active_screen(), WM_window_get_active_workspace(), wm_window_ghostwindow_ensure(), wm_window_new(), WM_window_open(), wm_window_raise(), WM_window_set_active_layout(), wm_window_set_size(), WM_window_title(), wm_window_update_size_position(), wmWindow::workspace_hook, x, rcti::xmax, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by area_dupli_open(), drivers_editor_show_exec(), ED_screen_temp_space_open(), info_log_show_exec(), blender::ed::outliner::outliner_orphans_manage_invoke(), render_view_open(), userpref_show_exec(), wm_window_new_exec(), WM_window_open(), and WM_window_open().
| void wm_window_raise | ( | wmWindow * | win | ) |
Definition at line 2700 of file wm_window.cc.
References GHOST_GetWindowState(), GHOST_kWindowOrderTop, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, GHOST_SetWindowOrder(), GHOST_SetWindowState(), wmWindow::ghostwin, and wm_window_raise().
Referenced by render_view_open(), render_view_show_invoke(), wm_quit_with_optional_confirmation_prompt(), WM_window_open(), and wm_window_raise().
Get boundaries usable by all window contents, including global areas.
Definition at line 2909 of file wm_window.cc.
References BLI_rcti_init(), WM_window_native_pixel_size(), and WM_window_rect_calc().
Referenced by area_join_update_data(), area_move_set_limits(), area_split(), area_split_invoke(), screen_area_edge_from_cursor(), screen_geom_find_active_scredge(), screen_geom_vertices_scale(), WM_window_find_under_cursor(), WM_window_rect_calc(), and WM_window_screen_rect_calc().
| void wm_window_reset_drawable | ( | ) |
Reset active the current window gpu drawing context.
Definition at line 1405 of file wm_window.cc.
References BLI_assert, BLI_thread_is_main(), G_MAIN, wmWindow::ghostwin, GPU_framebuffer_active_get(), GPU_framebuffer_back_get(), wmWindowManager::windrawable, wm_window_clear_drawable(), wm_window_reset_drawable(), and wm_window_set_drawable().
Referenced by ContextShared::disable(), DRW_gpu_context_activate(), DRW_gpu_context_create(), blender::eevee::LightBake::LightBake(), RE_system_gpu_context_ensure(), RE_system_gpu_context_free(), wm_window_reset_drawable(), and wm_xr_session_gpu_binding_context_destroy().
Get boundaries usable by screen-layouts, excluding global areas.
Definition at line 2914 of file wm_window.cc.
References ScrAreaMap::areabase, BLI_assert, BLI_assert_unreachable, BLI_rcti_is_valid(), ED_area_global_size_y(), GLOBAL_AREA_ALIGN_BOTTOM, GLOBAL_AREA_ALIGN_TOP, GLOBAL_AREA_IS_HIDDEN, wmWindow::global_areas, LISTBASE_FOREACH, WM_window_rect_calc(), WM_window_screen_rect_calc(), rcti::ymax, and rcti::ymin.
Referenced by actionzone_modal(), ED_area_init(), ED_area_update_region_sizes(), ED_workspace_layout_add(), screen_draw_move_highlight(), screen_geom_find_active_scredge(), screen_geom_vertices_scale(), uiTemplateInputStatusBorder(), and WM_window_screen_rect_calc().
| void WM_window_set_active_layout | ( | wmWindow * | win, |
| WorkSpace * | workspace, | ||
| WorkSpaceLayout * | layout ) |
Definition at line 3130 of file wm_window.cc.
References BKE_workspace_active_layout_set(), wmWindow::winid, WM_window_set_active_layout(), and wmWindow::workspace_hook.
Referenced by wm_file_read_setup_wm_keep_old(), WM_window_open(), and WM_window_set_active_layout().
Definition at line 3022 of file wm_window.cc.
References C, CTX_wm_manager(), ED_scene_change_update(), ED_screen_scene_change(), LISTBASE_FOREACH, NC_WINDOW, wmWindow::parent, wmWindow::scene, wmWindowManager::windows, WM_event_add_notifier(), WM_window_get_active_view_layer(), and WM_window_set_active_scene().
Referenced by arg_handle_scene_set(), ED_scene_add(), ED_scene_delete(), blender::ed::outliner::outliner_do_object_operation_ex(), blender::ed::outliner::outliner_object_operation_exec(), blender::ed::outliner::tree_element_object_activate(), blender::ed::outliner::tree_element_world_activate(), WM_window_set_active_scene(), and workspace_scene_pinning_update().
Definition at line 3142 of file wm_window.cc.
References BKE_workspace_active_screen_set(), wmWindow::winid, WM_window_set_active_screen(), and wmWindow::workspace_hook.
Referenced by bpy_rna_context_temp_set_screen_for_window(), ED_screen_change(), wm_file_read_setup_wm_keep_old(), and WM_window_set_active_screen().
Definition at line 3071 of file wm_window.cc.
References BKE_view_layer_find(), BKE_workspace_active_screen_get(), BLI_assert, ED_render_view_layer_changed(), ListBase::first, G_MAIN, LISTBASE_FOREACH, ViewLayer::name, wmWindow::parent, STRNCPY(), wmWindowManager::windows, Main::wm, WM_window_get_active_scene(), and WM_window_set_active_view_layer().
Referenced by blender::ed::outliner::tree_element_viewlayer_activate(), view_layer_add_exec(), WM_window_get_active_view_layer(), and WM_window_set_active_view_layer().
Definition at line 3105 of file wm_window.cc.
References C, CTX_wm_manager(), ED_workspace_change(), LISTBASE_FOREACH, wmWindow::parent, bScreen::temp, wmWindowManager::windows, WM_window_get_active_screen(), and WM_window_set_active_workspace().
Referenced by bpy_rna_context_temp_set_screen_for_window(), wm_event_do_notifiers(), and WM_window_set_active_workspace().
| void WM_window_set_dpi | ( | const wmWindow * | win | ) |
Definition at line 575 of file wm_window.cc.
References CLAMP, GHOST_GetDPIHint(), GHOST_GetNativePixelSize(), wmWindow::ghostwin, max_ff(), max_ii(), U, VIRTUAL_PIXEL_DOUBLE, VIRTUAL_PIXEL_NATIVE, and WM_window_set_dpi().
Referenced by ED_fileselect_window_params_get(), ghost_event_proc(), screen_refresh_if_needed(), wm_window_ghostwindow_add(), wm_window_ghostwindow_ensure(), wm_window_make_drawable(), WM_window_open(), and WM_window_set_dpi().
|
static |
Definition at line 1366 of file wm_window.cc.
References activate(), BLI_assert, ELEM, GHOST_ActivateWindowDrawingContext(), wmWindow::ghostwin, GPU_context_active_set(), wmWindow::gpuctx, wmWindowManager::windrawable, and wm_window_set_drawable().
Referenced by wm_window_ghostwindow_add(), wm_window_make_drawable(), wm_window_reset_drawable(), and wm_window_set_drawable().
| void wm_window_set_size | ( | wmWindow * | win, |
| int | width, | ||
| int | height ) |
Definition at line 2684 of file wm_window.cc.
References GHOST_SetClientSize(), wmWindow::ghostwin, and wm_window_set_size().
Referenced by WM_window_open(), and wm_window_set_size().
| void wm_window_set_swap_interval | ( | wmWindow * | win, |
| int | interval ) |
Definition at line 2722 of file wm_window.cc.
References GHOST_SetSwapInterval(), wmWindow::ghostwin, and wm_window_set_swap_interval().
Referenced by wm_window_set_swap_interval().
| void wm_window_swap_buffers | ( | wmWindow * | win | ) |
Push rendered buffer to the screen.
Definition at line 2717 of file wm_window.cc.
References GHOST_SwapWindowBuffers(), wmWindow::ghostwin, and wm_window_swap_buffers().
Referenced by ghost_event_proc(), wm_draw_update(), wm_window_ghostwindow_add(), and wm_window_swap_buffers().
| void wm_window_timers_delete_removed | ( | wmWindowManager * | wm | ) |
Effectively remove timers from the list and delete them. Calling this should only be done by internal WM management code, from specific, safe places.
Definition at line 2374 of file wm_window.cc.
References BLI_remlink(), LISTBASE_FOREACH_MUTABLE, MEM_freeN(), wmWindowManager::timers, WM_TIMER_TAGGED_FOR_REMOVAL, and wm_window_timers_delete_removed().
Referenced by wm_window_free(), wm_window_timers_delete_removed(), and wm_window_timers_process().
|
static |
This timer system only gives maximum 1 timer event per redraw cycle, to prevent queues to get overloaded.
| sleep_us_p | The number of microseconds to sleep which may be reduced by this function to account for timers that would run during the anticipated sleep period. |
Definition at line 1854 of file wm_window.cc.
References BLI_time_now_seconds(), C, ceil, CTX_data_main(), CTX_wm_manager(), EVENT_NONE, EVT_DATA_TIMER, KM_NOTHING, LISTBASE_FOREACH_MUTABLE, POINTER_AS_UINT, TIMERAUTOSAVE, TIMERJOBS, TIMERNOTIFIER, wmWindowManager::timers, wm_autosave_timer(), WM_event_add(), wm_event_init_from_window(), wm_jobs_timer(), WM_main_add_notifier(), WM_TIMER_TAGGED_FOR_REMOVAL, wm_window_timers_delete_removed(), and wm_window_timers_process().
Referenced by ghost_event_proc(), wm_window_events_process(), and wm_window_timers_process().
| void WM_window_title | ( | wmWindowManager * | wm, |
| wmWindow * | win, | ||
| const char * | title = nullptr ) |
Give a title to a window. With "Title" unspecified or nullptr, it is generated automatically from window settings and areas. Only use custom title when really needed.
Definition at line 489 of file wm_window.cc.
References bScreen::areabase, BKE_blender_version_string(), BKE_main_blendfile_path_from_global(), BLI_listbase_is_single(), BLI_path_basename(), BLI_path_extension_or_end(), BLI_str_utf8_invalid_substitute_as_needed(), ED_area_name(), FILE_MAX, wmWindowManager::file_saved, ListBase::first, G_MAIN, GHOST_kSuccess, GHOST_SetPath(), GHOST_SetTitle(), GHOST_SetWindowModifiedState(), wmWindow::ghostwin, IFACE_, OS_MAC, OS_WINDOWS, wmWindow::parent, SPACE_EMPTY, ScrArea::spacetype, WM_window_get_active_screen(), WM_window_is_temp_screen(), and WM_window_title().
Referenced by area_join_apply(), area_join_modal(), area_split_apply(), ED_area_newspace(), wm_event_do_notifiers(), wm_window_ghostwindow_ensure(), WM_window_open(), WM_window_open(), and WM_window_title().
|
static |
Definition at line 796 of file wm_window.cc.
References copy_v2_v2_int(), wmWindow::eventstate, wm_cursor_position_get(), wm_window_update_eventstate(), and wmEvent::xy.
Referenced by ghost_event_proc(), wm_window_ensure_eventstate(), and wm_window_update_eventstate().
|
static |
When windows are activated, simulate modifier press/release to match the current state of held modifier keys, see #40317.
NOTE(@ideasman42): There is a bug in Windows11 where Alt-Tab sends an Alt-press event to the window after it's deactivated, this means window de-activation is not a fool-proof way of ensuring modifier keys are cleared for inactive windows. So any event added to an inactive window must run wm_window_update_eventstate_modifiers first to ensure no modifier keys are held. See: #105277.
Definition at line 704 of file wm_window.cc.
References ARRAY_SIZE, wmWindow::eventstate, g_modifier_table, GHOST_kEventKeyDown, GHOST_kEventKeyUp, GHOST_kKeyUnknown, i, GHOST_TEventKeyData::is_repeat, GHOST_TEventKeyData::key, MOD_SIDE_LEFT, MOD_SIDE_RIGHT, wmEvent::modifier, GHOST_TEventKeyData::utf8_buf, wm_event_add_ghostevent(), wm_ghost_modifier_query(), and wm_window_update_eventstate_modifiers().
Referenced by ghost_event_proc(), and wm_window_update_eventstate_modifiers().
|
static |
When the window is de-activated, release all held modifiers.
Needed so events generated over unfocused (non-active) windows don't have modifiers held. Since modifier press/release events aren't send to unfocused windows it's best to assume modifiers are not pressed. This means when modifiers are held, events will incorrectly reported as not being held. Since this is standard behavior for Linux/MS-Window, opt to use this.
NOTE(@ideasman42): Events generated for non-active windows are rare, this happens when using the mouse-wheel over an unfocused window, see: #103722.
Definition at line 759 of file wm_window.cc.
References ARRAY_SIZE, wmWindow::eventstate, g_modifier_table, GHOST_kEventKeyUp, GHOST_kKeyUnknown, i, GHOST_TEventKeyData::is_repeat, GHOST_TEventKeyData::key, MOD_SIDE_LEFT, MOD_SIDE_RIGHT, wmEvent::modifier, GHOST_TEventKeyData::utf8_buf, wm_event_add_ghostevent(), wm_ghost_modifier_query(), and wm_window_update_eventstate_modifiers_clear().
Referenced by ghost_event_proc(), and wm_window_update_eventstate_modifiers_clear().
|
static |
Definition at line 1026 of file wm_window.cc.
References b, GHOST_DisposeRectangle(), GHOST_GetClientBounds(), GHOST_GetRectangle(), wmWindow::ghostwin, l, wmWindow::posx, wmWindow::posy, wmWindow::sizex, wmWindow::sizey, WM_capabilities_flag(), WM_CAPABILITY_WINDOW_POSITION, wm_get_desktopsize(), and wm_window_update_size_position().
Referenced by ghost_event_proc(), wm_window_ghostwindow_add(), WM_window_open(), and wm_window_update_size_position().
Some editor data may need to be synced with scene data (3D View camera and layers). This function ensures data is synced for editors in visible work-spaces and their visible layouts.
Definition at line 2976 of file wm_window.cc.
References ED_workspace_scene_data_sync(), LISTBASE_FOREACH, WM_window_get_active_scene(), and WM_windows_scene_data_sync().
Referenced by ed_marker_camera_bind_exec(), blender::ed::outliner::tree_element_camera_activate(), and WM_windows_scene_data_sync().
| Scene * WM_windows_scene_get_from_screen | ( | const wmWindowManager * | wm, |
| const bScreen * | screen ) |
Definition at line 2985 of file wm_window.cc.
References LISTBASE_FOREACH, wmWindowManager::windows, WM_window_get_active_scene(), WM_window_get_active_screen(), and WM_windows_scene_get_from_screen().
Referenced by WM_windows_scene_get_from_screen(), and wm_xr_session_update_screen().
| ViewLayer * WM_windows_view_layer_get_from_screen | ( | const wmWindowManager * | wm, |
| const bScreen * | screen ) |
Definition at line 2996 of file wm_window.cc.
References LISTBASE_FOREACH, wmWindowManager::windows, WM_window_get_active_screen(), WM_window_get_active_view_layer(), and WM_windows_view_layer_get_from_screen().
Referenced by WM_windows_view_layer_get_from_screen().
| WorkSpace * WM_windows_workspace_get_from_screen | ( | const wmWindowManager * | wm, |
| const bScreen * | screen ) |
Definition at line 3007 of file wm_window.cc.
References LISTBASE_FOREACH, wmWindowManager::windows, WM_window_get_active_screen(), WM_window_get_active_workspace(), and WM_windows_workspace_get_from_screen().
Referenced by WM_windows_workspace_get_from_screen().
| const struct [struct].g_modifier_table g_modifier_table[] |
Referenced by wm_ghost_modifier_query(), wm_window_update_eventstate_modifiers(), and wm_window_update_eventstate_modifiers_clear().
|
static |
Definition at line 96 of file wm_window.cc.
Referenced by ghost_event_proc(), ghost_event_proc_timestamp_warning(), wm_cursor_position_get(), WM_cursor_preferred_logical_size(), WM_cursor_warp(), wm_get_desktopsize(), wm_get_screensize(), WM_ghost_backend(), wm_ghost_exit(), wm_ghost_init(), wm_ghost_init_background(), wm_ghost_modifier_query(), WM_ghost_show_message_box(), wm_ghostwindow_destroy(), WM_init_input_devices(), WM_system_gpu_context_create(), WM_system_gpu_context_dispose(), wm_window_events_process(), WM_window_find_under_cursor(), and wm_window_ghostwindow_add().
|
static |
Definition at line 98 of file wm_window.cc.
Referenced by WM_ghost_backend(), and wm_ghost_init().
| struct [struct].g_wm_clipboard_text_simulate * g_wm_clipboard_text_simulate |
Referenced by wm_clipboard_free(), wm_clipboard_text_get_impl(), and wm_clipboard_text_set_impl().
|
static |