Mercurial > minori
view include/sys/x11/settings.h @ 401:2f89797b6a44
filesystem: add linux inotify watcher
I don't really like this, but eh
| author | Paper <paper@tflc.us> |
|---|---|
| date | Fri, 07 Nov 2025 18:28:36 -0500 |
| parents | 99c961c91809 |
| children |
line wrap: on
line source
#ifndef MINORI_SYS_X11_SETTINGS_H_ #define MINORI_SYS_X11_SETTINGS_H_ #include <cstdint> #include <string> #include <vector> namespace x11 { /* stores the item, type, etc */ struct SettingsItem { enum Type { TypeInt = 0, TypeStr = 1, TypeRgba = 2, }; /* could technically be a union */ struct Data { std::int32_t integer; std::string string; struct { std::uint16_t red, green, blue, alpha; } rgba; }; bool VerifyType(); std::uint8_t type; /* one of Type */ std::string name; /* name of the item */ std::uint32_t serial; /* last-changed serial */ Data data; /* type-specific data */ }; bool GetSettings(std::vector<SettingsItem>& settings); bool FindSetting(const std::string& name, SettingsItem& setting); } #endif /* MINORI_SYS_X11_SETTINGS_H_ */
