summaryrefslogtreecommitdiff
path: root/include/sway/desktop/launcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/desktop/launcher.h')
-rw-r--r--include/sway/desktop/launcher.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/sway/desktop/launcher.h b/include/sway/desktop/launcher.h
new file mode 100644
index 00000000..3b577f74
--- /dev/null
+++ b/include/sway/desktop/launcher.h
@@ -0,0 +1,32 @@
+#ifndef _SWAY_LAUNCHER_H
+#define _SWAY_LAUNCHER_H
+
+#include <stdlib.h>
+
+struct launcher_ctx {
+ pid_t pid;
+ char *name;
+ struct wlr_xdg_activation_token_v1 *token;
+ struct wl_listener token_destroy;
+
+ bool activated;
+
+ struct sway_node *node;
+ struct wl_listener node_destroy;
+
+ struct wl_list link; // sway_server::pending_launcher_ctxs
+};
+
+struct launcher_ctx *launcher_ctx_find_pid(pid_t pid);
+
+struct sway_workspace *launcher_ctx_get_workspace(struct launcher_ctx *ctx);
+
+void launcher_ctx_consume(struct launcher_ctx *ctx);
+
+void launcher_ctx_destroy(struct launcher_ctx *ctx);
+
+struct launcher_ctx *launcher_ctx_create(void);
+
+const char *launcher_ctx_get_token_name(struct launcher_ctx *ctx);
+
+#endif