Class DisplaySystem

Inheritance Relationships

Derived Type

Class Documentation

class DisplaySystem

Platform-owner display/window factory.

Created windows remain display-owned; callers borrow them and detach dependent input/render owners before teardown. Monitor references are borrowed inventory snapshots with backend-defined refresh and invalidation points. Copy values before handing them to another thread.

Subclassed by CE::Platform::GLFW::DisplaySystem

Public Functions

virtual ~DisplaySystem() = default
virtual const std::vector<::CE::Platform::Monitor> &monitors() const = 0

Declaration: [[nodiscard]]

Borrow the backend inventory; references expire on its refresh or destruction.

virtual int monitor_count() const = 0

Declaration: [[nodiscard]]

virtual const ::CE::Platform::Monitor &primary_monitor() const = 0

Declaration: [[nodiscard]]

Borrow the backend’s primary-monitor snapshot under the same inventory lifetime.

virtual ::CE::Platform::Window *active_window() const = 0

Declaration: [[nodiscard]]

Borrow the selected window; a backend without a selection may return nullptr.

virtual std::pair<float, float> content_scale(const ::CE::Platform::Monitor &monitor) const = 0

Declaration: [[nodiscard]]

Monitor X/Y scale for a snapshot recognized by this display.

This is not a per-window scale/change-notification contract; see the backend’s policy.

virtual ::CE::Platform::Window *create_window(const ::CE::Platform::Monitor &monitor, ::CE::Platform::WindowMode mode, int width, int height) = 0

Create a display-owned window from a recognized monitor, supported mode and positive logical dimensions.

The returned pointer transfers no ownership.

virtual void activate_window(::CE::Platform::Window &window) = 0

Select an owned window within the backend’s supported transition policy.

Renderer/context/resource-domain switching requires its own graphics contract.