MirAL
workspace_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 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 MIRAL_WORKSPACE_POLICY_H
20 #define MIRAL_WORKSPACE_POLICY_H
21 
22 #include "miral/version.h"
23 
24 #include <memory>
25 #include <vector>
26 
27 namespace miral
28 {
29 class Window;
30 
35 class Workspace;
36 
47 {
48 public:
62  virtual void advise_adding_to_workspace(
63  std::shared_ptr<Workspace> const& workspace,
64  std::vector<Window> const& windows);
65 
73  virtual void advise_removing_from_workspace(
74  std::shared_ptr<Workspace> const& workspace,
75  std::vector<Window> const& windows);
76 
79  virtual ~WorkspacePolicy() = default;
80  WorkspacePolicy() = default;
81  WorkspacePolicy(WorkspacePolicy const&) = delete;
82  WorkspacePolicy& operator=(WorkspacePolicy const&) = delete;
83 };
84 #if MIRAL_VERSION >= MIR_VERSION_NUMBER(2, 0, 0)
85 #error "We've presumably broken ABI - please roll this interface into WindowManagementPolicy"
86 #endif
87 }
88 #endif //MIRAL_WORKSPACE_POLICY_H
virtual ~WorkspacePolicy()=default
WorkspacePolicy & operator=(WorkspacePolicy const &)=delete
virtual void advise_removing_from_workspace(std::shared_ptr< Workspace > const &workspace, std::vector< Window > const &windows)
Notification that windows are being removed from a workspace.
Advise changes to workspaces.
Definition: workspace_policy.h:46
Mir Abstraction Layer.
Definition: active_outputs.h:27
virtual void advise_adding_to_workspace(std::shared_ptr< Workspace > const &workspace, std::vector< Window > const &windows)
Notification that windows are being added to a workspace.

Copyright © 2016 Canonical Ltd.
Generated on Thu Mar 30 14:25:04 UTC 2017