blob: a4689cfd4a5020c4b42f13a9d5fe5bb3a168db7e [file] [log] [blame]
Marius Vlada72e3712019-07-10 13:46:39 +03001/*
2 * Copyright © 2008-2011 Kristian Høgsberg
3 * Copyright © 2017, 2018 General Electric Company
4 * Copyright © 2012, 2017-2019 Collabora, Ltd.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sublicense, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial
16 * portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
22 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 */
27
28#ifndef LIBWESTON_INTERNAL_H
29#define LIBWESTON_INTERNAL_H
30
31/*
32 * This is the internal (private) part of libweston. All symbols found here
33 * are, and should be only (with a few exceptions) used within the internal
34 * parts of libweston. Notable exception(s) include a few files in tests/ that
35 * need access to these functions, screen-share file from compositor/ and those
36 * remoting/. Those will require some further fixing as to avoid including this
37 * private header.
38 *
39 * Eventually, these symbols should reside naturally into their own scope. New
40 * features should either provide their own (internal) header or use this one.
41 */
42
43
44/* weston_buffer */
45
46void
47weston_buffer_send_server_error(struct weston_buffer *buffer,
48 const char *msg);
49void
50weston_buffer_reference(struct weston_buffer_reference *ref,
51 struct weston_buffer *buffer);
52
53void
54weston_buffer_release_move(struct weston_buffer_release_reference *dest,
55 struct weston_buffer_release_reference *src);
56
57void
58weston_buffer_release_reference(struct weston_buffer_release_reference *ref,
59 struct weston_buffer_release *buf_release);
60
Marius Vlad56f3a682019-07-10 14:48:39 +030061/* weston_bindings */
62void
63weston_binding_destroy(struct weston_binding *binding);
64
65void
66weston_binding_list_destroy_all(struct wl_list *list);
67
68/* weston_compositor */
69
70void
71touch_calibrator_mode_changed(struct weston_compositor *compositor);
72
73int
74noop_renderer_init(struct weston_compositor *ec);
75
76void
77weston_compositor_add_head(struct weston_compositor *compositor,
78 struct weston_head *head);
79void
80weston_compositor_add_pending_output(struct weston_output *output,
81 struct weston_compositor *compositor);
82struct weston_binding *
83weston_compositor_add_debug_binding(struct weston_compositor *compositor,
84 uint32_t key,
85 weston_key_binding_handler_t binding,
86 void *data);
87bool
88weston_compositor_import_dmabuf(struct weston_compositor *compositor,
89 struct linux_dmabuf_buffer *buffer);
90void
91weston_compositor_offscreen(struct weston_compositor *compositor);
92
93char *
94weston_compositor_print_scene_graph(struct weston_compositor *ec);
95
96void
97weston_compositor_read_presentation_clock(
98 const struct weston_compositor *compositor,
99 struct timespec *ts);
100
101int
102weston_compositor_run_axis_binding(struct weston_compositor *compositor,
103 struct weston_pointer *pointer,
104 const struct timespec *time,
105 struct weston_pointer_axis_event *event);
106void
107weston_compositor_run_button_binding(struct weston_compositor *compositor,
108 struct weston_pointer *pointer,
109 const struct timespec *time,
110 uint32_t button,
111 enum wl_pointer_button_state value);
112int
113weston_compositor_run_debug_binding(struct weston_compositor *compositor,
114 struct weston_keyboard *keyboard,
115 const struct timespec *time,
116 uint32_t key,
117 enum wl_keyboard_key_state state);
118void
119weston_compositor_run_key_binding(struct weston_compositor *compositor,
120 struct weston_keyboard *keyboard,
121 const struct timespec *time,
122 uint32_t key,
123 enum wl_keyboard_key_state state);
124void
125weston_compositor_run_modifier_binding(struct weston_compositor *compositor,
126 struct weston_keyboard *keyboard,
127 enum weston_keyboard_modifier modifier,
128 enum wl_keyboard_key_state state);
129void
130weston_compositor_run_touch_binding(struct weston_compositor *compositor,
131 struct weston_touch *touch,
132 const struct timespec *time,
133 int touch_type);
134void
135weston_compositor_stack_plane(struct weston_compositor *ec,
136 struct weston_plane *plane,
137 struct weston_plane *above);
138void
139weston_compositor_set_touch_mode_normal(struct weston_compositor *compositor);
140
141void
142weston_compositor_set_touch_mode_calib(struct weston_compositor *compositor);
143
144int
145weston_compositor_set_presentation_clock(struct weston_compositor *compositor,
146 clockid_t clk_id);
147int
148weston_compositor_set_presentation_clock_software(
149 struct weston_compositor *compositor);
150void
151weston_compositor_shutdown(struct weston_compositor *ec);
152
153void
154weston_compositor_xkb_destroy(struct weston_compositor *ec);
155
156int
157weston_input_init(struct weston_compositor *compositor);
158
Marius Vlada72e3712019-07-10 13:46:39 +0300159#endif