libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
WutPlatform Class Reference

Wii U Platform: ProcUI application lifecycle plus the wut driver set. More...

#include <WutPlatform.h>

Inheritance diagram for WutPlatform:
[legend]

Public Member Functions

void init (const PlatformConfig &config) override
 Constructs and initializes all five drivers for this platform.
 
void requestExit () override
 Tears down the platform (via shutdown()) and then performs whatever platform-appropriate action actually ends the app - return to loader/menu, power off, or just exit(), depending on how getSystemEvent() last reported and how the platform was reached.
 
SystemEvent getSystemEvent () override
 Polls Cafe OS process events.
 
Status getStatus () const override
 Current platform lifecycle state (Running, Paused, Exiting).
 
void triggerExit () override
 Transitions platform state to move to Exiting.
 
AudioDriver * getAudio () override
 
VideoDriver * getVideo () override
 
InputDriver * getInput () override
 
FileSystemDriver * getFileSystem () override
 
ThreadDriver * getThread () override
 
Logger * getLogger () override
 May return nullptr on a Platform that hasn't finished init() yet - LogPrintf()/LOG_*() already guard against this, but code calling platform->getLogger() directly should too.
 
- Public Member Functions inherited from Platform
const PlatformConfig & getConfig () const
 The PlatformConfig this platform was init()'d with.
 
bool shouldExit ()
 True once triggerExit() has been called, or the platform's own getSystemEvent() independently reports ShutdownRequested (eg.
 

Protected Member Functions

void shutdown () override
 Shuts down and releases all five drivers.
 

Additional Inherited Members

- Protected Attributes inherited from Platform
PlatformConfig config {}
 Set by init() in every concrete Platform - store the passed-in config as the very first line of the override.
 

Detailed Description

Wii U Platform: ProcUI application lifecycle plus the wut driver set.

Examples
demo.cpp.

Definition at line 22 of file WutPlatform.h.

Constructor & Destructor Documentation

◆ WutPlatform()

WutPlatform::WutPlatform ( )
inline

Definition at line 25 of file WutPlatform.h.

Member Function Documentation

◆ getAudio()

AudioDriver * WutPlatform::getAudio ( )
inlineoverridevirtual
Returns
the audio driver, valid once init() has run

Implements Platform.

Definition at line 33 of file WutPlatform.h.

◆ getFileSystem()

FileSystemDriver * WutPlatform::getFileSystem ( )
inlineoverridevirtual
Returns
the storage driver, valid once init() has run

Implements Platform.

Definition at line 36 of file WutPlatform.h.

◆ getInput()

InputDriver * WutPlatform::getInput ( )
inlineoverridevirtual
Returns
the input driver, valid once init() has run

Implements Platform.

Definition at line 35 of file WutPlatform.h.

◆ getLogger()

Logger * WutPlatform::getLogger ( )
inlineoverridevirtual

May return nullptr on a Platform that hasn't finished init() yet - LogPrintf()/LOG_*() already guard against this, but code calling platform->getLogger() directly should too.

Implements Platform.

Definition at line 38 of file WutPlatform.h.

◆ getStatus()

Status WutPlatform::getStatus ( ) const
inlineoverridevirtual

Current platform lifecycle state (Running, Paused, Exiting).

Implements Platform.

Definition at line 30 of file WutPlatform.h.

◆ getSystemEvent()

SystemEvent WutPlatform::getSystemEvent ( )
overridevirtual

Polls Cafe OS process events.

Transitions permanently to Exiting once WHBProcIsRunning() returns false, and tracks Paused vs Running via ProcUIInForeground().

Implements Platform.

Definition at line 126 of file WutPlatform.cpp.

◆ getThread()

ThreadDriver * WutPlatform::getThread ( )
inlineoverridevirtual
Returns
the thread driver, valid once init() has run

Implements Platform.

Definition at line 37 of file WutPlatform.h.

◆ getVideo()

VideoDriver * WutPlatform::getVideo ( )
inlineoverridevirtual
Returns
the video driver, valid once init() has run

Implements Platform.

Definition at line 34 of file WutPlatform.h.

◆ init()

void WutPlatform::init ( const PlatformConfig & config)
overridevirtual

Constructs and initializes all five drivers for this platform.

Parameters
configGUI canvas size and asset scale for this platform

Implements Platform.

Definition at line 14 of file WutPlatform.cpp.

◆ requestExit()

void WutPlatform::requestExit ( )
overridevirtual

Tears down the platform (via shutdown()) and then performs whatever platform-appropriate action actually ends the app - return to loader/menu, power off, or just exit(), depending on how getSystemEvent() last reported and how the platform was reached.

It does not return.

Implements Platform.

Definition at line 104 of file WutPlatform.cpp.

◆ shutdown()

void WutPlatform::shutdown ( )
overrideprotectedvirtual

Shuts down and releases all five drivers.

Any background Thread that might still call into a driver must be stopped and joined (eg. via Thread::JoinAll()) before calling this, since the drivers it deletes may be in active use.

Implements Platform.

Definition at line 55 of file WutPlatform.cpp.

◆ triggerExit()

void WutPlatform::triggerExit ( )
inlineoverridevirtual

Transitions platform state to move to Exiting.

Implements Platform.

Definition at line 31 of file WutPlatform.h.


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