Blender  V3.3
Public Attributes | List of all members
input_state_pointer_t Struct Reference

Public Attributes

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

Detailed Description

State of the pointing device (tablet or mouse).

Definition at line 215 of file GHOST_SystemWayland.cpp.

Member Data Documentation

◆ buttons

GHOST_Buttons input_state_pointer_t::buttons = GHOST_Buttons()

Definition at line 245 of file GHOST_SystemWayland.cpp.

Referenced by GHOST_SystemWayland::getButtons().

◆ outputs

std::unordered_set<const output_t *> input_state_pointer_t::outputs

Outputs on which the cursor is visible.

Definition at line 232 of file GHOST_SystemWayland.cpp.

Referenced by cursor_surface_handle_enter(), cursor_surface_handle_leave(), and update_cursor_scale().

◆ serial

uint32_t input_state_pointer_t::serial = 0

The serial of the last used pointer or tablet.

Definition at line 237 of file GHOST_SystemWayland.cpp.

◆ theme_scale

int input_state_pointer_t::theme_scale = 1

Definition at line 234 of file GHOST_SystemWayland.cpp.

Referenced by update_cursor_scale().

◆ wl_surface

struct wl_surface* input_state_pointer_t::wl_surface = nullptr

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

Definition at line 243 of file GHOST_SystemWayland.cpp.

Referenced by GHOST_SystemWayland::getCursorPosition(), and GHOST_SystemWayland::getCursorPositionClientRelative().

◆ xy

wl_fixed_t input_state_pointer_t::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 * input_state->xy[0]),
wl_fixed_to_int(scale * input_state->xy[1]),
};

Definition at line 229 of file GHOST_SystemWayland.cpp.

Referenced by getCursorPositionClientRelative_impl().


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