summaryrefslogtreecommitdiff
path: root/src/common/desktop.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/desktop.h')
-rw-r--r--src/common/desktop.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/desktop.h b/src/common/desktop.h
new file mode 100644
index 0000000..9af5952
--- /dev/null
+++ b/src/common/desktop.h
@@ -0,0 +1,19 @@
+#ifndef YASL_COMMON_DESKTOP_H
+#define YASL_COMMON_DESKTOP_H
+
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+
+/* Operating-system desktop services behind yasl/desktop.h. Common code
+ * validates arguments first. Path and locale functions write a NUL-terminated
+ * string to buf and return its length, or zero on failure or when it does not
+ * fit in cap. */
+bool desktop_open_uri(const char *uri);
+bool desktop_notify(const char *app_id, const char *title, const char *body);
+uint32_t desktop_appearance(void);
+size_t desktop_executable_path(char *buf, size_t cap);
+size_t desktop_resource_dir(char *buf, size_t cap);
+size_t desktop_default_locale(char *buf, size_t cap);
+
+#endif