Ultralight C++ API 1.3.0
Loading...
Searching...
No Matches
ultralight::App Class Referenceabstract

#include <AppCore/App.h>

Details

Main application singleton (use this if you want to let the library manage window creation).

This convenience class automatically sets up the Renderer, creates a run loop, and handles all painting and platform-specific operations for you.

Inheritance diagram for ultralight::App:
ultralight::RefCounted

Static Public Member Functions

static RefPtr< AppCreate (Settings settings=Settings(), Config config=Config())
 Create the App singleton.
 
static Appinstance ()
 Get the App singleton.
 

Public Member Functions

virtual const Settingssettings () const =0
 Get the settings this App was created with.
 
virtual void set_listener (AppListener *listener)=0
 Set an AppListener to receive callbacks for app-related events.
 
virtual AppListenerlistener ()=0
 Get the AppListener, if any.
 
virtual bool is_running () const =0
 Whether or not the App is running.
 
virtual Monitormain_monitor ()=0
 Get the main monitor (this is never NULL).
 
virtual RefPtr< Rendererrenderer ()=0
 Get the underlying Renderer instance.
 
virtual void Run ()=0
 Run the main loop.
 
virtual void Quit ()=0
 Quit the application.
 
- Public Member Functions inherited from ultralight::RefCounted
virtual void AddRef () const =0
 
virtual void Release () const =0
 
virtual int ref_count () const =0
 

Protected Member Functions

virtual ~App ()
 
- Protected Member Functions inherited from ultralight::RefCounted
virtual ~RefCounted ()
 

Constructor & Destructor Documentation

◆ ~App()

virtual ultralight::App::~App ( )
protectedvirtual

Member Function Documentation

◆ Create()

static RefPtr< App > ultralight::App::Create ( Settings  settings = Settings(),
Config  config = Config() 
)
static

Create the App singleton.

Parameters
settingsSettings to customize App runtime behavior.
configConfig options for the Ultralight renderer.
Returns
Returns a ref-pointer to the created App instance.
Note
You should only create one of these per application lifetime.
Certain Config options may be overridden during App creation, most commonly Config::face_winding and Config::cache_path.

◆ instance()

static App * ultralight::App::instance ( )
static

Get the App singleton.

◆ is_running()

virtual bool ultralight::App::is_running ( ) const
pure virtual

Whether or not the App is running.

◆ listener()

virtual AppListener * ultralight::App::listener ( )
pure virtual

Get the AppListener, if any.

◆ main_monitor()

virtual Monitor * ultralight::App::main_monitor ( )
pure virtual

Get the main monitor (this is never NULL).

Note
We'll add monitor enumeration later.

◆ Quit()

virtual void ultralight::App::Quit ( )
pure virtual

Quit the application.

◆ renderer()

virtual RefPtr< Renderer > ultralight::App::renderer ( )
pure virtual

Get the underlying Renderer instance.

◆ Run()

virtual void ultralight::App::Run ( )
pure virtual

Run the main loop.

◆ set_listener()

virtual void ultralight::App::set_listener ( AppListener listener)
pure virtual

Set an AppListener to receive callbacks for app-related events.

Note
Ownership remains with the caller.

◆ settings()

virtual const Settings & ultralight::App::settings ( ) const
pure virtual

Get the settings this App was created with.


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