feat: allow applets to be shared modules

This commit is contained in:
2026-04-24 14:50:08 +02:00
parent 00c3e37ecf
commit 58d2e773fd
14 changed files with 405 additions and 10 deletions
@@ -0,0 +1,37 @@
/*
* desktop_applet.hpp
* Shared-library desktop applet ABI for MontaukOS
* Copyright (c) 2026 Daniel Hammer
*/
#pragma once
#include <cstdint>
namespace gui::desktop_applet {
inline constexpr uint32_t ABI_VERSION = 1;
inline constexpr uint32_t CAP_SYSTEM_CONFIGURATION = 1u << 0;
struct Host {
char current_user[32];
char home_dir[128];
char user_config_dir[128];
bool is_admin;
};
struct Descriptor {
uint32_t abi_version;
uint32_t capabilities;
const char* applet_id;
const char* display_name;
const char* icon_path;
};
using QueryFn = const Descriptor* (*)();
using OpenFn = bool (*)(const Host* host);
inline constexpr const char* QUERY_SYMBOL = "desktop_applet_query_v1";
inline constexpr const char* OPEN_SYMBOL = "desktop_applet_open_v1";
} // namespace gui::desktop_applet