Mir
kiosk_window_manager.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016-2018 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 2 or 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef MIRAL_KIOSK_WINDOW_MANAGER_H
18 #define MIRAL_KIOSK_WINDOW_MANAGER_H
19 
20 #include "sw_splash.h"
21 
23 
25 
26 using namespace mir::geometry;
27 
29 {
30 public:
31  KioskWindowManagerPolicy(miral::WindowManagerTools const& tools, std::shared_ptr<SplashSession> const&);
32 
33  auto place_new_window(miral::ApplicationInfo const& app_info, miral::WindowSpecification const& request)
34  -> miral::WindowSpecification override;
35 
36  void advise_focus_gained(miral::WindowInfo const& info) override;
37 
38  bool handle_keyboard_event(MirKeyboardEvent const* event) override;
39  bool handle_touch_event(MirTouchEvent const* event) override;
40  bool handle_pointer_event(MirPointerEvent const* event) override;
41  void handle_modify_window(miral::WindowInfo& window_info, miral::WindowSpecification const& modifications) override;
42 
43  void handle_request_drag_and_drop(miral::WindowInfo& window_info) override;
44  void handle_request_move(miral::WindowInfo& window_info, MirInputEvent const* input_event) override;
45  void handle_request_resize(miral::WindowInfo& window_info, MirInputEvent const* input_event,
46  MirResizeEdge edge) override;
47 
48  Rectangle confirm_placement_on_display(const miral::WindowInfo& window_info, MirWindowState new_state,
49  Rectangle const& new_placement) override;
50 
51 private:
52  static const int modifier_mask =
58 
59  std::shared_ptr<SplashSession> const splash;
60 };
61 
62 #endif /* MIRAL_KIOSK_WINDOW_MANAGER_H */
Definition: kiosk_window_manager.h:29
Widely accepted defaults for window management.
Definition: canonical_window_manager.h:27
Window management functions for querying and updating MirAL's model.
Definition: window_manager_tools.h:58
Definition: window_specification.h:42
MirResizeEdge
Hints for resizing a window.
Definition: common.h:331
MirWindowState
Definition: common.h:71
@ mir_input_event_modifier_ctrl
Definition: enums.h:67
@ mir_input_event_modifier_meta
Definition: enums.h:70
@ mir_input_event_modifier_alt
Definition: enums.h:59
@ mir_input_event_modifier_shift
Definition: enums.h:62
@ mir_input_event_modifier_sym
Definition: enums.h:65
Basic geometry types. Types for dimensions, displacements, etc. and the operations that they support.
Definition: dimensions.h:29
Definition: rectangle.h:31
Definition: application_info.h:30
Definition: window_info.h:31

Copyright © 2012-2022 Canonical Ltd.
Generated on śro, 1 cze 2022, 16:52:55 UTC
This documentation is licensed under the GPL version 2 or 3.