Mir
|
Enable configuration of the Wayland extensions enabled at runtime. More...
#include <wayland_extensions.h>
Classes | |
struct | Builder |
A Builder creates and registers an extension protocol. More... | |
class | Context |
Context information useful for implementing Wayland extensions. More... | |
Public Types | |
using | Filter = std::function< bool(Application const &app, char const *protocol)> |
Public Member Functions | |
WaylandExtensions () | |
Default to enabling the extensions recommended by Mir. More... | |
WaylandExtensions (std::string const &default_value) | |
Initialize "enabled by default" to a custom set of extensions (colon separated list). More... | |
void | operator() (mir::Server &server) const |
auto | supported_extensions () const -> std::string |
All Wayland extensions currently supported (colon separated list). This includes both the recommended_extensions() and any extensions that have been added using add_extension(). More... | |
~WaylandExtensions () | |
WaylandExtensions (WaylandExtensions const &) | |
auto | operator= (WaylandExtensions const &) -> WaylandExtensions & |
void | set_filter (Filter const &extension_filter) |
Set an extension filter callback to control the extensions available to specific clients. More... | |
void | add_extension (Builder const &builder) |
Add a bespoke Wayland extension both to "supported" and "enabled by default". More... | |
void | add_extension_disabled_by_default (Builder const &builder) |
Add a bespoke Wayland extension both to "supported" but not "enabled by default". More... | |
auto | enable (std::string name) -> WaylandExtensions & |
Enable a Wayland extension Throws a std::runtime_error if the extension is not supported. More... | |
auto | disable (std::string name) -> WaylandExtensions & |
Disable a Wayand extension Throws a std::runtime_error if the extension is not supported. More... | |
Static Public Member Functions | |
static auto | recommended_extensions () -> std::string |
Default for extensions to enabled recommended by Mir (colon separated list) More... | |
static auto | recommended () -> std::set< std::string > |
The set of Wayland extensions that Mir recommends. Also the set that is enabled by default upon construction of a WaylandExtensions object. More... | |
static auto | supported () -> std::set< std::string > |
The set of Wayland extensions that core Mir supports. Does not include bespoke extensions A superset of recommended() More... | |
Static Public Attributes | |
static char const *const | zwlr_layer_shell_v1 |
Supported wayland extensions that are not enabled by default. More... | |
static char const *const | zxdg_output_manager_v1 |
Allows clients to retrieve additional information about outputs. More... | |
Enable configuration of the Wayland extensions enabled at runtime.
This adds the command line option '–wayland-extensions' the corresponding MIR_SERVER_WAYLAND_EXTENSIONS environment variable, and the wayland-extensions config line.
using miral::WaylandExtensions::Filter = std::function<bool(Application const& app, char const* protocol)> |
miral::WaylandExtensions::WaylandExtensions | ( | ) |
Default to enabling the extensions recommended by Mir.
|
explicit |
Initialize "enabled by default" to a custom set of extensions (colon separated list).
miral::WaylandExtensions::~WaylandExtensions | ( | ) |
miral::WaylandExtensions::WaylandExtensions | ( | WaylandExtensions const & | ) |
void miral::WaylandExtensions::add_extension | ( | Builder const & | builder | ) |
Add a bespoke Wayland extension both to "supported" and "enabled by default".
void miral::WaylandExtensions::add_extension_disabled_by_default | ( | Builder const & | builder | ) |
Add a bespoke Wayland extension both to "supported" but not "enabled by default".
auto miral::WaylandExtensions::disable | ( | std::string | name | ) | -> WaylandExtensions & |
Disable a Wayand extension Throws a std::runtime_error if the extension is not supported.
auto miral::WaylandExtensions::enable | ( | std::string | name | ) | -> WaylandExtensions & |
Enable a Wayland extension Throws a std::runtime_error if the extension is not supported.
void miral::WaylandExtensions::operator() | ( | mir::Server & | server | ) | const |
auto miral::WaylandExtensions::operator= | ( | WaylandExtensions const & | ) | -> WaylandExtensions & |
|
static |
The set of Wayland extensions that Mir recommends. Also the set that is enabled by default upon construction of a WaylandExtensions object.
|
static |
Default for extensions to enabled recommended by Mir (colon separated list)
void miral::WaylandExtensions::set_filter | ( | Filter const & | extension_filter | ) |
Set an extension filter callback to control the extensions available to specific clients.
|
static |
The set of Wayland extensions that core Mir supports. Does not include bespoke extensions A superset of recommended()
auto miral::WaylandExtensions::supported_extensions | ( | ) | const -> std::string |
All Wayland extensions currently supported (colon separated list). This includes both the recommended_extensions() and any extensions that have been added using add_extension().
|
static |
Supported wayland extensions that are not enabled by default.
These can be passed into WaylandExtensions::enable() to turn them on.Enables shell components such as panels, notifications and lock screens. It is recommended to use this in conjunction with set_filter() as malicious clients could potentially use this protocol to steal input focus or otherwise bother the user.
|
static |
Allows clients to retrieve additional information about outputs.
Copyright © 2012-2020
Canonical Ltd.
Generated on Sun Jul 12 13:42:43 UTC 2020
This documentation is licensed under the GPL version 2 or 3.