|
Blender V5.0
|
#include "BLI_compiler_attrs.h"Go to the source code of this file.
| void wm_clipboard_free | ( | ) |
Definition at line 2455 of file wm_window.cc.
References ARRAY_SIZE, g_wm_clipboard_text_simulate, i, and MEM_freeN().
Referenced by WM_exit_ex().
| void wm_cursor_position_from_ghost_client_coords | ( | wmWindow * | win, |
| int * | x, | ||
| int * | y ) |
Definition at line 1437 of file wm_window.cc.
References GHOST_GetNativePixelSize(), wmWindow::ghostwin, wmWindow::sizey, x, and y.
Referenced by 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 1455 of file wm_window.cc.
References GHOST_ScreenToClient(), wmWindow::ghostwin, wm_cursor_position_from_ghost_client_coords(), x, and y.
Referenced by ghost_event_proc(), 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 1467 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(), and wmEvent::xy.
Referenced by area_join_update_data(), 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 1446 of file wm_window.cc.
References GHOST_GetNativePixelSize(), wmWindow::ghostwin, wmWindow::sizey, x, and y.
Referenced by 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 1461 of file wm_window.cc.
References GHOST_ClientToScreen(), wmWindow::ghostwin, wm_cursor_position_to_ghost_client_coords(), x, and y.
Referenced by WM_cursor_grab_disable(), WM_cursor_grab_enable(), and WM_window_find_under_cursor().
| bool wm_get_desktopsize | ( | int | r_size[2] | ) |
Size of all screens (desktop), useful since the mouse is bound by this.
Definition at line 192 of file wm_window.cc.
References g_system, GHOST_GetAllDisplayDimensions(), and GHOST_kFailure.
Referenced by 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 181 of file wm_window.cc.
References g_system, GHOST_GetMainDisplayDimensions(), and GHOST_kFailure.
Referenced by wm_window_check_size(), and wm_window_ghostwindows_ensure().
| void wm_ghost_exit | ( | ) |
Definition at line 2173 of file wm_window.cc.
References g_system, and GHOST_DisposeSystem().
Referenced by WM_exit_ex().
| void wm_ghost_init | ( | bContext * | C | ) |
Definition at line 2106 of file wm_window.cc.
References BLI_assert, BLI_assert_msg, BLI_system_backtrace(), C, CLOG_STR_ERROR, 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(), GHOST_UseWindowFrame(), GPU_backend_ghost_system_set(), LOG_GHOST_SYSTEM, UNLIKELY, and wm_init_state.
Referenced by WM_init().
| void wm_ghost_init_background | ( | ) |
Definition at line 2153 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(), and GPU_backend_ghost_system_set().
Referenced by WM_init_gpu().
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 407 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(), and wm_window_raise().
Referenced by ghost_event_proc(), wm_exit_blender_invoke(), and wm_window_close().
| void wm_test_autorun_revert_action_set | ( | wmOperatorType * | ot, |
| PointerRNA * | ptr ) |
Definition at line 4241 of file wm_files.cc.
References BLI_assert, G, ot, ptr, WM_operator_properties_free(), and wm_test_autorun_revert_action_data.
Referenced by wm_block_autorun_warning_ignore(), WM_exit_ex(), wm_file_read_post(), wm_recover_auto_save_exec(), wm_recover_last_session_impl(), and wm_test_autorun_revert_action_exec().
| void wm_test_autorun_warning | ( | bContext * | C | ) |
Definition at line 4274 of file wm_files.cc.
References block_create_autorun_warning(), C, CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), G, G_FLAG_SCRIPT_AUTOEXEC_FAIL, G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET, wmWindow::parent, and UI_popup_block_invoke().
Referenced by wm_event_do_notifiers().
| void wm_test_foreign_file_warning | ( | bContext * | C | ) |
Definition at line 4305 of file wm_files.cc.
References ALERT_ICON_ERROR, C, CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), G_MAIN, wmWindow::parent, RPT_, and UI_alert().
Referenced by wm_event_do_notifiers().
| void wm_window_clear_drawable | ( | wmWindowManager * | wm | ) |
Definition at line 1510 of file wm_window.cc.
References wmWindowManager::runtime.
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_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 463 of file wm_window.cc.
References bScreen::areabase, BKE_workspace_active_layout_get(), BKE_workspace_layout_remove(), BKE_workspace_layout_screen_get(), BLI_assert, BLI_listbase_is_single(), BLI_remlink(), C, CTX_data_main(), CTX_wm_window_set(), ED_screen_exit(), ListBase::first, float, GHOST_GetNativePixelSize(), wmWindow::ghostwin, wmWindow::handlers, LISTBASE_FOREACH_MUTABLE, wmWindow::modalhandlers, NA_REMOVED, NC_SCREEN, NC_WINDOW, ND_LAYOUTDELETE, wmWindow::next, wmWindow::parent, wmWindow::posx, wmWindow::posy, wmWindow::sizex, wmWindow::sizey, ScrArea::spacetype, stored_window_bounds(), bScreen::temp, U, UI_SCALE_FAC, 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_dpi_set_userdef(), wm_window_free(), WM_window_get_active_screen(), WM_window_get_active_workspace(), WM_window_is_main_top_level(), WM_window_is_maximized(), WM_window_is_temp_screen(), wmWindow::workspace_hook, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
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 1360 of file wm_window.cc.
References C, CTX_wm_manager(), CTX_wm_window(), OPERATOR_FINISHED, and wm_window_close().
Referenced by WM_OT_window_close().
| 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 335 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_UTF8, wmWindow::view_layer_name, wmWindow::winid, WM_window_get_active_layout(), WM_window_get_active_workspace(), wm_window_new(), and wmWindow::workspace_hook.
Referenced by 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 365 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(), and wm_window_copy().
Referenced by wm_stereo3d_set_exec(), and wm_window_new_main_exec().
| void wm_window_events_process | ( | const bContext * | C | ) |
Definition at line 2071 of file wm_window.cc.
References BLI_assert, BLI_thread_is_main(), BLI_time_sleep_precise_us(), C, CTX_wm_manager(), G, G_FLAG_EVENT_SIMULATE, g_system, GHOST_DispatchEvents(), GHOST_ProcessEvents(), GPU_render_begin(), GPU_render_end(), wm_window_timers_process(), and wm_xr_events_handle().
Referenced by WM_main().
| void wm_window_free | ( | bContext * | C, |
| wmWindowManager * | wm, | ||
| wmWindow * | win ) |
Including window itself.
| C | can be NULL. |
Definition at line 245 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, wmWindowManager::runtime, wmWindow::stereo3d_format, TIMERJOBS, 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_timers_delete_removed(), and wmWindow::workspace_hook.
Referenced by wm_close_and_free(), and wm_window_close().
| wmOperatorStatus wm_window_fullscreen_toggle_exec | ( | bContext * | C, |
| wmOperator * | op ) |
Full-screen operator callback.
Definition at line 1409 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, and state.
Referenced by WM_OT_window_fullscreen_toggle().
| bool wm_window_get_swap_interval | ( | wmWindow * | win, |
| int * | r_interval ) |
Definition at line 2734 of file wm_window.cc.
References GHOST_GetSwapInterval(), and wmWindow::ghostwin.
| 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 1085 of file wm_window.cc.
References BLI_assert, G, LISTBASE_FOREACH, UNLIKELY, wmWindowManager::windows, wm_get_screensize(), wm_init_state, and wm_window_ghostwindow_ensure().
Referenced by WM_check().
| 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 1110 of file wm_window.cc.
References BLI_assert, C, G, LISTBASE_FOREACH_MUTABLE, wmWindowManager::windows, and wm_window_close().
Referenced by wm_file_read_post().
| void wm_window_lower | ( | wmWindow * | win | ) |
Definition at line 2697 of file wm_window.cc.
References GHOST_kWindowOrderBottom, GHOST_SetWindowOrder(), and wmWindow::ghostwin.
Referenced by render_view_show_invoke().
| void wm_window_make_drawable | ( | wmWindowManager * | wm, |
| wmWindow * | win ) |
Definition at line 1517 of file wm_window.cc.
References BLI_assert, G, G_DEBUG_EVENTS, wmWindow::ghostwin, GPU_framebuffer_active_get(), GPU_framebuffer_back_get(), printf, wmWindowManager::runtime, wmWindow::winid, wm_window_clear_drawable(), WM_window_dpi_set_userdef(), 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(), and wm_handler_fileselect_do().
| wmWindow * wm_window_new | ( | const Main * | bmain, |
| wmWindowManager * | wm, | ||
| wmWindow * | parent, | ||
| bool | dialog ) |
Don't change context itself.
Definition at line 319 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, and wmWindow::workspace_hook.
Referenced by wm_add_default(), wm_window_copy(), and WM_window_open().
| wmOperatorStatus wm_window_new_exec | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 1368 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, and WM_window_open().
Referenced by WM_OT_window_new().
| wmOperatorStatus wm_window_new_main_exec | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 1397 of file wm_window.cc.
References BKE_report(), C, CTX_wm_window(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and wm_window_copy_test().
Referenced by WM_OT_window_new_main().
| void wm_window_raise | ( | wmWindow * | win | ) |
Definition at line 2702 of file wm_window.cc.
References GHOST_GetWindowState(), GHOST_kWindowOrderTop, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, GHOST_SetWindowOrder(), GHOST_SetWindowState(), and wmWindow::ghostwin.
Referenced by render_view_open(), render_view_show_invoke(), wm_quit_with_optional_confirmation_prompt(), and WM_window_open().
| void wm_window_reset_drawable | ( | ) |
Reset active the current window gpu drawing context.
Definition at line 1538 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::runtime, wm_window_clear_drawable(), and wm_window_set_drawable().
Referenced by ContextShared::disable(), DRW_gpu_context_activate(), RenderDisplay::ensure_system_gpu_context(), blender::eevee::LightBake::LightBake(), wm_xr_session_gpu_binding_context_destroy(), and RenderDisplay::~RenderDisplay().
| void wm_window_set_size | ( | wmWindow * | win, |
| int | width, | ||
| int | height ) |
Definition at line 2686 of file wm_window.cc.
References GHOST_SetClientSize(), and wmWindow::ghostwin.
Referenced by WM_window_open().
| void wm_window_set_swap_interval | ( | wmWindow * | win, |
| int | interval ) |
Definition at line 2729 of file wm_window.cc.
References GHOST_SetSwapInterval(), and wmWindow::ghostwin.
| void wm_window_swap_buffer_acquire | ( | wmWindow * | win | ) |
Push rendered buffer to the screen.
Definition at line 2719 of file wm_window.cc.
References GHOST_SwapWindowBufferAcquire(), and wmWindow::ghostwin.
Referenced by wm_draw_update(), and wm_window_ghostwindow_add().
| void wm_window_swap_buffer_release | ( | wmWindow * | win | ) |
Definition at line 2724 of file wm_window.cc.
References GHOST_SwapWindowBufferRelease(), and wmWindow::ghostwin.
Referenced by ghost_event_proc(), wm_draw_update(), and wm_window_ghostwindow_add().
| 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 2386 of file wm_window.cc.
References BLI_remlink(), LISTBASE_FOREACH_MUTABLE, MEM_freeN(), wmWindowManager::runtime, and WM_TIMER_TAGGED_FOR_REMOVAL.
Referenced by wm_window_free(), and wm_window_timers_process().