wayland-server.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * Copyright © 2008 Kristian Høgsberg
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining
  5. * a copy of this software and associated documentation files (the
  6. * "Software"), to deal in the Software without restriction, including
  7. * without limitation the rights to use, copy, modify, merge, publish,
  8. * distribute, sublicense, and/or sell copies of the Software, and to
  9. * permit persons to whom the Software is furnished to do so, subject to
  10. * the following conditions:
  11. *
  12. * The above copyright notice and this permission notice (including the
  13. * next paragraph) shall be included in all copies or substantial
  14. * portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  17. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  18. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  19. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  20. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  21. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  22. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23. * SOFTWARE.
  24. */
  25. /** \file
  26. *
  27. * \brief Include the server API, deprecations and protocol C API.
  28. *
  29. * \warning Use of this header file is discouraged. Prefer including
  30. * wayland-server-core.h instead, which does not include the
  31. * server protocol header and as such only defines the library
  32. * API, excluding the deprecated API below.
  33. */
  34. #ifndef WAYLAND_SERVER_H
  35. #define WAYLAND_SERVER_H
  36. #include "wayland-server-core.h"
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40. #ifndef WL_HIDE_DEPRECATED
  41. struct wl_object {
  42. const struct wl_interface *interface;
  43. const void *implementation;
  44. uint32_t id;
  45. };
  46. struct wl_resource {
  47. struct wl_object object;
  48. wl_resource_destroy_func_t destroy;
  49. struct wl_list link;
  50. struct wl_signal destroy_signal;
  51. struct wl_client *client;
  52. void *data;
  53. };
  54. struct wl_buffer {
  55. struct wl_resource resource;
  56. int32_t width, height;
  57. uint32_t busy_count;
  58. } WL_DEPRECATED;
  59. uint32_t
  60. wl_client_add_resource(struct wl_client *client,
  61. struct wl_resource *resource) WL_DEPRECATED;
  62. struct wl_resource *
  63. wl_client_add_object(struct wl_client *client,
  64. const struct wl_interface *interface,
  65. const void *implementation,
  66. uint32_t id, void *data) WL_DEPRECATED;
  67. struct wl_resource *
  68. wl_client_new_object(struct wl_client *client,
  69. const struct wl_interface *interface,
  70. const void *implementation, void *data) WL_DEPRECATED;
  71. struct wl_global *
  72. wl_display_add_global(struct wl_display *display,
  73. const struct wl_interface *interface,
  74. void *data,
  75. wl_global_bind_func_t bind) WL_DEPRECATED;
  76. void
  77. wl_display_remove_global(struct wl_display *display,
  78. struct wl_global *global) WL_DEPRECATED;
  79. #endif
  80. #ifdef __cplusplus
  81. }
  82. #endif
  83. #include "wayland-server-protocol.h"
  84. #endif