159 bool fullscreen,
unsigned int window_flags);
208 virtual int x()
const = 0;
214 virtual int y()
const = 0;
303 friend class OverlayImpl;
#define AExport
Definition Defines.h:42
Keyboard event representing a change in keyboard state.
Definition KeyEvent.h:23
A platform-specific monitor.
Definition Monitor.h:16
Mouse event representing a change in mouse state.
Definition MouseEvent.h:18
Interface for all ref-counted objects that will be managed using the RefPtr<> smart pointer.
Definition RefPtr.h:47
A nullable smart pointer.
Definition RefPtr.h:79
User-defined pixel buffer surface.
Definition Surface.h:47
A platform-specific window.
Definition Window.h:123
virtual bool is_accelerated() const =0
Whether or not the window is GPU accelerated.
static RefPtr< Window > Create(Monitor *monitor, uint32_t width, uint32_t height, bool fullscreen, unsigned int window_flags)
Create a new Window.
virtual uint32_t height() const =0
Get the window height (in pixels).
virtual void SetTitle(const char *title)=0
Set the window title.
virtual bool is_visible() const =0
Whether or not the window is currently visible (not hidden).
virtual double scale() const =0
The DPI scale of the window.
virtual bool is_fullscreen() const =0
Whether or not the window is fullscreen.
virtual uint32_t width() const =0
Get the window width (in pixels).
virtual void set_listener(WindowListener *listener)=0
Set a WindowListener to receive callbacks for window-related events.
virtual void MoveToCenter()=0
Move the window to the center of the monitor.
virtual uint32_t render_buffer_id() const =0
The render buffer id of the the window's backing texture.
virtual int y() const =0
Get the y-position of the window (in screen coordinates) relative to the top-left of the monitor area...
virtual int x() const =0
Get the x-position of the window (in screen coordinates) relative to the top-left of the monitor area...
virtual void * native_handle() const =0
Get the underlying native window handle.
virtual bool platform_always_uses_cpu_renderer() const =0
virtual void Show()=0
Show the window (if it was previously hidden).
virtual uint32_t screen_height() const =0
Get the window height (in screen coordinates).
virtual void Hide()=0
Hide the window.
virtual void Close()=0
Close the window.
virtual int PixelsToScreen(int val) const =0
Convert pixels to screen coordinates using the current DPI scale.
virtual int ScreenToPixels(int val) const =0
Convert screen coordinates to pixels using the current DPI scale.
virtual void EnableFrameStatistics()
Display frame statistics (FPS, frame times, etc.) in the titlebar.
Definition Window.h:296
virtual OverlayManager * overlay_manager() const =0
virtual void DrawSurface(int x, int y, Surface *surface)
Draw a surface directly to window, used only by CPU renderer.
Definition Window.h:280
virtual uint32_t screen_width() const =0
Get the window width (in screen coordinates).
virtual void SetCursor(ultralight::Cursor cursor)=0
Set the cursor.
virtual void MoveTo(int x, int y)=0
Move the window to a new position (in screen coordinates) relative to the top-left of the monitor are...
virtual WindowListener * listener()=0
Get the WindowListener, if any.
Interface for all Window-related events.
Definition Window.h:27
virtual void OnResize(ultralight::Window *window, uint32_t width_px, uint32_t height_px)
Called when the Window is resized.
Definition Window.h:43
virtual bool OnKeyEvent(const ultralight::KeyEvent &evt)
Called when a keyboard event is fired.
Definition Window.h:52
virtual bool OnScrollEvent(const ultralight::ScrollEvent &evt)
Called when a scroll event is fired.
Definition Window.h:70
virtual ~WindowListener()
Definition Window.h:29
virtual bool OnMouseEvent(const ultralight::MouseEvent &evt)
Called when a mouse event is fired.
Definition Window.h:61
virtual void OnClose(ultralight::Window *window)
Called when the Window is closed.
Definition Window.h:34
WindowFlags
Window creation flags.
Definition Window.h:76
@ kWindowFlags_Titled
Definition Window.h:78
@ kWindowFlags_Hidden
Definition Window.h:81
@ kWindowFlags_Borderless
Definition Window.h:77
@ kWindowFlags_Maximizable
Definition Window.h:80
@ kWindowFlags_Resizable
Definition Window.h:79
Cursor
Cursor types,.
Definition Listener.h:25