wayland/tests/data/empty-code.c
Simon Ser b258d5f361 scanner: add validators for enums
Right now compositors need to manually check that enum values sent
by the client are valid. In particular:

- Check that the value sent by the client is not outside of the enum.
- Check that the version of the enum entry is consistent with the
  object version.

Automatically generate validator functions to perform these tasks.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/104
2024-04-23 09:17:02 +00:00

21 lines
359 B
C

/* SCANNER TEST */
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
static const struct wl_interface *empty_types[] = {
};
static const struct wl_message empty_requests[] = {
{ "empty", "", empty_types + 0 },
};
WL_EXPORT const struct wl_interface empty_interface = {
"empty", 1,
1, empty_requests,
0, NULL,
};