main neuswc / libswc / internal.h
 1/* swc: swc/internal.h
 2 *
 3 * Copyright (c) 2013-2019 Michael Forney
 4 *
 5 * Permission is hereby granted, free of charge, to any person obtaining a copy
 6 * of this software and associated documentation files (the "Software"), to deal
 7 * in the Software without restriction, including without limitation the rights
 8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 * SOFTWARE.
22 */
23
24#ifndef SWC_INTERNAL_H
25#define SWC_INTERNAL_H
26
27#include <stdbool.h>
28#include <wayland-server.h>
29
30enum {
31	SWC_EVENT_ACTIVATED,
32	SWC_EVENT_DEACTIVATED,
33};
34
35struct swc {
36	struct wl_display *display;
37	struct wl_event_loop *event_loop;
38	const struct swc_manager *manager;
39	struct wl_signal event_signal;
40	bool active;
41
42	struct swc_seat *seat;
43	const struct swc_bindings *const bindings;
44	struct wl_list screens;
45	struct swc_compositor *const compositor;
46	struct swc_shm *shm;
47	struct swc_drm *const drm;
48	struct wl_global *data_device_manager;
49	struct wl_global *kde_decoration_manager;
50	struct wl_global *layer_shell;
51	struct wl_global *panel_manager;
52	struct wl_global *shell;
53	struct wl_global *snap_manager;
54	struct wl_global *select_manager;
55	struct wl_global *subcompositor;
56	struct wl_global *xdg_decoration_manager;
57	struct wl_global *xdg_output_manager;
58	struct wl_global *xdg_shell;
59
60#ifdef ENABLE_XWAYLAND
61	const struct swc_xserver *const xserver;
62#endif
63};
64
65extern struct swc swc;
66
67void
68swc_activate(void);
69void
70swc_deactivate(void);
71
72#endif