diff --git a/raylib/cgo_linux.go b/raylib/cgo_linux.go index fa8f340..62ef966 100644 --- a/raylib/cgo_linux.go +++ b/raylib/cgo_linux.go @@ -16,6 +16,7 @@ package raylib #include "external/glfw/src/wl_window.c" #include "external/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c" #include "external/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c" +#include "external/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.c" #endif #ifdef _GLFW_X11 #include "external/glfw/src/x11_init.c" diff --git a/raylib/external/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.c b/raylib/external/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.c index 506e3aa..04c32c2 100644 --- a/raylib/external/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.c +++ b/raylib/external/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.c @@ -30,14 +30,14 @@ extern const struct wl_interface wl_surface_interface; extern const struct wl_interface zwp_idle_inhibitor_v1_interface; -static const struct wl_interface *types[] = { +static const struct wl_interface *wl_ii_types[] = { &zwp_idle_inhibitor_v1_interface, &wl_surface_interface, }; static const struct wl_message zwp_idle_inhibit_manager_v1_requests[] = { - { "destroy", "", types + 0 }, - { "create_inhibitor", "no", types + 0 }, + { "destroy", "", wl_ii_types + 0 }, + { "create_inhibitor", "no", wl_ii_types + 0 }, }; WL_EXPORT const struct wl_interface zwp_idle_inhibit_manager_v1_interface = { @@ -47,7 +47,7 @@ WL_EXPORT const struct wl_interface zwp_idle_inhibit_manager_v1_interface = { }; static const struct wl_message zwp_idle_inhibitor_v1_requests[] = { - { "destroy", "", types + 0 }, + { "destroy", "", wl_ii_types + 0 }, }; WL_EXPORT const struct wl_interface zwp_idle_inhibitor_v1_interface = { diff --git a/raylib/external/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c b/raylib/external/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c index 9592de9..c46152e 100644 --- a/raylib/external/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c +++ b/raylib/external/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c @@ -34,7 +34,7 @@ extern const struct wl_interface wl_surface_interface; extern const struct wl_interface zwp_confined_pointer_v1_interface; extern const struct wl_interface zwp_locked_pointer_v1_interface; -static const struct wl_interface *types[] = { +static const struct wl_interface *wl_pc_types[] = { NULL, NULL, &zwp_locked_pointer_v1_interface, @@ -52,9 +52,9 @@ static const struct wl_interface *types[] = { }; static const struct wl_message zwp_pointer_constraints_v1_requests[] = { - { "destroy", "", types + 0 }, - { "lock_pointer", "noo?ou", types + 2 }, - { "confine_pointer", "noo?ou", types + 7 }, + { "destroy", "", wl_pc_types + 0 }, + { "lock_pointer", "noo?ou", wl_pc_types + 2 }, + { "confine_pointer", "noo?ou", wl_pc_types + 7 }, }; WL_EXPORT const struct wl_interface zwp_pointer_constraints_v1_interface = { @@ -64,14 +64,14 @@ WL_EXPORT const struct wl_interface zwp_pointer_constraints_v1_interface = { }; static const struct wl_message zwp_locked_pointer_v1_requests[] = { - { "destroy", "", types + 0 }, - { "set_cursor_position_hint", "ff", types + 0 }, - { "set_region", "?o", types + 12 }, + { "destroy", "", wl_pc_types + 0 }, + { "set_cursor_position_hint", "ff", wl_pc_types + 0 }, + { "set_region", "?o", wl_pc_types + 12 }, }; static const struct wl_message zwp_locked_pointer_v1_events[] = { - { "locked", "", types + 0 }, - { "unlocked", "", types + 0 }, + { "locked", "", wl_pc_types + 0 }, + { "unlocked", "", wl_pc_types + 0 }, }; WL_EXPORT const struct wl_interface zwp_locked_pointer_v1_interface = { @@ -81,13 +81,13 @@ WL_EXPORT const struct wl_interface zwp_locked_pointer_v1_interface = { }; static const struct wl_message zwp_confined_pointer_v1_requests[] = { - { "destroy", "", types + 0 }, - { "set_region", "?o", types + 13 }, + { "destroy", "", wl_pc_types + 0 }, + { "set_region", "?o", wl_pc_types + 13 }, }; static const struct wl_message zwp_confined_pointer_v1_events[] = { - { "confined", "", types + 0 }, - { "unconfined", "", types + 0 }, + { "confined", "", wl_pc_types + 0 }, + { "unconfined", "", wl_pc_types + 0 }, }; WL_EXPORT const struct wl_interface zwp_confined_pointer_v1_interface = { diff --git a/raylib/external/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c b/raylib/external/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c index 1a77873..0852c9a 100644 --- a/raylib/external/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c +++ b/raylib/external/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c @@ -31,7 +31,7 @@ extern const struct wl_interface wl_pointer_interface; extern const struct wl_interface zwp_relative_pointer_v1_interface; -static const struct wl_interface *types2[] = { +static const struct wl_interface *wl_rp_types[] = { NULL, NULL, NULL, @@ -43,8 +43,8 @@ static const struct wl_interface *types2[] = { }; static const struct wl_message zwp_relative_pointer_manager_v1_requests[] = { - { "destroy", "", types2 + 0 }, - { "get_relative_pointer", "no", types2 + 6 }, + { "destroy", "", wl_rp_types + 0 }, + { "get_relative_pointer", "no", wl_rp_types + 6 }, }; WL_EXPORT const struct wl_interface zwp_relative_pointer_manager_v1_interface = { @@ -54,11 +54,11 @@ WL_EXPORT const struct wl_interface zwp_relative_pointer_manager_v1_interface = }; static const struct wl_message zwp_relative_pointer_v1_requests[] = { - { "destroy", "", types2 + 0 }, + { "destroy", "", wl_rp_types + 0 }, }; static const struct wl_message zwp_relative_pointer_v1_events[] = { - { "relative_motion", "uuffff", types2 + 0 }, + { "relative_motion", "uuffff", wl_rp_types + 0 }, }; WL_EXPORT const struct wl_interface zwp_relative_pointer_v1_interface = { diff --git a/raylib/external/scripts/glfw-generate-wayland.sh b/raylib/external/scripts/glfw-generate-wayland.sh index d15567d..fd4ee07 100755 --- a/raylib/external/scripts/glfw-generate-wayland.sh +++ b/raylib/external/scripts/glfw-generate-wayland.sh @@ -21,4 +21,6 @@ wayland-scanner code ./unstable/idle-inhibit/idle-inhibit-unstable-v1.xml "$GLGL wayland-scanner client-header ./unstable/idle-inhibit/idle-inhibit-unstable-v1.xml "$GLGLFW_PATH"/wayland-idle-inhibit-unstable-v1-client-protocol.h # Patch for cgo -sed -i "s|types|types2|g" "$GLGLFW_PATH"/wayland-relative-pointer-unstable-v1-client-protocol.c +sed -i "s|types|wl_pc_types|g" "$GLGLFW_PATH"/wayland-pointer-constraints-unstable-v1-client-protocol.c +sed -i "s|types|wl_rp_types|g" "$GLGLFW_PATH"/wayland-relative-pointer-unstable-v1-client-protocol.c +sed -i "s|types|wl_ii_types|g" "$GLGLFW_PATH"/wayland-idle-inhibit-unstable-v1-client-protocol.c