Mir
canonical_window_manager_policy.h
Go to the documentation of this file.
1 /*
2  * Copyright © 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,
6  * as 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 MIR_TEST_FRAMEWORK_CANONICAL_WINDOW_MANAGER_POLICY_H
20 #define MIR_TEST_FRAMEWORK_CANONICAL_WINDOW_MANAGER_POLICY_H
21 
23 
24 namespace mir_test_framework
25 {
27 {
29 
30  bool handle_keyboard_event(MirKeyboardEvent const*) override { return false; }
31 
32  bool handle_pointer_event(MirPointerEvent const*) override { return false; }
33 
34  bool handle_touch_event(MirTouchEvent const*) override { return false; }
35 
37  miral::WindowInfo const&,
39  mir::geometry::Rectangle const& new_placement)
40  {
41  return new_placement;
42  }
43 };
44 }
45 
46 #endif //MIR_TEST_FRAMEWORK_CANONICAL_WINDOW_MANAGER_POLICY_H
CanonicalWindowManagerPolicy(WindowManagerTools const &tools)
struct MirPointerEvent MirPointerEvent
An event type describing a change in pointer device state.
Definition: pointer_event.h:35
Definition: canonical_window_manager_policy.h:26
Widely accepted defaults for window management.
Definition: canonical_window_manager.h:28
Definition: window_info.h:32
struct MirTouchEvent MirTouchEvent
An event type describing a change in touch device state.
Definition: touch_event.h:33
bool handle_touch_event(MirTouchEvent const *) override
touch event handler
Definition: canonical_window_manager_policy.h:34
struct MirKeyboardEvent MirKeyboardEvent
An event type describing a change in keyboard state.
Definition: keyboard_event.h:41
Definition: any_surface.h:25
Definition: rectangle.h:33
bool handle_keyboard_event(MirKeyboardEvent const *) override
keyboard event handler
Definition: canonical_window_manager_policy.h:30
MirWindowState
Definition: common.h:139
mir::geometry::Rectangle confirm_placement_on_display(miral::WindowInfo const &, MirWindowState, mir::geometry::Rectangle const &new_placement)
Confirm (and optionally adjust) the placement of a window on the display.
Definition: canonical_window_manager_policy.h:36
bool handle_pointer_event(MirPointerEvent const *) override
pointer event handler
Definition: canonical_window_manager_policy.h:32

Copyright © 2012-2018 Canonical Ltd.
Generated on Sat Mar 31 14:22:42 UTC 2018