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  * Authored By: Alan Griffiths <alan@octopull.co.uk>
17  */
18 
19 #ifndef MIRAL_KIOSK_WINDOW_MANAGER_H
20 #define MIRAL_KIOSK_WINDOW_MANAGER_H
21 
22 #include "sw_splash.h"
23 
25 
27 
28 using namespace mir::geometry;
29 
31 {
32 public:
33  KioskWindowManagerPolicy(miral::WindowManagerTools const& tools, std::shared_ptr<SplashSession> const&);
34 
35  auto place_new_window(miral::ApplicationInfo const& app_info, miral::WindowSpecification const& request)
36  -> miral::WindowSpecification override;
37 
38  void advise_focus_gained(miral::WindowInfo const& info) override;
39 
40  bool handle_keyboard_event(MirKeyboardEvent const* event) override;
41  bool handle_touch_event(MirTouchEvent const* event) override;
42  bool handle_pointer_event(MirPointerEvent const* event) override;
43  void handle_modify_window(miral::WindowInfo& window_info, miral::WindowSpecification const& modifications) override;
44 
45  void handle_request_drag_and_drop(miral::WindowInfo& window_info) override;
46  void handle_request_move(miral::WindowInfo& window_info, MirInputEvent const* input_event) override;
47  void handle_request_resize(miral::WindowInfo& window_info, MirInputEvent const* input_event,
48  MirResizeEdge edge) override;
49 
50  Rectangle confirm_placement_on_display(const miral::WindowInfo& window_info, MirWindowState new_state,
51  Rectangle const& new_placement) override;
52 
53 private:
54  static const int modifier_mask =
60 
61  std::shared_ptr<SplashSession> const splash;
62 };
63 
64 #endif /* MIRAL_KIOSK_WINDOW_MANAGER_H */
Definition: kiosk_window_manager.h:31
Widely accepted defaults for window management.
Definition: canonical_window_manager.h:29
Window management functions for querying and updating MirAL's model.
Definition: window_manager_tools.h:60
Definition: window_specification.h:44
MirResizeEdge
Hints for resizing a window.
Definition: common.h:347
struct MirPointerEvent MirPointerEvent
An event type describing a change in pointer device state.
Definition: pointer_event.h:35
MirWindowState
Definition: common.h:88
struct MirKeyboardEvent MirKeyboardEvent
An event type describing a change in keyboard state.
Definition: keyboard_event.h:41
struct MirInputEvent MirInputEvent
Definition: event.h:42
struct MirTouchEvent MirTouchEvent
An event type describing a change in touch device state.
Definition: touch_event.h:33
@ mir_input_event_modifier_ctrl
Definition: enums.h:78
@ mir_input_event_modifier_meta
Definition: enums.h:81
@ mir_input_event_modifier_alt
Definition: enums.h:70
@ mir_input_event_modifier_shift
Definition: enums.h:73
@ mir_input_event_modifier_sym
Definition: enums.h:76
Basic geometry types. Types for dimensions, displacements, etc. and the operations that they support.
Definition: dimensions.h:31
Definition: rectangle.h:34
Definition: application_info.h:32
Definition: window_info.h:33

Copyright © 2012-2021 Canonical Ltd.
Generated on Fri Jun 11 07:44:02 UTC 2021
This documentation is licensed under the GPL version 2 or 3.