.. _program_listing_file_include_miral_miral_bounce_keys.h: Program Listing for File bounce_keys.h ====================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/miral/miral/bounce_keys.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_BOUNCE_KEYS_H #define MIRAL_BOUNCE_KEYS_H #include #include #include #include namespace mir { class Server; } namespace miral { namespace live_config { class Store; } class BounceKeys { public: static auto enabled() -> BounceKeys; static auto disabled() -> BounceKeys; explicit BounceKeys(live_config::Store& config_store); void operator()(mir::Server&); BounceKeys& enable(); BounceKeys& disable(); BounceKeys& delay(std::chrono::milliseconds); BounceKeys& on_press_rejected(std::function&&); private: struct Self; BounceKeys(std::shared_ptr self); std::shared_ptr const self; }; } #endif // MIRAL_BOUNCE_KEYS_H