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