Blender
V3.3
|
#include <GHOST_SystemWayland.h>
Definition at line 90 of file GHOST_SystemWayland.h.
GHOST_SystemWayland::GHOST_SystemWayland | ( | ) |
Definition at line 2844 of file GHOST_SystemWayland.cpp.
References data_device_listener, display_t::data_device_manager, display_t::display, display_destroy(), ghost_wayland_log_handler(), input, display_t::inputs, libdecor_new, registry_listener, display_t::system, display_t::tablet_manager, tablet_seat_listener, wl_display_connect, wl_display_roundtrip, wl_log_set_handler_client, and display_t::xdg_shell.
|
override |
Definition at line 2896 of file GHOST_SystemWayland.cpp.
References display_destroy().
wl_compositor * GHOST_SystemWayland::compositor | ( | ) |
Definition at line 3742 of file GHOST_SystemWayland.cpp.
References display_t::compositor.
Referenced by createOffscreenContext(), and GHOST_WindowWayland::GHOST_WindowWayland().
|
overridevirtual |
Create a new off-screen context. Never explicitly delete the context, use disposeContext() instead.
Implements GHOST_System.
Definition at line 3184 of file GHOST_SystemWayland.cpp.
References compositor(), blender::compositor::context, createOffscreenContext_impl(), display_t::display, GHOST_PRINT, wl_egl_window_create, and wl_egl_window_destroy.
|
overridevirtual |
Create a new window. The new window is added to the list of windows managed. Never explicitly delete the window, use disposeWindow() instead.
title | The name of the window (displayed in the title bar of the window if the OS supports it). |
left | The coordinate of the left edge of the window. |
top | The coordinate of the top edge of the window. |
width | The width the window. |
height | The height the window. |
state | The state of the window when opened. |
type | The type of drawing context installed in this window. |
glSettings | Misc OpenGL settings. |
exclusive | Use to show the window on top and ignore others (used full-screen). |
is_dialog | Stay on top of parent window, no icon in taskbar, can't be minimized. |
parentWindow | Parent (embedder) window |
Implements GHOST_ISystem.
Definition at line 3221 of file GHOST_SystemWayland.cpp.
References GHOST_WindowManager::addWindow(), GHOST_GLSettings::flags, GHOST_System::getMilliSeconds(), GHOST_Window::getValid(), GHOST_System::getWindowManager(), GHOST_glStereoVisual, GHOST_kEventWindowSize, height, left, GHOST_System::m_windowManager, GHOST_System::pushEvent(), GHOST_WindowManager::setActiveWindow(), state, top, type, width, and window_manager.
wl_display * GHOST_SystemWayland::display | ( | ) |
Definition at line 3737 of file GHOST_SystemWayland.cpp.
References display_t::display.
Referenced by data_device_handle_drop(), GHOST_WindowWayland::GHOST_WindowWayland(), and GHOST_WindowWayland::~GHOST_WindowWayland().
|
overridevirtual |
Dispose of a context.
context | Pointer to the context to be disposed. |
Implements GHOST_ISystem.
Definition at line 3209 of file GHOST_SystemWayland.cpp.
References blender::compositor::context, GHOST_kSuccess, and wl_egl_window_destroy.
|
overridevirtual |
Returns the combine dimensions of all monitors.
Implements GHOST_ISystem.
Definition at line 3121 of file GHOST_SystemWayland.cpp.
References height, INT32_MAX, INT32_MIN, max, min, output, display_t::outputs, width, and xy.
|
overridevirtual |
Returns the state of the mouse buttons (outside the message queue).
buttons | The state of the buttons. |
Implements GHOST_System.
Definition at line 2955 of file GHOST_SystemWayland.cpp.
References input_state_pointer_t::buttons, GHOST_kFailure, GHOST_kSuccess, input, input_state_pointer_active(), display_t::inputs, and UNLIKELY.
|
overridevirtual |
Returns the selection buffer
selection | Only used on X11. |
Implements GHOST_System.
Definition at line 2970 of file GHOST_SystemWayland.cpp.
GHOST_TSuccess GHOST_SystemWayland::getCursorBitmap | ( | GHOST_CursorBitmapRef * | bitmap | ) |
Definition at line 3579 of file GHOST_SystemWayland.cpp.
References cursor_t::custom_data, GHOST_CursorBitmapRef::data, GHOST_CursorBitmapRef::data_size, GHOST_kFailure, GHOST_kSuccess, GHOST_CursorBitmapRef::hot_spot, display_t::inputs, cursor_t::is_custom, and cursor_t::wl_image.
Referenced by GHOST_WindowWayland::getCursorBitmap().
bool GHOST_SystemWayland::getCursorGrabUseSoftwareDisplay | ( | const GHOST_TGrabCursorMode | mode | ) |
Definition at line 3624 of file GHOST_SystemWayland.cpp.
References cursor_is_software(), input, display_t::inputs, and UNLIKELY.
Referenced by GHOST_WindowWayland::getCursorGrabUseSoftwareDisplay().
|
overridevirtual |
Returns the current location of the cursor (location in screen coordinates)
x | The x-coordinate of the cursor. |
y | The y-coordinate of the cursor. |
Implements GHOST_ISystem.
Definition at line 3077 of file GHOST_SystemWayland.cpp.
References getCursorPositionClientRelative_impl(), GHOST_kFailure, ghost_wl_surface_user_data(), input, input_state_pointer_active(), display_t::inputs, UNLIKELY, input_state_pointer_t::wl_surface, x, and y.
|
overridevirtual |
Returns the current location of the cursor (location in window coordinates)
x | The x-coordinate of the cursor. |
y | The y-coordinate of the cursor. |
Reimplemented from GHOST_System.
Definition at line 3049 of file GHOST_SystemWayland.cpp.
References getCursorPositionClientRelative_impl(), GHOST_kFailure, input, input_state_pointer_active(), display_t::inputs, UNLIKELY, input_state_pointer_t::wl_surface, x, and y.
|
overridevirtual |
Returns the dimensions of the main display on this system.
Implements GHOST_ISystem.
Definition at line 3111 of file GHOST_SystemWayland.cpp.
References getNumDisplays(), height, display_t::outputs, and width.
|
overridevirtual |
Returns the state of all modifier keys.
keys | The state of all modifier keys (true == pressed). |
Implements GHOST_System.
Definition at line 2920 of file GHOST_SystemWayland.cpp.
References GHOST_kFailure, GHOST_kModifierKeyLeftAlt, GHOST_kModifierKeyLeftControl, GHOST_kModifierKeyLeftShift, GHOST_kModifierKeyNum, GHOST_kModifierKeyOS, GHOST_kModifierKeyRightAlt, GHOST_kModifierKeyRightControl, GHOST_kModifierKeyRightShift, GHOST_kSuccess, display_t::inputs, GHOST_ModifierKeys::set(), and UNLIKELY.
|
overridevirtual |
Returns the number of displays on this system.
Implements GHOST_ISystem.
Definition at line 3009 of file GHOST_SystemWayland.cpp.
References display_t::outputs.
Referenced by getMainDisplayDimensions().
GHOST_TSuccess GHOST_SystemWayland::hasCursorShape | ( | GHOST_TStandardCursor | cursorShape | ) |
Definition at line 3493 of file GHOST_SystemWayland.cpp.
References cursors, GHOST_kFailure, and GHOST_kSuccess.
Referenced by GHOST_WindowWayland::hasCursorShape().
const std::vector< output_t * > & GHOST_SystemWayland::outputs | ( | ) | const |
Definition at line 3768 of file GHOST_SystemWayland.cpp.
References display_t::outputs.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
Retrieves events from the system and stores them in the queue.
waitForEvent | Flag to wait for an event (or return immediately). |
Implements GHOST_ISystem.
Definition at line 2901 of file GHOST_SystemWayland.cpp.
References display_t::display, GHOST_TimerManager::fireTimers(), GHOST_System::getEventManager(), GHOST_System::getMilliSeconds(), GHOST_EventManager::getNumEvents(), GHOST_System::getTimerManager(), wl_display_dispatch, and wl_display_roundtrip.
|
overridevirtual |
Put data to the Clipboard
buffer | The buffer to copy to the clipboard. |
selection | The clipboard to copy too only used on X11. |
Implements GHOST_System.
Definition at line 2977 of file GHOST_SystemWayland.cpp.
References buffer, data_source_t::buffer_out, display_t::data_device_manager, data_source_t::data_source, data_source_listener, free(), input, display_t::inputs, lock, mime_send, type, and UNLIKELY.
void GHOST_SystemWayland::selection_set | ( | const std::string & | selection | ) |
Definition at line 3808 of file GHOST_SystemWayland.cpp.
Referenced by data_device_handle_selection().
|
overridevirtual |
Set the Console State
action | console state |
Implements GHOST_ISystem.
Definition at line 2915 of file GHOST_SystemWayland.cpp.
|
overridevirtual |
Updates the location of the cursor (location in screen coordinates). Not all operating systems allow the cursor to be moved (without the input device being moved).
x | The x-coordinate of the cursor. |
y | The y-coordinate of the cursor. |
Implements GHOST_ISystem.
Definition at line 3095 of file GHOST_SystemWayland.cpp.
References GHOST_kFailure, ghost_wl_surface_user_data(), input, display_t::inputs, setCursorPositionClientRelative_impl(), UNLIKELY, x, and y.
|
overridevirtual |
Updates the location of the cursor (location in window coordinates).
x | The x-coordinate of the cursor. |
y | The y-coordinate of the cursor. |
Reimplemented from GHOST_System.
Definition at line 3065 of file GHOST_SystemWayland.cpp.
References GHOST_kFailure, input, display_t::inputs, setCursorPositionClientRelative_impl(), UNLIKELY, x, and y.
GHOST_TSuccess GHOST_SystemWayland::setCursorShape | ( | GHOST_TStandardCursor | shape | ) |
Definition at line 3451 of file GHOST_SystemWayland.cpp.
References buffer, Freestyle::c, cursor_buffer_set(), cursors, GHOST_kFailure, GHOST_kStandardCursorDefault, GHOST_kSuccess, GHOST_PRINT, image(), input, display_t::inputs, UNLIKELY, wl_cursor_image_get_buffer, wl_cursor_theme_get_cursor, and wl_cursor_theme_load.
Referenced by GHOST_WindowWayland::setWindowCursorShape().
GHOST_TSuccess GHOST_SystemWayland::setCursorVisibility | ( | bool | visible | ) |
Definition at line 3600 of file GHOST_SystemWayland.cpp.
References CURSOR_VISIBLE_ALWAYS_SET, cursor_visible_set(), GHOST_kFailure, GHOST_kSuccess, input, display_t::inputs, and UNLIKELY.
Referenced by GHOST_WindowWayland::setWindowCursorVisibility().
GHOST_TSuccess GHOST_SystemWayland::setCustomCursorShape | ( | uint8_t * | bitmap, |
uint8_t * | mask, | ||
int | sizex, | ||
int | sizey, | ||
int | hotX, | ||
int | hotY, | ||
bool | canInvertColor | ||
) |
Definition at line 3506 of file GHOST_SystemWayland.cpp.
References buffer, cursor_buffer_listener, cursor_buffer_set(), cursor_t::custom_data, cursor_t::custom_data_size, cursor_t::custom_scale, GHOST_kFailure, GHOST_kSuccess, ghost_wl_buffer_create_for_image(), display_t::inputs, cursor_t::is_custom, mask(), display_t::shm, UNLIKELY, cursor_t::visible, cursor_t::wl_buffer, cursor_t::wl_image, x, and y.
Referenced by GHOST_WindowWayland::setWindowCustomCursorShape().
wl_shm * GHOST_SystemWayland::shm | ( | ) | const |
Definition at line 3773 of file GHOST_SystemWayland.cpp.
References display_t::shm.
|
virtual |
Return true when warping the cursor is supported.
Reimplemented from GHOST_System.
Definition at line 3611 of file GHOST_SystemWayland.cpp.
|
virtual |
Return true getting/setting the window position is supported.
Reimplemented from GHOST_System.
Definition at line 3618 of file GHOST_SystemWayland.cpp.
bool GHOST_SystemWayland::window_cursor_grab_set | ( | const GHOST_TGrabCursorMode | mode, |
const GHOST_TGrabCursorMode | mode_current, | ||
int32_t | init_grab_xy[2], | ||
const GHOST_Rect * | wrap_bounds, | ||
GHOST_TAxisFlag | wrap_axis, | ||
wl_surface * | surface, | ||
int | scale | ||
) |
Definition at line 3831 of file GHOST_SystemWayland.cpp.
References cursor_is_software(), CURSOR_VISIBLE_ONLY_HIDE, CURSOR_VISIBLE_ONLY_SHOW, cursor_visible_set(), ELEM, GHOST_kEventCursorMove, GHOST_kFailure, GHOST_kGrabDisable, GHOST_kGrabHide, GHOST_kGrabNormal, GHOST_kGrabWrap, GHOST_kSuccess, GHOST_TABLET_DATA_NONE, ghost_wl_surface_user_data(), input, input_grab_state_from_mode(), display_t::inputs, GHOST_Rect::m_b, GHOST_Rect::m_l, GHOST_Rect::m_r, GHOST_Rect::m_t, display_t::pointer_constraints, relative_pointer_listener, display_t::relative_pointer_manager, setCursorGrab_use_software_confine(), surface, UNLIKELY, UNPACK2, input_grab_state_t::use_confine, input_grab_state_t::use_lock, and GHOST_Rect::wrapPoint().
Referenced by GHOST_WindowWayland::setWindowCursorGrab().
void GHOST_SystemWayland::window_surface_unref | ( | const wl_surface * | surface | ) |
Clear all references to this surface to prevent accessing NULL pointers.
Definition at line 3813 of file GHOST_SystemWayland.cpp.
References input, display_t::inputs, and SURFACE_CLEAR_PTR.
Referenced by GHOST_WindowWayland::~GHOST_WindowWayland().
zxdg_decoration_manager_v1 * GHOST_SystemWayland::xdg_decoration_manager | ( | ) |
Definition at line 3761 of file GHOST_SystemWayland.cpp.
References display_t::xdg_decoration_manager.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
xdg_wm_base * GHOST_SystemWayland::xdg_shell | ( | ) |
Definition at line 3756 of file GHOST_SystemWayland.cpp.
References display_t::xdg_shell.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().