summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Lima (Etrunko) <eduardo.lima@intel.com>2012-11-21 15:44:54 +0000
committerEduardo de Barros Lima <eblima@gmail.com>2012-11-21 15:44:54 +0000
commit7eab2172998107b1d5aef77d96f12decb19f5b8e (patch)
tree753aa461db7dd140bb763a2e8746138f873db9e1
parent05a2386517a4f1aa02ab6a75adee5707759c394f (diff)
Remove warnings
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com> SVN revision: 79514
-rw-r--r--src/bin/engine_wayland_egl.c24
-rw-r--r--src/bin/engine_wayland_shm.c30
2 files changed, 33 insertions, 21 deletions
diff --git a/src/bin/engine_wayland_egl.c b/src/bin/engine_wayland_egl.c
index 4f1a188..a81539f 100644
--- a/src/bin/engine_wayland_egl.c
+++ b/src/bin/engine_wayland_egl.c
@@ -11,7 +11,6 @@
11struct _engine_wayland_egl_display 11struct _engine_wayland_egl_display
12{ 12{
13 struct wl_display *display; 13 struct wl_display *display;
14 struct wl_registry *registry;
15 struct wl_compositor *compositor; 14 struct wl_compositor *compositor;
16 struct wl_surface *surface; 15 struct wl_surface *surface;
17 struct wl_shell *shell; 16 struct wl_shell *shell;
@@ -28,22 +27,25 @@ static void _registry_handle_global(void *data, struct wl_registry *registry, un
28static const struct wl_registry_listener _registry_listener = 27static const struct wl_registry_listener _registry_listener =
29{ 28{
30 _registry_handle_global, 29 _registry_handle_global,
30 NULL, /* global_remove */
31}; 31};
32 32
33/* Shell Surface handler */ 33/* Shell Surface handler */
34static void _shell_surface_handle_ping(void *data, struct wl_shell_surface *shell_surface, uint32_t serial); 34static void _shell_surface_handle_ping(void *data, struct wl_shell_surface *shell_surface, uint32_t serial);
35
36static const struct wl_shell_surface_listener _shell_surface_listener = 35static const struct wl_shell_surface_listener _shell_surface_listener =
37{ 36{
38 _shell_surface_handle_ping, 37 _shell_surface_handle_ping,
38 NULL, /* configure */
39 NULL, /* popup_done */
39}; 40};
40 41
41/* 42/*
42 * API 43 * API
43 */ 44 */
44Eina_Bool 45Eina_Bool
45engine_wayland_egl_args(const char *engine __UNUSED__, int width, int height) 46engine_wayland_egl_args(const char *engine __UNUSED__, int width __UNUSED__, int height __UNUSED__)
46{ 47{
48 struct wl_registry *registry;
47 Evas_Engine_Info_Wayland_Egl *einfo; 49 Evas_Engine_Info_Wayland_Egl *einfo;
48 50
49 evas_output_method_set(evas, evas_render_method_lookup("wayland_egl")); 51 evas_output_method_set(evas, evas_render_method_lookup("wayland_egl"));
@@ -55,8 +57,8 @@ engine_wayland_egl_args(const char *engine __UNUSED__, int width, int height)
55 } 57 }
56 58
57 wl.display = wl_display_connect(NULL); 59 wl.display = wl_display_connect(NULL);
58 wl.registry = wl_display_get_registry(wl.display); 60 registry = wl_display_get_registry(wl.display);
59 wl_registry_add_listener(wl.registry, &_registry_listener, NULL); 61 wl_registry_add_listener(registry, &_registry_listener, NULL);
60 wl_display_roundtrip(wl.display); 62 wl_display_roundtrip(wl.display);
61 63
62 assert(wl.compositor != NULL); 64 assert(wl.compositor != NULL);
@@ -101,16 +103,20 @@ engine_wayland_egl_shutdown(void)
101 * Function implementation 103 * Function implementation
102 */ 104 */
103static void 105static void
104_registry_handle_global(void *data, struct wl_registry *registry, unsigned int id, const char *interface, unsigned int version __UNUSED__) 106_registry_handle_global(void *data __UNUSED__, struct wl_registry *registry, unsigned int id, const char *interface, unsigned int version __UNUSED__)
105{ 107{
106 if (!strcmp(interface, "wl_compositor")) 108 if (!strcmp(interface, "wl_compositor"))
107 wl.compositor = wl_registry_bind(wl.registry, id, &wl_compositor_interface, 1); 109 {
110 wl.compositor = wl_registry_bind(registry, id, &wl_compositor_interface, 1);
111 }
108 else if (!strcmp(interface, "wl_shell")) 112 else if (!strcmp(interface, "wl_shell"))
109 wl.shell = wl_registry_bind(wl.registry, id, &wl_shell_interface, 1); 113 {
114 wl.shell = wl_registry_bind(registry, id, &wl_shell_interface, 1);
115 }
110} 116}
111 117
112static void 118static void
113_shell_surface_handle_ping(void *data, struct wl_shell_surface *shell_surface, uint32_t serial) 119_shell_surface_handle_ping(void *data __UNUSED__, struct wl_shell_surface *shell_surface, uint32_t serial)
114{ 120{
115 wl_shell_surface_pong(shell_surface, serial); 121 wl_shell_surface_pong(shell_surface, serial);
116} 122}
diff --git a/src/bin/engine_wayland_shm.c b/src/bin/engine_wayland_shm.c
index 6c3175a..4ebe721 100644
--- a/src/bin/engine_wayland_shm.c
+++ b/src/bin/engine_wayland_shm.c
@@ -14,7 +14,6 @@
14struct _engine_wayland_shm_display 14struct _engine_wayland_shm_display
15{ 15{
16 struct wl_display *display; 16 struct wl_display *display;
17 struct wl_registry *registry;
18 struct wl_compositor *compositor; 17 struct wl_compositor *compositor;
19 struct wl_surface *surface; 18 struct wl_surface *surface;
20 struct wl_callback *frame_callback; 19 struct wl_callback *frame_callback;
@@ -39,14 +38,16 @@ static void _registry_handle_global(void *data, struct wl_registry *registry, un
39static const struct wl_registry_listener _registry_listener = 38static const struct wl_registry_listener _registry_listener =
40{ 39{
41 _registry_handle_global, 40 _registry_handle_global,
41 NULL, /* global_remove */
42}; 42};
43 43
44/* Shell Surface handler */ 44/* Shell Surface handler */
45static void _shell_surface_handle_ping(void *data, struct wl_shell_surface *shell_surface, uint32_t serial); 45static void _shell_surface_handle_ping(void *data, struct wl_shell_surface *shell_surface, uint32_t serial);
46
47static const struct wl_shell_surface_listener _shell_surface_listener = 46static const struct wl_shell_surface_listener _shell_surface_listener =
48{ 47{
49 _shell_surface_handle_ping, 48 _shell_surface_handle_ping,
49 NULL, /* configure */
50 NULL, /* popup_done */
50}; 51};
51 52
52/* Frame handler */ 53/* Frame handler */
@@ -63,8 +64,8 @@ static const struct wl_callback_listener _surface_frame_listener =
63Eina_Bool 64Eina_Bool
64engine_wayland_shm_args(const char *engine __UNUSED__, int width, int height) 65engine_wayland_shm_args(const char *engine __UNUSED__, int width, int height)
65{ 66{
67 struct wl_registry *registry;
66 Evas_Engine_Info_Wayland_Shm *einfo; 68 Evas_Engine_Info_Wayland_Shm *einfo;
67 struct wl_region *region;
68 69
69 evas_output_method_set(evas, evas_render_method_lookup("wayland_shm")); 70 evas_output_method_set(evas, evas_render_method_lookup("wayland_shm"));
70 einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(evas); 71 einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(evas);
@@ -75,8 +76,8 @@ engine_wayland_shm_args(const char *engine __UNUSED__, int width, int height)
75 } 76 }
76 77
77 wl.display = wl_display_connect(NULL); 78 wl.display = wl_display_connect(NULL);
78 wl.registry = wl_display_get_registry(wl.display); 79 registry = wl_display_get_registry(wl.display);
79 wl_registry_add_listener(wl.registry, &_registry_listener, NULL); 80 wl_registry_add_listener(registry, &_registry_listener, NULL);
80 wl_display_roundtrip(wl.display); 81 wl_display_roundtrip(wl.display);
81 82
82 assert(wl.compositor != NULL); 83 assert(wl.compositor != NULL);
@@ -127,7 +128,6 @@ engine_wayland_shm_shutdown(void)
127 wl_buffer_destroy(wl.buffer); 128 wl_buffer_destroy(wl.buffer);
128 wl_shell_surface_destroy(wl.shell_surface); 129 wl_shell_surface_destroy(wl.shell_surface);
129 wl_surface_destroy(wl.surface); 130 wl_surface_destroy(wl.surface);
130
131 wl_shm_destroy(wl.shm); 131 wl_shm_destroy(wl.shm);
132 wl_shell_destroy(wl.shell); 132 wl_shell_destroy(wl.shell);
133 wl_compositor_destroy(wl.compositor); 133 wl_compositor_destroy(wl.compositor);
@@ -139,18 +139,24 @@ engine_wayland_shm_shutdown(void)
139 * Function implementation 139 * Function implementation
140 */ 140 */
141static void 141static void
142_registry_handle_global(void *data, struct wl_registry *registry, unsigned int id, const char *interface, unsigned int version __UNUSED__) 142_registry_handle_global(void *data __UNUSED__, struct wl_registry *registry, unsigned int id, const char *interface, unsigned int version __UNUSED__)
143{ 143{
144 if (!strcmp(interface, "wl_compositor")) 144 if (!strcmp(interface, "wl_compositor"))
145 wl.compositor = wl_registry_bind(wl.registry, id, &wl_compositor_interface, 1); 145 {
146 wl.compositor = wl_registry_bind(registry, id, &wl_compositor_interface, 1);
147 }
146 else if (!strcmp(interface, "wl_shell")) 148 else if (!strcmp(interface, "wl_shell"))
147 wl.shell = wl_registry_bind(wl.registry, id, &wl_shell_interface, 1); 149 {
150 wl.shell = wl_registry_bind(registry, id, &wl_shell_interface, 1);
151 }
148 else if (!strcmp(interface, "wl_shm")) 152 else if (!strcmp(interface, "wl_shm"))
149 wl.shm = wl_registry_bind(wl.registry, id, &wl_shm_interface, 1); 153 {
154 wl.shm = wl_registry_bind(registry, id, &wl_shm_interface, 1);
155 }
150} 156}
151 157
152static void 158static void
153_shell_surface_handle_ping(void *data, struct wl_shell_surface *shell_surface, uint32_t serial) 159_shell_surface_handle_ping(void *data __UNUSED__, struct wl_shell_surface *shell_surface, uint32_t serial)
154{ 160{
155 wl_shell_surface_pong(shell_surface, serial); 161 wl_shell_surface_pong(shell_surface, serial);
156} 162}
@@ -195,7 +201,7 @@ _engine_wayland_shm_create_buffer(int width, int height)
195} 201}
196 202
197static void 203static void
198_surface_frame_handle_complete(void *data, struct wl_callback *callback, uint32_t time) 204_surface_frame_handle_complete(void *data __UNUSED__, struct wl_callback *callback __UNUSED__, uint32_t time __UNUSED__)
199{ 205{
200 wl_surface_damage(wl.surface, 0, 0, wl.width, wl.height); 206 wl_surface_damage(wl.surface, 0, 0, wl.width, wl.height);
201 207