aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_wayland
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-23 23:30:42 +1000
committerDavid Walter Seikel2012-01-23 23:30:42 +1000
commit825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch)
tree75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/ecore/src/lib/ecore_wayland
parentAdd ability to disable the test harness, or the Lua compile test. (diff)
downloadSledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip
SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz
SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2
SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to 'libraries/ecore/src/lib/ecore_wayland')
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h123
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/Makefile.am31
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/Makefile.in829
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/ecore_wl.c1213
-rw-r--r--libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h85
5 files changed, 2281 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h b/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h
new file mode 100644
index 0000000..fdf6314
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h
@@ -0,0 +1,123 @@
1#ifndef _ECORE_WAYLAND_H_
2# define _ECORE_WAYLAND_H_
3
4# include <Eina.h>
5# include <wayland-client.h>
6
7# ifdef EAPI
8# undef EAPI
9# endif
10
11# ifdef __GNUC__
12# if __GNUC__ >= 4
13# define EAPI __attribute__ ((visibility("default")))
14# else
15# define EAPI
16# endif
17# else
18# define EAPI
19# endif
20
21typedef struct _Ecore_Wl_Event_Mouse_In Ecore_Wl_Event_Mouse_In;
22typedef struct _Ecore_Wl_Event_Mouse_Out Ecore_Wl_Event_Mouse_Out;
23typedef struct _Ecore_Wl_Event_Focus_In Ecore_Wl_Event_Focus_In;
24typedef struct _Ecore_Wl_Event_Focus_Out Ecore_Wl_Event_Focus_Out;
25
26typedef struct _Ecore_Wl_Drag_Source Ecore_Wl_Drag_Source;
27
28typedef struct _Ecore_Wl_Event_Drag_Start Ecore_Wl_Event_Drag_Start;
29typedef struct _Ecore_Wl_Event_Drag_Stop Ecore_Wl_Event_Drag_Stop;
30
31struct _Ecore_Wl_Event_Mouse_In
32{
33 int modifiers;
34 int x, y;
35
36 struct
37 {
38 int x, y;
39 } root;
40
41 unsigned int window;
42
43 unsigned int time;
44};
45
46struct _Ecore_Wl_Event_Mouse_Out
47{
48 int modifiers;
49 int x, y;
50
51 struct
52 {
53 int x, y;
54 } root;
55
56 unsigned int window;
57
58 unsigned int time;
59};
60
61struct _Ecore_Wl_Event_Focus_In
62{
63 unsigned int window;
64 /* TODO: mode & detail */
65 unsigned int time;
66};
67
68struct _Ecore_Wl_Event_Focus_Out
69{
70 unsigned int window;
71 /* TODO: mode & detail */
72 unsigned int time;
73};
74
75struct _Ecore_Wl_Event_Drag_Start
76{
77 struct wl_data_device *device;
78 struct wl_surface *surface;
79 const char *mime_type;
80 uint32_t timestamp;
81};
82
83struct _Ecore_Wl_Event_Drag_Stop
84{
85
86};
87
88/**
89 * @file
90 * @brief Ecore functions for dealing with the Wayland window system
91 *
92 * Ecore_Wl provides a wrapper and convenience functions for using the
93 * Wayland window system. Function groups for this part of the library
94 * include the following:
95 * @li @ref Ecore_Wl_Init_Group
96 */
97
98EAPI int ecore_wl_init(const char *name);
99EAPI int ecore_wl_shutdown(void);
100
101EAPI struct wl_display *ecore_wl_display_get(void);
102EAPI struct wl_shm *ecore_wl_shm_get(void);
103EAPI struct wl_compositor *ecore_wl_compositor_get(void);
104EAPI struct wl_shell *ecore_wl_shell_get(void);
105EAPI struct wl_input_device *ecore_wl_input_device_get(void);
106EAPI void ecore_wl_screen_size_get(int *w, int *h);
107EAPI unsigned int ecore_wl_format_get(void);
108EAPI void ecore_wl_flush(void);
109EAPI void ecore_wl_sync(void);
110EAPI void ecore_wl_pointer_xy_get(int *x, int *y);
111
112EAPI Ecore_Wl_Drag_Source *ecore_wl_drag_source_create(int hotspot_x, int hotspot_y, int offset_x, int offset_y, const char *mimetype, unsigned int timestamp, void *data);
113EAPI void ecore_wl_drag_start(Ecore_Wl_Drag_Source *source, struct wl_surface *surface, struct wl_buffer *buffer);
114EAPI void ecore_wl_drag_stop(void);
115
116EAPI extern int ECORE_WL_EVENT_MOUSE_IN;
117EAPI extern int ECORE_WL_EVENT_MOUSE_OUT;
118EAPI extern int ECORE_WL_EVENT_FOCUS_IN;
119EAPI extern int ECORE_WL_EVENT_FOCUS_OUT;
120EAPI extern int ECORE_WL_EVENT_DRAG_START;
121EAPI extern int ECORE_WL_EVENT_DRAG_STOP;
122
123#endif
diff --git a/libraries/ecore/src/lib/ecore_wayland/Makefile.am b/libraries/ecore/src/lib/ecore_wayland/Makefile.am
new file mode 100644
index 0000000..ea005b2
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_wayland/Makefile.am
@@ -0,0 +1,31 @@
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
18
19## ecore_wl_window.c
20
21libecore_wayland_la_LIBADD = \
22$(top_builddir)/src/lib/ecore/libecore.la \
23$(top_builddir)/src/lib/ecore_input/libecore_input.la \
24@WAYLAND_LIBS@ \
25@EVAS_LIBS@ \
26@EINA_LIBS@
27
28libecore_wayland_la_LDFLAGS = -version-info @version_info@ @release_info@
29libecore_wayland_la_DEPENDENCIES = $(top_builddir)/src/lib/ecore/libecore.la
30
31EXTRA_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
new file mode 100644
index 0000000..411da19
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_wayland/Makefile.in
@@ -0,0 +1,829 @@
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/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
54 $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
55 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
56 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
57 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
58 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
59 $(top_srcdir)/configure.ac
60am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
61 $(ACLOCAL_M4)
62mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
63CONFIG_HEADER = $(top_builddir)/config.h
64CONFIG_CLEAN_FILES =
65CONFIG_CLEAN_VPATH_FILES =
66am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
67am__vpath_adj = case $$p in \
68 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
69 *) f=$$p;; \
70 esac;
71am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
72am__install_max = 40
73am__nobase_strip_setup = \
74 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
75am__nobase_strip = \
76 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
77am__nobase_list = $(am__nobase_strip_setup); \
78 for p in $$list; do echo "$$p $$p"; done | \
79 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
80 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
81 if (++n[$$2] == $(am__install_max)) \
82 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
83 END { for (dir in files) print dir, files[dir] }'
84am__base_list = \
85 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
86 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
87am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"
88LTLIBRARIES = $(lib_LTLIBRARIES)
89am_libecore_wayland_la_OBJECTS = ecore_wl.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@
193FGREP = @FGREP@
194GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
195GLIB_CFLAGS = @GLIB_CFLAGS@
196GLIB_LIBS = @GLIB_LIBS@
197GMSGFMT = @GMSGFMT@
198GMSGFMT_015 = @GMSGFMT_015@
199GREP = @GREP@
200INSTALL = @INSTALL@
201INSTALL_DATA = @INSTALL_DATA@
202INSTALL_PROGRAM = @INSTALL_PROGRAM@
203INSTALL_SCRIPT = @INSTALL_SCRIPT@
204INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
205INTLLIBS = @INTLLIBS@
206INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
207KEYSYMDEFS = @KEYSYMDEFS@
208LD = @LD@
209LDFLAGS = @LDFLAGS@
210LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
211LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
212LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
213LIBICONV = @LIBICONV@
214LIBINTL = @LIBINTL@
215LIBOBJS = @LIBOBJS@
216LIBS = @LIBS@
217LIBTOOL = @LIBTOOL@
218LIPO = @LIPO@
219LN_S = @LN_S@
220LTLIBICONV = @LTLIBICONV@
221LTLIBINTL = @LTLIBINTL@
222LTLIBOBJS = @LTLIBOBJS@
223MAKEINFO = @MAKEINFO@
224MKDIR_P = @MKDIR_P@
225MSGFMT = @MSGFMT@
226MSGFMT_015 = @MSGFMT_015@
227MSGMERGE = @MSGMERGE@
228NM = @NM@
229NMEDIT = @NMEDIT@
230OBJC = @OBJC@
231OBJCDEPMODE = @OBJCDEPMODE@
232OBJCFLAGS = @OBJCFLAGS@
233OBJDUMP = @OBJDUMP@
234OBJEXT = @OBJEXT@
235OTOOL = @OTOOL@
236OTOOL64 = @OTOOL64@
237PACKAGE = @PACKAGE@
238PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
239PACKAGE_NAME = @PACKAGE_NAME@
240PACKAGE_STRING = @PACKAGE_STRING@
241PACKAGE_TARNAME = @PACKAGE_TARNAME@
242PACKAGE_URL = @PACKAGE_URL@
243PACKAGE_VERSION = @PACKAGE_VERSION@
244PATH_SEPARATOR = @PATH_SEPARATOR@
245PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
246PIXMAN_LIBS = @PIXMAN_LIBS@
247PKG_CONFIG = @PKG_CONFIG@
248POSUB = @POSUB@
249RANLIB = @RANLIB@
250SCIM_CFLAGS = @SCIM_CFLAGS@
251SCIM_LIBS = @SCIM_LIBS@
252SDL_CFLAGS = @SDL_CFLAGS@
253SDL_CONFIG = @SDL_CONFIG@
254SDL_LIBS = @SDL_LIBS@
255SED = @SED@
256SET_MAKE = @SET_MAKE@
257SHELL = @SHELL@
258SSL_CFLAGS = @SSL_CFLAGS@
259SSL_LIBS = @SSL_LIBS@
260STRIP = @STRIP@
261TLS2_CFLAGS = @TLS2_CFLAGS@
262TLS2_LIBS = @TLS2_LIBS@
263TLS_CFLAGS = @TLS_CFLAGS@
264TLS_LIBS = @TLS_LIBS@
265TSLIB_CFLAGS = @TSLIB_CFLAGS@
266TSLIB_LIBS = @TSLIB_LIBS@
267USE_NLS = @USE_NLS@
268VERSION = @VERSION@
269VMAJ = @VMAJ@
270WAYLAND_CFLAGS = @WAYLAND_CFLAGS@
271WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
272WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
273WAYLAND_LIBS = @WAYLAND_LIBS@
274WIN32_CFLAGS = @WIN32_CFLAGS@
275WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
276WIN32_LIBS = @WIN32_LIBS@
277XCB_COMPOSITE_CFLAGS = @XCB_COMPOSITE_CFLAGS@
278XCB_COMPOSITE_LIBS = @XCB_COMPOSITE_LIBS@
279XCB_CURSOR_CFLAGS = @XCB_CURSOR_CFLAGS@
280XCB_CURSOR_LIBS = @XCB_CURSOR_LIBS@
281XCB_DAMAGE_CFLAGS = @XCB_DAMAGE_CFLAGS@
282XCB_DAMAGE_LIBS = @XCB_DAMAGE_LIBS@
283XCB_DPMS_CFLAGS = @XCB_DPMS_CFLAGS@
284XCB_DPMS_LIBS = @XCB_DPMS_LIBS@
285XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@
286XCB_RANDR_LIBS = @XCB_RANDR_LIBS@
287XCB_RENDER_CFLAGS = @XCB_RENDER_CFLAGS@
288XCB_RENDER_LIBS = @XCB_RENDER_LIBS@
289XCB_SCREENSAVER_CFLAGS = @XCB_SCREENSAVER_CFLAGS@
290XCB_SCREENSAVER_LIBS = @XCB_SCREENSAVER_LIBS@
291XCB_SHAPE_CFLAGS = @XCB_SHAPE_CFLAGS@
292XCB_SHAPE_LIBS = @XCB_SHAPE_LIBS@
293XCB_SYNC_CFLAGS = @XCB_SYNC_CFLAGS@
294XCB_SYNC_LIBS = @XCB_SYNC_LIBS@
295XCB_X11_CFLAGS = @XCB_X11_CFLAGS@
296XCB_X11_LIBS = @XCB_X11_LIBS@
297XCB_XFIXES_CFLAGS = @XCB_XFIXES_CFLAGS@
298XCB_XFIXES_LIBS = @XCB_XFIXES_LIBS@
299XCB_XGESTURE_CFLAGS = @XCB_XGESTURE_CFLAGS@
300XCB_XGESTURE_LIBS = @XCB_XGESTURE_LIBS@
301XCB_XINERAMA_CFLAGS = @XCB_XINERAMA_CFLAGS@
302XCB_XINERAMA_LIBS = @XCB_XINERAMA_LIBS@
303XCB_XINPUT_CFLAGS = @XCB_XINPUT_CFLAGS@
304XCB_XINPUT_LIBS = @XCB_XINPUT_LIBS@
305XCB_XPRINT_CFLAGS = @XCB_XPRINT_CFLAGS@
306XCB_XPRINT_LIBS = @XCB_XPRINT_LIBS@
307XCB_XTEST_CFLAGS = @XCB_XTEST_CFLAGS@
308XCB_XTEST_LIBS = @XCB_XTEST_LIBS@
309XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@
310XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@
311XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
312XDAMAGE_LIBS = @XDAMAGE_LIBS@
313XDPMS_CFLAGS = @XDPMS_CFLAGS@
314XDPMS_LIBS = @XDPMS_LIBS@
315XFIXES_CFLAGS = @XFIXES_CFLAGS@
316XFIXES_LIBS = @XFIXES_LIBS@
317XGESTURE_CFLAGS = @XGESTURE_CFLAGS@
318XGESTURE_LIBS = @XGESTURE_LIBS@
319XGETTEXT = @XGETTEXT@
320XGETTEXT_015 = @XGETTEXT_015@
321XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
322XI2_CFLAGS = @XI2_CFLAGS@
323XI2_LIBS = @XI2_LIBS@
324XINERAMA_CFLAGS = @XINERAMA_CFLAGS@
325XINERAMA_LIBS = @XINERAMA_LIBS@
326XKB_CFLAGS = @XKB_CFLAGS@
327XKB_LIBS = @XKB_LIBS@
328XMKMF = @XMKMF@
329XPRINT_CFLAGS = @XPRINT_CFLAGS@
330XPRINT_LIBS = @XPRINT_LIBS@
331XRANDR_CFLAGS = @XRANDR_CFLAGS@
332XRANDR_LIBS = @XRANDR_LIBS@
333XRENDER_CFLAGS = @XRENDER_CFLAGS@
334XRENDER_LIBS = @XRENDER_LIBS@
335XSS_CFLAGS = @XSS_CFLAGS@
336XSS_LIBS = @XSS_LIBS@
337XTEST_CFLAGS = @XTEST_CFLAGS@
338XTEST_LIBS = @XTEST_LIBS@
339X_CFLAGS = @X_CFLAGS@
340X_EXTRA_LIBS = @X_EXTRA_LIBS@
341X_LIBS = @X_LIBS@
342X_PRE_LIBS = @X_PRE_LIBS@
343Xcursor_cflags = @Xcursor_cflags@
344Xcursor_libs = @Xcursor_libs@
345abs_builddir = @abs_builddir@
346abs_srcdir = @abs_srcdir@
347abs_top_builddir = @abs_top_builddir@
348abs_top_srcdir = @abs_top_srcdir@
349ac_ct_CC = @ac_ct_CC@
350ac_ct_CXX = @ac_ct_CXX@
351ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
352ac_ct_OBJC = @ac_ct_OBJC@
353am__include = @am__include@
354am__leading_dot = @am__leading_dot@
355am__quote = @am__quote@
356am__tar = @am__tar@
357am__untar = @am__untar@
358bindir = @bindir@
359build = @build@
360build_alias = @build_alias@
361build_cpu = @build_cpu@
362build_os = @build_os@
363build_vendor = @build_vendor@
364builddir = @builddir@
365cocoa_ldflags = @cocoa_ldflags@
366datadir = @datadir@
367datarootdir = @datarootdir@
368dlopen_libs = @dlopen_libs@
369docdir = @docdir@
370dvidir = @dvidir@
371ecore_cocoa_cflags = @ecore_cocoa_cflags@
372ecore_cocoa_libs = @ecore_cocoa_libs@
373ecore_con_cflags = @ecore_con_cflags@
374ecore_con_libs = @ecore_con_libs@
375ecore_directfb_cflags = @ecore_directfb_cflags@
376ecore_directfb_libs = @ecore_directfb_libs@
377ecore_evas_cflags = @ecore_evas_cflags@
378ecore_evas_libs = @ecore_evas_libs@
379ecore_fb_cflags = @ecore_fb_cflags@
380ecore_fb_libs = @ecore_fb_libs@
381ecore_file_cflags = @ecore_file_cflags@
382ecore_file_libs = @ecore_file_libs@
383ecore_imf_cflags = @ecore_imf_cflags@
384ecore_imf_evas_cflags = @ecore_imf_evas_cflags@
385ecore_imf_evas_libs = @ecore_imf_evas_libs@
386ecore_imf_libs = @ecore_imf_libs@
387ecore_imf_scim_cflags = @ecore_imf_scim_cflags@
388ecore_imf_scim_libs = @ecore_imf_scim_libs@
389ecore_imf_xim_cflags = @ecore_imf_xim_cflags@
390ecore_imf_xim_libs = @ecore_imf_xim_libs@
391ecore_input_cflags = @ecore_input_cflags@
392ecore_input_evas_cflags = @ecore_input_evas_cflags@
393ecore_input_evas_libs = @ecore_input_evas_libs@
394ecore_input_libs = @ecore_input_libs@
395ecore_ipc_cflags = @ecore_ipc_cflags@
396ecore_ipc_libs = @ecore_ipc_libs@
397ecore_psl1ght_cflags = @ecore_psl1ght_cflags@
398ecore_psl1ght_libs = @ecore_psl1ght_libs@
399ecore_sdl_cflags = @ecore_sdl_cflags@
400ecore_sdl_libs = @ecore_sdl_libs@
401ecore_wayland_cflags = @ecore_wayland_cflags@
402ecore_wayland_libs = @ecore_wayland_libs@
403ecore_win32_cflags = @ecore_win32_cflags@
404ecore_win32_libs = @ecore_win32_libs@
405ecore_wince_cflags = @ecore_wince_cflags@
406ecore_wince_libs = @ecore_wince_libs@
407ecore_x_cflags = @ecore_x_cflags@
408ecore_x_libs = @ecore_x_libs@
409ecore_x_libs_private = @ecore_x_libs_private@
410efl_doxygen = @efl_doxygen@
411efl_have_doxygen = @efl_have_doxygen@
412exec_prefix = @exec_prefix@
413have_ecore_x_xcb_define = @have_ecore_x_xcb_define@
414host = @host@
415host_alias = @host_alias@
416host_cpu = @host_cpu@
417host_os = @host_os@
418host_vendor = @host_vendor@
419htmldir = @htmldir@
420includedir = @includedir@
421infodir = @infodir@
422install_sh = @install_sh@
423libdir = @libdir@
424libexecdir = @libexecdir@
425localedir = @localedir@
426localstatedir = @localstatedir@
427lt_ECHO = @lt_ECHO@
428lt_enable_auto_import = @lt_enable_auto_import@
429mandir = @mandir@
430mkdir_p = @mkdir_p@
431oldincludedir = @oldincludedir@
432pdfdir = @pdfdir@
433pkgconfig_requires_private = @pkgconfig_requires_private@
434prefix = @prefix@
435program_transform_name = @program_transform_name@
436psdir = @psdir@
437release_info = @release_info@
438requirements_ecore = @requirements_ecore@
439requirements_ecore_cocoa = @requirements_ecore_cocoa@
440requirements_ecore_con = @requirements_ecore_con@
441requirements_ecore_directfb = @requirements_ecore_directfb@
442requirements_ecore_evas = @requirements_ecore_evas@
443requirements_ecore_fb = @requirements_ecore_fb@
444requirements_ecore_file = @requirements_ecore_file@
445requirements_ecore_imf = @requirements_ecore_imf@
446requirements_ecore_imf_evas = @requirements_ecore_imf_evas@
447requirements_ecore_imf_scim = @requirements_ecore_imf_scim@
448requirements_ecore_imf_xim = @requirements_ecore_imf_xim@
449requirements_ecore_input = @requirements_ecore_input@
450requirements_ecore_input_evas = @requirements_ecore_input_evas@
451requirements_ecore_ipc = @requirements_ecore_ipc@
452requirements_ecore_psl1ght = @requirements_ecore_psl1ght@
453requirements_ecore_sdl = @requirements_ecore_sdl@
454requirements_ecore_wayland = @requirements_ecore_wayland@
455requirements_ecore_win32 = @requirements_ecore_win32@
456requirements_ecore_wince = @requirements_ecore_wince@
457requirements_ecore_x = @requirements_ecore_x@
458rt_libs = @rt_libs@
459sbindir = @sbindir@
460sharedstatedir = @sharedstatedir@
461srcdir = @srcdir@
462sysconfdir = @sysconfdir@
463target_alias = @target_alias@
464top_build_prefix = @top_build_prefix@
465top_builddir = @top_builddir@
466top_srcdir = @top_srcdir@
467version_info = @version_info@
468x_cflags = @x_cflags@
469x_includes = @x_includes@
470x_libs = @x_libs@
471MAINTAINERCLEANFILES = Makefile.in
472AM_CPPFLAGS = \
473-I$(top_srcdir)/src/lib/ecore \
474-I$(top_srcdir)/src/lib/ecore_input \
475-I$(top_builddir)/src/lib/ecore \
476-I$(top_builddir)/src/lib/ecore_input \
477@WAYLAND_CFLAGS@ \
478@EVAS_CFLAGS@ \
479@EINA_CFLAGS@
480
481lib_LTLIBRARIES = libecore_wayland.la
482includes_HEADERS = Ecore_Wayland.h
483includesdir = $(includedir)/ecore-@VMAJ@
484libecore_wayland_la_SOURCES = \
485ecore_wl.c
486
487libecore_wayland_la_LIBADD = \
488$(top_builddir)/src/lib/ecore/libecore.la \
489$(top_builddir)/src/lib/ecore_input/libecore_input.la \
490@WAYLAND_LIBS@ \
491@EVAS_LIBS@ \
492@EINA_LIBS@
493
494libecore_wayland_la_LDFLAGS = -version-info @version_info@ @release_info@
495libecore_wayland_la_DEPENDENCIES = $(top_builddir)/src/lib/ecore/libecore.la
496EXTRA_DIST = ecore_wl_private.h
497all: all-am
498
499.SUFFIXES:
500.SUFFIXES: .c .lo .o .obj
501$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
502 @for dep in $?; do \
503 case '$(am__configure_deps)' in \
504 *$$dep*) \
505 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
506 && { if test -f $@; then exit 0; else break; fi; }; \
507 exit 1;; \
508 esac; \
509 done; \
510 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/ecore_wayland/Makefile'; \
511 $(am__cd) $(top_srcdir) && \
512 $(AUTOMAKE) --gnu src/lib/ecore_wayland/Makefile
513.PRECIOUS: Makefile
514Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
515 @case '$?' in \
516 *config.status*) \
517 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
518 *) \
519 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
520 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
521 esac;
522
523$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
524 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
525
526$(top_srcdir)/configure: $(am__configure_deps)
527 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
528$(ACLOCAL_M4): $(am__aclocal_m4_deps)
529 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
530$(am__aclocal_m4_deps):
531install-libLTLIBRARIES: $(lib_LTLIBRARIES)
532 @$(NORMAL_INSTALL)
533 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
534 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
535 list2=; for p in $$list; do \
536 if test -f $$p; then \
537 list2="$$list2 $$p"; \
538 else :; fi; \
539 done; \
540 test -z "$$list2" || { \
541 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
542 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
543 }
544
545uninstall-libLTLIBRARIES:
546 @$(NORMAL_UNINSTALL)
547 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
548 for p in $$list; do \
549 $(am__strip_dir) \
550 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
551 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
552 done
553
554clean-libLTLIBRARIES:
555 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
556 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
557 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
558 test "$$dir" != "$$p" || dir=.; \
559 echo "rm -f \"$${dir}/so_locations\""; \
560 rm -f "$${dir}/so_locations"; \
561 done
562libecore_wayland.la: $(libecore_wayland_la_OBJECTS) $(libecore_wayland_la_DEPENDENCIES)
563 $(AM_V_CCLD)$(libecore_wayland_la_LINK) -rpath $(libdir) $(libecore_wayland_la_OBJECTS) $(libecore_wayland_la_LIBADD) $(LIBS)
564
565mostlyclean-compile:
566 -rm -f *.$(OBJEXT)
567
568distclean-compile:
569 -rm -f *.tab.c
570
571@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wl.Plo@am__quote@
572
573.c.o:
574@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
575@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
576@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
577@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
578@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
579@am__fastdepCC_FALSE@ $(COMPILE) -c $<
580
581.c.obj:
582@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
583@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
584@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
585@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
586@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
587@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
588
589.c.lo:
590@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
591@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
592@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
593@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
594@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
595@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
596
597mostlyclean-libtool:
598 -rm -f *.lo
599
600clean-libtool:
601 -rm -rf .libs _libs
602install-includesHEADERS: $(includes_HEADERS)
603 @$(NORMAL_INSTALL)
604 test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)"
605 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
606 for p in $$list; do \
607 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
608 echo "$$d$$p"; \
609 done | $(am__base_list) | \
610 while read files; do \
611 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \
612 $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \
613 done
614
615uninstall-includesHEADERS:
616 @$(NORMAL_UNINSTALL)
617 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
618 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
619 test -n "$$files" || exit 0; \
620 echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \
621 cd "$(DESTDIR)$(includesdir)" && rm -f $$files
622
623ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
624 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
625 unique=`for i in $$list; do \
626 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
627 done | \
628 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
629 END { if (nonempty) { for (i in files) print i; }; }'`; \
630 mkid -fID $$unique
631tags: TAGS
632
633TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
634 $(TAGS_FILES) $(LISP)
635 set x; \
636 here=`pwd`; \
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 shift; \
644 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
645 test -n "$$unique" || unique=$$empty_fix; \
646 if test $$# -gt 0; then \
647 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
648 "$$@" $$unique; \
649 else \
650 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
651 $$unique; \
652 fi; \
653 fi
654ctags: CTAGS
655CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
656 $(TAGS_FILES) $(LISP)
657 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
658 unique=`for i in $$list; do \
659 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
660 done | \
661 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
662 END { if (nonempty) { for (i in files) print i; }; }'`; \
663 test -z "$(CTAGS_ARGS)$$unique" \
664 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
665 $$unique
666
667GTAGS:
668 here=`$(am__cd) $(top_builddir) && pwd` \
669 && $(am__cd) $(top_srcdir) \
670 && gtags -i $(GTAGS_ARGS) "$$here"
671
672distclean-tags:
673 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
674
675distdir: $(DISTFILES)
676 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
677 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
678 list='$(DISTFILES)'; \
679 dist_files=`for file in $$list; do echo $$file; done | \
680 sed -e "s|^$$srcdirstrip/||;t" \
681 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
682 case $$dist_files in \
683 */*) $(MKDIR_P) `echo "$$dist_files" | \
684 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
685 sort -u` ;; \
686 esac; \
687 for file in $$dist_files; do \
688 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
689 if test -d $$d/$$file; then \
690 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
691 if test -d "$(distdir)/$$file"; then \
692 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
693 fi; \
694 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
695 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
696 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
697 fi; \
698 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
699 else \
700 test -f "$(distdir)/$$file" \
701 || cp -p $$d/$$file "$(distdir)/$$file" \
702 || exit 1; \
703 fi; \
704 done
705check-am: all-am
706check: check-am
707all-am: Makefile $(LTLIBRARIES) $(HEADERS)
708installdirs:
709 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \
710 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
711 done
712install: install-am
713install-exec: install-exec-am
714install-data: install-data-am
715uninstall: uninstall-am
716
717install-am: all-am
718 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
719
720installcheck: installcheck-am
721install-strip:
722 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
723 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
724 `test -z '$(STRIP)' || \
725 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
726mostlyclean-generic:
727
728clean-generic:
729
730distclean-generic:
731 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
732 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
733
734maintainer-clean-generic:
735 @echo "This command is intended for maintainers to use"
736 @echo "it deletes files that may require special tools to rebuild."
737 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
738clean: clean-am
739
740clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
741 mostlyclean-am
742
743distclean: distclean-am
744 -rm -rf ./$(DEPDIR)
745 -rm -f Makefile
746distclean-am: clean-am distclean-compile distclean-generic \
747 distclean-tags
748
749dvi: dvi-am
750
751dvi-am:
752
753html: html-am
754
755html-am:
756
757info: info-am
758
759info-am:
760
761install-data-am: install-includesHEADERS
762
763install-dvi: install-dvi-am
764
765install-dvi-am:
766
767install-exec-am: install-libLTLIBRARIES
768
769install-html: install-html-am
770
771install-html-am:
772
773install-info: install-info-am
774
775install-info-am:
776
777install-man:
778
779install-pdf: install-pdf-am
780
781install-pdf-am:
782
783install-ps: install-ps-am
784
785install-ps-am:
786
787installcheck-am:
788
789maintainer-clean: maintainer-clean-am
790 -rm -rf ./$(DEPDIR)
791 -rm -f Makefile
792maintainer-clean-am: distclean-am maintainer-clean-generic
793
794mostlyclean: mostlyclean-am
795
796mostlyclean-am: mostlyclean-compile mostlyclean-generic \
797 mostlyclean-libtool
798
799pdf: pdf-am
800
801pdf-am:
802
803ps: ps-am
804
805ps-am:
806
807uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES
808
809.MAKE: install-am install-strip
810
811.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
812 clean-libLTLIBRARIES clean-libtool ctags distclean \
813 distclean-compile distclean-generic distclean-libtool \
814 distclean-tags distdir dvi dvi-am html html-am info info-am \
815 install install-am install-data install-data-am install-dvi \
816 install-dvi-am install-exec install-exec-am install-html \
817 install-html-am install-includesHEADERS install-info \
818 install-info-am install-libLTLIBRARIES install-man install-pdf \
819 install-pdf-am install-ps install-ps-am install-strip \
820 installcheck installcheck-am installdirs maintainer-clean \
821 maintainer-clean-generic mostlyclean mostlyclean-compile \
822 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
823 tags uninstall uninstall-am uninstall-includesHEADERS \
824 uninstall-libLTLIBRARIES
825
826
827# Tell versions [3.59,3.63) of GNU make to not export all variables.
828# Otherwise a system limit (for SysV at least) may be exceeded.
829.NOEXPORT:
diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c b/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c
new file mode 100644
index 0000000..f62503b
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c
@@ -0,0 +1,1213 @@
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#include <fcntl.h>
14#ifdef __linux__
15# include <linux/input.h>
16#else
17# define BTN_LEFT 0x110
18# define BTN_RIGHT 0x111
19# define BTN_MIDDLE 0x112
20# define BTN_SIDE 0x113
21# define BTN_EXTRA 0x114
22# define BTN_FORWARD 0x115
23# define BTN_BACK 0x116
24#endif
25
26#include <X11/extensions/XKBcommon.h>
27
28/* local function prototypes */
29static Eina_Bool _ecore_wl_shutdown(Eina_Bool close_display);
30static void _ecore_wl_cb_disp_handle_global(struct wl_display *disp, uint32_t id, const char *interface, uint32_t version __UNUSED__, void *data __UNUSED__);
31static int _ecore_wl_cb_disp_event_mask_update(uint32_t mask, void *data __UNUSED__);
32static void _ecore_wl_cb_disp_handle_geometry(void *data __UNUSED__, struct wl_output *output __UNUSED__, int x, int y, int pw __UNUSED__, int ph __UNUSED__, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__);
33static void _ecore_wl_cb_disp_handle_mode(void *data __UNUSED__, struct wl_output *output __UNUSED__, uint32_t flags, int w, int h, int refresh __UNUSED__);
34static Eina_Bool _ecore_wl_cb_fd_handle(void *data, Ecore_Fd_Handler *hdl __UNUSED__);
35static void _ecore_wl_cb_handle_motion(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, int32_t x, int32_t y, int32_t sx, int32_t sy);
36static void _ecore_wl_cb_handle_button(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, uint32_t btn, uint32_t state);
37static void _ecore_wl_cb_handle_key(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t __UNUSED__, uint32_t key, uint32_t state);
38static void _ecore_wl_cb_handle_pointer_focus(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, struct wl_surface *surface, int32_t x, int32_t y, int32_t sx, int32_t sy);
39static void _ecore_wl_cb_handle_keyboard_focus(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t __UNUSED__, struct wl_surface *surface, struct wl_array *keys);
40static void _ecore_wl_cb_handle_touch_down(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, struct wl_surface *surface, int32_t id, int32_t x, int32_t y);
41static void _ecore_wl_cb_handle_touch_up(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id);
42static void _ecore_wl_cb_handle_touch_motion(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id, int32_t x, int32_t y);
43static void _ecore_wl_cb_handle_touch_frame(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__);
44static void _ecore_wl_cb_handle_touch_cancel(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__);
45static void _ecore_wl_cb_source_target(void *data, struct wl_data_source *source __UNUSED__, const char *mime_type __UNUSED__);
46static void _ecore_wl_cb_source_send(void *data, struct wl_data_source *source, const char *mime_type, int32_t fd);
47static void _ecore_wl_cb_source_cancelled(void *data, struct wl_data_source *source __UNUSED__);
48static void _ecore_wl_cb_source_offer(void *data, struct wl_data_offer *offer __UNUSED__, const char *type);
49static void _ecore_wl_cb_data_offer(void *data, struct wl_data_device *data_dev, uint32_t id);
50static void _ecore_wl_cb_data_enter(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, struct wl_surface *surface, int32_t x, int32_t y, struct wl_data_offer *offer);
51static void _ecore_wl_cb_data_leave(void *data __UNUSED__, struct wl_data_device *data_dev);
52static void _ecore_wl_cb_data_motion(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, int32_t x, int32_t y);
53static void _ecore_wl_cb_data_drop(void *data __UNUSED__, struct wl_data_device *data_dev);
54static void _ecore_wl_cb_data_selection(void *data, struct wl_data_device *data_dev, struct wl_data_offer *offer);
55
56static void _ecore_wl_mouse_move_send(uint32_t timestamp);
57static void _ecore_wl_mouse_out_send(struct wl_surface *surface, uint32_t timestamp);
58static void _ecore_wl_mouse_in_send(struct wl_surface *surface, uint32_t timestamp);
59static void _ecore_wl_mouse_up_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp);
60static void _ecore_wl_mouse_down_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp);
61static void _ecore_wl_focus_out_send(struct wl_surface *surface, uint32_t timestamp);
62static void _ecore_wl_focus_in_send(struct wl_surface *surface, uint32_t timestamp);
63
64/* local variables */
65static int _ecore_wl_init_count = 0;
66static struct wl_display *_ecore_wl_disp = NULL;
67static uint32_t _ecore_wl_disp_mask = 0;
68static uint32_t _ecore_wl_disp_format = WL_SHM_FORMAT_ARGB8888;
69static Eina_Rectangle _ecore_wl_screen;
70static Ecore_Fd_Handler *_ecore_wl_fd_hdl = NULL;
71static int _ecore_wl_screen_x = 0;
72static int _ecore_wl_screen_y = 0;
73static int _ecore_wl_surface_x = 0;
74static int _ecore_wl_surface_y = 0;
75static int _ecore_wl_touch_x = 0;
76static int _ecore_wl_touch_y = 0;
77static int _ecore_wl_input_modifiers = 0;
78static struct xkb_desc *_ecore_wl_xkb;
79static uint32_t _ecore_wl_input_button = 0;
80
81static struct wl_compositor *_ecore_wl_comp;
82static struct wl_shm *_ecore_wl_shm;
83static struct wl_shell *_ecore_wl_shell;
84static struct wl_output *_ecore_wl_output;
85static struct wl_input_device *_ecore_wl_input_dev;
86static struct wl_surface *_ecore_wl_input_surface;
87static struct wl_surface *_ecore_wl_touch_surface;
88static struct wl_data_device_manager *_ecore_wl_data_manager;
89static struct wl_data_device *_ecore_wl_data_dev;
90
91static const struct wl_output_listener _ecore_wl_output_listener =
92{
93 _ecore_wl_cb_disp_handle_geometry,
94 _ecore_wl_cb_disp_handle_mode
95};
96static const struct wl_input_device_listener _ecore_wl_input_listener =
97{
98 _ecore_wl_cb_handle_motion,
99 _ecore_wl_cb_handle_button,
100 _ecore_wl_cb_handle_key,
101 _ecore_wl_cb_handle_pointer_focus,
102 _ecore_wl_cb_handle_keyboard_focus,
103 _ecore_wl_cb_handle_touch_down,
104 _ecore_wl_cb_handle_touch_up,
105 _ecore_wl_cb_handle_touch_motion,
106 _ecore_wl_cb_handle_touch_frame,
107 _ecore_wl_cb_handle_touch_cancel,
108};
109static const struct wl_data_source_listener _ecore_wl_source_listener =
110{
111 _ecore_wl_cb_source_target,
112 _ecore_wl_cb_source_send,
113 _ecore_wl_cb_source_cancelled
114};
115static const struct wl_data_device_listener _ecore_wl_data_listener =
116{
117 _ecore_wl_cb_data_offer,
118 _ecore_wl_cb_data_enter,
119 _ecore_wl_cb_data_leave,
120 _ecore_wl_cb_data_motion,
121 _ecore_wl_cb_data_drop,
122 _ecore_wl_cb_data_selection
123};
124static const struct wl_data_offer_listener _ecore_wl_offer_listener =
125{
126 _ecore_wl_cb_source_offer,
127};
128
129/* external variables */
130int _ecore_wl_log_dom = -1;
131EAPI int ECORE_WL_EVENT_MOUSE_IN = 0;
132EAPI int ECORE_WL_EVENT_MOUSE_OUT = 0;
133EAPI int ECORE_WL_EVENT_FOCUS_IN = 0;
134EAPI int ECORE_WL_EVENT_FOCUS_OUT = 0;
135EAPI int ECORE_WL_EVENT_DRAG_START = 0;
136EAPI int ECORE_WL_EVENT_DRAG_STOP = 0;
137
138EAPI int
139ecore_wl_init(const char *name)
140{
141 struct xkb_rule_names xkb_names;
142 int fd = 0;
143
144 if (++_ecore_wl_init_count != 1)
145 return _ecore_wl_init_count;
146
147 LOGFN(__FILE__, __LINE__, __FUNCTION__);
148
149 if (!eina_init()) return --_ecore_wl_init_count;
150
151 _ecore_wl_log_dom =
152 eina_log_domain_register("ecore_wl", ECORE_WL_DEFAULT_LOG_COLOR);
153 if (_ecore_wl_log_dom < 0)
154 {
155 EINA_LOG_ERR("Cannot create a log domain for Ecore Wayland.");
156 eina_shutdown();
157 return --_ecore_wl_init_count;
158 }
159
160 if (!ecore_init())
161 {
162 eina_log_domain_unregister(_ecore_wl_log_dom);
163 _ecore_wl_log_dom = -1;
164 eina_shutdown();
165 return --_ecore_wl_init_count;
166 }
167
168 if (!ecore_event_init())
169 {
170 eina_log_domain_unregister(_ecore_wl_log_dom);
171 _ecore_wl_log_dom = -1;
172 ecore_shutdown();
173 eina_shutdown();
174 return --_ecore_wl_init_count;
175 }
176
177 if (!ECORE_WL_EVENT_MOUSE_IN)
178 {
179 ECORE_WL_EVENT_MOUSE_IN = ecore_event_type_new();
180 ECORE_WL_EVENT_MOUSE_OUT = ecore_event_type_new();
181 ECORE_WL_EVENT_FOCUS_IN = ecore_event_type_new();
182 ECORE_WL_EVENT_FOCUS_OUT = ecore_event_type_new();
183 ECORE_WL_EVENT_DRAG_START = ecore_event_type_new();
184 ECORE_WL_EVENT_DRAG_STOP = ecore_event_type_new();
185 }
186
187 /* init xkb */
188 /* FIXME: Somehow make this portable to other languages/countries */
189 xkb_names.rules = "evdev";
190 xkb_names.model = "evdev";
191 xkb_names.layout = "us";
192 xkb_names.variant = "";
193 xkb_names.options = "";
194 if (!(_ecore_wl_xkb = xkb_compile_keymap_from_rules(&xkb_names)))
195 {
196 ERR("Could not compile keymap");
197 eina_log_domain_unregister(_ecore_wl_log_dom);
198 _ecore_wl_log_dom = -1;
199 ecore_event_shutdown();
200 ecore_shutdown();
201 eina_shutdown();
202 return --_ecore_wl_init_count;
203 }
204
205 /* connect to the wayland display */
206 if (!(_ecore_wl_disp = wl_display_connect(name)))
207 {
208 eina_log_domain_unregister(_ecore_wl_log_dom);
209 _ecore_wl_log_dom = -1;
210 ecore_event_shutdown();
211 ecore_shutdown();
212 eina_shutdown();
213 return --_ecore_wl_init_count;
214 }
215
216 /* setup handler for wayland interfaces */
217 wl_display_add_global_listener(_ecore_wl_disp,
218 _ecore_wl_cb_disp_handle_global, NULL);
219
220 /* process connection events */
221 wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_READABLE);
222
223 fd = wl_display_get_fd(_ecore_wl_disp,
224 _ecore_wl_cb_disp_event_mask_update, NULL);
225
226 _ecore_wl_fd_hdl =
227 ecore_main_fd_handler_add(fd, ECORE_FD_READ, _ecore_wl_cb_fd_handle,
228 _ecore_wl_disp, NULL, NULL);
229 if (!_ecore_wl_fd_hdl)
230 {
231 wl_display_destroy(_ecore_wl_disp);
232 _ecore_wl_disp = NULL;
233 eina_log_domain_unregister(_ecore_wl_log_dom);
234 _ecore_wl_log_dom = -1;
235 ecore_event_shutdown();
236 ecore_shutdown();
237 eina_shutdown();
238 return --_ecore_wl_init_count;
239 }
240
241 return _ecore_wl_init_count;
242}
243
244EAPI int
245ecore_wl_shutdown(void)
246{
247 return _ecore_wl_shutdown(EINA_TRUE);
248}
249
250EAPI struct wl_display *
251ecore_wl_display_get(void)
252{
253 return _ecore_wl_disp;
254}
255
256EAPI struct wl_shm *
257ecore_wl_shm_get(void)
258{
259 return _ecore_wl_shm;
260}
261
262EAPI struct wl_compositor *
263ecore_wl_compositor_get(void)
264{
265 return _ecore_wl_comp;
266}
267
268EAPI struct wl_shell *
269ecore_wl_shell_get(void)
270{
271 return _ecore_wl_shell;
272}
273
274EAPI struct wl_input_device *
275ecore_wl_input_device_get(void)
276{
277 return _ecore_wl_input_dev;
278}
279
280EAPI void
281ecore_wl_screen_size_get(int *w, int *h)
282{
283 if (w) *w = _ecore_wl_screen.w;
284 if (h) *h = _ecore_wl_screen.h;
285}
286
287EAPI unsigned int
288ecore_wl_format_get(void)
289{
290 return _ecore_wl_disp_format;
291}
292
293EAPI void
294ecore_wl_flush(void)
295{
296 wl_display_flush(_ecore_wl_disp);
297}
298
299EAPI void
300ecore_wl_sync(void)
301{
302 wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_READABLE);
303}
304
305EAPI void
306ecore_wl_pointer_xy_get(int *x, int *y)
307{
308 if (x) *x = _ecore_wl_screen_x;
309 if (y) *y = _ecore_wl_screen_y;
310}
311
312EAPI Ecore_Wl_Drag_Source *
313ecore_wl_drag_source_create(int hotspot_x, int hotspot_y, int offset_x, int offset_y, const char *mimetype, unsigned int timestamp, void *data)
314{
315 Ecore_Wl_Drag_Source *source;
316
317 if (!(source = calloc(1, sizeof(Ecore_Wl_Drag_Source)))) return NULL;
318
319 source->data_dev = _ecore_wl_data_dev;
320 source->hotspot_x = hotspot_x;
321 source->hotspot_y = hotspot_y;
322 source->offset_x = offset_x;
323 source->offset_y = offset_y;
324 source->mimetype = mimetype;
325 source->timestamp = timestamp;
326 source->data = data;
327
328 source->data_source =
329 wl_data_device_manager_create_data_source(_ecore_wl_data_manager);
330
331 wl_data_source_add_listener(source->data_source,
332 &_ecore_wl_source_listener, source);
333
334 wl_data_source_offer(source->data_source, source->mimetype);
335
336 /* NB: Do we add some default mimetypes here ?? */
337 /* text/plain, etc */
338
339 return source;
340}
341
342EAPI void
343ecore_wl_drag_start(Ecore_Wl_Drag_Source *source, struct wl_surface *surface, struct wl_buffer *buffer)
344{
345 source->buffer = buffer;
346
347 wl_data_device_start_drag(source->data_dev, source->data_source,
348 surface, source->timestamp);
349}
350
351EAPI void
352ecore_wl_drag_stop(void)
353{
354
355}
356
357/* local functions */
358static Eina_Bool
359_ecore_wl_shutdown(Eina_Bool close_display)
360{
361 LOGFN(__FILE__, __LINE__, __FUNCTION__);
362
363 if (--_ecore_wl_init_count != 0)
364 return _ecore_wl_init_count;
365
366 if (!_ecore_wl_disp) return _ecore_wl_init_count;
367
368 if (_ecore_wl_xkb) free(_ecore_wl_xkb);
369
370 if (_ecore_wl_fd_hdl) ecore_main_fd_handler_del(_ecore_wl_fd_hdl);
371 _ecore_wl_fd_hdl = NULL;
372
373 if (close_display)
374 {
375 if (_ecore_wl_data_dev) wl_data_device_destroy(_ecore_wl_data_dev);
376 if (_ecore_wl_input_dev) wl_input_device_destroy(_ecore_wl_input_dev);
377 if (_ecore_wl_data_manager)
378 wl_data_device_manager_destroy(_ecore_wl_data_manager);
379 if (_ecore_wl_shell) wl_shell_destroy(_ecore_wl_shell);
380 if (_ecore_wl_shm) wl_shm_destroy(_ecore_wl_shm);
381 if (_ecore_wl_comp) wl_compositor_destroy(_ecore_wl_comp);
382 if (_ecore_wl_disp)
383 {
384 wl_display_flush(_ecore_wl_disp);
385 wl_display_destroy(_ecore_wl_disp);
386 }
387 _ecore_wl_disp = NULL;
388 }
389
390 eina_log_domain_unregister(_ecore_wl_log_dom);
391 _ecore_wl_log_dom = -1;
392
393 ecore_event_shutdown();
394 ecore_shutdown();
395 eina_shutdown();
396
397 return _ecore_wl_init_count;
398}
399
400static void
401_ecore_wl_cb_disp_handle_global(struct wl_display *disp, uint32_t id, const char *interface, uint32_t version __UNUSED__, void *data __UNUSED__)
402{
403// LOGFN(__FILE__, __LINE__, __FUNCTION__);
404
405 if (disp != _ecore_wl_disp) return;
406 if (!strcmp(interface, "wl_compositor"))
407 {
408 _ecore_wl_comp =
409 wl_display_bind(_ecore_wl_disp, id, &wl_compositor_interface);
410 }
411 else if (!strcmp(interface, "wl_shm"))
412 {
413 _ecore_wl_shm =
414 wl_display_bind(_ecore_wl_disp, id, &wl_shm_interface);
415 }
416 else if (!strcmp(interface, "wl_output"))
417 {
418 _ecore_wl_output =
419 wl_display_bind(_ecore_wl_disp, id, &wl_output_interface);
420 wl_output_add_listener(_ecore_wl_output,
421 &_ecore_wl_output_listener, NULL);
422 }
423 else if (!strcmp(interface, "wl_shell"))
424 {
425 _ecore_wl_shell =
426 wl_display_bind(_ecore_wl_disp, id, &wl_shell_interface);
427 }
428 else if (!strcmp(interface, "wl_input_device"))
429 {
430 _ecore_wl_input_dev =
431 wl_display_bind(_ecore_wl_disp, id, &wl_input_device_interface);
432 wl_input_device_add_listener(_ecore_wl_input_dev,
433 &_ecore_wl_input_listener, NULL);
434 }
435 else if (!strcmp(interface, "wl_data_device_manager"))
436 {
437 _ecore_wl_data_manager =
438 wl_display_bind(_ecore_wl_disp, id,
439 &wl_data_device_manager_interface);
440 }
441
442 if ((_ecore_wl_input_dev) && (_ecore_wl_data_manager) && (!_ecore_wl_data_dev))
443 {
444 _ecore_wl_data_dev =
445 wl_data_device_manager_get_data_device(_ecore_wl_data_manager,
446 _ecore_wl_input_dev);
447 wl_data_device_add_listener(_ecore_wl_data_dev,
448 &_ecore_wl_data_listener, NULL);
449 }
450}
451
452static int
453_ecore_wl_cb_disp_event_mask_update(uint32_t mask, void *data __UNUSED__)
454{
455// LOGFN(__FILE__, __LINE__, __FUNCTION__);
456
457 _ecore_wl_disp_mask = mask;
458
459 return 0;
460}
461
462static void
463_ecore_wl_cb_disp_handle_geometry(void *data __UNUSED__, struct wl_output *output __UNUSED__, int x, int y, int pw __UNUSED__, int ph __UNUSED__, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__)
464{
465 _ecore_wl_screen.x = x;
466 _ecore_wl_screen.y = y;
467}
468
469static void
470_ecore_wl_cb_disp_handle_mode(void *data __UNUSED__, struct wl_output *output __UNUSED__, uint32_t flags, int w, int h, int refresh __UNUSED__)
471{
472 if (flags & WL_OUTPUT_MODE_CURRENT)
473 {
474 _ecore_wl_screen.w = w;
475 _ecore_wl_screen.h = h;
476 }
477}
478
479static Eina_Bool
480_ecore_wl_cb_fd_handle(void *data, Ecore_Fd_Handler *hdl __UNUSED__)
481{
482 struct wl_display *disp;
483
484// LOGFN(__FILE__, __LINE__, __FUNCTION__);
485
486 if (!(disp = data)) return ECORE_CALLBACK_RENEW;
487 if (disp != _ecore_wl_disp) return ECORE_CALLBACK_RENEW;
488
489 if (_ecore_wl_disp_mask & WL_DISPLAY_WRITABLE)
490 wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_WRITABLE);
491
492 if (_ecore_wl_disp_mask & WL_DISPLAY_READABLE)
493 wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_READABLE);
494
495 return ECORE_CALLBACK_RENEW;
496}
497
498static void
499_ecore_wl_cb_handle_motion(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, int32_t x, int32_t y, int32_t sx, int32_t sy)
500{
501 if (dev != _ecore_wl_input_dev) return;
502
503 _ecore_wl_screen_x = x;
504 _ecore_wl_screen_y = y;
505 _ecore_wl_surface_x = sx;
506 _ecore_wl_surface_y = sy;
507
508 _ecore_wl_mouse_move_send(t);
509}
510
511static void
512_ecore_wl_cb_handle_button(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, uint32_t btn, uint32_t state)
513{
514 if (dev != _ecore_wl_input_dev) return;
515
516 if ((btn >= BTN_SIDE) && (btn <= BTN_BACK))
517 {
518 Ecore_Event_Mouse_Wheel *ev;
519
520 if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Wheel)))) return;
521
522 ev->timestamp = t;
523 ev->x = _ecore_wl_surface_x;
524 ev->y = _ecore_wl_surface_y;
525 ev->root.x = _ecore_wl_screen_x;
526 ev->root.y = _ecore_wl_screen_y;
527 ev->modifiers = _ecore_wl_input_modifiers;
528 ev->direction = 0;
529
530 if (_ecore_wl_input_surface)
531 {
532 unsigned int id = 0;
533
534 if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_input_surface)))
535 {
536 ev->window = id;
537 ev->event_window = id;
538 }
539 }
540
541 /* NB: (FIXME) Currently Wayland provides no measure of how much the
542 * wheel has scrolled (read: delta of movement). So for now, we will
543 * just assume that the amount scrolled is 1 */
544 if ((btn == BTN_EXTRA) || (btn == BTN_FORWARD)) // down
545 ev->z = 1;
546 else if ((btn == BTN_SIDE) || (btn == BTN_BACK)) // up
547 ev->z = -1;
548
549 ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL);
550 }
551 else
552 {
553 if (state)
554 {
555 _ecore_wl_input_button = btn;
556 _ecore_wl_mouse_down_send(_ecore_wl_input_surface, btn, t);
557 /* NB: Ideally, this is not the place to check for drags.
558 * IMO, drags should be handled by the client. EG: we raise the
559 * mouse_down to the client, and the client can 'request' a
560 * drag_start from ecore_wl */
561 if ((_ecore_wl_input_surface) || (_ecore_wl_touch_surface))
562 {
563 /* record item which was grabbed.
564 * create drag source. start drag */
565 }
566 }
567 else
568 {
569 if ((_ecore_wl_input_surface) || (_ecore_wl_touch_surface))
570 {
571 /* release grabbed button and finish drag */
572 if ((_ecore_wl_input_button) &&
573 (_ecore_wl_input_button == btn))
574 {
575
576 }
577 }
578 _ecore_wl_input_button = 0;
579 _ecore_wl_mouse_up_send(_ecore_wl_input_surface, btn, t);
580 }
581 }
582}
583
584static void
585_ecore_wl_cb_handle_key(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t __UNUSED__, uint32_t key, uint32_t state)
586{
587 unsigned int keycode = 0;
588
589 if (dev != _ecore_wl_input_dev) return;
590
591 keycode = key + _ecore_wl_xkb->min_key_code;
592
593 if (state)
594 _ecore_wl_input_modifiers |= _ecore_wl_xkb->map->modmap[keycode];
595 else
596 _ecore_wl_input_modifiers &= ~_ecore_wl_xkb->map->modmap[keycode];
597}
598
599static void
600_ecore_wl_cb_handle_pointer_focus(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, struct wl_surface *surface, int32_t x, int32_t y, int32_t sx, int32_t sy)
601{
602 if (dev != _ecore_wl_input_dev) return;
603
604 /* NB: Wayland pointer focus is weird. It's not pointer focus in the normal
605 * sense...Wayland 'moving/resizing' (and maybe other stuff) has a habit
606 * of stealing the pointer focus and thus this cannot be used to control
607 * normal pointer focus. On mouse down, the 'active' surface is stolen
608 * by Wayland for the grab, so 'surface' here ends up being NULL. When a
609 * move or resize is finished, we get this event again, but this time
610 * with an active surface */
611 _ecore_wl_screen_x = x;
612 _ecore_wl_screen_y = y;
613 _ecore_wl_surface_x = sx;
614 _ecore_wl_surface_y = sy;
615
616 if ((_ecore_wl_input_surface) && (_ecore_wl_input_surface != surface))
617 {
618 if (!_ecore_wl_input_button)
619 _ecore_wl_mouse_out_send(_ecore_wl_input_surface, t);
620 }
621
622 if (surface)
623 {
624 if (_ecore_wl_input_button)
625 {
626 _ecore_wl_mouse_up_send(surface, _ecore_wl_input_button, t);
627 _ecore_wl_input_button = 0;
628 }
629 else
630 _ecore_wl_mouse_in_send(surface, t);
631 }
632}
633
634static void
635_ecore_wl_cb_handle_keyboard_focus(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, struct wl_surface *surface, struct wl_array *keys)
636{
637 unsigned int *keyend = 0, *i = 0;
638
639 if (dev != _ecore_wl_input_dev) return;
640
641 /* NB: Remove old keyboard focus */
642 if ((_ecore_wl_input_surface) && (_ecore_wl_input_surface != surface))
643 _ecore_wl_focus_out_send(_ecore_wl_input_surface, t);
644
645 _ecore_wl_input_surface = NULL;
646
647 keyend = keys->data + keys->size;
648 _ecore_wl_input_modifiers = 0;
649 for (i = keys->data; i < keyend; i++)
650 _ecore_wl_input_modifiers |= _ecore_wl_xkb->map->modmap[*i];
651
652 if (surface)
653 {
654 /* set new input surface */
655 _ecore_wl_input_surface = surface;
656
657 /* send mouse in to new surface */
658 /* _ecore_wl_mouse_in_send(surface, t); */
659
660 /* send focus to new surface */
661 _ecore_wl_focus_in_send(surface, t);
662 }
663}
664
665static void
666_ecore_wl_cb_handle_touch_down(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, struct wl_surface *surface, int32_t id, int32_t x, int32_t y)
667{
668 Ecore_Event_Mouse_Button *ev;
669
670 LOGFN(__FILE__, __LINE__, __FUNCTION__);
671
672 _ecore_wl_touch_surface = surface;
673 _ecore_wl_touch_x = x;
674 _ecore_wl_touch_y = y;
675
676 if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return;
677
678 ev->timestamp = timestamp;
679
680 /* NB: Need to verify using x,y for these */
681 ev->x = x;
682 ev->y = y;
683 ev->root.x = x;
684 ev->root.y = y;
685 ev->modifiers = 0;
686 ev->buttons = 0;
687 ev->same_screen = 1;
688
689 /* FIXME: Need to get these from Wayland somehow */
690 ev->double_click = 0;
691 ev->triple_click = 0;
692
693 ev->multi.device = id;
694 ev->multi.radius = 1;
695 ev->multi.radius_x = 1;
696 ev->multi.radius_y = 1;
697 ev->multi.pressure = 1.0;
698 ev->multi.angle = 0.0;
699 /* NB: Need to verify using x,y for these */
700 ev->multi.x = x;
701 ev->multi.y = y;
702 ev->multi.root.x = x;
703 ev->multi.root.y = y;
704
705 {
706 unsigned int id = 0;
707
708 if ((id = (unsigned int)wl_surface_get_user_data(surface)))
709 {
710 ev->window = id;
711 ev->event_window = id;
712 }
713 }
714
715 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL);
716}
717
718static void
719_ecore_wl_cb_handle_touch_up(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id)
720{
721 Ecore_Event_Mouse_Button *ev;
722
723 LOGFN(__FILE__, __LINE__, __FUNCTION__);
724
725 if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return;
726
727 ev->timestamp = timestamp;
728
729 /* TODO: Need to verify using x,y for these */
730 ev->x = _ecore_wl_touch_x;
731 ev->y = _ecore_wl_touch_y;
732 ev->root.x = _ecore_wl_touch_x;
733 ev->root.y = _ecore_wl_touch_y;
734 ev->modifiers = 0;
735 ev->buttons = 0;
736 ev->same_screen = 1;
737
738 /* FIXME: Need to get these from Wayland somehow */
739 ev->double_click = 0;
740 ev->triple_click = 0;
741
742 ev->multi.device = id;
743 ev->multi.radius = 1;
744 ev->multi.radius_x = 1;
745 ev->multi.radius_y = 1;
746 ev->multi.pressure = 1.0;
747 ev->multi.angle = 0.0;
748
749 /* TODO: Need to verify using x,y for these */
750 ev->multi.x = _ecore_wl_touch_x;
751 ev->multi.y = _ecore_wl_touch_y;
752 ev->multi.root.x = _ecore_wl_touch_x;
753 ev->multi.root.y = _ecore_wl_touch_y;
754
755 {
756 unsigned int id = 0;
757
758 if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_touch_surface)))
759 {
760 ev->window = id;
761 ev->event_window = id;
762 }
763 }
764
765 _ecore_wl_touch_surface = NULL;
766
767 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL);
768}
769
770static void
771_ecore_wl_cb_handle_touch_motion(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id, int32_t x, int32_t y)
772{
773 Ecore_Event_Mouse_Move *ev;
774
775 LOGFN(__FILE__, __LINE__, __FUNCTION__);
776
777 if (!_ecore_wl_touch_surface) return;
778
779 if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Move)))) return;
780
781 ev->timestamp = timestamp;
782 /* TODO: Need to verify using x,y for these */
783 ev->x = x;
784 ev->y = y;
785 ev->root.x = x;
786 ev->root.y = y;
787 ev->modifiers = 0; //_ecore_wl_input_modifiers;
788 ev->same_screen = 1;
789
790 ev->multi.device = id;
791 ev->multi.radius = 1;
792 ev->multi.radius_x = 1;
793 ev->multi.radius_y = 1;
794 ev->multi.pressure = 1.0;
795 ev->multi.angle = 0.0;
796
797 /* TODO: Need to verify using x,y for these */
798 ev->multi.x = x;
799 ev->multi.y = y;
800 ev->multi.root.x = x;
801 ev->multi.root.y = y;
802
803 {
804 unsigned int id = 0;
805
806 if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_touch_surface)))
807 {
808 ev->window = id;
809 ev->event_window = id;
810 }
811 }
812
813 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL);
814}
815
816static void
817_ecore_wl_cb_handle_touch_frame(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__)
818{
819 LOGFN(__FILE__, __LINE__, __FUNCTION__);
820
821 /* FIXME: Need to get a device and actually test what happens here */
822}
823
824static void
825_ecore_wl_cb_handle_touch_cancel(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__)
826{
827 LOGFN(__FILE__, __LINE__, __FUNCTION__);
828
829 /* FIXME: Need to get a device and actually test what happens here */
830 _ecore_wl_touch_surface = NULL;
831}
832
833static void
834_ecore_wl_cb_source_target(void *data, struct wl_data_source *source __UNUSED__, const char *mime_type __UNUSED__)
835{
836 Ecore_Wl_Drag_Source *s;
837
838 LOGFN(__FILE__, __LINE__, __FUNCTION__);
839
840 printf("Ecore_Wl Source Target\n");
841 if (!(s = data)) return;
842 printf("\tHave Drag Source\n");
843
844 /* FIXME: buffer here should really be the mouse cursor buffer */
845 wl_data_device_attach(s->data_dev, s->timestamp, s->buffer,
846 s->hotspot_x, s->hotspot_y);
847}
848
849static void
850_ecore_wl_cb_source_send(void *data, struct wl_data_source *source, const char *mime_type, int32_t fd)
851{
852 Ecore_Wl_Drag_Source *s;
853
854 LOGFN(__FILE__, __LINE__, __FUNCTION__);
855
856 printf("Ecore_Wl Source Send\n");
857 if (!(s = data)) return;
858 printf("\tHave Drag Source\n");
859
860 /* FIXME: write message to fd */
861
862 /* NB: Wayland really sucks in this regard. Why should selection stuff
863 * require an 'fd' ?? */
864}
865
866static void
867_ecore_wl_cb_source_cancelled(void *data, struct wl_data_source *source __UNUSED__)
868{
869 Ecore_Wl_Drag_Source *s;
870
871 LOGFN(__FILE__, __LINE__, __FUNCTION__);
872
873 /* The cancelled event usually means source is no longer in use by
874 * the drag (or selection). */
875
876 printf("Ecore_Wl Source Cancel\n");
877 if (!(s = data)) return;
878 printf("\tHave Drag Source\n");
879
880 /* FIXME: raise this to ecore_evas so the surface/buffer
881 * of the drag can be destroyed */
882
883 if (s->data_source) wl_data_source_destroy(s->data_source);
884 s->data_source = NULL;
885
886 free(s);
887}
888
889static void
890_ecore_wl_cb_source_offer(void *data, struct wl_data_offer *offer __UNUSED__, const char *type)
891{
892 Ecore_Wl_Dnd_Source *s;
893
894 if (!(s = data)) return;
895 eina_array_push(s->types, strdup(type));
896}
897
898static void
899_ecore_wl_cb_data_offer(void *data, struct wl_data_device *data_dev, uint32_t id)
900{
901 Ecore_Wl_Dnd_Source *source;
902
903 /* create a new 'data offer' structure and setup a listener for it */
904 if (!(source = calloc(1, sizeof(Ecore_Wl_Dnd_Source)))) return;
905
906 source->types = eina_array_new(1);
907 source->data = data;
908 source->refs = 1;
909
910 /* FIXME: This will need to change when Wayland has typesafe wrappers for this */
911 source->offer = (struct wl_data_offer *)
912 wl_proxy_create_for_id((struct wl_proxy *)data_dev,
913 id, &wl_data_offer_interface);
914
915 wl_data_device_set_user_data(data_dev, source);
916 wl_data_offer_add_listener(source->offer, &_ecore_wl_offer_listener, source);
917}
918
919static void
920_ecore_wl_cb_data_enter(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, struct wl_surface *surface, int32_t x, int32_t y, struct wl_data_offer *offer)
921{
922 Ecore_Wl_Dnd_Source *source;
923
924 if (!(source = wl_data_device_get_user_data(data_dev))) return;
925
926 /* TODO: maybe set pointer focus here ?? */
927
928 source->timestamp = timestamp;
929}
930
931static void
932_ecore_wl_cb_data_leave(void *data __UNUSED__, struct wl_data_device *data_dev)
933{
934 Ecore_Wl_Dnd_Source *source;
935
936 if (!(source = wl_data_device_get_user_data(data_dev))) return;
937
938 /* destroy drag offer */
939 wl_data_offer_destroy(source->offer);
940
941 while (eina_array_count(source->types))
942 free(eina_array_pop(source->types));
943
944 eina_array_free(source->types);
945 free(source);
946
947 wl_data_device_set_user_data(data_dev, NULL);
948}
949
950static void
951_ecore_wl_cb_data_motion(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, int32_t x, int32_t y)
952{
953 Ecore_Wl_Dnd_Source *source;
954
955 if (!(source = wl_data_device_get_user_data(data_dev))) return;
956 /* TODO: Here we should raise motion events for dragging */
957}
958
959static void
960_ecore_wl_cb_data_drop(void *data __UNUSED__, struct wl_data_device *data_dev)
961{
962 Ecore_Wl_Dnd_Source *source;
963
964 if (!(source = wl_data_device_get_user_data(data_dev))) return;
965
966 /* TODO: Raise event for drop */
967
968 wl_data_offer_accept(source->offer, source->timestamp, NULL);
969// eina_array_data_get(source->types, 0));
970}
971
972static void
973_ecore_wl_cb_data_selection(void *data, struct wl_data_device *data_dev, struct wl_data_offer *offer)
974{
975 Ecore_Wl_Dnd_Source *source;
976
977 printf("Ecore_Wl Data Selection\n");
978 if ((source = wl_data_device_get_user_data(data_dev)))
979 {
980 /* destroy old source */
981 wl_data_offer_destroy(source->offer);
982
983 while (eina_array_count(source->types))
984 free(eina_array_pop(source->types));
985
986 eina_array_free(source->types);
987 free(source);
988
989 wl_data_device_set_user_data(data_dev, NULL);
990 }
991}
992
993static void
994_ecore_wl_mouse_move_send(uint32_t timestamp)
995{
996 Ecore_Event_Mouse_Move *ev;
997
998// if (!_ecore_wl_input_surface) return;
999
1000 if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Move)))) return;
1001
1002 ev->timestamp = timestamp;
1003 ev->x = _ecore_wl_surface_x;
1004 ev->y = _ecore_wl_surface_y;
1005 ev->root.x = _ecore_wl_screen_x;
1006 ev->root.y = _ecore_wl_screen_y;
1007 ev->modifiers = _ecore_wl_input_modifiers;
1008
1009 ev->multi.device = 0;
1010 ev->multi.radius = 1;
1011 ev->multi.radius_x = 1;
1012 ev->multi.radius_y = 1;
1013 ev->multi.pressure = 1.0;
1014 ev->multi.angle = 0.0;
1015 ev->multi.x = _ecore_wl_surface_x;
1016 ev->multi.y = _ecore_wl_surface_y;
1017 ev->multi.root.x = _ecore_wl_screen_x;
1018 ev->multi.root.y = _ecore_wl_screen_y;
1019
1020 {
1021 unsigned int id = 0;
1022
1023 if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_input_surface)))
1024 {
1025 ev->window = id;
1026 ev->event_window = id;
1027 }
1028 }
1029
1030 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL);
1031}
1032
1033static void
1034_ecore_wl_mouse_out_send(struct wl_surface *surface, uint32_t timestamp)
1035{
1036 Ecore_Wl_Event_Mouse_Out *ev;
1037
1038 if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Mouse_Out)))) return;
1039
1040 ev->x = _ecore_wl_surface_x;
1041 ev->y = _ecore_wl_surface_y;
1042 ev->root.x = _ecore_wl_screen_x;
1043 ev->root.y = _ecore_wl_screen_y;
1044 ev->modifiers = _ecore_wl_input_modifiers;
1045 ev->time = timestamp;
1046
1047 if (surface)
1048 {
1049 unsigned int id = 0;
1050
1051 if ((id = (unsigned int)wl_surface_get_user_data(surface)))
1052 ev->window = id;
1053 }
1054
1055 ecore_event_add(ECORE_WL_EVENT_MOUSE_OUT, ev, NULL, NULL);
1056}
1057
1058static void
1059_ecore_wl_mouse_in_send(struct wl_surface *surface, uint32_t timestamp)
1060{
1061 Ecore_Wl_Event_Mouse_In *ev;
1062
1063 if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Mouse_In)))) return;
1064
1065 ev->x = _ecore_wl_surface_x;
1066 ev->y = _ecore_wl_surface_y;
1067 ev->root.x = _ecore_wl_screen_x;
1068 ev->root.y = _ecore_wl_screen_y;
1069 ev->modifiers = _ecore_wl_input_modifiers;
1070 ev->time = timestamp;
1071
1072 if (surface)
1073 {
1074 unsigned int id = 0;
1075
1076 if ((id = (unsigned int)wl_surface_get_user_data(surface)))
1077 ev->window = id;
1078 }
1079
1080 ecore_event_add(ECORE_WL_EVENT_MOUSE_IN, ev, NULL, NULL);
1081}
1082
1083static void
1084_ecore_wl_mouse_up_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp)
1085{
1086 Ecore_Event_Mouse_Button *ev;
1087
1088 if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return;
1089
1090 if (button == BTN_LEFT)
1091 ev->buttons = 1;
1092 else if (button == BTN_MIDDLE)
1093 ev->buttons = 2;
1094 else if (button == BTN_RIGHT)
1095 ev->buttons = 3;
1096
1097 ev->timestamp = timestamp;
1098 ev->x = _ecore_wl_surface_x;
1099 ev->y = _ecore_wl_surface_y;
1100 ev->root.x = _ecore_wl_screen_x;
1101 ev->root.y = _ecore_wl_screen_y;
1102 ev->modifiers = _ecore_wl_input_modifiers;
1103
1104 /* FIXME: Need to get these from Wayland somehow */
1105 ev->double_click = 0;
1106 ev->triple_click = 0;
1107
1108 ev->multi.device = 0;
1109 ev->multi.radius = 1;
1110 ev->multi.radius_x = 1;
1111 ev->multi.radius_y = 1;
1112 ev->multi.pressure = 1.0;
1113 ev->multi.angle = 0.0;
1114 ev->multi.x = _ecore_wl_surface_x;
1115 ev->multi.y = _ecore_wl_surface_y;
1116 ev->multi.root.x = _ecore_wl_screen_x;
1117 ev->multi.root.y = _ecore_wl_screen_y;
1118
1119 {
1120 unsigned int id = 0;
1121
1122 if ((id = (unsigned int)wl_surface_get_user_data(surface)))
1123 {
1124 ev->window = id;
1125 ev->event_window = id;
1126 }
1127 }
1128
1129 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL);
1130}
1131
1132static void
1133_ecore_wl_mouse_down_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp)
1134{
1135 Ecore_Event_Mouse_Button *ev;
1136
1137 if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return;
1138
1139 if (button == BTN_LEFT)
1140 ev->buttons = 1;
1141 else if (button == BTN_MIDDLE)
1142 ev->buttons = 2;
1143 else if (button == BTN_RIGHT)
1144 ev->buttons = 3;
1145
1146 ev->timestamp = timestamp;
1147 ev->x = _ecore_wl_surface_x;
1148 ev->y = _ecore_wl_surface_y;
1149 ev->root.x = _ecore_wl_screen_x;
1150 ev->root.y = _ecore_wl_screen_y;
1151 ev->modifiers = _ecore_wl_input_modifiers;
1152
1153 /* FIXME: Need to get these from Wayland somehow */
1154 ev->double_click = 0;
1155 ev->triple_click = 0;
1156
1157 ev->multi.device = 0;
1158 ev->multi.radius = 1;
1159 ev->multi.radius_x = 1;
1160 ev->multi.radius_y = 1;
1161 ev->multi.pressure = 1.0;
1162 ev->multi.angle = 0.0;
1163 ev->multi.x = _ecore_wl_surface_x;
1164 ev->multi.y = _ecore_wl_surface_y;
1165 ev->multi.root.x = _ecore_wl_screen_x;
1166 ev->multi.root.y = _ecore_wl_screen_y;
1167
1168 {
1169 unsigned int id = 0;
1170
1171 if ((id = (unsigned int)wl_surface_get_user_data(surface)))
1172 {
1173 ev->window = id;
1174 ev->event_window = id;
1175 }
1176 }
1177
1178 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL);
1179}
1180
1181static void
1182_ecore_wl_focus_out_send(struct wl_surface *surface, uint32_t timestamp)
1183{
1184 Ecore_Wl_Event_Focus_Out *ev;
1185
1186 if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Focus_Out)))) return;
1187 ev->time = timestamp;
1188 if (surface)
1189 {
1190 unsigned int id = 0;
1191
1192 if ((id = (unsigned int)wl_surface_get_user_data(surface)))
1193 ev->window = id;
1194 }
1195 ecore_event_add(ECORE_WL_EVENT_FOCUS_OUT, ev, NULL, NULL);
1196}
1197
1198static void
1199_ecore_wl_focus_in_send(struct wl_surface *surface, uint32_t timestamp)
1200{
1201 Ecore_Wl_Event_Focus_In *ev;
1202
1203 if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Focus_In)))) return;
1204 ev->time = timestamp;
1205 if (surface)
1206 {
1207 unsigned int id = 0;
1208
1209 if ((id = (unsigned int)wl_surface_get_user_data(surface)))
1210 ev->window = id;
1211 }
1212 ecore_event_add(ECORE_WL_EVENT_FOCUS_IN, ev, NULL, NULL);
1213}
diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h
new file mode 100644
index 0000000..eec5ffe
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h
@@ -0,0 +1,85 @@
1#ifndef _ECORE_WAYLAND_PRIVATE_H
2# define _ECORE_WAYLAND_PRIVATE_H
3
4# include <limits.h>
5
6//# define LOGFNS 1
7
8# ifdef LOGFNS
9# include <stdio.h>
10# define LOGFN(fl, ln, fn) printf("-ECORE-WL: %25s: %5i - %s\n", fl, ln, fn);
11# else
12# define LOGFN(fl, ln, fn)
13# endif
14
15extern int _ecore_wl_log_dom;
16
17# ifdef ECORE_WL_DEFAULT_LOG_COLOR
18# undef ECORE_WL_DEFAULT_LOG_COLOR
19# endif
20# define ECORE_WL_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
21
22# ifdef ERR
23# undef ERR
24# endif
25# define ERR(...) EINA_LOG_DOM_ERR(_ecore_wl_log_dom, __VA_ARGS__)
26
27# ifdef DBG
28# undef DBG
29# endif
30# define DBG(...) EINA_LOG_DOM_DBG(_ecore_wl_log_dom, __VA_ARGS__)
31
32# ifdef INF
33# undef INF
34# endif
35# define INF(...) EINA_LOG_DOM_INFO(_ecore_wl_log_dom, __VA_ARGS__)
36
37# ifdef WRN
38# undef WRN
39# endif
40# define WRN(...) EINA_LOG_DOM_WARN(_ecore_wl_log_dom, __VA_ARGS__)
41
42# ifdef CRIT
43# undef CRIT
44# endif
45# define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_wl_log_dom, __VA_ARGS__)
46
47typedef struct _Ecore_Wl_Dnd_Source
48{
49 struct wl_data_offer *offer;
50 int refs;
51
52 Eina_Array *types;
53
54 uint32_t timestamp;
55 void *data;
56} Ecore_Wl_Dnd_Source;
57
58typedef struct _Ecore_Wl_Dnd_Target
59{
60 /* NB: These are not the real fields for this structure,
61 * and it is Bound to change....soon */
62 struct wl_data_offer *offer;
63 int refs;
64
65 Eina_Array *types;
66
67 uint32_t timestamp;
68 void *data;
69} Ecore_Wl_Dnd_Target;
70
71struct _Ecore_Wl_Drag_Source
72{
73 struct wl_data_device *data_dev;
74 struct wl_buffer *buffer;
75
76 int32_t hotspot_x, hotspot_y;
77 int32_t offset_x, offset_y;
78 const char *mimetype;
79 uint32_t timestamp;
80 void *data;
81
82 struct wl_data_source *data_source;
83};
84
85#endif