This repository has been archived by the owner on Oct 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
x11_kiosk_window_manager.h
50 lines (40 loc) · 2.03 KB
/
x11_kiosk_window_manager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* Copyright © 2016-2020 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 <http://www.gnu.org/licenses/>.
*
* Authored By: Alan Griffiths <[email protected]>
*/
#ifndef MIRAL_X11_KIOSK_WINDOW_MANAGER_H
#define MIRAL_X11_KIOSK_WINDOW_MANAGER_H
#include <miral/canonical_window_manager.h>
#include <mir_toolkit/events/enums.h>
using namespace mir::geometry;
class X11KioskWindowManagerPolicy : public miral::CanonicalWindowManagerPolicy
{
public:
using miral::CanonicalWindowManagerPolicy::CanonicalWindowManagerPolicy;
auto place_new_window(miral::ApplicationInfo const& app_info, miral::WindowSpecification const& request)
-> miral::WindowSpecification 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_drag_and_drop(miral::WindowInfo& window_info) 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;
auto confirm_placement_on_display(const miral::WindowInfo& window_info, MirWindowState new_state,
Rectangle const& new_placement) -> Rectangle override;
};
#endif /* MIRAL_X11_KIOSK_WINDOW_MANAGER_H */