Ultralight  1.0.0
A fast, lightweight, HTML UI engine for native apps.
ultralight::Window Class Referenceabstract

Window class, represents a platform window. More...

#include <Window.h>

Inheritance diagram for ultralight::Window:
ultralight::RefCounted

Public Member Functions

virtual void set_listener (WindowListener *listener)=0
 Set a WindowListener to receive callbacks for window-related events. More...
 
virtual WindowListenerlistener ()=0
 Get the WindowListener, if any.
 
virtual int width () const =0
 Get the window width (in device coordinates).
 
virtual int height () const =0
 Get the window height (in device coordinates).
 
virtual bool is_fullscreen () const =0
 Whether or not the window is fullscreen.
 
virtual double scale () const =0
 The DPI scale of the window.
 
virtual void SetTitle (const char *title)=0
 Set the window title.
 
virtual void SetCursor (ultralight::Cursor cursor)=0
 Set the cursor.
 
virtual void Close ()=0
 Close the window.
 
virtual int DeviceToPixels (int val) const =0
 Convert device coordinates to pixels using the current DPI scale.
 
virtual int PixelsToDevice (int val) const =0
 Convert pixels to device coordinates using the current DPI scale.
 

Static Public Member Functions

static Ref< WindowCreate (Monitor *monitor, uint32_t width, uint32_t height, bool fullscreen, unsigned int window_flags)
 Create a new Window. More...
 

Detailed Description

Window class, represents a platform window.

Definition at line 59 of file Window.h.

Member Function Documentation

◆ Create()

static Ref<Window> ultralight::Window::Create ( Monitor monitor,
uint32_t  width,
uint32_t  height,
bool  fullscreen,
unsigned int  window_flags 
)
static

Create a new Window.

Parameters
monitorThe monitor to create the Window on.
widthThe width (in device coordinates).
heightThe height (in device coordinates).
fullscreenWhether or not the window is fullscreen.
window_flagsVarious window flags.

◆ set_listener()

virtual void ultralight::Window::set_listener ( WindowListener listener)
pure virtual

Set a WindowListener to receive callbacks for window-related events.

Note
Ownership remains with the caller.

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