|
Blender V4.3
|
#include "BLI_compiler_attrs.h"Go to the source code of this file.
| void wm_clipboard_free | ( | ) |
Definition at line 2298 of file wm_window.cc.
References ARRAY_SIZE, g_wm_clipboard_text_simulate, and MEM_freeN().
Referenced by WM_exit_ex().
Definition at line 1192 of file wm_window.cc.
References GHOST_GetNativePixelSize(), wmWindow::ghostwin, and wmWindow::sizey.
Referenced by wm_cursor_position_from_ghost_screen_coords(), and wm_cursor_position_get().
Definition at line 1210 of file wm_window.cc.
References GHOST_ScreenToClient(), wmWindow::ghostwin, and wm_cursor_position_from_ghost_client_coords().
Referenced by ghost_event_proc(), wm_event_add_ghostevent(), and WM_window_find_under_cursor().
Definition at line 1222 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().
Definition at line 1201 of file wm_window.cc.
References GHOST_GetNativePixelSize(), wmWindow::ghostwin, and wmWindow::sizey.
Referenced by wm_cursor_position_to_ghost_screen_coords(), and WM_cursor_warp().
Definition at line 1216 of file wm_window.cc.
References GHOST_ClientToScreen(), wmWindow::ghostwin, and wm_cursor_position_to_ghost_client_coords().
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 182 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 171 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 1942 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 1876 of file wm_window.cc.
References BLI_assert, BLI_assert_msg, BLI_system_backtrace(), 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, and wm_init_state.
Referenced by WM_init().
| void wm_ghost_init_background | ( | ) |
Definition at line 1922 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 397 of file wm_window.cc.
References CTX_data_main(), CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), G, 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 4129 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_exec(), and wm_test_autorun_revert_action_exec().
| void wm_test_autorun_warning | ( | bContext * | C | ) |
Definition at line 4162 of file wm_files.cc.
References block_create_autorun_warning(), CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), ListBase::first, G, G_FLAG_SCRIPT_AUTOEXEC_FAIL, G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET, wmWindow::parent, UI_popup_block_invoke(), wmWindowManager::winactive, and wmWindowManager::windows.
Referenced by wm_event_do_notifiers().
| void wm_window_clear_drawable | ( | wmWindowManager * | wm | ) |
Definition at line 1265 of file wm_window.cc.
References wmWindowManager::windrawable.
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 429 of file wm_window.cc.
References BKE_workspace_active_layout_get(), BKE_workspace_layout_remove(), BKE_workspace_layout_screen_get(), BLI_assert, BLI_remlink(), 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, 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().
| int wm_window_close_exec | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 1115 of file wm_window.cc.
References 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 324 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_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 354 of file wm_window.cc.
References 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 1827 of file wm_window.cc.
References BLI_assert, BLI_thread_is_main(), BLI_time_sleep_ms(), 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 235 of file wm_window.cc.
References BKE_screen_area_map_free(), BKE_workspace_instance_hook_free(), 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::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_timers_delete_removed(), and wmWindow::workspace_hook.
Referenced by wm_close_and_free(), and wm_window_close().
| int wm_window_fullscreen_toggle_exec | ( | bContext * | C, |
| wmOperator * | op ) |
Full-screen operator callback.
Definition at line 1164 of file wm_window.cc.
References 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().
Definition at line 2581 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.
win->ghostwin can be NULL in rare cases (where OpenGL driver fails to create a context for eg). We could remove them with wm_window_ghostwindows_remove_invalid but better not since caller may continue to use. Instead, caller needs to handle the error case and cleanup. Definition at line 880 of file wm_window.cc.
References BLI_assert, G, LISTBASE_FOREACH, WMInitStruct::size, WMInitStruct::start, 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 905 of file wm_window.cc.
References BLI_assert, 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 2549 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 1272 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_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(), 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 308 of file wm_window.cc.
References BKE_workspace_instance_hook_create(), BLI_addtail(), find_free_winid(), MEM_callocN, wmWindow::parent, wmWindow::stereo3d_format, wmWindowManager::windows, wmWindow::winid, and wmWindow::workspace_hook.
Referenced by wm_add_default(), wm_window_copy(), and WM_window_open().
| int wm_window_new_exec | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 1123 of file wm_window.cc.
References BKE_report(), BKE_screen_find_big_area(), CTX_wm_screen(), CTX_wm_window(), int, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, wmWindow::sizex, wmWindow::sizey, SPACE_TYPE_ANY, WIN_ALIGN_PARENT_CENTER, and WM_window_open().
Referenced by WM_OT_window_new().
| int wm_window_new_main_exec | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 1152 of file wm_window.cc.
References BKE_report(), 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 2554 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 1293 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(), and wm_window_set_drawable().
Referenced by DRW_gpu_context_activate(), DRW_gpu_context_create(), DRW_gpu_context_disable_ex(), blender::eevee::LightBake::LightBake(), RE_system_gpu_context_ensure(), RE_system_gpu_context_free(), and wm_xr_session_gpu_binding_context_destroy().
Definition at line 2538 of file wm_window.cc.
References GHOST_SetClientSize(), and wmWindow::ghostwin.
Referenced by WM_window_open().
Definition at line 2576 of file wm_window.cc.
References GHOST_SetSwapInterval(), and wmWindow::ghostwin.
| void wm_window_swap_buffers | ( | wmWindow * | win | ) |
Push rendered buffer to the screen.
Definition at line 2571 of file wm_window.cc.
References GHOST_SwapWindowBuffers(), 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 2219 of file wm_window.cc.
References BLI_remlink(), LISTBASE_FOREACH_MUTABLE, MEM_freeN(), wmWindowManager::timers, and WM_TIMER_TAGGED_FOR_REMOVAL.
Referenced by wm_window_free(), and wm_window_timers_process().