From 825a3d837a33f226c879cd02ad15c3fba57e8b2c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 23:30:42 +1000 Subject: Update the EFL to what I'm actually using, coz I'm using some stuff not yet released. --- .../ecore/src/lib/ecore_wayland/Ecore_Wayland.h | 123 ++ libraries/ecore/src/lib/ecore_wayland/Makefile.am | 31 + libraries/ecore/src/lib/ecore_wayland/Makefile.in | 829 +++++++++++++ libraries/ecore/src/lib/ecore_wayland/ecore_wl.c | 1213 ++++++++++++++++++++ .../ecore/src/lib/ecore_wayland/ecore_wl_private.h | 85 ++ 5 files changed, 2281 insertions(+) create mode 100644 libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h create mode 100644 libraries/ecore/src/lib/ecore_wayland/Makefile.am create mode 100644 libraries/ecore/src/lib/ecore_wayland/Makefile.in create mode 100644 libraries/ecore/src/lib/ecore_wayland/ecore_wl.c create mode 100644 libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h (limited to 'libraries/ecore/src/lib/ecore_wayland') 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 @@ +#ifndef _ECORE_WAYLAND_H_ +# define _ECORE_WAYLAND_H_ + +# include +# include + +# ifdef EAPI +# undef EAPI +# endif + +# ifdef __GNUC__ +# if __GNUC__ >= 4 +# define EAPI __attribute__ ((visibility("default"))) +# else +# define EAPI +# endif +# else +# define EAPI +# endif + +typedef struct _Ecore_Wl_Event_Mouse_In Ecore_Wl_Event_Mouse_In; +typedef struct _Ecore_Wl_Event_Mouse_Out Ecore_Wl_Event_Mouse_Out; +typedef struct _Ecore_Wl_Event_Focus_In Ecore_Wl_Event_Focus_In; +typedef struct _Ecore_Wl_Event_Focus_Out Ecore_Wl_Event_Focus_Out; + +typedef struct _Ecore_Wl_Drag_Source Ecore_Wl_Drag_Source; + +typedef struct _Ecore_Wl_Event_Drag_Start Ecore_Wl_Event_Drag_Start; +typedef struct _Ecore_Wl_Event_Drag_Stop Ecore_Wl_Event_Drag_Stop; + +struct _Ecore_Wl_Event_Mouse_In +{ + int modifiers; + int x, y; + + struct + { + int x, y; + } root; + + unsigned int window; + + unsigned int time; +}; + +struct _Ecore_Wl_Event_Mouse_Out +{ + int modifiers; + int x, y; + + struct + { + int x, y; + } root; + + unsigned int window; + + unsigned int time; +}; + +struct _Ecore_Wl_Event_Focus_In +{ + unsigned int window; + /* TODO: mode & detail */ + unsigned int time; +}; + +struct _Ecore_Wl_Event_Focus_Out +{ + unsigned int window; + /* TODO: mode & detail */ + unsigned int time; +}; + +struct _Ecore_Wl_Event_Drag_Start +{ + struct wl_data_device *device; + struct wl_surface *surface; + const char *mime_type; + uint32_t timestamp; +}; + +struct _Ecore_Wl_Event_Drag_Stop +{ + +}; + +/** + * @file + * @brief Ecore functions for dealing with the Wayland window system + * + * Ecore_Wl provides a wrapper and convenience functions for using the + * Wayland window system. Function groups for this part of the library + * include the following: + * @li @ref Ecore_Wl_Init_Group + */ + +EAPI int ecore_wl_init(const char *name); +EAPI int ecore_wl_shutdown(void); + +EAPI struct wl_display *ecore_wl_display_get(void); +EAPI struct wl_shm *ecore_wl_shm_get(void); +EAPI struct wl_compositor *ecore_wl_compositor_get(void); +EAPI struct wl_shell *ecore_wl_shell_get(void); +EAPI struct wl_input_device *ecore_wl_input_device_get(void); +EAPI void ecore_wl_screen_size_get(int *w, int *h); +EAPI unsigned int ecore_wl_format_get(void); +EAPI void ecore_wl_flush(void); +EAPI void ecore_wl_sync(void); +EAPI void ecore_wl_pointer_xy_get(int *x, int *y); + +EAPI 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); +EAPI void ecore_wl_drag_start(Ecore_Wl_Drag_Source *source, struct wl_surface *surface, struct wl_buffer *buffer); +EAPI void ecore_wl_drag_stop(void); + +EAPI extern int ECORE_WL_EVENT_MOUSE_IN; +EAPI extern int ECORE_WL_EVENT_MOUSE_OUT; +EAPI extern int ECORE_WL_EVENT_FOCUS_IN; +EAPI extern int ECORE_WL_EVENT_FOCUS_OUT; +EAPI extern int ECORE_WL_EVENT_DRAG_START; +EAPI extern int ECORE_WL_EVENT_DRAG_STOP; + +#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 @@ +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I$(top_srcdir)/src/lib/ecore \ +-I$(top_srcdir)/src/lib/ecore_input \ +-I$(top_builddir)/src/lib/ecore \ +-I$(top_builddir)/src/lib/ecore_input \ +@WAYLAND_CFLAGS@ \ +@EVAS_CFLAGS@ \ +@EINA_CFLAGS@ + +lib_LTLIBRARIES = libecore_wayland.la +includes_HEADERS = Ecore_Wayland.h +includesdir = $(includedir)/ecore-@VMAJ@ + +libecore_wayland_la_SOURCES = \ +ecore_wl.c + +## ecore_wl_window.c + +libecore_wayland_la_LIBADD = \ +$(top_builddir)/src/lib/ecore/libecore.la \ +$(top_builddir)/src/lib/ecore_input/libecore_input.la \ +@WAYLAND_LIBS@ \ +@EVAS_LIBS@ \ +@EINA_LIBS@ + +libecore_wayland_la_LDFLAGS = -version-info @version_info@ @release_info@ +libecore_wayland_la_DEPENDENCIES = $(top_builddir)/src/lib/ecore/libecore.la + +EXTRA_DIST = ecore_wl_private.h diff --git a/libraries/ecore/src/lib/ecore_wayland/Makefile.in b/libraries/ecore/src/lib/ecore_wayland/Makefile.in new file mode 100644 index 0000000..411da19 --- /dev/null +++ b/libraries/ecore/src/lib/ecore_wayland/Makefile.in @@ -0,0 +1,829 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/ecore_wayland +DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ + $(top_srcdir)/m4/ac_path_generic.m4 \ + $(top_srcdir)/m4/check_x_extension.m4 \ + $(top_srcdir)/m4/ecore_check_module.m4 \ + $(top_srcdir)/m4/ecore_check_options.m4 \ + $(top_srcdir)/m4/efl_compiler_flag.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_examples.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am_libecore_wayland_la_OBJECTS = ecore_wl.lo +libecore_wayland_la_OBJECTS = $(am_libecore_wayland_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +libecore_wayland_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libecore_wayland_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libecore_wayland_la_SOURCES) +DIST_SOURCES = $(libecore_wayland_la_SOURCES) +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CARES_CFLAGS = @CARES_CFLAGS@ +CARES_LIBS = @CARES_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_XCB_CFLAGS = @ECORE_XCB_CFLAGS@ +ECORE_XCB_LIBS = @ECORE_XCB_LIBS@ +EFL_ECORE_BUILD = @EFL_ECORE_BUILD@ +EFL_ECORE_CON_BUILD = @EFL_ECORE_CON_BUILD@ +EFL_ECORE_EVAS_BUILD = @EFL_ECORE_EVAS_BUILD@ +EFL_ECORE_FILE_BUILD = @EFL_ECORE_FILE_BUILD@ +EFL_ECORE_IMF_BUILD = @EFL_ECORE_IMF_BUILD@ +EFL_ECORE_IMF_EVAS_BUILD = @EFL_ECORE_IMF_EVAS_BUILD@ +EFL_ECORE_INPUT_BUILD = @EFL_ECORE_INPUT_BUILD@ +EFL_ECORE_INPUT_EVAS_BUILD = @EFL_ECORE_INPUT_EVAS_BUILD@ +EFL_ECORE_IPC_BUILD = @EFL_ECORE_IPC_BUILD@ +EFL_ECORE_PSL1GHT_BUILD = @EFL_ECORE_PSL1GHT_BUILD@ +EFL_ECORE_SDL_BUILD = @EFL_ECORE_SDL_BUILD@ +EFL_ECORE_WIN32_BUILD = @EFL_ECORE_WIN32_BUILD@ +EFL_ECORE_WINCE_BUILD = @EFL_ECORE_WINCE_BUILD@ +EFL_PTHREAD_CFLAGS = @EFL_PTHREAD_CFLAGS@ +EFL_PTHREAD_LIBS = @EFL_PTHREAD_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +ESCAPE_CFLAGS = @ESCAPE_CFLAGS@ +ESCAPE_LIBS = @ESCAPE_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +KEYSYMDEFS = @KEYSYMDEFS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ +LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ +LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SSL_CFLAGS = @SSL_CFLAGS@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +TLS2_CFLAGS = @TLS2_CFLAGS@ +TLS2_LIBS = @TLS2_LIBS@ +TLS_CFLAGS = @TLS_CFLAGS@ +TLS_LIBS = @TLS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +WIN32_LIBS = @WIN32_LIBS@ +XCB_COMPOSITE_CFLAGS = @XCB_COMPOSITE_CFLAGS@ +XCB_COMPOSITE_LIBS = @XCB_COMPOSITE_LIBS@ +XCB_CURSOR_CFLAGS = @XCB_CURSOR_CFLAGS@ +XCB_CURSOR_LIBS = @XCB_CURSOR_LIBS@ +XCB_DAMAGE_CFLAGS = @XCB_DAMAGE_CFLAGS@ +XCB_DAMAGE_LIBS = @XCB_DAMAGE_LIBS@ +XCB_DPMS_CFLAGS = @XCB_DPMS_CFLAGS@ +XCB_DPMS_LIBS = @XCB_DPMS_LIBS@ +XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@ +XCB_RANDR_LIBS = @XCB_RANDR_LIBS@ +XCB_RENDER_CFLAGS = @XCB_RENDER_CFLAGS@ +XCB_RENDER_LIBS = @XCB_RENDER_LIBS@ +XCB_SCREENSAVER_CFLAGS = @XCB_SCREENSAVER_CFLAGS@ +XCB_SCREENSAVER_LIBS = @XCB_SCREENSAVER_LIBS@ +XCB_SHAPE_CFLAGS = @XCB_SHAPE_CFLAGS@ +XCB_SHAPE_LIBS = @XCB_SHAPE_LIBS@ +XCB_SYNC_CFLAGS = @XCB_SYNC_CFLAGS@ +XCB_SYNC_LIBS = @XCB_SYNC_LIBS@ +XCB_X11_CFLAGS = @XCB_X11_CFLAGS@ +XCB_X11_LIBS = @XCB_X11_LIBS@ +XCB_XFIXES_CFLAGS = @XCB_XFIXES_CFLAGS@ +XCB_XFIXES_LIBS = @XCB_XFIXES_LIBS@ +XCB_XGESTURE_CFLAGS = @XCB_XGESTURE_CFLAGS@ +XCB_XGESTURE_LIBS = @XCB_XGESTURE_LIBS@ +XCB_XINERAMA_CFLAGS = @XCB_XINERAMA_CFLAGS@ +XCB_XINERAMA_LIBS = @XCB_XINERAMA_LIBS@ +XCB_XINPUT_CFLAGS = @XCB_XINPUT_CFLAGS@ +XCB_XINPUT_LIBS = @XCB_XINPUT_LIBS@ +XCB_XPRINT_CFLAGS = @XCB_XPRINT_CFLAGS@ +XCB_XPRINT_LIBS = @XCB_XPRINT_LIBS@ +XCB_XTEST_CFLAGS = @XCB_XTEST_CFLAGS@ +XCB_XTEST_LIBS = @XCB_XTEST_LIBS@ +XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ +XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ +XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ +XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XDPMS_CFLAGS = @XDPMS_CFLAGS@ +XDPMS_LIBS = @XDPMS_LIBS@ +XFIXES_CFLAGS = @XFIXES_CFLAGS@ +XFIXES_LIBS = @XFIXES_LIBS@ +XGESTURE_CFLAGS = @XGESTURE_CFLAGS@ +XGESTURE_LIBS = @XGESTURE_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XI2_CFLAGS = @XI2_CFLAGS@ +XI2_LIBS = @XI2_LIBS@ +XINERAMA_CFLAGS = @XINERAMA_CFLAGS@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XKB_CFLAGS = @XKB_CFLAGS@ +XKB_LIBS = @XKB_LIBS@ +XMKMF = @XMKMF@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRANDR_CFLAGS = @XRANDR_CFLAGS@ +XRANDR_LIBS = @XRANDR_LIBS@ +XRENDER_CFLAGS = @XRENDER_CFLAGS@ +XRENDER_LIBS = @XRENDER_LIBS@ +XSS_CFLAGS = @XSS_CFLAGS@ +XSS_LIBS = @XSS_LIBS@ +XTEST_CFLAGS = @XTEST_CFLAGS@ +XTEST_LIBS = @XTEST_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +Xcursor_cflags = @Xcursor_cflags@ +Xcursor_libs = @Xcursor_libs@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cocoa_ldflags = @cocoa_ldflags@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +ecore_cocoa_cflags = @ecore_cocoa_cflags@ +ecore_cocoa_libs = @ecore_cocoa_libs@ +ecore_con_cflags = @ecore_con_cflags@ +ecore_con_libs = @ecore_con_libs@ +ecore_directfb_cflags = @ecore_directfb_cflags@ +ecore_directfb_libs = @ecore_directfb_libs@ +ecore_evas_cflags = @ecore_evas_cflags@ +ecore_evas_libs = @ecore_evas_libs@ +ecore_fb_cflags = @ecore_fb_cflags@ +ecore_fb_libs = @ecore_fb_libs@ +ecore_file_cflags = @ecore_file_cflags@ +ecore_file_libs = @ecore_file_libs@ +ecore_imf_cflags = @ecore_imf_cflags@ +ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ +ecore_imf_evas_libs = @ecore_imf_evas_libs@ +ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ +ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ +ecore_imf_xim_libs = @ecore_imf_xim_libs@ +ecore_input_cflags = @ecore_input_cflags@ +ecore_input_evas_cflags = @ecore_input_evas_cflags@ +ecore_input_evas_libs = @ecore_input_evas_libs@ +ecore_input_libs = @ecore_input_libs@ +ecore_ipc_cflags = @ecore_ipc_cflags@ +ecore_ipc_libs = @ecore_ipc_libs@ +ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ +ecore_psl1ght_libs = @ecore_psl1ght_libs@ +ecore_sdl_cflags = @ecore_sdl_cflags@ +ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ +ecore_win32_cflags = @ecore_win32_cflags@ +ecore_win32_libs = @ecore_win32_libs@ +ecore_wince_cflags = @ecore_wince_cflags@ +ecore_wince_libs = @ecore_wince_libs@ +ecore_x_cflags = @ecore_x_cflags@ +ecore_x_libs = @ecore_x_libs@ +ecore_x_libs_private = @ecore_x_libs_private@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +exec_prefix = @exec_prefix@ +have_ecore_x_xcb_define = @have_ecore_x_xcb_define@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +release_info = @release_info@ +requirements_ecore = @requirements_ecore@ +requirements_ecore_cocoa = @requirements_ecore_cocoa@ +requirements_ecore_con = @requirements_ecore_con@ +requirements_ecore_directfb = @requirements_ecore_directfb@ +requirements_ecore_evas = @requirements_ecore_evas@ +requirements_ecore_fb = @requirements_ecore_fb@ +requirements_ecore_file = @requirements_ecore_file@ +requirements_ecore_imf = @requirements_ecore_imf@ +requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ +requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ +requirements_ecore_input = @requirements_ecore_input@ +requirements_ecore_input_evas = @requirements_ecore_input_evas@ +requirements_ecore_ipc = @requirements_ecore_ipc@ +requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ +requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ +requirements_ecore_win32 = @requirements_ecore_win32@ +requirements_ecore_wince = @requirements_ecore_wince@ +requirements_ecore_x = @requirements_ecore_x@ +rt_libs = @rt_libs@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +x_cflags = @x_cflags@ +x_includes = @x_includes@ +x_libs = @x_libs@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I$(top_srcdir)/src/lib/ecore \ +-I$(top_srcdir)/src/lib/ecore_input \ +-I$(top_builddir)/src/lib/ecore \ +-I$(top_builddir)/src/lib/ecore_input \ +@WAYLAND_CFLAGS@ \ +@EVAS_CFLAGS@ \ +@EINA_CFLAGS@ + +lib_LTLIBRARIES = libecore_wayland.la +includes_HEADERS = Ecore_Wayland.h +includesdir = $(includedir)/ecore-@VMAJ@ +libecore_wayland_la_SOURCES = \ +ecore_wl.c + +libecore_wayland_la_LIBADD = \ +$(top_builddir)/src/lib/ecore/libecore.la \ +$(top_builddir)/src/lib/ecore_input/libecore_input.la \ +@WAYLAND_LIBS@ \ +@EVAS_LIBS@ \ +@EINA_LIBS@ + +libecore_wayland_la_LDFLAGS = -version-info @version_info@ @release_info@ +libecore_wayland_la_DEPENDENCIES = $(top_builddir)/src/lib/ecore/libecore.la +EXTRA_DIST = ecore_wl_private.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/ecore_wayland/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/ecore_wayland/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libecore_wayland.la: $(libecore_wayland_la_OBJECTS) $(libecore_wayland_la_DEPENDENCIES) + $(AM_V_CCLD)$(libecore_wayland_la_LINK) -rpath $(libdir) $(libecore_wayland_la_OBJECTS) $(libecore_wayland_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wl.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-includesHEADERS install-info \ + install-info-am install-libLTLIBRARIES install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-libLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.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 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "Ecore.h" +#include "ecore_private.h" +#include "Ecore_Input.h" +#include "ecore_wl_private.h" +#include "Ecore_Wayland.h" + +/* FIXME: This gives BTN_LEFT/RIGHT/MIDDLE for linux systems ... + * What about other OSs ?? */ +#include +#ifdef __linux__ +# include +#else +# define BTN_LEFT 0x110 +# define BTN_RIGHT 0x111 +# define BTN_MIDDLE 0x112 +# define BTN_SIDE 0x113 +# define BTN_EXTRA 0x114 +# define BTN_FORWARD 0x115 +# define BTN_BACK 0x116 +#endif + +#include + +/* local function prototypes */ +static Eina_Bool _ecore_wl_shutdown(Eina_Bool close_display); +static void _ecore_wl_cb_disp_handle_global(struct wl_display *disp, uint32_t id, const char *interface, uint32_t version __UNUSED__, void *data __UNUSED__); +static int _ecore_wl_cb_disp_event_mask_update(uint32_t mask, void *data __UNUSED__); +static 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__); +static 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__); +static Eina_Bool _ecore_wl_cb_fd_handle(void *data, Ecore_Fd_Handler *hdl __UNUSED__); +static 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); +static void _ecore_wl_cb_handle_button(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, uint32_t btn, uint32_t state); +static void _ecore_wl_cb_handle_key(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t __UNUSED__, uint32_t key, uint32_t state); +static 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); +static 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); +static 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); +static void _ecore_wl_cb_handle_touch_up(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id); +static 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); +static void _ecore_wl_cb_handle_touch_frame(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__); +static void _ecore_wl_cb_handle_touch_cancel(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__); +static void _ecore_wl_cb_source_target(void *data, struct wl_data_source *source __UNUSED__, const char *mime_type __UNUSED__); +static void _ecore_wl_cb_source_send(void *data, struct wl_data_source *source, const char *mime_type, int32_t fd); +static void _ecore_wl_cb_source_cancelled(void *data, struct wl_data_source *source __UNUSED__); +static void _ecore_wl_cb_source_offer(void *data, struct wl_data_offer *offer __UNUSED__, const char *type); +static void _ecore_wl_cb_data_offer(void *data, struct wl_data_device *data_dev, uint32_t id); +static 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); +static void _ecore_wl_cb_data_leave(void *data __UNUSED__, struct wl_data_device *data_dev); +static void _ecore_wl_cb_data_motion(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, int32_t x, int32_t y); +static void _ecore_wl_cb_data_drop(void *data __UNUSED__, struct wl_data_device *data_dev); +static void _ecore_wl_cb_data_selection(void *data, struct wl_data_device *data_dev, struct wl_data_offer *offer); + +static void _ecore_wl_mouse_move_send(uint32_t timestamp); +static void _ecore_wl_mouse_out_send(struct wl_surface *surface, uint32_t timestamp); +static void _ecore_wl_mouse_in_send(struct wl_surface *surface, uint32_t timestamp); +static void _ecore_wl_mouse_up_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp); +static void _ecore_wl_mouse_down_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp); +static void _ecore_wl_focus_out_send(struct wl_surface *surface, uint32_t timestamp); +static void _ecore_wl_focus_in_send(struct wl_surface *surface, uint32_t timestamp); + +/* local variables */ +static int _ecore_wl_init_count = 0; +static struct wl_display *_ecore_wl_disp = NULL; +static uint32_t _ecore_wl_disp_mask = 0; +static uint32_t _ecore_wl_disp_format = WL_SHM_FORMAT_ARGB8888; +static Eina_Rectangle _ecore_wl_screen; +static Ecore_Fd_Handler *_ecore_wl_fd_hdl = NULL; +static int _ecore_wl_screen_x = 0; +static int _ecore_wl_screen_y = 0; +static int _ecore_wl_surface_x = 0; +static int _ecore_wl_surface_y = 0; +static int _ecore_wl_touch_x = 0; +static int _ecore_wl_touch_y = 0; +static int _ecore_wl_input_modifiers = 0; +static struct xkb_desc *_ecore_wl_xkb; +static uint32_t _ecore_wl_input_button = 0; + +static struct wl_compositor *_ecore_wl_comp; +static struct wl_shm *_ecore_wl_shm; +static struct wl_shell *_ecore_wl_shell; +static struct wl_output *_ecore_wl_output; +static struct wl_input_device *_ecore_wl_input_dev; +static struct wl_surface *_ecore_wl_input_surface; +static struct wl_surface *_ecore_wl_touch_surface; +static struct wl_data_device_manager *_ecore_wl_data_manager; +static struct wl_data_device *_ecore_wl_data_dev; + +static const struct wl_output_listener _ecore_wl_output_listener = +{ + _ecore_wl_cb_disp_handle_geometry, + _ecore_wl_cb_disp_handle_mode +}; +static const struct wl_input_device_listener _ecore_wl_input_listener = +{ + _ecore_wl_cb_handle_motion, + _ecore_wl_cb_handle_button, + _ecore_wl_cb_handle_key, + _ecore_wl_cb_handle_pointer_focus, + _ecore_wl_cb_handle_keyboard_focus, + _ecore_wl_cb_handle_touch_down, + _ecore_wl_cb_handle_touch_up, + _ecore_wl_cb_handle_touch_motion, + _ecore_wl_cb_handle_touch_frame, + _ecore_wl_cb_handle_touch_cancel, +}; +static const struct wl_data_source_listener _ecore_wl_source_listener = +{ + _ecore_wl_cb_source_target, + _ecore_wl_cb_source_send, + _ecore_wl_cb_source_cancelled +}; +static const struct wl_data_device_listener _ecore_wl_data_listener = +{ + _ecore_wl_cb_data_offer, + _ecore_wl_cb_data_enter, + _ecore_wl_cb_data_leave, + _ecore_wl_cb_data_motion, + _ecore_wl_cb_data_drop, + _ecore_wl_cb_data_selection +}; +static const struct wl_data_offer_listener _ecore_wl_offer_listener = +{ + _ecore_wl_cb_source_offer, +}; + +/* external variables */ +int _ecore_wl_log_dom = -1; +EAPI int ECORE_WL_EVENT_MOUSE_IN = 0; +EAPI int ECORE_WL_EVENT_MOUSE_OUT = 0; +EAPI int ECORE_WL_EVENT_FOCUS_IN = 0; +EAPI int ECORE_WL_EVENT_FOCUS_OUT = 0; +EAPI int ECORE_WL_EVENT_DRAG_START = 0; +EAPI int ECORE_WL_EVENT_DRAG_STOP = 0; + +EAPI int +ecore_wl_init(const char *name) +{ + struct xkb_rule_names xkb_names; + int fd = 0; + + if (++_ecore_wl_init_count != 1) + return _ecore_wl_init_count; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!eina_init()) return --_ecore_wl_init_count; + + _ecore_wl_log_dom = + eina_log_domain_register("ecore_wl", ECORE_WL_DEFAULT_LOG_COLOR); + if (_ecore_wl_log_dom < 0) + { + EINA_LOG_ERR("Cannot create a log domain for Ecore Wayland."); + eina_shutdown(); + return --_ecore_wl_init_count; + } + + if (!ecore_init()) + { + eina_log_domain_unregister(_ecore_wl_log_dom); + _ecore_wl_log_dom = -1; + eina_shutdown(); + return --_ecore_wl_init_count; + } + + if (!ecore_event_init()) + { + eina_log_domain_unregister(_ecore_wl_log_dom); + _ecore_wl_log_dom = -1; + ecore_shutdown(); + eina_shutdown(); + return --_ecore_wl_init_count; + } + + if (!ECORE_WL_EVENT_MOUSE_IN) + { + ECORE_WL_EVENT_MOUSE_IN = ecore_event_type_new(); + ECORE_WL_EVENT_MOUSE_OUT = ecore_event_type_new(); + ECORE_WL_EVENT_FOCUS_IN = ecore_event_type_new(); + ECORE_WL_EVENT_FOCUS_OUT = ecore_event_type_new(); + ECORE_WL_EVENT_DRAG_START = ecore_event_type_new(); + ECORE_WL_EVENT_DRAG_STOP = ecore_event_type_new(); + } + + /* init xkb */ + /* FIXME: Somehow make this portable to other languages/countries */ + xkb_names.rules = "evdev"; + xkb_names.model = "evdev"; + xkb_names.layout = "us"; + xkb_names.variant = ""; + xkb_names.options = ""; + if (!(_ecore_wl_xkb = xkb_compile_keymap_from_rules(&xkb_names))) + { + ERR("Could not compile keymap"); + eina_log_domain_unregister(_ecore_wl_log_dom); + _ecore_wl_log_dom = -1; + ecore_event_shutdown(); + ecore_shutdown(); + eina_shutdown(); + return --_ecore_wl_init_count; + } + + /* connect to the wayland display */ + if (!(_ecore_wl_disp = wl_display_connect(name))) + { + eina_log_domain_unregister(_ecore_wl_log_dom); + _ecore_wl_log_dom = -1; + ecore_event_shutdown(); + ecore_shutdown(); + eina_shutdown(); + return --_ecore_wl_init_count; + } + + /* setup handler for wayland interfaces */ + wl_display_add_global_listener(_ecore_wl_disp, + _ecore_wl_cb_disp_handle_global, NULL); + + /* process connection events */ + wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_READABLE); + + fd = wl_display_get_fd(_ecore_wl_disp, + _ecore_wl_cb_disp_event_mask_update, NULL); + + _ecore_wl_fd_hdl = + ecore_main_fd_handler_add(fd, ECORE_FD_READ, _ecore_wl_cb_fd_handle, + _ecore_wl_disp, NULL, NULL); + if (!_ecore_wl_fd_hdl) + { + wl_display_destroy(_ecore_wl_disp); + _ecore_wl_disp = NULL; + eina_log_domain_unregister(_ecore_wl_log_dom); + _ecore_wl_log_dom = -1; + ecore_event_shutdown(); + ecore_shutdown(); + eina_shutdown(); + return --_ecore_wl_init_count; + } + + return _ecore_wl_init_count; +} + +EAPI int +ecore_wl_shutdown(void) +{ + return _ecore_wl_shutdown(EINA_TRUE); +} + +EAPI struct wl_display * +ecore_wl_display_get(void) +{ + return _ecore_wl_disp; +} + +EAPI struct wl_shm * +ecore_wl_shm_get(void) +{ + return _ecore_wl_shm; +} + +EAPI struct wl_compositor * +ecore_wl_compositor_get(void) +{ + return _ecore_wl_comp; +} + +EAPI struct wl_shell * +ecore_wl_shell_get(void) +{ + return _ecore_wl_shell; +} + +EAPI struct wl_input_device * +ecore_wl_input_device_get(void) +{ + return _ecore_wl_input_dev; +} + +EAPI void +ecore_wl_screen_size_get(int *w, int *h) +{ + if (w) *w = _ecore_wl_screen.w; + if (h) *h = _ecore_wl_screen.h; +} + +EAPI unsigned int +ecore_wl_format_get(void) +{ + return _ecore_wl_disp_format; +} + +EAPI void +ecore_wl_flush(void) +{ + wl_display_flush(_ecore_wl_disp); +} + +EAPI void +ecore_wl_sync(void) +{ + wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_READABLE); +} + +EAPI void +ecore_wl_pointer_xy_get(int *x, int *y) +{ + if (x) *x = _ecore_wl_screen_x; + if (y) *y = _ecore_wl_screen_y; +} + +EAPI 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) +{ + Ecore_Wl_Drag_Source *source; + + if (!(source = calloc(1, sizeof(Ecore_Wl_Drag_Source)))) return NULL; + + source->data_dev = _ecore_wl_data_dev; + source->hotspot_x = hotspot_x; + source->hotspot_y = hotspot_y; + source->offset_x = offset_x; + source->offset_y = offset_y; + source->mimetype = mimetype; + source->timestamp = timestamp; + source->data = data; + + source->data_source = + wl_data_device_manager_create_data_source(_ecore_wl_data_manager); + + wl_data_source_add_listener(source->data_source, + &_ecore_wl_source_listener, source); + + wl_data_source_offer(source->data_source, source->mimetype); + + /* NB: Do we add some default mimetypes here ?? */ + /* text/plain, etc */ + + return source; +} + +EAPI void +ecore_wl_drag_start(Ecore_Wl_Drag_Source *source, struct wl_surface *surface, struct wl_buffer *buffer) +{ + source->buffer = buffer; + + wl_data_device_start_drag(source->data_dev, source->data_source, + surface, source->timestamp); +} + +EAPI void +ecore_wl_drag_stop(void) +{ + +} + +/* local functions */ +static Eina_Bool +_ecore_wl_shutdown(Eina_Bool close_display) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (--_ecore_wl_init_count != 0) + return _ecore_wl_init_count; + + if (!_ecore_wl_disp) return _ecore_wl_init_count; + + if (_ecore_wl_xkb) free(_ecore_wl_xkb); + + if (_ecore_wl_fd_hdl) ecore_main_fd_handler_del(_ecore_wl_fd_hdl); + _ecore_wl_fd_hdl = NULL; + + if (close_display) + { + if (_ecore_wl_data_dev) wl_data_device_destroy(_ecore_wl_data_dev); + if (_ecore_wl_input_dev) wl_input_device_destroy(_ecore_wl_input_dev); + if (_ecore_wl_data_manager) + wl_data_device_manager_destroy(_ecore_wl_data_manager); + if (_ecore_wl_shell) wl_shell_destroy(_ecore_wl_shell); + if (_ecore_wl_shm) wl_shm_destroy(_ecore_wl_shm); + if (_ecore_wl_comp) wl_compositor_destroy(_ecore_wl_comp); + if (_ecore_wl_disp) + { + wl_display_flush(_ecore_wl_disp); + wl_display_destroy(_ecore_wl_disp); + } + _ecore_wl_disp = NULL; + } + + eina_log_domain_unregister(_ecore_wl_log_dom); + _ecore_wl_log_dom = -1; + + ecore_event_shutdown(); + ecore_shutdown(); + eina_shutdown(); + + return _ecore_wl_init_count; +} + +static void +_ecore_wl_cb_disp_handle_global(struct wl_display *disp, uint32_t id, const char *interface, uint32_t version __UNUSED__, void *data __UNUSED__) +{ +// LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (disp != _ecore_wl_disp) return; + if (!strcmp(interface, "wl_compositor")) + { + _ecore_wl_comp = + wl_display_bind(_ecore_wl_disp, id, &wl_compositor_interface); + } + else if (!strcmp(interface, "wl_shm")) + { + _ecore_wl_shm = + wl_display_bind(_ecore_wl_disp, id, &wl_shm_interface); + } + else if (!strcmp(interface, "wl_output")) + { + _ecore_wl_output = + wl_display_bind(_ecore_wl_disp, id, &wl_output_interface); + wl_output_add_listener(_ecore_wl_output, + &_ecore_wl_output_listener, NULL); + } + else if (!strcmp(interface, "wl_shell")) + { + _ecore_wl_shell = + wl_display_bind(_ecore_wl_disp, id, &wl_shell_interface); + } + else if (!strcmp(interface, "wl_input_device")) + { + _ecore_wl_input_dev = + wl_display_bind(_ecore_wl_disp, id, &wl_input_device_interface); + wl_input_device_add_listener(_ecore_wl_input_dev, + &_ecore_wl_input_listener, NULL); + } + else if (!strcmp(interface, "wl_data_device_manager")) + { + _ecore_wl_data_manager = + wl_display_bind(_ecore_wl_disp, id, + &wl_data_device_manager_interface); + } + + if ((_ecore_wl_input_dev) && (_ecore_wl_data_manager) && (!_ecore_wl_data_dev)) + { + _ecore_wl_data_dev = + wl_data_device_manager_get_data_device(_ecore_wl_data_manager, + _ecore_wl_input_dev); + wl_data_device_add_listener(_ecore_wl_data_dev, + &_ecore_wl_data_listener, NULL); + } +} + +static int +_ecore_wl_cb_disp_event_mask_update(uint32_t mask, void *data __UNUSED__) +{ +// LOGFN(__FILE__, __LINE__, __FUNCTION__); + + _ecore_wl_disp_mask = mask; + + return 0; +} + +static 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__) +{ + _ecore_wl_screen.x = x; + _ecore_wl_screen.y = y; +} + +static 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__) +{ + if (flags & WL_OUTPUT_MODE_CURRENT) + { + _ecore_wl_screen.w = w; + _ecore_wl_screen.h = h; + } +} + +static Eina_Bool +_ecore_wl_cb_fd_handle(void *data, Ecore_Fd_Handler *hdl __UNUSED__) +{ + struct wl_display *disp; + +// LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(disp = data)) return ECORE_CALLBACK_RENEW; + if (disp != _ecore_wl_disp) return ECORE_CALLBACK_RENEW; + + if (_ecore_wl_disp_mask & WL_DISPLAY_WRITABLE) + wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_WRITABLE); + + if (_ecore_wl_disp_mask & WL_DISPLAY_READABLE) + wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_READABLE); + + return ECORE_CALLBACK_RENEW; +} + +static 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) +{ + if (dev != _ecore_wl_input_dev) return; + + _ecore_wl_screen_x = x; + _ecore_wl_screen_y = y; + _ecore_wl_surface_x = sx; + _ecore_wl_surface_y = sy; + + _ecore_wl_mouse_move_send(t); +} + +static void +_ecore_wl_cb_handle_button(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, uint32_t btn, uint32_t state) +{ + if (dev != _ecore_wl_input_dev) return; + + if ((btn >= BTN_SIDE) && (btn <= BTN_BACK)) + { + Ecore_Event_Mouse_Wheel *ev; + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Wheel)))) return; + + ev->timestamp = t; + ev->x = _ecore_wl_surface_x; + ev->y = _ecore_wl_surface_y; + ev->root.x = _ecore_wl_screen_x; + ev->root.y = _ecore_wl_screen_y; + ev->modifiers = _ecore_wl_input_modifiers; + ev->direction = 0; + + if (_ecore_wl_input_surface) + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_input_surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + /* NB: (FIXME) Currently Wayland provides no measure of how much the + * wheel has scrolled (read: delta of movement). So for now, we will + * just assume that the amount scrolled is 1 */ + if ((btn == BTN_EXTRA) || (btn == BTN_FORWARD)) // down + ev->z = 1; + else if ((btn == BTN_SIDE) || (btn == BTN_BACK)) // up + ev->z = -1; + + ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL); + } + else + { + if (state) + { + _ecore_wl_input_button = btn; + _ecore_wl_mouse_down_send(_ecore_wl_input_surface, btn, t); + /* NB: Ideally, this is not the place to check for drags. + * IMO, drags should be handled by the client. EG: we raise the + * mouse_down to the client, and the client can 'request' a + * drag_start from ecore_wl */ + if ((_ecore_wl_input_surface) || (_ecore_wl_touch_surface)) + { + /* record item which was grabbed. + * create drag source. start drag */ + } + } + else + { + if ((_ecore_wl_input_surface) || (_ecore_wl_touch_surface)) + { + /* release grabbed button and finish drag */ + if ((_ecore_wl_input_button) && + (_ecore_wl_input_button == btn)) + { + + } + } + _ecore_wl_input_button = 0; + _ecore_wl_mouse_up_send(_ecore_wl_input_surface, btn, t); + } + } +} + +static void +_ecore_wl_cb_handle_key(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t __UNUSED__, uint32_t key, uint32_t state) +{ + unsigned int keycode = 0; + + if (dev != _ecore_wl_input_dev) return; + + keycode = key + _ecore_wl_xkb->min_key_code; + + if (state) + _ecore_wl_input_modifiers |= _ecore_wl_xkb->map->modmap[keycode]; + else + _ecore_wl_input_modifiers &= ~_ecore_wl_xkb->map->modmap[keycode]; +} + +static 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) +{ + if (dev != _ecore_wl_input_dev) return; + + /* NB: Wayland pointer focus is weird. It's not pointer focus in the normal + * sense...Wayland 'moving/resizing' (and maybe other stuff) has a habit + * of stealing the pointer focus and thus this cannot be used to control + * normal pointer focus. On mouse down, the 'active' surface is stolen + * by Wayland for the grab, so 'surface' here ends up being NULL. When a + * move or resize is finished, we get this event again, but this time + * with an active surface */ + _ecore_wl_screen_x = x; + _ecore_wl_screen_y = y; + _ecore_wl_surface_x = sx; + _ecore_wl_surface_y = sy; + + if ((_ecore_wl_input_surface) && (_ecore_wl_input_surface != surface)) + { + if (!_ecore_wl_input_button) + _ecore_wl_mouse_out_send(_ecore_wl_input_surface, t); + } + + if (surface) + { + if (_ecore_wl_input_button) + { + _ecore_wl_mouse_up_send(surface, _ecore_wl_input_button, t); + _ecore_wl_input_button = 0; + } + else + _ecore_wl_mouse_in_send(surface, t); + } +} + +static void +_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) +{ + unsigned int *keyend = 0, *i = 0; + + if (dev != _ecore_wl_input_dev) return; + + /* NB: Remove old keyboard focus */ + if ((_ecore_wl_input_surface) && (_ecore_wl_input_surface != surface)) + _ecore_wl_focus_out_send(_ecore_wl_input_surface, t); + + _ecore_wl_input_surface = NULL; + + keyend = keys->data + keys->size; + _ecore_wl_input_modifiers = 0; + for (i = keys->data; i < keyend; i++) + _ecore_wl_input_modifiers |= _ecore_wl_xkb->map->modmap[*i]; + + if (surface) + { + /* set new input surface */ + _ecore_wl_input_surface = surface; + + /* send mouse in to new surface */ + /* _ecore_wl_mouse_in_send(surface, t); */ + + /* send focus to new surface */ + _ecore_wl_focus_in_send(surface, t); + } +} + +static 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) +{ + Ecore_Event_Mouse_Button *ev; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + _ecore_wl_touch_surface = surface; + _ecore_wl_touch_x = x; + _ecore_wl_touch_y = y; + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; + + ev->timestamp = timestamp; + + /* NB: Need to verify using x,y for these */ + ev->x = x; + ev->y = y; + ev->root.x = x; + ev->root.y = y; + ev->modifiers = 0; + ev->buttons = 0; + ev->same_screen = 1; + + /* FIXME: Need to get these from Wayland somehow */ + ev->double_click = 0; + ev->triple_click = 0; + + ev->multi.device = id; + ev->multi.radius = 1; + ev->multi.radius_x = 1; + ev->multi.radius_y = 1; + ev->multi.pressure = 1.0; + ev->multi.angle = 0.0; + /* NB: Need to verify using x,y for these */ + ev->multi.x = x; + ev->multi.y = y; + ev->multi.root.x = x; + ev->multi.root.y = y; + + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL); +} + +static void +_ecore_wl_cb_handle_touch_up(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id) +{ + Ecore_Event_Mouse_Button *ev; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; + + ev->timestamp = timestamp; + + /* TODO: Need to verify using x,y for these */ + ev->x = _ecore_wl_touch_x; + ev->y = _ecore_wl_touch_y; + ev->root.x = _ecore_wl_touch_x; + ev->root.y = _ecore_wl_touch_y; + ev->modifiers = 0; + ev->buttons = 0; + ev->same_screen = 1; + + /* FIXME: Need to get these from Wayland somehow */ + ev->double_click = 0; + ev->triple_click = 0; + + ev->multi.device = id; + ev->multi.radius = 1; + ev->multi.radius_x = 1; + ev->multi.radius_y = 1; + ev->multi.pressure = 1.0; + ev->multi.angle = 0.0; + + /* TODO: Need to verify using x,y for these */ + ev->multi.x = _ecore_wl_touch_x; + ev->multi.y = _ecore_wl_touch_y; + ev->multi.root.x = _ecore_wl_touch_x; + ev->multi.root.y = _ecore_wl_touch_y; + + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_touch_surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + _ecore_wl_touch_surface = NULL; + + ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL); +} + +static 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) +{ + Ecore_Event_Mouse_Move *ev; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!_ecore_wl_touch_surface) return; + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Move)))) return; + + ev->timestamp = timestamp; + /* TODO: Need to verify using x,y for these */ + ev->x = x; + ev->y = y; + ev->root.x = x; + ev->root.y = y; + ev->modifiers = 0; //_ecore_wl_input_modifiers; + ev->same_screen = 1; + + ev->multi.device = id; + ev->multi.radius = 1; + ev->multi.radius_x = 1; + ev->multi.radius_y = 1; + ev->multi.pressure = 1.0; + ev->multi.angle = 0.0; + + /* TODO: Need to verify using x,y for these */ + ev->multi.x = x; + ev->multi.y = y; + ev->multi.root.x = x; + ev->multi.root.y = y; + + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_touch_surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL); +} + +static void +_ecore_wl_cb_handle_touch_frame(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + /* FIXME: Need to get a device and actually test what happens here */ +} + +static void +_ecore_wl_cb_handle_touch_cancel(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + /* FIXME: Need to get a device and actually test what happens here */ + _ecore_wl_touch_surface = NULL; +} + +static void +_ecore_wl_cb_source_target(void *data, struct wl_data_source *source __UNUSED__, const char *mime_type __UNUSED__) +{ + Ecore_Wl_Drag_Source *s; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + printf("Ecore_Wl Source Target\n"); + if (!(s = data)) return; + printf("\tHave Drag Source\n"); + + /* FIXME: buffer here should really be the mouse cursor buffer */ + wl_data_device_attach(s->data_dev, s->timestamp, s->buffer, + s->hotspot_x, s->hotspot_y); +} + +static void +_ecore_wl_cb_source_send(void *data, struct wl_data_source *source, const char *mime_type, int32_t fd) +{ + Ecore_Wl_Drag_Source *s; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + printf("Ecore_Wl Source Send\n"); + if (!(s = data)) return; + printf("\tHave Drag Source\n"); + + /* FIXME: write message to fd */ + + /* NB: Wayland really sucks in this regard. Why should selection stuff + * require an 'fd' ?? */ +} + +static void +_ecore_wl_cb_source_cancelled(void *data, struct wl_data_source *source __UNUSED__) +{ + Ecore_Wl_Drag_Source *s; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + /* The cancelled event usually means source is no longer in use by + * the drag (or selection). */ + + printf("Ecore_Wl Source Cancel\n"); + if (!(s = data)) return; + printf("\tHave Drag Source\n"); + + /* FIXME: raise this to ecore_evas so the surface/buffer + * of the drag can be destroyed */ + + if (s->data_source) wl_data_source_destroy(s->data_source); + s->data_source = NULL; + + free(s); +} + +static void +_ecore_wl_cb_source_offer(void *data, struct wl_data_offer *offer __UNUSED__, const char *type) +{ + Ecore_Wl_Dnd_Source *s; + + if (!(s = data)) return; + eina_array_push(s->types, strdup(type)); +} + +static void +_ecore_wl_cb_data_offer(void *data, struct wl_data_device *data_dev, uint32_t id) +{ + Ecore_Wl_Dnd_Source *source; + + /* create a new 'data offer' structure and setup a listener for it */ + if (!(source = calloc(1, sizeof(Ecore_Wl_Dnd_Source)))) return; + + source->types = eina_array_new(1); + source->data = data; + source->refs = 1; + + /* FIXME: This will need to change when Wayland has typesafe wrappers for this */ + source->offer = (struct wl_data_offer *) + wl_proxy_create_for_id((struct wl_proxy *)data_dev, + id, &wl_data_offer_interface); + + wl_data_device_set_user_data(data_dev, source); + wl_data_offer_add_listener(source->offer, &_ecore_wl_offer_listener, source); +} + +static 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) +{ + Ecore_Wl_Dnd_Source *source; + + if (!(source = wl_data_device_get_user_data(data_dev))) return; + + /* TODO: maybe set pointer focus here ?? */ + + source->timestamp = timestamp; +} + +static void +_ecore_wl_cb_data_leave(void *data __UNUSED__, struct wl_data_device *data_dev) +{ + Ecore_Wl_Dnd_Source *source; + + if (!(source = wl_data_device_get_user_data(data_dev))) return; + + /* destroy drag offer */ + wl_data_offer_destroy(source->offer); + + while (eina_array_count(source->types)) + free(eina_array_pop(source->types)); + + eina_array_free(source->types); + free(source); + + wl_data_device_set_user_data(data_dev, NULL); +} + +static void +_ecore_wl_cb_data_motion(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, int32_t x, int32_t y) +{ + Ecore_Wl_Dnd_Source *source; + + if (!(source = wl_data_device_get_user_data(data_dev))) return; + /* TODO: Here we should raise motion events for dragging */ +} + +static void +_ecore_wl_cb_data_drop(void *data __UNUSED__, struct wl_data_device *data_dev) +{ + Ecore_Wl_Dnd_Source *source; + + if (!(source = wl_data_device_get_user_data(data_dev))) return; + + /* TODO: Raise event for drop */ + + wl_data_offer_accept(source->offer, source->timestamp, NULL); +// eina_array_data_get(source->types, 0)); +} + +static void +_ecore_wl_cb_data_selection(void *data, struct wl_data_device *data_dev, struct wl_data_offer *offer) +{ + Ecore_Wl_Dnd_Source *source; + + printf("Ecore_Wl Data Selection\n"); + if ((source = wl_data_device_get_user_data(data_dev))) + { + /* destroy old source */ + wl_data_offer_destroy(source->offer); + + while (eina_array_count(source->types)) + free(eina_array_pop(source->types)); + + eina_array_free(source->types); + free(source); + + wl_data_device_set_user_data(data_dev, NULL); + } +} + +static void +_ecore_wl_mouse_move_send(uint32_t timestamp) +{ + Ecore_Event_Mouse_Move *ev; + +// if (!_ecore_wl_input_surface) return; + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Move)))) return; + + ev->timestamp = timestamp; + ev->x = _ecore_wl_surface_x; + ev->y = _ecore_wl_surface_y; + ev->root.x = _ecore_wl_screen_x; + ev->root.y = _ecore_wl_screen_y; + ev->modifiers = _ecore_wl_input_modifiers; + + ev->multi.device = 0; + ev->multi.radius = 1; + ev->multi.radius_x = 1; + ev->multi.radius_y = 1; + ev->multi.pressure = 1.0; + ev->multi.angle = 0.0; + ev->multi.x = _ecore_wl_surface_x; + ev->multi.y = _ecore_wl_surface_y; + ev->multi.root.x = _ecore_wl_screen_x; + ev->multi.root.y = _ecore_wl_screen_y; + + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_input_surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL); +} + +static void +_ecore_wl_mouse_out_send(struct wl_surface *surface, uint32_t timestamp) +{ + Ecore_Wl_Event_Mouse_Out *ev; + + if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Mouse_Out)))) return; + + ev->x = _ecore_wl_surface_x; + ev->y = _ecore_wl_surface_y; + ev->root.x = _ecore_wl_screen_x; + ev->root.y = _ecore_wl_screen_y; + ev->modifiers = _ecore_wl_input_modifiers; + ev->time = timestamp; + + if (surface) + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + ev->window = id; + } + + ecore_event_add(ECORE_WL_EVENT_MOUSE_OUT, ev, NULL, NULL); +} + +static void +_ecore_wl_mouse_in_send(struct wl_surface *surface, uint32_t timestamp) +{ + Ecore_Wl_Event_Mouse_In *ev; + + if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Mouse_In)))) return; + + ev->x = _ecore_wl_surface_x; + ev->y = _ecore_wl_surface_y; + ev->root.x = _ecore_wl_screen_x; + ev->root.y = _ecore_wl_screen_y; + ev->modifiers = _ecore_wl_input_modifiers; + ev->time = timestamp; + + if (surface) + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + ev->window = id; + } + + ecore_event_add(ECORE_WL_EVENT_MOUSE_IN, ev, NULL, NULL); +} + +static void +_ecore_wl_mouse_up_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp) +{ + Ecore_Event_Mouse_Button *ev; + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; + + if (button == BTN_LEFT) + ev->buttons = 1; + else if (button == BTN_MIDDLE) + ev->buttons = 2; + else if (button == BTN_RIGHT) + ev->buttons = 3; + + ev->timestamp = timestamp; + ev->x = _ecore_wl_surface_x; + ev->y = _ecore_wl_surface_y; + ev->root.x = _ecore_wl_screen_x; + ev->root.y = _ecore_wl_screen_y; + ev->modifiers = _ecore_wl_input_modifiers; + + /* FIXME: Need to get these from Wayland somehow */ + ev->double_click = 0; + ev->triple_click = 0; + + ev->multi.device = 0; + ev->multi.radius = 1; + ev->multi.radius_x = 1; + ev->multi.radius_y = 1; + ev->multi.pressure = 1.0; + ev->multi.angle = 0.0; + ev->multi.x = _ecore_wl_surface_x; + ev->multi.y = _ecore_wl_surface_y; + ev->multi.root.x = _ecore_wl_screen_x; + ev->multi.root.y = _ecore_wl_screen_y; + + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL); +} + +static void +_ecore_wl_mouse_down_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp) +{ + Ecore_Event_Mouse_Button *ev; + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; + + if (button == BTN_LEFT) + ev->buttons = 1; + else if (button == BTN_MIDDLE) + ev->buttons = 2; + else if (button == BTN_RIGHT) + ev->buttons = 3; + + ev->timestamp = timestamp; + ev->x = _ecore_wl_surface_x; + ev->y = _ecore_wl_surface_y; + ev->root.x = _ecore_wl_screen_x; + ev->root.y = _ecore_wl_screen_y; + ev->modifiers = _ecore_wl_input_modifiers; + + /* FIXME: Need to get these from Wayland somehow */ + ev->double_click = 0; + ev->triple_click = 0; + + ev->multi.device = 0; + ev->multi.radius = 1; + ev->multi.radius_x = 1; + ev->multi.radius_y = 1; + ev->multi.pressure = 1.0; + ev->multi.angle = 0.0; + ev->multi.x = _ecore_wl_surface_x; + ev->multi.y = _ecore_wl_surface_y; + ev->multi.root.x = _ecore_wl_screen_x; + ev->multi.root.y = _ecore_wl_screen_y; + + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL); +} + +static void +_ecore_wl_focus_out_send(struct wl_surface *surface, uint32_t timestamp) +{ + Ecore_Wl_Event_Focus_Out *ev; + + if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Focus_Out)))) return; + ev->time = timestamp; + if (surface) + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + ev->window = id; + } + ecore_event_add(ECORE_WL_EVENT_FOCUS_OUT, ev, NULL, NULL); +} + +static void +_ecore_wl_focus_in_send(struct wl_surface *surface, uint32_t timestamp) +{ + Ecore_Wl_Event_Focus_In *ev; + + if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Focus_In)))) return; + ev->time = timestamp; + if (surface) + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + ev->window = id; + } + ecore_event_add(ECORE_WL_EVENT_FOCUS_IN, ev, NULL, NULL); +} 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 @@ +#ifndef _ECORE_WAYLAND_PRIVATE_H +# define _ECORE_WAYLAND_PRIVATE_H + +# include + +//# define LOGFNS 1 + +# ifdef LOGFNS +# include +# define LOGFN(fl, ln, fn) printf("-ECORE-WL: %25s: %5i - %s\n", fl, ln, fn); +# else +# define LOGFN(fl, ln, fn) +# endif + +extern int _ecore_wl_log_dom; + +# ifdef ECORE_WL_DEFAULT_LOG_COLOR +# undef ECORE_WL_DEFAULT_LOG_COLOR +# endif +# define ECORE_WL_DEFAULT_LOG_COLOR EINA_COLOR_BLUE + +# ifdef ERR +# undef ERR +# endif +# define ERR(...) EINA_LOG_DOM_ERR(_ecore_wl_log_dom, __VA_ARGS__) + +# ifdef DBG +# undef DBG +# endif +# define DBG(...) EINA_LOG_DOM_DBG(_ecore_wl_log_dom, __VA_ARGS__) + +# ifdef INF +# undef INF +# endif +# define INF(...) EINA_LOG_DOM_INFO(_ecore_wl_log_dom, __VA_ARGS__) + +# ifdef WRN +# undef WRN +# endif +# define WRN(...) EINA_LOG_DOM_WARN(_ecore_wl_log_dom, __VA_ARGS__) + +# ifdef CRIT +# undef CRIT +# endif +# define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_wl_log_dom, __VA_ARGS__) + +typedef struct _Ecore_Wl_Dnd_Source +{ + struct wl_data_offer *offer; + int refs; + + Eina_Array *types; + + uint32_t timestamp; + void *data; +} Ecore_Wl_Dnd_Source; + +typedef struct _Ecore_Wl_Dnd_Target +{ + /* NB: These are not the real fields for this structure, + * and it is Bound to change....soon */ + struct wl_data_offer *offer; + int refs; + + Eina_Array *types; + + uint32_t timestamp; + void *data; +} Ecore_Wl_Dnd_Target; + +struct _Ecore_Wl_Drag_Source +{ + struct wl_data_device *data_dev; + struct wl_buffer *buffer; + + int32_t hotspot_x, hotspot_y; + int32_t offset_x, offset_y; + const char *mimetype; + uint32_t timestamp; + void *data; + + struct wl_data_source *data_source; +}; + +#endif -- cgit v1.1