1 | /* |
2 | Simple DirectMedia Layer |
3 | Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org> |
4 | |
5 | This software is provided 'as-is', without any express or implied |
6 | warranty. In no event will the authors be held liable for any damages |
7 | arising from the use of this software. |
8 | |
9 | Permission is granted to anyone to use this software for any purpose, |
10 | including commercial applications, and to alter it and redistribute it |
11 | freely, subject to the following restrictions: |
12 | |
13 | 1. The origin of this software must not be misrepresented; you must not |
14 | claim that you wrote the original software. If you use this software |
15 | in a product, an acknowledgment in the product documentation would be |
16 | appreciated but is not required. |
17 | 2. Altered source versions must be plainly marked as such, and must not be |
18 | misrepresented as being the original software. |
19 | 3. This notice may not be removed or altered from any source distribution. |
20 | */ |
21 | |
22 | /* *INDENT-OFF* */ |
23 | |
24 | #ifndef SDL_WAYLAND_MODULE |
25 | #define SDL_WAYLAND_MODULE(modname) |
26 | #endif |
27 | |
28 | #ifndef SDL_WAYLAND_SYM |
29 | #define SDL_WAYLAND_SYM(rc,fn,params) |
30 | #endif |
31 | |
32 | #ifndef SDL_WAYLAND_INTERFACE |
33 | #define SDL_WAYLAND_INTERFACE(iface) |
34 | #endif |
35 | |
36 | SDL_WAYLAND_MODULE(WAYLAND_CLIENT) |
37 | SDL_WAYLAND_SYM(void, wl_proxy_marshal, (struct wl_proxy *, uint32_t, ...)) |
38 | SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_create, (struct wl_proxy *, const struct wl_interface *)) |
39 | SDL_WAYLAND_SYM(void, wl_proxy_destroy, (struct wl_proxy *)) |
40 | SDL_WAYLAND_SYM(int, wl_proxy_add_listener, (struct wl_proxy *, void (**)(void), void *)) |
41 | SDL_WAYLAND_SYM(void, wl_proxy_set_user_data, (struct wl_proxy *, void *)) |
42 | SDL_WAYLAND_SYM(void *, wl_proxy_get_user_data, (struct wl_proxy *)) |
43 | SDL_WAYLAND_SYM(uint32_t, wl_proxy_get_version, (struct wl_proxy *)) |
44 | SDL_WAYLAND_SYM(uint32_t, wl_proxy_get_id, (struct wl_proxy *)) |
45 | SDL_WAYLAND_SYM(const char *, wl_proxy_get_class, (struct wl_proxy *)) |
46 | SDL_WAYLAND_SYM(void, wl_proxy_set_queue, (struct wl_proxy *, struct wl_event_queue *)) |
47 | SDL_WAYLAND_SYM(struct wl_display *, wl_display_connect, (const char *)) |
48 | SDL_WAYLAND_SYM(struct wl_display *, wl_display_connect_to_fd, (int)) |
49 | SDL_WAYLAND_SYM(void, wl_display_disconnect, (struct wl_display *)) |
50 | SDL_WAYLAND_SYM(int, wl_display_get_fd, (struct wl_display *)) |
51 | SDL_WAYLAND_SYM(int, wl_display_dispatch, (struct wl_display *)) |
52 | SDL_WAYLAND_SYM(int, wl_display_dispatch_queue, (struct wl_display *, struct wl_event_queue *)) |
53 | SDL_WAYLAND_SYM(int, wl_display_dispatch_queue_pending, (struct wl_display *, struct wl_event_queue *)) |
54 | SDL_WAYLAND_SYM(int, wl_display_dispatch_pending, (struct wl_display *)) |
55 | SDL_WAYLAND_SYM(int, wl_display_get_error, (struct wl_display *)) |
56 | SDL_WAYLAND_SYM(int, wl_display_flush, (struct wl_display *)) |
57 | SDL_WAYLAND_SYM(int, wl_display_roundtrip, (struct wl_display *)) |
58 | SDL_WAYLAND_SYM(struct wl_event_queue *, wl_display_create_queue, (struct wl_display *)) |
59 | SDL_WAYLAND_SYM(void, wl_log_set_handler_client, (wl_log_func_t)) |
60 | SDL_WAYLAND_SYM(void, wl_list_init, (struct wl_list *)) |
61 | SDL_WAYLAND_SYM(void, wl_list_insert, (struct wl_list *, struct wl_list *) ) |
62 | SDL_WAYLAND_SYM(void, wl_list_remove, (struct wl_list *)) |
63 | SDL_WAYLAND_SYM(int, wl_list_length, (const struct wl_list *)) |
64 | SDL_WAYLAND_SYM(int, wl_list_empty, (const struct wl_list *)) |
65 | SDL_WAYLAND_SYM(void, wl_list_insert_list, (struct wl_list *, struct wl_list *)) |
66 | |
67 | /* These functions are available in Wayland >= 1.4 */ |
68 | SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_4) |
69 | SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_constructor, (struct wl_proxy *, uint32_t opcode, const struct wl_interface *interface, ...)) |
70 | |
71 | SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_10) |
72 | SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_constructor_versioned, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interface, uint32_t version, ...)) |
73 | |
74 | SDL_WAYLAND_INTERFACE(wl_seat_interface) |
75 | SDL_WAYLAND_INTERFACE(wl_surface_interface) |
76 | SDL_WAYLAND_INTERFACE(wl_shm_pool_interface) |
77 | SDL_WAYLAND_INTERFACE(wl_buffer_interface) |
78 | SDL_WAYLAND_INTERFACE(wl_registry_interface) |
79 | SDL_WAYLAND_INTERFACE(wl_shell_surface_interface) |
80 | SDL_WAYLAND_INTERFACE(wl_region_interface) |
81 | SDL_WAYLAND_INTERFACE(wl_pointer_interface) |
82 | SDL_WAYLAND_INTERFACE(wl_keyboard_interface) |
83 | SDL_WAYLAND_INTERFACE(wl_compositor_interface) |
84 | SDL_WAYLAND_INTERFACE(wl_output_interface) |
85 | SDL_WAYLAND_INTERFACE(wl_shell_interface) |
86 | SDL_WAYLAND_INTERFACE(wl_shm_interface) |
87 | SDL_WAYLAND_INTERFACE(wl_data_device_interface) |
88 | SDL_WAYLAND_INTERFACE(wl_data_source_interface) |
89 | SDL_WAYLAND_INTERFACE(wl_data_offer_interface) |
90 | SDL_WAYLAND_INTERFACE(wl_data_device_manager_interface) |
91 | |
92 | SDL_WAYLAND_MODULE(WAYLAND_EGL) |
93 | SDL_WAYLAND_SYM(struct wl_egl_window *, wl_egl_window_create, (struct wl_surface *, int, int)) |
94 | SDL_WAYLAND_SYM(void, wl_egl_window_destroy, (struct wl_egl_window *)) |
95 | SDL_WAYLAND_SYM(void, wl_egl_window_resize, (struct wl_egl_window *, int, int, int, int)) |
96 | SDL_WAYLAND_SYM(void, wl_egl_window_get_attached_size, (struct wl_egl_window *, int *, int *)) |
97 | |
98 | SDL_WAYLAND_MODULE(WAYLAND_CURSOR) |
99 | SDL_WAYLAND_SYM(struct wl_cursor_theme *, wl_cursor_theme_load, (const char *, int , struct wl_shm *)) |
100 | SDL_WAYLAND_SYM(void, wl_cursor_theme_destroy, (struct wl_cursor_theme *)) |
101 | SDL_WAYLAND_SYM(struct wl_cursor *, wl_cursor_theme_get_cursor, (struct wl_cursor_theme *, const char *)) |
102 | SDL_WAYLAND_SYM(struct wl_buffer *, wl_cursor_image_get_buffer, (struct wl_cursor_image *)) |
103 | SDL_WAYLAND_SYM(int, wl_cursor_frame, (struct wl_cursor *, uint32_t)) |
104 | |
105 | SDL_WAYLAND_MODULE(WAYLAND_XKB) |
106 | SDL_WAYLAND_SYM(int, xkb_state_key_get_syms, (struct xkb_state *, xkb_keycode_t, const xkb_keysym_t **)) |
107 | SDL_WAYLAND_SYM(int, xkb_keysym_to_utf8, (xkb_keysym_t, char *, size_t) ) |
108 | SDL_WAYLAND_SYM(struct xkb_keymap *, xkb_keymap_new_from_string, (struct xkb_context *, const char *, enum xkb_keymap_format, enum xkb_keymap_compile_flags)) |
109 | SDL_WAYLAND_SYM(struct xkb_state *, xkb_state_new, (struct xkb_keymap *) ) |
110 | SDL_WAYLAND_SYM(void, xkb_keymap_unref, (struct xkb_keymap *) ) |
111 | SDL_WAYLAND_SYM(void, xkb_state_unref, (struct xkb_state *) ) |
112 | SDL_WAYLAND_SYM(void, xkb_context_unref, (struct xkb_context *) ) |
113 | SDL_WAYLAND_SYM(struct xkb_context *, xkb_context_new, (enum xkb_context_flags flags) ) |
114 | SDL_WAYLAND_SYM(enum xkb_state_component, xkb_state_update_mask, (struct xkb_state *state,\ |
115 | xkb_mod_mask_t depressed_mods,\ |
116 | xkb_mod_mask_t latched_mods,\ |
117 | xkb_mod_mask_t locked_mods,\ |
118 | xkb_layout_index_t depressed_layout,\ |
119 | xkb_layout_index_t latched_layout,\ |
120 | xkb_layout_index_t locked_layout) ) |
121 | SDL_WAYLAND_SYM(struct xkb_compose_table *, xkb_compose_table_new_from_locale, (struct xkb_context *,\ |
122 | const char *locale, enum xkb_compose_compile_flags) ) |
123 | SDL_WAYLAND_SYM(void, xkb_compose_table_unref, (struct xkb_compose_table *) ) |
124 | SDL_WAYLAND_SYM(struct xkb_compose_state *, xkb_compose_state_new, (struct xkb_compose_table *, enum xkb_compose_state_flags) ) |
125 | SDL_WAYLAND_SYM(void, xkb_compose_state_unref, (struct xkb_compose_state *) ) |
126 | SDL_WAYLAND_SYM(enum xkb_compose_feed_result, xkb_compose_state_feed, (struct xkb_compose_state *, xkb_keysym_t) ) |
127 | SDL_WAYLAND_SYM(enum xkb_compose_status, xkb_compose_state_get_status, (struct xkb_compose_state *) ) |
128 | SDL_WAYLAND_SYM(xkb_keysym_t, xkb_compose_state_get_one_sym, (struct xkb_compose_state *) ) |
129 | SDL_WAYLAND_SYM(void, xkb_keymap_key_for_each, (struct xkb_keymap *, xkb_keymap_key_iter_t, void*) ) |
130 | SDL_WAYLAND_SYM(int, xkb_keymap_key_get_syms_by_level, (struct xkb_keymap *, |
131 | xkb_keycode_t, |
132 | xkb_layout_index_t, |
133 | xkb_layout_index_t, |
134 | const xkb_keysym_t **) ) |
135 | SDL_WAYLAND_SYM(uint32_t, xkb_keysym_to_utf32, (xkb_keysym_t) ) |
136 | |
137 | #undef SDL_WAYLAND_MODULE |
138 | #undef SDL_WAYLAND_SYM |
139 | #undef SDL_WAYLAND_INTERFACE |
140 | |
141 | /* *INDENT-ON* */ |
142 | |
143 | /* vi: set ts=4 sw=4 expandtab: */ |
144 | |