Mir
kiosk_window_manager.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016-2017 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 
26 using namespace mir::geometry;
27 
29 {
30 public:
31  KioskWindowManagerPolicy(miral::WindowManagerTools const& tools, SwSplash 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  SwSplash const splash;
60 };
61 
62 #endif /* MIRAL_KIOSK_WINDOW_MANAGER_H */
Definition: input_event.h:49
MirResizeEdge
Hints for resizing a window.
Definition: common.h:409
struct MirPointerEvent MirPointerEvent
An event type describing a change in pointer device state.
Definition: pointer_event.h:35
Definition: application_info.h:31
Definition: input_event.h:60
Widely accepted defaults for window management.
Definition: canonical_window_manager.h:28
Definition: window_info.h:32
Definition: window_specification.h:43
struct MirTouchEvent MirTouchEvent
An event type describing a change in touch device state.
Definition: touch_event.h:33
Definition: input_event.h:52
Window management functions for querying and updating MirAL&#39;s model.
Definition: window_manager_tools.h:58
struct MirKeyboardEvent MirKeyboardEvent
An event type describing a change in keyboard state.
Definition: keyboard_event.h:41
Definition: rectangle.h:33
struct MirInputEvent MirInputEvent
Definition: event.h:70
Definition: input_event.h:55
Basic geometry types. Types for dimensions, displacements, etc. and the operations that they support...
Definition: dimensions.h:30
Definition: input_event.h:57
MirWindowState
Definition: common.h:139
Definition: kiosk_window_manager.h:28

Copyright © 2012-2018 Canonical Ltd.
Generated on Sun Jun 17 06:26:29 UTC 2018