Null implementation of the window backend for headless mode. More...
#include <null_window_backend.h>


Public Member Functions | |
| NullWindowBackend ()=default | |
| ~NullWindowBackend () override=default | |
| absl::Status | Initialize (const WindowConfig &config) override |
| Initialize the window backend with configuration. | |
| absl::Status | Shutdown () override |
| Shutdown the window backend and release resources. | |
| bool | IsInitialized () const override |
| Check if the backend is initialized. | |
| bool | PollEvent (WindowEvent &out_event) override |
| Poll and process pending events. | |
| void | ProcessNativeEvent (void *native_event) override |
| Process a native SDL event (for ImGui integration) | |
| WindowStatus | GetStatus () const override |
| Get current window status. | |
| bool | IsActive () const override |
| Check if window is still active (not closed) | |
| void | SetActive (bool active) override |
| Set window active state. | |
| void | GetSize (int *width, int *height) const override |
| Get window dimensions. | |
| void | SetSize (int width, int height) override |
| Set window dimensions. | |
| std::string | GetTitle () const override |
| Get window title. | |
| void | SetTitle (const std::string &title) override |
| Set window title. | |
| void | ShowWindow () override |
| Show the window. | |
| void | HideWindow () override |
| Hide the window. | |
| bool | InitializeRenderer (gfx::IRenderer *renderer) override |
| Initialize renderer for this window. | |
| SDL_Window * | GetNativeWindow () override |
| Get the underlying SDL_Window pointer for ImGui integration. | |
| absl::Status | InitializeImGui (gfx::IRenderer *renderer) override |
| Initialize ImGui backends for this window/renderer combo. | |
| void | ShutdownImGui () override |
| Shutdown ImGui backends. | |
| void | NewImGuiFrame () override |
| Start a new ImGui frame. | |
| void | RenderImGui (gfx::IRenderer *renderer) override |
| Render ImGui draw data (and viewports if enabled) | |
| uint32_t | GetAudioDevice () const override |
| Get audio device ID (for legacy audio buffer management) | |
| std::shared_ptr< int16_t > | GetAudioBuffer () const override |
| Get audio buffer (for legacy audio management) | |
| std::string | GetBackendName () const override |
| Get backend name for debugging/logging. | |
| int | GetSDLVersion () const override |
| Get SDL version being used. | |
Public Member Functions inherited from yaze::platform::IWindowBackend | |
| virtual | ~IWindowBackend ()=default |
Private Attributes | |
| bool | initialized_ = false |
| bool | active_ = true |
| bool | imgui_initialized_ = false |
| int | width_ = 1280 |
| int | height_ = 720 |
Null implementation of the window backend for headless mode.
Implements IWindowBackend but does nothing or minimal work. Useful for CI, servers, and tests where no window/display is available.
Definition at line 22 of file null_window_backend.h.
|
default |
|
overridedefault |
|
overridevirtual |
Initialize the window backend with configuration.
| config | Window configuration parameters |
Implements yaze::platform::IWindowBackend.
Definition at line 12 of file null_window_backend.cc.
References active_, yaze::platform::WindowConfig::height, height_, initialized_, LOG_INFO, yaze::platform::WindowConfig::width, and width_.
|
overridevirtual |
Shutdown the window backend and release resources.
Implements yaze::platform::IWindowBackend.
Definition at line 21 of file null_window_backend.cc.
References yaze::gfx::Arena::Get(), imgui_initialized_, initialized_, LOG_INFO, yaze::gfx::Arena::Shutdown(), and ShutdownImGui().

|
inlineoverridevirtual |
Check if the backend is initialized.
Implements yaze::platform::IWindowBackend.
Definition at line 33 of file null_window_backend.h.
References initialized_.
|
overridevirtual |
Poll and process pending events.
| out_event | Output parameter for the next event |
Implements yaze::platform::IWindowBackend.
Definition at line 36 of file null_window_backend.cc.
|
overridevirtual |
Process a native SDL event (for ImGui integration)
| native_event | Pointer to native SDL_Event |
Implements yaze::platform::IWindowBackend.
Definition at line 41 of file null_window_backend.cc.
|
overridevirtual |
Get current window status.
Implements yaze::platform::IWindowBackend.
Definition at line 45 of file null_window_backend.cc.
References active_, yaze::platform::WindowStatus::height, height_, yaze::platform::WindowStatus::is_active, yaze::platform::WindowStatus::width, and width_.
|
inlineoverridevirtual |
Check if window is still active (not closed)
Implements yaze::platform::IWindowBackend.
Definition at line 39 of file null_window_backend.h.
References active_.
|
inlineoverridevirtual |
Set window active state.
Implements yaze::platform::IWindowBackend.
Definition at line 40 of file null_window_backend.h.
References active_.
|
overridevirtual |
Get window dimensions.
Implements yaze::platform::IWindowBackend.
Definition at line 54 of file null_window_backend.cc.
|
overridevirtual |
Set window dimensions.
Implements yaze::platform::IWindowBackend.
Definition at line 59 of file null_window_backend.cc.
|
inlineoverridevirtual |
Get window title.
Implements yaze::platform::IWindowBackend.
Definition at line 44 of file null_window_backend.h.
|
inlineoverridevirtual |
Set window title.
Implements yaze::platform::IWindowBackend.
Definition at line 45 of file null_window_backend.h.
|
inlineoverridevirtual |
Show the window.
Implements yaze::platform::IWindowBackend.
Definition at line 47 of file null_window_backend.h.
|
inlineoverridevirtual |
Hide the window.
Implements yaze::platform::IWindowBackend.
Definition at line 48 of file null_window_backend.h.
|
overridevirtual |
Initialize renderer for this window.
| renderer | The renderer to initialize |
Implements yaze::platform::IWindowBackend.
Definition at line 64 of file null_window_backend.cc.
|
inlineoverridevirtual |
Get the underlying SDL_Window pointer for ImGui integration.
Implements yaze::platform::IWindowBackend.
Definition at line 51 of file null_window_backend.h.
|
overridevirtual |
Initialize ImGui backends for this window/renderer combo.
| renderer | The renderer (for backend-specific init) |
Implements yaze::platform::IWindowBackend.
Definition at line 69 of file null_window_backend.cc.
References height_, imgui_initialized_, yaze::LoadPackageFonts(), LOG_WARN, and width_.

|
overridevirtual |
Shutdown ImGui backends.
Implements yaze::platform::IWindowBackend.
Definition at line 98 of file null_window_backend.cc.
References imgui_initialized_.
Referenced by Shutdown().
|
overridevirtual |
Start a new ImGui frame.
Implements yaze::platform::IWindowBackend.
Definition at line 105 of file null_window_backend.cc.
References height_, imgui_initialized_, and width_.
|
overridevirtual |
Render ImGui draw data (and viewports if enabled)
| renderer | The renderer to use for drawing (needed to get backend renderer) |
Implements yaze::platform::IWindowBackend.
Definition at line 113 of file null_window_backend.cc.
References imgui_initialized_.
|
inlineoverridevirtual |
Get audio device ID (for legacy audio buffer management)
Implements yaze::platform::IWindowBackend.
Definition at line 58 of file null_window_backend.h.
|
inlineoverridevirtual |
Get audio buffer (for legacy audio management)
Implements yaze::platform::IWindowBackend.
Definition at line 59 of file null_window_backend.h.
|
inlineoverridevirtual |
Get backend name for debugging/logging.
Implements yaze::platform::IWindowBackend.
Definition at line 61 of file null_window_backend.h.
|
inlineoverridevirtual |
Get SDL version being used.
Implements yaze::platform::IWindowBackend.
Definition at line 62 of file null_window_backend.h.
|
private |
Definition at line 65 of file null_window_backend.h.
Referenced by Initialize(), IsInitialized(), and Shutdown().
|
private |
Definition at line 66 of file null_window_backend.h.
Referenced by GetStatus(), Initialize(), IsActive(), and SetActive().
|
private |
Definition at line 67 of file null_window_backend.h.
Referenced by InitializeImGui(), NewImGuiFrame(), RenderImGui(), Shutdown(), and ShutdownImGui().
|
private |
Definition at line 68 of file null_window_backend.h.
Referenced by GetSize(), GetStatus(), Initialize(), InitializeImGui(), NewImGuiFrame(), and SetSize().
|
private |
Definition at line 69 of file null_window_backend.h.
Referenced by GetSize(), GetStatus(), Initialize(), InitializeImGui(), NewImGuiFrame(), and SetSize().