From 07274513e984f0b5544586c74508ccd16e7dcafa Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 13 Jan 2013 17:29:19 +1000 Subject: Remove EFL, since it's been released now. --- .../ecore/src/lib/ecore_wayland/Ecore_Wayland.h | 304 -------- libraries/ecore/src/lib/ecore_wayland/Makefile.am | 33 - libraries/ecore/src/lib/ecore_wayland/Makefile.in | 842 --------------------- libraries/ecore/src/lib/ecore_wayland/ecore_wl.c | 551 -------------- .../ecore/src/lib/ecore_wayland/ecore_wl_dnd.c | 189 ----- .../ecore/src/lib/ecore_wayland/ecore_wl_input.c | 658 ---------------- .../ecore/src/lib/ecore_wayland/ecore_wl_output.c | 79 -- .../ecore/src/lib/ecore_wayland/ecore_wl_private.h | 87 --- .../ecore/src/lib/ecore_wayland/ecore_wl_window.c | 440 ----------- 9 files changed, 3183 deletions(-) delete mode 100644 libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h delete mode 100644 libraries/ecore/src/lib/ecore_wayland/Makefile.am delete mode 100644 libraries/ecore/src/lib/ecore_wayland/Makefile.in delete mode 100644 libraries/ecore/src/lib/ecore_wayland/ecore_wl.c delete mode 100644 libraries/ecore/src/lib/ecore_wayland/ecore_wl_dnd.c delete mode 100644 libraries/ecore/src/lib/ecore_wayland/ecore_wl_input.c delete mode 100644 libraries/ecore/src/lib/ecore_wayland/ecore_wl_output.c delete mode 100644 libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h delete mode 100644 libraries/ecore/src/lib/ecore_wayland/ecore_wl_window.c (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 deleted file mode 100644 index 7dab37c..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h +++ /dev/null @@ -1,304 +0,0 @@ -#ifndef _ECORE_WAYLAND_H_ -# define _ECORE_WAYLAND_H_ - -# define GL_GLEXT_PROTOTYPES - -# include -# include -# include // NB: already includes wayland-client.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 enum _Ecore_Wl_Window_Type Ecore_Wl_Window_Type; -typedef enum _Ecore_Wl_Window_Buffer_Type Ecore_Wl_Window_Buffer_Type; - -typedef struct _Ecore_Wl_Display Ecore_Wl_Display; -typedef struct _Ecore_Wl_Output Ecore_Wl_Output; -typedef struct _Ecore_Wl_Input Ecore_Wl_Input; -# ifndef _ECORE_WAYLAND_WINDOW_PREDEF -typedef struct _Ecore_Wl_Window Ecore_Wl_Window; -# endif -typedef struct _Ecore_Wl_Dnd_Source Ecore_Wl_Dnd_Source; -typedef struct _Ecore_Wl_Dnd_Target Ecore_Wl_Dnd_Target; - -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_Event_Window_Configure Ecore_Wl_Event_Window_Configure; -typedef struct _Ecore_Wl_Event_Dnd_Enter Ecore_Wl_Event_Dnd_Enter; -typedef struct _Ecore_Wl_Event_Dnd_Position Ecore_Wl_Event_Dnd_Position; -typedef struct _Ecore_Wl_Event_Dnd_Leave Ecore_Wl_Event_Dnd_Leave; -typedef struct _Ecore_Wl_Event_Dnd_Drop Ecore_Wl_Event_Dnd_Drop; -typedef struct _Ecore_Wl_Event_Interfaces_Bound Ecore_Wl_Event_Interfaces_Bound; - -enum _Ecore_Wl_Window_Type -{ - ECORE_WL_WINDOW_TYPE_TOPLEVEL, - ECORE_WL_WINDOW_TYPE_FULLSCREEN, - ECORE_WL_WINDOW_TYPE_MAXIMIZED, - ECORE_WL_WINDOW_TYPE_TRANSIENT, - ECORE_WL_WINDOW_TYPE_MENU, - ECORE_WL_WINDOW_TYPE_CUSTOM -}; - -enum _Ecore_Wl_Window_Buffer_Type -{ - ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW, - ECORE_WL_WINDOW_BUFFER_TYPE_EGL_IMAGE, - ECORE_WL_WINDOW_BUFFER_TYPE_SHM -}; - -struct _Ecore_Wl_Display -{ - struct - { - struct wl_display *display; - struct wl_compositor *compositor; - struct wl_shell *shell; - struct wl_shm *shm; - struct wl_data_device_manager *data_device_manager; - } wl; - - struct - { - EGLDisplay display; - EGLConfig rgb_config; - EGLConfig argb_config; - EGLContext rgb_context; - EGLContext argb_context; - } egl; - - int fd; - unsigned int mask; - Ecore_Fd_Handler *fd_hdl; - - struct wl_list inputs; - struct wl_list outputs; - - struct xkb_desc *xkb; - - Ecore_Wl_Output *output; - - PFNEGLCREATEIMAGEKHRPROC create_image; - PFNEGLDESTROYIMAGEKHRPROC destroy_image; - - void (*output_configure)(Ecore_Wl_Output *output, void *data); - void *data; -}; - -struct _Ecore_Wl_Output -{ - Ecore_Wl_Display *display; - struct wl_output *output; - Eina_Rectangle allocation; - struct wl_list link; - - void (*destroy) (Ecore_Wl_Output *output, void *data); - void *data; -}; - -struct _Ecore_Wl_Input -{ - Ecore_Wl_Display *display; - struct wl_input_device *input_device; - struct wl_data_device *data_device; - - Ecore_Wl_Window *pointer_focus; - Ecore_Wl_Window *keyboard_focus; - - unsigned int button; - unsigned int timestamp; - unsigned int modifiers; - int sx, sy; - - struct wl_list link; - - /* TODO: grab */ - unsigned int grab_button; - - Ecore_Wl_Dnd_Source *drag_source; - Ecore_Wl_Dnd_Source *selection_source; -}; - -struct _Ecore_Wl_Window -{ - Ecore_Wl_Display *display; - Ecore_Wl_Window *parent; - - struct wl_surface *surface; - struct wl_shell_surface *shell_surface; - - int id; - int x, y; - int edges; - - Eina_Rectangle allocation, pending_allocation; - Eina_Rectangle saved_allocation, server_allocation; - - /* Eina_Bool redraw_scheduled : 1; */ - /* Eina_Bool resize_scheduled : 1; */ - Eina_Bool transparent : 1; - - Ecore_Wl_Window_Type type; - Ecore_Wl_Window_Buffer_Type buffer_type; - - Ecore_Wl_Input *pointer_device; - Ecore_Wl_Input *keyboard_device; - - void *data; -}; - -struct _Ecore_Wl_Event_Mouse_In -{ - int modifiers; - int x, y; - struct - { - int x, y; - } root; - unsigned int win; - unsigned int event_win; - unsigned int root_win; - unsigned int timestamp; -}; - -struct _Ecore_Wl_Event_Mouse_Out -{ - int modifiers; - int x, y; - struct - { - int x, y; - } root; - unsigned int win; - unsigned int event_win; - unsigned int root_win; - unsigned int timestamp; -}; - -struct _Ecore_Wl_Event_Focus_In -{ - unsigned int win; - unsigned int timestamp; -}; - -struct _Ecore_Wl_Event_Focus_Out -{ - unsigned int win; - unsigned int timestamp; -}; - -struct _Ecore_Wl_Event_Window_Configure -{ - unsigned int win; - unsigned int event_win; - int x, y, w, h; - unsigned int timestamp; -}; - -struct _Ecore_Wl_Event_Dnd_Enter -{ - unsigned int win, source; - char **types; - int num_types; - struct - { - int x, y; - } position; -}; - -struct _Ecore_Wl_Event_Dnd_Position -{ - unsigned int win, source; - struct - { - int x, y; - } position; -}; - -struct _Ecore_Wl_Event_Dnd_Leave -{ - unsigned int win, source; -}; - -struct _Ecore_Wl_Event_Dnd_Drop -{ - unsigned int win, source; - struct - { - int x, y; - } position; -}; - -struct _Ecore_Wl_Event_Interfaces_Bound -{ - Eina_Bool compositor : 1; - Eina_Bool shm : 1; - Eina_Bool shell : 1; -}; - -/** - * @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 - * @li @ref Ecore_Wl_Display_Group - * @li @ref Ecore_Wl_Flush_Group - * @li @ref Ecore_Wl_Window_Group - */ - -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_WINDOW_CONFIGURE; -EAPI extern int ECORE_WL_EVENT_DND_ENTER; -EAPI extern int ECORE_WL_EVENT_DND_POSITION; -EAPI extern int ECORE_WL_EVENT_DND_LEAVE; -EAPI extern int ECORE_WL_EVENT_DND_DROP; -EAPI extern int ECORE_WL_EVENT_INTERFACES_BOUND; - -EAPI int ecore_wl_init(const char *name); -EAPI int ecore_wl_shutdown(void); -EAPI void ecore_wl_flush(void); -EAPI void ecore_wl_sync(void); -EAPI struct wl_shm *ecore_wl_shm_get(void); -EAPI struct wl_display *ecore_wl_display_get(void); -EAPI void ecore_wl_screen_size_get(int *w, int *h); -EAPI void ecore_wl_pointer_xy_get(int *x, int *y); - -EAPI Ecore_Wl_Window *ecore_wl_window_new(Ecore_Wl_Window *parent, int x, int y, int w, int h, int buffer_type); -EAPI void ecore_wl_window_free(Ecore_Wl_Window *win); -EAPI void ecore_wl_window_move(Ecore_Wl_Window *win, int x, int y); -EAPI void ecore_wl_window_resize(Ecore_Wl_Window *win, int w, int h, int location); -EAPI void ecore_wl_window_damage(Ecore_Wl_Window *win, int x, int y, int w, int h); -EAPI void ecore_wl_window_buffer_attach(Ecore_Wl_Window *win, struct wl_buffer *buffer, int x, int y); -EAPI void ecore_wl_window_show(Ecore_Wl_Window *win); -EAPI void ecore_wl_window_hide(Ecore_Wl_Window *win); -EAPI void ecore_wl_window_raise(Ecore_Wl_Window *win); -EAPI void ecore_wl_window_maximized_set(Ecore_Wl_Window *win, Eina_Bool maximized); -EAPI void ecore_wl_window_fullscreen_set(Ecore_Wl_Window *win, Eina_Bool fullscreen); -EAPI void ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h); -EAPI struct wl_surface *ecore_wl_window_surface_get(Ecore_Wl_Window *win); -EAPI Ecore_Wl_Window *ecore_wl_window_find(unsigned int id); - -#endif diff --git a/libraries/ecore/src/lib/ecore_wayland/Makefile.am b/libraries/ecore/src/lib/ecore_wayland/Makefile.am deleted file mode 100644 index f6b801d..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -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_output.c \ -ecore_wl_input.c \ -ecore_wl_window.c \ -ecore_wl_dnd.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 deleted file mode 100644 index 39c633d..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/Makefile.in +++ /dev/null @@ -1,842 +0,0 @@ -# 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/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 = $(install_sh) -d -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 ecore_wl_output.lo \ - ecore_wl_input.lo ecore_wl_window.lo ecore_wl_dnd.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@ -EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ -EXOTIC_LIBS = @EXOTIC_LIBS@ -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@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -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@ -SHM_OPEN_LIBS = @SHM_OPEN_LIBS@ -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 \ -ecore_wl_output.c \ -ecore_wl_input.c \ -ecore_wl_window.c \ -ecore_wl_dnd.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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wl_dnd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wl_input.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wl_output.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wl_window.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 deleted file mode 100644 index 5f1b20d..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c +++ /dev/null @@ -1,551 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -/* FIXME: This gives BTN_LEFT/RIGHT/MIDDLE for linux systems ... - * What about other OSs ?? */ -#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 "Ecore.h" -#include "ecore_private.h" -#include "Ecore_Input.h" -#include "ecore_wl_private.h" -#include "Ecore_Wayland.h" - -/* local function prototypes */ -static Eina_Bool _ecore_wl_shutdown(Eina_Bool close); -static int _ecore_wl_cb_event_mask_update(unsigned int mask, void *data); -static Eina_Bool _ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl __UNUSED__); -static void _ecore_wl_cb_handle_global(struct wl_display *disp, unsigned int id, const char *interface, unsigned int version __UNUSED__, void *data); -static Eina_Bool _ecore_wl_egl_init(Ecore_Wl_Display *ewd); -static Eina_Bool _ecore_wl_egl_shutdown(Ecore_Wl_Display *ewd); -static Eina_Bool _ecore_wl_xkb_init(Ecore_Wl_Display *ewd); -static Eina_Bool _ecore_wl_xkb_shutdown(Ecore_Wl_Display *ewd); - -/* local variables */ -static int _ecore_wl_init_count = 0; - -/* external variables */ -int _ecore_wl_log_dom = -1; -Ecore_Wl_Display *_ecore_wl_disp = NULL; - -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_WINDOW_CONFIGURE = 0; -EAPI int ECORE_WL_EVENT_DND_ENTER = 0; -EAPI int ECORE_WL_EVENT_DND_POSITION = 0; -EAPI int ECORE_WL_EVENT_DND_LEAVE = 0; -EAPI int ECORE_WL_EVENT_DND_DROP = 0; -EAPI int ECORE_WL_EVENT_INTERFACES_BOUND = 0; - -/** - * @defgroup Ecore_Wl_Init_Group Wayland Library Init and Shutdown Functions - * - * Functions that start and shutdown the Ecore Wayland Library. - */ - -/** - * Initialize the Wayland display connection to the given display. - * - * @param name Display target name. if @c NULL, the default display is - * assumed. - * @return The number of times the library has been initialized without being - * shut down. 0 is returned if an error occurs. - * - * @ingroup Ecore_Wl_Init_Group - */ -EAPI int -ecore_wl_init(const char *name) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (++_ecore_wl_init_count != 1) return _ecore_wl_init_count; - - 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()) - { - ERR("Could not initialize ecore"); - eina_log_domain_unregister(_ecore_wl_log_dom); - _ecore_wl_log_dom = -1; - eina_shutdown(); - return --_ecore_wl_init_count; - } - - if (!ecore_event_init()) - { - ERR("Could not initialize ecore_event"); - 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_WINDOW_CONFIGURE = ecore_event_type_new(); - ECORE_WL_EVENT_DND_ENTER = ecore_event_type_new(); - ECORE_WL_EVENT_DND_POSITION = ecore_event_type_new(); - ECORE_WL_EVENT_DND_LEAVE = ecore_event_type_new(); - ECORE_WL_EVENT_DND_DROP = ecore_event_type_new(); - ECORE_WL_EVENT_INTERFACES_BOUND = ecore_event_type_new(); - } - - if (!(_ecore_wl_disp = malloc(sizeof(Ecore_Wl_Display)))) - { - ERR("Could not allocate memory for Ecore_Wl_Display structure"); - 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; - } - - memset(_ecore_wl_disp, 0, sizeof(Ecore_Wl_Display)); - - if (!(_ecore_wl_disp->wl.display = wl_display_connect(name))) - { - ERR("Could not connect to Wayland display"); - 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; - } - - _ecore_wl_disp->fd = - wl_display_get_fd(_ecore_wl_disp->wl.display, - _ecore_wl_cb_event_mask_update, _ecore_wl_disp); - - _ecore_wl_disp->fd_hdl = - ecore_main_fd_handler_add(_ecore_wl_disp->fd, ECORE_FD_READ, - _ecore_wl_cb_handle_data, _ecore_wl_disp, - NULL, NULL); - - wl_list_init(&_ecore_wl_disp->inputs); - wl_list_init(&_ecore_wl_disp->outputs); - - wl_display_add_global_listener(_ecore_wl_disp->wl.display, - _ecore_wl_cb_handle_global, _ecore_wl_disp); - - /* FIXME: Process connection events ?? */ - wl_display_iterate(_ecore_wl_disp->wl.display, WL_DISPLAY_READABLE); - - /* if (!_ecore_wl_egl_init(_ecore_wl_disp)) */ - /* { */ - /* ERR("Could not initialize EGL"); */ - /* free(_ecore_wl_disp); */ - /* 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; */ - /* } */ - - /* _ecore_wl_disp->create_image = */ - /* (void *)eglGetProcAddress("eglCreateImageKHR"); */ - /* _ecore_wl_disp->destroy_image = */ - /* (void *)eglGetProcAddress("eglDestroyImageKHR"); */ - - /* TODO: create pointer surfaces */ - - if (!_ecore_wl_xkb_init(_ecore_wl_disp)) - { - ERR("Could not initialize XKB"); - _ecore_wl_egl_shutdown(_ecore_wl_disp); - free(_ecore_wl_disp); - 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; - } - - _ecore_wl_window_init(); - - return _ecore_wl_init_count; -} - -/** - * Shuts down the Ecore Wayland Library - * - * In shutting down the library, the Wayland display connection is terminated - * and any event handlers for it are removed. - * - * @return The number of times the library has been initialized without - * being shut down. - * - * @ingroup Ecore_Wl_Init_Group - */ -EAPI int -ecore_wl_shutdown(void) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - return _ecore_wl_shutdown(EINA_TRUE); -} - -/** - * @defgroup Ecore_Wl_Flush_Group Wayland Synchronization Functions - * - * Functions that ensure that all commands which have been issued by the - * Ecore Wayland library have been sent to the server. - */ - -/** - * Sends all Wayland commands to the Wayland Display. - * - * @ingroup Ecore_Wl_Flush_Group - * @since 1.2 - */ -EAPI void -ecore_wl_flush(void) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - while (_ecore_wl_disp->mask & WL_DISPLAY_WRITABLE) - wl_display_iterate(_ecore_wl_disp->wl.display, WL_DISPLAY_WRITABLE); -// wl_display_flush(_ecore_wl_disp->wl.display); // old flush code -} - -/** - * Flushes the command buffer and waits until all requests have been - * processed by the server. - * - * @ingroup Ecore_Wl_Flush_Group - * @since 1.2 - */ -EAPI void -ecore_wl_sync(void) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - wl_display_roundtrip(_ecore_wl_disp->wl.display); - // old sync code -// wl_display_iterate(_ecore_wl_disp->wl.display, WL_DISPLAY_READABLE); -} - -/** - * @defgroup Ecore_Wl_Display_Group Wayland Display Functions - * - * Functions that set and retrieve various information about the Wayland Display. - */ - -/** - * Retrieves the Wayland Shm Interface used for the current Wayland connection. - * - * @return The current wayland shm interface - * - * @ingroup Ecore_Wl_Display_Group - * @since 1.2 - */ -EAPI struct wl_shm * -ecore_wl_shm_get(void) -{ - return _ecore_wl_disp->wl.shm; -} - -/** - * Retrieves the Wayland Display Interface used for the current Wayland connection. - * - * @return The current wayland display interface - * - * @ingroup Ecore_Wl_Display_Group - * @since 1.2 - */ -EAPI struct wl_display * -ecore_wl_display_get(void) -{ - return _ecore_wl_disp->wl.display; -} - -/** - * Retrieves the size of the current screen. - * - * @param w where to return the width. May be NULL. Returns 0 on error. - * @param h where to return the height. May be NULL. Returns 0 on error. - * - * @ingroup Ecore_Wl_Display_Group - * @since 1.2 - */ -EAPI void -ecore_wl_screen_size_get(int *w, int *h) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (w) *w = _ecore_wl_disp->output->allocation.w; - if (h) *h = _ecore_wl_disp->output->allocation.h; -} - -/* @since 1.2 */ -EAPI void -ecore_wl_pointer_xy_get(int *x, int *y) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - _ecore_wl_input_pointer_xy_get(x, y); -} - -/* local functions */ -static Eina_Bool -_ecore_wl_shutdown(Eina_Bool close) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (--_ecore_wl_init_count != 0) return _ecore_wl_init_count; - if (!_ecore_wl_disp) return _ecore_wl_init_count; - - _ecore_wl_window_shutdown(); - - if (_ecore_wl_disp->fd_hdl) - ecore_main_fd_handler_del(_ecore_wl_disp->fd_hdl); - - if (close) - { - Ecore_Wl_Output *out, *tout; - Ecore_Wl_Input *in, *tin; - - wl_list_for_each_safe(out, tout, &_ecore_wl_disp->outputs, link) - _ecore_wl_output_del(out); - - wl_list_for_each_safe(in, tin, &_ecore_wl_disp->inputs, link) - _ecore_wl_input_del(in); - - _ecore_wl_xkb_shutdown(_ecore_wl_disp); - /* _ecore_wl_egl_shutdown(_ecore_wl_disp); */ - - if (_ecore_wl_disp->wl.shell) - wl_shell_destroy(_ecore_wl_disp->wl.shell); - if (_ecore_wl_disp->wl.shm) wl_shm_destroy(_ecore_wl_disp->wl.shm); - if (_ecore_wl_disp->wl.data_device_manager) - wl_data_device_manager_destroy(_ecore_wl_disp->wl.data_device_manager); - if (_ecore_wl_disp->wl.compositor) - wl_compositor_destroy(_ecore_wl_disp->wl.compositor); - if (_ecore_wl_disp->wl.display) - { - wl_display_flush(_ecore_wl_disp->wl.display); - wl_display_disconnect(_ecore_wl_disp->wl.display); - } - free(_ecore_wl_disp); - } - - ecore_event_shutdown(); - ecore_shutdown(); - - eina_log_domain_unregister(_ecore_wl_log_dom); - _ecore_wl_log_dom = -1; - eina_shutdown(); - - return _ecore_wl_init_count; -} - -static int -_ecore_wl_cb_event_mask_update(unsigned int mask, void *data) -{ - Ecore_Wl_Display *ewd; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - ewd = data; - ewd->mask = mask; - return 0; -} - -static Eina_Bool -_ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl __UNUSED__) -{ - Ecore_Wl_Display *ewd; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(ewd = data)) return ECORE_CALLBACK_RENEW; - wl_display_iterate(ewd->wl.display, ewd->mask); - return ECORE_CALLBACK_RENEW; -} - -static void -_ecore_wl_cb_handle_global(struct wl_display *disp, unsigned int id, const char *interface, unsigned int version __UNUSED__, void *data) -{ - Ecore_Wl_Display *ewd; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if ((!strcmp(interface, "wl_display")) || - (!strcmp(interface, "wl_drm")) || - (!strcmp(interface, "desktop_shell"))) - return; - - ewd = data; - - if (!strcmp(interface, "wl_compositor")) - ewd->wl.compositor = wl_display_bind(disp, id, &wl_compositor_interface); - else if (!strcmp(interface, "wl_output")) - _ecore_wl_output_add(ewd, id); - else if (!strcmp(interface, "wl_input_device")) - _ecore_wl_input_add(ewd, id); - else if (!strcmp(interface, "wl_shell")) - ewd->wl.shell = wl_display_bind(disp, id, &wl_shell_interface); - else if (!strcmp(interface, "wl_shm")) - ewd->wl.shm = wl_display_bind(disp, id, &wl_shm_interface); - else if (!strcmp(interface, "wl_data_device_manager")) - { - ewd->wl.data_device_manager = - wl_display_bind(disp, id, &wl_data_device_manager_interface); - } - - if ((ewd->wl.compositor) && (ewd->wl.shm) && (ewd->wl.shell)) - { - Ecore_Wl_Event_Interfaces_Bound *ev; - - if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Interfaces_Bound)))) - return; - - ev->compositor = (ewd->wl.compositor != NULL); - ev->shm = (ewd->wl.shm != NULL); - ev->shell = (ewd->wl.shell != NULL); - - ecore_event_add(ECORE_WL_EVENT_INTERFACES_BOUND, ev, NULL, NULL); - } -} - -static Eina_Bool -_ecore_wl_egl_init(Ecore_Wl_Display *ewd) -{ - EGLint major, minor, n; - static const EGLint context_attribs[] = - { - EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE - }; - static const EGLint argb_attribs[] = - { - EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, - EGL_ALPHA_SIZE, 1, EGL_DEPTH_SIZE, 0, EGL_STENCIL_SIZE, 0, - EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_SURFACE_TYPE, - EGL_WINDOW_BIT, EGL_NONE - }; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - ewd->egl.display = eglGetDisplay(ewd->wl.display); - if (!eglInitialize(ewd->egl.display, &major, &minor)) - { - ERR("Failed to initialize EGL display"); - return EINA_FALSE; - } - - if (!eglBindAPI(EGL_OPENGL_ES_API)) - { - ERR("Failed to bind EGL Api"); - return EINA_FALSE; - } - - if ((!eglChooseConfig(ewd->egl.display, argb_attribs, &ewd->egl.argb_config, - 1, &n)) || (n == 0)) - { - ERR("Failed to choose ARGB config"); - return EINA_FALSE; - } - - ewd->egl.argb_context = - eglCreateContext(ewd->egl.display, ewd->egl.argb_config, - EGL_NO_CONTEXT, context_attribs); - if (!ewd->egl.argb_context) - { - ERR("Failed to create ARGB context"); - return EINA_FALSE; - } - - if (!eglMakeCurrent(ewd->egl.display, EGL_NO_SURFACE, - EGL_NO_SURFACE, ewd->egl.argb_context)) - { - ERR("Failed to make ARGB context current"); - return EINA_FALSE; - } - - return EINA_TRUE; -} - -static Eina_Bool -_ecore_wl_egl_shutdown(Ecore_Wl_Display *ewd) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - eglMakeCurrent(ewd->egl.display, - EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - - eglDestroyContext(ewd->egl.display, ewd->egl.argb_context); - - /* NB: This is hanging when we run elm apps as wayland clients - * inside the weston compositor */ - - /* printf("Egl Terminate\n"); */ - /* eglTerminate(ewd->egl.display); */ - /* printf("Egl Terminate Done\n"); */ - - eglReleaseThread(); - - return EINA_TRUE; -} - -static Eina_Bool -_ecore_wl_xkb_init(Ecore_Wl_Display *ewd) -{ - struct xkb_rule_names names; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - names.rules = "evdev"; - names.model = "evdev"; - names.layout = "us"; - names.variant = ""; - names.options = ""; - - if (!(ewd->xkb = xkb_compile_keymap_from_rules(&names))) - { - ERR("Failed to compile keymap"); - return EINA_FALSE; - } - - return EINA_TRUE; -} - -static Eina_Bool -_ecore_wl_xkb_shutdown(Ecore_Wl_Display *ewd) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (ewd->xkb) xkb_free_keymap(ewd->xkb); - return EINA_TRUE; -} diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_dnd.c b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_dnd.c deleted file mode 100644 index 5d81225..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_dnd.c +++ /dev/null @@ -1,189 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "Ecore.h" -#include "ecore_private.h" -#include "ecore_wl_private.h" -#include "Ecore_Wayland.h" - -/* local function prototypes */ -static void _ecore_wl_dnd_offer(void *data, struct wl_data_offer *wl_data_offer __UNUSED__, const char *type); -static void _ecore_wl_dnd_cb_enter_free(void *data __UNUSED__, void *event); - -/* wayland listeners */ -static const struct wl_data_offer_listener _ecore_wl_data_offer_listener = -{ - _ecore_wl_dnd_offer, -}; - -void -_ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device, unsigned int id) -{ - Ecore_Wl_Dnd_Source *source; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(source = malloc(sizeof(Ecore_Wl_Dnd_Source)))) return; - wl_array_init(&source->types); - source->refcount = 1; - source->input = input; - /* FIXME: Change this when wayland has typesafe wrapper for it */ - source->offer = (struct wl_data_offer *) - wl_proxy_create_for_id((struct wl_proxy *)data_device, - id, &wl_data_offer_interface); - wl_data_offer_add_listener(source->offer, - &_ecore_wl_data_offer_listener, source); -} - -void -_ecore_wl_dnd_enter(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, struct wl_surface *surface, int x, int y, struct wl_data_offer *offer) -{ - Ecore_Wl_Event_Dnd_Enter *event; - Ecore_Wl_Input *input; - Ecore_Wl_Window *win; - char **p; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - - input->drag_source = wl_data_offer_get_user_data(offer); - - win = wl_surface_get_user_data(surface); -// input->pointer_focus = win; - - p = wl_array_add(&input->drag_source->types, sizeof(*p)); - *p = NULL; - - if (!(event = calloc(1, sizeof(Ecore_Wl_Event_Dnd_Enter)))) return; - - event->win = win->id; - event->source = input->drag_source->input->keyboard_focus->id; - event->position.x = x; - event->position.y = y; - event->num_types = input->drag_source->types.size; - event->types = input->drag_source->types.data; - - ecore_event_add(ECORE_WL_EVENT_DND_ENTER, event, - _ecore_wl_dnd_cb_enter_free, NULL); -} - -void -_ecore_wl_dnd_leave(void *data, struct wl_data_device *data_device __UNUSED__) -{ - Ecore_Wl_Input *input; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - _ecore_wl_dnd_del(input->drag_source); - input->drag_source = NULL; -} - -void -_ecore_wl_dnd_motion(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, int x, int y) -{ - Ecore_Wl_Event_Dnd_Position *event; - Ecore_Wl_Input *input; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - - input->sx = x; - input->sy = y; - - if (!(event = calloc(1, sizeof(Ecore_Wl_Event_Dnd_Position)))) return; - - event->win = input->drag_source->input->pointer_focus->id; - event->source = input->drag_source->input->keyboard_focus->id; - event->position.x = x; - event->position.y = y; - - ecore_event_add(ECORE_WL_EVENT_DND_POSITION, event, NULL, NULL); -} - -void -_ecore_wl_dnd_drop(void *data, struct wl_data_device *data_device __UNUSED__) -{ - Ecore_Wl_Event_Dnd_Drop *event; - Ecore_Wl_Input *input; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - - if (!(event = calloc(1, sizeof(Ecore_Wl_Event_Dnd_Drop)))) return; - - event->win = input->drag_source->input->pointer_focus->id; - event->source = input->drag_source->input->keyboard_focus->id; - event->position.x = input->sx; - event->position.y = input->sy; - - ecore_event_add(ECORE_WL_EVENT_DND_DROP, event, NULL, NULL); -} - -void -_ecore_wl_dnd_selection(void *data, struct wl_data_device *data_device __UNUSED__, struct wl_data_offer *offer) -{ - Ecore_Wl_Input *input; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - if (input->selection_source) _ecore_wl_dnd_del(input->selection_source); - input->selection_source = NULL; - if (offer) - { - char **p; - - input->selection_source = wl_data_offer_get_user_data(offer); - p = wl_array_add(&input->selection_source->types, sizeof(*p)); - *p = NULL; - } -} - -void -_ecore_wl_dnd_del(Ecore_Wl_Dnd_Source *source) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!source) return; - source->refcount--; - if (source->refcount == 0) - { - char **p; - - wl_data_offer_destroy(source->offer); - for (p = source->types.data; *p; p++) - free(*p); - wl_array_release(&source->types); - free(source); - } -} - -/* local functions */ -static void -_ecore_wl_dnd_offer(void *data, struct wl_data_offer *wl_data_offer __UNUSED__, const char *type) -{ - Ecore_Wl_Dnd_Source *source; - char **p; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(source = data)) return; - p = wl_array_add(&source->types, sizeof(*p)); - *p = strdup(type); -} - -static void -_ecore_wl_dnd_cb_enter_free(void *data __UNUSED__, void *event) -{ - Ecore_Wl_Event_Dnd_Enter *ev; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(ev = event)) return; - free(ev); -} diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_input.c b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_input.c deleted file mode 100644 index d44daa7..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_input.c +++ /dev/null @@ -1,658 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#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 ?? */ -#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 - -/* local function prototypes */ -static void _ecore_wl_input_cb_motion(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int sx, int sy); -static void _ecore_wl_input_cb_button(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, unsigned int button, unsigned int state); -static void _ecore_wl_input_cb_key(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp __UNUSED__, unsigned int key, unsigned int state); -static void _ecore_wl_input_cb_pointer_enter(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface, int sx, int sy); -static void _ecore_wl_input_cb_pointer_leave(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__); -static void _ecore_wl_input_cb_keyboard_enter(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface, struct wl_array *keys); -static void _ecore_wl_input_cb_keyboard_leave(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__); -static void _ecore_wl_input_cb_touch_down(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__, int id __UNUSED__, int x, int y); -static void _ecore_wl_input_cb_touch_up(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int id __UNUSED__); -static void _ecore_wl_input_cb_touch_motion(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int id __UNUSED__, int x, int y); -static void _ecore_wl_input_cb_touch_frame(void *data __UNUSED__, struct wl_input_device *input_device __UNUSED__); -static void _ecore_wl_input_cb_touch_cancel(void *data __UNUSED__, struct wl_input_device *input_device __UNUSED__); -static void _ecore_wl_input_cb_data_offer(void *data, struct wl_data_device *data_device, unsigned int id); -static void _ecore_wl_input_cb_data_enter(void *data, struct wl_data_device *data_device, unsigned int timestamp, struct wl_surface *surface, int x, int y, struct wl_data_offer *offer); -static void _ecore_wl_input_cb_data_leave(void *data, struct wl_data_device *data_device); -static void _ecore_wl_input_cb_data_motion(void *data, struct wl_data_device *data_device, unsigned int timestamp, int x, int y); -static void _ecore_wl_input_cb_data_drop(void *data, struct wl_data_device *data_device); -static void _ecore_wl_input_cb_data_selection(void *data, struct wl_data_device *data_device, struct wl_data_offer *offer); - -static void _ecore_wl_input_keyboard_focus_remove(Ecore_Wl_Input *input, unsigned int timestamp); -static void _ecore_wl_input_pointer_focus_remove(Ecore_Wl_Input *input, unsigned int timestamp); -static void _ecore_wl_input_mouse_move_send(Ecore_Wl_Input *input, unsigned int timestamp); -static void _ecore_wl_input_cb_mouse_move_free(void *data __UNUSED__, void *event); -static void _ecore_wl_input_mouse_in_send(Ecore_Wl_Input *input, unsigned int timestamp); -static void _ecore_wl_input_mouse_out_send(Ecore_Wl_Input *input, unsigned int timestamp); -static void _ecore_wl_input_focus_in_send(Ecore_Wl_Input *input, unsigned int timestamp); -static void _ecore_wl_input_focus_out_send(Ecore_Wl_Input *input, unsigned int timestamp); -static void _ecore_wl_input_mouse_down_send(Ecore_Wl_Input *input, unsigned int timestamp); -static void _ecore_wl_input_mouse_up_send(Ecore_Wl_Input *input, unsigned int timestamp); - -/* wayland interfaces */ -static const struct wl_input_device_listener _ecore_wl_input_listener = -{ - _ecore_wl_input_cb_motion, - _ecore_wl_input_cb_button, - _ecore_wl_input_cb_key, - _ecore_wl_input_cb_pointer_enter, - _ecore_wl_input_cb_pointer_leave, - _ecore_wl_input_cb_keyboard_enter, - _ecore_wl_input_cb_keyboard_leave, - _ecore_wl_input_cb_touch_down, - _ecore_wl_input_cb_touch_up, - _ecore_wl_input_cb_touch_motion, - _ecore_wl_input_cb_touch_frame, - _ecore_wl_input_cb_touch_cancel -}; - -static const struct wl_data_device_listener _ecore_wl_data_listener = -{ - _ecore_wl_input_cb_data_offer, - _ecore_wl_input_cb_data_enter, - _ecore_wl_input_cb_data_leave, - _ecore_wl_input_cb_data_motion, - _ecore_wl_input_cb_data_drop, - _ecore_wl_input_cb_data_selection -}; - -/* local variables */ -static int _pointer_x, _pointer_y; - -void -_ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id) -{ - Ecore_Wl_Input *input; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = malloc(sizeof(Ecore_Wl_Input)))) return; - - memset(input, 0, sizeof(Ecore_Wl_Input)); - - input->display = ewd; - input->pointer_focus = NULL; - input->keyboard_focus = NULL; - - input->input_device = - wl_display_bind(ewd->wl.display, id, &wl_input_device_interface); - wl_list_insert(ewd->inputs.prev, &input->link); - wl_input_device_add_listener(input->input_device, - &_ecore_wl_input_listener, input); - wl_input_device_set_user_data(input->input_device, input); - - input->data_device = - wl_data_device_manager_get_data_device(ewd->wl.data_device_manager, - input->input_device); - wl_data_device_add_listener(input->data_device, - &_ecore_wl_data_listener, input); -} - -void -_ecore_wl_input_del(Ecore_Wl_Input *input) -{ - if (!input) return; - - _ecore_wl_input_keyboard_focus_remove(input, 0); - _ecore_wl_input_pointer_focus_remove(input, 0); - - if (input->drag_source) _ecore_wl_dnd_del(input->drag_source); - input->drag_source = NULL; - - if (input->selection_source) _ecore_wl_dnd_del(input->selection_source); - input->selection_source = NULL; - - if (input->data_device) wl_data_device_destroy(input->data_device); - if (input->input_device) wl_input_device_destroy(input->input_device); - wl_list_remove(&input->link); - free(input); -} - -void -_ecore_wl_input_pointer_xy_get(int *x, int *y) -{ - if (x) *x = _pointer_x; - if (y) *y = _pointer_y; -} - -/* local functions */ -static void -_ecore_wl_input_cb_motion(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int sx, int sy) -{ - Ecore_Wl_Input *input; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - - _pointer_x = sx; - _pointer_y = sy; - - input->sx = sx; - input->sy = sy; - - /* TODO: FIXME: NB: Weston window code has set pointer image here also */ - _ecore_wl_input_mouse_move_send(input, timestamp); -} - -static void -_ecore_wl_input_cb_button(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, unsigned int button, unsigned int state) -{ - Ecore_Wl_Input *input; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - - input->timestamp = timestamp; - - _ecore_wl_input_mouse_move_send(input, timestamp); - - if ((button >= BTN_SIDE) && (button <= BTN_BACK)) - { - /* TODO: raise mouse wheel */ - printf("Raise Mouse Wheel Event\n"); - } - else - { - if (state) - { - input->button = button; - _ecore_wl_input_mouse_down_send(input, timestamp); - } - else - { - _ecore_wl_input_mouse_up_send(input, timestamp); - input->button = 0; - } - } -} - -static void -_ecore_wl_input_cb_key(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp __UNUSED__, unsigned int key, unsigned int state) -{ - Ecore_Wl_Input *input; - Ecore_Wl_Window *win; - unsigned int keycode = 0; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - - win = input->keyboard_focus; - if ((!win) || (win->keyboard_device != input)) return; - - /* FIXME: NB: I believe this should be min_key_code rather than 8, - * but weston code has it like this */ - keycode = key + 8; - - /* if ((input->modifiers & XKB_COMMON_SHIFT_MASK) && */ - /* (XkbKeyGroupWidth(_ecore_wl_disp->xkb, keycode, 0) > 1)) */ - /* level = 1; */ - /* keysym = XkbKeySymEntry(_ecore_wl_disp->xkb, keycode, level, 0); */ - - if (state) - input->modifiers |= _ecore_wl_disp->xkb->map->modmap[keycode]; - else - input->modifiers &= ~_ecore_wl_disp->xkb->map->modmap[keycode]; -} - -static void -_ecore_wl_input_cb_pointer_enter(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface, int sx, int sy) -{ - Ecore_Wl_Input *input; - Ecore_Wl_Window *win = NULL; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - - input->sx = sx; - input->sy = sy; - - _ecore_wl_input_mouse_move_send(input, timestamp); - - win = input->pointer_focus; - if ((win) && (win->surface != surface)) - { - if (!input->button) - _ecore_wl_input_pointer_focus_remove(input, timestamp); - } - - if (surface) - { - if ((win = wl_surface_get_user_data(surface))) - { - input->pointer_focus = win; - win->pointer_device = input; - } - if (input->button) - { - _ecore_wl_input_mouse_up_send(input, timestamp); - input->button = 0; - } - else - _ecore_wl_input_mouse_in_send(input, timestamp); - } -} - -static void -_ecore_wl_input_cb_pointer_leave(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__) -{ - Ecore_Wl_Input *input; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - _ecore_wl_input_pointer_focus_remove(input, timestamp); -} - -static void -_ecore_wl_input_cb_keyboard_enter(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface, struct wl_array *keys) -{ - Ecore_Wl_Input *input; - Ecore_Wl_Window *win = NULL; - unsigned int *k, *end; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - - end = keys->data + keys->size; - input->modifiers = 0; - for (k = keys->data; k < end; k++) - input->modifiers |= _ecore_wl_disp->xkb->map->modmap[*k]; - - if (surface) - { - if ((win = wl_surface_get_user_data(surface))) - { - input->keyboard_focus = win; - win->keyboard_device = input; - } - else - input->keyboard_focus = NULL; - _ecore_wl_input_focus_in_send(input, timestamp); - } -} - -static void -_ecore_wl_input_cb_keyboard_leave(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__) -{ - Ecore_Wl_Input *input; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - _ecore_wl_input_keyboard_focus_remove(input, timestamp); -} - -static void -_ecore_wl_input_cb_touch_down(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, struct wl_surface *surface __UNUSED__, int id __UNUSED__, int x, int y) -{ - Ecore_Wl_Input *input; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - - /* FIXME: NB: Not sure yet if input->timestamp should be set here. - * This needs to be tested with an actual touch device */ - /* input->timestamp = timestamp; */ - input->button = 0; - input->sx = x; - input->sy = y; - _ecore_wl_input_mouse_down_send(input, timestamp); -} - -static void -_ecore_wl_input_cb_touch_up(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int id __UNUSED__) -{ - Ecore_Wl_Input *input; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - - /* FIXME: NB: Not sure yet if input->timestamp should be set here. - * This needs to be tested with an actual touch device */ - /* input->timestamp = timestamp; */ - input->button = 0; - _ecore_wl_input_mouse_up_send(input, timestamp); -} - -static void -_ecore_wl_input_cb_touch_motion(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int id __UNUSED__, int x, int y) -{ - Ecore_Wl_Input *input; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(input = data)) return; - - /* FIXME: NB: Not sure yet if input->timestamp should be set here. - * This needs to be tested with an actual touch device */ - /* input->timestamp = timestamp; */ - input->sx = x; - input->sy = y; - - _ecore_wl_input_mouse_move_send(input, timestamp); -} - -static void -_ecore_wl_input_cb_touch_frame(void *data __UNUSED__, struct wl_input_device *input_device __UNUSED__) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); -} - -static void -_ecore_wl_input_cb_touch_cancel(void *data __UNUSED__, struct wl_input_device *input_device __UNUSED__) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); -} - -static void -_ecore_wl_input_cb_data_offer(void *data, struct wl_data_device *data_device, unsigned int id) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - _ecore_wl_dnd_add(data, data_device, id); -} - -static void -_ecore_wl_input_cb_data_enter(void *data, struct wl_data_device *data_device, unsigned int timestamp, struct wl_surface *surface, int x, int y, struct wl_data_offer *offer) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - _ecore_wl_dnd_enter(data, data_device, timestamp, surface, x, y, offer); -} - -static void -_ecore_wl_input_cb_data_leave(void *data, struct wl_data_device *data_device) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - _ecore_wl_dnd_leave(data, data_device); -} - -static void -_ecore_wl_input_cb_data_motion(void *data, struct wl_data_device *data_device, unsigned int timestamp, int x, int y) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - _ecore_wl_dnd_motion(data, data_device, timestamp, x, y); -} - -static void -_ecore_wl_input_cb_data_drop(void *data, struct wl_data_device *data_device) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - _ecore_wl_dnd_drop(data, data_device); -} - -static void -_ecore_wl_input_cb_data_selection(void *data, struct wl_data_device *data_device, struct wl_data_offer *offer) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - _ecore_wl_dnd_selection(data, data_device, offer); -} - -static void -_ecore_wl_input_keyboard_focus_remove(Ecore_Wl_Input *input, unsigned int timestamp) -{ - Ecore_Wl_Window *win; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - _ecore_wl_input_focus_out_send(input, timestamp); - if ((win = input->keyboard_focus)) - win->keyboard_device = NULL; - input->keyboard_focus = NULL; -} - -static void -_ecore_wl_input_pointer_focus_remove(Ecore_Wl_Input *input, unsigned int timestamp) -{ - Ecore_Wl_Window *win; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!input->button) - _ecore_wl_input_mouse_out_send(input, timestamp); - - if ((win = input->pointer_focus)) - win->pointer_device = NULL; - input->pointer_focus = NULL; -} - -static void -_ecore_wl_input_mouse_move_send(Ecore_Wl_Input *input, unsigned int timestamp) -{ - Ecore_Event_Mouse_Move *ev; - Ecore_Event *event; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Move)))) return; - - ev->timestamp = timestamp; - ev->x = input->sx; - ev->y = input->sy; - ev->modifiers = 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 = input->sx; - ev->multi.y = input->sy; - - if (input->pointer_focus) - { - ev->window = input->pointer_focus->id; - ev->event_window = input->pointer_focus->id; - } - - event = ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, - _ecore_wl_input_cb_mouse_move_free, NULL); -} - -static void -_ecore_wl_input_cb_mouse_move_free(void *data __UNUSED__, void *event) -{ - Ecore_Event_Mouse_Move *ev; - - if ((ev = event)) free(ev); -} - -static void -_ecore_wl_input_mouse_in_send(Ecore_Wl_Input *input, unsigned int timestamp) -{ - Ecore_Wl_Event_Mouse_In *ev; - Ecore_Event *event; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Mouse_In)))) return; - - ev->x = input->sx; - ev->y = input->sy; - ev->modifiers = input->modifiers; - ev->timestamp = timestamp; - - if (input->pointer_focus) - { - ev->win = input->pointer_focus->id; - ev->event_win = input->pointer_focus->id; - } - - event = ecore_event_add(ECORE_WL_EVENT_MOUSE_IN, ev, NULL, NULL); -} - -static void -_ecore_wl_input_mouse_out_send(Ecore_Wl_Input *input, unsigned int timestamp) -{ - Ecore_Wl_Event_Mouse_Out *ev; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Mouse_Out)))) return; - - ev->x = input->sx; - ev->y = input->sy; - ev->modifiers = input->modifiers; - ev->timestamp = timestamp; - - if (input->pointer_focus) - { - ev->win = input->pointer_focus->id; - ev->event_win = input->pointer_focus->id; - } - - ecore_event_add(ECORE_WL_EVENT_MOUSE_OUT, ev, NULL, NULL); -} - -static void -_ecore_wl_input_focus_in_send(Ecore_Wl_Input *input, unsigned int timestamp) -{ - Ecore_Wl_Event_Focus_In *ev; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Focus_In)))) return; - ev->timestamp = timestamp; - if (input->keyboard_focus) - ev->win = input->keyboard_focus->id; - ecore_event_add(ECORE_WL_EVENT_FOCUS_IN, ev, NULL, NULL); -} - -static void -_ecore_wl_input_focus_out_send(Ecore_Wl_Input *input, unsigned int timestamp) -{ - Ecore_Wl_Event_Focus_Out *ev; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Focus_Out)))) return; - ev->timestamp = timestamp; - if (input->keyboard_focus) - ev->win = input->keyboard_focus->id; - ecore_event_add(ECORE_WL_EVENT_FOCUS_OUT, ev, NULL, NULL); -} - -static void -_ecore_wl_input_mouse_down_send(Ecore_Wl_Input *input, unsigned int timestamp) -{ - Ecore_Event_Mouse_Button *ev; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; - - if (input->button == BTN_LEFT) - ev->buttons = 1; - else if (input->button == BTN_MIDDLE) - ev->buttons = 2; - else if (input->button == BTN_RIGHT) - ev->buttons = 3; - else - ev->buttons = input->button; - - ev->timestamp = timestamp; - ev->x = input->sx; - ev->y = input->sy; - ev->modifiers = 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 = input->sx; - ev->multi.y = input->sy; - - if (input->pointer_focus) - { - ev->window = input->pointer_focus->id; - ev->event_window = input->pointer_focus->id; - } - - ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL); -} - -static void -_ecore_wl_input_mouse_up_send(Ecore_Wl_Input *input, unsigned int timestamp) -{ - Ecore_Event_Mouse_Button *ev; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; - - if (input->button == BTN_LEFT) - ev->buttons = 1; - else if (input->button == BTN_MIDDLE) - ev->buttons = 2; - else if (input->button == BTN_RIGHT) - ev->buttons = 3; - else - ev->buttons = input->button; - - ev->timestamp = timestamp; - ev->x = input->sx; - ev->y = input->sy; - ev->modifiers = 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 = input->sx; - ev->multi.y = input->sy; - - if (input->pointer_focus) - { - ev->window = input->pointer_focus->id; - ev->event_window = input->pointer_focus->id; - } - - ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL); -} diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_output.c b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_output.c deleted file mode 100644 index 9f540d4..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_output.c +++ /dev/null @@ -1,79 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "Ecore.h" -#include "ecore_private.h" -#include "ecore_wl_private.h" -#include "Ecore_Wayland.h" - -/* local function prototypes */ -static void _ecore_wl_output_cb_geometry(void *data, struct wl_output *wl_output __UNUSED__, int x, int y, int w __UNUSED__, int h __UNUSED__, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__); -static void _ecore_wl_output_cb_mode(void *data, struct wl_output *wl_output __UNUSED__, unsigned int flags, int w, int h, int refresh __UNUSED__); - -/* wayland listeners */ -static const struct wl_output_listener _ecore_wl_output_listener = -{ - _ecore_wl_output_cb_geometry, - _ecore_wl_output_cb_mode -}; - -void -_ecore_wl_output_add(Ecore_Wl_Display *ewd, unsigned int id) -{ - Ecore_Wl_Output *output; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(output = malloc(sizeof(Ecore_Wl_Output)))) return; - - memset(output, 0, sizeof(Ecore_Wl_Output)); - - output->display = ewd; - - output->output = wl_display_bind(ewd->wl.display, id, &wl_output_interface); - wl_list_insert(ewd->outputs.prev, &output->link); - wl_output_add_listener(output->output, &_ecore_wl_output_listener, output); -} - -void -_ecore_wl_output_del(Ecore_Wl_Output *output) -{ - if (!output) return; - if (output->destroy) (*output->destroy)(output, output->data); - if (output->output) wl_output_destroy(output->output); - wl_list_remove(&output->link); - free(output); -} - -/* local functions */ -static void -_ecore_wl_output_cb_geometry(void *data, struct wl_output *wl_output __UNUSED__, int x, int y, int w __UNUSED__, int h __UNUSED__, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__) -{ - Ecore_Wl_Output *output; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - output = data; - output->allocation.x = x; - output->allocation.y = y; -} - -static void -_ecore_wl_output_cb_mode(void *data, struct wl_output *wl_output __UNUSED__, unsigned int flags, int w, int h, int refresh __UNUSED__) -{ - Ecore_Wl_Output *output; - Ecore_Wl_Display *ewd; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - output = data; - ewd = output->display; - if (flags & WL_OUTPUT_MODE_CURRENT) - { - output->allocation.w = w; - output->allocation.h = h; - _ecore_wl_disp->output = output; - if (ewd->output_configure) (*ewd->output_configure)(output, ewd->data); - } -} diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h deleted file mode 100644 index 31956a1..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef _ECORE_WAYLAND_PRIVATE_H -# define _ECORE_WAYLAND_PRIVATE_H - -# include -# include - -# include "Ecore_Wayland.h" - -//# 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; -extern Ecore_Wl_Display *_ecore_wl_disp; - -# 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__) - -struct _Ecore_Wl_Dnd_Source -{ - struct wl_data_offer *offer; - Ecore_Wl_Input *input; - struct wl_array types; - int refcount; - int fd; - int x, y; - - /* TODO: task & data_func */ - void *data; -}; - -struct _Ecore_Wl_Dnd_Target -{ - Ecore_Wl_Dnd_Source *source; -}; - -void _ecore_wl_window_init(void); -void _ecore_wl_window_shutdown(void); - -void _ecore_wl_output_add(Ecore_Wl_Display *ewd, unsigned int id); -void _ecore_wl_output_del(Ecore_Wl_Output *output); - -void _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id); -void _ecore_wl_input_del(Ecore_Wl_Input *input); -void _ecore_wl_input_pointer_xy_get(int *x, int *y); - -void _ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device, unsigned int id); -void _ecore_wl_dnd_enter(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, struct wl_surface *surface, int x, int y, struct wl_data_offer *offer); -void _ecore_wl_dnd_leave(void *data, struct wl_data_device *data_device __UNUSED__); -void _ecore_wl_dnd_motion(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, int x, int y); -void _ecore_wl_dnd_drop(void *data, struct wl_data_device *data_device __UNUSED__); -void _ecore_wl_dnd_selection(void *data, struct wl_data_device *data_device __UNUSED__, struct wl_data_offer *offer); -void _ecore_wl_dnd_del(Ecore_Wl_Dnd_Source *source); - -#endif diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_window.c b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_window.c deleted file mode 100644 index e8a8bfb..0000000 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_window.c +++ /dev/null @@ -1,440 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "Ecore.h" -#include "ecore_private.h" -#include "ecore_wl_private.h" -#include "Ecore_Wayland.h" - -/* local function prototypes */ -static void _ecore_wl_window_cb_configure(void *data, struct wl_shell_surface *shell_surface __UNUSED__, unsigned int timestamp, unsigned int edges, int w, int h); -static void _ecore_wl_window_cb_popup_done(void *data, struct wl_shell_surface *shell_surface __UNUSED__); -static void _ecore_wl_window_configure_send(Ecore_Wl_Window *win, int w, int h, unsigned int timestamp); - -/* local variables */ -static Eina_Hash *_windows = NULL; - -/* wayland listeners */ -static const struct wl_shell_surface_listener _ecore_wl_shell_surface_listener = -{ - _ecore_wl_window_cb_configure, - _ecore_wl_window_cb_popup_done -}; - -/* internal functions */ -void -_ecore_wl_window_init(void) -{ - if (!_windows) _windows = eina_hash_pointer_new(free); -} - -void -_ecore_wl_window_shutdown(void) -{ - eina_hash_free(_windows); - _windows = NULL; -} - -/** - * @defgroup Ecore_Wl_Window_Group Wayland Library Init and Shutdown Functions - * - * Functions that can be used to create a Wayland window. - */ - -/** - * Creates a new window - * - * @param parent The parent window to use. If @p parent is @c 0, the root window - * of the default display is used. - * @param x X Position - * @param y Y position - * @param w Width - * @param h Height - * - * @return The new window - * - * @ingroup Ecore_Wl_Window_Group - * @since 1.2 - */ -EAPI Ecore_Wl_Window * -ecore_wl_window_new(Ecore_Wl_Window *parent, int x, int y, int w, int h, int buffer_type) -{ - Ecore_Wl_Window *win; - static int _win_id = 1; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(win = malloc(sizeof(Ecore_Wl_Window)))) - { - ERR("Failed to allocate an Ecore Wayland Window"); - return NULL; - } - - memset(win, 0, sizeof(Ecore_Wl_Window)); - - win->display = _ecore_wl_disp; - win->parent = parent; - win->allocation.x = x; - win->allocation.y = y; - win->allocation.w = w; - win->allocation.h = h; - win->saved_allocation = win->allocation; - win->transparent = EINA_TRUE; - win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; - win->buffer_type = buffer_type; - win->id = _win_id++; - - eina_hash_add(_windows, &win->id, win); - return win; -} - -/** - * Deletes the given window - * - * @param win The given window - * - * @ingroup Ecore_Wl_Window_Group - * @since 1.2 - */ -EAPI void -ecore_wl_window_free(Ecore_Wl_Window *win) -{ - Ecore_Wl_Input *input; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!win) return; - - eina_hash_del(_windows, &win->id, NULL); - - wl_list_for_each(input, &_ecore_wl_disp->inputs, link) - { - if ((input->pointer_focus) && (input->pointer_focus == win)) - input->pointer_focus = NULL; - if ((input->keyboard_focus) && (input->keyboard_focus == win)) - input->keyboard_focus = NULL; - } - - if (win->shell_surface) wl_shell_surface_destroy(win->shell_surface); - win->shell_surface = NULL; - - if (win->surface) wl_surface_destroy(win->surface); - win->surface = NULL; - -// free(win); -} - -/** - * Signals for Wayland to initiate a window move. - * - * The position requested (@p x, @p y) is not honored by Wayland because - * Wayland does not allow specific window placement to be set. - * - * @param win The window to move. - * @param x X Position - * @param y Y Position - * - * @ingroup Ecore_Wl_Window_Group - * @since 1.2 - */ -EAPI void -ecore_wl_window_move(Ecore_Wl_Window *win, int x, int y) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!win) return; - win->allocation.x = x; - win->allocation.y = y; - if (win->shell_surface) - { - Ecore_Wl_Input *input; - - input = win->keyboard_device; - wl_shell_surface_move(win->shell_surface, input->input_device, - input->timestamp); - } -} - -/** - * Signals for Wayland to initiate a window resize. - * - * The size requested (@p w, @p h) is not honored by Wayland because - * Wayland does not allow specific window sizes to be set. - * - * @param win The window to resize. - * @param w Width - * @param h Height - * @param location The edge of the window from where the resize should start. - * - * @ingroup Ecore_Wl_Window_Group - * @since 1.2 - */ -EAPI void -ecore_wl_window_resize(Ecore_Wl_Window *win, int w, int h, int location) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!win) return; - win->allocation.w = w; - win->allocation.h = h; - if (win->shell_surface) - { - Ecore_Wl_Input *input; - - input = win->keyboard_device; - wl_shell_surface_resize(win->shell_surface, input->input_device, - input->timestamp, location); - } -} - -EAPI void -ecore_wl_window_damage(Ecore_Wl_Window *win, int x, int y, int w, int h) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!win) return; - if (win->surface) - wl_surface_damage(win->surface, x, y, w, h); -} - -EAPI void -ecore_wl_window_buffer_attach(Ecore_Wl_Window *win, struct wl_buffer *buffer, int x, int y) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!win) return; - if ((win->surface) && (buffer)) - wl_surface_attach(win->surface, buffer, x, y); -} - -/** - * Shows a window - * - * Synonymous to "mapping" a window in Wayland System terminology. - * - * @param win The window to show. - * - * @ingroup Ecore_Wl_Window_Group - * @since 1.2 - */ -EAPI void -ecore_wl_window_show(Ecore_Wl_Window *win) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!win) return; - if (win->surface) return; - - win->surface = wl_compositor_create_surface(_ecore_wl_disp->wl.compositor); - wl_surface_set_user_data(win->surface, win); - - win->shell_surface = - wl_shell_get_shell_surface(_ecore_wl_disp->wl.shell, win->surface); - wl_shell_surface_add_listener(win->shell_surface, - &_ecore_wl_shell_surface_listener, win); - - switch (win->type) - { - case ECORE_WL_WINDOW_TYPE_FULLSCREEN: - wl_shell_surface_set_fullscreen(win->shell_surface, - WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, - 0, NULL); - break; - case ECORE_WL_WINDOW_TYPE_MAXIMIZED: - wl_shell_surface_set_maximized(win->shell_surface, NULL); - break; - case ECORE_WL_WINDOW_TYPE_TRANSIENT: - wl_shell_surface_set_transient(win->shell_surface, - win->parent->shell_surface, - win->allocation.x, win->allocation.y, 0); - break; - case ECORE_WL_WINDOW_TYPE_MENU: - wl_shell_surface_set_popup(win->shell_surface, - win->pointer_device->input_device, - win->pointer_device->timestamp, - win->parent->shell_surface, - win->allocation.x, win->allocation.y, 0); - break; - case ECORE_WL_WINDOW_TYPE_TOPLEVEL: - default: - wl_shell_surface_set_toplevel(win->shell_surface); - break; - } -} - -/** - * Hides a window - * - * Synonymous to "unmapping" a window in Wayland System terminology. - * - * @param win The window to hide. - * - * @ingroup Ecore_Wl_Window_Group - * @since 1.2 - */ -EAPI void -ecore_wl_window_hide(Ecore_Wl_Window *win) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!win) return; - if (win->shell_surface) wl_shell_surface_destroy(win->shell_surface); - win->shell_surface = NULL; - if (win->surface) wl_surface_destroy(win->surface); - win->surface = NULL; -} - -/** - * Raises a window - * - * @param win The window to raise. - * - * @ingroup Ecore_Wl_Window_Group - * @since 1.2 - */ -EAPI void -ecore_wl_window_raise(Ecore_Wl_Window *win) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!win) return; - if (win->shell_surface) - wl_shell_surface_set_toplevel(win->shell_surface); -} - -EAPI void -ecore_wl_window_maximized_set(Ecore_Wl_Window *win, Eina_Bool maximized) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!win) return; - if ((win->type == ECORE_WL_WINDOW_TYPE_MAXIMIZED) == maximized) return; - if (win->type == ECORE_WL_WINDOW_TYPE_TOPLEVEL) - { - win->saved_allocation = win->allocation; - if (win->shell_surface) - wl_shell_surface_set_maximized(win->shell_surface, NULL); - win->type = ECORE_WL_WINDOW_TYPE_MAXIMIZED; - } - else - { - Ecore_Wl_Input *input; - - input = win->keyboard_device; - - if (win->shell_surface) - wl_shell_surface_set_toplevel(win->shell_surface); - win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; - win->allocation = win->saved_allocation; - _ecore_wl_window_configure_send(win, win->allocation.w, - win->allocation.h, input->timestamp); - } -} - -EAPI void -ecore_wl_window_fullscreen_set(Ecore_Wl_Window *win, Eina_Bool fullscreen) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!win) return; - if ((win->type == ECORE_WL_WINDOW_TYPE_FULLSCREEN) == fullscreen) return; - if (fullscreen) - { - win->type = ECORE_WL_WINDOW_TYPE_FULLSCREEN; - win->saved_allocation = win->allocation; - if (win->shell_surface) - wl_shell_surface_set_fullscreen(win->shell_surface, - WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, - 0, NULL); - } - else - { - Ecore_Wl_Input *input; - - input = win->keyboard_device; - - if (win->shell_surface) - wl_shell_surface_set_toplevel(win->shell_surface); - win->type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; - win->allocation = win->saved_allocation; - _ecore_wl_window_configure_send(win, win->allocation.w, - win->allocation.h, input->timestamp); - } -} - -EAPI void -ecore_wl_window_update_size(Ecore_Wl_Window *win, int w, int h) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!win) return; - win->allocation.w = w; - win->allocation.h = h; -} - -EAPI struct wl_surface * -ecore_wl_window_surface_get(Ecore_Wl_Window *win) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!win) return NULL; - return win->surface; -} - -EAPI Ecore_Wl_Window * -ecore_wl_window_find(unsigned int id) -{ - Ecore_Wl_Window *win; - - if (!id) return NULL; - win = eina_hash_find(_windows, &id); - if (win) return win; - return NULL; -} - -/* local functions */ -static void -_ecore_wl_window_cb_configure(void *data, struct wl_shell_surface *shell_surface __UNUSED__, unsigned int timestamp, unsigned int edges, int w, int h) -{ - Ecore_Wl_Window *win; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(win = data)) return; - if ((w <= 0) || (h <= 0)) return; - - win->edges = edges; - win->allocation.w = w; - win->allocation.h = h; - _ecore_wl_window_configure_send(win, w, h, timestamp); -} - -static void -_ecore_wl_window_cb_popup_done(void *data, struct wl_shell_surface *shell_surface __UNUSED__) -{ - Ecore_Wl_Window *win; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(win = data)) return; - /* TODO: handle popup destroy */ -} - -static void -_ecore_wl_window_configure_send(Ecore_Wl_Window *win, int w, int h, unsigned int timestamp) -{ - Ecore_Wl_Event_Window_Configure *ev; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Window_Configure)))) return; - ev->win = win->id; - ev->event_win = win->id; - ev->x = win->allocation.x; - ev->y = win->allocation.y; - ev->w = w; - ev->h = h; - ev->timestamp = timestamp; - ecore_event_add(ECORE_WL_EVENT_WINDOW_CONFIGURE, ev, NULL, NULL); -} -- cgit v1.1