1
0

small-code.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* SCANNER TEST */
  2. /*
  3. * Copyright © 2016 Collabora, Ltd.
  4. *
  5. * Permission is hereby granted, free of charge, to any person
  6. * obtaining a copy of this software and associated documentation files
  7. * (the "Software"), to deal in the Software without restriction,
  8. * including without limitation the rights to use, copy, modify, merge,
  9. * publish, distribute, sublicense, and/or sell copies of the Software,
  10. * and to permit persons to whom the Software is furnished to do so,
  11. * subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice (including the
  14. * next paragraph) shall be included in all copies or substantial
  15. * portions of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  18. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  19. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  20. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  21. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  22. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  23. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  24. * SOFTWARE.
  25. */
  26. #include <stdbool.h>
  27. #include <stdlib.h>
  28. #include <stdint.h>
  29. #include "wayland-util.h"
  30. extern const struct wl_interface another_intf_interface;
  31. extern const struct wl_interface intf_not_here_interface;
  32. static const struct wl_interface *small_test_types[] = {
  33. NULL,
  34. NULL,
  35. NULL,
  36. &intf_not_here_interface,
  37. NULL,
  38. NULL,
  39. NULL,
  40. NULL,
  41. NULL,
  42. &another_intf_interface,
  43. };
  44. static const struct wl_message intf_A_requests[] = {
  45. { "rq1", "sun", small_test_types + 0 },
  46. { "rq2", "nsiufho", small_test_types + 3 },
  47. { "destroy", "", small_test_types + 0 },
  48. };
  49. static const struct wl_message intf_A_events[] = {
  50. { "hey", "", small_test_types + 0 },
  51. { "yo", "2", small_test_types + 0 },
  52. };
  53. WL_EXPORT const struct wl_interface intf_A_interface = {
  54. "intf_A", 3,
  55. 3, intf_A_requests,
  56. 2, intf_A_events,
  57. };