small-private-code.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. #ifndef __has_attribute
  31. # define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
  32. #endif
  33. #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
  34. #define WL_PRIVATE __attribute__ ((visibility("hidden")))
  35. #else
  36. #define WL_PRIVATE
  37. #endif
  38. extern const struct wl_interface another_intf_interface;
  39. extern const struct wl_interface intf_not_here_interface;
  40. static const struct wl_interface *small_test_types[] = {
  41. NULL,
  42. NULL,
  43. NULL,
  44. &intf_not_here_interface,
  45. NULL,
  46. NULL,
  47. NULL,
  48. NULL,
  49. NULL,
  50. &another_intf_interface,
  51. };
  52. static const struct wl_message intf_A_requests[] = {
  53. { "rq1", "sun", small_test_types + 0 },
  54. { "rq2", "nsiufho", small_test_types + 3 },
  55. { "destroy", "", small_test_types + 0 },
  56. };
  57. static const struct wl_message intf_A_events[] = {
  58. { "hey", "", small_test_types + 0 },
  59. { "yo", "2", small_test_types + 0 },
  60. };
  61. WL_PRIVATE const struct wl_interface intf_A_interface = {
  62. "intf_A", 3,
  63. 3, intf_A_requests,
  64. 2, intf_A_events,
  65. };