// SPDX-License-Identifier: GPL-3.0-only #pragma once #include "modern/ui/catalog.hpp" namespace bmh::modern_ui { struct WidgetDefinition { std::string id, name; std::vector> sizes; }; const std::vector &widget_definitions(); Json desktop_warning_definitions(); const std::vector &desktop_routes(); // These operations stage the whole layout. Failed placement leaves it // untouched. Json default_desktop(); bool valid_desktop(const Json &); // Add new applications to a valid older view without moving existing objects. bool migrate_desktop(Json &); bool place_desktop_object(Json &, const std::string &, int x, int y, bool nearest = true); bool resize_desktop_widget(Json &, const std::string &, int columns, int rows); bool arrange_desktop(Json &); bool set_desktop_grid(Json &, bool); bool add_desktop_widget(Json &, const std::string &, int columns, int rows); } // namespace bmh::modern_ui