feat: allow applets to be shared modules
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* libprintersapplet.cpp
|
||||
* Shared desktop applet that launches the Printers configuration tool
|
||||
* Copyright (c) 2026 Daniel Hammer
|
||||
*/
|
||||
|
||||
#include <gui/desktop_applet.hpp>
|
||||
#include <montauk/syscall.h>
|
||||
|
||||
using gui::desktop_applet::Descriptor;
|
||||
using gui::desktop_applet::Host;
|
||||
|
||||
static constexpr Descriptor kAppletDescriptor = {
|
||||
gui::desktop_applet::ABI_VERSION,
|
||||
gui::desktop_applet::CAP_SYSTEM_CONFIGURATION,
|
||||
"printers",
|
||||
"Printers",
|
||||
"0:/icons/printer.svg",
|
||||
};
|
||||
|
||||
extern "C" const Descriptor* desktop_applet_query_v1() {
|
||||
return &kAppletDescriptor;
|
||||
}
|
||||
|
||||
extern "C" bool desktop_applet_open_v1(const Host* host) {
|
||||
(void)host;
|
||||
return montauk::spawn("0:/apps/printers/printers.elf") >= 0;
|
||||
}
|
||||
Reference in New Issue
Block a user