aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_wayland
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 17:29:19 +1000
committerDavid Walter Seikel2013-01-13 17:29:19 +1000
commit07274513e984f0b5544586c74508ccd16e7dcafa (patch)
treeb32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/ecore/src/lib/ecore_wayland
parentAdded Irrlicht 1.8, but without all the Windows binaries. (diff)
downloadSledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz
Remove EFL, since it's been released now.
Diffstat (limited to 'libraries/ecore/src/lib/ecore_wayland')
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h304
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/Makefile.am33
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/Makefile.in842
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/ecore_wl.c551
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/ecore_wl_dnd.c189
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/ecore_wl_input.c658
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/ecore_wl_output.c79
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h87
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/ecore_wl_window.c440
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
26typedef enum _Ecore_Wl_Window_Type Ecore_Wl_Window_Type;
27typedef enum _Ecore_Wl_Window_Buffer_Type Ecore_Wl_Window_Buffer_Type;
28
29typedef struct _Ecore_Wl_Display Ecore_Wl_Display;
30typedef struct _Ecore_Wl_Output Ecore_Wl_Output;
31typedef struct _Ecore_Wl_Input Ecore_Wl_Input;
32# ifndef _ECORE_WAYLAND_WINDOW_PREDEF
33typedef struct _Ecore_Wl_Window Ecore_Wl_Window;
34# endif
35typedef struct _Ecore_Wl_Dnd_Source Ecore_Wl_Dnd_Source;
36typedef struct _Ecore_Wl_Dnd_Target Ecore_Wl_Dnd_Target;
37
38typedef struct _Ecore_Wl_Event_Mouse_In Ecore_Wl_Event_Mouse_In;
39typedef struct _Ecore_Wl_Event_Mouse_Out Ecore_Wl_Event_Mouse_Out;
40typedef struct _Ecore_Wl_Event_Focus_In Ecore_Wl_Event_Focus_In;
41typedef struct _Ecore_Wl_Event_Focus_Out Ecore_Wl_Event_Focus_Out;
42typedef struct _Ecore_Wl_Event_Window_Configure Ecore_Wl_Event_Window_Configure;
43typedef struct _Ecore_Wl_Event_Dnd_Enter Ecore_Wl_Event_Dnd_Enter;
44typedef struct _Ecore_Wl_Event_Dnd_Position Ecore_Wl_Event_Dnd_Position;
45typedef struct _Ecore_Wl_Event_Dnd_Leave Ecore_Wl_Event_Dnd_Leave;
46typedef struct _Ecore_Wl_Event_Dnd_Drop Ecore_Wl_Event_Dnd_Drop;
47typedef struct _Ecore_Wl_Event_Interfaces_Bound Ecore_Wl_Event_Interfaces_Bound;
48
49enum _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
59enum _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
66struct _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
104struct _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
115struct _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
138struct _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
166struct _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
180struct _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
194struct _Ecore_Wl_Event_Focus_In
195{
196 unsigned int win;
197 unsigned int timestamp;
198};
199
200struct _Ecore_Wl_Event_Focus_Out
201{
202 unsigned int win;
203 unsigned int timestamp;
204};
205
206struct _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
214struct _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
225struct _Ecore_Wl_Event_Dnd_Position
226{
227 unsigned int win, source;
228 struct
229 {
230 int x, y;
231 } position;
232};
233
234struct _Ecore_Wl_Event_Dnd_Leave
235{
236 unsigned int win, source;
237};
238
239struct _Ecore_Wl_Event_Dnd_Drop
240{
241 unsigned int win, source;
242 struct
243 {
244 int x, y;
245 } position;
246};
247
248struct _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
269EAPI extern int ECORE_WL_EVENT_MOUSE_IN;
270EAPI extern int ECORE_WL_EVENT_MOUSE_OUT;
271EAPI extern int ECORE_WL_EVENT_FOCUS_IN;
272EAPI extern int ECORE_WL_EVENT_FOCUS_OUT;
273EAPI extern int ECORE_WL_EVENT_WINDOW_CONFIGURE;
274EAPI extern int ECORE_WL_EVENT_DND_ENTER;
275EAPI extern int ECORE_WL_EVENT_DND_POSITION;
276EAPI extern int ECORE_WL_EVENT_DND_LEAVE;
277EAPI extern int ECORE_WL_EVENT_DND_DROP;
278EAPI extern int ECORE_WL_EVENT_INTERFACES_BOUND;
279
280EAPI int ecore_wl_init(const char *name);
281EAPI int ecore_wl_shutdown(void);
282EAPI void ecore_wl_flush(void);
283EAPI void ecore_wl_sync(void);
284EAPI struct wl_shm *ecore_wl_shm_get(void);
285EAPI struct wl_display *ecore_wl_display_get(void);
286EAPI void ecore_wl_screen_size_get(int *w, int *h);
287EAPI void ecore_wl_pointer_xy_get(int *x, int *y);
288
289EAPI Ecore_Wl_Window *ecore_wl_window_new(Ecore_Wl_Window *parent, int x, int y, int w, int h, int buffer_type);
290EAPI void ecore_wl_window_free(Ecore_Wl_Window *win);
291EAPI void ecore_wl_window_move(Ecore_Wl_Window *win, int x, int y);
292EAPI void ecore_wl_window_resize(Ecore_Wl_Window *win, int w, int h, int location);
293EAPI void ecore_wl_window_damage(Ecore_Wl_Window *win, int x, int y, int w, int h);
294EAPI void ecore_wl_window_buffer_attach(Ecore_Wl_Window *win, struct wl_buffer *buffer, int x, int y);
295EAPI void ecore_wl_window_show(Ecore_Wl_Window *win);
296EAPI void ecore_wl_window_hide(Ecore_Wl_Window *win);
297EAPI void ecore_wl_window_raise(Ecore_Wl_Window *win);
298EAPI void ecore_wl_window_maximized_set(Ecore_Wl_Window *win, Eina_Bool maximized);
299EAPI void ecore_wl_window_fullscreen_set(Ecore_Wl_Window *win, Eina_Bool fullscreen);
300EAPI void ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h);
301EAPI struct wl_surface *ecore_wl_window_surface_get(Ecore_Wl_Window *win);
302EAPI 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 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_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
12lib_LTLIBRARIES = libecore_wayland.la
13includes_HEADERS = Ecore_Wayland.h
14includesdir = $(includedir)/ecore-@VMAJ@
15
16libecore_wayland_la_SOURCES = \
17ecore_wl.c \
18ecore_wl_output.c \
19ecore_wl_input.c \
20ecore_wl_window.c \
21ecore_wl_dnd.c
22
23libecore_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
30libecore_wayland_la_LDFLAGS = -version-info @version_info@ @release_info@
31libecore_wayland_la_DEPENDENCIES = $(top_builddir)/src/lib/ecore/libecore.la
32
33EXTRA_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
19VPATH = @srcdir@
20pkgdatadir = $(datadir)/@PACKAGE@
21pkgincludedir = $(includedir)/@PACKAGE@
22pkglibdir = $(libdir)/@PACKAGE@
23pkglibexecdir = $(libexecdir)/@PACKAGE@
24am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
25install_sh_DATA = $(install_sh) -c -m 644
26install_sh_PROGRAM = $(install_sh) -c
27install_sh_SCRIPT = $(install_sh) -c
28INSTALL_HEADER = $(INSTALL_DATA)
29transform = $(program_transform_name)
30NORMAL_INSTALL = :
31PRE_INSTALL = :
32POST_INSTALL = :
33NORMAL_UNINSTALL = :
34PRE_UNINSTALL = :
35POST_UNINSTALL = :
36build_triplet = @build@
37host_triplet = @host@
38subdir = src/lib/ecore_wayland
39DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \
40 $(srcdir)/Makefile.in
41ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
42am__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
59am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
60 $(ACLOCAL_M4)
61mkinstalldirs = $(install_sh) -d
62CONFIG_HEADER = $(top_builddir)/config.h
63CONFIG_CLEAN_FILES =
64CONFIG_CLEAN_VPATH_FILES =
65am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
66am__vpath_adj = case $$p in \
67 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
68 *) f=$$p;; \
69 esac;
70am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
71am__install_max = 40
72am__nobase_strip_setup = \
73 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
74am__nobase_strip = \
75 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
76am__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] }'
83am__base_list = \
84 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
85 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
86am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"
87LTLIBRARIES = $(lib_LTLIBRARIES)
88am_libecore_wayland_la_OBJECTS = ecore_wl.lo ecore_wl_output.lo \
89 ecore_wl_input.lo ecore_wl_window.lo ecore_wl_dnd.lo
90libecore_wayland_la_OBJECTS = $(am_libecore_wayland_la_OBJECTS)
91AM_V_lt = $(am__v_lt_$(V))
92am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
93am__v_lt_0 = --silent
94libecore_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 $@
98DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
99depcomp = $(SHELL) $(top_srcdir)/depcomp
100am__depfiles_maybe = depfiles
101am__mv = mv -f
102COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
103 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
104LTCOMPILE = $(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)
108AM_V_CC = $(am__v_CC_$(V))
109am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
110am__v_CC_0 = @echo " CC " $@;
111AM_V_at = $(am__v_at_$(V))
112am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
113am__v_at_0 = @
114CCLD = $(CC)
115LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
116 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
117 $(AM_LDFLAGS) $(LDFLAGS) -o $@
118AM_V_CCLD = $(am__v_CCLD_$(V))
119am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
120am__v_CCLD_0 = @echo " CCLD " $@;
121AM_V_GEN = $(am__v_GEN_$(V))
122am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
123am__v_GEN_0 = @echo " GEN " $@;
124SOURCES = $(libecore_wayland_la_SOURCES)
125DIST_SOURCES = $(libecore_wayland_la_SOURCES)
126HEADERS = $(includes_HEADERS)
127ETAGS = etags
128CTAGS = ctags
129DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
130ACLOCAL = @ACLOCAL@
131ALLOCA = @ALLOCA@
132AMTAR = @AMTAR@
133AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
134AR = @AR@
135AS = @AS@
136AUTOCONF = @AUTOCONF@
137AUTOHEADER = @AUTOHEADER@
138AUTOMAKE = @AUTOMAKE@
139AWK = @AWK@
140CARES_CFLAGS = @CARES_CFLAGS@
141CARES_LIBS = @CARES_LIBS@
142CC = @CC@
143CCDEPMODE = @CCDEPMODE@
144CFLAGS = @CFLAGS@
145CHECK_CFLAGS = @CHECK_CFLAGS@
146CHECK_LIBS = @CHECK_LIBS@
147CPP = @CPP@
148CPPFLAGS = @CPPFLAGS@
149CURL_CFLAGS = @CURL_CFLAGS@
150CURL_LIBS = @CURL_LIBS@
151CXX = @CXX@
152CXXCPP = @CXXCPP@
153CXXDEPMODE = @CXXDEPMODE@
154CXXFLAGS = @CXXFLAGS@
155CYGPATH_W = @CYGPATH_W@
156DEFS = @DEFS@
157DEPDIR = @DEPDIR@
158DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
159DIRECTFB_LIBS = @DIRECTFB_LIBS@
160DLLTOOL = @DLLTOOL@
161DSYMUTIL = @DSYMUTIL@
162DUMPBIN = @DUMPBIN@
163ECHO_C = @ECHO_C@
164ECHO_N = @ECHO_N@
165ECHO_T = @ECHO_T@
166ECORE_XCB_CFLAGS = @ECORE_XCB_CFLAGS@
167ECORE_XCB_LIBS = @ECORE_XCB_LIBS@
168EFL_ECORE_BUILD = @EFL_ECORE_BUILD@
169EFL_ECORE_CON_BUILD = @EFL_ECORE_CON_BUILD@
170EFL_ECORE_EVAS_BUILD = @EFL_ECORE_EVAS_BUILD@
171EFL_ECORE_FILE_BUILD = @EFL_ECORE_FILE_BUILD@
172EFL_ECORE_IMF_BUILD = @EFL_ECORE_IMF_BUILD@
173EFL_ECORE_IMF_EVAS_BUILD = @EFL_ECORE_IMF_EVAS_BUILD@
174EFL_ECORE_INPUT_BUILD = @EFL_ECORE_INPUT_BUILD@
175EFL_ECORE_INPUT_EVAS_BUILD = @EFL_ECORE_INPUT_EVAS_BUILD@
176EFL_ECORE_IPC_BUILD = @EFL_ECORE_IPC_BUILD@
177EFL_ECORE_PSL1GHT_BUILD = @EFL_ECORE_PSL1GHT_BUILD@
178EFL_ECORE_SDL_BUILD = @EFL_ECORE_SDL_BUILD@
179EFL_ECORE_WIN32_BUILD = @EFL_ECORE_WIN32_BUILD@
180EFL_ECORE_WINCE_BUILD = @EFL_ECORE_WINCE_BUILD@
181EFL_PTHREAD_CFLAGS = @EFL_PTHREAD_CFLAGS@
182EFL_PTHREAD_LIBS = @EFL_PTHREAD_LIBS@
183EGREP = @EGREP@
184EINA_CFLAGS = @EINA_CFLAGS@
185EINA_LIBS = @EINA_LIBS@
186ESCAPE_CFLAGS = @ESCAPE_CFLAGS@
187ESCAPE_LIBS = @ESCAPE_LIBS@
188EVAS_CFLAGS = @EVAS_CFLAGS@
189EVAS_LIBS = @EVAS_LIBS@
190EVIL_CFLAGS = @EVIL_CFLAGS@
191EVIL_LIBS = @EVIL_LIBS@
192EXEEXT = @EXEEXT@
193EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
194EXOTIC_LIBS = @EXOTIC_LIBS@
195FGREP = @FGREP@
196GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
197GLIB_CFLAGS = @GLIB_CFLAGS@
198GLIB_LIBS = @GLIB_LIBS@
199GMSGFMT = @GMSGFMT@
200GMSGFMT_015 = @GMSGFMT_015@
201GREP = @GREP@
202INSTALL = @INSTALL@
203INSTALL_DATA = @INSTALL_DATA@
204INSTALL_PROGRAM = @INSTALL_PROGRAM@
205INSTALL_SCRIPT = @INSTALL_SCRIPT@
206INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
207INTLLIBS = @INTLLIBS@
208INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
209KEYSYMDEFS = @KEYSYMDEFS@
210LD = @LD@
211LDFLAGS = @LDFLAGS@
212LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
213LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
214LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
215LIBICONV = @LIBICONV@
216LIBINTL = @LIBINTL@
217LIBOBJS = @LIBOBJS@
218LIBS = @LIBS@
219LIBTOOL = @LIBTOOL@
220LIPO = @LIPO@
221LN_S = @LN_S@
222LTLIBICONV = @LTLIBICONV@
223LTLIBINTL = @LTLIBINTL@
224LTLIBOBJS = @LTLIBOBJS@
225MAKEINFO = @MAKEINFO@
226MKDIR_P = @MKDIR_P@
227MSGFMT = @MSGFMT@
228MSGFMT_015 = @MSGFMT_015@
229MSGMERGE = @MSGMERGE@
230NM = @NM@
231NMEDIT = @NMEDIT@
232OBJC = @OBJC@
233OBJCDEPMODE = @OBJCDEPMODE@
234OBJCFLAGS = @OBJCFLAGS@
235OBJDUMP = @OBJDUMP@
236OBJEXT = @OBJEXT@
237OTOOL = @OTOOL@
238OTOOL64 = @OTOOL64@
239PACKAGE = @PACKAGE@
240PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
241PACKAGE_NAME = @PACKAGE_NAME@
242PACKAGE_STRING = @PACKAGE_STRING@
243PACKAGE_TARNAME = @PACKAGE_TARNAME@
244PACKAGE_URL = @PACKAGE_URL@
245PACKAGE_VERSION = @PACKAGE_VERSION@
246PATH_SEPARATOR = @PATH_SEPARATOR@
247PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
248PIXMAN_LIBS = @PIXMAN_LIBS@
249PKG_CONFIG = @PKG_CONFIG@
250PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
251PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
252POSUB = @POSUB@
253RANLIB = @RANLIB@
254SCIM_CFLAGS = @SCIM_CFLAGS@
255SCIM_LIBS = @SCIM_LIBS@
256SDL_CFLAGS = @SDL_CFLAGS@
257SDL_CONFIG = @SDL_CONFIG@
258SDL_LIBS = @SDL_LIBS@
259SED = @SED@
260SET_MAKE = @SET_MAKE@
261SHELL = @SHELL@
262SHM_OPEN_LIBS = @SHM_OPEN_LIBS@
263SSL_CFLAGS = @SSL_CFLAGS@
264SSL_LIBS = @SSL_LIBS@
265STRIP = @STRIP@
266TLS2_CFLAGS = @TLS2_CFLAGS@
267TLS2_LIBS = @TLS2_LIBS@
268TLS_CFLAGS = @TLS_CFLAGS@
269TLS_LIBS = @TLS_LIBS@
270TSLIB_CFLAGS = @TSLIB_CFLAGS@
271TSLIB_LIBS = @TSLIB_LIBS@
272USE_NLS = @USE_NLS@
273VERSION = @VERSION@
274VMAJ = @VMAJ@
275WAYLAND_CFLAGS = @WAYLAND_CFLAGS@
276WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
277WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
278WAYLAND_LIBS = @WAYLAND_LIBS@
279WIN32_CFLAGS = @WIN32_CFLAGS@
280WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
281WIN32_LIBS = @WIN32_LIBS@
282XCB_COMPOSITE_CFLAGS = @XCB_COMPOSITE_CFLAGS@
283XCB_COMPOSITE_LIBS = @XCB_COMPOSITE_LIBS@
284XCB_CURSOR_CFLAGS = @XCB_CURSOR_CFLAGS@
285XCB_CURSOR_LIBS = @XCB_CURSOR_LIBS@
286XCB_DAMAGE_CFLAGS = @XCB_DAMAGE_CFLAGS@
287XCB_DAMAGE_LIBS = @XCB_DAMAGE_LIBS@
288XCB_DPMS_CFLAGS = @XCB_DPMS_CFLAGS@
289XCB_DPMS_LIBS = @XCB_DPMS_LIBS@
290XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@
291XCB_RANDR_LIBS = @XCB_RANDR_LIBS@
292XCB_RENDER_CFLAGS = @XCB_RENDER_CFLAGS@
293XCB_RENDER_LIBS = @XCB_RENDER_LIBS@
294XCB_SCREENSAVER_CFLAGS = @XCB_SCREENSAVER_CFLAGS@
295XCB_SCREENSAVER_LIBS = @XCB_SCREENSAVER_LIBS@
296XCB_SHAPE_CFLAGS = @XCB_SHAPE_CFLAGS@
297XCB_SHAPE_LIBS = @XCB_SHAPE_LIBS@
298XCB_SYNC_CFLAGS = @XCB_SYNC_CFLAGS@
299XCB_SYNC_LIBS = @XCB_SYNC_LIBS@
300XCB_X11_CFLAGS = @XCB_X11_CFLAGS@
301XCB_X11_LIBS = @XCB_X11_LIBS@
302XCB_XFIXES_CFLAGS = @XCB_XFIXES_CFLAGS@
303XCB_XFIXES_LIBS = @XCB_XFIXES_LIBS@
304XCB_XGESTURE_CFLAGS = @XCB_XGESTURE_CFLAGS@
305XCB_XGESTURE_LIBS = @XCB_XGESTURE_LIBS@
306XCB_XINERAMA_CFLAGS = @XCB_XINERAMA_CFLAGS@
307XCB_XINERAMA_LIBS = @XCB_XINERAMA_LIBS@
308XCB_XINPUT_CFLAGS = @XCB_XINPUT_CFLAGS@
309XCB_XINPUT_LIBS = @XCB_XINPUT_LIBS@
310XCB_XPRINT_CFLAGS = @XCB_XPRINT_CFLAGS@
311XCB_XPRINT_LIBS = @XCB_XPRINT_LIBS@
312XCB_XTEST_CFLAGS = @XCB_XTEST_CFLAGS@
313XCB_XTEST_LIBS = @XCB_XTEST_LIBS@
314XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@
315XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@
316XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
317XDAMAGE_LIBS = @XDAMAGE_LIBS@
318XDPMS_CFLAGS = @XDPMS_CFLAGS@
319XDPMS_LIBS = @XDPMS_LIBS@
320XFIXES_CFLAGS = @XFIXES_CFLAGS@
321XFIXES_LIBS = @XFIXES_LIBS@
322XGESTURE_CFLAGS = @XGESTURE_CFLAGS@
323XGESTURE_LIBS = @XGESTURE_LIBS@
324XGETTEXT = @XGETTEXT@
325XGETTEXT_015 = @XGETTEXT_015@
326XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
327XI2_CFLAGS = @XI2_CFLAGS@
328XI2_LIBS = @XI2_LIBS@
329XINERAMA_CFLAGS = @XINERAMA_CFLAGS@
330XINERAMA_LIBS = @XINERAMA_LIBS@
331XKB_CFLAGS = @XKB_CFLAGS@
332XKB_LIBS = @XKB_LIBS@
333XMKMF = @XMKMF@
334XPRINT_CFLAGS = @XPRINT_CFLAGS@
335XPRINT_LIBS = @XPRINT_LIBS@
336XRANDR_CFLAGS = @XRANDR_CFLAGS@
337XRANDR_LIBS = @XRANDR_LIBS@
338XRENDER_CFLAGS = @XRENDER_CFLAGS@
339XRENDER_LIBS = @XRENDER_LIBS@
340XSS_CFLAGS = @XSS_CFLAGS@
341XSS_LIBS = @XSS_LIBS@
342XTEST_CFLAGS = @XTEST_CFLAGS@
343XTEST_LIBS = @XTEST_LIBS@
344X_CFLAGS = @X_CFLAGS@
345X_EXTRA_LIBS = @X_EXTRA_LIBS@
346X_LIBS = @X_LIBS@
347X_PRE_LIBS = @X_PRE_LIBS@
348Xcursor_cflags = @Xcursor_cflags@
349Xcursor_libs = @Xcursor_libs@
350abs_builddir = @abs_builddir@
351abs_srcdir = @abs_srcdir@
352abs_top_builddir = @abs_top_builddir@
353abs_top_srcdir = @abs_top_srcdir@
354ac_ct_CC = @ac_ct_CC@
355ac_ct_CXX = @ac_ct_CXX@
356ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
357ac_ct_OBJC = @ac_ct_OBJC@
358am__include = @am__include@
359am__leading_dot = @am__leading_dot@
360am__quote = @am__quote@
361am__tar = @am__tar@
362am__untar = @am__untar@
363bindir = @bindir@
364build = @build@
365build_alias = @build_alias@
366build_cpu = @build_cpu@
367build_os = @build_os@
368build_vendor = @build_vendor@
369builddir = @builddir@
370cocoa_ldflags = @cocoa_ldflags@
371datadir = @datadir@
372datarootdir = @datarootdir@
373dlopen_libs = @dlopen_libs@
374docdir = @docdir@
375dvidir = @dvidir@
376ecore_cocoa_cflags = @ecore_cocoa_cflags@
377ecore_cocoa_libs = @ecore_cocoa_libs@
378ecore_con_cflags = @ecore_con_cflags@
379ecore_con_libs = @ecore_con_libs@
380ecore_directfb_cflags = @ecore_directfb_cflags@
381ecore_directfb_libs = @ecore_directfb_libs@
382ecore_evas_cflags = @ecore_evas_cflags@
383ecore_evas_libs = @ecore_evas_libs@
384ecore_fb_cflags = @ecore_fb_cflags@
385ecore_fb_libs = @ecore_fb_libs@
386ecore_file_cflags = @ecore_file_cflags@
387ecore_file_libs = @ecore_file_libs@
388ecore_imf_cflags = @ecore_imf_cflags@
389ecore_imf_evas_cflags = @ecore_imf_evas_cflags@
390ecore_imf_evas_libs = @ecore_imf_evas_libs@
391ecore_imf_libs = @ecore_imf_libs@
392ecore_imf_scim_cflags = @ecore_imf_scim_cflags@
393ecore_imf_scim_libs = @ecore_imf_scim_libs@
394ecore_imf_xim_cflags = @ecore_imf_xim_cflags@
395ecore_imf_xim_libs = @ecore_imf_xim_libs@
396ecore_input_cflags = @ecore_input_cflags@
397ecore_input_evas_cflags = @ecore_input_evas_cflags@
398ecore_input_evas_libs = @ecore_input_evas_libs@
399ecore_input_libs = @ecore_input_libs@
400ecore_ipc_cflags = @ecore_ipc_cflags@
401ecore_ipc_libs = @ecore_ipc_libs@
402ecore_psl1ght_cflags = @ecore_psl1ght_cflags@
403ecore_psl1ght_libs = @ecore_psl1ght_libs@
404ecore_sdl_cflags = @ecore_sdl_cflags@
405ecore_sdl_libs = @ecore_sdl_libs@
406ecore_wayland_cflags = @ecore_wayland_cflags@
407ecore_wayland_libs = @ecore_wayland_libs@
408ecore_win32_cflags = @ecore_win32_cflags@
409ecore_win32_libs = @ecore_win32_libs@
410ecore_wince_cflags = @ecore_wince_cflags@
411ecore_wince_libs = @ecore_wince_libs@
412ecore_x_cflags = @ecore_x_cflags@
413ecore_x_libs = @ecore_x_libs@
414ecore_x_libs_private = @ecore_x_libs_private@
415efl_doxygen = @efl_doxygen@
416efl_have_doxygen = @efl_have_doxygen@
417exec_prefix = @exec_prefix@
418have_ecore_x_xcb_define = @have_ecore_x_xcb_define@
419host = @host@
420host_alias = @host_alias@
421host_cpu = @host_cpu@
422host_os = @host_os@
423host_vendor = @host_vendor@
424htmldir = @htmldir@
425includedir = @includedir@
426infodir = @infodir@
427install_sh = @install_sh@
428libdir = @libdir@
429libexecdir = @libexecdir@
430localedir = @localedir@
431localstatedir = @localstatedir@
432lt_ECHO = @lt_ECHO@
433lt_enable_auto_import = @lt_enable_auto_import@
434mandir = @mandir@
435mkdir_p = @mkdir_p@
436oldincludedir = @oldincludedir@
437pdfdir = @pdfdir@
438pkgconfig_requires_private = @pkgconfig_requires_private@
439prefix = @prefix@
440program_transform_name = @program_transform_name@
441psdir = @psdir@
442release_info = @release_info@
443requirements_ecore = @requirements_ecore@
444requirements_ecore_cocoa = @requirements_ecore_cocoa@
445requirements_ecore_con = @requirements_ecore_con@
446requirements_ecore_directfb = @requirements_ecore_directfb@
447requirements_ecore_evas = @requirements_ecore_evas@
448requirements_ecore_fb = @requirements_ecore_fb@
449requirements_ecore_file = @requirements_ecore_file@
450requirements_ecore_imf = @requirements_ecore_imf@
451requirements_ecore_imf_evas = @requirements_ecore_imf_evas@
452requirements_ecore_imf_scim = @requirements_ecore_imf_scim@
453requirements_ecore_imf_xim = @requirements_ecore_imf_xim@
454requirements_ecore_input = @requirements_ecore_input@
455requirements_ecore_input_evas = @requirements_ecore_input_evas@
456requirements_ecore_ipc = @requirements_ecore_ipc@
457requirements_ecore_psl1ght = @requirements_ecore_psl1ght@
458requirements_ecore_sdl = @requirements_ecore_sdl@
459requirements_ecore_wayland = @requirements_ecore_wayland@
460requirements_ecore_win32 = @requirements_ecore_win32@
461requirements_ecore_wince = @requirements_ecore_wince@
462requirements_ecore_x = @requirements_ecore_x@
463rt_libs = @rt_libs@
464sbindir = @sbindir@
465sharedstatedir = @sharedstatedir@
466srcdir = @srcdir@
467sysconfdir = @sysconfdir@
468target_alias = @target_alias@
469top_build_prefix = @top_build_prefix@
470top_builddir = @top_builddir@
471top_srcdir = @top_srcdir@
472version_info = @version_info@
473x_cflags = @x_cflags@
474x_includes = @x_includes@
475x_libs = @x_libs@
476MAINTAINERCLEANFILES = Makefile.in
477AM_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
486lib_LTLIBRARIES = libecore_wayland.la
487includes_HEADERS = Ecore_Wayland.h
488includesdir = $(includedir)/ecore-@VMAJ@
489libecore_wayland_la_SOURCES = \
490ecore_wl.c \
491ecore_wl_output.c \
492ecore_wl_input.c \
493ecore_wl_window.c \
494ecore_wl_dnd.c
495
496libecore_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
503libecore_wayland_la_LDFLAGS = -version-info @version_info@ @release_info@
504libecore_wayland_la_DEPENDENCIES = $(top_builddir)/src/lib/ecore/libecore.la
505EXTRA_DIST = ecore_wl_private.h
506all: 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
523Makefile: $(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):
540install-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
554uninstall-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
563clean-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
571libecore_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
574mostlyclean-compile:
575 -rm -f *.$(OBJEXT)
576
577distclean-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
610mostlyclean-libtool:
611 -rm -f *.lo
612
613clean-libtool:
614 -rm -rf .libs _libs
615install-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
628uninstall-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
636ID: $(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
644tags: TAGS
645
646TAGS: $(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
667ctags: CTAGS
668CTAGS: $(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
680GTAGS:
681 here=`$(am__cd) $(top_builddir) && pwd` \
682 && $(am__cd) $(top_srcdir) \
683 && gtags -i $(GTAGS_ARGS) "$$here"
684
685distclean-tags:
686 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
687
688distdir: $(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
718check-am: all-am
719check: check-am
720all-am: Makefile $(LTLIBRARIES) $(HEADERS)
721installdirs:
722 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \
723 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
724 done
725install: install-am
726install-exec: install-exec-am
727install-data: install-data-am
728uninstall: uninstall-am
729
730install-am: all-am
731 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
732
733installcheck: installcheck-am
734install-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
739mostlyclean-generic:
740
741clean-generic:
742
743distclean-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
747maintainer-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)
751clean: clean-am
752
753clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
754 mostlyclean-am
755
756distclean: distclean-am
757 -rm -rf ./$(DEPDIR)
758 -rm -f Makefile
759distclean-am: clean-am distclean-compile distclean-generic \
760 distclean-tags
761
762dvi: dvi-am
763
764dvi-am:
765
766html: html-am
767
768html-am:
769
770info: info-am
771
772info-am:
773
774install-data-am: install-includesHEADERS
775
776install-dvi: install-dvi-am
777
778install-dvi-am:
779
780install-exec-am: install-libLTLIBRARIES
781
782install-html: install-html-am
783
784install-html-am:
785
786install-info: install-info-am
787
788install-info-am:
789
790install-man:
791
792install-pdf: install-pdf-am
793
794install-pdf-am:
795
796install-ps: install-ps-am
797
798install-ps-am:
799
800installcheck-am:
801
802maintainer-clean: maintainer-clean-am
803 -rm -rf ./$(DEPDIR)
804 -rm -f Makefile
805maintainer-clean-am: distclean-am maintainer-clean-generic
806
807mostlyclean: mostlyclean-am
808
809mostlyclean-am: mostlyclean-compile mostlyclean-generic \
810 mostlyclean-libtool
811
812pdf: pdf-am
813
814pdf-am:
815
816ps: ps-am
817
818ps-am:
819
820uninstall-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 */
28static Eina_Bool _ecore_wl_shutdown(Eina_Bool close);
29static int _ecore_wl_cb_event_mask_update(unsigned int mask, void *data);
30static Eina_Bool _ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl __UNUSED__);
31static void _ecore_wl_cb_handle_global(struct wl_display *disp, unsigned int id, const char *interface, unsigned int version __UNUSED__, void *data);
32static Eina_Bool _ecore_wl_egl_init(Ecore_Wl_Display *ewd);
33static Eina_Bool _ecore_wl_egl_shutdown(Ecore_Wl_Display *ewd);
34static Eina_Bool _ecore_wl_xkb_init(Ecore_Wl_Display *ewd);
35static Eina_Bool _ecore_wl_xkb_shutdown(Ecore_Wl_Display *ewd);
36
37/* local variables */
38static int _ecore_wl_init_count = 0;
39
40/* external variables */
41int _ecore_wl_log_dom = -1;
42Ecore_Wl_Display *_ecore_wl_disp = NULL;
43
44EAPI int ECORE_WL_EVENT_MOUSE_IN = 0;
45EAPI int ECORE_WL_EVENT_MOUSE_OUT = 0;
46EAPI int ECORE_WL_EVENT_FOCUS_IN = 0;
47EAPI int ECORE_WL_EVENT_FOCUS_OUT = 0;
48EAPI int ECORE_WL_EVENT_WINDOW_CONFIGURE = 0;
49EAPI int ECORE_WL_EVENT_DND_ENTER = 0;
50EAPI int ECORE_WL_EVENT_DND_POSITION = 0;
51EAPI int ECORE_WL_EVENT_DND_LEAVE = 0;
52EAPI int ECORE_WL_EVENT_DND_DROP = 0;
53EAPI 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 */
71EAPI int
72ecore_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 */
212EAPI int
213ecore_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 */
233EAPI void
234ecore_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 */
250EAPI void
251ecore_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 */
274EAPI struct wl_shm *
275ecore_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 */
288EAPI struct wl_display *
289ecore_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 */
303EAPI void
304ecore_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 */
313EAPI void
314ecore_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 */
322static 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
374static 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
386static 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
398static 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
443static 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
500static 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
522static 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
544static 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 */
11static void _ecore_wl_dnd_offer(void *data, struct wl_data_offer *wl_data_offer __UNUSED__, const char *type);
12static void _ecore_wl_dnd_cb_enter_free(void *data __UNUSED__, void *event);
13
14/* wayland listeners */
15static const struct wl_data_offer_listener _ecore_wl_data_offer_listener =
16{
17 _ecore_wl_dnd_offer,
18};
19
20void
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
39void
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
72void
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
84void
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
107void
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
127void
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
147void
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 */
167static 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
180static 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 */
26static void _ecore_wl_input_cb_motion(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int sx, int sy);
27static void _ecore_wl_input_cb_button(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, unsigned int button, unsigned int state);
28static 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);
29static 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);
30static void _ecore_wl_input_cb_pointer_leave(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__);
31static 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);
32static void _ecore_wl_input_cb_keyboard_leave(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__);
33static 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);
34static void _ecore_wl_input_cb_touch_up(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int id __UNUSED__);
35static 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);
36static void _ecore_wl_input_cb_touch_frame(void *data __UNUSED__, struct wl_input_device *input_device __UNUSED__);
37static void _ecore_wl_input_cb_touch_cancel(void *data __UNUSED__, struct wl_input_device *input_device __UNUSED__);
38static void _ecore_wl_input_cb_data_offer(void *data, struct wl_data_device *data_device, unsigned int id);
39static 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);
40static void _ecore_wl_input_cb_data_leave(void *data, struct wl_data_device *data_device);
41static void _ecore_wl_input_cb_data_motion(void *data, struct wl_data_device *data_device, unsigned int timestamp, int x, int y);
42static void _ecore_wl_input_cb_data_drop(void *data, struct wl_data_device *data_device);
43static void _ecore_wl_input_cb_data_selection(void *data, struct wl_data_device *data_device, struct wl_data_offer *offer);
44
45static void _ecore_wl_input_keyboard_focus_remove(Ecore_Wl_Input *input, unsigned int timestamp);
46static void _ecore_wl_input_pointer_focus_remove(Ecore_Wl_Input *input, unsigned int timestamp);
47static void _ecore_wl_input_mouse_move_send(Ecore_Wl_Input *input, unsigned int timestamp);
48static void _ecore_wl_input_cb_mouse_move_free(void *data __UNUSED__, void *event);
49static void _ecore_wl_input_mouse_in_send(Ecore_Wl_Input *input, unsigned int timestamp);
50static void _ecore_wl_input_mouse_out_send(Ecore_Wl_Input *input, unsigned int timestamp);
51static void _ecore_wl_input_focus_in_send(Ecore_Wl_Input *input, unsigned int timestamp);
52static void _ecore_wl_input_focus_out_send(Ecore_Wl_Input *input, unsigned int timestamp);
53static void _ecore_wl_input_mouse_down_send(Ecore_Wl_Input *input, unsigned int timestamp);
54static void _ecore_wl_input_mouse_up_send(Ecore_Wl_Input *input, unsigned int timestamp);
55
56/* wayland interfaces */
57static 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
73static 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 */
84static int _pointer_x, _pointer_y;
85
86void
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
115void
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
135void
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 */
143static 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
162static 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
195static 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
224static 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
263static 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
274static 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
303static 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
314static 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
332static 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
348static 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
366static 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
372static 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
378static 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
386static 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
394static 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
402static 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
410static 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
418static 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
426static 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
439static 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
454static 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
487static 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
495static 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
519static 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
542static 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
556static 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
570static 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
615static 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 */
11static 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__);
12static 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 */
15static const struct wl_output_listener _ecore_wl_output_listener =
16{
17 _ecore_wl_output_cb_geometry,
18 _ecore_wl_output_cb_mode
19};
20
21void
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
39void
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 */
50static 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
62static 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
18extern int _ecore_wl_log_dom;
19extern 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
51struct _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
64struct _Ecore_Wl_Dnd_Target
65{
66 Ecore_Wl_Dnd_Source *source;
67};
68
69void _ecore_wl_window_init(void);
70void _ecore_wl_window_shutdown(void);
71
72void _ecore_wl_output_add(Ecore_Wl_Display *ewd, unsigned int id);
73void _ecore_wl_output_del(Ecore_Wl_Output *output);
74
75void _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id);
76void _ecore_wl_input_del(Ecore_Wl_Input *input);
77void _ecore_wl_input_pointer_xy_get(int *x, int *y);
78
79void _ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device, unsigned int id);
80void _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);
81void _ecore_wl_dnd_leave(void *data, struct wl_data_device *data_device __UNUSED__);
82void _ecore_wl_dnd_motion(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, int x, int y);
83void _ecore_wl_dnd_drop(void *data, struct wl_data_device *data_device __UNUSED__);
84void _ecore_wl_dnd_selection(void *data, struct wl_data_device *data_device __UNUSED__, struct wl_data_offer *offer);
85void _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 */
11static 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);
12static void _ecore_wl_window_cb_popup_done(void *data, struct wl_shell_surface *shell_surface __UNUSED__);
13static void _ecore_wl_window_configure_send(Ecore_Wl_Window *win, int w, int h, unsigned int timestamp);
14
15/* local variables */
16static Eina_Hash *_windows = NULL;
17
18/* wayland listeners */
19static 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 */
26void
27_ecore_wl_window_init(void)
28{
29 if (!_windows) _windows = eina_hash_pointer_new(free);
30}
31
32void
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 */
60EAPI Ecore_Wl_Window *
61ecore_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 */
100EAPI void
101ecore_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 */
141EAPI void
142ecore_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 */
173EAPI void
174ecore_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
191EAPI void
192ecore_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
201EAPI void
202ecore_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 */
221EAPI void
222ecore_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 */
276EAPI void
277ecore_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 */
296EAPI void
297ecore_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
306EAPI void
307ecore_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
335EAPI void
336ecore_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
366EAPI void
367ecore_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
376EAPI struct wl_surface *
377ecore_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
385EAPI Ecore_Wl_Window *
386ecore_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 */
397static 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
413static 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
424static 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}