2
3
4
5
6
7
8
9
10
11
12
13
14
15
20#include "mir/optional_value.h"
24#include <initializer_list>
27namespace mir {
class Server; }
30
31
32
33
44 MirRunner(
int argc,
char const* argv[],
char const* config_file);
58 std::initializer_list<
int> signals,
59 std::function<
void(
int)>
const& handler);
66 std::function<
void(
int)>
const& handler)
78 auto run_with(std::initializer_list<std::function<
void(::
mir::Server&)>> options) ->
int;
109 std::unique_ptr<Self>
const self;
Definition: optional_value.h:27
Runner for applying initialization options to Mir.
Definition: runner.h:41
MirRunner(int argc, char const *argv[])
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 w...
auto run_with(std::initializer_list< std::function< void(::mir::Server &)> > options) -> int
Apply the supplied initialization options and run the Mir server.
auto register_fd_handler(mir::Fd fd, std::function< void(int)> const &handler) -> std::unique_ptr< miral::FdHandle >
Add a watch on a file descriptor. The handler will be triggered when there is data to read on the Fd.
void add_start_callback(std::function< void()> const &start_callback)
Add a callback to be invoked when the server has started, If multiple callbacks are added they will b...
auto config_file() const -> std::string
Name of the .config file. The .config file is located via the XDG Base Directory Specification: $XDG_...
auto x11_display() const -> mir::optional_value< std::string >
Get the X11 socket name (if any) usable as a $DISPLAY value.
MirRunner(int argc, char const *argv[], char const *config_file)
void stop()
Tell the Mir server to exit.
void set_exception_handler(std::function< void()> const &handler)
Set a handler for exceptions caught in run_with(). run_with() invokes handler() in catch (....
void register_signal_handler(std::initializer_list< int > signals, std::function< void(int)> const &handler)
Add signal handler to the server's main loop.
auto wayland_display() const -> mir::optional_value< std::string >
Get the Wayland endpoint name (if any) usable as a $WAYLAND_DISPLAY value.
auto display_config_file() const -> std::string
Name of the .display configuration file. The .display file is located via the XDG Base Directory Spec...
Mir Abstraction Layer.
Definition: runner.h:35
A handle which keeps a file descriptor registered to the main loop until it is dropped.
Definition: runner.h:37