19 #ifndef MIRAL_WINDOW_MANAGER_TOOLS_H 20 #define MIRAL_WINDOW_MANAGER_TOOLS_H 25 #include <mir/geometry/displacement.h> 32 namespace scene {
class Surface; }
39 struct ApplicationInfo;
40 class WindowSpecification;
55 class WindowManagerToolsImplementation;
76 auto count_applications()
const ->
unsigned int;
82 void for_each_application(std::function<
void(
ApplicationInfo& info)>
const& functor);
89 auto find_application(std::function<
bool(
ApplicationInfo const& info)>
const& predicate)
97 auto info_for(std::weak_ptr<mir::scene::Session>
const& session)
const ->
ApplicationInfo&;
104 auto info_for(std::weak_ptr<mir::scene::Surface>
const& surface)
const ->
WindowInfo&;
119 auto info_for_window_id(std::string
const&
id)
const ->
WindowInfo&;
126 auto id_for_window(
Window const& window)
const -> std::string;
129 void ask_client_to_close(
Window const& window);
133 void force_close(
Window const& window);
136 auto active_window()
const ->
Window;
143 auto select_active_window(
Window const& hint) ->
Window;
146 void drag_active_window(mir::geometry::Displacement movement);
149 void drag_window(
Window const& window, mir::geometry::Displacement movement);
152 void focus_next_application();
155 void focus_next_within_application();
158 void focus_prev_within_application();
161 auto window_at(mir::geometry::Point cursor)
const ->
Window;
164 auto active_display() -> mir::geometry::Rectangle
const;
167 void raise_tree(
Window const& root);
182 auto create_workspace() -> std::shared_ptr<Workspace>;
189 void add_tree_to_workspace(
Window const& window, std::shared_ptr<Workspace>
const& workspace);
196 void remove_tree_from_workspace(
Window const& window, std::shared_ptr<Workspace>
const& workspace);
203 void move_workspace_content_to_workspace(
204 std::shared_ptr<Workspace>
const& to_workspace,
205 std::shared_ptr<Workspace>
const& from_workspace);
213 void for_each_workspace_containing(
215 std::function<
void(std::shared_ptr<Workspace>
const& workspace)>
const& callback);
223 void for_each_window_in_workspace(
224 std::shared_ptr<Workspace>
const& workspace,
225 std::function<
void(
Window const& window)>
const& callback);
235 void invoke_under_lock(std::function<
void()>
const& callback);
238 WindowManagerToolsImplementation* tools;
242 #endif //MIRAL_WINDOW_MANAGER_TOOLS_H Definition: connection.h:26
Definition: application_info.h:31
Definition: window_info.h:32
Definition: window_specification.h:45
Handle class to manage a Mir surface. It may be null (e.g. default initialized)
Definition: window.h:37
std::shared_ptr< mir::scene::Session > Application
Definition: application.h:34
Mir Abstraction Layer.
Definition: active_outputs.h:27