.. _program_listing_file_include_miral_miral_runner.h: Program Listing for File runner.h ================================= |exhale_lsh| :ref:`Return to documentation for file ` (``include/miral/miral/runner.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* * Copyright © Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 or 3 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef MIRAL_RUNNER_H #define MIRAL_RUNNER_H #include "mir/optional_value.h" #include "mir/fd.h" #include #include #include namespace mir { class Server; } namespace miral { struct FdHandle { public: virtual ~FdHandle(); }; class MirRunner { public: MirRunner(int argc, char const* argv[]); MirRunner(int argc, char const* argv[], char const* config_file); ~MirRunner(); void add_start_callback(std::function const& start_callback); void add_stop_callback(std::function const& stop_callback); void register_signal_handler( std::initializer_list signals, std::function const& handler); auto register_fd_handler( mir::Fd fd, std::function const& handler) -> std::unique_ptr; void set_exception_handler(std::function const& handler); auto run_with(std::initializer_list> options) -> int; void stop(); auto config_file() const -> std::string; auto display_config_file() const -> std::string; auto wayland_display() const -> mir::optional_value; auto x11_display() const -> mir::optional_value; private: MirRunner(MirRunner const&) = delete; MirRunner& operator=(MirRunner const&) = delete; struct Self; std::unique_ptr const self; }; } #endif //MIRAL_RUNNER_H