blob: 23f2b2c467b488044887ca2a078c1890fe9965e0 [file] [log] [blame]
Giulio Camuffo26f62d42016-06-02 21:48:09 +03001/*
2 * Copyright © 2016 Giulio Camuffo
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial
14 * portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
24 */
25
26#ifndef WESTON_H
27#define WESTON_H
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
Pekka Paalanen3d5d9472019-03-28 16:28:47 +020033#include <libweston/libweston.h>
Pekka Paalanen1c0d04b2019-04-18 13:54:38 +030034#include <libweston/config-parser.h>
Giulio Camuffo26f62d42016-06-02 21:48:09 +030035
36void
37screenshooter_create(struct weston_compositor *ec);
38
Giulio Camuffofba27fb2016-06-02 21:48:10 +030039struct weston_process;
40typedef void (*weston_process_cleanup_func_t)(struct weston_process *process,
41 int status);
42
43struct weston_process {
44 pid_t pid;
45 weston_process_cleanup_func_t cleanup;
46 struct wl_list link;
47};
48
49struct wl_client *
50weston_client_launch(struct weston_compositor *compositor,
51 struct weston_process *proc,
52 const char *path,
53 weston_process_cleanup_func_t cleanup);
54
55struct wl_client *
56weston_client_start(struct weston_compositor *compositor, const char *path);
57
58void
Alvarito0505061f57a1f2021-06-29 14:33:04 -030059wet_watch_process(struct weston_compositor *compositor,
60 struct weston_process *process);
Giulio Camuffofba27fb2016-06-02 21:48:10 +030061
Giulio Camuffod52f3b72016-06-02 21:48:11 +030062struct weston_config *
63wet_get_config(struct weston_compositor *compositor);
64
Giulio Camuffo179fcda2016-06-02 21:48:14 +030065void *
Quentin Glidic8af2bec2016-12-02 14:21:46 +010066wet_load_module_entrypoint(const char *name, const char *entrypoint);
67
68int
Quentin Glidicda01c1d2016-12-02 14:17:08 +010069wet_shell_init(struct weston_compositor *ec,
70 int *argc, char *argv[]);
71int
Quentin Glidic8af2bec2016-12-02 14:21:46 +010072wet_module_init(struct weston_compositor *ec,
73 int *argc, char *argv[]);
74int
75wet_load_module(struct weston_compositor *compositor,
76 const char *name, int *argc, char *argv[]);
Giulio Camuffo179fcda2016-06-02 21:48:14 +030077
Giulio Camuffo9c764df2016-06-29 11:54:27 +020078int
Quentin Glidic3d7ca3b2016-12-02 14:20:35 +010079module_init(struct weston_compositor *compositor,
80 int *argc, char *argv[]);
81
Daniel Stonee03c1112016-11-24 20:45:45 +000082char *
Marius Vlad64fbd0f2018-12-15 15:51:57 +020083wet_get_libexec_path(const char *name);
84
85char *
86wet_get_bindir_path(const char *name);
Daniel Stonee03c1112016-11-24 20:45:45 +000087
Quentin Glidic3d7ca3b2016-12-02 14:20:35 +010088int
Giulio Camuffo9c764df2016-06-29 11:54:27 +020089wet_load_xwayland(struct weston_compositor *comp);
90
Quentin Glidic46dc9b42016-08-18 11:15:44 +020091struct text_backend;
92
93struct text_backend *
94text_backend_init(struct weston_compositor *ec);
95
96void
97text_backend_destroy(struct text_backend *text_backend);
98
Pekka Paalanen19d31dd2021-03-01 11:24:59 +020099/*
100 * Return value from wet_main() when
101 * weston_testsuite_quirks::required_capabilities are not met.
102 */
103#define WET_MAIN_RET_MISSING_CAPS 77
104
Pekka Paalanenb35c21f2019-07-08 17:12:41 +0300105int
Leandro Ribeiro32a5acd2020-10-19 16:06:22 -0300106wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_data);
Pekka Paalanenb35c21f2019-07-08 17:12:41 +0300107
Giulio Camuffo26f62d42016-06-02 21:48:09 +0300108#ifdef __cplusplus
109}
110#endif
111
112#endif