Crafter.Graphics
C++ graphics library using Wayland and Vulkan.
 
Loading...
Searching...
No Matches
Crafter::WindowWayland Class Referenceexport

A window using the Wayland display server protocol. More...

Inheritance diagram for Crafter::WindowWayland:
Crafter::Window Crafter::WindowWaylandVulkan Crafter::WindowWaylandWayland

Public Member Functions

 WindowWayland (std::string name, std::uint32_t width, std::uint32_t height)
 Constructs a Wayland window with a given name and size.
 
 ~WindowWayland ()
 Destructor cleans up Wayland-specific window resources.
 
- Public Member Functions inherited from Crafter::Window
 Window (std::string name, std::uint32_t width, std::uint32_t height)
 Constructs a Window with a given name and dimensions.
 
ScaleData ScaleElement (const UiElement &element)
 Calculates the real position and size of an UiElement.
 

Static Protected Member Functions

static void PointerListenerHandleMotion (void *data, wl_pointer *wl_pointer, uint time, wl_fixed_t surface_x, wl_fixed_t surface_y)
 
static void PointerListenerHandleAxis (void *, wl_pointer *, std::uint32_t, std::uint32_t, wl_fixed_t value)
 
static void PointerListenerHandleEnter (void *data, wl_pointer *wl_pointer, uint serial, wl_surface *surface, wl_fixed_t surface_x, wl_fixed_t surface_y)
 
static void PointerListenerHandleLeave (void *, wl_pointer *, std::uint32_t, wl_surface *)
 
static void xdg_toplevel_handle_close (void *data, xdg_toplevel *)
 
static void handle_global (void *data, wl_registry *registry, std::uint32_t name, const char *interface, std::uint32_t version)
 
static void pointer_handle_button (void *data, wl_pointer *pointer, std::uint32_t serial, std::uint32_t time, std::uint32_t button, std::uint32_t state)
 
static void seat_handle_capabilities (void *data, wl_seat *seat, uint32_t capabilities)
 
static void xdg_surface_handle_configure (void *data, xdg_surface *xdg_surface, std::uint32_t serial)
 

Protected Attributes

bool configured = false
 
wl_shm * shm = NULL
 
wl_seat * seat = NULL
 
xdg_toplevel * xdgToplevel = NULL
 
xdg_wm_base * xdgWmBase = NULL
 
zxdg_decoration_manager_v1 * manager = NULL
 
wl_surface * surface = NULL
 
wl_buffer * buffer = NULL
 
xdg_surface * xdgSurface = NULL
 
wl_display * display = NULL
 

Static Protected Attributes

static wl_compositor * compositor = NULL
 
static wl_pointer_listener pointer_listener
 
static wl_keyboard_listener keyboard_listener
 
static wl_seat_listener seat_listener
 
static wl_registry_listener registry_listener
 
static xdg_surface_listener xdg_surface_listener
 
static xdg_toplevel_listener xdg_toplevel_listener
 

Additional Inherited Members

- Public Attributes inherited from Crafter::Window
Event< MousePoint > onMouseRightClick
 
Event< MousePoint > onMouseLeftClick
 
Event< MousePoint > onMouseRightHold
 
Event< MousePoint > onMouseLeftHold
 
Event< MousePoint > onMouseRightRelease
 
Event< MousePoint > onMouseLeftRelease
 
Event< MouseMoveEvent > onMouseMove
 
Event< MouseMoveEvent > onMouseEnter
 
Event< MouseMoveEvent > onMouseLeave
 
Event< double > onMouseScroll
 
Event< void > onClose
 
MousePoint currentMousePos
 
MousePoint lastMousePos
 
MousePoint mouseDelta
 
bool mouseLeftHeld = false
 
bool mouseRightHeld = false
 
bool heldkeys [255] = {}
 
Event< void > onKeyDown [255]
 
Event< void > onKeyHold [255]
 
Event< void > onKeyUp [255]
 
Event< char > onAnyKeyDown
 
Event< char > onAnyKeyHold
 
Event< char > onAnyKeyUp
 
std::vector< UiElementelements
 
std::string name
 
std::uint32_t width
 
std::uint32_t height
 
float scale = 1
 
bool open = true
 

Detailed Description

A window using the Wayland display server protocol.

This class inherits from the base Window class and provides functionality specific to Wayland for creating and managing windows.


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