|
Blender V4.3
|
#include <GHOST_WindowWayland.hh>
Inherits GHOST_Window.
Additional Inherited Members | |
Protected Member Functions inherited from GHOST_Window | |
| GHOST_TSuccess | releaseNativeHandles () |
Protected Attributes inherited from GHOST_Window | |
| GHOST_TDrawingContextType | m_drawingContextType |
| GHOST_TUserDataPtr | m_userData |
| bool | m_cursorVisible |
| GHOST_TGrabCursorMode | m_cursorGrab |
| GHOST_TAxisFlag | m_cursorGrabAxis |
| int32_t | m_cursorGrabInitPos [2] |
| int32_t | m_cursorGrabAccumPos [2] |
| GHOST_Rect | m_cursorGrabBounds |
| GHOST_TStandardCursor | m_cursorShape |
| bool | m_progressBarVisible |
| bool | m_canAcceptDragOperation |
| bool | m_isUnsavedChanges |
| bool | m_fullScreen |
| bool | m_wantStereoVisual |
| uint32_t | m_fullScreenWidth |
| uint32_t | m_fullScreenHeight |
| float | m_nativePixelSize |
Definition at line 65 of file GHOST_WindowWayland.hh.
| GHOST_WindowWayland::GHOST_WindowWayland | ( | GHOST_SystemWayland * | system, |
| const char * | title, | ||
| int32_t | left, | ||
| int32_t | top, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| GHOST_TWindowState | state, | ||
| const GHOST_IWindow * | parentWindow, | ||
| GHOST_TDrawingContextType | type, | ||
| const bool | is_dialog, | ||
| const bool | stereoVisual, | ||
| const bool | exclusive, | ||
| const bool | is_debug, | ||
| const GHOST_GPUDevice & | preferred_device ) |
Definition at line 1746 of file GHOST_WindowWayland.cc.
References GWL_Window::backend, GWL_WindowFrame::buffer_scale, close(), FRACTIONAL_DENOMINATOR, GWL_WindowFrame::fractional_scale, GWL_Window::fractional_scale_handle, GWL_WindowFrame::fractional_scale_preferred, GWL_Window::frame, GWL_Window::frame_pending, GHOST_ASSERT, GWL_Window::ghost_context_type, GHOST_kFailure, GHOST_PRINT, GWL_Window::ghost_system, GWL_Window::ghost_window, ghost_wl_display_report_error_if_set(), ghost_wl_surface_tag(), gwl_round_int2_by(), gwl_round_int_test(), gwl_window_frame_pending_fractional_scale_set_notest(), gwl_window_state_get(), gwl_window_state_set(), gwl_window_state_set_for_xdg(), gwl_window_title_set(), GWL_XDG_Decor_Window::initial_bounds, GWL_XDG_Decor_Window::initial_configure_seen, GWL_Window::is_dialog, GWL_Window::is_init, GWL_WindowFrame::is_scale_init, GWL_Window::is_valid_setup, libdecor_decorate, libdecor_frame_get_xdg_toplevel, libdecor_frame_map, libdecor_frame_set_app_id, libdecor_frame_set_min_content_size, libdecor_frame_set_parent, outputs_changed_update_scale(), GHOST_SystemWayland::outputs_get(), outputs_uniform_scale_or_default(), GHOST_SystemWayland::server_mutex, GHOST_Window::setDrawingContextType(), GHOST_Window::setSwapInterval(), GWL_WindowFrame::size, state, GWL_Window::surface, GWL_XDG_Decor_Window::surface, GWL_XDG_Decor_Window::toplevel, GWL_XDG_Decor_Window::toplevel_decor, UNPACK2, GWL_Window::wl, GHOST_SystemWayland::wl_compositor_get(), wl_display, wl_display_dispatch, wl_display_flush, GHOST_SystemWayland::wl_display_get(), wl_display_roundtrip, wl_egl_window_create, GHOST_SystemWayland::wl_shm_get(), wl_surface_listener, GWL_Window::wp, wp_fractional_scale_listener, GHOST_SystemWayland::wp_fractional_scale_manager_get(), GHOST_SystemWayland::xdg_app_id_get(), GWL_Window::xdg_decor, GHOST_SystemWayland::xdg_decor_manager_get(), GHOST_SystemWayland::xdg_decor_shell_get(), xdg_surface_listener, xdg_toplevel_decoration_v1_listener, and xdg_toplevel_listener.
|
override |
Definition at line 2124 of file GHOST_WindowWayland.cc.
References GWL_Window::activation_token, GWL_Window::backend, GWL_Window::cursor_custom_shape, GWL_Window::fractional_scale_handle, GWL_Window::ghost_context_type, gwl_window_cursor_custom_free(), gwl_xdg_decor_window_destroy(), GHOST_Window::releaseNativeHandles(), GHOST_SystemWayland::server_mutex, GWL_Window::surface, GWL_Window::viewport, GHOST_SystemWayland::window_surface_unref(), GWL_Window::wl, wl_display_flush, GHOST_SystemWayland::wl_display_get(), wl_egl_window_destroy, GWL_Window::wp, GWL_Window::xdg, and GWL_Window::xdg_decor.
| GHOST_TSuccess GHOST_WindowWayland::activate | ( | ) |
Set the window as active and send an GHOST_kEventWindowActivate event.
Definition at line 2629 of file GHOST_WindowWayland.cc.
References GHOST_SystemWayland::getMilliSeconds(), GHOST_System::getWindowManager(), GHOST_kEventWindowActivate, GHOST_kFailure, GHOST_kSuccess, GWL_Window::is_init, GHOST_SystemWayland::main_thread_id, notify_decor_redraw(), GHOST_SystemWayland::pushEvent_maybe_pending(), and GHOST_WindowManager::setActiveWindow().
Referenced by gwl_window_frame_update_from_pending_no_lock().
|
overridevirtual |
Implements GHOST_IWindow.
Definition at line 2449 of file GHOST_WindowWayland.cc.
References GWL_Window::frame, GHOST_kSuccess, libdecor_frame_set_fullscreen, GHOST_SystemWayland::server_mutex, GWL_XDG_Decor_Window::toplevel, and GWL_Window::xdg_decor.
|
overridevirtual |
Converts a point in client rectangle coordinates to screen coordinates.
| inX | The x-coordinate in the client rectangle. |
| inY | The y-coordinate in the client rectangle. |
| outX | The x-coordinate on the screen. |
| outY | The y-coordinate on the screen. |
Implements GHOST_IWindow.
Definition at line 2381 of file GHOST_WindowWayland.cc.
| GHOST_TSuccess GHOST_WindowWayland::close | ( | ) |
Definition at line 2623 of file GHOST_WindowWayland.cc.
References GHOST_SystemWayland::getMilliSeconds(), GHOST_kEventWindowClose, and GHOST_SystemWayland::pushEvent_maybe_pending().
Referenced by GHOST_WindowWayland(), and xdg_toplevel_handle_close().
| GHOST_TSuccess GHOST_WindowWayland::cursor_shape_refresh | ( | ) |
Refresh the cursor using the cursor assigned to this window.
Definition at line 2705 of file GHOST_WindowWayland.cc.
References GWL_Window::cursor_custom_shape, GHOST_kSuccess, gwl_window_cursor_shape_refresh(), gwl_window_pending_actions_tag(), GHOST_Window::m_cursorShape, GHOST_SystemWayland::main_thread_id, and PENDING_WINDOW_CURSOR_SHAPE_REFRESH.
Referenced by pointer_handle_enter(), tablet_tool_handle_frame(), and tablet_tool_handle_proximity_in().
| GHOST_TSuccess GHOST_WindowWayland::deactivate | ( | ) |
De-activate the window and send a GHOST_kEventWindowDeactivate event.
Definition at line 2657 of file GHOST_WindowWayland.cc.
References GHOST_SystemWayland::getMilliSeconds(), GHOST_System::getWindowManager(), GHOST_kEventWindowDeactivate, GHOST_kSuccess, GWL_Window::is_init, GHOST_SystemWayland::main_thread_id, notify_decor_redraw(), GHOST_SystemWayland::pushEvent_maybe_pending(), and GHOST_WindowManager::setWindowInactive().
Referenced by gwl_window_frame_update_from_pending_no_lock().
|
overridevirtual |
Implements GHOST_IWindow.
Definition at line 2468 of file GHOST_WindowWayland.cc.
References GWL_Window::frame, GHOST_kSuccess, libdecor_frame_unset_fullscreen, GHOST_SystemWayland::server_mutex, GWL_XDG_Decor_Window::toplevel, and GWL_Window::xdg_decor.
|
overridevirtual |
Returns the client rectangle dimensions. The left and top members of the rectangle are always zero.
| bounds | The bounding rectangle of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 2338 of file GHOST_WindowWayland.cc.
References bounds(), GWL_Window::frame, GWL_WindowFrame::size, and UNPACK2.
Referenced by getCursorPositionClientRelative_impl(), getWindowBounds(), relative_pointer_handle_relative_motion_impl(), and setWindowCursorGrab().
|
overridevirtual |
Reimplemented from GHOST_Window.
Definition at line 2306 of file GHOST_WindowWayland.cc.
References GHOST_SystemWayland::cursor_bitmap_get(), and GHOST_SystemWayland::server_mutex.
|
overridevirtual |
Return true when a software cursor should be used.
Reimplemented from GHOST_Window.
Definition at line 2261 of file GHOST_WindowWayland.cc.
References GHOST_SystemWayland::cursor_grab_use_software_display_get(), GHOST_Window::m_cursorGrab, and GHOST_SystemWayland::server_mutex.
|
overridevirtual |
Returns the recommended DPI for this window.
Reimplemented from GHOST_Window.
Definition at line 2390 of file GHOST_WindowWayland.cc.
References base_dpi, GWL_WindowFrame::buffer_scale, GWL_WindowFrame::fractional_scale, GWL_Window::frame, and gwl_window_fractional_to_viewport().
|
overridevirtual |
Returns the state of the window (normal, minimized, maximized).
Implements GHOST_IWindow.
Definition at line 2423 of file GHOST_WindowWayland.cc.
References gwl_window_state_get(), and GHOST_SystemWayland::server_mutex.
|
overridevirtual |
Returns the title displayed in the title bar.
| title | The title displayed in the title bar. |
Implements GHOST_IWindow.
Definition at line 2327 of file GHOST_WindowWayland.cc.
References GWL_Window::title.
|
overridevirtual |
Returns indication as to whether the window is valid.
Reimplemented from GHOST_Window.
Definition at line 2314 of file GHOST_WindowWayland.cc.
References GHOST_Window::getValid(), and GWL_Window::is_valid_setup.
Referenced by GHOST_SystemWayland::createWindow().
|
overridevirtual |
Returns the window rectangle dimensions. These are screen coordinates.
| bounds | The bounding rectangle of the window. |
Implements GHOST_IWindow.
Definition at line 2333 of file GHOST_WindowWayland.cc.
References bounds(), and getClientBounds().
|
overridevirtual |
Test if the standard cursor shape is supported by current platform.
Implements GHOST_IWindow.
Definition at line 2192 of file GHOST_WindowWayland.cc.
References GHOST_SystemWayland::cursor_shape_check().
|
overridevirtual |
Invalidates the contents of this window.
Implements GHOST_IWindow.
Definition at line 2431 of file GHOST_WindowWayland.cc.
References GHOST_kSuccess.
|
overridevirtual |
Reimplemented from GHOST_Window.
Definition at line 2486 of file GHOST_WindowWayland.cc.
References GWL_Window::is_dialog.
| GHOST_TSuccess GHOST_WindowWayland::notify_decor_redraw | ( | ) |
Definition at line 2689 of file GHOST_WindowWayland.cc.
References GHOST_SystemWayland::getMilliSeconds(), GHOST_kEventWindowUpdateDecor, and GHOST_SystemWayland::pushEvent_maybe_pending().
Referenced by activate(), and deactivate().
| GHOST_TSuccess GHOST_WindowWayland::notify_size | ( | ) |
Definition at line 2683 of file GHOST_WindowWayland.cc.
References GHOST_SystemWayland::getMilliSeconds(), GHOST_kEventWindowSize, and GHOST_SystemWayland::pushEvent_maybe_pending().
Referenced by gwl_window_frame_pending_size_set().
| bool GHOST_WindowWayland::outputs_changed_update_scale | ( | ) |
Return true when the windows scale or DPI changes.
Definition at line 2728 of file GHOST_WindowWayland.cc.
References ARRAY_SIZE, GWL_WindowFrame::buffer_scale, FRACTIONAL_DENOMINATOR, GWL_WindowFrame::fractional_scale, GWL_Window::fractional_scale_handle, GWL_WindowFrame::fractional_scale_preferred, GWL_Window::frame, GWL_Window::frame_pending, GWL_Window::frame_pending_mutex, gwl_round_int_by(), gwl_window_frame_update_from_pending_no_lock(), gwl_window_pending_actions_tag(), GWL_WindowFrame::is_scale_init, libdecor_frame_commit, libdecor_state_free, libdecor_state_new, GHOST_SystemWayland::main_thread_id, outputs_get(), outputs_max_scale_or_default(), PENDING_OUTPUT_SCALE_UPDATE, GWL_WindowFrame::size, state, UNLIKELY, UNPACK2, and GWL_Window::wp.
Referenced by GHOST_WindowWayland(), gwl_window_pending_actions_handle(), and outputs_changed_update_scale_tag().
| void GHOST_WindowWayland::outputs_changed_update_scale_tag | ( | ) |
Definition at line 2716 of file GHOST_WindowWayland.cc.
References gwl_window_pending_actions_tag(), outputs_changed_update_scale(), and PENDING_OUTPUT_SCALE_UPDATE_DEFERRED.
Referenced by GHOST_SystemWayland::output_scale_update(), GHOST_SystemWayland::output_unref(), surface_handle_enter(), surface_handle_leave(), and wp_fractional_scale_handle_preferred_scale().
| bool GHOST_WindowWayland::outputs_enter | ( | GWL_Output * | output | ) |
Definition at line 2874 of file GHOST_WindowWayland.cc.
References GWL_Window::outputs.
Referenced by surface_handle_enter().
| const std::vector< GWL_Output * > & GHOST_WindowWayland::outputs_get | ( | ) |
Definition at line 2610 of file GHOST_WindowWayland.cc.
References GWL_Window::outputs.
Referenced by GHOST_SystemWayland::output_scale_update(), and outputs_changed_update_scale().
| bool GHOST_WindowWayland::outputs_leave | ( | GWL_Output * | output | ) |
Definition at line 2885 of file GHOST_WindowWayland.cc.
References GWL_Window::outputs.
Referenced by GHOST_SystemWayland::output_unref(), and surface_handle_leave().
| const void GHOST_WindowWayland::pending_actions_handle | ( | ) |
Definition at line 2898 of file GHOST_WindowWayland.cc.
References GHOST_ASSERT, GWL_Window::ghost_system, gwl_window_pending_actions_handle(), and GHOST_SystemWayland::main_thread_id.
Referenced by GHOST_SystemWayland::processEvents().
| int GHOST_WindowWayland::scale_get | ( | ) | const |
Definition at line 2573 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, and GWL_Window::frame.
Referenced by setCursorGrab_use_software_confine().
| const GWL_WindowScaleParams & GHOST_WindowWayland::scale_params_get | ( | ) | const |
Definition at line 2578 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, GWL_WindowFrame::fractional_scale, GWL_Window::frame, GWL_WindowScaleParams::is_fractional, GWL_WindowScaleParams::scale, and GWL_Window::scale_params.
|
overridevirtual |
Converts a point in screen coordinates to client rectangle coordinates
| inX | The x-coordinate on the screen. |
| inY | The y-coordinate on the screen. |
| outX | The x-coordinate in the client rectangle. |
| outY | The y-coordinate in the client rectangle. |
Implements GHOST_IWindow.
Definition at line 2372 of file GHOST_WindowWayland.cc.
|
overridevirtual |
Resizes client rectangle height.
| height | The new height of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 2349 of file GHOST_WindowWayland.cc.
References GWL_Window::frame, setClientSize(), and GWL_WindowFrame::size.
|
overridevirtual |
Resizes client rectangle.
| width | The new width of the client area of the window. |
| height | The new height of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 2354 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, GWL_Window::frame_pending, GWL_Window::frame_pending_mutex, GHOST_kSuccess, gwl_round_int2_by(), gwl_window_frame_pending_size_set(), GHOST_SystemWayland::server_mutex, and GWL_WindowFrame::size.
Referenced by setClientHeight(), and setClientWidth().
|
overridevirtual |
Resizes client rectangle width.
| width | The new width of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 2344 of file GHOST_WindowWayland.cc.
References GWL_Window::frame, setClientSize(), and GWL_WindowFrame::size.
|
overridevirtual |
Sets the order of the window (bottom, top).
| order | The order of the window. |
Implements GHOST_IWindow.
Definition at line 2436 of file GHOST_WindowWayland.cc.
References GHOST_kSuccess, GHOST_kWindowOrderTop, and gwl_window_activate().
|
overridevirtual |
Sets the state of the window (normal, minimized, maximized).
| state | The state of the window. |
Implements GHOST_IWindow.
Definition at line 2415 of file GHOST_WindowWayland.cc.
References GHOST_kFailure, GHOST_kSuccess, gwl_window_state_set(), GHOST_SystemWayland::server_mutex, and state.
|
overridevirtual |
Sets the title displayed in the title bar.
| title | The title to display in the title bar. |
Implements GHOST_IWindow.
Definition at line 2319 of file GHOST_WindowWayland.cc.
References gwl_window_title_set(), and GHOST_SystemWayland::server_mutex.
|
overridevirtual |
Sets the cursor grab on the window using native window system calls.
Reimplemented from GHOST_Window.
Definition at line 2197 of file GHOST_WindowWayland.cc.
References bounds(), getClientBounds(), GHOST_Window::getCursorGrabBounds(), GHOST_kFailure, GHOST_kGrabWrap, GHOST_kSuccess, GHOST_Window::m_cursorGrab, GHOST_Window::m_cursorGrabAxis, GHOST_Window::m_cursorGrabInitPos, GHOST_SystemWayland::server_mutex, GWL_Window::surface, GHOST_SystemWayland::window_cursor_grab_set(), and GWL_Window::wl.
|
overridevirtual |
Sets the cursor shape on the window using native window system calls.
Implements GHOST_Window.
Definition at line 2225 of file GHOST_WindowWayland.cc.
References GWL_Window::cursor_custom_shape, GHOST_SystemWayland::cursor_shape_check(), GHOST_SystemWayland::cursor_shape_set(), GHOST_WindowManager::getActiveWindow(), GHOST_System::getWindowManager(), GHOST_kFailure, GHOST_kStandardCursorDefault, gwl_window_cursor_custom_clear(), GHOST_Window::m_cursorShape, GHOST_SystemWayland::server_mutex, wl_display_flush, and GHOST_SystemWayland::wl_display_get().
|
overridevirtual |
Sets the cursor visibility on the window using native window system calls.
Implements GHOST_Window.
Definition at line 2402 of file GHOST_WindowWayland.cc.
References GHOST_SystemWayland::cursor_visibility_set(), GHOST_kSuccess, GHOST_SystemWayland::server_mutex, wl_display_flush, and GHOST_SystemWayland::wl_display_get().
|
overridevirtual |
Sets the cursor shape on the window using native window system calls.
Implements GHOST_Window.
Definition at line 2269 of file GHOST_WindowWayland.cc.
References GWL_Window::cursor_custom_shape, GHOST_SystemWayland::cursor_shape_set(), GHOST_WindowManager::getActiveWindow(), GHOST_System::getWindowManager(), GHOST_kFailure, GHOST_kStandardCursorCustom, GHOST_kStandardCursorDefault, GHOST_kSuccess, gwl_window_cursor_custom_load(), gwl_window_cursor_custom_store(), GHOST_Window::m_cursorShape, GHOST_SystemWayland::server_mutex, wl_display_flush, and GHOST_SystemWayland::wl_display_get().
|
overridevirtual |
Swaps front and back buffers of a window.
Reimplemented from GHOST_Window.
Definition at line 2185 of file GHOST_WindowWayland.cc.
References GHOST_ASSERT, GHOST_SystemWayland::main_thread_id, and GHOST_Window::swapBuffers().
| wl_fixed_t GHOST_WindowWayland::wl_fixed_from_window | ( | wl_fixed_t | value | ) | const |
Definition at line 2589 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, GWL_WindowFrame::fractional_scale, GWL_Window::frame, and gwl_window_fractional_from_viewport().
Referenced by getCursorPositionClientRelative_impl(), relative_pointer_handle_relative_motion(), relative_pointer_handle_relative_motion_impl(), and setCursorPositionClientRelative_impl().
| wl_fixed_t GHOST_WindowWayland::wl_fixed_to_window | ( | wl_fixed_t | value | ) | const |
Definition at line 2597 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, GWL_WindowFrame::fractional_scale, GWL_Window::frame, and gwl_window_fractional_to_viewport().
Referenced by getCursorPositionClientRelative_impl().
| wl_surface * GHOST_WindowWayland::wl_surface_get | ( | ) | const |
Definition at line 2605 of file GHOST_WindowWayland.cc.
References GWL_Window::surface, and GWL_Window::wl.
Referenced by gwl_window_activate().