Giulio Camuffo | 26f62d4 | 2016-06-02 21:48:09 +0300 | [diff] [blame] | 1 | /* |
| 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 |
| 30 | extern "C" { |
| 31 | #endif |
| 32 | |
Pekka Paalanen | 3d5d947 | 2019-03-28 16:28:47 +0200 | [diff] [blame] | 33 | #include <libweston/libweston.h> |
Pekka Paalanen | 1c0d04b | 2019-04-18 13:54:38 +0300 | [diff] [blame] | 34 | #include <libweston/config-parser.h> |
Giulio Camuffo | 26f62d4 | 2016-06-02 21:48:09 +0300 | [diff] [blame] | 35 | |
| 36 | void |
| 37 | screenshooter_create(struct weston_compositor *ec); |
| 38 | |
Giulio Camuffo | fba27fb | 2016-06-02 21:48:10 +0300 | [diff] [blame] | 39 | struct weston_process; |
| 40 | typedef void (*weston_process_cleanup_func_t)(struct weston_process *process, |
| 41 | int status); |
| 42 | |
| 43 | struct weston_process { |
| 44 | pid_t pid; |
| 45 | weston_process_cleanup_func_t cleanup; |
| 46 | struct wl_list link; |
| 47 | }; |
| 48 | |
| 49 | struct wl_client * |
| 50 | weston_client_launch(struct weston_compositor *compositor, |
| 51 | struct weston_process *proc, |
| 52 | const char *path, |
| 53 | weston_process_cleanup_func_t cleanup); |
| 54 | |
| 55 | struct wl_client * |
| 56 | weston_client_start(struct weston_compositor *compositor, const char *path); |
| 57 | |
| 58 | void |
Alvarito050506 | 1f57a1f | 2021-06-29 14:33:04 -0300 | [diff] [blame] | 59 | wet_watch_process(struct weston_compositor *compositor, |
| 60 | struct weston_process *process); |
Giulio Camuffo | fba27fb | 2016-06-02 21:48:10 +0300 | [diff] [blame] | 61 | |
Giulio Camuffo | d52f3b7 | 2016-06-02 21:48:11 +0300 | [diff] [blame] | 62 | struct weston_config * |
| 63 | wet_get_config(struct weston_compositor *compositor); |
| 64 | |
Giulio Camuffo | 179fcda | 2016-06-02 21:48:14 +0300 | [diff] [blame] | 65 | void * |
Quentin Glidic | 8af2bec | 2016-12-02 14:21:46 +0100 | [diff] [blame] | 66 | wet_load_module_entrypoint(const char *name, const char *entrypoint); |
| 67 | |
| 68 | int |
Quentin Glidic | da01c1d | 2016-12-02 14:17:08 +0100 | [diff] [blame] | 69 | wet_shell_init(struct weston_compositor *ec, |
| 70 | int *argc, char *argv[]); |
| 71 | int |
Quentin Glidic | 8af2bec | 2016-12-02 14:21:46 +0100 | [diff] [blame] | 72 | wet_module_init(struct weston_compositor *ec, |
| 73 | int *argc, char *argv[]); |
| 74 | int |
| 75 | wet_load_module(struct weston_compositor *compositor, |
| 76 | const char *name, int *argc, char *argv[]); |
Giulio Camuffo | 179fcda | 2016-06-02 21:48:14 +0300 | [diff] [blame] | 77 | |
Giulio Camuffo | 9c764df | 2016-06-29 11:54:27 +0200 | [diff] [blame] | 78 | int |
Quentin Glidic | 3d7ca3b | 2016-12-02 14:20:35 +0100 | [diff] [blame] | 79 | module_init(struct weston_compositor *compositor, |
| 80 | int *argc, char *argv[]); |
| 81 | |
Daniel Stone | e03c111 | 2016-11-24 20:45:45 +0000 | [diff] [blame] | 82 | char * |
Marius Vlad | 64fbd0f | 2018-12-15 15:51:57 +0200 | [diff] [blame] | 83 | wet_get_libexec_path(const char *name); |
| 84 | |
| 85 | char * |
| 86 | wet_get_bindir_path(const char *name); |
Daniel Stone | e03c111 | 2016-11-24 20:45:45 +0000 | [diff] [blame] | 87 | |
Quentin Glidic | 3d7ca3b | 2016-12-02 14:20:35 +0100 | [diff] [blame] | 88 | int |
Giulio Camuffo | 9c764df | 2016-06-29 11:54:27 +0200 | [diff] [blame] | 89 | wet_load_xwayland(struct weston_compositor *comp); |
| 90 | |
Quentin Glidic | 46dc9b4 | 2016-08-18 11:15:44 +0200 | [diff] [blame] | 91 | struct text_backend; |
| 92 | |
| 93 | struct text_backend * |
| 94 | text_backend_init(struct weston_compositor *ec); |
| 95 | |
| 96 | void |
| 97 | text_backend_destroy(struct text_backend *text_backend); |
| 98 | |
Pekka Paalanen | 19d31dd | 2021-03-01 11:24:59 +0200 | [diff] [blame] | 99 | /* |
| 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 Paalanen | b35c21f | 2019-07-08 17:12:41 +0300 | [diff] [blame] | 105 | int |
Leandro Ribeiro | 32a5acd | 2020-10-19 16:06:22 -0300 | [diff] [blame] | 106 | wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_data); |
Pekka Paalanen | b35c21f | 2019-07-08 17:12:41 +0300 | [diff] [blame] | 107 | |
Giulio Camuffo | 26f62d4 | 2016-06-02 21:48:09 +0300 | [diff] [blame] | 108 | #ifdef __cplusplus |
| 109 | } |
| 110 | #endif |
| 111 | |
| 112 | #endif |