diff options
Diffstat (limited to 'libraries/ecore/src/lib/ecore_wayland')
-rw-r--r-- | libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h | 304 | ||||
-rw-r--r-- | libraries/ecore/src/lib/ecore_wayland/Makefile.am | 33 | ||||
-rw-r--r-- | libraries/ecore/src/lib/ecore_wayland/Makefile.in | 842 | ||||
-rw-r--r-- | libraries/ecore/src/lib/ecore_wayland/ecore_wl.c | 551 | ||||
-rw-r--r-- | libraries/ecore/src/lib/ecore_wayland/ecore_wl_dnd.c | 189 | ||||
-rw-r--r-- | libraries/ecore/src/lib/ecore_wayland/ecore_wl_input.c | 658 | ||||
-rw-r--r-- | libraries/ecore/src/lib/ecore_wayland/ecore_wl_output.c | 79 | ||||
-rw-r--r-- | libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h | 87 | ||||
-rw-r--r-- | libraries/ecore/src/lib/ecore_wayland/ecore_wl_window.c | 440 |
9 files changed, 0 insertions, 3183 deletions
diff --git a/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h b/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h deleted file mode 100644 index 7dab37c..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h +++ /dev/null | |||
@@ -1,304 +0,0 @@ | |||
1 | #ifndef _ECORE_WAYLAND_H_ | ||
2 | # define _ECORE_WAYLAND_H_ | ||
3 | |||
4 | # define GL_GLEXT_PROTOTYPES | ||
5 | |||
6 | # include <Eina.h> | ||
7 | # include <wayland-client.h> | ||
8 | # include <wayland-egl.h> // NB: already includes wayland-client.h | ||
9 | # include <EGL/egl.h> | ||
10 | # include <EGL/eglext.h> | ||
11 | |||
12 | # ifdef EAPI | ||
13 | # undef EAPI | ||
14 | # endif | ||
15 | |||
16 | # ifdef __GNUC__ | ||
17 | # if __GNUC__ >= 4 | ||
18 | # define EAPI __attribute__ ((visibility("default"))) | ||
19 | # else | ||
20 | # define EAPI | ||
21 | # endif | ||
22 | # else | ||
23 | # define EAPI | ||
24 | # endif | ||
25 | |||
26 | typedef enum _Ecore_Wl_Window_Type Ecore_Wl_Window_Type; | ||
27 | typedef enum _Ecore_Wl_Window_Buffer_Type Ecore_Wl_Window_Buffer_Type; | ||
28 | |||
29 | typedef struct _Ecore_Wl_Display Ecore_Wl_Display; | ||
30 | typedef struct _Ecore_Wl_Output Ecore_Wl_Output; | ||
31 | typedef struct _Ecore_Wl_Input Ecore_Wl_Input; | ||
32 | # ifndef _ECORE_WAYLAND_WINDOW_PREDEF | ||
33 | typedef struct _Ecore_Wl_Window Ecore_Wl_Window; | ||
34 | # endif | ||
35 | typedef struct _Ecore_Wl_Dnd_Source Ecore_Wl_Dnd_Source; | ||
36 | typedef struct _Ecore_Wl_Dnd_Target Ecore_Wl_Dnd_Target; | ||
37 | |||
38 | typedef struct _Ecore_Wl_Event_Mouse_In Ecore_Wl_Event_Mouse_In; | ||
39 | typedef struct _Ecore_Wl_Event_Mouse_Out Ecore_Wl_Event_Mouse_Out; | ||
40 | typedef struct _Ecore_Wl_Event_Focus_In Ecore_Wl_Event_Focus_In; | ||
41 | typedef struct _Ecore_Wl_Event_Focus_Out Ecore_Wl_Event_Focus_Out; | ||
42 | typedef struct _Ecore_Wl_Event_Window_Configure Ecore_Wl_Event_Window_Configure; | ||
43 | typedef struct _Ecore_Wl_Event_Dnd_Enter Ecore_Wl_Event_Dnd_Enter; | ||
44 | typedef struct _Ecore_Wl_Event_Dnd_Position Ecore_Wl_Event_Dnd_Position; | ||
45 | typedef struct _Ecore_Wl_Event_Dnd_Leave Ecore_Wl_Event_Dnd_Leave; | ||
46 | typedef struct _Ecore_Wl_Event_Dnd_Drop Ecore_Wl_Event_Dnd_Drop; | ||
47 | typedef struct _Ecore_Wl_Event_Interfaces_Bound Ecore_Wl_Event_Interfaces_Bound; | ||
48 | |||
49 | enum _Ecore_Wl_Window_Type | ||
50 | { | ||
51 | ECORE_WL_WINDOW_TYPE_TOPLEVEL, | ||
52 | ECORE_WL_WINDOW_TYPE_FULLSCREEN, | ||
53 | ECORE_WL_WINDOW_TYPE_MAXIMIZED, | ||
54 | ECORE_WL_WINDOW_TYPE_TRANSIENT, | ||
55 | ECORE_WL_WINDOW_TYPE_MENU, | ||
56 | ECORE_WL_WINDOW_TYPE_CUSTOM | ||
57 | }; | ||
58 | |||
59 | enum _Ecore_Wl_Window_Buffer_Type | ||
60 | { | ||
61 | ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW, | ||
62 | ECORE_WL_WINDOW_BUFFER_TYPE_EGL_IMAGE, | ||
63 | ECORE_WL_WINDOW_BUFFER_TYPE_SHM | ||
64 | }; | ||
65 | |||
66 | struct _Ecore_Wl_Display | ||
67 | { | ||
68 | struct | ||
69 | { | ||
70 | struct wl_display *display; | ||
71 | struct wl_compositor *compositor; | ||
72 | struct wl_shell *shell; | ||
73 | struct wl_shm *shm; | ||
74 | struct wl_data_device_manager *data_device_manager; | ||
75 | } wl; | ||
76 | |||
77 | struct | ||
78 | { | ||
79 | EGLDisplay display; | ||
80 | EGLConfig rgb_config; | ||
81 | EGLConfig argb_config; | ||
82 | EGLContext rgb_context; | ||
83 | EGLContext argb_context; | ||
84 | } egl; | ||
85 | |||
86 | int fd; | ||
87 | unsigned int mask; | ||
88 | Ecore_Fd_Handler *fd_hdl; | ||
89 | |||
90 | struct wl_list inputs; | ||
91 | struct wl_list outputs; | ||
92 | |||
93 | struct xkb_desc *xkb; | ||
94 | |||
95 | Ecore_Wl_Output *output; | ||
96 | |||
97 | PFNEGLCREATEIMAGEKHRPROC create_image; | ||
98 | PFNEGLDESTROYIMAGEKHRPROC destroy_image; | ||
99 | |||
100 | void (*output_configure)(Ecore_Wl_Output *output, void *data); | ||
101 | void *data; | ||
102 | }; | ||
103 | |||
104 | struct _Ecore_Wl_Output | ||
105 | { | ||
106 | Ecore_Wl_Display *display; | ||
107 | struct wl_output *output; | ||
108 | Eina_Rectangle allocation; | ||
109 | struct wl_list link; | ||
110 | |||
111 | void (*destroy) (Ecore_Wl_Output *output, void *data); | ||
112 | void *data; | ||
113 | }; | ||
114 | |||
115 | struct _Ecore_Wl_Input | ||
116 | { | ||
117 | Ecore_Wl_Display *display; | ||
118 | struct wl_input_device *input_device; | ||
119 | struct wl_data_device *data_device; | ||
120 | |||
121 | Ecore_Wl_Window *pointer_focus; | ||
122 | Ecore_Wl_Window *keyboard_focus; | ||
123 | |||
124 | unsigned int button; | ||
125 | unsigned int timestamp; | ||
126 | unsigned int modifiers; | ||
127 | int sx, sy; | ||
128 | |||
129 | struct wl_list link; | ||
130 | |||
131 | /* TODO: grab */ | ||
132 | unsigned int grab_button; | ||
133 | |||
134 | Ecore_Wl_Dnd_Source *drag_source; | ||
135 | Ecore_Wl_Dnd_Source *selection_source; | ||
136 | }; | ||
137 | |||
138 | struct _Ecore_Wl_Window | ||
139 | { | ||
140 | Ecore_Wl_Display *display; | ||
141 | Ecore_Wl_Window *parent; | ||
142 | |||
143 | struct wl_surface *surface; | ||
144 | struct wl_shell_surface *shell_surface; | ||
145 | |||
146 | int id; | ||
147 | int x, y; | ||
148 | int edges; | ||
149 | |||
150 | Eina_Rectangle allocation, pending_allocation; | ||
151 | Eina_Rectangle saved_allocation, server_allocation; | ||
152 | |||
153 | /* Eina_Bool redraw_scheduled : 1; */ | ||
154 | /* Eina_Bool resize_scheduled : 1; */ | ||
155 | Eina_Bool transparent : 1; | ||
156 | |||
157 | Ecore_Wl_Window_Type type; | ||
158 | Ecore_Wl_Window_Buffer_Type buffer_type; | ||
159 | |||
160 | Ecore_Wl_Input *pointer_device; | ||
161 | Ecore_Wl_Input *keyboard_device; | ||
162 | |||
163 | void *data; | ||
164 | }; | ||
165 | |||
166 | struct _Ecore_Wl_Event_Mouse_In | ||
167 | { | ||
168 | int modifiers; | ||
169 | int x, y; | ||
170 | struct | ||
171 | { | ||
172 | int x, y; | ||
173 | } root; | ||
174 | unsigned int win; | ||
175 | unsigned int event_win; | ||
176 | unsigned int root_win; | ||
177 | unsigned int timestamp; | ||
178 | }; | ||
179 | |||
180 | struct _Ecore_Wl_Event_Mouse_Out | ||
181 | { | ||
182 | int modifiers; | ||
183 | int x, y; | ||
184 | struct | ||
185 | { | ||
186 | int x, y; | ||
187 | } root; | ||
188 | unsigned int win; | ||
189 | unsigned int event_win; | ||
190 | unsigned int root_win; | ||
191 | unsigned int timestamp; | ||
192 | }; | ||
193 | |||
194 | struct _Ecore_Wl_Event_Focus_In | ||
195 | { | ||
196 | unsigned int win; | ||
197 | unsigned int timestamp; | ||
198 | }; | ||
199 | |||
200 | struct _Ecore_Wl_Event_Focus_Out | ||
201 | { | ||
202 | unsigned int win; | ||
203 | unsigned int timestamp; | ||
204 | }; | ||
205 | |||
206 | struct _Ecore_Wl_Event_Window_Configure | ||
207 | { | ||
208 | unsigned int win; | ||
209 | unsigned int event_win; | ||
210 | int x, y, w, h; | ||
211 | unsigned int timestamp; | ||
212 | }; | ||
213 | |||
214 | struct _Ecore_Wl_Event_Dnd_Enter | ||
215 | { | ||
216 | unsigned int win, source; | ||
217 | char **types; | ||
218 | int num_types; | ||
219 | struct | ||
220 | { | ||
221 | int x, y; | ||
222 | } position; | ||
223 | }; | ||
224 | |||
225 | struct _Ecore_Wl_Event_Dnd_Position | ||
226 | { | ||
227 | unsigned int win, source; | ||
228 | struct | ||
229 | { | ||
230 | int x, y; | ||
231 | } position; | ||
232 | }; | ||
233 | |||
234 | struct _Ecore_Wl_Event_Dnd_Leave | ||
235 | { | ||
236 | unsigned int win, source; | ||
237 | }; | ||
238 | |||
239 | struct _Ecore_Wl_Event_Dnd_Drop | ||
240 | { | ||
241 | unsigned int win, source; | ||
242 | struct | ||
243 | { | ||
244 | int x, y; | ||
245 | } position; | ||
246 | }; | ||
247 | |||
248 | struct _Ecore_Wl_Event_Interfaces_Bound | ||
249 | { | ||
250 | Eina_Bool compositor : 1; | ||
251 | Eina_Bool shm : 1; | ||
252 | Eina_Bool shell : 1; | ||
253 | }; | ||
254 | |||
255 | /** | ||
256 | * @file | ||
257 | * @brief Ecore functions for dealing with the Wayland window system | ||
258 | * | ||
259 | * Ecore_Wl provides a wrapper and convenience functions for using the | ||
260 | * Wayland window system. Function groups for this part of the library | ||
261 | * include the following: | ||
262 | * | ||
263 | * @li @ref Ecore_Wl_Init_Group | ||
264 | * @li @ref Ecore_Wl_Display_Group | ||
265 | * @li @ref Ecore_Wl_Flush_Group | ||
266 | * @li @ref Ecore_Wl_Window_Group | ||
267 | */ | ||
268 | |||
269 | EAPI extern int ECORE_WL_EVENT_MOUSE_IN; | ||
270 | EAPI extern int ECORE_WL_EVENT_MOUSE_OUT; | ||
271 | EAPI extern int ECORE_WL_EVENT_FOCUS_IN; | ||
272 | EAPI extern int ECORE_WL_EVENT_FOCUS_OUT; | ||
273 | EAPI extern int ECORE_WL_EVENT_WINDOW_CONFIGURE; | ||
274 | EAPI extern int ECORE_WL_EVENT_DND_ENTER; | ||
275 | EAPI extern int ECORE_WL_EVENT_DND_POSITION; | ||
276 | EAPI extern int ECORE_WL_EVENT_DND_LEAVE; | ||
277 | EAPI extern int ECORE_WL_EVENT_DND_DROP; | ||
278 | EAPI extern int ECORE_WL_EVENT_INTERFACES_BOUND; | ||
279 | |||
280 | EAPI int ecore_wl_init(const char *name); | ||
281 | EAPI int ecore_wl_shutdown(void); | ||
282 | EAPI void ecore_wl_flush(void); | ||
283 | EAPI void ecore_wl_sync(void); | ||
284 | EAPI struct wl_shm *ecore_wl_shm_get(void); | ||
285 | EAPI struct wl_display *ecore_wl_display_get(void); | ||
286 | EAPI void ecore_wl_screen_size_get(int *w, int *h); | ||
287 | EAPI void ecore_wl_pointer_xy_get(int *x, int *y); | ||
288 | |||
289 | EAPI Ecore_Wl_Window *ecore_wl_window_new(Ecore_Wl_Window *parent, int x, int y, int w, int h, int buffer_type); | ||
290 | EAPI void ecore_wl_window_free(Ecore_Wl_Window *win); | ||
291 | EAPI void ecore_wl_window_move(Ecore_Wl_Window *win, int x, int y); | ||
292 | EAPI void ecore_wl_window_resize(Ecore_Wl_Window *win, int w, int h, int location); | ||
293 | EAPI void ecore_wl_window_damage(Ecore_Wl_Window *win, int x, int y, int w, int h); | ||
294 | EAPI void ecore_wl_window_buffer_attach(Ecore_Wl_Window *win, struct wl_buffer *buffer, int x, int y); | ||
295 | EAPI void ecore_wl_window_show(Ecore_Wl_Window *win); | ||
296 | EAPI void ecore_wl_window_hide(Ecore_Wl_Window *win); | ||
297 | EAPI void ecore_wl_window_raise(Ecore_Wl_Window *win); | ||
298 | EAPI void ecore_wl_window_maximized_set(Ecore_Wl_Window *win, Eina_Bool maximized); | ||
299 | EAPI void ecore_wl_window_fullscreen_set(Ecore_Wl_Window *win, Eina_Bool fullscreen); | ||
300 | EAPI void ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h); | ||
301 | EAPI struct wl_surface *ecore_wl_window_surface_get(Ecore_Wl_Window *win); | ||
302 | EAPI Ecore_Wl_Window *ecore_wl_window_find(unsigned int id); | ||
303 | |||
304 | #endif | ||
diff --git a/libraries/ecore/src/lib/ecore_wayland/Makefile.am b/libraries/ecore/src/lib/ecore_wayland/Makefile.am deleted file mode 100644 index f6b801d..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/Makefile.am +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | MAINTAINERCLEANFILES = Makefile.in | ||
2 | |||
3 | AM_CPPFLAGS = \ | ||
4 | -I$(top_srcdir)/src/lib/ecore \ | ||
5 | -I$(top_srcdir)/src/lib/ecore_input \ | ||
6 | -I$(top_builddir)/src/lib/ecore \ | ||
7 | -I$(top_builddir)/src/lib/ecore_input \ | ||
8 | @WAYLAND_CFLAGS@ \ | ||
9 | @EVAS_CFLAGS@ \ | ||
10 | @EINA_CFLAGS@ | ||
11 | |||
12 | lib_LTLIBRARIES = libecore_wayland.la | ||
13 | includes_HEADERS = Ecore_Wayland.h | ||
14 | includesdir = $(includedir)/ecore-@VMAJ@ | ||
15 | |||
16 | libecore_wayland_la_SOURCES = \ | ||
17 | ecore_wl.c \ | ||
18 | ecore_wl_output.c \ | ||
19 | ecore_wl_input.c \ | ||
20 | ecore_wl_window.c \ | ||
21 | ecore_wl_dnd.c | ||
22 | |||
23 | libecore_wayland_la_LIBADD = \ | ||
24 | $(top_builddir)/src/lib/ecore/libecore.la \ | ||
25 | $(top_builddir)/src/lib/ecore_input/libecore_input.la \ | ||
26 | @WAYLAND_LIBS@ \ | ||
27 | @EVAS_LIBS@ \ | ||
28 | @EINA_LIBS@ | ||
29 | |||
30 | libecore_wayland_la_LDFLAGS = -version-info @version_info@ @release_info@ | ||
31 | libecore_wayland_la_DEPENDENCIES = $(top_builddir)/src/lib/ecore/libecore.la | ||
32 | |||
33 | EXTRA_DIST = ecore_wl_private.h | ||
diff --git a/libraries/ecore/src/lib/ecore_wayland/Makefile.in b/libraries/ecore/src/lib/ecore_wayland/Makefile.in deleted file mode 100644 index 39c633d..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/Makefile.in +++ /dev/null | |||
@@ -1,842 +0,0 @@ | |||
1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. | ||
2 | # @configure_input@ | ||
3 | |||
4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, | ||
6 | # Inc. | ||
7 | # This Makefile.in is free software; the Free Software Foundation | ||
8 | # gives unlimited permission to copy and/or distribute it, | ||
9 | # with or without modifications, as long as this notice is preserved. | ||
10 | |||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
14 | # PARTICULAR PURPOSE. | ||
15 | |||
16 | @SET_MAKE@ | ||
17 | |||
18 | |||
19 | VPATH = @srcdir@ | ||
20 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
21 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
22 | pkglibdir = $(libdir)/@PACKAGE@ | ||
23 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | ||
24 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
25 | install_sh_DATA = $(install_sh) -c -m 644 | ||
26 | install_sh_PROGRAM = $(install_sh) -c | ||
27 | install_sh_SCRIPT = $(install_sh) -c | ||
28 | INSTALL_HEADER = $(INSTALL_DATA) | ||
29 | transform = $(program_transform_name) | ||
30 | NORMAL_INSTALL = : | ||
31 | PRE_INSTALL = : | ||
32 | POST_INSTALL = : | ||
33 | NORMAL_UNINSTALL = : | ||
34 | PRE_UNINSTALL = : | ||
35 | POST_UNINSTALL = : | ||
36 | build_triplet = @build@ | ||
37 | host_triplet = @host@ | ||
38 | subdir = src/lib/ecore_wayland | ||
39 | DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \ | ||
40 | $(srcdir)/Makefile.in | ||
41 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
42 | am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ | ||
43 | $(top_srcdir)/m4/ac_path_generic.m4 \ | ||
44 | $(top_srcdir)/m4/check_x_extension.m4 \ | ||
45 | $(top_srcdir)/m4/ecore_check_module.m4 \ | ||
46 | $(top_srcdir)/m4/ecore_check_options.m4 \ | ||
47 | $(top_srcdir)/m4/efl_compiler_flag.m4 \ | ||
48 | $(top_srcdir)/m4/efl_doxygen.m4 \ | ||
49 | $(top_srcdir)/m4/efl_examples.m4 \ | ||
50 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ | ||
51 | $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ | ||
52 | $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ | ||
53 | $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ | ||
54 | $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ | ||
55 | $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ | ||
56 | $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ | ||
57 | $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ | ||
58 | $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac | ||
59 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
60 | $(ACLOCAL_M4) | ||
61 | mkinstalldirs = $(install_sh) -d | ||
62 | CONFIG_HEADER = $(top_builddir)/config.h | ||
63 | CONFIG_CLEAN_FILES = | ||
64 | CONFIG_CLEAN_VPATH_FILES = | ||
65 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
66 | am__vpath_adj = case $$p in \ | ||
67 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
68 | *) f=$$p;; \ | ||
69 | esac; | ||
70 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; | ||
71 | am__install_max = 40 | ||
72 | am__nobase_strip_setup = \ | ||
73 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` | ||
74 | am__nobase_strip = \ | ||
75 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" | ||
76 | am__nobase_list = $(am__nobase_strip_setup); \ | ||
77 | for p in $$list; do echo "$$p $$p"; done | \ | ||
78 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ | ||
79 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ | ||
80 | if (++n[$$2] == $(am__install_max)) \ | ||
81 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ | ||
82 | END { for (dir in files) print dir, files[dir] }' | ||
83 | am__base_list = \ | ||
84 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ | ||
85 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | ||
86 | am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)" | ||
87 | LTLIBRARIES = $(lib_LTLIBRARIES) | ||
88 | am_libecore_wayland_la_OBJECTS = ecore_wl.lo ecore_wl_output.lo \ | ||
89 | ecore_wl_input.lo ecore_wl_window.lo ecore_wl_dnd.lo | ||
90 | libecore_wayland_la_OBJECTS = $(am_libecore_wayland_la_OBJECTS) | ||
91 | AM_V_lt = $(am__v_lt_$(V)) | ||
92 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) | ||
93 | am__v_lt_0 = --silent | ||
94 | libecore_wayland_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ | ||
95 | $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ | ||
96 | $(AM_CFLAGS) $(CFLAGS) $(libecore_wayland_la_LDFLAGS) \ | ||
97 | $(LDFLAGS) -o $@ | ||
98 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) | ||
99 | depcomp = $(SHELL) $(top_srcdir)/depcomp | ||
100 | am__depfiles_maybe = depfiles | ||
101 | am__mv = mv -f | ||
102 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
103 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
104 | LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
105 | $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ | ||
106 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ | ||
107 | $(AM_CFLAGS) $(CFLAGS) | ||
108 | AM_V_CC = $(am__v_CC_$(V)) | ||
109 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) | ||
110 | am__v_CC_0 = @echo " CC " $@; | ||
111 | AM_V_at = $(am__v_at_$(V)) | ||
112 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) | ||
113 | am__v_at_0 = @ | ||
114 | CCLD = $(CC) | ||
115 | LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
116 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | ||
117 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
118 | AM_V_CCLD = $(am__v_CCLD_$(V)) | ||
119 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) | ||
120 | am__v_CCLD_0 = @echo " CCLD " $@; | ||
121 | AM_V_GEN = $(am__v_GEN_$(V)) | ||
122 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) | ||
123 | am__v_GEN_0 = @echo " GEN " $@; | ||
124 | SOURCES = $(libecore_wayland_la_SOURCES) | ||
125 | DIST_SOURCES = $(libecore_wayland_la_SOURCES) | ||
126 | HEADERS = $(includes_HEADERS) | ||
127 | ETAGS = etags | ||
128 | CTAGS = ctags | ||
129 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
130 | ACLOCAL = @ACLOCAL@ | ||
131 | ALLOCA = @ALLOCA@ | ||
132 | AMTAR = @AMTAR@ | ||
133 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
134 | AR = @AR@ | ||
135 | AS = @AS@ | ||
136 | AUTOCONF = @AUTOCONF@ | ||
137 | AUTOHEADER = @AUTOHEADER@ | ||
138 | AUTOMAKE = @AUTOMAKE@ | ||
139 | AWK = @AWK@ | ||
140 | CARES_CFLAGS = @CARES_CFLAGS@ | ||
141 | CARES_LIBS = @CARES_LIBS@ | ||
142 | CC = @CC@ | ||
143 | CCDEPMODE = @CCDEPMODE@ | ||
144 | CFLAGS = @CFLAGS@ | ||
145 | CHECK_CFLAGS = @CHECK_CFLAGS@ | ||
146 | CHECK_LIBS = @CHECK_LIBS@ | ||
147 | CPP = @CPP@ | ||
148 | CPPFLAGS = @CPPFLAGS@ | ||
149 | CURL_CFLAGS = @CURL_CFLAGS@ | ||
150 | CURL_LIBS = @CURL_LIBS@ | ||
151 | CXX = @CXX@ | ||
152 | CXXCPP = @CXXCPP@ | ||
153 | CXXDEPMODE = @CXXDEPMODE@ | ||
154 | CXXFLAGS = @CXXFLAGS@ | ||
155 | CYGPATH_W = @CYGPATH_W@ | ||
156 | DEFS = @DEFS@ | ||
157 | DEPDIR = @DEPDIR@ | ||
158 | DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ | ||
159 | DIRECTFB_LIBS = @DIRECTFB_LIBS@ | ||
160 | DLLTOOL = @DLLTOOL@ | ||
161 | DSYMUTIL = @DSYMUTIL@ | ||
162 | DUMPBIN = @DUMPBIN@ | ||
163 | ECHO_C = @ECHO_C@ | ||
164 | ECHO_N = @ECHO_N@ | ||
165 | ECHO_T = @ECHO_T@ | ||
166 | ECORE_XCB_CFLAGS = @ECORE_XCB_CFLAGS@ | ||
167 | ECORE_XCB_LIBS = @ECORE_XCB_LIBS@ | ||
168 | EFL_ECORE_BUILD = @EFL_ECORE_BUILD@ | ||
169 | EFL_ECORE_CON_BUILD = @EFL_ECORE_CON_BUILD@ | ||
170 | EFL_ECORE_EVAS_BUILD = @EFL_ECORE_EVAS_BUILD@ | ||
171 | EFL_ECORE_FILE_BUILD = @EFL_ECORE_FILE_BUILD@ | ||
172 | EFL_ECORE_IMF_BUILD = @EFL_ECORE_IMF_BUILD@ | ||
173 | EFL_ECORE_IMF_EVAS_BUILD = @EFL_ECORE_IMF_EVAS_BUILD@ | ||
174 | EFL_ECORE_INPUT_BUILD = @EFL_ECORE_INPUT_BUILD@ | ||
175 | EFL_ECORE_INPUT_EVAS_BUILD = @EFL_ECORE_INPUT_EVAS_BUILD@ | ||
176 | EFL_ECORE_IPC_BUILD = @EFL_ECORE_IPC_BUILD@ | ||
177 | EFL_ECORE_PSL1GHT_BUILD = @EFL_ECORE_PSL1GHT_BUILD@ | ||
178 | EFL_ECORE_SDL_BUILD = @EFL_ECORE_SDL_BUILD@ | ||
179 | EFL_ECORE_WIN32_BUILD = @EFL_ECORE_WIN32_BUILD@ | ||
180 | EFL_ECORE_WINCE_BUILD = @EFL_ECORE_WINCE_BUILD@ | ||
181 | EFL_PTHREAD_CFLAGS = @EFL_PTHREAD_CFLAGS@ | ||
182 | EFL_PTHREAD_LIBS = @EFL_PTHREAD_LIBS@ | ||
183 | EGREP = @EGREP@ | ||
184 | EINA_CFLAGS = @EINA_CFLAGS@ | ||
185 | EINA_LIBS = @EINA_LIBS@ | ||
186 | ESCAPE_CFLAGS = @ESCAPE_CFLAGS@ | ||
187 | ESCAPE_LIBS = @ESCAPE_LIBS@ | ||
188 | EVAS_CFLAGS = @EVAS_CFLAGS@ | ||
189 | EVAS_LIBS = @EVAS_LIBS@ | ||
190 | EVIL_CFLAGS = @EVIL_CFLAGS@ | ||
191 | EVIL_LIBS = @EVIL_LIBS@ | ||
192 | EXEEXT = @EXEEXT@ | ||
193 | EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ | ||
194 | EXOTIC_LIBS = @EXOTIC_LIBS@ | ||
195 | FGREP = @FGREP@ | ||
196 | GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ | ||
197 | GLIB_CFLAGS = @GLIB_CFLAGS@ | ||
198 | GLIB_LIBS = @GLIB_LIBS@ | ||
199 | GMSGFMT = @GMSGFMT@ | ||
200 | GMSGFMT_015 = @GMSGFMT_015@ | ||
201 | GREP = @GREP@ | ||
202 | INSTALL = @INSTALL@ | ||
203 | INSTALL_DATA = @INSTALL_DATA@ | ||
204 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
205 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
206 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
207 | INTLLIBS = @INTLLIBS@ | ||
208 | INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ | ||
209 | KEYSYMDEFS = @KEYSYMDEFS@ | ||
210 | LD = @LD@ | ||
211 | LDFLAGS = @LDFLAGS@ | ||
212 | LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ | ||
213 | LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ | ||
214 | LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ | ||
215 | LIBICONV = @LIBICONV@ | ||
216 | LIBINTL = @LIBINTL@ | ||
217 | LIBOBJS = @LIBOBJS@ | ||
218 | LIBS = @LIBS@ | ||
219 | LIBTOOL = @LIBTOOL@ | ||
220 | LIPO = @LIPO@ | ||
221 | LN_S = @LN_S@ | ||
222 | LTLIBICONV = @LTLIBICONV@ | ||
223 | LTLIBINTL = @LTLIBINTL@ | ||
224 | LTLIBOBJS = @LTLIBOBJS@ | ||
225 | MAKEINFO = @MAKEINFO@ | ||
226 | MKDIR_P = @MKDIR_P@ | ||
227 | MSGFMT = @MSGFMT@ | ||
228 | MSGFMT_015 = @MSGFMT_015@ | ||
229 | MSGMERGE = @MSGMERGE@ | ||
230 | NM = @NM@ | ||
231 | NMEDIT = @NMEDIT@ | ||
232 | OBJC = @OBJC@ | ||
233 | OBJCDEPMODE = @OBJCDEPMODE@ | ||
234 | OBJCFLAGS = @OBJCFLAGS@ | ||
235 | OBJDUMP = @OBJDUMP@ | ||
236 | OBJEXT = @OBJEXT@ | ||
237 | OTOOL = @OTOOL@ | ||
238 | OTOOL64 = @OTOOL64@ | ||
239 | PACKAGE = @PACKAGE@ | ||
240 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
241 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
242 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
243 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
244 | PACKAGE_URL = @PACKAGE_URL@ | ||
245 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
246 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
247 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | ||
248 | PIXMAN_LIBS = @PIXMAN_LIBS@ | ||
249 | PKG_CONFIG = @PKG_CONFIG@ | ||
250 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
251 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
252 | POSUB = @POSUB@ | ||
253 | RANLIB = @RANLIB@ | ||
254 | SCIM_CFLAGS = @SCIM_CFLAGS@ | ||
255 | SCIM_LIBS = @SCIM_LIBS@ | ||
256 | SDL_CFLAGS = @SDL_CFLAGS@ | ||
257 | SDL_CONFIG = @SDL_CONFIG@ | ||
258 | SDL_LIBS = @SDL_LIBS@ | ||
259 | SED = @SED@ | ||
260 | SET_MAKE = @SET_MAKE@ | ||
261 | SHELL = @SHELL@ | ||
262 | SHM_OPEN_LIBS = @SHM_OPEN_LIBS@ | ||
263 | SSL_CFLAGS = @SSL_CFLAGS@ | ||
264 | SSL_LIBS = @SSL_LIBS@ | ||
265 | STRIP = @STRIP@ | ||
266 | TLS2_CFLAGS = @TLS2_CFLAGS@ | ||
267 | TLS2_LIBS = @TLS2_LIBS@ | ||
268 | TLS_CFLAGS = @TLS_CFLAGS@ | ||
269 | TLS_LIBS = @TLS_LIBS@ | ||
270 | TSLIB_CFLAGS = @TSLIB_CFLAGS@ | ||
271 | TSLIB_LIBS = @TSLIB_LIBS@ | ||
272 | USE_NLS = @USE_NLS@ | ||
273 | VERSION = @VERSION@ | ||
274 | VMAJ = @VMAJ@ | ||
275 | WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ | ||
276 | WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ | ||
277 | WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ | ||
278 | WAYLAND_LIBS = @WAYLAND_LIBS@ | ||
279 | WIN32_CFLAGS = @WIN32_CFLAGS@ | ||
280 | WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ | ||
281 | WIN32_LIBS = @WIN32_LIBS@ | ||
282 | XCB_COMPOSITE_CFLAGS = @XCB_COMPOSITE_CFLAGS@ | ||
283 | XCB_COMPOSITE_LIBS = @XCB_COMPOSITE_LIBS@ | ||
284 | XCB_CURSOR_CFLAGS = @XCB_CURSOR_CFLAGS@ | ||
285 | XCB_CURSOR_LIBS = @XCB_CURSOR_LIBS@ | ||
286 | XCB_DAMAGE_CFLAGS = @XCB_DAMAGE_CFLAGS@ | ||
287 | XCB_DAMAGE_LIBS = @XCB_DAMAGE_LIBS@ | ||
288 | XCB_DPMS_CFLAGS = @XCB_DPMS_CFLAGS@ | ||
289 | XCB_DPMS_LIBS = @XCB_DPMS_LIBS@ | ||
290 | XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@ | ||
291 | XCB_RANDR_LIBS = @XCB_RANDR_LIBS@ | ||
292 | XCB_RENDER_CFLAGS = @XCB_RENDER_CFLAGS@ | ||
293 | XCB_RENDER_LIBS = @XCB_RENDER_LIBS@ | ||
294 | XCB_SCREENSAVER_CFLAGS = @XCB_SCREENSAVER_CFLAGS@ | ||
295 | XCB_SCREENSAVER_LIBS = @XCB_SCREENSAVER_LIBS@ | ||
296 | XCB_SHAPE_CFLAGS = @XCB_SHAPE_CFLAGS@ | ||
297 | XCB_SHAPE_LIBS = @XCB_SHAPE_LIBS@ | ||
298 | XCB_SYNC_CFLAGS = @XCB_SYNC_CFLAGS@ | ||
299 | XCB_SYNC_LIBS = @XCB_SYNC_LIBS@ | ||
300 | XCB_X11_CFLAGS = @XCB_X11_CFLAGS@ | ||
301 | XCB_X11_LIBS = @XCB_X11_LIBS@ | ||
302 | XCB_XFIXES_CFLAGS = @XCB_XFIXES_CFLAGS@ | ||
303 | XCB_XFIXES_LIBS = @XCB_XFIXES_LIBS@ | ||
304 | XCB_XGESTURE_CFLAGS = @XCB_XGESTURE_CFLAGS@ | ||
305 | XCB_XGESTURE_LIBS = @XCB_XGESTURE_LIBS@ | ||
306 | XCB_XINERAMA_CFLAGS = @XCB_XINERAMA_CFLAGS@ | ||
307 | XCB_XINERAMA_LIBS = @XCB_XINERAMA_LIBS@ | ||
308 | XCB_XINPUT_CFLAGS = @XCB_XINPUT_CFLAGS@ | ||
309 | XCB_XINPUT_LIBS = @XCB_XINPUT_LIBS@ | ||
310 | XCB_XPRINT_CFLAGS = @XCB_XPRINT_CFLAGS@ | ||
311 | XCB_XPRINT_LIBS = @XCB_XPRINT_LIBS@ | ||
312 | XCB_XTEST_CFLAGS = @XCB_XTEST_CFLAGS@ | ||
313 | XCB_XTEST_LIBS = @XCB_XTEST_LIBS@ | ||
314 | XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ | ||
315 | XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ | ||
316 | XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ | ||
317 | XDAMAGE_LIBS = @XDAMAGE_LIBS@ | ||
318 | XDPMS_CFLAGS = @XDPMS_CFLAGS@ | ||
319 | XDPMS_LIBS = @XDPMS_LIBS@ | ||
320 | XFIXES_CFLAGS = @XFIXES_CFLAGS@ | ||
321 | XFIXES_LIBS = @XFIXES_LIBS@ | ||
322 | XGESTURE_CFLAGS = @XGESTURE_CFLAGS@ | ||
323 | XGESTURE_LIBS = @XGESTURE_LIBS@ | ||
324 | XGETTEXT = @XGETTEXT@ | ||
325 | XGETTEXT_015 = @XGETTEXT_015@ | ||
326 | XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ | ||
327 | XI2_CFLAGS = @XI2_CFLAGS@ | ||
328 | XI2_LIBS = @XI2_LIBS@ | ||
329 | XINERAMA_CFLAGS = @XINERAMA_CFLAGS@ | ||
330 | XINERAMA_LIBS = @XINERAMA_LIBS@ | ||
331 | XKB_CFLAGS = @XKB_CFLAGS@ | ||
332 | XKB_LIBS = @XKB_LIBS@ | ||
333 | XMKMF = @XMKMF@ | ||
334 | XPRINT_CFLAGS = @XPRINT_CFLAGS@ | ||
335 | XPRINT_LIBS = @XPRINT_LIBS@ | ||
336 | XRANDR_CFLAGS = @XRANDR_CFLAGS@ | ||
337 | XRANDR_LIBS = @XRANDR_LIBS@ | ||
338 | XRENDER_CFLAGS = @XRENDER_CFLAGS@ | ||
339 | XRENDER_LIBS = @XRENDER_LIBS@ | ||
340 | XSS_CFLAGS = @XSS_CFLAGS@ | ||
341 | XSS_LIBS = @XSS_LIBS@ | ||
342 | XTEST_CFLAGS = @XTEST_CFLAGS@ | ||
343 | XTEST_LIBS = @XTEST_LIBS@ | ||
344 | X_CFLAGS = @X_CFLAGS@ | ||
345 | X_EXTRA_LIBS = @X_EXTRA_LIBS@ | ||
346 | X_LIBS = @X_LIBS@ | ||
347 | X_PRE_LIBS = @X_PRE_LIBS@ | ||
348 | Xcursor_cflags = @Xcursor_cflags@ | ||
349 | Xcursor_libs = @Xcursor_libs@ | ||
350 | abs_builddir = @abs_builddir@ | ||
351 | abs_srcdir = @abs_srcdir@ | ||
352 | abs_top_builddir = @abs_top_builddir@ | ||
353 | abs_top_srcdir = @abs_top_srcdir@ | ||
354 | ac_ct_CC = @ac_ct_CC@ | ||
355 | ac_ct_CXX = @ac_ct_CXX@ | ||
356 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ | ||
357 | ac_ct_OBJC = @ac_ct_OBJC@ | ||
358 | am__include = @am__include@ | ||
359 | am__leading_dot = @am__leading_dot@ | ||
360 | am__quote = @am__quote@ | ||
361 | am__tar = @am__tar@ | ||
362 | am__untar = @am__untar@ | ||
363 | bindir = @bindir@ | ||
364 | build = @build@ | ||
365 | build_alias = @build_alias@ | ||
366 | build_cpu = @build_cpu@ | ||
367 | build_os = @build_os@ | ||
368 | build_vendor = @build_vendor@ | ||
369 | builddir = @builddir@ | ||
370 | cocoa_ldflags = @cocoa_ldflags@ | ||
371 | datadir = @datadir@ | ||
372 | datarootdir = @datarootdir@ | ||
373 | dlopen_libs = @dlopen_libs@ | ||
374 | docdir = @docdir@ | ||
375 | dvidir = @dvidir@ | ||
376 | ecore_cocoa_cflags = @ecore_cocoa_cflags@ | ||
377 | ecore_cocoa_libs = @ecore_cocoa_libs@ | ||
378 | ecore_con_cflags = @ecore_con_cflags@ | ||
379 | ecore_con_libs = @ecore_con_libs@ | ||
380 | ecore_directfb_cflags = @ecore_directfb_cflags@ | ||
381 | ecore_directfb_libs = @ecore_directfb_libs@ | ||
382 | ecore_evas_cflags = @ecore_evas_cflags@ | ||
383 | ecore_evas_libs = @ecore_evas_libs@ | ||
384 | ecore_fb_cflags = @ecore_fb_cflags@ | ||
385 | ecore_fb_libs = @ecore_fb_libs@ | ||
386 | ecore_file_cflags = @ecore_file_cflags@ | ||
387 | ecore_file_libs = @ecore_file_libs@ | ||
388 | ecore_imf_cflags = @ecore_imf_cflags@ | ||
389 | ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ | ||
390 | ecore_imf_evas_libs = @ecore_imf_evas_libs@ | ||
391 | ecore_imf_libs = @ecore_imf_libs@ | ||
392 | ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ | ||
393 | ecore_imf_scim_libs = @ecore_imf_scim_libs@ | ||
394 | ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ | ||
395 | ecore_imf_xim_libs = @ecore_imf_xim_libs@ | ||
396 | ecore_input_cflags = @ecore_input_cflags@ | ||
397 | ecore_input_evas_cflags = @ecore_input_evas_cflags@ | ||
398 | ecore_input_evas_libs = @ecore_input_evas_libs@ | ||
399 | ecore_input_libs = @ecore_input_libs@ | ||
400 | ecore_ipc_cflags = @ecore_ipc_cflags@ | ||
401 | ecore_ipc_libs = @ecore_ipc_libs@ | ||
402 | ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ | ||
403 | ecore_psl1ght_libs = @ecore_psl1ght_libs@ | ||
404 | ecore_sdl_cflags = @ecore_sdl_cflags@ | ||
405 | ecore_sdl_libs = @ecore_sdl_libs@ | ||
406 | ecore_wayland_cflags = @ecore_wayland_cflags@ | ||
407 | ecore_wayland_libs = @ecore_wayland_libs@ | ||
408 | ecore_win32_cflags = @ecore_win32_cflags@ | ||
409 | ecore_win32_libs = @ecore_win32_libs@ | ||
410 | ecore_wince_cflags = @ecore_wince_cflags@ | ||
411 | ecore_wince_libs = @ecore_wince_libs@ | ||
412 | ecore_x_cflags = @ecore_x_cflags@ | ||
413 | ecore_x_libs = @ecore_x_libs@ | ||
414 | ecore_x_libs_private = @ecore_x_libs_private@ | ||
415 | efl_doxygen = @efl_doxygen@ | ||
416 | efl_have_doxygen = @efl_have_doxygen@ | ||
417 | exec_prefix = @exec_prefix@ | ||
418 | have_ecore_x_xcb_define = @have_ecore_x_xcb_define@ | ||
419 | host = @host@ | ||
420 | host_alias = @host_alias@ | ||
421 | host_cpu = @host_cpu@ | ||
422 | host_os = @host_os@ | ||
423 | host_vendor = @host_vendor@ | ||
424 | htmldir = @htmldir@ | ||
425 | includedir = @includedir@ | ||
426 | infodir = @infodir@ | ||
427 | install_sh = @install_sh@ | ||
428 | libdir = @libdir@ | ||
429 | libexecdir = @libexecdir@ | ||
430 | localedir = @localedir@ | ||
431 | localstatedir = @localstatedir@ | ||
432 | lt_ECHO = @lt_ECHO@ | ||
433 | lt_enable_auto_import = @lt_enable_auto_import@ | ||
434 | mandir = @mandir@ | ||
435 | mkdir_p = @mkdir_p@ | ||
436 | oldincludedir = @oldincludedir@ | ||
437 | pdfdir = @pdfdir@ | ||
438 | pkgconfig_requires_private = @pkgconfig_requires_private@ | ||
439 | prefix = @prefix@ | ||
440 | program_transform_name = @program_transform_name@ | ||
441 | psdir = @psdir@ | ||
442 | release_info = @release_info@ | ||
443 | requirements_ecore = @requirements_ecore@ | ||
444 | requirements_ecore_cocoa = @requirements_ecore_cocoa@ | ||
445 | requirements_ecore_con = @requirements_ecore_con@ | ||
446 | requirements_ecore_directfb = @requirements_ecore_directfb@ | ||
447 | requirements_ecore_evas = @requirements_ecore_evas@ | ||
448 | requirements_ecore_fb = @requirements_ecore_fb@ | ||
449 | requirements_ecore_file = @requirements_ecore_file@ | ||
450 | requirements_ecore_imf = @requirements_ecore_imf@ | ||
451 | requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ | ||
452 | requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ | ||
453 | requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ | ||
454 | requirements_ecore_input = @requirements_ecore_input@ | ||
455 | requirements_ecore_input_evas = @requirements_ecore_input_evas@ | ||
456 | requirements_ecore_ipc = @requirements_ecore_ipc@ | ||
457 | requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ | ||
458 | requirements_ecore_sdl = @requirements_ecore_sdl@ | ||
459 | requirements_ecore_wayland = @requirements_ecore_wayland@ | ||
460 | requirements_ecore_win32 = @requirements_ecore_win32@ | ||
461 | requirements_ecore_wince = @requirements_ecore_wince@ | ||
462 | requirements_ecore_x = @requirements_ecore_x@ | ||
463 | rt_libs = @rt_libs@ | ||
464 | sbindir = @sbindir@ | ||
465 | sharedstatedir = @sharedstatedir@ | ||
466 | srcdir = @srcdir@ | ||
467 | sysconfdir = @sysconfdir@ | ||
468 | target_alias = @target_alias@ | ||
469 | top_build_prefix = @top_build_prefix@ | ||
470 | top_builddir = @top_builddir@ | ||
471 | top_srcdir = @top_srcdir@ | ||
472 | version_info = @version_info@ | ||
473 | x_cflags = @x_cflags@ | ||
474 | x_includes = @x_includes@ | ||
475 | x_libs = @x_libs@ | ||
476 | MAINTAINERCLEANFILES = Makefile.in | ||
477 | AM_CPPFLAGS = \ | ||
478 | -I$(top_srcdir)/src/lib/ecore \ | ||
479 | -I$(top_srcdir)/src/lib/ecore_input \ | ||
480 | -I$(top_builddir)/src/lib/ecore \ | ||
481 | -I$(top_builddir)/src/lib/ecore_input \ | ||
482 | @WAYLAND_CFLAGS@ \ | ||
483 | @EVAS_CFLAGS@ \ | ||
484 | @EINA_CFLAGS@ | ||
485 | |||
486 | lib_LTLIBRARIES = libecore_wayland.la | ||
487 | includes_HEADERS = Ecore_Wayland.h | ||
488 | includesdir = $(includedir)/ecore-@VMAJ@ | ||
489 | libecore_wayland_la_SOURCES = \ | ||
490 | ecore_wl.c \ | ||
491 | ecore_wl_output.c \ | ||
492 | ecore_wl_input.c \ | ||
493 | ecore_wl_window.c \ | ||
494 | ecore_wl_dnd.c | ||
495 | |||
496 | libecore_wayland_la_LIBADD = \ | ||
497 | $(top_builddir)/src/lib/ecore/libecore.la \ | ||
498 | $(top_builddir)/src/lib/ecore_input/libecore_input.la \ | ||
499 | @WAYLAND_LIBS@ \ | ||
500 | @EVAS_LIBS@ \ | ||
501 | @EINA_LIBS@ | ||
502 | |||
503 | libecore_wayland_la_LDFLAGS = -version-info @version_info@ @release_info@ | ||
504 | libecore_wayland_la_DEPENDENCIES = $(top_builddir)/src/lib/ecore/libecore.la | ||
505 | EXTRA_DIST = ecore_wl_private.h | ||
506 | all: all-am | ||
507 | |||
508 | .SUFFIXES: | ||
509 | .SUFFIXES: .c .lo .o .obj | ||
510 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
511 | @for dep in $?; do \ | ||
512 | case '$(am__configure_deps)' in \ | ||
513 | *$$dep*) \ | ||
514 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | ||
515 | && { if test -f $@; then exit 0; else break; fi; }; \ | ||
516 | exit 1;; \ | ||
517 | esac; \ | ||
518 | done; \ | ||
519 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/ecore_wayland/Makefile'; \ | ||
520 | $(am__cd) $(top_srcdir) && \ | ||
521 | $(AUTOMAKE) --gnu src/lib/ecore_wayland/Makefile | ||
522 | .PRECIOUS: Makefile | ||
523 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
524 | @case '$?' in \ | ||
525 | *config.status*) \ | ||
526 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
527 | *) \ | ||
528 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
529 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
530 | esac; | ||
531 | |||
532 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
533 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
534 | |||
535 | $(top_srcdir)/configure: $(am__configure_deps) | ||
536 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
537 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
538 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
539 | $(am__aclocal_m4_deps): | ||
540 | install-libLTLIBRARIES: $(lib_LTLIBRARIES) | ||
541 | @$(NORMAL_INSTALL) | ||
542 | test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" | ||
543 | @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ | ||
544 | list2=; for p in $$list; do \ | ||
545 | if test -f $$p; then \ | ||
546 | list2="$$list2 $$p"; \ | ||
547 | else :; fi; \ | ||
548 | done; \ | ||
549 | test -z "$$list2" || { \ | ||
550 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ | ||
551 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ | ||
552 | } | ||
553 | |||
554 | uninstall-libLTLIBRARIES: | ||
555 | @$(NORMAL_UNINSTALL) | ||
556 | @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ | ||
557 | for p in $$list; do \ | ||
558 | $(am__strip_dir) \ | ||
559 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ | ||
560 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ | ||
561 | done | ||
562 | |||
563 | clean-libLTLIBRARIES: | ||
564 | -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) | ||
565 | @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ | ||
566 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
567 | test "$$dir" != "$$p" || dir=.; \ | ||
568 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
569 | rm -f "$${dir}/so_locations"; \ | ||
570 | done | ||
571 | libecore_wayland.la: $(libecore_wayland_la_OBJECTS) $(libecore_wayland_la_DEPENDENCIES) | ||
572 | $(AM_V_CCLD)$(libecore_wayland_la_LINK) -rpath $(libdir) $(libecore_wayland_la_OBJECTS) $(libecore_wayland_la_LIBADD) $(LIBS) | ||
573 | |||
574 | mostlyclean-compile: | ||
575 | -rm -f *.$(OBJEXT) | ||
576 | |||
577 | distclean-compile: | ||
578 | -rm -f *.tab.c | ||
579 | |||
580 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wl.Plo@am__quote@ | ||
581 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wl_dnd.Plo@am__quote@ | ||
582 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wl_input.Plo@am__quote@ | ||
583 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wl_output.Plo@am__quote@ | ||
584 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wl_window.Plo@am__quote@ | ||
585 | |||
586 | .c.o: | ||
587 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
588 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
589 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
590 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
591 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
592 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
593 | |||
594 | .c.obj: | ||
595 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
596 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
597 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
598 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
599 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
600 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
601 | |||
602 | .c.lo: | ||
603 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
604 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
605 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
606 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
607 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
608 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
609 | |||
610 | mostlyclean-libtool: | ||
611 | -rm -f *.lo | ||
612 | |||
613 | clean-libtool: | ||
614 | -rm -rf .libs _libs | ||
615 | install-includesHEADERS: $(includes_HEADERS) | ||
616 | @$(NORMAL_INSTALL) | ||
617 | test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" | ||
618 | @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ | ||
619 | for p in $$list; do \ | ||
620 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | ||
621 | echo "$$d$$p"; \ | ||
622 | done | $(am__base_list) | \ | ||
623 | while read files; do \ | ||
624 | echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ | ||
625 | $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ | ||
626 | done | ||
627 | |||
628 | uninstall-includesHEADERS: | ||
629 | @$(NORMAL_UNINSTALL) | ||
630 | @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ | ||
631 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ | ||
632 | test -n "$$files" || exit 0; \ | ||
633 | echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ | ||
634 | cd "$(DESTDIR)$(includesdir)" && rm -f $$files | ||
635 | |||
636 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
637 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
638 | unique=`for i in $$list; do \ | ||
639 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
640 | done | \ | ||
641 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
642 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
643 | mkid -fID $$unique | ||
644 | tags: TAGS | ||
645 | |||
646 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
647 | $(TAGS_FILES) $(LISP) | ||
648 | set x; \ | ||
649 | here=`pwd`; \ | ||
650 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
651 | unique=`for i in $$list; do \ | ||
652 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
653 | done | \ | ||
654 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
655 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
656 | shift; \ | ||
657 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
658 | test -n "$$unique" || unique=$$empty_fix; \ | ||
659 | if test $$# -gt 0; then \ | ||
660 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
661 | "$$@" $$unique; \ | ||
662 | else \ | ||
663 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
664 | $$unique; \ | ||
665 | fi; \ | ||
666 | fi | ||
667 | ctags: CTAGS | ||
668 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
669 | $(TAGS_FILES) $(LISP) | ||
670 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
671 | unique=`for i in $$list; do \ | ||
672 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
673 | done | \ | ||
674 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
675 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
676 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
677 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
678 | $$unique | ||
679 | |||
680 | GTAGS: | ||
681 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
682 | && $(am__cd) $(top_srcdir) \ | ||
683 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
684 | |||
685 | distclean-tags: | ||
686 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
687 | |||
688 | distdir: $(DISTFILES) | ||
689 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
690 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
691 | list='$(DISTFILES)'; \ | ||
692 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
693 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
694 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
695 | case $$dist_files in \ | ||
696 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
697 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
698 | sort -u` ;; \ | ||
699 | esac; \ | ||
700 | for file in $$dist_files; do \ | ||
701 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
702 | if test -d $$d/$$file; then \ | ||
703 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
704 | if test -d "$(distdir)/$$file"; then \ | ||
705 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
706 | fi; \ | ||
707 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
708 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
709 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
710 | fi; \ | ||
711 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
712 | else \ | ||
713 | test -f "$(distdir)/$$file" \ | ||
714 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
715 | || exit 1; \ | ||
716 | fi; \ | ||
717 | done | ||
718 | check-am: all-am | ||
719 | check: check-am | ||
720 | all-am: Makefile $(LTLIBRARIES) $(HEADERS) | ||
721 | installdirs: | ||
722 | for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \ | ||
723 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
724 | done | ||
725 | install: install-am | ||
726 | install-exec: install-exec-am | ||
727 | install-data: install-data-am | ||
728 | uninstall: uninstall-am | ||
729 | |||
730 | install-am: all-am | ||
731 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
732 | |||
733 | installcheck: installcheck-am | ||
734 | install-strip: | ||
735 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
736 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
737 | `test -z '$(STRIP)' || \ | ||
738 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
739 | mostlyclean-generic: | ||
740 | |||
741 | clean-generic: | ||
742 | |||
743 | distclean-generic: | ||
744 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
745 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
746 | |||
747 | maintainer-clean-generic: | ||
748 | @echo "This command is intended for maintainers to use" | ||
749 | @echo "it deletes files that may require special tools to rebuild." | ||
750 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | ||
751 | clean: clean-am | ||
752 | |||
753 | clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ | ||
754 | mostlyclean-am | ||
755 | |||
756 | distclean: distclean-am | ||
757 | -rm -rf ./$(DEPDIR) | ||
758 | -rm -f Makefile | ||
759 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
760 | distclean-tags | ||
761 | |||
762 | dvi: dvi-am | ||
763 | |||
764 | dvi-am: | ||
765 | |||
766 | html: html-am | ||
767 | |||
768 | html-am: | ||
769 | |||
770 | info: info-am | ||
771 | |||
772 | info-am: | ||
773 | |||
774 | install-data-am: install-includesHEADERS | ||
775 | |||
776 | install-dvi: install-dvi-am | ||
777 | |||
778 | install-dvi-am: | ||
779 | |||
780 | install-exec-am: install-libLTLIBRARIES | ||
781 | |||
782 | install-html: install-html-am | ||
783 | |||
784 | install-html-am: | ||
785 | |||
786 | install-info: install-info-am | ||
787 | |||
788 | install-info-am: | ||
789 | |||
790 | install-man: | ||
791 | |||
792 | install-pdf: install-pdf-am | ||
793 | |||
794 | install-pdf-am: | ||
795 | |||
796 | install-ps: install-ps-am | ||
797 | |||
798 | install-ps-am: | ||
799 | |||
800 | installcheck-am: | ||
801 | |||
802 | maintainer-clean: maintainer-clean-am | ||
803 | -rm -rf ./$(DEPDIR) | ||
804 | -rm -f Makefile | ||
805 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
806 | |||
807 | mostlyclean: mostlyclean-am | ||
808 | |||
809 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
810 | mostlyclean-libtool | ||
811 | |||
812 | pdf: pdf-am | ||
813 | |||
814 | pdf-am: | ||
815 | |||
816 | ps: ps-am | ||
817 | |||
818 | ps-am: | ||
819 | |||
820 | uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES | ||
821 | |||
822 | .MAKE: install-am install-strip | ||
823 | |||
824 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
825 | clean-libLTLIBRARIES clean-libtool ctags distclean \ | ||
826 | distclean-compile distclean-generic distclean-libtool \ | ||
827 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
828 | install install-am install-data install-data-am install-dvi \ | ||
829 | install-dvi-am install-exec install-exec-am install-html \ | ||
830 | install-html-am install-includesHEADERS install-info \ | ||
831 | install-info-am install-libLTLIBRARIES install-man install-pdf \ | ||
832 | install-pdf-am install-ps install-ps-am install-strip \ | ||
833 | installcheck installcheck-am installdirs maintainer-clean \ | ||
834 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
835 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
836 | tags uninstall uninstall-am uninstall-includesHEADERS \ | ||
837 | uninstall-libLTLIBRARIES | ||
838 | |||
839 | |||
840 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
841 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
842 | .NOEXPORT: | ||
diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c b/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c deleted file mode 100644 index 5f1b20d..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c +++ /dev/null | |||
@@ -1,551 +0,0 @@ | |||
1 | #ifdef HAVE_CONFIG_H | ||
2 | # include <config.h> | ||
3 | #endif | ||
4 | |||
5 | #include <fcntl.h> | ||
6 | |||
7 | /* FIXME: This gives BTN_LEFT/RIGHT/MIDDLE for linux systems ... | ||
8 | * What about other OSs ?? */ | ||
9 | #ifdef __linux__ | ||
10 | # include <linux/input.h> | ||
11 | #else | ||
12 | # define BTN_LEFT 0x110 | ||
13 | # define BTN_RIGHT 0x111 | ||
14 | # define BTN_MIDDLE 0x112 | ||
15 | # define BTN_SIDE 0x113 | ||
16 | # define BTN_EXTRA 0x114 | ||
17 | # define BTN_FORWARD 0x115 | ||
18 | # define BTN_BACK 0x116 | ||
19 | #endif | ||
20 | |||
21 | #include "Ecore.h" | ||
22 | #include "ecore_private.h" | ||
23 | #include "Ecore_Input.h" | ||
24 | #include "ecore_wl_private.h" | ||
25 | #include "Ecore_Wayland.h" | ||
26 | |||
27 | /* local function prototypes */ | ||
28 | static Eina_Bool _ecore_wl_shutdown(Eina_Bool close); | ||
29 | static int _ecore_wl_cb_event_mask_update(unsigned int mask, void *data); | ||
30 | static Eina_Bool _ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl __UNUSED__); | ||
31 | static void _ecore_wl_cb_handle_global(struct wl_display *disp, unsigned int id, const char *interface, unsigned int version __UNUSED__, void *data); | ||
32 | static Eina_Bool _ecore_wl_egl_init(Ecore_Wl_Display *ewd); | ||
33 | static Eina_Bool _ecore_wl_egl_shutdown(Ecore_Wl_Display *ewd); | ||
34 | static Eina_Bool _ecore_wl_xkb_init(Ecore_Wl_Display *ewd); | ||
35 | static Eina_Bool _ecore_wl_xkb_shutdown(Ecore_Wl_Display *ewd); | ||
36 | |||
37 | /* local variables */ | ||
38 | static int _ecore_wl_init_count = 0; | ||
39 | |||
40 | /* external variables */ | ||
41 | int _ecore_wl_log_dom = -1; | ||
42 | Ecore_Wl_Display *_ecore_wl_disp = NULL; | ||
43 | |||
44 | EAPI int ECORE_WL_EVENT_MOUSE_IN = 0; | ||
45 | EAPI int ECORE_WL_EVENT_MOUSE_OUT = 0; | ||
46 | EAPI int ECORE_WL_EVENT_FOCUS_IN = 0; | ||
47 | EAPI int ECORE_WL_EVENT_FOCUS_OUT = 0; | ||
48 | EAPI int ECORE_WL_EVENT_WINDOW_CONFIGURE = 0; | ||
49 | EAPI int ECORE_WL_EVENT_DND_ENTER = 0; | ||
50 | EAPI int ECORE_WL_EVENT_DND_POSITION = 0; | ||
51 | EAPI int ECORE_WL_EVENT_DND_LEAVE = 0; | ||
52 | EAPI int ECORE_WL_EVENT_DND_DROP = 0; | ||
53 | EAPI int ECORE_WL_EVENT_INTERFACES_BOUND = 0; | ||
54 | |||
55 | /** | ||
56 | * @defgroup Ecore_Wl_Init_Group Wayland Library Init and Shutdown Functions | ||
57 | * | ||
58 | * Functions that start and shutdown the Ecore Wayland Library. | ||
59 | */ | ||
60 | |||
61 | /** | ||
62 | * Initialize the Wayland display connection to the given display. | ||
63 | * | ||
64 | * @param name Display target name. if @c NULL, the default display is | ||
65 | * assumed. | ||
66 | * @return The number of times the library has been initialized without being | ||
67 | * shut down. 0 is returned if an error occurs. | ||
68 | * | ||
69 | * @ingroup Ecore_Wl_Init_Group | ||
70 | */ | ||
71 | EAPI int | ||
72 | ecore_wl_init(const char *name) | ||
73 | { | ||
74 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
75 | |||
76 | if (++_ecore_wl_init_count != 1) return _ecore_wl_init_count; | ||
77 | |||
78 | if (!eina_init()) return --_ecore_wl_init_count; | ||
79 | |||
80 | _ecore_wl_log_dom = | ||
81 | eina_log_domain_register("ecore_wl", ECORE_WL_DEFAULT_LOG_COLOR); | ||
82 | if (_ecore_wl_log_dom < 0) | ||
83 | { | ||
84 | EINA_LOG_ERR("Cannot create a log domain for Ecore Wayland"); | ||
85 | eina_shutdown(); | ||
86 | return --_ecore_wl_init_count; | ||
87 | } | ||
88 | |||
89 | if (!ecore_init()) | ||
90 | { | ||
91 | ERR("Could not initialize ecore"); | ||
92 | eina_log_domain_unregister(_ecore_wl_log_dom); | ||
93 | _ecore_wl_log_dom = -1; | ||
94 | eina_shutdown(); | ||
95 | return --_ecore_wl_init_count; | ||
96 | } | ||
97 | |||
98 | if (!ecore_event_init()) | ||
99 | { | ||
100 | ERR("Could not initialize ecore_event"); | ||
101 | eina_log_domain_unregister(_ecore_wl_log_dom); | ||
102 | _ecore_wl_log_dom = -1; | ||
103 | ecore_shutdown(); | ||
104 | eina_shutdown(); | ||
105 | return --_ecore_wl_init_count; | ||
106 | } | ||
107 | |||
108 | if (!ECORE_WL_EVENT_MOUSE_IN) | ||
109 | { | ||
110 | ECORE_WL_EVENT_MOUSE_IN = ecore_event_type_new(); | ||
111 | ECORE_WL_EVENT_MOUSE_OUT = ecore_event_type_new(); | ||
112 | ECORE_WL_EVENT_FOCUS_IN = ecore_event_type_new(); | ||
113 | ECORE_WL_EVENT_FOCUS_OUT = ecore_event_type_new(); | ||
114 | ECORE_WL_EVENT_WINDOW_CONFIGURE = ecore_event_type_new(); | ||
115 | ECORE_WL_EVENT_DND_ENTER = ecore_event_type_new(); | ||
116 | ECORE_WL_EVENT_DND_POSITION = ecore_event_type_new(); | ||
117 | ECORE_WL_EVENT_DND_LEAVE = ecore_event_type_new(); | ||
118 | ECORE_WL_EVENT_DND_DROP = ecore_event_type_new(); | ||
119 | ECORE_WL_EVENT_INTERFACES_BOUND = ecore_event_type_new(); | ||
120 | } | ||
121 | |||
122 | if (!(_ecore_wl_disp = malloc(sizeof(Ecore_Wl_Display)))) | ||
123 | { | ||
124 | ERR("Could not allocate memory for Ecore_Wl_Display structure"); | ||
125 | eina_log_domain_unregister(_ecore_wl_log_dom); | ||
126 | _ecore_wl_log_dom = -1; | ||
127 | ecore_event_shutdown(); | ||
128 | ecore_shutdown(); | ||
129 | eina_shutdown(); | ||
130 | return --_ecore_wl_init_count; | ||
131 | } | ||
132 | |||
133 | memset(_ecore_wl_disp, 0, sizeof(Ecore_Wl_Display)); | ||
134 | |||
135 | if (!(_ecore_wl_disp->wl.display = wl_display_connect(name))) | ||
136 | { | ||
137 | ERR("Could not connect to Wayland display"); | ||
138 | eina_log_domain_unregister(_ecore_wl_log_dom); | ||
139 | _ecore_wl_log_dom = -1; | ||
140 | ecore_event_shutdown(); | ||
141 | ecore_shutdown(); | ||
142 | eina_shutdown(); | ||
143 | return --_ecore_wl_init_count; | ||
144 | } | ||
145 | |||
146 | _ecore_wl_disp->fd = | ||
147 | wl_display_get_fd(_ecore_wl_disp->wl.display, | ||
148 | _ecore_wl_cb_event_mask_update, _ecore_wl_disp); | ||
149 | |||
150 | _ecore_wl_disp->fd_hdl = | ||
151 | ecore_main_fd_handler_add(_ecore_wl_disp->fd, ECORE_FD_READ, | ||
152 | _ecore_wl_cb_handle_data, _ecore_wl_disp, | ||
153 | NULL, NULL); | ||
154 | |||
155 | wl_list_init(&_ecore_wl_disp->inputs); | ||
156 | wl_list_init(&_ecore_wl_disp->outputs); | ||
157 | |||
158 | wl_display_add_global_listener(_ecore_wl_disp->wl.display, | ||
159 | _ecore_wl_cb_handle_global, _ecore_wl_disp); | ||
160 | |||
161 | /* FIXME: Process connection events ?? */ | ||
162 | wl_display_iterate(_ecore_wl_disp->wl.display, WL_DISPLAY_READABLE); | ||
163 | |||
164 | /* if (!_ecore_wl_egl_init(_ecore_wl_disp)) */ | ||
165 | /* { */ | ||
166 | /* ERR("Could not initialize EGL"); */ | ||
167 | /* free(_ecore_wl_disp); */ | ||
168 | /* eina_log_domain_unregister(_ecore_wl_log_dom); */ | ||
169 | /* _ecore_wl_log_dom = -1; */ | ||
170 | /* ecore_event_shutdown(); */ | ||
171 | /* ecore_shutdown(); */ | ||
172 | /* eina_shutdown(); */ | ||
173 | /* return --_ecore_wl_init_count; */ | ||
174 | /* } */ | ||
175 | |||
176 | /* _ecore_wl_disp->create_image = */ | ||
177 | /* (void *)eglGetProcAddress("eglCreateImageKHR"); */ | ||
178 | /* _ecore_wl_disp->destroy_image = */ | ||
179 | /* (void *)eglGetProcAddress("eglDestroyImageKHR"); */ | ||
180 | |||
181 | /* TODO: create pointer surfaces */ | ||
182 | |||
183 | if (!_ecore_wl_xkb_init(_ecore_wl_disp)) | ||
184 | { | ||
185 | ERR("Could not initialize XKB"); | ||
186 | _ecore_wl_egl_shutdown(_ecore_wl_disp); | ||
187 | free(_ecore_wl_disp); | ||
188 | eina_log_domain_unregister(_ecore_wl_log_dom); | ||
189 | _ecore_wl_log_dom = -1; | ||
190 | ecore_event_shutdown(); | ||
191 | ecore_shutdown(); | ||
192 | eina_shutdown(); | ||
193 | return --_ecore_wl_init_count; | ||
194 | } | ||
195 | |||
196 | _ecore_wl_window_init(); | ||
197 | |||
198 | return _ecore_wl_init_count; | ||
199 | } | ||
200 | |||
201 | /** | ||
202 | * Shuts down the Ecore Wayland Library | ||
203 | * | ||
204 | * In shutting down the library, the Wayland display connection is terminated | ||
205 | * and any event handlers for it are removed. | ||
206 | * | ||
207 | * @return The number of times the library has been initialized without | ||
208 | * being shut down. | ||
209 | * | ||
210 | * @ingroup Ecore_Wl_Init_Group | ||
211 | */ | ||
212 | EAPI int | ||
213 | ecore_wl_shutdown(void) | ||
214 | { | ||
215 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
216 | |||
217 | return _ecore_wl_shutdown(EINA_TRUE); | ||
218 | } | ||
219 | |||
220 | /** | ||
221 | * @defgroup Ecore_Wl_Flush_Group Wayland Synchronization Functions | ||
222 | * | ||
223 | * Functions that ensure that all commands which have been issued by the | ||
224 | * Ecore Wayland library have been sent to the server. | ||
225 | */ | ||
226 | |||
227 | /** | ||
228 | * Sends all Wayland commands to the Wayland Display. | ||
229 | * | ||
230 | * @ingroup Ecore_Wl_Flush_Group | ||
231 | * @since 1.2 | ||
232 | */ | ||
233 | EAPI void | ||
234 | ecore_wl_flush(void) | ||
235 | { | ||
236 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
237 | |||
238 | while (_ecore_wl_disp->mask & WL_DISPLAY_WRITABLE) | ||
239 | wl_display_iterate(_ecore_wl_disp->wl.display, WL_DISPLAY_WRITABLE); | ||
240 | // wl_display_flush(_ecore_wl_disp->wl.display); // old flush code | ||
241 | } | ||
242 | |||
243 | /** | ||
244 | * Flushes the command buffer and waits until all requests have been | ||
245 | * processed by the server. | ||
246 | * | ||
247 | * @ingroup Ecore_Wl_Flush_Group | ||
248 | * @since 1.2 | ||
249 | */ | ||
250 | EAPI void | ||
251 | ecore_wl_sync(void) | ||
252 | { | ||
253 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
254 | |||
255 | wl_display_roundtrip(_ecore_wl_disp->wl.display); | ||
256 | // old sync code | ||
257 | // wl_display_iterate(_ecore_wl_disp->wl.display, WL_DISPLAY_READABLE); | ||
258 | } | ||
259 | |||
260 | /** | ||
261 | * @defgroup Ecore_Wl_Display_Group Wayland Display Functions | ||
262 | * | ||
263 | * Functions that set and retrieve various information about the Wayland Display. | ||
264 | */ | ||
265 | |||
266 | /** | ||
267 | * Retrieves the Wayland Shm Interface used for the current Wayland connection. | ||
268 | * | ||
269 | * @return The current wayland shm interface | ||
270 | * | ||
271 | * @ingroup Ecore_Wl_Display_Group | ||
272 | * @since 1.2 | ||
273 | */ | ||
274 | EAPI struct wl_shm * | ||
275 | ecore_wl_shm_get(void) | ||
276 | { | ||
277 | return _ecore_wl_disp->wl.shm; | ||
278 | } | ||
279 | |||
280 | /** | ||
281 | * Retrieves the Wayland Display Interface used for the current Wayland connection. | ||
282 | * | ||
283 | * @return The current wayland display interface | ||
284 | * | ||
285 | * @ingroup Ecore_Wl_Display_Group | ||
286 | * @since 1.2 | ||
287 | */ | ||
288 | EAPI struct wl_display * | ||
289 | ecore_wl_display_get(void) | ||
290 | { | ||
291 | return _ecore_wl_disp->wl.display; | ||
292 | } | ||
293 | |||
294 | /** | ||
295 | * Retrieves the size of the current screen. | ||
296 | * | ||
297 | * @param w where to return the width. May be NULL. Returns 0 on error. | ||
298 | * @param h where to return the height. May be NULL. Returns 0 on error. | ||
299 | * | ||
300 | * @ingroup Ecore_Wl_Display_Group | ||
301 | * @since 1.2 | ||
302 | */ | ||
303 | EAPI void | ||
304 | ecore_wl_screen_size_get(int *w, int *h) | ||
305 | { | ||
306 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
307 | |||
308 | if (w) *w = _ecore_wl_disp->output->allocation.w; | ||
309 | if (h) *h = _ecore_wl_disp->output->allocation.h; | ||
310 | } | ||
311 | |||
312 | /* @since 1.2 */ | ||
313 | EAPI void | ||
314 | ecore_wl_pointer_xy_get(int *x, int *y) | ||
315 | { | ||
316 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
317 | |||
318 | _ecore_wl_input_pointer_xy_get(x, y); | ||
319 | } | ||
320 | |||
321 | /* local functions */ | ||
322 | static Eina_Bool | ||
323 | _ecore_wl_shutdown(Eina_Bool close) | ||
324 | { | ||
325 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
326 | |||
327 | if (--_ecore_wl_init_count != 0) return _ecore_wl_init_count; | ||
328 | if (!_ecore_wl_disp) return _ecore_wl_init_count; | ||
329 | |||
330 | _ecore_wl_window_shutdown(); | ||
331 | |||
332 | if (_ecore_wl_disp->fd_hdl) | ||
333 | ecore_main_fd_handler_del(_ecore_wl_disp->fd_hdl); | ||
334 | |||
335 | if (close) | ||
336 | { | ||
337 | Ecore_Wl_Output *out, *tout; | ||
338 | Ecore_Wl_Input *in, *tin; | ||
339 | |||
340 | wl_list_for_each_safe(out, tout, &_ecore_wl_disp->outputs, link) | ||
341 | _ecore_wl_output_del(out); | ||
342 | |||
343 | wl_list_for_each_safe(in, tin, &_ecore_wl_disp->inputs, link) | ||
344 | _ecore_wl_input_del(in); | ||
345 | |||
346 | _ecore_wl_xkb_shutdown(_ecore_wl_disp); | ||
347 | /* _ecore_wl_egl_shutdown(_ecore_wl_disp); */ | ||
348 | |||
349 | if (_ecore_wl_disp->wl.shell) | ||
350 | wl_shell_destroy(_ecore_wl_disp->wl.shell); | ||
351 | if (_ecore_wl_disp->wl.shm) wl_shm_destroy(_ecore_wl_disp->wl.shm); | ||
352 | if (_ecore_wl_disp->wl.data_device_manager) | ||
353 | wl_data_device_manager_destroy(_ecore_wl_disp->wl.data_device_manager); | ||
354 | if (_ecore_wl_disp->wl.compositor) | ||
355 | wl_compositor_destroy(_ecore_wl_disp->wl.compositor); | ||
356 | if (_ecore_wl_disp->wl.display) | ||
357 | { | ||
358 | wl_display_flush(_ecore_wl_disp->wl.display); | ||
359 | wl_display_disconnect(_ecore_wl_disp->wl.display); | ||
360 | } | ||
361 | free(_ecore_wl_disp); | ||
362 | } | ||
363 | |||
364 | ecore_event_shutdown(); | ||
365 | ecore_shutdown(); | ||
366 | |||
367 | eina_log_domain_unregister(_ecore_wl_log_dom); | ||
368 | _ecore_wl_log_dom = -1; | ||
369 | eina_shutdown(); | ||
370 | |||
371 | return _ecore_wl_init_count; | ||
372 | } | ||
373 | |||
374 | static int | ||
375 | _ecore_wl_cb_event_mask_update(unsigned int mask, void *data) | ||
376 | { | ||
377 | Ecore_Wl_Display *ewd; | ||
378 | |||
379 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
380 | |||
381 | ewd = data; | ||
382 | ewd->mask = mask; | ||
383 | return 0; | ||
384 | } | ||
385 | |||
386 | static Eina_Bool | ||
387 | _ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl __UNUSED__) | ||
388 | { | ||
389 | Ecore_Wl_Display *ewd; | ||
390 | |||
391 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
392 | |||
393 | if (!(ewd = data)) return ECORE_CALLBACK_RENEW; | ||
394 | wl_display_iterate(ewd->wl.display, ewd->mask); | ||
395 | return ECORE_CALLBACK_RENEW; | ||
396 | } | ||
397 | |||
398 | static void | ||
399 | _ecore_wl_cb_handle_global(struct wl_display *disp, unsigned int id, const char *interface, unsigned int version __UNUSED__, void *data) | ||
400 | { | ||
401 | Ecore_Wl_Display *ewd; | ||
402 | |||
403 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
404 | |||
405 | if ((!strcmp(interface, "wl_display")) || | ||
406 | (!strcmp(interface, "wl_drm")) || | ||
407 | (!strcmp(interface, "desktop_shell"))) | ||
408 | return; | ||
409 | |||
410 | ewd = data; | ||
411 | |||
412 | if (!strcmp(interface, "wl_compositor")) | ||
413 | ewd->wl.compositor = wl_display_bind(disp, id, &wl_compositor_interface); | ||
414 | else if (!strcmp(interface, "wl_output")) | ||
415 | _ecore_wl_output_add(ewd, id); | ||
416 | else if (!strcmp(interface, "wl_input_device")) | ||
417 | _ecore_wl_input_add(ewd, id); | ||
418 | else if (!strcmp(interface, "wl_shell")) | ||
419 | ewd->wl.shell = wl_display_bind(disp, id, &wl_shell_interface); | ||
420 | else if (!strcmp(interface, "wl_shm")) | ||
421 | ewd->wl.shm = wl_display_bind(disp, id, &wl_shm_interface); | ||
422 | else if (!strcmp(interface, "wl_data_device_manager")) | ||
423 | { | ||
424 | ewd->wl.data_device_manager = | ||
425 | wl_display_bind(disp, id, &wl_data_device_manager_interface); | ||
426 | } | ||
427 | |||
428 | if ((ewd->wl.compositor) && (ewd->wl.shm) && (ewd->wl.shell)) | ||
429 | { | ||
430 | Ecore_Wl_Event_Interfaces_Bound *ev; | ||
431 | |||
432 | if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Interfaces_Bound)))) | ||
433 | return; | ||
434 | |||
435 | ev->compositor = (ewd->wl.compositor != NULL); | ||
436 | ev->shm = (ewd->wl.shm != NULL); | ||
437 | ev->shell = (ewd->wl.shell != NULL); | ||
438 | |||
439 | ecore_event_add(ECORE_WL_EVENT_INTERFACES_BOUND, ev, NULL, NULL); | ||
440 | } | ||
441 | } | ||
442 | |||
443 | static Eina_Bool | ||
444 | _ecore_wl_egl_init(Ecore_Wl_Display *ewd) | ||
445 | { | ||
446 | EGLint major, minor, n; | ||
447 | static const EGLint context_attribs[] = | ||
448 | { | ||
449 | EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE | ||
450 | }; | ||
451 | static const EGLint argb_attribs[] = | ||
452 | { | ||
453 | EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, | ||
454 | EGL_ALPHA_SIZE, 1, EGL_DEPTH_SIZE, 0, EGL_STENCIL_SIZE, 0, | ||
455 | EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_SURFACE_TYPE, | ||
456 | EGL_WINDOW_BIT, EGL_NONE | ||
457 | }; | ||
458 | |||
459 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
460 | |||
461 | ewd->egl.display = eglGetDisplay(ewd->wl.display); | ||
462 | if (!eglInitialize(ewd->egl.display, &major, &minor)) | ||
463 | { | ||
464 | ERR("Failed to initialize EGL display"); | ||
465 | return EINA_FALSE; | ||
466 | } | ||
467 | |||
468 | if (!eglBindAPI(EGL_OPENGL_ES_API)) | ||
469 | { | ||
470 | ERR("Failed to bind EGL Api"); | ||
471 | return EINA_FALSE; | ||
472 | } | ||
473 | |||
474 | if ((!eglChooseConfig(ewd->egl.display, argb_attribs, &ewd->egl.argb_config, | ||
475 | 1, &n)) || (n == 0)) | ||
476 | { | ||
477 | ERR("Failed to choose ARGB config"); | ||
478 | return EINA_FALSE; | ||
479 | } | ||
480 | |||
481 | ewd->egl.argb_context = | ||
482 | eglCreateContext(ewd->egl.display, ewd->egl.argb_config, | ||
483 | EGL_NO_CONTEXT, context_attribs); | ||
484 | if (!ewd->egl.argb_context) | ||
485 | { | ||
486 | ERR("Failed to create ARGB context"); | ||
487 | return EINA_FALSE; | ||
488 | } | ||
489 | |||
490 | if (!eglMakeCurrent(ewd->egl.display, EGL_NO_SURFACE, | ||
491 | EGL_NO_SURFACE, ewd->egl.argb_context)) | ||
492 | { | ||
493 | ERR("Failed to make ARGB context current"); | ||
494 | return EINA_FALSE; | ||
495 | } | ||
496 | |||
497 | return EINA_TRUE; | ||
498 | } | ||
499 | |||
500 | static Eina_Bool | ||
501 | _ecore_wl_egl_shutdown(Ecore_Wl_Display *ewd) | ||
502 | { | ||
503 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
504 | |||
505 | eglMakeCurrent(ewd->egl.display, | ||
506 | EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); | ||
507 | |||
508 | eglDestroyContext(ewd->egl.display, ewd->egl.argb_context); | ||
509 | |||
510 | /* NB: This is hanging when we run elm apps as wayland clients | ||
511 | * inside the weston compositor */ | ||
512 | |||
513 | /* printf("Egl Terminate\n"); */ | ||
514 | /* eglTerminate(ewd->egl.display); */ | ||
515 | /* printf("Egl Terminate Done\n"); */ | ||
516 | |||
517 | eglReleaseThread(); | ||
518 | |||
519 | return EINA_TRUE; | ||
520 | } | ||
521 | |||
522 | static Eina_Bool | ||
523 | _ecore_wl_xkb_init(Ecore_Wl_Display *ewd) | ||
524 | { | ||
525 | struct xkb_rule_names names; | ||
526 | |||
527 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
528 | |||
529 | names.rules = "evdev"; | ||
530 | names.model = "evdev"; | ||
531 | names.layout = "us"; | ||
532 | names.variant = ""; | ||
533 | names.options = ""; | ||
534 | |||
535 | if (!(ewd->xkb = xkb_compile_keymap_from_rules(&names))) | ||
536 | { | ||
537 | ERR("Failed to compile keymap"); | ||
538 | return EINA_FALSE; | ||
539 | } | ||
540 | |||
541 | return EINA_TRUE; | ||
542 | } | ||
543 | |||
544 | static Eina_Bool | ||
545 | _ecore_wl_xkb_shutdown(Ecore_Wl_Display *ewd) | ||
546 | { | ||
547 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
548 | |||
549 | if (ewd->xkb) xkb_free_keymap(ewd->xkb); | ||
550 | return EINA_TRUE; | ||
551 | } | ||
diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_dnd.c b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_dnd.c deleted file mode 100644 index 5d81225..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_dnd.c +++ /dev/null | |||
@@ -1,189 +0,0 @@ | |||
1 | #ifdef HAVE_CONFIG_H | ||
2 | # include <config.h> | ||
3 | #endif | ||
4 | |||
5 | #include "Ecore.h" | ||
6 | #include "ecore_private.h" | ||
7 | #include "ecore_wl_private.h" | ||
8 | #include "Ecore_Wayland.h" | ||
9 | |||
10 | /* local function prototypes */ | ||
11 | static void _ecore_wl_dnd_offer(void *data, struct wl_data_offer *wl_data_offer __UNUSED__, const char *type); | ||
12 | static void _ecore_wl_dnd_cb_enter_free(void *data __UNUSED__, void *event); | ||
13 | |||
14 | /* wayland listeners */ | ||
15 | static const struct wl_data_offer_listener _ecore_wl_data_offer_listener = | ||
16 | { | ||
17 | _ecore_wl_dnd_offer, | ||
18 | }; | ||
19 | |||
20 | void | ||
21 | _ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device, unsigned int id) | ||
22 | { | ||
23 | Ecore_Wl_Dnd_Source *source; | ||
24 | |||
25 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
26 | |||
27 | if (!(source = malloc(sizeof(Ecore_Wl_Dnd_Source)))) return; | ||
28 | wl_array_init(&source->types); | ||
29 | source->refcount = 1; | ||
30 | source->input = input; | ||
31 | /* FIXME: Change this when wayland has typesafe wrapper for it */ | ||
32 | source->offer = (struct wl_data_offer *) | ||
33 | wl_proxy_create_for_id((struct wl_proxy *)data_device, | ||
34 | id, &wl_data_offer_interface); | ||
35 | wl_data_offer_add_listener(source->offer, | ||
36 | &_ecore_wl_data_offer_listener, source); | ||
37 | } | ||
38 | |||
39 | void | ||
40 | _ecore_wl_dnd_enter(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, struct wl_surface *surface, int x, int y, struct wl_data_offer *offer) | ||
41 | { | ||
42 | Ecore_Wl_Event_Dnd_Enter *event; | ||
43 | Ecore_Wl_Input *input; | ||
44 | Ecore_Wl_Window *win; | ||
45 | char **p; | ||
46 | |||
47 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
48 | |||
49 | if (!(input = data)) return; | ||
50 | |||
51 | input->drag_source = wl_data_offer_get_user_data(offer); | ||
52 | |||
53 | win = wl_surface_get_user_data(surface); | ||
54 | // input->pointer_focus = win; | ||
55 | |||
56 | p = wl_array_add(&input->drag_source->types, sizeof(*p)); | ||
57 | *p = NULL; | ||
58 | |||
59 | if (!(event = calloc(1, sizeof(Ecore_Wl_Event_Dnd_Enter)))) return; | ||
60 | |||
61 | event->win = win->id; | ||
62 | event->source = input->drag_source->input->keyboard_focus->id; | ||
63 | event->position.x = x; | ||
64 | event->position.y = y; | ||
65 | event->num_types = input->drag_source->types.size; | ||
66 | event->types = input->drag_source->types.data; | ||
67 | |||
68 | ecore_event_add(ECORE_WL_EVENT_DND_ENTER, event, | ||
69 | _ecore_wl_dnd_cb_enter_free, NULL); | ||
70 | } | ||
71 | |||
72 | void | ||
73 | _ecore_wl_dnd_leave(void *data, struct wl_data_device *data_device __UNUSED__) | ||
74 | { | ||
75 | Ecore_Wl_Input *input; | ||
76 | |||
77 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
78 | |||
79 | if (!(input = data)) return; | ||
80 | _ecore_wl_dnd_del(input->drag_source); | ||
81 | input->drag_source = NULL; | ||
82 | } | ||
83 | |||
84 | void | ||
85 | _ecore_wl_dnd_motion(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, int x, int y) | ||
86 | { | ||
87 | Ecore_Wl_Event_Dnd_Position *event; | ||
88 | Ecore_Wl_Input *input; | ||
89 | |||
90 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
91 | |||
92 | if (!(input = data)) return; | ||
93 | |||
94 | input->sx = x; | ||
95 | input->sy = y; | ||
96 | |||
97 | if (!(event = calloc(1, sizeof(Ecore_Wl_Event_Dnd_Position)))) return; | ||
98 | |||
99 | event->win = input->drag_source->input->pointer_focus->id; | ||
100 | event->source = input->drag_source->input->keyboard_focus->id; | ||
101 | event->position.x = x; | ||
102 | event->position.y = y; | ||
103 | |||
104 | ecore_event_add(ECORE_WL_EVENT_DND_POSITION, event, NULL, NULL); | ||
105 | } | ||
106 | |||
107 | void | ||
108 | _ecore_wl_dnd_drop(void *data, struct wl_data_device *data_device __UNUSED__) | ||
109 | { | ||
110 | Ecore_Wl_Event_Dnd_Drop *event; | ||
111 | Ecore_Wl_Input *input; | ||
112 | |||
113 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
114 | |||
115 | if (!(input = data)) return; | ||
116 | |||
117 | if (!(event = calloc(1, sizeof(Ecore_Wl_Event_Dnd_Drop)))) return; | ||
118 | |||
119 | event->win = input->drag_source->input->pointer_focus->id; | ||
120 | event->source = input->drag_source->input->keyboard_focus->id; | ||
121 | event->position.x = input->sx; | ||
122 | event->position.y = input->sy; | ||
123 | |||
124 | ecore_event_add(ECORE_WL_EVENT_DND_DROP, event, NULL, NULL); | ||
125 | } | ||
126 | |||
127 | void | ||
128 | _ecore_wl_dnd_selection(void *data, struct wl_data_device *data_device __UNUSED__, struct wl_data_offer *offer) | ||
129 | { | ||
130 | Ecore_Wl_Input *input; | ||
131 | |||
132 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
133 | |||
134 | if (!(input = data)) return; | ||
135 | if (input->selection_source) _ecore_wl_dnd_del(input->selection_source); | ||
136 | input->selection_source = NULL; | ||
137 | if (offer) | ||
138 | { | ||
139 | char **p; | ||
140 | |||
141 | input->selection_source = wl_data_offer_get_user_data(offer); | ||
142 | p = wl_array_add(&input->selection_source->types, sizeof(*p)); | ||
143 | *p = NULL; | ||
144 | } | ||
145 | } | ||
146 | |||
147 | void | ||
148 | _ecore_wl_dnd_del(Ecore_Wl_Dnd_Source *source) | ||
149 | { | ||
150 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
151 | |||
152 | if (!source) return; | ||
153 | source->refcount--; | ||
154 | if (source->refcount == 0) | ||
155 | { | ||
156 | char **p; | ||
157 | |||
158 | wl_data_offer_destroy(source->offer); | ||
159 | for (p = source->types.data; *p; p++) | ||
160 | free(*p); | ||
161 | wl_array_release(&source->types); | ||
162 | free(source); | ||
163 | } | ||
164 | } | ||
165 | |||
166 | /* local functions */ | ||
167 | static void | ||
168 | _ecore_wl_dnd_offer(void *data, struct wl_data_offer *wl_data_offer __UNUSED__, const char *type) | ||
169 | { | ||
170 | Ecore_Wl_Dnd_Source *source; | ||
171 | char **p; | ||
172 | |||
173 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
174 | |||
175 | if (!(source = data)) return; | ||
176 | p = wl_array_add(&source->types, sizeof(*p)); | ||
177 | *p = strdup(type); | ||
178 | } | ||
179 | |||
180 | static void | ||
181 | _ecore_wl_dnd_cb_enter_free(void *data __UNUSED__, void *event) | ||
182 | { | ||
183 | Ecore_Wl_Event_Dnd_Enter *ev; | ||
184 | |||
185 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
186 | |||
187 | if (!(ev = event)) return; | ||
188 | free(ev); | ||
189 | } | ||
diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_input.c b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_input.c deleted file mode 100644 index d44daa7..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_input.c +++ /dev/null | |||
@@ -1,658 +0,0 @@ | |||
1 | #ifdef HAVE_CONFIG_H | ||
2 | # include <config.h> | ||
3 | #endif | ||
4 | |||
5 | #include "Ecore.h" | ||
6 | #include "ecore_private.h" | ||
7 | #include "Ecore_Input.h" | ||
8 | #include "ecore_wl_private.h" | ||
9 | #include "Ecore_Wayland.h" | ||
10 | |||
11 | /* FIXME: This gives BTN_LEFT/RIGHT/MIDDLE for linux systems ... | ||
12 | * What about other OSs ?? */ | ||
13 | #ifdef __linux__ | ||
14 | # include <linux/input.h> | ||
15 | #else | ||
16 | # define BTN_LEFT 0x110 | ||
17 | # define BTN_RIGHT 0x111 | ||
18 | # define BTN_MIDDLE 0x112 | ||
19 | # define BTN_SIDE 0x113 | ||
20 | # define BTN_EXTRA 0x114 | ||
21 | # define BTN_FORWARD 0x115 | ||
22 | # define BTN_BACK 0x116 | ||
23 | #endif | ||
24 | |||
25 | /* local function prototypes */ | ||
26 | static void _ecore_wl_input_cb_motion(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int sx, int sy); | ||
27 | static void _ecore_wl_input_cb_button(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, unsigned int button, unsigned int state); | ||
28 | static void _ecore_wl_input_cb_key(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp __UNUSED__, unsigned int key, unsigned int state); | ||
29 | static void _ecore_wl_input_cb_pointer_enter(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface, int sx, int sy); | ||
30 | static void _ecore_wl_input_cb_pointer_leave(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__); | ||
31 | static void _ecore_wl_input_cb_keyboard_enter(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface, struct wl_array *keys); | ||
32 | static void _ecore_wl_input_cb_keyboard_leave(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__); | ||
33 | static void _ecore_wl_input_cb_touch_down(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__, int id __UNUSED__, int x, int y); | ||
34 | static void _ecore_wl_input_cb_touch_up(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int id __UNUSED__); | ||
35 | static void _ecore_wl_input_cb_touch_motion(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int id __UNUSED__, int x, int y); | ||
36 | static void _ecore_wl_input_cb_touch_frame(void *data __UNUSED__, struct wl_input_device *input_device __UNUSED__); | ||
37 | static void _ecore_wl_input_cb_touch_cancel(void *data __UNUSED__, struct wl_input_device *input_device __UNUSED__); | ||
38 | static void _ecore_wl_input_cb_data_offer(void *data, struct wl_data_device *data_device, unsigned int id); | ||
39 | static void _ecore_wl_input_cb_data_enter(void *data, struct wl_data_device *data_device, unsigned int timestamp, struct wl_surface *surface, int x, int y, struct wl_data_offer *offer); | ||
40 | static void _ecore_wl_input_cb_data_leave(void *data, struct wl_data_device *data_device); | ||
41 | static void _ecore_wl_input_cb_data_motion(void *data, struct wl_data_device *data_device, unsigned int timestamp, int x, int y); | ||
42 | static void _ecore_wl_input_cb_data_drop(void *data, struct wl_data_device *data_device); | ||
43 | static void _ecore_wl_input_cb_data_selection(void *data, struct wl_data_device *data_device, struct wl_data_offer *offer); | ||
44 | |||
45 | static void _ecore_wl_input_keyboard_focus_remove(Ecore_Wl_Input *input, unsigned int timestamp); | ||
46 | static void _ecore_wl_input_pointer_focus_remove(Ecore_Wl_Input *input, unsigned int timestamp); | ||
47 | static void _ecore_wl_input_mouse_move_send(Ecore_Wl_Input *input, unsigned int timestamp); | ||
48 | static void _ecore_wl_input_cb_mouse_move_free(void *data __UNUSED__, void *event); | ||
49 | static void _ecore_wl_input_mouse_in_send(Ecore_Wl_Input *input, unsigned int timestamp); | ||
50 | static void _ecore_wl_input_mouse_out_send(Ecore_Wl_Input *input, unsigned int timestamp); | ||
51 | static void _ecore_wl_input_focus_in_send(Ecore_Wl_Input *input, unsigned int timestamp); | ||
52 | static void _ecore_wl_input_focus_out_send(Ecore_Wl_Input *input, unsigned int timestamp); | ||
53 | static void _ecore_wl_input_mouse_down_send(Ecore_Wl_Input *input, unsigned int timestamp); | ||
54 | static void _ecore_wl_input_mouse_up_send(Ecore_Wl_Input *input, unsigned int timestamp); | ||
55 | |||
56 | /* wayland interfaces */ | ||
57 | static const struct wl_input_device_listener _ecore_wl_input_listener = | ||
58 | { | ||
59 | _ecore_wl_input_cb_motion, | ||
60 | _ecore_wl_input_cb_button, | ||
61 | _ecore_wl_input_cb_key, | ||
62 | _ecore_wl_input_cb_pointer_enter, | ||
63 | _ecore_wl_input_cb_pointer_leave, | ||
64 | _ecore_wl_input_cb_keyboard_enter, | ||
65 | _ecore_wl_input_cb_keyboard_leave, | ||
66 | _ecore_wl_input_cb_touch_down, | ||
67 | _ecore_wl_input_cb_touch_up, | ||
68 | _ecore_wl_input_cb_touch_motion, | ||
69 | _ecore_wl_input_cb_touch_frame, | ||
70 | _ecore_wl_input_cb_touch_cancel | ||
71 | }; | ||
72 | |||
73 | static const struct wl_data_device_listener _ecore_wl_data_listener = | ||
74 | { | ||
75 | _ecore_wl_input_cb_data_offer, | ||
76 | _ecore_wl_input_cb_data_enter, | ||
77 | _ecore_wl_input_cb_data_leave, | ||
78 | _ecore_wl_input_cb_data_motion, | ||
79 | _ecore_wl_input_cb_data_drop, | ||
80 | _ecore_wl_input_cb_data_selection | ||
81 | }; | ||
82 | |||
83 | /* local variables */ | ||
84 | static int _pointer_x, _pointer_y; | ||
85 | |||
86 | void | ||
87 | _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id) | ||
88 | { | ||
89 | Ecore_Wl_Input *input; | ||
90 | |||
91 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
92 | |||
93 | if (!(input = malloc(sizeof(Ecore_Wl_Input)))) return; | ||
94 | |||
95 | memset(input, 0, sizeof(Ecore_Wl_Input)); | ||
96 | |||
97 | input->display = ewd; | ||
98 | input->pointer_focus = NULL; | ||
99 | input->keyboard_focus = NULL; | ||
100 | |||
101 | input->input_device = | ||
102 | wl_display_bind(ewd->wl.display, id, &wl_input_device_interface); | ||
103 | wl_list_insert(ewd->inputs.prev, &input->link); | ||
104 | wl_input_device_add_listener(input->input_device, | ||
105 | &_ecore_wl_input_listener, input); | ||
106 | wl_input_device_set_user_data(input->input_device, input); | ||
107 | |||
108 | input->data_device = | ||
109 | wl_data_device_manager_get_data_device(ewd->wl.data_device_manager, | ||
110 | input->input_device); | ||
111 | wl_data_device_add_listener(input->data_device, | ||
112 | &_ecore_wl_data_listener, input); | ||
113 | } | ||
114 | |||
115 | void | ||
116 | _ecore_wl_input_del(Ecore_Wl_Input *input) | ||
117 | { | ||
118 | if (!input) return; | ||
119 | |||
120 | _ecore_wl_input_keyboard_focus_remove(input, 0); | ||
121 | _ecore_wl_input_pointer_focus_remove(input, 0); | ||
122 | |||
123 | if (input->drag_source) _ecore_wl_dnd_del(input->drag_source); | ||
124 | input->drag_source = NULL; | ||
125 | |||
126 | if (input->selection_source) _ecore_wl_dnd_del(input->selection_source); | ||
127 | input->selection_source = NULL; | ||
128 | |||
129 | if (input->data_device) wl_data_device_destroy(input->data_device); | ||
130 | if (input->input_device) wl_input_device_destroy(input->input_device); | ||
131 | wl_list_remove(&input->link); | ||
132 | free(input); | ||
133 | } | ||
134 | |||
135 | void | ||
136 | _ecore_wl_input_pointer_xy_get(int *x, int *y) | ||
137 | { | ||
138 | if (x) *x = _pointer_x; | ||
139 | if (y) *y = _pointer_y; | ||
140 | } | ||
141 | |||
142 | /* local functions */ | ||
143 | static void | ||
144 | _ecore_wl_input_cb_motion(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int sx, int sy) | ||
145 | { | ||
146 | Ecore_Wl_Input *input; | ||
147 | |||
148 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
149 | |||
150 | if (!(input = data)) return; | ||
151 | |||
152 | _pointer_x = sx; | ||
153 | _pointer_y = sy; | ||
154 | |||
155 | input->sx = sx; | ||
156 | input->sy = sy; | ||
157 | |||
158 | /* TODO: FIXME: NB: Weston window code has set pointer image here also */ | ||
159 | _ecore_wl_input_mouse_move_send(input, timestamp); | ||
160 | } | ||
161 | |||
162 | static void | ||
163 | _ecore_wl_input_cb_button(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, unsigned int button, unsigned int state) | ||
164 | { | ||
165 | Ecore_Wl_Input *input; | ||
166 | |||
167 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
168 | |||
169 | if (!(input = data)) return; | ||
170 | |||
171 | input->timestamp = timestamp; | ||
172 | |||
173 | _ecore_wl_input_mouse_move_send(input, timestamp); | ||
174 | |||
175 | if ((button >= BTN_SIDE) && (button <= BTN_BACK)) | ||
176 | { | ||
177 | /* TODO: raise mouse wheel */ | ||
178 | printf("Raise Mouse Wheel Event\n"); | ||
179 | } | ||
180 | else | ||
181 | { | ||
182 | if (state) | ||
183 | { | ||
184 | input->button = button; | ||
185 | _ecore_wl_input_mouse_down_send(input, timestamp); | ||
186 | } | ||
187 | else | ||
188 | { | ||
189 | _ecore_wl_input_mouse_up_send(input, timestamp); | ||
190 | input->button = 0; | ||
191 | } | ||
192 | } | ||
193 | } | ||
194 | |||
195 | static void | ||
196 | _ecore_wl_input_cb_key(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp __UNUSED__, unsigned int key, unsigned int state) | ||
197 | { | ||
198 | Ecore_Wl_Input *input; | ||
199 | Ecore_Wl_Window *win; | ||
200 | unsigned int keycode = 0; | ||
201 | |||
202 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
203 | |||
204 | if (!(input = data)) return; | ||
205 | |||
206 | win = input->keyboard_focus; | ||
207 | if ((!win) || (win->keyboard_device != input)) return; | ||
208 | |||
209 | /* FIXME: NB: I believe this should be min_key_code rather than 8, | ||
210 | * but weston code has it like this */ | ||
211 | keycode = key + 8; | ||
212 | |||
213 | /* if ((input->modifiers & XKB_COMMON_SHIFT_MASK) && */ | ||
214 | /* (XkbKeyGroupWidth(_ecore_wl_disp->xkb, keycode, 0) > 1)) */ | ||
215 | /* level = 1; */ | ||
216 | /* keysym = XkbKeySymEntry(_ecore_wl_disp->xkb, keycode, level, 0); */ | ||
217 | |||
218 | if (state) | ||
219 | input->modifiers |= _ecore_wl_disp->xkb->map->modmap[keycode]; | ||
220 | else | ||
221 | input->modifiers &= ~_ecore_wl_disp->xkb->map->modmap[keycode]; | ||
222 | } | ||
223 | |||
224 | static void | ||
225 | _ecore_wl_input_cb_pointer_enter(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface, int sx, int sy) | ||
226 | { | ||
227 | Ecore_Wl_Input *input; | ||
228 | Ecore_Wl_Window *win = NULL; | ||
229 | |||
230 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
231 | |||
232 | if (!(input = data)) return; | ||
233 | |||
234 | input->sx = sx; | ||
235 | input->sy = sy; | ||
236 | |||
237 | _ecore_wl_input_mouse_move_send(input, timestamp); | ||
238 | |||
239 | win = input->pointer_focus; | ||
240 | if ((win) && (win->surface != surface)) | ||
241 | { | ||
242 | if (!input->button) | ||
243 | _ecore_wl_input_pointer_focus_remove(input, timestamp); | ||
244 | } | ||
245 | |||
246 | if (surface) | ||
247 | { | ||
248 | if ((win = wl_surface_get_user_data(surface))) | ||
249 | { | ||
250 | input->pointer_focus = win; | ||
251 | win->pointer_device = input; | ||
252 | } | ||
253 | if (input->button) | ||
254 | { | ||
255 | _ecore_wl_input_mouse_up_send(input, timestamp); | ||
256 | input->button = 0; | ||
257 | } | ||
258 | else | ||
259 | _ecore_wl_input_mouse_in_send(input, timestamp); | ||
260 | } | ||
261 | } | ||
262 | |||
263 | static void | ||
264 | _ecore_wl_input_cb_pointer_leave(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__) | ||
265 | { | ||
266 | Ecore_Wl_Input *input; | ||
267 | |||
268 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
269 | |||
270 | if (!(input = data)) return; | ||
271 | _ecore_wl_input_pointer_focus_remove(input, timestamp); | ||
272 | } | ||
273 | |||
274 | static void | ||
275 | _ecore_wl_input_cb_keyboard_enter(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface, struct wl_array *keys) | ||
276 | { | ||
277 | Ecore_Wl_Input *input; | ||
278 | Ecore_Wl_Window *win = NULL; | ||
279 | unsigned int *k, *end; | ||
280 | |||
281 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
282 | |||
283 | if (!(input = data)) return; | ||
284 | |||
285 | end = keys->data + keys->size; | ||
286 | input->modifiers = 0; | ||
287 | for (k = keys->data; k < end; k++) | ||
288 | input->modifiers |= _ecore_wl_disp->xkb->map->modmap[*k]; | ||
289 | |||
290 | if (surface) | ||
291 | { | ||
292 | if ((win = wl_surface_get_user_data(surface))) | ||
293 | { | ||
294 | input->keyboard_focus = win; | ||
295 | win->keyboard_device = input; | ||
296 | } | ||
297 | else | ||
298 | input->keyboard_focus = NULL; | ||
299 | _ecore_wl_input_focus_in_send(input, timestamp); | ||
300 | } | ||
301 | } | ||
302 | |||
303 | static void | ||
304 | _ecore_wl_input_cb_keyboard_leave(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__) | ||
305 | { | ||
306 | Ecore_Wl_Input *input; | ||
307 | |||
308 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
309 | |||
310 | if (!(input = data)) return; | ||
311 | _ecore_wl_input_keyboard_focus_remove(input, timestamp); | ||
312 | } | ||
313 | |||
314 | static void | ||
315 | _ecore_wl_input_cb_touch_down(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__, int id __UNUSED__, int x, int y) | ||
316 | { | ||
317 | Ecore_Wl_Input *input; | ||
318 | |||
319 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
320 | |||
321 | if (!(input = data)) return; | ||
322 | |||
323 | /* FIXME: NB: Not sure yet if input->timestamp should be set here. | ||
324 | * This needs to be tested with an actual touch device */ | ||
325 | /* input->timestamp = timestamp; */ | ||
326 | input->button = 0; | ||
327 | input->sx = x; | ||
328 | input->sy = y; | ||
329 | _ecore_wl_input_mouse_down_send(input, timestamp); | ||
330 | } | ||
331 | |||
332 | static void | ||
333 | _ecore_wl_input_cb_touch_up(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int id __UNUSED__) | ||
334 | { | ||
335 | Ecore_Wl_Input *input; | ||
336 | |||
337 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
338 | |||
339 | if (!(input = data)) return; | ||
340 | |||
341 | /* FIXME: NB: Not sure yet if input->timestamp should be set here. | ||
342 | * This needs to be tested with an actual touch device */ | ||
343 | /* input->timestamp = timestamp; */ | ||
344 | input->button = 0; | ||
345 | _ecore_wl_input_mouse_up_send(input, timestamp); | ||
346 | } | ||
347 | |||
348 | static void | ||
349 | _ecore_wl_input_cb_touch_motion(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int id __UNUSED__, int x, int y) | ||
350 | { | ||
351 | Ecore_Wl_Input *input; | ||
352 | |||
353 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
354 | |||
355 | if (!(input = data)) return; | ||
356 | |||
357 | /* FIXME: NB: Not sure yet if input->timestamp should be set here. | ||
358 | * This needs to be tested with an actual touch device */ | ||
359 | /* input->timestamp = timestamp; */ | ||
360 | input->sx = x; | ||
361 | input->sy = y; | ||
362 | |||
363 | _ecore_wl_input_mouse_move_send(input, timestamp); | ||
364 | } | ||
365 | |||
366 | static void | ||
367 | _ecore_wl_input_cb_touch_frame(void *data __UNUSED__, struct wl_input_device *input_device __UNUSED__) | ||
368 | { | ||
369 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
370 | } | ||
371 | |||
372 | static void | ||
373 | _ecore_wl_input_cb_touch_cancel(void *data __UNUSED__, struct wl_input_device *input_device __UNUSED__) | ||
374 | { | ||
375 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
376 | } | ||
377 | |||
378 | static void | ||
379 | _ecore_wl_input_cb_data_offer(void *data, struct wl_data_device *data_device, unsigned int id) | ||
380 | { | ||
381 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
382 | |||
383 | _ecore_wl_dnd_add(data, data_device, id); | ||
384 | } | ||
385 | |||
386 | static void | ||
387 | _ecore_wl_input_cb_data_enter(void *data, struct wl_data_device *data_device, unsigned int timestamp, struct wl_surface *surface, int x, int y, struct wl_data_offer *offer) | ||
388 | { | ||
389 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
390 | |||
391 | _ecore_wl_dnd_enter(data, data_device, timestamp, surface, x, y, offer); | ||
392 | } | ||
393 | |||
394 | static void | ||
395 | _ecore_wl_input_cb_data_leave(void *data, struct wl_data_device *data_device) | ||
396 | { | ||
397 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
398 | |||
399 | _ecore_wl_dnd_leave(data, data_device); | ||
400 | } | ||
401 | |||
402 | static void | ||
403 | _ecore_wl_input_cb_data_motion(void *data, struct wl_data_device *data_device, unsigned int timestamp, int x, int y) | ||
404 | { | ||
405 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
406 | |||
407 | _ecore_wl_dnd_motion(data, data_device, timestamp, x, y); | ||
408 | } | ||
409 | |||
410 | static void | ||
411 | _ecore_wl_input_cb_data_drop(void *data, struct wl_data_device *data_device) | ||
412 | { | ||
413 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
414 | |||
415 | _ecore_wl_dnd_drop(data, data_device); | ||
416 | } | ||
417 | |||
418 | static void | ||
419 | _ecore_wl_input_cb_data_selection(void *data, struct wl_data_device *data_device, struct wl_data_offer *offer) | ||
420 | { | ||
421 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
422 | |||
423 | _ecore_wl_dnd_selection(data, data_device, offer); | ||
424 | } | ||
425 | |||
426 | static void | ||
427 | _ecore_wl_input_keyboard_focus_remove(Ecore_Wl_Input *input, unsigned int timestamp) | ||
428 | { | ||
429 | Ecore_Wl_Window *win; | ||
430 | |||
431 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
432 | |||
433 | _ecore_wl_input_focus_out_send(input, timestamp); | ||
434 | if ((win = input->keyboard_focus)) | ||
435 | win->keyboard_device = NULL; | ||
436 | input->keyboard_focus = NULL; | ||
437 | } | ||
438 | |||
439 | static void | ||
440 | _ecore_wl_input_pointer_focus_remove(Ecore_Wl_Input *input, unsigned int timestamp) | ||
441 | { | ||
442 | Ecore_Wl_Window *win; | ||
443 | |||
444 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
445 | |||
446 | if (!input->button) | ||
447 | _ecore_wl_input_mouse_out_send(input, timestamp); | ||
448 | |||
449 | if ((win = input->pointer_focus)) | ||
450 | win->pointer_device = NULL; | ||
451 | input->pointer_focus = NULL; | ||
452 | } | ||
453 | |||
454 | static void | ||
455 | _ecore_wl_input_mouse_move_send(Ecore_Wl_Input *input, unsigned int timestamp) | ||
456 | { | ||
457 | Ecore_Event_Mouse_Move *ev; | ||
458 | Ecore_Event *event; | ||
459 | |||
460 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
461 | |||
462 | if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Move)))) return; | ||
463 | |||
464 | ev->timestamp = timestamp; | ||
465 | ev->x = input->sx; | ||
466 | ev->y = input->sy; | ||
467 | ev->modifiers = input->modifiers; | ||
468 | ev->multi.device = 0; | ||
469 | ev->multi.radius = 1; | ||
470 | ev->multi.radius_x = 1; | ||
471 | ev->multi.radius_y = 1; | ||
472 | ev->multi.pressure = 1.0; | ||
473 | ev->multi.angle = 0.0; | ||
474 | ev->multi.x = input->sx; | ||
475 | ev->multi.y = input->sy; | ||
476 | |||
477 | if (input->pointer_focus) | ||
478 | { | ||
479 | ev->window = input->pointer_focus->id; | ||
480 | ev->event_window = input->pointer_focus->id; | ||
481 | } | ||
482 | |||
483 | event = ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, | ||
484 | _ecore_wl_input_cb_mouse_move_free, NULL); | ||
485 | } | ||
486 | |||
487 | static void | ||
488 | _ecore_wl_input_cb_mouse_move_free(void *data __UNUSED__, void *event) | ||
489 | { | ||
490 | Ecore_Event_Mouse_Move *ev; | ||
491 | |||
492 | if ((ev = event)) free(ev); | ||
493 | } | ||
494 | |||
495 | static void | ||
496 | _ecore_wl_input_mouse_in_send(Ecore_Wl_Input *input, unsigned int timestamp) | ||
497 | { | ||
498 | Ecore_Wl_Event_Mouse_In *ev; | ||
499 | Ecore_Event *event; | ||
500 | |||
501 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
502 | |||
503 | if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Mouse_In)))) return; | ||
504 | |||
505 | ev->x = input->sx; | ||
506 | ev->y = input->sy; | ||
507 | ev->modifiers = input->modifiers; | ||
508 | ev->timestamp = timestamp; | ||
509 | |||
510 | if (input->pointer_focus) | ||
511 | { | ||
512 | ev->win = input->pointer_focus->id; | ||
513 | ev->event_win = input->pointer_focus->id; | ||
514 | } | ||
515 | |||
516 | event = ecore_event_add(ECORE_WL_EVENT_MOUSE_IN, ev, NULL, NULL); | ||
517 | } | ||
518 | |||
519 | static void | ||
520 | _ecore_wl_input_mouse_out_send(Ecore_Wl_Input *input, unsigned int timestamp) | ||
521 | { | ||
522 | Ecore_Wl_Event_Mouse_Out *ev; | ||
523 | |||
524 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
525 | |||
526 | if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Mouse_Out)))) return; | ||
527 | |||
528 | ev->x = input->sx; | ||
529 | ev->y = input->sy; | ||
530 | ev->modifiers = input->modifiers; | ||
531 | ev->timestamp = timestamp; | ||
532 | |||
533 | if (input->pointer_focus) | ||
534 | { | ||
535 | ev->win = input->pointer_focus->id; | ||
536 | ev->event_win = input->pointer_focus->id; | ||
537 | } | ||
538 | |||
539 | ecore_event_add(ECORE_WL_EVENT_MOUSE_OUT, ev, NULL, NULL); | ||
540 | } | ||
541 | |||
542 | static void | ||
543 | _ecore_wl_input_focus_in_send(Ecore_Wl_Input *input, unsigned int timestamp) | ||
544 | { | ||
545 | Ecore_Wl_Event_Focus_In *ev; | ||
546 | |||
547 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
548 | |||
549 | if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Focus_In)))) return; | ||
550 | ev->timestamp = timestamp; | ||
551 | if (input->keyboard_focus) | ||
552 | ev->win = input->keyboard_focus->id; | ||
553 | ecore_event_add(ECORE_WL_EVENT_FOCUS_IN, ev, NULL, NULL); | ||
554 | } | ||
555 | |||
556 | static void | ||
557 | _ecore_wl_input_focus_out_send(Ecore_Wl_Input *input, unsigned int timestamp) | ||
558 | { | ||
559 | Ecore_Wl_Event_Focus_Out *ev; | ||
560 | |||
561 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
562 | |||
563 | if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Focus_Out)))) return; | ||
564 | ev->timestamp = timestamp; | ||
565 | if (input->keyboard_focus) | ||
566 | ev->win = input->keyboard_focus->id; | ||
567 | ecore_event_add(ECORE_WL_EVENT_FOCUS_OUT, ev, NULL, NULL); | ||
568 | } | ||
569 | |||
570 | static void | ||
571 | _ecore_wl_input_mouse_down_send(Ecore_Wl_Input *input, unsigned int timestamp) | ||
572 | { | ||
573 | Ecore_Event_Mouse_Button *ev; | ||
574 | |||
575 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
576 | |||
577 | if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; | ||
578 | |||
579 | if (input->button == BTN_LEFT) | ||
580 | ev->buttons = 1; | ||
581 | else if (input->button == BTN_MIDDLE) | ||
582 | ev->buttons = 2; | ||
583 | else if (input->button == BTN_RIGHT) | ||
584 | ev->buttons = 3; | ||
585 | else | ||
586 | ev->buttons = input->button; | ||
587 | |||
588 | ev->timestamp = timestamp; | ||
589 | ev->x = input->sx; | ||
590 | ev->y = input->sy; | ||
591 | ev->modifiers = input->modifiers; | ||
592 | |||
593 | /* FIXME: Need to get these from wayland somehow */ | ||
594 | ev->double_click = 0; | ||
595 | ev->triple_click = 0; | ||
596 | |||
597 | ev->multi.device = 0; | ||
598 | ev->multi.radius = 1; | ||
599 | ev->multi.radius_x = 1; | ||
600 | ev->multi.radius_y = 1; | ||
601 | ev->multi.pressure = 1.0; | ||
602 | ev->multi.angle = 0.0; | ||
603 | ev->multi.x = input->sx; | ||
604 | ev->multi.y = input->sy; | ||
605 | |||
606 | if (input->pointer_focus) | ||
607 | { | ||
608 | ev->window = input->pointer_focus->id; | ||
609 | ev->event_window = input->pointer_focus->id; | ||
610 | } | ||
611 | |||
612 | ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL); | ||
613 | } | ||
614 | |||
615 | static void | ||
616 | _ecore_wl_input_mouse_up_send(Ecore_Wl_Input *input, unsigned int timestamp) | ||
617 | { | ||
618 | Ecore_Event_Mouse_Button *ev; | ||
619 | |||
620 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
621 | |||
622 | if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; | ||
623 | |||
624 | if (input->button == BTN_LEFT) | ||
625 | ev->buttons = 1; | ||
626 | else if (input->button == BTN_MIDDLE) | ||
627 | ev->buttons = 2; | ||
628 | else if (input->button == BTN_RIGHT) | ||
629 | ev->buttons = 3; | ||
630 | else | ||
631 | ev->buttons = input->button; | ||
632 | |||
633 | ev->timestamp = timestamp; | ||
634 | ev->x = input->sx; | ||
635 | ev->y = input->sy; | ||
636 | ev->modifiers = input->modifiers; | ||
637 | |||
638 | /* FIXME: Need to get these from wayland somehow */ | ||
639 | ev->double_click = 0; | ||
640 | ev->triple_click = 0; | ||
641 | |||
642 | ev->multi.device = 0; | ||
643 | ev->multi.radius = 1; | ||
644 | ev->multi.radius_x = 1; | ||
645 | ev->multi.radius_y = 1; | ||
646 | ev->multi.pressure = 1.0; | ||
647 | ev->multi.angle = 0.0; | ||
648 | ev->multi.x = input->sx; | ||
649 | ev->multi.y = input->sy; | ||
650 | |||
651 | if (input->pointer_focus) | ||
652 | { | ||
653 | ev->window = input->pointer_focus->id; | ||
654 | ev->event_window = input->pointer_focus->id; | ||
655 | } | ||
656 | |||
657 | ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL); | ||
658 | } | ||
diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_output.c b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_output.c deleted file mode 100644 index 9f540d4..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_output.c +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | #ifdef HAVE_CONFIG_H | ||
2 | # include <config.h> | ||
3 | #endif | ||
4 | |||
5 | #include "Ecore.h" | ||
6 | #include "ecore_private.h" | ||
7 | #include "ecore_wl_private.h" | ||
8 | #include "Ecore_Wayland.h" | ||
9 | |||
10 | /* local function prototypes */ | ||
11 | static void _ecore_wl_output_cb_geometry(void *data, struct wl_output *wl_output __UNUSED__, int x, int y, int w __UNUSED__, int h __UNUSED__, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__); | ||
12 | static void _ecore_wl_output_cb_mode(void *data, struct wl_output *wl_output __UNUSED__, unsigned int flags, int w, int h, int refresh __UNUSED__); | ||
13 | |||
14 | /* wayland listeners */ | ||
15 | static const struct wl_output_listener _ecore_wl_output_listener = | ||
16 | { | ||
17 | _ecore_wl_output_cb_geometry, | ||
18 | _ecore_wl_output_cb_mode | ||
19 | }; | ||
20 | |||
21 | void | ||
22 | _ecore_wl_output_add(Ecore_Wl_Display *ewd, unsigned int id) | ||
23 | { | ||
24 | Ecore_Wl_Output *output; | ||
25 | |||
26 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
27 | |||
28 | if (!(output = malloc(sizeof(Ecore_Wl_Output)))) return; | ||
29 | |||
30 | memset(output, 0, sizeof(Ecore_Wl_Output)); | ||
31 | |||
32 | output->display = ewd; | ||
33 | |||
34 | output->output = wl_display_bind(ewd->wl.display, id, &wl_output_interface); | ||
35 | wl_list_insert(ewd->outputs.prev, &output->link); | ||
36 | wl_output_add_listener(output->output, &_ecore_wl_output_listener, output); | ||
37 | } | ||
38 | |||
39 | void | ||
40 | _ecore_wl_output_del(Ecore_Wl_Output *output) | ||
41 | { | ||
42 | if (!output) return; | ||
43 | if (output->destroy) (*output->destroy)(output, output->data); | ||
44 | if (output->output) wl_output_destroy(output->output); | ||
45 | wl_list_remove(&output->link); | ||
46 | free(output); | ||
47 | } | ||
48 | |||
49 | /* local functions */ | ||
50 | static void | ||
51 | _ecore_wl_output_cb_geometry(void *data, struct wl_output *wl_output __UNUSED__, int x, int y, int w __UNUSED__, int h __UNUSED__, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__) | ||
52 | { | ||
53 | Ecore_Wl_Output *output; | ||
54 | |||
55 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
56 | |||
57 | output = data; | ||
58 | output->allocation.x = x; | ||
59 | output->allocation.y = y; | ||
60 | } | ||
61 | |||
62 | static void | ||
63 | _ecore_wl_output_cb_mode(void *data, struct wl_output *wl_output __UNUSED__, unsigned int flags, int w, int h, int refresh __UNUSED__) | ||
64 | { | ||
65 | Ecore_Wl_Output *output; | ||
66 | Ecore_Wl_Display *ewd; | ||
67 | |||
68 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
69 | |||
70 | output = data; | ||
71 | ewd = output->display; | ||
72 | if (flags & WL_OUTPUT_MODE_CURRENT) | ||
73 | { | ||
74 | output->allocation.w = w; | ||
75 | output->allocation.h = h; | ||
76 | _ecore_wl_disp->output = output; | ||
77 | if (ewd->output_configure) (*ewd->output_configure)(output, ewd->data); | ||
78 | } | ||
79 | } | ||
diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h deleted file mode 100644 index 31956a1..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | #ifndef _ECORE_WAYLAND_PRIVATE_H | ||
2 | # define _ECORE_WAYLAND_PRIVATE_H | ||
3 | |||
4 | # include <limits.h> | ||
5 | # include <xkbcommon/xkbcommon.h> | ||
6 | |||
7 | # include "Ecore_Wayland.h" | ||
8 | |||
9 | //# define LOGFNS 1 | ||
10 | |||
11 | # ifdef LOGFNS | ||
12 | # include <stdio.h> | ||
13 | # define LOGFN(fl, ln, fn) printf("-ECORE-WL: %25s: %5i - %s\n", fl, ln, fn); | ||
14 | # else | ||
15 | # define LOGFN(fl, ln, fn) | ||
16 | # endif | ||
17 | |||
18 | extern int _ecore_wl_log_dom; | ||
19 | extern Ecore_Wl_Display *_ecore_wl_disp; | ||
20 | |||
21 | # ifdef ECORE_WL_DEFAULT_LOG_COLOR | ||
22 | # undef ECORE_WL_DEFAULT_LOG_COLOR | ||
23 | # endif | ||
24 | # define ECORE_WL_DEFAULT_LOG_COLOR EINA_COLOR_BLUE | ||
25 | |||
26 | # ifdef ERR | ||
27 | # undef ERR | ||
28 | # endif | ||
29 | # define ERR(...) EINA_LOG_DOM_ERR(_ecore_wl_log_dom, __VA_ARGS__) | ||
30 | |||
31 | # ifdef DBG | ||
32 | # undef DBG | ||
33 | # endif | ||
34 | # define DBG(...) EINA_LOG_DOM_DBG(_ecore_wl_log_dom, __VA_ARGS__) | ||
35 | |||
36 | # ifdef INF | ||
37 | # undef INF | ||
38 | # endif | ||
39 | # define INF(...) EINA_LOG_DOM_INFO(_ecore_wl_log_dom, __VA_ARGS__) | ||
40 | |||
41 | # ifdef WRN | ||
42 | # undef WRN | ||
43 | # endif | ||
44 | # define WRN(...) EINA_LOG_DOM_WARN(_ecore_wl_log_dom, __VA_ARGS__) | ||
45 | |||
46 | # ifdef CRIT | ||
47 | # undef CRIT | ||
48 | # endif | ||
49 | # define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_wl_log_dom, __VA_ARGS__) | ||
50 | |||
51 | struct _Ecore_Wl_Dnd_Source | ||
52 | { | ||
53 | struct wl_data_offer *offer; | ||
54 | Ecore_Wl_Input *input; | ||
55 | struct wl_array types; | ||
56 | int refcount; | ||
57 | int fd; | ||
58 | int x, y; | ||
59 | |||
60 | /* TODO: task & data_func */ | ||
61 | void *data; | ||
62 | }; | ||
63 | |||
64 | struct _Ecore_Wl_Dnd_Target | ||
65 | { | ||
66 | Ecore_Wl_Dnd_Source *source; | ||
67 | }; | ||
68 | |||
69 | void _ecore_wl_window_init(void); | ||
70 | void _ecore_wl_window_shutdown(void); | ||
71 | |||
72 | void _ecore_wl_output_add(Ecore_Wl_Display *ewd, unsigned int id); | ||
73 | void _ecore_wl_output_del(Ecore_Wl_Output *output); | ||
74 | |||
75 | void _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id); | ||
76 | void _ecore_wl_input_del(Ecore_Wl_Input *input); | ||
77 | void _ecore_wl_input_pointer_xy_get(int *x, int *y); | ||
78 | |||
79 | void _ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device, unsigned int id); | ||
80 | void _ecore_wl_dnd_enter(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, struct wl_surface *surface, int x, int y, struct wl_data_offer *offer); | ||
81 | void _ecore_wl_dnd_leave(void *data, struct wl_data_device *data_device __UNUSED__); | ||
82 | void _ecore_wl_dnd_motion(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, int x, int y); | ||
83 | void _ecore_wl_dnd_drop(void *data, struct wl_data_device *data_device __UNUSED__); | ||
84 | void _ecore_wl_dnd_selection(void *data, struct wl_data_device *data_device __UNUSED__, struct wl_data_offer *offer); | ||
85 | void _ecore_wl_dnd_del(Ecore_Wl_Dnd_Source *source); | ||
86 | |||
87 | #endif | ||
diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_window.c b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_window.c deleted file mode 100644 index e8a8bfb..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_window.c +++ /dev/null | |||
@@ -1,440 +0,0 @@ | |||
1 | #ifdef HAVE_CONFIG_H | ||
2 | # include <config.h> | ||
3 | #endif | ||
4 | |||
5 | #include "Ecore.h" | ||
6 | #include "ecore_private.h" | ||
7 | #include "ecore_wl_private.h" | ||
8 | #include "Ecore_Wayland.h" | ||
9 | |||
10 | /* local function prototypes */ | ||
11 | static void _ecore_wl_window_cb_configure(void *data, struct wl_shell_surface *shell_surface __UNUSED__, unsigned int timestamp, unsigned int edges, int w, int h); | ||
12 | static void _ecore_wl_window_cb_popup_done(void *data, struct wl_shell_surface *shell_surface __UNUSED__); | ||
13 | static void _ecore_wl_window_configure_send(Ecore_Wl_Window *win, int w, int h, unsigned int timestamp); | ||
14 | |||
15 | /* local variables */ | ||
16 | static Eina_Hash *_windows = NULL; | ||
17 | |||
18 | /* wayland listeners */ | ||
19 | static const struct wl_shell_surface_listener _ecore_wl_shell_surface_listener = | ||
20 | { | ||
21 | _ecore_wl_window_cb_configure, | ||
22 | _ecore_wl_window_cb_popup_done | ||
23 | }; | ||
24 | |||
25 | /* internal functions */ | ||
26 | void | ||
27 | _ecore_wl_window_init(void) | ||
28 | { | ||
29 | if (!_windows) _windows = eina_hash_pointer_new(free); | ||
30 | } | ||
31 | |||
32 | void | ||
33 | _ecore_wl_window_shutdown(void) | ||
34 | { | ||
35 | eina_hash_free(_windows); | ||
36 | _windows = NULL; | ||
37 | } | ||
38 | |||
39 | /** | ||
40 | * @defgroup Ecore_Wl_Window_Group Wayland Library Init and Shutdown Functions | ||
41 | * | ||
42 | * Functions that can be used to create a Wayland window. | ||
43 | */ | ||
44 | |||
45 | /** | ||
46 | * Creates a new window | ||
47 | * | ||
48 | * @param parent The parent window to use. If @p parent is @c 0, the root window | ||
49 | * of the default display is used. | ||
50 | * @param x X Position | ||
51 | * @param y Y position | ||
52 | * @param w Width | ||
53 | * @param h Height | ||
54 | * | ||
55 | * @return The new window | ||
56 | * | ||
57 | * @ingroup Ecore_Wl_Window_Group | ||
58 | * @since 1.2 | ||
59 | */ | ||
60 | EAPI Ecore_Wl_Window * | ||
61 | ecore_wl_window_new(Ecore_Wl_Window *parent, int x, int y, int w, int h, int buffer_type) | ||
62 | { | ||
63 | Ecore_Wl_Window *win; | ||
64 | static int _win_id = 1; | ||
65 | |||
66 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
67 | |||
68 | if (!(win = malloc(sizeof(Ecore_Wl_Window)))) | ||
69 | { | ||
70 | ERR("Failed to allocate an Ecore Wayland Window"); | ||
71 | return NULL; | ||
72 | } | ||
73 | |||
74 | memset(win, 0, sizeof(Ecore_Wl_Window)); | ||
75 | |||
76 | win->display = _ecore_wl_disp; | ||
77 | win->parent = parent; | ||
78 | win->allocation.x = x; | ||
79 | win->allocation.y = y; | ||
80 | win->allocation.w = w; | ||
81 | win->allocation.h = h; | ||
82 | win->saved_allocation = win->allocation; | ||
83 | win->transparent = EINA_TRUE; | ||
84 | win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; | ||
85 | win->buffer_type = buffer_type; | ||
86 | win->id = _win_id++; | ||
87 | |||
88 | eina_hash_add(_windows, &win->id, win); | ||
89 | return win; | ||
90 | } | ||
91 | |||
92 | /** | ||
93 | * Deletes the given window | ||
94 | * | ||
95 | * @param win The given window | ||
96 | * | ||
97 | * @ingroup Ecore_Wl_Window_Group | ||
98 | * @since 1.2 | ||
99 | */ | ||
100 | EAPI void | ||
101 | ecore_wl_window_free(Ecore_Wl_Window *win) | ||
102 | { | ||
103 | Ecore_Wl_Input *input; | ||
104 | |||
105 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
106 | |||
107 | if (!win) return; | ||
108 | |||
109 | eina_hash_del(_windows, &win->id, NULL); | ||
110 | |||
111 | wl_list_for_each(input, &_ecore_wl_disp->inputs, link) | ||
112 | { | ||
113 | if ((input->pointer_focus) && (input->pointer_focus == win)) | ||
114 | input->pointer_focus = NULL; | ||
115 | if ((input->keyboard_focus) && (input->keyboard_focus == win)) | ||
116 | input->keyboard_focus = NULL; | ||
117 | } | ||
118 | |||
119 | if (win->shell_surface) wl_shell_surface_destroy(win->shell_surface); | ||
120 | win->shell_surface = NULL; | ||
121 | |||
122 | if (win->surface) wl_surface_destroy(win->surface); | ||
123 | win->surface = NULL; | ||
124 | |||
125 | // free(win); | ||
126 | } | ||
127 | |||
128 | /** | ||
129 | * Signals for Wayland to initiate a window move. | ||
130 | * | ||
131 | * The position requested (@p x, @p y) is not honored by Wayland because | ||
132 | * Wayland does not allow specific window placement to be set. | ||
133 | * | ||
134 | * @param win The window to move. | ||
135 | * @param x X Position | ||
136 | * @param y Y Position | ||
137 | * | ||
138 | * @ingroup Ecore_Wl_Window_Group | ||
139 | * @since 1.2 | ||
140 | */ | ||
141 | EAPI void | ||
142 | ecore_wl_window_move(Ecore_Wl_Window *win, int x, int y) | ||
143 | { | ||
144 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
145 | |||
146 | if (!win) return; | ||
147 | win->allocation.x = x; | ||
148 | win->allocation.y = y; | ||
149 | if (win->shell_surface) | ||
150 | { | ||
151 | Ecore_Wl_Input *input; | ||
152 | |||
153 | input = win->keyboard_device; | ||
154 | wl_shell_surface_move(win->shell_surface, input->input_device, | ||
155 | input->timestamp); | ||
156 | } | ||
157 | } | ||
158 | |||
159 | /** | ||
160 | * Signals for Wayland to initiate a window resize. | ||
161 | * | ||
162 | * The size requested (@p w, @p h) is not honored by Wayland because | ||
163 | * Wayland does not allow specific window sizes to be set. | ||
164 | * | ||
165 | * @param win The window to resize. | ||
166 | * @param w Width | ||
167 | * @param h Height | ||
168 | * @param location The edge of the window from where the resize should start. | ||
169 | * | ||
170 | * @ingroup Ecore_Wl_Window_Group | ||
171 | * @since 1.2 | ||
172 | */ | ||
173 | EAPI void | ||
174 | ecore_wl_window_resize(Ecore_Wl_Window *win, int w, int h, int location) | ||
175 | { | ||
176 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
177 | |||
178 | if (!win) return; | ||
179 | win->allocation.w = w; | ||
180 | win->allocation.h = h; | ||
181 | if (win->shell_surface) | ||
182 | { | ||
183 | Ecore_Wl_Input *input; | ||
184 | |||
185 | input = win->keyboard_device; | ||
186 | wl_shell_surface_resize(win->shell_surface, input->input_device, | ||
187 | input->timestamp, location); | ||
188 | } | ||
189 | } | ||
190 | |||
191 | EAPI void | ||
192 | ecore_wl_window_damage(Ecore_Wl_Window *win, int x, int y, int w, int h) | ||
193 | { | ||
194 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
195 | |||
196 | if (!win) return; | ||
197 | if (win->surface) | ||
198 | wl_surface_damage(win->surface, x, y, w, h); | ||
199 | } | ||
200 | |||
201 | EAPI void | ||
202 | ecore_wl_window_buffer_attach(Ecore_Wl_Window *win, struct wl_buffer *buffer, int x, int y) | ||
203 | { | ||
204 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
205 | |||
206 | if (!win) return; | ||
207 | if ((win->surface) && (buffer)) | ||
208 | wl_surface_attach(win->surface, buffer, x, y); | ||
209 | } | ||
210 | |||
211 | /** | ||
212 | * Shows a window | ||
213 | * | ||
214 | * Synonymous to "mapping" a window in Wayland System terminology. | ||
215 | * | ||
216 | * @param win The window to show. | ||
217 | * | ||
218 | * @ingroup Ecore_Wl_Window_Group | ||
219 | * @since 1.2 | ||
220 | */ | ||
221 | EAPI void | ||
222 | ecore_wl_window_show(Ecore_Wl_Window *win) | ||
223 | { | ||
224 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
225 | |||
226 | if (!win) return; | ||
227 | if (win->surface) return; | ||
228 | |||
229 | win->surface = wl_compositor_create_surface(_ecore_wl_disp->wl.compositor); | ||
230 | wl_surface_set_user_data(win->surface, win); | ||
231 | |||
232 | win->shell_surface = | ||
233 | wl_shell_get_shell_surface(_ecore_wl_disp->wl.shell, win->surface); | ||
234 | wl_shell_surface_add_listener(win->shell_surface, | ||
235 | &_ecore_wl_shell_surface_listener, win); | ||
236 | |||
237 | switch (win->type) | ||
238 | { | ||
239 | case ECORE_WL_WINDOW_TYPE_FULLSCREEN: | ||
240 | wl_shell_surface_set_fullscreen(win->shell_surface, | ||
241 | WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, | ||
242 | 0, NULL); | ||
243 | break; | ||
244 | case ECORE_WL_WINDOW_TYPE_MAXIMIZED: | ||
245 | wl_shell_surface_set_maximized(win->shell_surface, NULL); | ||
246 | break; | ||
247 | case ECORE_WL_WINDOW_TYPE_TRANSIENT: | ||
248 | wl_shell_surface_set_transient(win->shell_surface, | ||
249 | win->parent->shell_surface, | ||
250 | win->allocation.x, win->allocation.y, 0); | ||
251 | break; | ||
252 | case ECORE_WL_WINDOW_TYPE_MENU: | ||
253 | wl_shell_surface_set_popup(win->shell_surface, | ||
254 | win->pointer_device->input_device, | ||
255 | win->pointer_device->timestamp, | ||
256 | win->parent->shell_surface, | ||
257 | win->allocation.x, win->allocation.y, 0); | ||
258 | break; | ||
259 | case ECORE_WL_WINDOW_TYPE_TOPLEVEL: | ||
260 | default: | ||
261 | wl_shell_surface_set_toplevel(win->shell_surface); | ||
262 | break; | ||
263 | } | ||
264 | } | ||
265 | |||
266 | /** | ||
267 | * Hides a window | ||
268 | * | ||
269 | * Synonymous to "unmapping" a window in Wayland System terminology. | ||
270 | * | ||
271 | * @param win The window to hide. | ||
272 | * | ||
273 | * @ingroup Ecore_Wl_Window_Group | ||
274 | * @since 1.2 | ||
275 | */ | ||
276 | EAPI void | ||
277 | ecore_wl_window_hide(Ecore_Wl_Window *win) | ||
278 | { | ||
279 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
280 | |||
281 | if (!win) return; | ||
282 | if (win->shell_surface) wl_shell_surface_destroy(win->shell_surface); | ||
283 | win->shell_surface = NULL; | ||
284 | if (win->surface) wl_surface_destroy(win->surface); | ||
285 | win->surface = NULL; | ||
286 | } | ||
287 | |||
288 | /** | ||
289 | * Raises a window | ||
290 | * | ||
291 | * @param win The window to raise. | ||
292 | * | ||
293 | * @ingroup Ecore_Wl_Window_Group | ||
294 | * @since 1.2 | ||
295 | */ | ||
296 | EAPI void | ||
297 | ecore_wl_window_raise(Ecore_Wl_Window *win) | ||
298 | { | ||
299 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
300 | |||
301 | if (!win) return; | ||
302 | if (win->shell_surface) | ||
303 | wl_shell_surface_set_toplevel(win->shell_surface); | ||
304 | } | ||
305 | |||
306 | EAPI void | ||
307 | ecore_wl_window_maximized_set(Ecore_Wl_Window *win, Eina_Bool maximized) | ||
308 | { | ||
309 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
310 | |||
311 | if (!win) return; | ||
312 | if ((win->type == ECORE_WL_WINDOW_TYPE_MAXIMIZED) == maximized) return; | ||
313 | if (win->type == ECORE_WL_WINDOW_TYPE_TOPLEVEL) | ||
314 | { | ||
315 | win->saved_allocation = win->allocation; | ||
316 | if (win->shell_surface) | ||
317 | wl_shell_surface_set_maximized(win->shell_surface, NULL); | ||
318 | win->type = ECORE_WL_WINDOW_TYPE_MAXIMIZED; | ||
319 | } | ||
320 | else | ||
321 | { | ||
322 | Ecore_Wl_Input *input; | ||
323 | |||
324 | input = win->keyboard_device; | ||
325 | |||
326 | if (win->shell_surface) | ||
327 | wl_shell_surface_set_toplevel(win->shell_surface); | ||
328 | win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; | ||
329 | win->allocation = win->saved_allocation; | ||
330 | _ecore_wl_window_configure_send(win, win->allocation.w, | ||
331 | win->allocation.h, input->timestamp); | ||
332 | } | ||
333 | } | ||
334 | |||
335 | EAPI void | ||
336 | ecore_wl_window_fullscreen_set(Ecore_Wl_Window *win, Eina_Bool fullscreen) | ||
337 | { | ||
338 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
339 | |||
340 | if (!win) return; | ||
341 | if ((win->type == ECORE_WL_WINDOW_TYPE_FULLSCREEN) == fullscreen) return; | ||
342 | if (fullscreen) | ||
343 | { | ||
344 | win->type = ECORE_WL_WINDOW_TYPE_FULLSCREEN; | ||
345 | win->saved_allocation = win->allocation; | ||
346 | if (win->shell_surface) | ||
347 | wl_shell_surface_set_fullscreen(win->shell_surface, | ||
348 | WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, | ||
349 | 0, NULL); | ||
350 | } | ||
351 | else | ||
352 | { | ||
353 | Ecore_Wl_Input *input; | ||
354 | |||
355 | input = win->keyboard_device; | ||
356 | |||
357 | if (win->shell_surface) | ||
358 | wl_shell_surface_set_toplevel(win->shell_surface); | ||
359 | win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; | ||
360 | win->allocation = win->saved_allocation; | ||
361 | _ecore_wl_window_configure_send(win, win->allocation.w, | ||
362 | win->allocation.h, input->timestamp); | ||
363 | } | ||
364 | } | ||
365 | |||
366 | EAPI void | ||
367 | ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h) | ||
368 | { | ||
369 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
370 | |||
371 | if (!win) return; | ||
372 | win->allocation.w = w; | ||
373 | win->allocation.h = h; | ||
374 | } | ||
375 | |||
376 | EAPI struct wl_surface * | ||
377 | ecore_wl_window_surface_get(Ecore_Wl_Window *win) | ||
378 | { | ||
379 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
380 | |||
381 | if (!win) return NULL; | ||
382 | return win->surface; | ||
383 | } | ||
384 | |||
385 | EAPI Ecore_Wl_Window * | ||
386 | ecore_wl_window_find(unsigned int id) | ||
387 | { | ||
388 | Ecore_Wl_Window *win; | ||
389 | |||
390 | if (!id) return NULL; | ||
391 | win = eina_hash_find(_windows, &id); | ||
392 | if (win) return win; | ||
393 | return NULL; | ||
394 | } | ||
395 | |||
396 | /* local functions */ | ||
397 | static void | ||
398 | _ecore_wl_window_cb_configure(void *data, struct wl_shell_surface *shell_surface __UNUSED__, unsigned int timestamp, unsigned int edges, int w, int h) | ||
399 | { | ||
400 | Ecore_Wl_Window *win; | ||
401 | |||
402 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
403 | |||
404 | if (!(win = data)) return; | ||
405 | if ((w <= 0) || (h <= 0)) return; | ||
406 | |||
407 | win->edges = edges; | ||
408 | win->allocation.w = w; | ||
409 | win->allocation.h = h; | ||
410 | _ecore_wl_window_configure_send(win, w, h, timestamp); | ||
411 | } | ||
412 | |||
413 | static void | ||
414 | _ecore_wl_window_cb_popup_done(void *data, struct wl_shell_surface *shell_surface __UNUSED__) | ||
415 | { | ||
416 | Ecore_Wl_Window *win; | ||
417 | |||
418 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
419 | |||
420 | if (!(win = data)) return; | ||
421 | /* TODO: handle popup destroy */ | ||
422 | } | ||
423 | |||
424 | static void | ||
425 | _ecore_wl_window_configure_send(Ecore_Wl_Window *win, int w, int h, unsigned int timestamp) | ||
426 | { | ||
427 | Ecore_Wl_Event_Window_Configure *ev; | ||
428 | |||
429 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
430 | |||
431 | if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Window_Configure)))) return; | ||
432 | ev->win = win->id; | ||
433 | ev->event_win = win->id; | ||
434 | ev->x = win->allocation.x; | ||
435 | ev->y = win->allocation.y; | ||
436 | ev->w = w; | ||
437 | ev->h = h; | ||
438 | ev->timestamp = timestamp; | ||
439 | ecore_event_add(ECORE_WL_EVENT_WINDOW_CONFIGURE, ev, NULL, NULL); | ||
440 | } | ||