improved docs
This commit is contained in:
parent
c8f1c90f9c
commit
dfe9b1abe9
16 changed files with 315 additions and 40 deletions
|
|
@ -29,11 +29,40 @@ import Crafter.Event;
|
|||
import :WindowWayland;
|
||||
|
||||
export namespace Crafter {
|
||||
/**
|
||||
* @brief 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`.
|
||||
*/
|
||||
class WindowWaylandWayland : public WindowWayland {
|
||||
public:
|
||||
/**
|
||||
* @brief Framebuffer for the window using the BGRA 8-bit unsigned pixel format, use this for direct drawing to the window.
|
||||
*/
|
||||
Pixel_BU8_GU8_RU8_AU8* framebuffer = NULL;
|
||||
/**
|
||||
* @brief Constructs a new WindowWaylandWayland object.
|
||||
*
|
||||
* @param name The title of the window.
|
||||
* @param width The width of the window in pixels.
|
||||
* @param height The height of the window in pixels.
|
||||
*/
|
||||
WindowWaylandWayland(std::string name, std::uint32_t width, std::uint32_t height);
|
||||
/**
|
||||
* @brief Destructor cleans up Wayland-specific window resources and framebuffer.
|
||||
*/
|
||||
~WindowWaylandWayland();
|
||||
/**
|
||||
* @brief Starts the event loop asynchronously.
|
||||
*
|
||||
* This method triggers rendering without blocking the caller.
|
||||
*/
|
||||
void StartAsync();
|
||||
/**
|
||||
* @brief Starts the event loop synchronously.
|
||||
*
|
||||
* This method blocks the caller until the event loop stops.
|
||||
*/
|
||||
void StartSync();
|
||||
private:
|
||||
std::thread thread;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue