19 #ifndef MIRAL_WINDOW_MANAGER_TOOLS_H 20 #define MIRAL_WINDOW_MANAGER_TOOLS_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;
152 void focus_next_application();
155 void focus_next_within_application();
158 void focus_prev_within_application();
167 void raise_tree(
Window const& root);
176 void start_drag_and_drop(
WindowInfo& window_info, std::vector<uint8_t>
const& handle);
179 void end_drag_and_drop();
194 auto create_workspace() -> std::shared_ptr<Workspace>;
201 void add_tree_to_workspace(
Window const& window, std::shared_ptr<Workspace>
const& workspace);
208 void remove_tree_from_workspace(
Window const& window, std::shared_ptr<Workspace>
const& workspace);
215 void move_workspace_content_to_workspace(
216 std::shared_ptr<Workspace>
const& to_workspace,
217 std::shared_ptr<Workspace>
const& from_workspace);
225 void for_each_workspace_containing(
227 std::function<
void(std::shared_ptr<Workspace>
const& workspace)>
const& callback);
235 void for_each_window_in_workspace(
236 std::shared_ptr<Workspace>
const& workspace,
237 std::function<
void(
Window const& window)>
const& callback);
247 void invoke_under_lock(std::function<
void()>
const& callback);
250 WindowManagerToolsImplementation* tools;
254 #endif //MIRAL_WINDOW_MANAGER_TOOLS_H AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time...
Definition: blob.h:26
Definition: application_info.h:31
Definition: window_info.h:32
Definition: window_specification.h:43
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
Definition: displacement.h:32
Definition: rectangle.h:33
Mir Abstraction Layer.
Definition: add_init_callback.h:26