aboutsummaryrefslogtreecommitdiffstats
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.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/sway/desktop/launcher.h b/include/sway/desktop/launcher.h
new file mode 100644
index 00000000..b7716e82
--- /dev/null
+++ b/include/sway/desktop/launcher.h
@@ -0,0 +1,36 @@
1#ifndef _SWAY_LAUNCHER_H
2#define _SWAY_LAUNCHER_H
3
4#include <stdlib.h>
5#include <wayland-server-core.h>
6
7struct launcher_ctx {
8 pid_t pid;
9 char *fallback_name;
10 struct wlr_xdg_activation_token_v1 *token;
11 struct wl_listener token_destroy;
12
13 bool activated;
14
15 struct sway_node *node;
16 struct wl_listener node_destroy;
17
18 struct wl_list link; // sway_server::pending_launcher_ctxs
19};
20
21struct launcher_ctx *launcher_ctx_find_pid(pid_t pid);
22
23struct sway_workspace *launcher_ctx_get_workspace(struct launcher_ctx *ctx);
24
25void launcher_ctx_consume(struct launcher_ctx *ctx);
26
27void launcher_ctx_destroy(struct launcher_ctx *ctx);
28
29struct launcher_ctx *launcher_ctx_create_internal(void);
30
31struct launcher_ctx *launcher_ctx_create(
32 struct wlr_xdg_activation_token_v1 *token, struct sway_node *node);
33
34const char *launcher_ctx_get_token_name(struct launcher_ctx *ctx);
35
36#endif