Mir
Public Member Functions | List of all members
mir::Server Class Reference

Customise and run a Mir server. More...

#include <server.h>

Public Member Functions

 Server ()
 
Essential operations

These are the commands used to run and stop.

void set_command_line (int argc, char const *argv[])
 set the command line. This must remain valid while apply_settings() and run() are called. More...
 
void apply_settings ()
 Applies any configuration options, hooks, or custom implementations. Must be called before calling run() or accessing any mir subsystems. More...
 
auto supported_pixel_formats () const -> std::vector< MirPixelFormat >
 The pixel formats that may be used when creating surfaces. More...
 
void run ()
 Run the Mir server until it exits. More...
 
void stop ()
 Tell the Mir server to exit. More...
 
bool exited_normally ()
 returns true if and only if server exited normally. Otherwise false. More...
 
Configuration options

These functions allow customization of the handling of configuration options.

The add and set functions should be called before apply_settings() otherwise they throw a std::logic_error.

void add_configuration_option (std::string const &option, std::string const &description, int default_value)
 Add user configuration option(s) to Mir's option handling. These will be resolved during initialisation from the command line, environment variables, a config file or the supplied default. More...
 
void add_configuration_option (std::string const &option, std::string const &description, double default_value)
 Add user configuration option(s) to Mir's option handling. These will be resolved during initialisation from the command line, environment variables, a config file or the supplied default. More...
 
void add_configuration_option (std::string const &option, std::string const &description, std::string const &default_value)
 Add user configuration option(s) to Mir's option handling. These will be resolved during initialisation from the command line, environment variables, a config file or the supplied default. More...
 
void add_configuration_option (std::string const &option, std::string const &description, char const *default_value)
 Add user configuration option(s) to Mir's option handling. These will be resolved during initialisation from the command line, environment variables, a config file or the supplied default. More...
 
void add_configuration_option (std::string const &option, std::string const &description, bool default_value)
 Add user configuration option(s) to Mir's option handling. These will be resolved during initialisation from the command line, environment variables, a config file or the supplied default. More...
 
void add_configuration_option (std::string const &option, std::string const &description, OptionType type)
 Add user configuration option(s) to Mir's option handling. These will be resolved during initialisation from the command line, environment variables, a config file or the supplied default. More...
 
void set_command_line_handler (std::function< void(int argc, char const *const *argv)> const &command_line_hander)
 Set a handler for any command line options Mir does not recognise. This will be invoked if any unrecognised options are found during initialisation. Any unrecognised arguments are passed to this function. The pointers remain valid for the duration of the call only. If set_command_line_handler is not called the default action is to exit by throwing mir::AbnormalExit (which will be handled by the exception handler prior to exiting run(). More...
 
void set_config_filename (std::string const &config_file)
 Set the configuration filename. This will be searched for and parsed in the standard locations. Vis: More...
 
auto get_options () const -> std::shared_ptr< options::Option >
 Returns the configuration options. This will be null before initialization starts. It will be available when the init_callback has been invoked (and thereafter until the server exits). More...
 
Getting access to Mir subsystems

These may be invoked by the functors that provide alternative implementations of Mir subsystems.

They should only be used after apply_settings() is called - otherwise they throw a std::logic_error.

auto the_compositor () const -> std::shared_ptr< compositor::Compositor >
 
auto the_compositor_report () const -> std::shared_ptr< compositor::CompositorReport >
 
auto the_composite_event_filter () const -> std::shared_ptr< input::CompositeEventFilter >
 
auto the_cursor_listener () const -> std::shared_ptr< input::CursorListener >
 
auto the_cursor () const -> std::shared_ptr< graphics::Cursor >
 
auto the_focus_controller () const -> std::shared_ptr< shell::FocusController >
 
auto the_display () const -> std::shared_ptr< graphics::Display >
 
auto the_display_configuration_controller () const -> std::shared_ptr< shell::DisplayConfigurationController >
 
auto the_gl_config () const -> std::shared_ptr< graphics::GLConfig >
 
auto the_graphics_platform () const -> std::shared_ptr< graphics::Platform >
 
auto the_input_targeter () const -> std::shared_ptr< shell::InputTargeter >
 
auto the_logger () const -> std::shared_ptr< logging::Logger >
 
auto the_main_loop () const -> std::shared_ptr< MainLoop >
 
auto the_prompt_session_listener () const -> std::shared_ptr< scene::PromptSessionListener >
 
auto the_prompt_session_manager () const -> std::shared_ptr< scene::PromptSessionManager >
 
auto the_session_authorizer () const -> std::shared_ptr< frontend::SessionAuthorizer >
 
auto the_session_coordinator () const -> std::shared_ptr< scene::SessionCoordinator >
 
auto the_session_listener () const -> std::shared_ptr< scene::SessionListener >
 
auto the_shell () const -> std::shared_ptr< shell::Shell >
 
auto the_shell_display_layout () const -> std::shared_ptr< shell::DisplayLayout >
 
auto the_buffer_stream_factory () const -> std::shared_ptr< scene::BufferStreamFactory >
 
auto the_surface_factory () const -> std::shared_ptr< scene::SurfaceFactory >
 
auto the_surface_stack () const -> std::shared_ptr< shell::SurfaceStack >
 
auto the_touch_visualizer () const -> std::shared_ptr< input::TouchVisualizer >
 
auto the_input_device_hub () const -> std::shared_ptr< input::InputDeviceHub >
 
auto the_application_not_responding_detector () const -> std::shared_ptr< scene::ApplicationNotRespondingDetector >
 
auto the_persistent_surface_store () const -> std::shared_ptr< shell::PersistentSurfaceStore >
 
auto the_display_configuration_observer_registrar () const -> std::shared_ptr< ObserverRegistrar< graphics::DisplayConfigurationObserver >>
 
auto the_seat_observer_registrar () const -> std::shared_ptr< ObserverRegistrar< input::SeatObserver >>
 
auto the_session_mediator_observer_registrar () const -> std::shared_ptr< ObserverRegistrar< frontend::SessionMediatorObserver >>
 

Using hooks into the run() logic

These allow the user to insert logic into startup or error handling.

For obvious reasons they should be called before run().

using Terminator = std::function< void(int signal)>
 Functor for processing SIGTERM or SIGINT This will not be called directly by a signal handler: arbitrary functions may be invoked. More...
 
using EmergencyCleanupHandler = std::function< void()>
 Functor for processing fatal signals for any "emergency cleanup". That is: SIGQUIT, SIGABRT, SIGFPE, SIGSEGV & SIGBUS. More...
 
void add_pre_init_callback (std::function< void()> const &pre_init_callback)
 Add a callback to be invoked when the settings have been applied, but before the server has been initialized. This allows client code to get access Mir objects. If multiple callbacks are added they will be invoked in the sequence added. More...
 
void add_init_callback (std::function< void()> const &init_callback)
 Add a callback to be invoked when the server has been initialized, but before it starts. This allows client code to get access Mir objects. If multiple callbacks are added they will be invoked in the sequence added. More...
 
void add_stop_callback (std::function< void()> const &stop_callback)
 Add a callback to be invoked when the server is about to stop, If multiple callbacks are added they will be invoked in the reverse sequence added. More...
 
void set_exception_handler (std::function< void()> const &exception_handler)
 Set a handler for exceptions. This is invoked in a catch (...) block and the exception can be re-thrown to retrieve type information. The default action is to call mir::report_exception(std::cerr) More...
 
void set_terminator (Terminator const &terminator)
 Set handler for termination requests. terminator will be called following receipt of SIGTERM or SIGINT. The default terminator stop()s the server, replacements should probably do the same in addition to any additional shutdown logic. More...
 
void add_emergency_cleanup (EmergencyCleanupHandler const &handler)
 Add cleanup for abnormal terminations. handler will be called on receipt of a fatal signal after which the default signal-handler will terminate the process. More...
 

Providing custom implementation

Provide alternative implementations of Mir subsystems: the functors will be invoked during initialization of the Mir server (or when accessor methods are called).

They should be called before apply_settings() otherwise they throw a std::logic_error.

template<typename T >
using Builder = std::function< std::shared_ptr< T >()>
 Each of the override functions takes a builder functor of the same form. More...
 
template<typename T >
using Wrapper = std::function< std::shared_ptr< T >(std::shared_ptr< T > const &)>
 Each of the wrap functions takes a wrapper functor of the same form. More...
 
void override_the_compositor (Builder< compositor::Compositor > const &compositor_builder)
 Sets an override functor for creating the compositor. More...
 
void override_the_cursor_images (Builder< input::CursorImages > const &cursor_images_builder)
 Sets an override functor for creating the cursor images. More...
 
void override_the_display_buffer_compositor_factory (Builder< compositor::DisplayBufferCompositorFactory > const &compositor_builder)
 Sets an override functor for creating the per-display rendering code. More...
 
void override_the_gl_config (Builder< graphics::GLConfig > const &gl_config_builder)
 Sets an override functor for creating the gl config. More...
 
void override_the_cookie_authority (Builder< cookie::Authority > const &cookie_authority_builder)
 Sets an override functor for creating the cookie authority. A secret can be saved and any process this secret is shared with can verify Mir-generated cookies, or produce their own. More...
 
void override_the_coordinate_translator (Builder< scene::CoordinateTranslator > const &coordinate_translator_builder)
 Sets an override functor for creating the coordinate translator. More...
 
void override_the_host_lifecycle_event_listener (Builder< shell::HostLifecycleEventListener > const &host_lifecycle_event_listener_builder)
 Sets an override functor for creating the host lifecycle event listener. More...
 
void override_the_input_dispatcher (Builder< input::InputDispatcher > const &input_dispatcher_builder)
 Sets an override functor for creating the input dispatcher. More...
 
void override_the_logger (Builder< logging::Logger > const &logger_builder)
 Sets an override functor for creating the logger. More...
 
void override_the_prompt_session_listener (Builder< scene::PromptSessionListener > const &prompt_session_listener_builder)
 Sets an override functor for creating the prompt session listener. More...
 
void override_the_prompt_session_manager (Builder< scene::PromptSessionManager > const &prompt_session_manager_builder)
 Sets an override functor for creating the prompt session manager. More...
 
void override_the_server_status_listener (Builder< ServerStatusListener > const &server_status_listener_builder)
 Sets an override functor for creating the status listener. More...
 
void override_the_session_authorizer (Builder< frontend::SessionAuthorizer > const &session_authorizer_builder)
 Sets an override functor for creating the session authorizer. More...
 
void override_the_session_listener (Builder< scene::SessionListener > const &session_listener_builder)
 Sets an override functor for creating the session listener. More...
 
void override_the_shell (Builder< shell::Shell > const &wrapper)
 Sets an override functor for creating the shell. More...
 
void override_the_window_manager_builder (shell::WindowManagerBuilder const wmb)
 Sets an override functor for creating the window manager. More...
 
void override_the_application_not_responding_detector (Builder< scene::ApplicationNotRespondingDetector > const &anr_detector_builder)
 Sets an override functor for creating the application not responding detector. More...
 
void override_the_persistent_surface_store (Builder< shell::PersistentSurfaceStore > const &persistent_surface_store)
 Sets an override functor for creating the persistent_surface_store. More...
 
void wrap_cursor (Wrapper< graphics::Cursor > const &cursor_builder)
 Sets a wrapper functor for creating the cursor. More...
 
void wrap_cursor_listener (Wrapper< input::CursorListener > const &wrapper)
 Sets a wrapper functor for creating the cursor listener. More...
 
void wrap_display_buffer_compositor_factory (Wrapper< compositor::DisplayBufferCompositorFactory > const &wrapper)
 Sets a wrapper functor for creating the per-display rendering code. More...
 
void wrap_display_configuration_policy (Wrapper< graphics::DisplayConfigurationPolicy > const &wrapper)
 Sets a wrapper functor for creating the display configuration policy. More...
 
void wrap_shell (Wrapper< shell::Shell > const &wrapper)
 Sets a wrapper functor for creating the shell. More...
 
void wrap_surface_stack (Wrapper< shell::SurfaceStack > const &surface_stack)
 Sets a wrapper functor for creating the surface stack. More...
 
void wrap_application_not_responding_detector (Wrapper< scene::ApplicationNotRespondingDetector > const &anr_detector)
 Sets a wrapper functor for creating the application not responding detector. More...
 

Client side support

These facilitate use of the server through the client API.

They should be called while the server is running (i.e. run() has been called and not exited) otherwise they throw a std::logic_error.

using ConnectHandler = std::function< void(std::shared_ptr< frontend::Session > const &session)>
 
auto open_client_socket () -> Fd
 Get a file descriptor that can be used to connect a client It can be passed to another process, or used directly with mir_connect() using the format "fd://%d". More...
 
auto open_client_socket (ConnectHandler const &connect_handler) -> Fd
 Get a file descriptor that can be used to connect a client It can be passed to another process, or used directly with mir_connect() using the format "fd://%d". More...
 
auto open_prompt_socket () -> Fd
 Get a file descriptor that can be used to connect a prompt provider It can be passed to another process, or used directly with mir_connect() using the format "fd://%d". More...
 

Detailed Description

Customise and run a Mir server.

Examples:
render_surfaces.cpp, server_example.cpp, server_example_display_configuration_policy.cpp, server_example_input_device_config.cpp, server_example_input_event_filter.cpp, server_example_input_filter.cpp, server_example_log_options.cpp, and server_minimal.cpp.

Member Typedef Documentation

template<typename T >
using mir::Server::Builder = std::function<std::shared_ptr<T>()>

Each of the override functions takes a builder functor of the same form.

Note
If a null pointer is returned by the builder the default is used instead.
using mir::Server::ConnectHandler = std::function<void(std::shared_ptr<frontend::Session> const& session)>
using mir::Server::EmergencyCleanupHandler = std::function<void()>

Functor for processing fatal signals for any "emergency cleanup". That is: SIGQUIT, SIGABRT, SIGFPE, SIGSEGV & SIGBUS.

Warning
This will be called directly by a signal handler: Only async-signal-safe functions may be called
using mir::Server::Terminator = std::function<void(int signal)>

Functor for processing SIGTERM or SIGINT This will not be called directly by a signal handler: arbitrary functions may be invoked.

template<typename T >
using mir::Server::Wrapper = std::function<std::shared_ptr<T>(std::shared_ptr<T> const&)>

Each of the wrap functions takes a wrapper functor of the same form.

Constructor & Destructor Documentation

mir::Server::Server ( )

Member Function Documentation

void mir::Server::add_configuration_option ( std::string const &  option,
std::string const &  description,
int  default_value 
)

Add user configuration option(s) to Mir's option handling. These will be resolved during initialisation from the command line, environment variables, a config file or the supplied default.

Examples:
server_example.cpp, server_example_display_configuration_policy.cpp, server_example_input_device_config.cpp, server_example_input_filter.cpp, and server_example_log_options.cpp.
void mir::Server::add_configuration_option ( std::string const &  option,
std::string const &  description,
double  default_value 
)

Add user configuration option(s) to Mir's option handling. These will be resolved during initialisation from the command line, environment variables, a config file or the supplied default.

void mir::Server::add_configuration_option ( std::string const &  option,
std::string const &  description,
std::string const &  default_value 
)

Add user configuration option(s) to Mir's option handling. These will be resolved during initialisation from the command line, environment variables, a config file or the supplied default.

void mir::Server::add_configuration_option ( std::string const &  option,
std::string const &  description,
char const *  default_value 
)

Add user configuration option(s) to Mir's option handling. These will be resolved during initialisation from the command line, environment variables, a config file or the supplied default.

void mir::Server::add_configuration_option ( std::string const &  option,
std::string const &  description,
bool  default_value 
)

Add user configuration option(s) to Mir's option handling. These will be resolved during initialisation from the command line, environment variables, a config file or the supplied default.

void mir::Server::add_configuration_option ( std::string const &  option,
std::string const &  description,
OptionType  type 
)

Add user configuration option(s) to Mir's option handling. These will be resolved during initialisation from the command line, environment variables, a config file or the supplied default.

void mir::Server::add_emergency_cleanup ( EmergencyCleanupHandler const &  handler)

Add cleanup for abnormal terminations. handler will be called on receipt of a fatal signal after which the default signal-handler will terminate the process.

void mir::Server::add_init_callback ( std::function< void()> const &  init_callback)

Add a callback to be invoked when the server has been initialized, but before it starts. This allows client code to get access Mir objects. If multiple callbacks are added they will be invoked in the sequence added.

Examples:
server_example.cpp, server_example_input_device_config.cpp, server_example_input_event_filter.cpp, and server_example_input_filter.cpp.
void mir::Server::add_pre_init_callback ( std::function< void()> const &  pre_init_callback)

Add a callback to be invoked when the settings have been applied, but before the server has been initialized. This allows client code to get access Mir objects. If multiple callbacks are added they will be invoked in the sequence added.

void mir::Server::add_stop_callback ( std::function< void()> const &  stop_callback)

Add a callback to be invoked when the server is about to stop, If multiple callbacks are added they will be invoked in the reverse sequence added.

void mir::Server::apply_settings ( )

Applies any configuration options, hooks, or custom implementations. Must be called before calling run() or accessing any mir subsystems.

Examples:
server_example.cpp, and server_minimal.cpp.
bool mir::Server::exited_normally ( )

returns true if and only if server exited normally. Otherwise false.

Examples:
render_surfaces.cpp, server_example.cpp, and server_minimal.cpp.
auto mir::Server::get_options ( ) const -> std::shared_ptr< options::Option >

Returns the configuration options. This will be null before initialization starts. It will be available when the init_callback has been invoked (and thereafter until the server exits).

Examples:
server_example.cpp, server_example_display_configuration_policy.cpp, server_example_input_device_config.cpp, server_example_input_filter.cpp, and server_example_log_options.cpp.
auto mir::Server::open_client_socket ( ) -> Fd

Get a file descriptor that can be used to connect a client It can be passed to another process, or used directly with mir_connect() using the format "fd://%d".

Examples:
server_example.cpp.
auto mir::Server::open_client_socket ( ConnectHandler const &  connect_handler) -> Fd

Get a file descriptor that can be used to connect a client It can be passed to another process, or used directly with mir_connect() using the format "fd://%d".

Parameters
connect_handlercallback to be invoked when the client connects
auto mir::Server::open_prompt_socket ( ) -> Fd

Get a file descriptor that can be used to connect a prompt provider It can be passed to another process, or used directly with mir_connect() using the format "fd://%d".

void mir::Server::override_the_application_not_responding_detector ( Builder< scene::ApplicationNotRespondingDetector > const &  anr_detector_builder)

Sets an override functor for creating the application not responding detector.

void mir::Server::override_the_compositor ( Builder< compositor::Compositor > const &  compositor_builder)

Sets an override functor for creating the compositor.

void mir::Server::override_the_cookie_authority ( Builder< cookie::Authority > const &  cookie_authority_builder)

Sets an override functor for creating the cookie authority. A secret can be saved and any process this secret is shared with can verify Mir-generated cookies, or produce their own.

void mir::Server::override_the_coordinate_translator ( Builder< scene::CoordinateTranslator > const &  coordinate_translator_builder)

Sets an override functor for creating the coordinate translator.

void mir::Server::override_the_cursor_images ( Builder< input::CursorImages > const &  cursor_images_builder)

Sets an override functor for creating the cursor images.

void mir::Server::override_the_display_buffer_compositor_factory ( Builder< compositor::DisplayBufferCompositorFactory > const &  compositor_builder)

Sets an override functor for creating the per-display rendering code.

void mir::Server::override_the_gl_config ( Builder< graphics::GLConfig > const &  gl_config_builder)

Sets an override functor for creating the gl config.

void mir::Server::override_the_host_lifecycle_event_listener ( Builder< shell::HostLifecycleEventListener > const &  host_lifecycle_event_listener_builder)

Sets an override functor for creating the host lifecycle event listener.

void mir::Server::override_the_input_dispatcher ( Builder< input::InputDispatcher > const &  input_dispatcher_builder)

Sets an override functor for creating the input dispatcher.

void mir::Server::override_the_logger ( Builder< logging::Logger > const &  logger_builder)

Sets an override functor for creating the logger.

Examples:
server_example_log_options.cpp.
void mir::Server::override_the_persistent_surface_store ( Builder< shell::PersistentSurfaceStore > const &  persistent_surface_store)

Sets an override functor for creating the persistent_surface_store.

void mir::Server::override_the_prompt_session_listener ( Builder< scene::PromptSessionListener > const &  prompt_session_listener_builder)

Sets an override functor for creating the prompt session listener.

void mir::Server::override_the_prompt_session_manager ( Builder< scene::PromptSessionManager > const &  prompt_session_manager_builder)

Sets an override functor for creating the prompt session manager.

void mir::Server::override_the_server_status_listener ( Builder< ServerStatusListener > const &  server_status_listener_builder)

Sets an override functor for creating the status listener.

Examples:
render_surfaces.cpp.
void mir::Server::override_the_session_authorizer ( Builder< frontend::SessionAuthorizer > const &  session_authorizer_builder)

Sets an override functor for creating the session authorizer.

void mir::Server::override_the_session_listener ( Builder< scene::SessionListener > const &  session_listener_builder)

Sets an override functor for creating the session listener.

void mir::Server::override_the_shell ( Builder< shell::Shell > const &  wrapper)

Sets an override functor for creating the shell.

void mir::Server::override_the_window_manager_builder ( shell::WindowManagerBuilder const  wmb)

Sets an override functor for creating the window manager.

void mir::Server::run ( )

Run the Mir server until it exits.

Examples:
render_surfaces.cpp, server_example.cpp, and server_minimal.cpp.
void mir::Server::set_command_line ( int  argc,
char const *  argv[] 
)

set the command line. This must remain valid while apply_settings() and run() are called.

Examples:
server_example.cpp, and server_minimal.cpp.
void mir::Server::set_command_line_handler ( std::function< void(int argc, char const *const *argv)> const &  command_line_hander)

Set a handler for any command line options Mir does not recognise. This will be invoked if any unrecognised options are found during initialisation. Any unrecognised arguments are passed to this function. The pointers remain valid for the duration of the call only. If set_command_line_handler is not called the default action is to exit by throwing mir::AbnormalExit (which will be handled by the exception handler prior to exiting run().

void mir::Server::set_config_filename ( std::string const &  config_file)

Set the configuration filename. This will be searched for and parsed in the standard locations. Vis:

  1. $XDG_CONFIG_HOME (if set, otherwise $HOME/.config (if set))
  2. $XDG_CONFIG_DIRS (if set, otherwise /etc/xdg)
Examples:
server_example.cpp.
void mir::Server::set_exception_handler ( std::function< void()> const &  exception_handler)

Set a handler for exceptions. This is invoked in a catch (...) block and the exception can be re-thrown to retrieve type information. The default action is to call mir::report_exception(std::cerr)

Examples:
server_example.cpp.
void mir::Server::set_terminator ( Terminator const &  terminator)

Set handler for termination requests. terminator will be called following receipt of SIGTERM or SIGINT. The default terminator stop()s the server, replacements should probably do the same in addition to any additional shutdown logic.

void mir::Server::stop ( )

Tell the Mir server to exit.

Examples:
server_example.cpp, and server_example_input_event_filter.cpp.
auto mir::Server::supported_pixel_formats ( ) const -> std::vector< MirPixelFormat >

The pixel formats that may be used when creating surfaces.

auto mir::Server::the_application_not_responding_detector ( ) const -> std::shared_ptr< scene::ApplicationNotRespondingDetector >
Returns
the application not responding detector
auto mir::Server::the_buffer_stream_factory ( ) const -> std::shared_ptr< scene::BufferStreamFactory >
Returns
the buffer stream factory
auto mir::Server::the_composite_event_filter ( ) const -> std::shared_ptr< input::CompositeEventFilter >
Returns
the composite event filter.
Examples:
server_example_input_event_filter.cpp, and server_example_input_filter.cpp.
auto mir::Server::the_compositor ( ) const -> std::shared_ptr< compositor::Compositor >
Returns
the compositor.
Examples:
server_example_input_filter.cpp.
auto mir::Server::the_compositor_report ( ) const -> std::shared_ptr< compositor::CompositorReport >
Returns
the compositor report.
auto mir::Server::the_cursor ( ) const -> std::shared_ptr< graphics::Cursor >
Returns
the cursor
auto mir::Server::the_cursor_listener ( ) const -> std::shared_ptr< input::CursorListener >
Returns
the cursor listener.
auto mir::Server::the_display ( ) const -> std::shared_ptr< graphics::Display >
Returns
the graphics display.
Examples:
server_example_input_filter.cpp.
auto mir::Server::the_display_configuration_controller ( ) const -> std::shared_ptr< shell::DisplayConfigurationController >
auto mir::Server::the_display_configuration_observer_registrar ( ) const -> std::shared_ptr< ObserverRegistrar< graphics::DisplayConfigurationObserver >>
Returns
a registrar to add and remove DisplayConfigurationChangeObservers
auto mir::Server::the_focus_controller ( ) const -> std::shared_ptr< shell::FocusController >
Returns
the focus controller.
auto mir::Server::the_gl_config ( ) const -> std::shared_ptr< graphics::GLConfig >
Returns
the GL config.
auto mir::Server::the_graphics_platform ( ) const -> std::shared_ptr< graphics::Platform >
Returns
the graphics platform.
auto mir::Server::the_input_device_hub ( ) const -> std::shared_ptr< input::InputDeviceHub >
Returns
the input device hub
Examples:
server_example_input_device_config.cpp.
auto mir::Server::the_input_targeter ( ) const -> std::shared_ptr< shell::InputTargeter >
Returns
the input targeter.
auto mir::Server::the_logger ( ) const -> std::shared_ptr< logging::Logger >
Returns
the logger.
auto mir::Server::the_main_loop ( ) const -> std::shared_ptr< MainLoop >
Returns
the main loop.
Examples:
server_example.cpp.
auto mir::Server::the_persistent_surface_store ( ) const -> std::shared_ptr< shell::PersistentSurfaceStore >
Returns
the persistent surface store
auto mir::Server::the_prompt_session_listener ( ) const -> std::shared_ptr< scene::PromptSessionListener >
Returns
the prompt session listener.
auto mir::Server::the_prompt_session_manager ( ) const -> std::shared_ptr< scene::PromptSessionManager >
Returns
the prompt session manager.
auto mir::Server::the_seat_observer_registrar ( ) const -> std::shared_ptr< ObserverRegistrar< input::SeatObserver >>
Returns
a registrar to add and remove SeatObservers
auto mir::Server::the_session_authorizer ( ) const -> std::shared_ptr< frontend::SessionAuthorizer >
Returns
the session authorizer.
auto mir::Server::the_session_coordinator ( ) const -> std::shared_ptr< scene::SessionCoordinator >
Returns
the session coordinator.
auto mir::Server::the_session_listener ( ) const -> std::shared_ptr< scene::SessionListener >
Returns
the session listener.
auto mir::Server::the_session_mediator_observer_registrar ( ) const -> std::shared_ptr< ObserverRegistrar< frontend::SessionMediatorObserver >>
Returns
a registrar to add and remove SessionMediatorObservers
auto mir::Server::the_shell ( ) const -> std::shared_ptr< shell::Shell >
Returns
the shell.
auto mir::Server::the_shell_display_layout ( ) const -> std::shared_ptr< shell::DisplayLayout >
Returns
the display layout.
auto mir::Server::the_surface_factory ( ) const -> std::shared_ptr< scene::SurfaceFactory >
Returns
the surface factory
auto mir::Server::the_surface_stack ( ) const -> std::shared_ptr< shell::SurfaceStack >
Returns
the surface stack.
auto mir::Server::the_touch_visualizer ( ) const -> std::shared_ptr< input::TouchVisualizer >
Returns
the touch visualizer.
void mir::Server::wrap_application_not_responding_detector ( Wrapper< scene::ApplicationNotRespondingDetector > const &  anr_detector)

Sets a wrapper functor for creating the application not responding detector.

void mir::Server::wrap_cursor ( Wrapper< graphics::Cursor > const &  cursor_builder)

Sets a wrapper functor for creating the cursor.

void mir::Server::wrap_cursor_listener ( Wrapper< input::CursorListener > const &  wrapper)

Sets a wrapper functor for creating the cursor listener.

void mir::Server::wrap_display_buffer_compositor_factory ( Wrapper< compositor::DisplayBufferCompositorFactory > const &  wrapper)

Sets a wrapper functor for creating the per-display rendering code.

void mir::Server::wrap_display_configuration_policy ( Wrapper< graphics::DisplayConfigurationPolicy > const &  wrapper)

Sets a wrapper functor for creating the display configuration policy.

Examples:
server_example_display_configuration_policy.cpp.
void mir::Server::wrap_shell ( Wrapper< shell::Shell > const &  wrapper)

Sets a wrapper functor for creating the shell.

void mir::Server::wrap_surface_stack ( Wrapper< shell::SurfaceStack > const &  surface_stack)

Sets a wrapper functor for creating the surface stack.


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

Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Jun 5 11:05:03 UTC 2017