Mir
canonical_window_manager.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2015-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_CANONICAL_WINDOW_MANAGER_H_
20 #define MIRAL_CANONICAL_WINDOW_MANAGER_H_
21 
24 
25 namespace miral
26 {
29 {
30 public:
31 
33 
34  virtual auto place_new_window(
35  ApplicationInfo const& app_info,
36  WindowSpecification const& request_parameters)
37  -> WindowSpecification override;
38 
40  void handle_window_ready(WindowInfo& window_info) override;
41 
43  void handle_modify_window(WindowInfo& window_info, WindowSpecification const& modifications) override;
44 
46  void handle_raise_window(WindowInfo& window_info) override;
47 
50  void handle_request_drag_and_drop(WindowInfo& window_info) override;
51 
53  void advise_focus_gained(WindowInfo const& info) override;
54 
56  auto confirm_inherited_move(WindowInfo const& window_info, Displacement movement) -> Rectangle override;
57 
59  WindowInfo const& window_info,
60  MirWindowState new_state,
61  Rectangle const& new_placement) -> Rectangle override;
62 
63 protected:
65 };
66 }
67 
68 #endif /* MIRAL_CANONICAL_WINDOW_MANAGER_H_ */
Widely accepted defaults for window management.
Definition: canonical_window_manager.h:29
WindowManagerTools tools
Definition: canonical_window_manager.h:64
CanonicalWindowManagerPolicy(WindowManagerTools const &tools)
auto confirm_placement_on_display(WindowInfo const &window_info, MirWindowState new_state, Rectangle const &new_placement) -> Rectangle override
Confirm (and optionally adjust) the placement of a window on the display.
void handle_request_drag_and_drop(WindowInfo &window_info) override
request from client to initiate drag and drop
virtual auto place_new_window(ApplicationInfo const &app_info, WindowSpecification const &request_parameters) -> WindowSpecification override
Customize initial window placement.
void advise_focus_gained(WindowInfo const &info) override
Raises the window (and any children)
void handle_modify_window(WindowInfo &window_info, WindowSpecification const &modifications) override
Applies the requested modifications.
void handle_raise_window(WindowInfo &window_info) override
Tries to focus on the newly ready window.
auto confirm_inherited_move(WindowInfo const &window_info, Displacement movement) -> Rectangle override
Move the child window with the parent.
void handle_window_ready(WindowInfo &window_info) override
Tries to focus on the newly ready window.
The interface through which the window management policy is determined.
Definition: window_management_policy.h:47
Window management functions for querying and updating MirAL's model.
Definition: window_manager_tools.h:59
Definition: window_specification.h:44
MirWindowState
Definition: common.h:142
Mir Abstraction Layer.
Definition: floating_window_manager.h:29
Definition: displacement.h:34
Definition: rectangle.h:34
Definition: application_info.h:32
Definition: window_info.h:33

Copyright © 2012-2022 Canonical Ltd.
Generated on Fri Nov 11 11:01:41 UTC 2022
This documentation is licensed under the GPL version 2 or 3.