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

Release the concrete display and its owned windows.

Input, renderer and presentation users must detach before display destruction on the platform owner.

See also

Detailed guide

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

Declaration: [[nodiscard]]

Borrow the current backend monitor inventory.

See also

Detailed guide

Returns:

Borrowed snapshots, invalidated by backend-defined refresh or display destruction. Use on the platform owner and copy values for another thread; this call is not a hotplug subscription.

virtual int monitor_count() const = 0

Declaration: [[nodiscard]]

Query the backend inventory count on the platform owner.

See also

Detailed guide

Returns:

Number of monitor snapshots under the backend refresh policy.

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

Declaration: [[nodiscard]]

Borrow the primary-monitor snapshot.

See also

Detailed guide

Returns:

A display-owned value with the same refresh/destruction lifetime as monitors().

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

Declaration: [[nodiscard]]

Borrow the selected rendering window.

See also

Detailed guide

Returns:

The current display-owned selection, or nullptr when the backend has no selection. Does not activate a graphics context or marshal to the platform owner.

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

Declaration: [[nodiscard]]

Query monitor X/Y content scale on the platform owner.

See also

Detailed guide

Parameters:

monitor – Snapshot recognized by this display inventory.

Returns:

Scale factors under the concrete backend policy. This does not establish per-window scale transitions or change notifications; unsupported/foreign inventory values can reject.

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 on the platform owner.

See also

Detailed guide

Parameters:
  • monitor – Recognized inventory snapshot.

  • mode – Backend-supported initial window mode.

  • width – Positive logical width.

  • height – Positive logical height.

Returns:

Borrowed window pointer; the display retains ownership. Validation/native failures follow the backend; creating a window alone does not select an independent rendering/resource domain.

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

Select a display-owned window within the backend transition policy.

See also

Detailed guide

Parameters:

window – Window owned by this display. Selection does not promise renderer/context/resource-domain switching. NativeGLFW rejects replacement of an already selected different window.