diff --git a/repos/gems/recipes/pkg/sculpt/archives b/repos/gems/recipes/pkg/sculpt/archives index dcc769efb1..21c673f1d6 100644 --- a/repos/gems/recipes/pkg/sculpt/archives +++ b/repos/gems/recipes/pkg/sculpt/archives @@ -3,6 +3,7 @@ _/pkg/wifi _/pkg/depot_download _/pkg/terminal _/src/report_rom +_/src/clipboard _/src/init _/src/ram_fs _/src/fs_rom diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run index fd806d4cdc..d68b619301 100644 --- a/repos/gems/run/sculpt.run +++ b/repos/gems/run/sculpt.run @@ -61,6 +61,7 @@ install_config { + @@ -112,6 +113,7 @@ install_config { + @@ -369,6 +371,19 @@ install_config { + + + + + + + + + + + + + @@ -442,6 +457,12 @@ install_config { + + + + + + diff --git a/repos/gems/run/sculpt/clipboard.config b/repos/gems/run/sculpt/clipboard.config new file mode 100644 index 0000000000..927904e419 --- /dev/null +++ b/repos/gems/run/sculpt/clipboard.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/repos/gems/run/sculpt/fonts.config b/repos/gems/run/sculpt/fonts.config index b0623a1ce0..f0cf4f7fa4 100644 --- a/repos/gems/run/sculpt/fonts.config +++ b/repos/gems/run/sculpt/fonts.config @@ -1,4 +1,4 @@ - + diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index 3eec7ef5c2..a39a4b65b4 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -930,6 +930,8 @@ void Sculpt::Main::_handle_nitpicker_mode() _gui.font_size(text_size); _fonts_config.generate([&] (Xml_generator &xml) { + xml.attribute("copy", true); + xml.attribute("paste", true); xml.node("vfs", [&] () { gen_named_node(xml, "rom", "Vera.ttf"); gen_named_node(xml, "rom", "VeraMono.ttf"); diff --git a/repos/gems/src/app/sculpt_manager/model/route.h b/repos/gems/src/app/sculpt_manager/model/route.h index e24a39e178..6655a6d61e 100644 --- a/repos/gems/src/app/sculpt_manager/model/route.h +++ b/repos/gems/src/app/sculpt_manager/model/route.h @@ -122,8 +122,13 @@ struct Sculpt::Route : List_model::Element gen_named_node(xml, "service", Service::name_attr(required), [&] () { - if (required_label.valid()) - xml.attribute("label", required_label); + if (required_label.valid()) { + + if (selected_service->match_label == Service::Match_label::LAST) + xml.attribute("label_last", required_label); + else + xml.attribute("label", required_label); + } selected_service->gen_xml(xml); }); diff --git a/repos/gems/src/app/sculpt_manager/model/runtime_config.h b/repos/gems/src/app/sculpt_manager/model/runtime_config.h index fa1ea58da5..82f5836c17 100644 --- a/repos/gems/src/app/sculpt_manager/model/runtime_config.h +++ b/repos/gems/src/app/sculpt_manager/model/runtime_config.h @@ -324,6 +324,9 @@ class Sculpt::Runtime_config _pf_info { _r, Type::ROM, "platform information", "platform_info" }, _system { _r, Type::ROM, "system status", "config -> system" }, _report { _r, Type::REPORT, "system reports" }, + _shape { _r, Type::REPORT, "pointer shape", "shape", Service::Match_label::LAST }, + _copy { _r, Type::REPORT, "global clipboard", "clipboard", Service::Match_label::LAST }, + _paste { _r, Type::ROM, "global clipboard", "clipboard", Service::Match_label::LAST }, _rm { _r, Type::RM, "custom virtual memory objects" }, _io_mem { _r, Type::IO_MEM, "raw hardware access" }, _io_port { _r, Type::IO_PORT, "raw hardware access" }, diff --git a/repos/gems/src/app/sculpt_manager/model/service.h b/repos/gems/src/app/sculpt_manager/model/service.h index c117d6d5ba..0267b6e2c1 100644 --- a/repos/gems/src/app/sculpt_manager/model/service.h +++ b/repos/gems/src/app/sculpt_manager/model/service.h @@ -29,10 +29,13 @@ struct Sculpt::Service RM, IO_MEM, IO_PORT, IRQ, REPORT, ROM, TERMINAL, TRACE, USB, RTC, PLATFORM, VM, UNDEFINED }; - Start_name server { }; /* invalid for parent service */ - Type type; - Label label; - Info info; + enum class Match_label { EXACT, LAST }; + + Start_name server { }; /* invalid for parent service */ + Type type; + Label label; + Info info; + Match_label match_label { Match_label::EXACT }; /** * Return name attribute value of node @@ -72,8 +75,11 @@ struct Sculpt::Service /** * Constructor for parent service */ - Service(Type type, Info const &info, Label const &label = Label()) - : type(type), label(label), info(info) { } + Service(Type type, Info const &info, Label const &label = Label(), + Match_label match_label = Match_label::EXACT) + : + type(type), label(label), info(info), match_label(match_label) + { } void gen_xml(Xml_generator &xml) const { @@ -84,7 +90,7 @@ struct Sculpt::Service if (!parent) xml.attribute("name", server); - if (label.valid()) + if (label.valid() && match_label == Match_label::EXACT) xml.attribute("label", label); }); } diff --git a/repos/gems/src/app/sculpt_manager/runtime/file_browser.cc b/repos/gems/src/app/sculpt_manager/runtime/file_browser.cc index d720b661e3..7db7fcc13a 100644 --- a/repos/gems/src/app/sculpt_manager/runtime/file_browser.cc +++ b/repos/gems/src/app/sculpt_manager/runtime/file_browser.cc @@ -91,6 +91,11 @@ void Sculpt::gen_terminal_start(Xml_generator &xml, Rom_name const &name, gen_parent_route (xml); gen_parent_route (xml); gen_parent_route (xml); + gen_parent_route(xml); + + gen_named_node(xml, "service", Rom_session::service_name(), [&] () { + xml.attribute("label", "clipboard"); + xml.node("parent", [&] () { }); }); gen_named_node(xml, "service", Rom_session::service_name(), [&] () { xml.attribute("label", "config");