Class OutputConfiguration

Nested Relationships

Nested Types

Class Documentation

class OutputConfiguration

Provides customization of the output configuration.

Remark

Since MirAL 6.1

Public Functions

void operator()(mir::Server &server) const
OutputConfiguration()

Creates an output configuration with a NullStrategy (which does nothing).

explicit OutputConfiguration(std::shared_ptr<Strategy> strategy)

Creates an output configuration with the specified strategy.

void update_strategy(std::shared_ptr<Strategy> strategy)

Updates the strategy used to customize the output configuration and applies it.

Note

This method should not be called from within the apply_configuration or confirm_configuration methods of a strategy.

~OutputConfiguration()
OutputConfiguration(OutputConfiguration const&)
OutputConfiguration &operator=(OutputConfiguration const&)
class Strategy

Interface for customization of the output configuration applied to the server.

Remark

Since MirAL 6.1

Subclassed by miral::OutputConfiguration::NullStrategy

Public Functions

Strategy()
virtual void apply_configuration(std::span<mir::graphics::UserDisplayConfigurationOutput> outputs) = 0

Called when the server is about to apply a new configuration. The strategy can modify the configuration before it is applied.

Parameters:

outputs – the modifiable output configuration data

virtual void confirm_configuration(std::span<mir::graphics::DisplayConfigurationOutput const> outputs) = 0

Called when the server applies a new configuration. The strategy can record the configuration, for example to write it to a log or a file.

Parameters:

outputs – the new configuration

virtual ~Strategy()
class NullStrategy : public miral::OutputConfiguration::Strategy

A strategy that does nothing.

Remark

Since MirAL 6.1

Public Functions

virtual void apply_configuration(std::span<mir::graphics::UserDisplayConfigurationOutput> outputs) override

Called when the server is about to apply a new configuration. The strategy can modify the configuration before it is applied.

Parameters:

outputs – the modifiable output configuration data

virtual void confirm_configuration(std::span<mir::graphics::DisplayConfigurationOutput const> outputs) override

Called when the server applies a new configuration. The strategy can record the configuration, for example to write it to a log or a file.

Parameters:

outputs – the new configuration

~NullStrategy() override