.. _program_listing_file_examples_miral-kiosk_kiosk_window_manager.h: Program Listing for File kiosk_window_manager.h =============================================== |exhale_lsh| :ref:`Return to documentation for file ` (``examples/miral-kiosk/kiosk_window_manager.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_KIOSK_WINDOW_MANAGER_H #define MIRAL_KIOSK_WINDOW_MANAGER_H #include "sw_splash.h" #include #include using namespace mir::geometry; class KioskWindowManagerPolicy : public miral::CanonicalWindowManagerPolicy { public: KioskWindowManagerPolicy(miral::WindowManagerTools const& tools, std::shared_ptr const&); auto place_new_window(miral::ApplicationInfo const& app_info, miral::WindowSpecification const& request) -> miral::WindowSpecification override; void advise_focus_gained(miral::WindowInfo const& info) override; bool handle_keyboard_event(MirKeyboardEvent const* event) override; bool handle_touch_event(MirTouchEvent const* event) override; bool handle_pointer_event(MirPointerEvent const* event) override; void handle_modify_window(miral::WindowInfo& window_info, miral::WindowSpecification const& modifications) override; void handle_request_move(miral::WindowInfo& window_info, MirInputEvent const* input_event) override; void handle_request_resize(miral::WindowInfo& window_info, MirInputEvent const* input_event, MirResizeEdge edge) override; Rectangle confirm_placement_on_display(const miral::WindowInfo& window_info, MirWindowState new_state, Rectangle const& new_placement) override; private: static const int modifier_mask = mir_input_event_modifier_alt | mir_input_event_modifier_shift | mir_input_event_modifier_sym | mir_input_event_modifier_ctrl | mir_input_event_modifier_meta; std::shared_ptr const splash; }; #endif /* MIRAL_KIOSK_WINDOW_MANAGER_H */