yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::platform::IWindowBackend Class Referenceabstract

Abstract window backend interface. More...

#include <iwindow.h>

Inheritance diagram for yaze::platform::IWindowBackend:

Public Member Functions

virtual ~IWindowBackend ()=default
 
virtual absl::Status Initialize (const WindowConfig &config)=0
 Initialize the window backend with configuration.
 
virtual absl::Status Shutdown ()=0
 Shutdown the window backend and release resources.
 
virtual bool IsInitialized () const =0
 Check if the backend is initialized.
 
virtual bool PollEvent (WindowEvent &out_event)=0
 Poll and process pending events.
 
virtual void ProcessNativeEvent (void *native_event)=0
 Process a native SDL event (for ImGui integration)
 
virtual WindowStatus GetStatus () const =0
 Get current window status.
 
virtual bool IsActive () const =0
 Check if window is still active (not closed)
 
virtual void SetActive (bool active)=0
 Set window active state.
 
virtual void GetSize (int *width, int *height) const =0
 Get window dimensions.
 
virtual void SetSize (int width, int height)=0
 Set window dimensions.
 
virtual std::string GetTitle () const =0
 Get window title.
 
virtual void SetTitle (const std::string &title)=0
 Set window title.
 
virtual bool InitializeRenderer (gfx::IRenderer *renderer)=0
 Initialize renderer for this window.
 
virtual SDL_Window * GetNativeWindow ()=0
 Get the underlying SDL_Window pointer for ImGui integration.
 
virtual absl::Status InitializeImGui (gfx::IRenderer *renderer)=0
 Initialize ImGui backends for this window/renderer combo.
 
virtual void ShutdownImGui ()=0
 Shutdown ImGui backends.
 
virtual void NewImGuiFrame ()=0
 Start a new ImGui frame.
 
virtual void RenderImGui (gfx::IRenderer *renderer)=0
 Render ImGui draw data (and viewports if enabled)
 
virtual uint32_t GetAudioDevice () const =0
 Get audio device ID (for legacy audio buffer management)
 
virtual std::shared_ptr< int16_t > GetAudioBuffer () const =0
 Get audio buffer (for legacy audio management)
 
virtual std::string GetBackendName () const =0
 Get backend name for debugging/logging.
 
virtual int GetSDLVersion () const =0
 Get SDL version being used.
 

Detailed Description

Abstract window backend interface.

Provides platform-agnostic window management, allowing different SDL versions or other windowing libraries to be swapped without changing application code.

Definition at line 114 of file iwindow.h.

Constructor & Destructor Documentation

◆ ~IWindowBackend()

virtual yaze::platform::IWindowBackend::~IWindowBackend ( )
virtualdefault

Member Function Documentation

◆ Initialize()

virtual absl::Status yaze::platform::IWindowBackend::Initialize ( const WindowConfig & config)
pure virtual

Initialize the window backend with configuration.

Parameters
configWindow configuration parameters
Returns
Status indicating success or failure

Implemented in yaze::platform::SDL2WindowBackend.

◆ Shutdown()

virtual absl::Status yaze::platform::IWindowBackend::Shutdown ( )
pure virtual

Shutdown the window backend and release resources.

Returns
Status indicating success or failure

Implemented in yaze::platform::SDL2WindowBackend.

◆ IsInitialized()

virtual bool yaze::platform::IWindowBackend::IsInitialized ( ) const
pure virtual

Check if the backend is initialized.

Implemented in yaze::platform::SDL2WindowBackend.

◆ PollEvent()

virtual bool yaze::platform::IWindowBackend::PollEvent ( WindowEvent & out_event)
pure virtual

Poll and process pending events.

Parameters
out_eventOutput parameter for the next event
Returns
True if an event was available, false otherwise

Implemented in yaze::platform::SDL2WindowBackend.

◆ ProcessNativeEvent()

virtual void yaze::platform::IWindowBackend::ProcessNativeEvent ( void * native_event)
pure virtual

Process a native SDL event (for ImGui integration)

Parameters
native_eventPointer to native SDL_Event

Implemented in yaze::platform::SDL2WindowBackend.

◆ GetStatus()

virtual WindowStatus yaze::platform::IWindowBackend::GetStatus ( ) const
pure virtual

Get current window status.

Implemented in yaze::platform::SDL2WindowBackend.

◆ IsActive()

virtual bool yaze::platform::IWindowBackend::IsActive ( ) const
pure virtual

Check if window is still active (not closed)

Implemented in yaze::platform::SDL2WindowBackend.

◆ SetActive()

virtual void yaze::platform::IWindowBackend::SetActive ( bool active)
pure virtual

Set window active state.

Implemented in yaze::platform::SDL2WindowBackend.

◆ GetSize()

virtual void yaze::platform::IWindowBackend::GetSize ( int * width,
int * height ) const
pure virtual

Get window dimensions.

Implemented in yaze::platform::SDL2WindowBackend.

◆ SetSize()

virtual void yaze::platform::IWindowBackend::SetSize ( int width,
int height )
pure virtual

Set window dimensions.

Implemented in yaze::platform::SDL2WindowBackend.

◆ GetTitle()

virtual std::string yaze::platform::IWindowBackend::GetTitle ( ) const
pure virtual

Get window title.

Implemented in yaze::platform::SDL2WindowBackend.

◆ SetTitle()

virtual void yaze::platform::IWindowBackend::SetTitle ( const std::string & title)
pure virtual

Set window title.

Implemented in yaze::platform::SDL2WindowBackend.

◆ InitializeRenderer()

virtual bool yaze::platform::IWindowBackend::InitializeRenderer ( gfx::IRenderer * renderer)
pure virtual

Initialize renderer for this window.

Parameters
rendererThe renderer to initialize
Returns
True if successful

Implemented in yaze::platform::SDL2WindowBackend.

◆ GetNativeWindow()

virtual SDL_Window * yaze::platform::IWindowBackend::GetNativeWindow ( )
pure virtual

Get the underlying SDL_Window pointer for ImGui integration.

Returns
Native window handle (SDL_Window*)

Implemented in yaze::platform::SDL2WindowBackend.

◆ InitializeImGui()

virtual absl::Status yaze::platform::IWindowBackend::InitializeImGui ( gfx::IRenderer * renderer)
pure virtual

Initialize ImGui backends for this window/renderer combo.

Parameters
rendererThe renderer (for backend-specific init)
Returns
Status indicating success or failure

Implemented in yaze::platform::SDL2WindowBackend.

◆ ShutdownImGui()

virtual void yaze::platform::IWindowBackend::ShutdownImGui ( )
pure virtual

Shutdown ImGui backends.

Implemented in yaze::platform::SDL2WindowBackend.

◆ NewImGuiFrame()

virtual void yaze::platform::IWindowBackend::NewImGuiFrame ( )
pure virtual

Start a new ImGui frame.

Implemented in yaze::platform::SDL2WindowBackend.

◆ RenderImGui()

virtual void yaze::platform::IWindowBackend::RenderImGui ( gfx::IRenderer * renderer)
pure virtual

Render ImGui draw data (and viewports if enabled)

Parameters
rendererThe renderer to use for drawing (needed to get backend renderer)

Implemented in yaze::platform::SDL2WindowBackend.

◆ GetAudioDevice()

virtual uint32_t yaze::platform::IWindowBackend::GetAudioDevice ( ) const
pure virtual

Get audio device ID (for legacy audio buffer management)

Implemented in yaze::platform::SDL2WindowBackend.

◆ GetAudioBuffer()

virtual std::shared_ptr< int16_t > yaze::platform::IWindowBackend::GetAudioBuffer ( ) const
pure virtual

Get audio buffer (for legacy audio management)

Implemented in yaze::platform::SDL2WindowBackend.

◆ GetBackendName()

virtual std::string yaze::platform::IWindowBackend::GetBackendName ( ) const
pure virtual

Get backend name for debugging/logging.

Implemented in yaze::platform::SDL2WindowBackend.

◆ GetSDLVersion()

virtual int yaze::platform::IWindowBackend::GetSDLVersion ( ) const
pure virtual

Get SDL version being used.

Implemented in yaze::platform::SDL2WindowBackend.


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