A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
An object that encapsulates rendering context for a view.
Definition GraphicsCommandBuffer.hpp:284
Definition GraphicsRenderer.hpp:21
A simple reference counter base class.
Definition SmartPtr.hpp:438
The CeresEngine renderer.
Definition Renderer.hpp:35
The BackingStore represents store for a window or view.
Definition UIBackingStore.hpp:29
The UIWindow::Device is the backing device for one or multiple windows.
Definition UIWindowDevice.hpp:41
void notifyFrameChanged(UIWindow &window, const UIRect &newFrame)
Utility method that must be called by device implementations when the window frame changes.
UIWindowDevice() noexcept=default
virtual void flush(UIWindow &window, UIBackingStore &backingStore)
Flushes the contents of the window to the backing device.
virtual UIBackingStorePtr createBackingStore(UIWindow &window)=0
Creates a new backing store for the window or a view that belongs to the window.
virtual void unregisterWindow(UIWindow &window)
Unregisters the window from this device.
void notifyBackingScaleFactorChange(UIWindow &window, double newBackingScalingFactor)
Utility method that must be called by device implementations when the window scaling factor changes.
virtual void draw(UIBackingStore &backingStore, UIDrawCommandBuffer &commandBuffer)
Draws the UI command buffer into the backing store.
virtual UIBackingStorePtr registerWindow(UIWindow &window)
Registers a window with this device.
virtual double getBackingScaleFactor(const UIWindow &window) const
The backing scale factor.
Definition UIWindowDevice.hpp:79
A UIWindowDevice implementation that offers graphics accelerated rendering of the UI,...
Definition UIWindowDevice.hpp:113
void draw(UIBackingStore &backingStore, UIDrawCommandBuffer &drawCommandBuffer) override
Draws the UI command buffer into the backing store.
Renderer & mRenderer
Definition UIWindowDevice.hpp:117
UIWindowFramebufferDevice(Renderer &renderer)
UIRenderer mUIRenderer
The renderer that will render the UI elements on a texture.
Definition UIWindowDevice.hpp:120
void flush(UIWindow &window, UIBackingStore &backingStore) override
Flushes the contents of the window to the backing device.
UIBackingStorePtr createBackingStore(UIWindow &window) override
Creates a new backing store for the window or a view that belongs to the window.
A window that an app displays on the screen.
Definition UIWindow.hpp:42
A UIWindowDevice implementation that offers graphics accelerated rendering of the UI.
Definition UIWindowDevice.hpp:143
UIBackingStorePtr createBackingStore(UIWindow &window) override
Vector< UIWindowPtr > mDirtyWindows
A set of dirty windows.
Definition UIWindowDevice.hpp:170
HashMap< UIWindow *, WindowInformation > mWindows
A map of all registered windows.
Definition UIWindowDevice.hpp:166
void onSurfaceEvent(UIWindow &window, const AnyInputEvent &)
void flush(UIWindow &window, UIBackingStore &backingStore) override
void unregisterWindow(UIWindow &window) override
Unregisters the window from this device.
void onSurfaceResize(UIWindow &window, const Vector2 &newSize)
UIWindowSurfaceDevice(Platform &platform, Renderer &renderer)
Creates a new window surface device.
double getBackingScaleFactor(const UIWindow &window) const override
The backing scale factor.
UIBackingStorePtr registerWindow(UIWindow &window) override
Registers a window with this device.
Platform & mPlatform
The platform object that will be used to create the window surfaces that will back each UIWindow regi...
Definition UIWindowDevice.hpp:149
Definition Application.hpp:19
std::unique_ptr< T, Deleter > UPtr
UPtr is a smart pointer that owns and manages another object through a pointer and disposes of that o...
Definition SmartPtr.hpp:28
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
std::unordered_map< Key, T, Hash, KeyEqual, ScopedAllocatorAdaptor< StdAllocator< Pair< const Key, T >, RawAllocator > > > HashMap
HashMap is an associative container that contains key-value pairs with unique keys.
Definition Map.hpp:33
Rect2 UIRect
A structure that contains the location and dimensions of a rectangle.
Definition UIUtility.hpp:33
std::array< T, N > Array
Array is a container that encapsulates fixed size arrays.
Definition Array.hpp:17
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25