mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
Practical example: a client supporting version 2 of wl_output will wait for the wl_output.done event before starting wl_output-related operations. However, if the server only supports version 1, no event will ever come, and it must fallback to use the wl_output.geometry event alone. Without this macro, it cannot check for that in a nice way. This patch introduces the same #defines in both server and client headers. We rely on both being generated from the same XML file and https://gcc.gnu.org/onlinedocs/cpp/Undefining-and-Redefining-Macros.html to not cause compiler errors or warning due to redefinitions. We also assume that no-one uses the same name in the same interface for both a request and an event. If this patch does cause grief due to identical redefinitions, the contingency plan is to change the generator to produce #ifndef/#define/#endif instead of just #define. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> [Pekka: add paragraphs to commit message.] |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| connection.c | ||
| dtddata.S | ||
| event-loop.c | ||
| scanner.c | ||
| scanner.mk | ||
| wayland-client-core.h | ||
| wayland-client-uninstalled.pc.in | ||
| wayland-client.c | ||
| wayland-client.h | ||
| wayland-client.pc.in | ||
| wayland-egl-core.h | ||
| wayland-egl.h | ||
| wayland-os.c | ||
| wayland-os.h | ||
| wayland-private.h | ||
| wayland-scanner-uninstalled.pc.in | ||
| wayland-scanner.pc.in | ||
| wayland-server-core.h | ||
| wayland-server-uninstalled.pc.in | ||
| wayland-server.c | ||
| wayland-server.h | ||
| wayland-server.pc.in | ||
| wayland-shm.c | ||
| wayland-util.c | ||
| wayland-util.h | ||
| wayland-version.h.in | ||