Blender V5.0
GWL_Display Struct Reference

Public Attributes

struct { 
   wl_registry *   registry = nullptr 
   wl_display *   display = nullptr 
   wl_compositor *   compositor = nullptr 
   wl_shm *   shm = nullptr 
   wl_data_device_manager *   data_device_manager = nullptr 
wl
struct { 
   zwp_tablet_manager_v2 *   tablet_manager = nullptr 
   zwp_relative_pointer_manager_v1 *   relative_pointer_manager = nullptr 
   zwp_primary_selection_device_manager_v1 *   primary_selection_device_manager = nullptr 
   wp_fractional_scale_manager_v1 *   fractional_scale_manager = nullptr 
   wp_viewporter *   viewporter = nullptr 
   zwp_pointer_constraints_v1 *   pointer_constraints = nullptr 
   zwp_pointer_gestures_v1 *   pointer_gestures = nullptr 
   wp_cursor_shape_manager_v1 *   cursor_shape_manager = nullptr 
wp
struct { 
   zxdg_output_manager_v1 *   output_manager = nullptr 
   xdg_activation_v1 *   activation_manager = nullptr 
xdg
GWL_DisplayTimeStamp input_timestamp
GHOST_SystemWaylandsystem = nullptr
bool registry_skip_update_all = false
GWL_RegistryEntryregistry_entry = nullptr
GWL_XDG_Decor_Systemxdg_decor = nullptr
std::vector< GWL_Output * > outputs
std::vector< GWL_Seat * > seats
int seats_active_index = 0
bool background = false
bool use_window_frame = false
pthread_t events_pthread = 0
bool events_pthread_is_active = false
std::vector< const GHOST_IEvent * > events_pending
std::mutex events_pending_mutex
GHOST_TimerManagerghost_timer_manager = nullptr

Detailed Description

Definition at line 1467 of file GHOST_SystemWayland.cc.

Member Data Documentation

◆ activation_manager

xdg_activation_v1* GWL_Display::activation_manager = nullptr

◆ background

bool GWL_Display::background = false

When true, running without any windows. Wayland is only used to access the GPU.

Note
In general logic should not diverge too much in background mode, so as to avoid maintaining multiple code-paths however some logic can be skipped such as libraries for showing window decorations and threaded event handling.

Definition at line 1549 of file GHOST_SystemWayland.cc.

Referenced by gwl_display_destroy(), gwl_display_event_thread_create(), gwl_display_event_thread_destroy(), and gwl_display_event_thread_fn().

◆ compositor

wl_compositor* GWL_Display::compositor = nullptr

◆ cursor_shape_manager

wp_cursor_shape_manager_v1* GWL_Display::cursor_shape_manager = nullptr

◆ data_device_manager

wl_data_device_manager* GWL_Display::data_device_manager = nullptr

◆ display

◆ events_pending

std::vector<const GHOST_IEvent *> GWL_Display::events_pending

Events added from the event reading thread. Added into the main event queue when on GHOST_SystemWayland::processEvents.

Definition at line 1576 of file GHOST_SystemWayland.cc.

Referenced by gwl_display_destroy(), and gwl_display_event_thread_create().

◆ events_pending_mutex

std::mutex GWL_Display::events_pending_mutex

Guard against multiple threads accessing events_pending at once.

Definition at line 1578 of file GHOST_SystemWayland.cc.

◆ events_pthread

pthread_t GWL_Display::events_pthread = 0

Run a thread that consumes events in the background. Use pthread because std::thread leaks memory.

Not set when background == true.

Definition at line 1564 of file GHOST_SystemWayland.cc.

Referenced by gwl_display_destroy(), gwl_display_event_thread_create(), and gwl_display_event_thread_destroy().

◆ events_pthread_is_active

bool GWL_Display::events_pthread_is_active = false

Use to exit the event reading loop.

Not set when background == true.

Definition at line 1570 of file GHOST_SystemWayland.cc.

Referenced by gwl_display_destroy(), gwl_display_event_thread_create(), and gwl_display_event_thread_fn().

◆ fractional_scale_manager

wp_fractional_scale_manager_v1* GWL_Display::fractional_scale_manager = nullptr

◆ ghost_timer_manager

GHOST_TimerManager* GWL_Display::ghost_timer_manager = nullptr

A separate timer queue, needed so the WAYLAND thread can lock access. Using the system's #GHOST_Sysem::getTimerManager is not thread safe because access to the timer outside of WAYLAND specific logic will not lock.

Needed because GHOST_System::dispatchEvents fires timers outside of WAYLAND (without locking the timer_mutex).

Definition at line 1588 of file GHOST_SystemWayland.cc.

Referenced by gwl_display_destroy().

◆ input_timestamp

GWL_DisplayTimeStamp GWL_Display::input_timestamp

Definition at line 1503 of file GHOST_SystemWayland.cc.

◆ output_manager

zxdg_output_manager_v1* GWL_Display::output_manager = nullptr

◆ outputs

std::vector<GWL_Output *> GWL_Display::outputs

NOTE(@ideasman42): Handling of outputs must account for this vector to be empty. While this seems like something which might not ever happen, it can occur when unplugging monitors (presumably from dodgy cables/connections too).

Definition at line 1526 of file GHOST_SystemWayland.cc.

Referenced by gwl_registry_wl_output_add(), and gwl_registry_wl_output_remove().

◆ pointer_constraints

zwp_pointer_constraints_v1* GWL_Display::pointer_constraints = nullptr

◆ pointer_gestures

zwp_pointer_gestures_v1* GWL_Display::pointer_gestures = nullptr

◆ primary_selection_device_manager

zwp_primary_selection_device_manager_v1* GWL_Display::primary_selection_device_manager = nullptr

◆ registry

◆ registry_entry

GWL_RegistryEntry* GWL_Display::registry_entry = nullptr

◆ registry_skip_update_all

bool GWL_Display::registry_skip_update_all = false

True when initializing registration, while updating all other entries wont cause problems, it will preform many redundant update calls.

Definition at line 1511 of file GHOST_SystemWayland.cc.

Referenced by global_handle_add(), and global_handle_remove().

◆ relative_pointer_manager

zwp_relative_pointer_manager_v1* GWL_Display::relative_pointer_manager = nullptr

◆ seats

◆ seats_active_index

int GWL_Display::seats_active_index = 0

Support a single active seat at once, this isn't an exact or correct mapping from WAYLAND. Only allow input from different seats, not full concurrent multi-seat support.

The main purpose of having an active seat is an alternative from always using the first seat which prevents events from any other seat.

NOTE(@ideasman42): This could be extended and developed further extended to support an active seat per window (for example), basic support is sufficient for now as currently isn't a widely used feature.

Definition at line 1539 of file GHOST_SystemWayland.cc.

Referenced by gwl_display_seat_active_get(), gwl_display_seat_active_set(), and gwl_registry_wl_seat_remove().

◆ shm

wl_shm* GWL_Display::shm = nullptr

Definition at line 1474 of file GHOST_SystemWayland.cc.

Referenced by gwl_registry_wl_shm_add(), and gwl_registry_wl_shm_remove().

◆ system

◆ tablet_manager

zwp_tablet_manager_v2* GWL_Display::tablet_manager = nullptr

◆ use_window_frame

bool GWL_Display::use_window_frame = false

Show window decorations, otherwise all windows are frame-less.

Definition at line 1554 of file GHOST_SystemWayland.cc.

◆ viewporter

wp_viewporter* GWL_Display::viewporter = nullptr

◆ [struct]

◆ [struct]

◆ [struct]

◆ xdg_decor


The documentation for this struct was generated from the following file: