123 bool fullscreen,
unsigned int window_flags);
172 virtual int x()
const = 0;
178 virtual int y()
const = 0;
261 friend class OverlayImpl;
#define AExport
Definition Defines.h:42
Generic keyboard event representing a change in keyboard state.
Definition KeyEvent.h:23
Monitor class, represents a platform monitor.
Definition Monitor.h:16
Generic 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
Offscreen pixel buffer surface.
Definition Surface.h:34
Window class, represents a platform window.
Definition Window.h:87
virtual uint32_t screen_width() const =0
Get the window width (in screen coordinates).
virtual bool is_visible() const =0
Whether or not the window is currently visible (not hidden).
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 void SetCursor(ultralight::Cursor cursor)=0
Set the cursor.
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 void Show()=0
Show the window (if it was previously hidden).
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 void Close()=0
Close the window.
virtual double scale() const =0
The DPI scale of the window.
virtual void set_listener(WindowListener *listener)=0
Set a WindowListener to receive callbacks for window-related events.
virtual uint32_t height() const =0
Get the window height (in pixels).
virtual void SetTitle(const char *title)=0
Set the window title.
virtual int ScreenToPixels(int val) const =0
Convert screen coordinates to pixels using the current DPI scale.
virtual WindowListener * listener()=0
Get the WindowListener, if any.
virtual uint32_t render_buffer_id() const =0
The render buffer id of the the window's backing texture.
virtual bool is_fullscreen() const =0
Whether or not the window is fullscreen.
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:244
virtual void * native_handle() const =0
Get the underlying native window handle.
virtual uint32_t screen_height() const =0
Get the window height (in screen coordinates).
virtual int PixelsToScreen(int val) const =0
Convert pixels to screen coordinates using the current DPI scale.
virtual uint32_t width() const =0
Get the window width (in pixels).
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 MoveToCenter()=0
Move the window to the center of the monitor.
virtual void Hide()=0
Hide the window.
Interface for all Window-related events.
Definition Window.h:27
virtual ~WindowListener()
Definition Window.h:29
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 bool OnMouseEvent(const ultralight::MouseEvent &evt)
Called when a mouse event is fired.
Definition Window.h:61
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 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_Borderless
Definition Window.h:77
@ kWindowFlags_Maximizable
Definition Window.h:80
@ kWindowFlags_Hidden
Definition Window.h:81
@ kWindowFlags_Resizable
Definition Window.h:79
Cursor
Cursor types,.
Definition Listener.h:49