Mir
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
miral::WaylandExtensions Class Reference

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...
 

Static Public Member Functions

static auto recommended_extensions () -> std::string
 Default for extensions to enabled recommended by Mir (colon separated list) More...
 

Detailed Description

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.

Member Typedef Documentation

◆ Filter

using miral::WaylandExtensions::Filter = std::function<bool(Application const& app, char const* protocol)>
Remarks
Since MirAL 2.5

Constructor & Destructor Documentation

◆ WaylandExtensions() [1/3]

miral::WaylandExtensions::WaylandExtensions ( )

Default to enabling the extensions recommended by Mir.

◆ WaylandExtensions() [2/3]

miral::WaylandExtensions::WaylandExtensions ( std::string const &  default_value)
explicit

Initialize "enabled by default" to a custom set of extensions (colon separated list).

Note
This can only be a subset of supported_extensions()

◆ ~WaylandExtensions()

miral::WaylandExtensions::~WaylandExtensions ( )

◆ WaylandExtensions() [3/3]

miral::WaylandExtensions::WaylandExtensions ( WaylandExtensions const &  )

Member Function Documentation

◆ add_extension()

void miral::WaylandExtensions::add_extension ( Builder const &  builder)

Add a bespoke Wayland extension both to "supported" and "enabled by default".

Remarks
Since MirAL 2.5

◆ add_extension_disabled_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".

Remarks
Since MirAL 2.5

◆ operator()()

void miral::WaylandExtensions::operator() ( mir::Server &  server) const

◆ operator=()

auto miral::WaylandExtensions::operator= ( WaylandExtensions const &  ) -> WaylandExtensions &

◆ recommended_extensions()

static auto miral::WaylandExtensions::recommended_extensions ( ) -> std::string
static

Default for extensions to enabled recommended by Mir (colon separated list)

Remarks
Since MirAL 2.5

◆ set_filter()

void miral::WaylandExtensions::set_filter ( Filter const &  extension_filter)

Set an extension filter callback to control the extensions available to specific clients.

Remarks
Since MirAL 2.5

◆ supported_extensions()

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().

Deprecated:
This is of no real use to the server, just for documenting the configuration option.

The documentation for this class was generated from the following file:

Copyright © 2012-2019 Canonical Ltd.
Generated on Fri May 24 15:24:26 UTC 2019
This documentation is licensed under the GPL version 2 or 3.