mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-29 06:28:29 +00:00
wayland: The rest of the wayland-client 1.18 requirement... Git, please
This commit is contained in:
@@ -72,18 +72,15 @@ SDL_WAYLAND_SYM(void, wl_list_remove, (struct wl_list *))
|
||||
SDL_WAYLAND_SYM(int, wl_list_length, (const struct wl_list *))
|
||||
SDL_WAYLAND_SYM(int, wl_list_empty, (const struct wl_list *))
|
||||
SDL_WAYLAND_SYM(void, wl_list_insert_list, (struct wl_list *, struct wl_list *))
|
||||
|
||||
/* These functions are available in Wayland >= 1.4 */
|
||||
SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_4)
|
||||
SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_constructor, (struct wl_proxy *, uint32_t opcode, const struct wl_interface *interface, ...))
|
||||
|
||||
SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_10)
|
||||
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, ...))
|
||||
|
||||
SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_18)
|
||||
SDL_WAYLAND_SYM(void, wl_proxy_set_tag, (struct wl_proxy *, const char * const *))
|
||||
SDL_WAYLAND_SYM(const char * const *, wl_proxy_get_tag, (struct wl_proxy *))
|
||||
|
||||
/* These were introduced in 1.20 and introduce a handful of build issues.
|
||||
* See GitHub #5376 and #4636
|
||||
* -flibit
|
||||
*/
|
||||
SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_20)
|
||||
SDL_WAYLAND_SYM(struct wl_proxy*, wl_proxy_marshal_flags, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interfac, uint32_t version, uint32_t flags, ...))
|
||||
SDL_WAYLAND_SYM(struct wl_proxy*, wl_proxy_marshal_array_flags, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interface, uint32_t version, uint32_t flags, union wl_argument *args))
|
||||
|
@@ -133,32 +133,22 @@ static const char *SDL_WAYLAND_output_tag = "sdl-output";
|
||||
|
||||
void SDL_WAYLAND_register_surface(struct wl_surface *surface)
|
||||
{
|
||||
if (SDL_WAYLAND_HAVE_WAYLAND_CLIENT_1_18) {
|
||||
wl_proxy_set_tag((struct wl_proxy *)surface, &SDL_WAYLAND_surface_tag);
|
||||
}
|
||||
wl_proxy_set_tag((struct wl_proxy *)surface, &SDL_WAYLAND_surface_tag);
|
||||
}
|
||||
|
||||
void SDL_WAYLAND_register_output(struct wl_output *output)
|
||||
{
|
||||
if (SDL_WAYLAND_HAVE_WAYLAND_CLIENT_1_18) {
|
||||
wl_proxy_set_tag((struct wl_proxy *)output, &SDL_WAYLAND_output_tag);
|
||||
}
|
||||
wl_proxy_set_tag((struct wl_proxy *)output, &SDL_WAYLAND_output_tag);
|
||||
}
|
||||
|
||||
SDL_bool SDL_WAYLAND_own_surface(struct wl_surface *surface)
|
||||
{
|
||||
if (SDL_WAYLAND_HAVE_WAYLAND_CLIENT_1_18) {
|
||||
return wl_proxy_get_tag((struct wl_proxy *) surface) == &SDL_WAYLAND_surface_tag;
|
||||
}
|
||||
return SDL_TRUE; /* For older clients we have to assume this is us... */
|
||||
return wl_proxy_get_tag((struct wl_proxy *) surface) == &SDL_WAYLAND_surface_tag;
|
||||
}
|
||||
|
||||
SDL_bool SDL_WAYLAND_own_output(struct wl_output *output)
|
||||
{
|
||||
if (SDL_WAYLAND_HAVE_WAYLAND_CLIENT_1_18) {
|
||||
return wl_proxy_get_tag((struct wl_proxy *) output) == &SDL_WAYLAND_output_tag;
|
||||
}
|
||||
return SDL_TRUE; /* For older clients we have to assume this is us... */
|
||||
return wl_proxy_get_tag((struct wl_proxy *) output) == &SDL_WAYLAND_output_tag;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user