Class DisplaySystem

Inheritance Relationships

Base Type

Class Documentation

class DisplaySystem : public CE::Platform::DisplaySystem

Declaration: final

Owns a share of GLFW lifetime and all created windows on the platform thread.

Monitor modes/IDs are captured at construction with the primary entry first; there is no hotplug refresh or native-handle rebinding. Keep monitor topology stable while using this inventory. Borrowed windows and monitor references expire at display destruction, after dependent input/context owners retire.

Public Functions

DisplaySystem()
inline virtual const std::vector<::CE::Platform::Monitor> &monitors() const override

Declaration: [[nodiscard]]

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

inline virtual int monitor_count() const override

Declaration: [[nodiscard]]

inline virtual const ::CE::Platform::Monitor &primary_monitor() const override

Declaration: [[nodiscard]]

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

inline virtual ::CE::Platform::GLFW::Window *active_window() const override

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 override

Declaration: [[nodiscard]]

Query current GLFW monitor scale by an owned snapshot’s ID; foreign IDs throw invalid_args.

This does not refresh dimensions or report window scale.

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

Borrow a new display-owned window.

Positive logical dimensions and a known mode are required; foreign monitor IDs, allocation/native creation failures propagate. An omitted/empty title selects a generated title. The overload without dimensions uses the captured monitor dimensions.

::CE::Platform::GLFW::Window *create_window(const ::CE::Platform::Monitor &monitor, ::CE::Platform::WindowMode mode, int width, int height, const std::string &title)
::CE::Platform::GLFW::Window *create_window(const ::CE::Platform::Monitor &monitor, ::CE::Platform::WindowMode mode, ::CE::Platform::GLFW::Resolution resolution)
::CE::Platform::GLFW::Window *create_window(const ::CE::Platform::Monitor &monitor, ::CE::Platform::WindowMode mode)
virtual void activate_window(::CE::Platform::Window &window) override

Select the initial owned window, accepting repeat selection of that window.

Foreign windows or replacing the active window fail explicitly. This does not make a graphics context current or switch renderer/resource domains.