Blender V5.0
GWL_SeatStatePointer Struct Reference

Public Attributes

struct { 
   wl_surface *   surface_window = nullptr 
wl
wl_fixed_t xy [2] = {0, 0}
std::unordered_set< const GWL_Output * > outputs
int buffer_scale = 1
uint32_t serial = 0
GHOST_Buttons buttons = GHOST_Buttons()

Detailed Description

State of the pointing device (tablet or mouse).

Definition at line 686 of file GHOST_SystemWayland.cc.

Member Data Documentation

◆ buffer_scale

int GWL_SeatStatePointer::buffer_scale = 1

◆ buttons

GHOST_Buttons GWL_SeatStatePointer::buttons = GHOST_Buttons()

◆ outputs

std::unordered_set<const GWL_Output *> GWL_SeatStatePointer::outputs

◆ serial

uint32_t GWL_SeatStatePointer::serial = 0

The serial of the last used pointer or tablet.

Note
For tablet cursors, use: GWL_TabletTool::serial instead.

Definition at line 722 of file GHOST_SystemWayland.cc.

Referenced by gwl_seat_state_pointer_active(), and tablet_tool_handle_proximity_in().

◆ surface_window

wl_surface* GWL_SeatStatePointer::surface_window = nullptr

The wl_surface last used with this pointing device (events with this pointing device will be sent here).

Definition at line 694 of file GHOST_SystemWayland.cc.

Referenced by GHOST_SystemWayland::getCursorPosition(), GHOST_SystemWayland::getCursorPositionClientRelative(), tablet_tool_handle_frame(), tablet_tool_handle_proximity_in(), update_cursor_scale(), and GHOST_SystemWayland::window_surface_unref().

◆ [struct]

◆ xy

wl_fixed_t GWL_SeatStatePointer::xy[2] = {0, 0}

High precision coordinates.

Mapping to pixels requires the window scale. The following example converts these values to screen coordinates.

const wl_fixed_t scale = win->scale();
const int event_xy[2] = {
wl_fixed_to_int(scale * seat_state_pointer->xy[0]),
wl_fixed_to_int(scale * seat_state_pointer->xy[1]),
};

Definition at line 710 of file GHOST_SystemWayland.cc.

Referenced by getCursorPositionClientRelative_impl(), and tablet_tool_handle_frame().


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