|
Blender
V2.93
|
Go to the source code of this file.
| void wm_cursor_position_from_ghost | ( | wmWindow * | win, |
| int * | r_x, | ||
| int * | r_y | ||
| ) |
Definition at line 964 of file wm_window.c.
References GHOST_GetNativePixelSize(), GHOST_ScreenToClient(), wmWindow::ghostwin, wmWindow::sizey, x, and y.
Referenced by ghost_event_proc(), and wm_cursor_position_get().
| void wm_cursor_position_get | ( | wmWindow * | win, |
| int * | r_x, | ||
| int * | r_y | ||
| ) |
Definition at line 986 of file wm_window.c.
References wmWindow::eventstate, G, G_FLAG_EVENT_SIMULATE, g_system, GHOST_GetCursorPosition(), UNLIKELY, wm_cursor_position_from_ghost(), wmEvent::x, and wmEvent::y.
Referenced by wm_cursor_warp_relative(), wm_handler_fileselect_do(), wm_paintcursor_draw(), and wm_window_update_eventstate().
| void wm_cursor_position_to_ghost | ( | wmWindow * | win, |
| int * | x, | ||
| int * | y | ||
| ) |
Definition at line 975 of file wm_window.c.
References GHOST_ClientToScreen(), GHOST_GetNativePixelSize(), wmWindow::ghostwin, wmWindow::sizey, x, and y.
Referenced by WM_cursor_grab_disable(), WM_cursor_grab_enable(), and WM_cursor_warp().
| void wm_get_desktopsize | ( | int * | r_width, |
| int * | r_height | ||
| ) |
Definition at line 151 of file wm_window.c.
References g_system, and GHOST_GetAllDisplayDimensions().
Referenced by wm_window_ghostwindow_add(), and wm_window_update_size_position().
| void wm_get_screensize | ( | int * | r_width, |
| int * | r_height | ||
| ) |
Definition at line 140 of file wm_window.c.
References g_system, and GHOST_GetMainDisplayDimensions().
Referenced by wm_window_check_size(), and wm_window_ghostwindows_ensure().
| void wm_ghost_exit | ( | void | ) |
Definition at line 1604 of file wm_window.c.
References g_system, GHOST_DisposeSystem(), and NULL.
Referenced by WM_exit_ex().
| void wm_ghost_init | ( | bContext * | C | ) |
Definition at line 1580 of file wm_window.c.
References C, G, G_DEBUG_GHOST, g_system, GHOST_AddEventConsumer(), GHOST_CreateEventConsumer(), GHOST_CreateSystem(), ghost_event_proc(), GHOST_SystemInitDebug(), GHOST_UseNativePixels(), GHOST_UseWindowFocus(), WMInitStruct::native_pixels, NULL, WMInitStruct::window_focus, and wm_init_state.
Referenced by WM_init(), and WM_init_opengl().
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 362 of file wm_window.c.
References C, 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_image_is_modified(), and wm_window_raise().
Referenced by ghost_event_proc(), wm_exit_blender_invoke(), and wm_window_close().
| void wm_test_autorun_revert_action_set | ( | struct wmOperatorType * | ot, |
| struct PointerRNA * | ptr | ||
| ) |
Definition at line 3163 of file wm_files.c.
References BLI_assert, G, MEM_freeN, NULL, 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 3196 of file wm_files.c.
References block_create_autorun_warning(), C, CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), ListBase::first, G, G_FLAG_SCRIPT_AUTOEXEC_FAIL, G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET, if(), NULL, 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 1047 of file wm_window.c.
References NULL, and wmWindowManager::windrawable.
Referenced by blend_file_thumb(), wm_draw_surface(), wm_ghostwindow_destroy(), wm_userpref_read_exec(), wm_window_ghostwindow_add(), wm_window_make_drawable(), wm_window_match_replace_by_file_wm(), and wm_window_reset_drawable().
| void wm_window_close | ( | bContext * | C, |
| wmWindowManager * | wm, | ||
| wmWindow * | win | ||
| ) |
Definition at line 389 of file wm_window.c.
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, NC_SCREEN, ND_LAYOUTDELETE, wmWindow::next, NULL, wmWindow::parent, bScreen::temp, wmWindowManager::windows, WM_event_add_notifier(), WM_event_remove_handlers(), wm_quit_with_optional_confirmation_prompt(), wm_window_free(), WM_window_get_active_screen(), WM_window_get_active_workspace(), WM_window_is_temp_screen(), and wmWindow::workspace_hook.
Referenced by ghost_event_proc(), render_view_cancel_exec(), wm_handler_fileselect_do(), wm_homefile_write_exec(), wm_stereo3d_set_exec(), wm_window_close_exec(), wm_window_copy_test(), wm_window_ghostwindows_remove_invalid(), and WM_window_open().
| int wm_window_close_exec | ( | bContext * | C, |
| struct wmOperator * | op | ||
| ) |
| wmWindow* wm_window_copy | ( | struct Main * | bmain, |
| wmWindowManager * | wm, | ||
| wmWindow * | win_src, | ||
| const bool | duplicate_layout, | ||
| const bool | child | ||
| ) |
Definition at line 279 of file wm_window.c.
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, WM_window_get_active_layout(), WM_window_get_active_workspace(), and wm_window_new().
Referenced by wm_window_copy_test().
| wmWindow* wm_window_copy_test | ( | bContext * | C, |
| wmWindow * | win_src, | ||
| const bool | duplicate_layout, | ||
| const bool | child | ||
| ) |
A higher level version of copy that tests the new window can be added. (called from the operator directly)
Definition at line 313 of file wm_window.c.
References C, CTX_data_main(), CTX_wm_manager(), CTX_wm_window(), wmWindow::ghostwin, NA_ADDED, NC_WINDOW, NULL, 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_free | ( | bContext * | C, |
| wmWindowManager * | wm, | ||
| wmWindow * | win | ||
| ) |
Definition at line 202 of file wm_window.c.
References BKE_screen_area_map_free(), BKE_workspace_instance_hook_free(), C, CTX_wm_window(), CTX_wm_window_set(), wmWindow::cursor_keymap_status, wmWindow::eventstate, G_MAIN, wmWindow::global_areas, wmWindow::handlers, LISTBASE_FOREACH_MUTABLE, MEM_freeN, wmWindow::modalhandlers, NULL, wmWindow::stereo3d_format, TIMERJOBS, wmWindowManager::timers, wm_event_free_all(), WM_event_remove_handlers(), WM_event_remove_timer(), WM_gestures_free_all(), wm_ghostwindow_destroy(), wm_jobs_timer_end(), and wmWindow::workspace_hook.
Referenced by wm_close_and_free(), and wm_window_close().
| int wm_window_fullscreen_toggle_exec | ( | bContext * | C, |
| struct wmOperator * | op | ||
| ) |
| void wm_window_get_position | ( | wmWindow * | win, |
| int * | r_pos_x, | ||
| int * | r_pos_y | ||
| ) |
Definition at line 1844 of file wm_window.c.
References wmWindow::posx, and wmWindow::posy.
| bool wm_window_get_swap_interval | ( | wmWindow * | win, |
| int * | intervalOut | ||
| ) |
Definition at line 1894 of file wm_window.c.
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 inits stuff after file read.
Definition at line 693 of file wm_window.c.
References BLI_assert, G, LISTBASE_FOREACH, WMInitStruct::size_x, WMInitStruct::size_y, WMInitStruct::start_x, WMInitStruct::start_y, 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 720 of file wm_window.c.
References BLI_assert, C, G, LISTBASE_FOREACH_MUTABLE, NULL, wmWindowManager::windows, and wm_window_close().
Referenced by wm_file_read_post().
| void wm_window_lower | ( | wmWindow * | win | ) |
Definition at line 1861 of file wm_window.c.
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 1054 of file wm_window.c.
References BLI_assert, G, G_DEBUG_EVENTS, wmWindow::ghostwin, GPU_framebuffer_active_get(), GPU_framebuffer_back_get(), wmWindowManager::windrawable, wmWindow::winid, wm_window_clear_drawable(), WM_window_set_dpi(), and wm_window_set_drawable().
Referenced by blend_file_thumb(), 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 struct Main * | bmain, |
| wmWindowManager * | wm, | ||
| wmWindow * | parent, | ||
| bool | dialog | ||
| ) |
| int wm_window_new_exec | ( | bContext * | C, |
| struct wmOperator * | op | ||
| ) |
| int wm_window_new_main_exec | ( | bContext * | C, |
| struct wmOperator * | op | ||
| ) |
| void wm_window_process_events | ( | const bContext * | C | ) |
Definition at line 1550 of file wm_window.c.
References BLI_assert, BLI_thread_is_main(), C, CTX_wm_manager(), g_system, GHOST_DispatchEvents(), GHOST_ProcessEvents(), PIL_sleep_ms(), wm_window_timer(), and wm_xr_events_handle().
Referenced by WM_main().
| void wm_window_raise | ( | wmWindow * | win | ) |
Definition at line 1866 of file wm_window.c.
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 | ( | void | ) |
Definition at line 1074 of file wm_window.c.
References BLI_assert, BLI_thread_is_main(), G_MAIN, wmWindow::ghostwin, GPU_framebuffer_active_get(), GPU_framebuffer_back_get(), NULL, wmWindowManager::windrawable, wm_window_clear_drawable(), and wm_window_set_drawable().
Referenced by drw_deferred_shader_compilation_free(), DRW_opengl_context_create(), DRW_opengl_context_disable_ex(), EEVEE_lightbake_job_create(), EEVEE_lightbake_job_data_alloc(), RE_gl_context_create(), and wm_xr_session_gpu_binding_context_destroy().
| void wm_window_set_size | ( | wmWindow * | win, |
| int | width, | ||
| int | height | ||
| ) |
Definition at line 1850 of file wm_window.c.
References GHOST_SetClientSize(), wmWindow::ghostwin, height, and width.
Referenced by WM_window_open().
| void wm_window_set_swap_interval | ( | wmWindow * | win, |
| int | interval | ||
| ) |
Definition at line 1889 of file wm_window.c.
References GHOST_SetSwapInterval(), and wmWindow::ghostwin.
| void wm_window_swap_buffers | ( | wmWindow * | win | ) |
Push rendered buffer to the screen.
Definition at line 1884 of file wm_window.c.
References GHOST_SwapWindowBuffers(), and wmWindow::ghostwin.
Referenced by wm_draw_update(), and wm_window_ghostwindow_add().
| void wm_window_title | ( | wmWindowManager * | wm, |
| wmWindow * | win | ||
| ) |
Definition at line 440 of file wm_window.c.
References BKE_main_blendfile_path_from_global(), BLI_snprintf(), wmWindowManager::file_saved, G, G_MAIN, GHOST_SetTitle(), GHOST_SetWindowModifiedState(), wmWindow::ghostwin, NULL, str, and WM_window_is_temp_screen().
Referenced by wm_event_do_notifiers(), and wm_window_ghostwindow_ensure().