• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
26 /** \file
27  *
28  *  \brief Include the server API, deprecations and protocol C API.
29  *
30  *  \warning Use of this header file is discouraged. Prefer including
31  *  wayland-server-core.h instead, which does not include the
32  *  server protocol header and as such only defines the library
33  *  API, excluding the deprecated API below.
34  */
35 
36 #ifndef WAYLAND_SERVER_H
37 #define WAYLAND_SERVER_H
38 
39 #include <stdint.h>
40 #include "wayland-server-core.h"
41 
42 #ifdef  __cplusplus
43 extern "C" {
44 #endif
45 
46 #ifndef WL_HIDE_DEPRECATED
47 
48 struct wl_object {
49 	const struct wl_interface *interface;
50 	const void *implementation;
51 	uint32_t id;
52 };
53 
54 struct wl_resource {
55 	struct wl_object object;
56 	wl_resource_destroy_func_t destroy;
57 	struct wl_list link;
58 	struct wl_signal destroy_signal;
59 	struct wl_client *client;
60 	void *data;
61 };
62 
63 struct wl_buffer {
64 	struct wl_resource resource;
65 	int32_t width, height;
66 	uint32_t busy_count;
67 } WL_DEPRECATED;
68 
69 uint32_t
70 wl_client_add_resource(struct wl_client *client,
71 		       struct wl_resource *resource) WL_DEPRECATED;
72 
73 struct wl_resource *
74 wl_client_add_object(struct wl_client *client,
75 		     const struct wl_interface *interface,
76 		     const void *implementation,
77 		     uint32_t id, void *data) WL_DEPRECATED;
78 
79 struct wl_resource *
80 wl_client_new_object(struct wl_client *client,
81 		     const struct wl_interface *interface,
82 		     const void *implementation, void *data) WL_DEPRECATED;
83 
84 struct wl_global *
85 wl_display_add_global(struct wl_display *display,
86 		      const struct wl_interface *interface,
87 		      void *data,
88 		      wl_global_bind_func_t bind) WL_DEPRECATED;
89 
90 void
91 wl_display_remove_global(struct wl_display *display,
92 			 struct wl_global *global) WL_DEPRECATED;
93 
94 #endif
95 
96 #ifdef  __cplusplus
97 }
98 #endif
99 
100 #include "wayland-server-protocol.h"
101 
102 #endif
103