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

#include <ios_window_backend.h>

Inheritance diagram for yaze::platform::IOSWindowBackend:
Collaboration diagram for yaze::platform::IOSWindowBackend:

Public Member Functions

 IOSWindowBackend ()=default
 
 ~IOSWindowBackend () 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.
 
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 imgui_initialized_ = false
 
WindowStatus status_ {}
 
std::string title_
 
void * metal_view_ = nullptr
 
void * command_queue_ = nullptr
 

Detailed Description

Definition at line 12 of file ios_window_backend.h.

Constructor & Destructor Documentation

◆ IOSWindowBackend()

yaze::platform::IOSWindowBackend::IOSWindowBackend ( )
default

◆ ~IOSWindowBackend()

yaze::platform::IOSWindowBackend::~IOSWindowBackend ( )
overridedefault

Member Function Documentation

◆ Initialize()

absl::Status yaze::platform::IOSWindowBackend::Initialize ( const WindowConfig & config)
overridevirtual

Initialize the window backend with configuration.

Parameters
configWindow configuration parameters
Returns
Status indicating success or failure

Implements yaze::platform::IWindowBackend.

Definition at line 67 of file ios_window_backend.mm.

References yaze::platform::WindowConfig::fullscreen, yaze::platform::ios::GetMetalView(), yaze::platform::WindowStatus::height, initialized_, yaze::platform::WindowStatus::is_active, yaze::platform::WindowStatus::is_focused, yaze::platform::WindowStatus::is_fullscreen, metal_view_, status_, yaze::platform::WindowConfig::title, title_, and yaze::platform::WindowStatus::width.

Here is the call graph for this function:

◆ Shutdown()

absl::Status yaze::platform::IOSWindowBackend::Shutdown ( )
overridevirtual

Shutdown the window backend and release resources.

Returns
Status indicating success or failure

Implements yaze::platform::IWindowBackend.

Definition at line 92 of file ios_window_backend.mm.

References command_queue_, initialized_, metal_view_, and ShutdownImGui().

Here is the call graph for this function:

◆ IsInitialized()

bool yaze::platform::IOSWindowBackend::IsInitialized ( ) const
overridevirtual

Check if the backend is initialized.

Implements yaze::platform::IWindowBackend.

Definition at line 107 of file ios_window_backend.mm.

References initialized_.

◆ PollEvent()

bool yaze::platform::IOSWindowBackend::PollEvent ( WindowEvent & out_event)
overridevirtual

Poll and process pending events.

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

Implements yaze::platform::IWindowBackend.

Definition at line 111 of file ios_window_backend.mm.

◆ ProcessNativeEvent()

void yaze::platform::IOSWindowBackend::ProcessNativeEvent ( void * native_event)
overridevirtual

Process a native SDL event (for ImGui integration)

Parameters
native_eventPointer to native SDL_Event

Implements yaze::platform::IWindowBackend.

Definition at line 116 of file ios_window_backend.mm.

◆ GetStatus()

WindowStatus yaze::platform::IOSWindowBackend::GetStatus ( ) const
overridevirtual

◆ IsActive()

bool yaze::platform::IOSWindowBackend::IsActive ( ) const
overridevirtual

Check if window is still active (not closed)

Implements yaze::platform::IWindowBackend.

Definition at line 132 of file ios_window_backend.mm.

References yaze::platform::WindowStatus::is_active, and status_.

◆ SetActive()

void yaze::platform::IOSWindowBackend::SetActive ( bool active)
overridevirtual

Set window active state.

Implements yaze::platform::IWindowBackend.

Definition at line 136 of file ios_window_backend.mm.

References yaze::platform::WindowStatus::is_active, and status_.

◆ GetSize()

void yaze::platform::IOSWindowBackend::GetSize ( int * width,
int * height ) const
overridevirtual

Get window dimensions.

Implements yaze::platform::IWindowBackend.

Definition at line 140 of file ios_window_backend.mm.

References metal_view_.

◆ SetSize()

void yaze::platform::IOSWindowBackend::SetSize ( int width,
int height )
overridevirtual

Set window dimensions.

Implements yaze::platform::IWindowBackend.

Definition at line 162 of file ios_window_backend.mm.

References metal_view_.

◆ GetTitle()

std::string yaze::platform::IOSWindowBackend::GetTitle ( ) const
overridevirtual

Get window title.

Implements yaze::platform::IWindowBackend.

Definition at line 174 of file ios_window_backend.mm.

References title_.

◆ SetTitle()

void yaze::platform::IOSWindowBackend::SetTitle ( const std::string & title)
overridevirtual

Set window title.

Implements yaze::platform::IWindowBackend.

Definition at line 178 of file ios_window_backend.mm.

References title_.

◆ InitializeRenderer()

bool yaze::platform::IOSWindowBackend::InitializeRenderer ( gfx::IRenderer * renderer)
overridevirtual

Initialize renderer for this window.

Parameters
rendererThe renderer to initialize
Returns
True if successful

Implements yaze::platform::IWindowBackend.

Definition at line 182 of file ios_window_backend.mm.

References yaze::gfx::IRenderer::GetBackendRenderer(), yaze::gfx::IRenderer::Initialize(), LOG_WARN, metal_view_, and yaze::gfx::MetalRenderer::SetMetalView().

Here is the call graph for this function:

◆ GetNativeWindow()

SDL_Window * yaze::platform::IOSWindowBackend::GetNativeWindow ( )
overridevirtual

Get the underlying SDL_Window pointer for ImGui integration.

Returns
Native window handle (SDL_Window*)

Implements yaze::platform::IWindowBackend.

Definition at line 201 of file ios_window_backend.mm.

◆ InitializeImGui()

absl::Status yaze::platform::IOSWindowBackend::InitializeImGui ( gfx::IRenderer * renderer)
overridevirtual

Initialize ImGui backends for this window/renderer combo.

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

Implements yaze::platform::IWindowBackend.

Definition at line 205 of file ios_window_backend.mm.

References yaze::gui::ColorsYaze(), command_queue_, imgui_initialized_, yaze::LoadPackageFonts(), LOG_INFO, and metal_view_.

Here is the call graph for this function:

◆ ShutdownImGui()

void yaze::platform::IOSWindowBackend::ShutdownImGui ( )
overridevirtual

Shutdown ImGui backends.

Implements yaze::platform::IWindowBackend.

Definition at line 267 of file ios_window_backend.mm.

References imgui_initialized_.

Referenced by Shutdown().

◆ NewImGuiFrame()

void yaze::platform::IOSWindowBackend::NewImGuiFrame ( )
overridevirtual

Start a new ImGui frame.

Implements yaze::platform::IWindowBackend.

Definition at line 278 of file ios_window_backend.mm.

References imgui_initialized_, and metal_view_.

◆ RenderImGui()

void yaze::platform::IOSWindowBackend::RenderImGui ( gfx::IRenderer * renderer)
overridevirtual

Render ImGui draw data (and viewports if enabled)

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

Implements yaze::platform::IWindowBackend.

Definition at line 300 of file ios_window_backend.mm.

References command_queue_, imgui_initialized_, and metal_view_.

◆ GetAudioDevice()

uint32_t yaze::platform::IOSWindowBackend::GetAudioDevice ( ) const
overridevirtual

Get audio device ID (for legacy audio buffer management)

Implements yaze::platform::IWindowBackend.

Definition at line 334 of file ios_window_backend.mm.

◆ GetAudioBuffer()

std::shared_ptr< int16_t > yaze::platform::IOSWindowBackend::GetAudioBuffer ( ) const
overridevirtual

Get audio buffer (for legacy audio management)

Implements yaze::platform::IWindowBackend.

Definition at line 338 of file ios_window_backend.mm.

◆ GetBackendName()

std::string yaze::platform::IOSWindowBackend::GetBackendName ( ) const
overridevirtual

Get backend name for debugging/logging.

Implements yaze::platform::IWindowBackend.

Definition at line 342 of file ios_window_backend.mm.

◆ GetSDLVersion()

int yaze::platform::IOSWindowBackend::GetSDLVersion ( ) const
overridevirtual

Get SDL version being used.

Implements yaze::platform::IWindowBackend.

Definition at line 346 of file ios_window_backend.mm.

Member Data Documentation

◆ initialized_

bool yaze::platform::IOSWindowBackend::initialized_ = false
private

Definition at line 47 of file ios_window_backend.h.

Referenced by Initialize(), IsInitialized(), and Shutdown().

◆ imgui_initialized_

bool yaze::platform::IOSWindowBackend::imgui_initialized_ = false
private

Definition at line 48 of file ios_window_backend.h.

Referenced by InitializeImGui(), NewImGuiFrame(), RenderImGui(), and ShutdownImGui().

◆ status_

WindowStatus yaze::platform::IOSWindowBackend::status_ {}
private

Definition at line 49 of file ios_window_backend.h.

Referenced by GetStatus(), Initialize(), IsActive(), and SetActive().

◆ title_

std::string yaze::platform::IOSWindowBackend::title_
private

Definition at line 50 of file ios_window_backend.h.

Referenced by GetTitle(), Initialize(), and SetTitle().

◆ metal_view_

void* yaze::platform::IOSWindowBackend::metal_view_ = nullptr
private

◆ command_queue_

void* yaze::platform::IOSWindowBackend::command_queue_ = nullptr
private

Definition at line 52 of file ios_window_backend.h.

Referenced by InitializeImGui(), RenderImGui(), and Shutdown().


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