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

A specialized Wayland window implementation for direct drawing. More...

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

Public Member Functions

 WindowWaylandWayland (std::string name, std::uint32_t width, std::uint32_t height)
 Constructs a new WindowWaylandWayland object.
 
 ~WindowWaylandWayland ()
 Destructor cleans up Wayland-specific window resources and framebuffer.
 
void StartAsync ()
 Starts the event loop asynchronously.
 
void StartSync ()
 Starts the event loop synchronously.
 
- Public Member Functions inherited from Crafter::WindowWayland
 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.
 

Public Attributes

Pixel_BU8_GU8_RU8_AU8 * framebuffer = NULL
 Framebuffer for the window using the BGRA 8-bit unsigned pixel format, use this for direct drawing to the window.
 
- 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
 

Additional Inherited Members

- Static Protected Member Functions inherited from Crafter::WindowWayland
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 inherited from Crafter::WindowWayland
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 inherited from Crafter::WindowWayland
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
 

Detailed Description

A specialized Wayland window implementation for direct drawing.

This class inherits from WindowWayland and provides a framebuffer using the pixel format Pixel_BU8_GU8_RU8_AU8.


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