From c963d75dfdeec11f82e79e727062fbf89afa2c04 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 22 Apr 2012 09:19:23 +1000 Subject: Update EFL to latest beta. --- libraries/ecore/AUTHORS | 3 + libraries/ecore/ChangeLog | 123 +- libraries/ecore/Makefile.in | 24 +- libraries/ecore/NEWS | 42 +- libraries/ecore/README | 3 +- libraries/ecore/aclocal.m4 | 63 +- libraries/ecore/config.guess | 149 +- libraries/ecore/config.h.in | 9 + libraries/ecore/config.sub | 47 +- libraries/ecore/configure | 3345 ++++++++++---------- libraries/ecore/configure.ac | 295 +- libraries/ecore/doc/Makefile.in | 20 +- libraries/ecore/ecore-win32.pc.in | 2 +- libraries/ecore/ecore.pc.in | 4 +- libraries/ecore/ecore.spec | 2 +- libraries/ecore/ecore.supp | 2 +- libraries/ecore/ltmain.sh | 4 +- libraries/ecore/m4/ecore_check_module.m4 | 6 +- libraries/ecore/m4/ecore_check_options.m4 | 2 +- libraries/ecore/po/cs.gmo | Bin 3004 -> 3004 bytes libraries/ecore/po/cs.po | 80 +- libraries/ecore/po/de.gmo | Bin 3001 -> 3001 bytes libraries/ecore/po/de.po | 80 +- libraries/ecore/po/ecore.pot | 81 +- libraries/ecore/po/el.gmo | Bin 3487 -> 3487 bytes libraries/ecore/po/el.po | 80 +- libraries/ecore/po/fr.gmo | Bin 3199 -> 3199 bytes libraries/ecore/po/fr.po | 80 +- libraries/ecore/po/it.gmo | Bin 2931 -> 2931 bytes libraries/ecore/po/it.po | 80 +- libraries/ecore/po/nl.gmo | Bin 2978 -> 2978 bytes libraries/ecore/po/nl.po | 80 +- libraries/ecore/po/pt.gmo | Bin 3020 -> 3020 bytes libraries/ecore/po/pt.po | 80 +- libraries/ecore/po/sl.gmo | Bin 3015 -> 3015 bytes libraries/ecore/po/sl.po | 80 +- libraries/ecore/src/Makefile.in | 20 +- libraries/ecore/src/bin/Makefile.in | 20 +- libraries/ecore/src/examples/Makefile.in | 20 +- .../ecore/src/examples/ecore_evas_basics_example.c | 5 +- libraries/ecore/src/lib/Makefile.in | 20 +- libraries/ecore/src/lib/ecore/Ecore.h | 896 ++++-- libraries/ecore/src/lib/ecore/Makefile.am | 8 + libraries/ecore/src/lib/ecore/Makefile.in | 33 +- libraries/ecore/src/lib/ecore/ecore.c | 6 +- libraries/ecore/src/lib/ecore/ecore_anim.c | 4 +- libraries/ecore/src/lib/ecore/ecore_events.c | 158 +- libraries/ecore/src/lib/ecore/ecore_exe.c | 10 +- libraries/ecore/src/lib/ecore/ecore_getopt.c | 4 + libraries/ecore/src/lib/ecore/ecore_main.c | 185 +- libraries/ecore/src/lib/ecore/ecore_pipe.c | 17 +- libraries/ecore/src/lib/ecore/ecore_poll.c | 94 - libraries/ecore/src/lib/ecore/ecore_private.h | 6 +- libraries/ecore/src/lib/ecore/ecore_thread.c | 756 +++-- libraries/ecore/src/lib/ecore/ecore_time.c | 6 +- libraries/ecore/src/lib/ecore/ecore_timer.c | 19 +- libraries/ecore/src/lib/ecore_cocoa/Makefile.in | 20 +- libraries/ecore/src/lib/ecore_con/Ecore_Con.h | 81 +- libraries/ecore/src/lib/ecore_con/Makefile.in | 20 +- libraries/ecore/src/lib/ecore_con/ecore_con.c | 23 +- .../ecore/src/lib/ecore_con/ecore_con_private.h | 47 +- .../ecore/src/lib/ecore_con/ecore_con_socks.c | 762 ++++- libraries/ecore/src/lib/ecore_con/ecore_con_ssl.c | 3 + libraries/ecore/src/lib/ecore_con/ecore_con_url.c | 671 ++-- libraries/ecore/src/lib/ecore_config/Makefile.in | 20 +- libraries/ecore/src/lib/ecore_directfb/Makefile.in | 20 +- libraries/ecore/src/lib/ecore_evas/Ecore_Evas.h | 256 +- libraries/ecore/src/lib/ecore_evas/Makefile.am | 1 + libraries/ecore/src/lib/ecore_evas/Makefile.in | 21 +- libraries/ecore/src/lib/ecore_evas/ecore_evas.c | 252 +- .../ecore/src/lib/ecore_evas/ecore_evas_buffer.c | 7 + .../ecore/src/lib/ecore_evas/ecore_evas_cocoa.c | 10 +- .../ecore/src/lib/ecore_evas/ecore_evas_directfb.c | 7 + .../ecore/src/lib/ecore_evas/ecore_evas_ews.c | 8 + .../ecore/src/lib/ecore_evas/ecore_evas_extn.c | 69 +- libraries/ecore/src/lib/ecore_evas/ecore_evas_fb.c | 7 + .../ecore/src/lib/ecore_evas/ecore_evas_private.h | 57 +- .../ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c | 9 +- .../ecore/src/lib/ecore_evas/ecore_evas_sdl.c | 189 +- .../src/lib/ecore_evas/ecore_evas_wayland_egl.c | 694 ++-- .../src/lib/ecore_evas/ecore_evas_wayland_shm.c | 769 ++--- .../ecore/src/lib/ecore_evas/ecore_evas_win32.c | 19 +- .../ecore/src/lib/ecore_evas/ecore_evas_wince.c | 21 +- libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c | 455 ++- libraries/ecore/src/lib/ecore_fb/Makefile.in | 20 +- libraries/ecore/src/lib/ecore_fb/ecore_fb.c | 23 +- libraries/ecore/src/lib/ecore_file/Makefile.in | 20 +- libraries/ecore/src/lib/ecore_file/ecore_file.c | 2 + .../ecore/src/lib/ecore_file/ecore_file_download.c | 40 +- libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h | 143 +- libraries/ecore/src/lib/ecore_imf/Makefile.in | 20 +- .../ecore/src/lib/ecore_imf/ecore_imf_context.c | 402 ++- .../ecore/src/lib/ecore_imf/ecore_imf_private.h | 3 + libraries/ecore/src/lib/ecore_imf_evas/Makefile.in | 20 +- .../ecore/src/lib/ecore_imf_evas/ecore_imf_evas.c | 44 + libraries/ecore/src/lib/ecore_input/Makefile.in | 20 +- .../ecore/src/lib/ecore_input_evas/Makefile.in | 20 +- libraries/ecore/src/lib/ecore_ipc/Makefile.in | 20 +- libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c | 5 +- libraries/ecore/src/lib/ecore_psl1ght/Makefile.in | 20 +- libraries/ecore/src/lib/ecore_sdl/Makefile.in | 20 +- .../ecore/src/lib/ecore_wayland/Ecore_Wayland.h | 271 +- libraries/ecore/src/lib/ecore_wayland/Makefile.am | 8 +- libraries/ecore/src/lib/ecore_wayland/Makefile.in | 33 +- libraries/ecore/src/lib/ecore_wayland/ecore_wl.c | 1322 ++------ .../ecore/src/lib/ecore_wayland/ecore_wl_private.h | 56 +- libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h | 9 +- libraries/ecore/src/lib/ecore_win32/Makefile.in | 20 +- .../src/lib/ecore_win32/ecore_win32_private.h | 4 +- .../ecore/src/lib/ecore_win32/ecore_win32_window.c | 173 +- libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h | 4 + libraries/ecore/src/lib/ecore_wince/Makefile.in | 20 +- .../ecore/src/lib/ecore_wince/ecore_wince_window.c | 52 + libraries/ecore/src/lib/ecore_x/Ecore_X.h | 91 +- libraries/ecore/src/lib/ecore_x/Ecore_X_Atoms.h | 14 + libraries/ecore/src/lib/ecore_x/Makefile.in | 20 +- .../ecore/src/lib/ecore_x/ecore_x_atoms_decl.h | 14 + libraries/ecore/src/lib/ecore_x/xcb/Makefile.in | 20 +- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_atoms.c | 15 +- libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c | 236 ++ .../ecore/src/lib/ecore_x/xcb/ecore_xcb_keymap.c | 8 + .../ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c | 50 + .../ecore/src/lib/ecore_x/xcb/ecore_xcb_randr.c | 294 +- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c | 4 +- libraries/ecore/src/lib/ecore_x/xlib/Makefile.in | 20 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_atoms.c | 15 +- libraries/ecore/src/lib/ecore_x/xlib/ecore_x_e.c | 233 ++ .../ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c | 51 + .../ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c | 246 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_test.c | 12 + .../ecore/src/lib/ecore_x/xlib/ecore_x_window.c | 4 +- libraries/ecore/src/modules/Makefile.in | 20 +- libraries/ecore/src/modules/immodules/Makefile.in | 20 +- .../ecore/src/modules/immodules/scim/Makefile.in | 20 +- .../src/modules/immodules/scim/scim_imcontext.cpp | 1348 ++++---- .../src/modules/immodules/scim/scim_imcontext.h | 2 + .../src/modules/immodules/scim/scim_module.cpp | 11 +- .../ecore/src/modules/immodules/xim/Makefile.in | 20 +- .../src/modules/immodules/xim/ecore_imf_xim.c | 48 +- libraries/ecore/src/tests/Makefile.in | 20 +- libraries/ecore/src/tests/ecore_test_ecore_x.c | 4 + libraries/ecore/src/util/Makefile.in | 20 +- 142 files changed, 9956 insertions(+), 7409 deletions(-) (limited to 'libraries/ecore') diff --git a/libraries/ecore/AUTHORS b/libraries/ecore/AUTHORS index 8fc1f10..3db7a4b 100644 --- a/libraries/ecore/AUTHORS +++ b/libraries/ecore/AUTHORS @@ -1,3 +1,4 @@ +Myoungwoon Roy Kim(roy_kim) The Rasterman Tom Gilbert Burra @@ -49,3 +50,5 @@ Youness Alaoui Bluezery Doyoun Kang Haifeng Deng +Jérémy Zurcher +Vikram Narayanan diff --git a/libraries/ecore/ChangeLog b/libraries/ecore/ChangeLog index 5c32d20..dc855e0 100644 --- a/libraries/ecore/ChangeLog +++ b/libraries/ecore/ChangeLog @@ -364,7 +364,7 @@ 2011-12-02 Carsten Haitzler (The Rasterman) 1.1.0 release - + 2011-12-02 Mike Blumenkrantz * Use mempools for allocations @@ -465,3 +465,124 @@ using "Plug" image object. Before only one to one communication is possible, but now many "plug"s can show socket's canvas. +2011-12-26 Christopher Michael (devilhorns) + + * Add Ecore_X function to return the keycode from a given keyname. + +2012-02-06 Jihoon Kim (jihoon) + + * Set ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL as default layout in ecore_imf_context_add. + * Add Ecore_IMF function to set or get the input panel-specific data. + +2012-02-07 Jihoon Kim (jihoon) + + * Support ecore_imf_context_input_panel_show/hide in XIM and SCIM module. + +2012-02-08 Carsten Haitzler (The Rasterman) + + * Add ecore_con_url_http_version_set() to set url request version + +2012-02-09 Jihoon Kim (jihoon) + + * Provide compose, string in key down/up event in case of scim-input-pad. + +2012-02-10 Christopher Michael (devilhorns) + + * Add Ecore_Evas function to allow setting a mouse pointer from efl/elm wayland clients. + +2012-02-15 Jihoon Kim (jihoon) + + * Add ecore_imf APIs to set return key type, disable return key. + +2012-02-16 Leif Middelschulte (T_UNIX) + + * Add ecore_x_randr_mode_add to add a mode to a display + * Add ecore_x_randr_mode_del to remove a mode from the display + * Add ecore_x_randr_output_mode_add to add a mode to an output + * Add ecore_x_randr_output_mode_del to remove a mode from an output + +2012-02-10 Jérémy Zurcher + + * Improve callbacks in ecore_evas to use typedefs for readability. + +2012-02-20 Cedric Bail + + * Rewrite internal of Ecore_Thread to use Eina_Lock and ecore_main_loop_thread_safe_call_async. + +2012-02-23 Cedric Bail + + * Move to Evas buffer engine for Ecore_Evas SDL software backend. + +2012-02-23 Leif Middelschulte (T_UNIX) + + * Add ecore_x_randr_window_crtcs_get to get the crtcs that display a + window. + * Deprecate ecore_x_randr_current_output_get. Use + ecore_x_randr_window_crtcs_get instead. + +2012-02-24 Doyun Kang + + * Add indicator controls to ecore_x + +2012-02-26 Carsten Haitzler (The Rasterman) + + * Fix ecore_file_download to not limit downloads to 30sec. + +2012-02-28 Carsten Haitzler (The Rasterman) + + * Add ecore_x_netwm_icons_set() + * Add ecore_evas_window_group_set() ecore_evas_window_group_get() + ecore_evas_aspect_set() ecore_evas_aspect_get() + ecore_evas_urgent_set() ecore_evas_urgent_get() + ecore_evas_modal_set() ecore_evas_modal_get() + ecore_evas_demand_attention_set() + ecore_evas_demand_attention_get() + ecore_evas_focus_skip_set() ecore_evas_focus_skip_get() + ecore_evas_callback_state_change_set() + +2012-02-28 Christopher Michael (devilhorns) + + * Refactor Ecore_Wayland code to improve running EFL + applications as Wayland Clients. + * Refactor Ecore_Evas Wayland code to match changes in + Ecore_Wayland + +2012-02-29 Jihoon Kim (jihoon) + + * Add ecore_imf_context_input_panel_caps_lock_mode_set/get to set the caps lock mode on the input panel + +2012-03-07 ChunEon Park (Hermet) + + * Add ecore_x_illume_clipboard_state_set() + ecore_x_illume_clipboard_state_get() + ecore_x_illume_clipboard_geometry_set() + ecore_x_illume_clipboard_geometry_get() + +2012-03-07 Carsten Haitzler (The Rasterman) + + * Add atoms and api for rotation and indicator transparency in + ecore_x/ecore_evas + +2012-03-07 Mike Blumenkrantz (discomfitor/zmike) + + * Add ecore_con_url_status_code_get() to check return code at any time + +2012-03-09 Carsten Haitzler (The Rasterman) + + * Fix ecore_thread_feedback_run to work as the documentation and logic tell us. + +2012-03-10 Cedric Bail + + * Fix double free at end of execution of Ecore_Thread with feedback. + +2012-03-13 Leif Middelschulte (T_UNIX) + + * Fix ecore_x_randr_modes_info_get to not cut off the trailing '\0' + anymore + +2012-03-20 Vincent Torri + + * Rename ecore_win32_window_focus_set() to ecore_win32_window_focus() + to match ecore_x API. + * Add ecore_wince_window_focus(), ecore_wince_window_focus_get() + and ecore_win32_window_focus_get(). diff --git a/libraries/ecore/Makefile.in b/libraries/ecore/Makefile.in index 7ae3118..39507a9 100644 --- a/libraries/ecore/Makefile.in +++ b/libraries/ecore/Makefile.in @@ -79,8 +79,8 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/ecore-wince.pc.in $(srcdir)/ecore-x.pc.in \ $(srcdir)/ecore.pc.in $(srcdir)/ecore.spec.in \ $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ - INSTALL NEWS config.guess config.rpath config.sub depcomp \ - install-sh ltmain.sh missing mkinstalldirs + INSTALL NEWS TODO config.guess config.rpath config.sub depcomp \ + install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/ac_path_generic.m4 \ @@ -93,18 +93,17 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(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) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = ecore-con.pc ecore-config.pc ecore-directfb.pc \ ecore-evas.pc ecore-fb.pc ecore-file.pc ecore-imf.pc \ @@ -259,6 +258,8 @@ 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@ @@ -314,6 +315,8 @@ 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@ @@ -324,6 +327,7 @@ 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@ diff --git a/libraries/ecore/NEWS b/libraries/ecore/NEWS index f558bb4..22fd7a7 100644 --- a/libraries/ecore/NEWS +++ b/libraries/ecore/NEWS @@ -13,15 +13,43 @@ Additions: - ECORE_CON_REMOTE_CORK - ecore_con_url_proxy_set() - ecore_con_url_timeout_set() - - ecore_con_url_proxy_username_set + - ecore_con_url_proxy_username_set() - ecore_con_url_proxy_password_set() + - ecore_con_url_http_version_set() + - ecore_con_url_status_code_get() * ecore_x: - ecore_x_randr_output_backlight_available() + - ecore_x_randr_window_crtcs_get() * ecore_evas: - Add Shm and Egl engines for ecore_evas to draw in Wayland. - Add Socket and Plug to draw other process area. * ecore_wayland - Add Ecore_Wayland (backend to support Wayland). + * ecore_imf + - ecore_imf_context_event_callback_add() + - ecore_imf_context_event_callback_del() + - ecore_imf_context_event_callback_call() + - ecore_imf_context_input_panel_imdata_set() + - ecore_imf_context_input_panel_imdata_get() + - ecore_imf_context_input_panel_return_key_type_set() + - ecore_imf_context_input_panel_return_key_type_get() + - ecore_imf_context_input_panel_return_key_disabled_set() + - ecore_imf_context_input_panel_return_key_disabled_get() + - ecore_imf_context_input_panel_caps_lock_mode_set() + - ecore_imf_context_input_panel_caps_lock_mode_get() + * ecore_win32: + - ecore_win32_focus() + - ecore_win32_focus_get() + * ecore_wince: + - ecore_wince_focus() + - ecore_wince_focus_get() + +Fixes: + * ecore_thread: + - ecore_thread_feedback_run now handle try_no_queue the way it logically should. + - prevent double free that could cause crash when an Ecore_Thread stop. + * ecore_x: + - ecore_x_randr_modes_info_get does not cut off the trailing '\0' anymore. Improvements: * ecore: @@ -30,7 +58,19 @@ Improvements: - certificates can now be added for STARTTTLS * ecore_win32: - fix modifiers value on Windows XP + * ecore_thread: + - use eina_lock + - use Ecore thread safe async call + * ecore_evas: + - use Evas buffer backend for SDL software engine + +Deprecations: + * ecore_x: + - ecore_x_randr_crtc_current_get() +Removal: + * ecore_win32: + - ecore_win32_focus_set() Ecore 1.1.0 diff --git a/libraries/ecore/README b/libraries/ecore/README index 7b11f68..c902528 100644 --- a/libraries/ecore/README +++ b/libraries/ecore/README @@ -1,4 +1,4 @@ -Ecore 1.1.0 +Ecore 1.2.0 ****************************************************************************** @@ -12,7 +12,6 @@ Requirements: Must: libc - libm eina (1.1.0 or better) (For windows you also need: evil) diff --git a/libraries/ecore/aclocal.m4 b/libraries/ecore/aclocal.m4 index 859816b..8ae8efb 100644 --- a/libraries/ecore/aclocal.m4 +++ b/libraries/ecore/aclocal.m4 @@ -13,13 +13,14 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # @@ -47,7 +48,10 @@ To do so, use the procedure documented by the package, typically `autoreconf'.]) AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -60,7 +64,6 @@ if test -n "$PKG_CONFIG"; then AC_MSG_RESULT([no]) PKG_CONFIG="" fi - fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -69,34 +72,31 @@ fi[]dnl # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) + m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) - # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried fi[]dnl ])# _PKG_CONFIG @@ -138,16 +138,17 @@ and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - ifelse([$4], , [AC_MSG_ERROR(dnl + m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -155,25 +156,24 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) +_PKG_TEXT])[]dnl + ]) elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT -To get pkg-config, see .])], - [$4]) +To get pkg-config, see .])[]dnl + ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) + $3 fi[]dnl ])# PKG_CHECK_MODULES @@ -1148,7 +1148,6 @@ m4_include([m4/efl_threads.m4]) m4_include([m4/gettext.m4]) m4_include([m4/iconv.m4]) m4_include([m4/intlmacosx.m4]) -m4_include([m4/isc-posix.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) diff --git a/libraries/ecore/config.guess b/libraries/ecore/config.guess index e3a2116..c2246a4 100755 --- a/libraries/ecore/config.guess +++ b/libraries/ecore/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. -timestamp='2009-06-10' +timestamp='2009-12-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,16 +27,16 @@ timestamp='2009-06-10' # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,8 +56,9 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -333,6 +334,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" @@ -807,12 +811,12 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) + *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd | genuineintel) + authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -854,6 +858,20 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -876,6 +894,17 @@ EOF frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; @@ -901,39 +930,18 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -942,8 +950,11 @@ EOF *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux @@ -966,58 +977,6 @@ EOF xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -1247,6 +1206,16 @@ EOF *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} diff --git a/libraries/ecore/config.h.in b/libraries/ecore/config.h.in index 06c1d8e..abc5822 100644 --- a/libraries/ecore/config.h.in +++ b/libraries/ecore/config.h.in @@ -30,6 +30,9 @@ */ #undef BUILD_ECORE_EVAS_EWS +/* Support for Extn Engine in Ecore_Evas */ +#undef BUILD_ECORE_EVAS_EXTN + /* Support for Linux Framebuffer Engine in Ecore_Evas */ #undef BUILD_ECORE_EVAS_FB @@ -331,6 +334,9 @@ /* Define to 1 if you have the `execvp' function. */ #undef HAVE_EXECVP +/* Define to 1 if you have Exotic. */ +#undef HAVE_EXOTIC + /* Define to 1 if you have the header file. */ #undef HAVE_FEATURES_H @@ -403,6 +409,9 @@ /* File monitoring with polling */ #undef HAVE_POLL +/* Have shm_open() call */ +#undef HAVE_SHM_OPEN + /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H diff --git a/libraries/ecore/config.sub b/libraries/ecore/config.sub index eb0389a..c2d1257 100755 --- a/libraries/ecore/config.sub +++ b/libraries/ecore/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. -timestamp='2009-06-11' +timestamp='2010-01-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,13 +32,16 @@ timestamp='2009-06-11' # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -72,8 +75,9 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -149,7 +153,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; @@ -284,6 +288,7 @@ case $basic_machine in | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ + | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -291,13 +296,14 @@ case $basic_machine in | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ + | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -340,7 +346,7 @@ case $basic_machine in | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -368,15 +374,17 @@ case $basic_machine in | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ - | romp-* | rs6000-* \ + | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile-* | tilegx-* \ | tron-* \ + | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ @@ -726,6 +734,9 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -1076,6 +1087,11 @@ case $basic_machine in basic_machine=tic6x-unknown os=-coff ;; + # This must be matched before tile*. + tilegx*) + basic_machine=tilegx-unknown + os=-linux-gnu + ;; tile*) basic_machine=tile-unknown os=-linux-gnu @@ -1247,6 +1263,9 @@ case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1268,8 +1287,8 @@ case $os in # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -kopensolaris* \ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1290,7 +1309,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1423,6 +1442,8 @@ case $os in -dicos*) os=-dicos ;; + -nacl*) + ;; -none) ;; *) diff --git a/libraries/ecore/configure b/libraries/ecore/configure index 2ea7dd2..1b2ed41 100755 --- a/libraries/ecore/configure +++ b/libraries/ecore/configure @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for ecore 1.1.99.67344. +# Generated by GNU Autoconf 2.67 for ecore 1.2.0-alpha. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -319,7 +319,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -359,19 +359,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -682,7 +682,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -701,8 +701,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ecore' PACKAGE_TARNAME='ecore' -PACKAGE_VERSION='1.1.99.67344' -PACKAGE_STRING='ecore 1.1.99.67344' +PACKAGE_VERSION='1.2.0-alpha' +PACKAGE_STRING='ecore 1.2.0-alpha' PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net' PACKAGE_URL='' @@ -772,6 +772,10 @@ EFL_INSTALL_EXAMPLES_FALSE EFL_INSTALL_EXAMPLES_TRUE EFL_BUILD_EXAMPLES_FALSE EFL_BUILD_EXAMPLES_TRUE +EFL_ENABLE_TESTS_FALSE +EFL_ENABLE_TESTS_TRUE +CHECK_LIBS +CHECK_CFLAGS WAYLAND_EGL_LIBS WAYLAND_EGL_CFLAGS ecore_wayland_libs @@ -875,6 +879,7 @@ ecore_con_libs ecore_con_cflags BUILD_ECORE_CON_FALSE BUILD_ECORE_CON_TRUE +SHM_OPEN_LIBS ALLOCA lt_enable_auto_import WIN32_CFLAGS @@ -992,11 +997,18 @@ EFL_ECORE_FILE_BUILD EFL_ECORE_EVAS_BUILD EFL_ECORE_CON_BUILD EFL_ECORE_BUILD +ECORE_HAVE_EXOTIC_FALSE +ECORE_HAVE_EXOTIC_TRUE +EXOTIC_LIBS +EXOTIC_CFLAGS ESCAPE_LIBS ESCAPE_CFLAGS EVIL_LIBS EVIL_CFLAGS pkgconfig_requires_private +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG EFL_BUILD_DOC_FALSE EFL_BUILD_DOC_TRUE efl_doxygen @@ -1014,11 +1026,6 @@ OBJCDEPMODE ac_ct_OBJC OBJCFLAGS OBJC -EFL_ENABLE_TESTS_FALSE -EFL_ENABLE_TESTS_TRUE -CHECK_LIBS -CHECK_CFLAGS -PKG_CONFIG HAVE_PO_FALSE HAVE_PO_TRUE POSUB @@ -1172,7 +1179,6 @@ enable_local_sockets enable_abstract_sockets enable_simple_x11 enable_xim -enable_tests enable_doc with_doxygen enable_ecore_timer_dump @@ -1243,7 +1249,6 @@ enable_ecore_evas_software_ddraw enable_ecore_evas_direct3d enable_ecore_evas_opengl_glew enable_ecore_evas_software_16_ddraw -enable_ecore_evas_software_sdl enable_ecore_evas_opengl_sdl enable_ecore_evas_opengl_cocoa enable_ecore_evas_directfb @@ -1254,6 +1259,7 @@ enable_ecore_evas_psl1ght enable_ecore_wayland enable_ecore_evas_wayland_shm enable_ecore_evas_wayland_egl +enable_tests enable_build_examples enable_install_examples ' @@ -1266,19 +1272,21 @@ LDFLAGS LIBS CPPFLAGS CPP -PKG_CONFIG -CHECK_CFLAGS -CHECK_LIBS OBJC OBJCFLAGS CXX CXXFLAGS CCC CXXCPP +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR EVIL_CFLAGS EVIL_LIBS ESCAPE_CFLAGS ESCAPE_LIBS +EXOTIC_CFLAGS +EXOTIC_LIBS EINA_CFLAGS EINA_LIBS GLIB_CFLAGS @@ -1343,7 +1351,9 @@ XCB_X11_LIBS WAYLAND_CFLAGS WAYLAND_LIBS WAYLAND_EGL_CFLAGS -WAYLAND_EGL_LIBS' +WAYLAND_EGL_LIBS +CHECK_CFLAGS +CHECK_LIBS' # Initialize some variables set by options. @@ -1406,8 +1416,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1452,7 +1463,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1478,7 +1489,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1682,7 +1693,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1698,7 +1709,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1728,8 +1739,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1737,7 +1748,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1755,13 +1766,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1784,7 +1795,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1798,8 +1809,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1814,9 +1825,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1855,11 +1866,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1885,7 +1896,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ecore 1.1.99.67344 to adapt to many kinds of systems. +\`configure' configures ecore 1.2.0-alpha to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1899,7 +1910,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1959,7 +1970,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ecore 1.1.99.67344:";; + short | recursive ) echo "Configuration of ecore 1.2.0-alpha:";; esac cat <<\_ACEOF @@ -1987,7 +1998,6 @@ Optional Features: disable abstract sockets. --enable-simple-x11 enable simple x11 linking --disable-xim disable X Input Method. - --enable-tests enable tests [default=disabled] --disable-doc Disable documentation build [default=enabled] --disable-ecore-timer-dump disable tracking of timer allocation. @@ -2102,9 +2112,6 @@ Optional Features: --enable-ecore-evas-software-16-ddraw enable 16 bpp Software DirectDraw support in the ecore_evas module. - --enable-ecore-evas-software-sdl - enable Software SDL support in the ecore_evas - module. --enable-ecore-evas-opengl-sdl enable OpenGL SDL support in the ecore_evas module. --enable-ecore-evas-opengl-cocoa @@ -2126,6 +2133,7 @@ Optional Features: enable Wayland Shm support in the ecore_evas module. --enable-ecore-evas-wayland-egl enable Wayland Egl support in the ecore_evas module. + --enable-tests enable tests [default=disabled] --enable-build-examples enable building examples [default=disabled] --enable-install-examples enable installing example source files @@ -2164,20 +2172,24 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor - PKG_CONFIG path to pkg-config utility - CHECK_CFLAGS - C compiler flags for CHECK, overriding pkg-config - CHECK_LIBS linker flags for CHECK, overriding pkg-config OBJC Objective C compiler command OBJCFLAGS Objective C compiler flags CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path EVIL_CFLAGS C compiler flags for EVIL, overriding pkg-config EVIL_LIBS linker flags for EVIL, overriding pkg-config ESCAPE_CFLAGS C compiler flags for ESCAPE, overriding pkg-config ESCAPE_LIBS linker flags for ESCAPE, overriding pkg-config + EXOTIC_CFLAGS + C compiler flags for EXOTIC, overriding pkg-config + EXOTIC_LIBS linker flags for EXOTIC, overriding pkg-config EINA_CFLAGS C compiler flags for EINA, overriding pkg-config EINA_LIBS linker flags for EINA, overriding pkg-config GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config @@ -2286,6 +2298,9 @@ Some influential environment variables: C compiler flags for WAYLAND_EGL, overriding pkg-config WAYLAND_EGL_LIBS linker flags for WAYLAND_EGL, overriding pkg-config + CHECK_CFLAGS + C compiler flags for CHECK, overriding pkg-config + CHECK_LIBS linker flags for CHECK, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -2353,10 +2368,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ecore configure 1.1.99.67344 -generated by GNU Autoconf 2.65 +ecore configure 1.2.0-alpha +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -2426,7 +2441,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -2450,10 +2465,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2489,7 +2504,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2512,17 +2527,15 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## -------------------------------------------------------- ## +( $as_echo "## -------------------------------------------------------- ## ## Report this to enlightenment-devel@lists.sourceforge.net ## -## -------------------------------------------------------- ## -_ASBOX +## -------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2586,7 +2599,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2662,7 +2675,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2721,45 +2734,6 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_func -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $2 - (void) $2; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_decl - # ac_fn_objc_try_compile LINENO # ----------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. @@ -2857,7 +2831,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : @@ -2919,6 +2893,52 @@ fi } # ac_fn_cxx_try_link +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_decl + # ac_fn_objc_try_link LINENO # -------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -3152,7 +3172,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -3200,8 +3220,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ecore $as_me 1.1.99.67344, which was -generated by GNU Autoconf 2.65. Invocation command line was +It was created by ecore $as_me 1.2.0-alpha, which was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -3311,11 +3331,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -3349,11 +3367,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -3366,11 +3382,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -3384,11 +3398,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -3443,7 +3455,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -3458,7 +3475,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5 ; } fi done @@ -3535,7 +3556,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -3561,16 +3582,22 @@ am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3686,11 +3713,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -3712,7 +3739,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -3722,7 +3749,7 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -3960,7 +3987,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3968,7 +3995,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -4002,7 +4029,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -4018,7 +4045,7 @@ fi # Define the identity of the package. PACKAGE='ecore' - VERSION='1.1.99.67344' + VERSION='1.2.0-alpha' cat >>confdefs.h <<_ACEOF @@ -4433,8 +4460,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -4548,9 +4575,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5 ; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -4592,8 +4618,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -4650,9 +4676,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi fi fi @@ -4703,8 +4729,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -5094,7 +5120,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5110,11 +5136,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -5153,7 +5179,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5169,18 +5195,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c @@ -5241,7 +5267,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -5307,7 +5333,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -5439,8 +5465,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -5515,7 +5540,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -5526,16 +5551,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -5560,7 +5585,7 @@ else ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -5568,7 +5593,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -5969,7 +5994,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -6048,7 +6073,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -6164,7 +6189,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -6366,13 +6391,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:6369: $ac_compile\"" >&5) + (eval echo "\"\$as_me:6394: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:6372: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:6397: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:6375: output\"" >&5) + (eval echo "\"\$as_me:6400: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -7574,7 +7599,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7577 "configure"' > conftest.$ac_ext + echo '#line 7602 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8834,11 +8859,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8837: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8862: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8841: \$? = $ac_status" >&5 + echo "$as_me:8866: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9173,11 +9198,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9176: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9201: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9180: \$? = $ac_status" >&5 + echo "$as_me:9205: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -9278,11 +9303,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9281: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9306: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9285: \$? = $ac_status" >&5 + echo "$as_me:9310: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9333,11 +9358,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9336: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9361: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9340: \$? = $ac_status" >&5 + echo "$as_me:9365: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11717,7 +11742,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11720 "configure" +#line 11745 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11813,7 +11838,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11816 "configure" +#line 11841 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12052,20 +12077,20 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define VERS_MIN 1 +#define VERS_MIN 2 _ACEOF cat >>confdefs.h <<_ACEOF -#define VERS_MIC 99 +#define VERS_MIC 0 _ACEOF cat >>confdefs.h <<_ACEOF -#define VERS_REV 67344 +#define VERS_REV 0 _ACEOF -version_info="2:99:1" +version_info="3:0:2" release_info="" @@ -12489,7 +12514,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${acl_cv_prog_gnu_ld+set}" = set; then : @@ -13136,7 +13161,7 @@ typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } -if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$gt_func_gnugettext_libc+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13807,7 +13832,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } -if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$gt_func_gnugettext_libintl+set}\"" = set; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -14016,7 +14041,7 @@ _ACEOF with_max_log_level="${withval}" else - as_fn_error "--with-internal-maximum-log-level takes a decimal number, got \"${withval}\" instead." "$LINENO" 5 + as_fn_error $? "--with-internal-maximum-log-level takes a decimal number, got \"${withval}\" instead." "$LINENO" 5 fi fi @@ -14106,6 +14131,7 @@ want_ecore_evas_directfb="no" want_ecore_evas_fb="no" want_ecore_evas_software_16_wince="no" want_ecore_evas_ews="yes" +want_ecore_evas_extn="yes" want_ecore_evas_wayland_shm="no" want_ecore_evas_wayland_egl="no" @@ -14114,11 +14140,12 @@ want_ecore_imf_xim="no" want_ecore_imf_scim="no" case "$host_os" in - mingw32ce* | cegcc*) + mingw32ce*) want_ecore_con="no" want_ecore_ipc="no" want_ecore_wince="yes" want_ecore_evas_software_16_wince="yes" + want_ecore_evas_extn="no" ;; mingw*) want_notify_win32="yes" @@ -14205,60 +14232,6 @@ requirements_ecore_imf_xim="" requirements_ecore_imf_scim="" requirements_ecore_wayland="" -ac_fn_c_check_decl "$LINENO" "MAXHOSTNAMELEN" "ac_cv_have_decl_MAXHOSTNAMELEN" "$ac_includes_default" -if test "x$ac_cv_have_decl_MAXHOSTNAMELEN" = x""yes; then : - FOUND_MAXHOSTNAMELEN=yes -fi - - -if test x$FOUND_MAXHOSTNAMELEN != xyes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for header that defines MAXHOSTNAMELEN" >&5 -$as_echo_n "checking for header that defines MAXHOSTNAMELEN... " >&6; } - - FOUND_MAXHOSTNAMELEN='not found' - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int h = MAXHOSTNAMELEN; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - FOUND_MAXHOSTNAMELEN='sys/param.h' - -$as_echo "#define NEED_SYS_PARAM_H 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int h = MAXHOSTNAMELEN; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - FOUND_MAXHOSTNAMELEN='netdb.h' - -$as_echo "#define NEED_NETDB_H 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOUND_MAXHOSTNAMELEN" >&5 -$as_echo "$FOUND_MAXHOSTNAMELEN" >&6; } -fi - ### Additional options to configure want_glib_integration_always=no @@ -14290,7 +14263,7 @@ $as_echo "#define USE_G_MAIN_LOOP 1" >>confdefs.h fi if test "x${want_glib_integration_always}" = "xyes" -a "x${want_g_main_loop}" = "xyes"; then - as_fn_error "--enable-glib-integration-always and --enable-glib-main-loop are mutually exclusive" "$LINENO" 5 + as_fn_error $? "--enable-glib-integration-always and --enable-glib-main-loop are mutually exclusive" "$LINENO" 5 fi # local sockets (ecore_con.c) @@ -14364,238 +14337,6 @@ $as_echo "#define ENABLE_XIM 1" >>confdefs.h fi -# Unit tests - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi - -fi - - - -# Check whether --enable-tests was given. -if test "${enable_tests+set}" = set; then : - enableval=$enable_tests; - if test "x${enableval}" = "xyes" ; then - _efl_enable_tests="yes" - else - _efl_enable_tests="no" - fi - -else - _efl_enable_tests="no" -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tests are built" >&5 -$as_echo_n "checking whether tests are built... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_efl_enable_tests}" >&5 -$as_echo "${_efl_enable_tests}" >&6; } - - - -if test "x${_efl_enable_tests}" = "xyes" ; then - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHECK" >&5 -$as_echo_n "checking for CHECK... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$CHECK_CFLAGS"; then - pkg_cv_CHECK_CFLAGS="$CHECK_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.5\""; } >&5 - ($PKG_CONFIG --exists --print-errors "check >= 0.9.5") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_CHECK_CFLAGS=`$PKG_CONFIG --cflags "check >= 0.9.5" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$CHECK_LIBS"; then - pkg_cv_CHECK_LIBS="$CHECK_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.5\""; } >&5 - ($PKG_CONFIG --exists --print-errors "check >= 0.9.5") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_CHECK_LIBS=`$PKG_CONFIG --libs "check >= 0.9.5" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "check >= 0.9.5"` - else - CHECK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "check >= 0.9.5"` - fi - # Put the nasty error message in config.log where it belongs - echo "$CHECK_PKG_ERRORS" >&5 - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _efl_enable_tests="no" -elif test $pkg_failed = untried; then - _efl_enable_tests="no" -else - CHECK_CFLAGS=$pkg_cv_CHECK_CFLAGS - CHECK_LIBS=$pkg_cv_CHECK_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - dummy="yes" -fi -fi - - if test "x${_efl_enable_tests}" = "xyes"; then - EFL_ENABLE_TESTS_TRUE= - EFL_ENABLE_TESTS_FALSE='#' -else - EFL_ENABLE_TESTS_TRUE='#' - EFL_ENABLE_TESTS_FALSE= -fi - - -if test "x$_efl_enable_tests" = "xyes"; then : - enable_tests="yes" -else - enable_tests="no" -fi - - ### Checks for programs @@ -15923,7 +15664,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -15939,11 +15680,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -15982,7 +15723,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -15998,11 +15739,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else @@ -16231,7 +15972,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -17772,11 +17513,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17775: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17516: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17779: \$? = $ac_status" >&5 + echo "$as_me:17520: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17871,11 +17612,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17874: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17615: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17878: \$? = $ac_status" >&5 + echo "$as_me:17619: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17923,11 +17664,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17926: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17667: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17930: \$? = $ac_status" >&5 + echo "$as_me:17671: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -19171,8 +18912,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -19798,6 +19539,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # so we should include this here: + + + + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -19910,7 +19655,6 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } PKG_CONFIG="" fi - fi # Check whether pkg-config supports Requires.private @@ -19960,11 +19704,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVIL" >&5 $as_echo_n "checking for EVIL... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$EVIL_CFLAGS"; then - pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$EVIL_CFLAGS"; then + pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evil >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "evil >= 1.0.0") 2>&5 ac_status=$? @@ -19974,15 +19717,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$EVIL_LIBS"; then - pkg_cv_EVIL_LIBS="$EVIL_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$EVIL_LIBS"; then + pkg_cv_EVIL_LIBS="$EVIL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evil >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "evil >= 1.0.0") 2>&5 ac_status=$? @@ -19992,14 +19733,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -20007,14 +19749,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evil >= 1.0.0"` + EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "evil >= 1.0.0" 2>&1` else - EVIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evil >= 1.0.0"` + EVIL_PKG_ERRORS=`$PKG_CONFIG --print-errors "evil >= 1.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$EVIL_PKG_ERRORS" >&5 - as_fn_error "Package requirements (evil >= 1.0.0) were not met: + as_fn_error $? "Package requirements (evil >= 1.0.0) were not met: $EVIL_PKG_ERRORS @@ -20023,12 +19765,13 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables EVIL_CFLAGS and EVIL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -20037,13 +19780,13 @@ and EVIL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else EVIL_CFLAGS=$pkg_cv_EVIL_CFLAGS EVIL_LIBS=$pkg_cv_EVIL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + fi $as_echo "#define HAVE_EVIL 1" >>confdefs.h @@ -20091,11 +19834,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ESCAPE" >&5 $as_echo_n "checking for ESCAPE... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$ESCAPE_CFLAGS"; then - pkg_cv_ESCAPE_CFLAGS="$ESCAPE_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$ESCAPE_CFLAGS"; then + pkg_cv_ESCAPE_CFLAGS="$ESCAPE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"escape\""; } >&5 ($PKG_CONFIG --exists --print-errors "escape") 2>&5 ac_status=$? @@ -20105,15 +19847,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$ESCAPE_LIBS"; then - pkg_cv_ESCAPE_LIBS="$ESCAPE_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$ESCAPE_LIBS"; then + pkg_cv_ESCAPE_LIBS="$ESCAPE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"escape\""; } >&5 ($PKG_CONFIG --exists --print-errors "escape") 2>&5 ac_status=$? @@ -20123,14 +19863,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -20138,14 +19879,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - ESCAPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "escape"` + ESCAPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "escape" 2>&1` else - ESCAPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "escape"` + ESCAPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "escape" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$ESCAPE_PKG_ERRORS" >&5 - as_fn_error "Package requirements (escape) were not met: + as_fn_error $? "Package requirements (escape) were not met: $ESCAPE_PKG_ERRORS @@ -20154,12 +19895,13 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables ESCAPE_CFLAGS and ESCAPE_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -20168,13 +19910,13 @@ and ESCAPE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else ESCAPE_CFLAGS=$pkg_cv_ESCAPE_CFLAGS ESCAPE_LIBS=$pkg_cv_ESCAPE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + fi CFLAGS="$CFLAGS $ESCAPE_CFLAGS" @@ -20193,6 +19935,95 @@ $as_echo "#define HAVE_ESCAPE 1" >>confdefs.h esac +### Checks for portability layer + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXOTIC" >&5 +$as_echo_n "checking for EXOTIC... " >&6; } + +if test -n "$EXOTIC_CFLAGS"; then + pkg_cv_EXOTIC_CFLAGS="$EXOTIC_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"exotic\""; } >&5 + ($PKG_CONFIG --exists --print-errors "exotic") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_EXOTIC_CFLAGS=`$PKG_CONFIG --cflags "exotic" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$EXOTIC_LIBS"; then + pkg_cv_EXOTIC_LIBS="$EXOTIC_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"exotic\""; } >&5 + ($PKG_CONFIG --exists --print-errors "exotic") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_EXOTIC_LIBS=`$PKG_CONFIG --libs "exotic" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + EXOTIC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "exotic" 2>&1` + else + EXOTIC_PKG_ERRORS=`$PKG_CONFIG --print-errors "exotic" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$EXOTIC_PKG_ERRORS" >&5 + + enable_exotic="no" +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + enable_exotic="no" +else + EXOTIC_CFLAGS=$pkg_cv_EXOTIC_CFLAGS + EXOTIC_LIBS=$pkg_cv_EXOTIC_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + enable_exotic="yes" +fi + +if test "x${enable_exotic}" = "xyes"; then + requirements_ecore="exotic ${requirements_ecore}" + + +$as_echo "#define HAVE_EXOTIC 1" >>confdefs.h + +fi + if test "x${enable_exotic}" = "xyes"; then + ECORE_HAVE_EXOTIC_TRUE= + ECORE_HAVE_EXOTIC_FALSE='#' +else + ECORE_HAVE_EXOTIC_TRUE='#' + ECORE_HAVE_EXOTIC_FALSE= +fi + + + @@ -20431,46 +20262,44 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EINA" >&5 $as_echo_n "checking for EINA... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$EINA_CFLAGS"; then - pkg_cv_EINA_CFLAGS="$EINA_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eina >= 1.1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "eina >= 1.1.0") 2>&5 +if test -n "$EINA_CFLAGS"; then + pkg_cv_EINA_CFLAGS="$EINA_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eina >= 1.2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "eina >= 1.2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_EINA_CFLAGS=`$PKG_CONFIG --cflags "eina >= 1.1.0" 2>/dev/null` + pkg_cv_EINA_CFLAGS=`$PKG_CONFIG --cflags "eina >= 1.2.0" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$EINA_LIBS"; then - pkg_cv_EINA_LIBS="$EINA_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eina >= 1.1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "eina >= 1.1.0") 2>&5 +if test -n "$EINA_LIBS"; then + pkg_cv_EINA_LIBS="$EINA_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eina >= 1.2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "eina >= 1.2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_EINA_LIBS=`$PKG_CONFIG --libs "eina >= 1.1.0" 2>/dev/null` + pkg_cv_EINA_LIBS=`$PKG_CONFIG --libs "eina >= 1.2.0" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -20478,14 +20307,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eina >= 1.1.0"` + EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eina >= 1.2.0" 2>&1` else - EINA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eina >= 1.1.0"` + EINA_PKG_ERRORS=`$PKG_CONFIG --print-errors "eina >= 1.2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$EINA_PKG_ERRORS" >&5 - as_fn_error "Package requirements (eina >= 1.1.0) were not met: + as_fn_error $? "Package requirements (eina >= 1.2.0) were not met: $EINA_PKG_ERRORS @@ -20494,12 +20323,13 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables EINA_CFLAGS and EINA_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 +See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -20508,33 +20338,33 @@ and EINA_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else EINA_CFLAGS=$pkg_cv_EINA_CFLAGS EINA_LIBS=$pkg_cv_EINA_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - : + fi #FIXME check all the requirements when the eina move will be finished -requirements_ecore="eina >= 1.1.0 ${requirements_ecore}" -requirements_ecore_con="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_con}" -#requirements_ecore_config="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_config}" -requirements_ecore_directfb="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_directfb}" -requirements_ecore_evas="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_evas}" -requirements_ecore_fb="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_fb}" -requirements_ecore_file="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_file}" -requirements_ecore_imf="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_imf}" -requirements_ecore_imf_evas="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_imf_evas}" -requirements_ecore_input="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_input}" -requirements_ecore_input_evas="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_input_evas}" -requirements_ecore_ipc="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_ipc}" -requirements_ecore_cocoa="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_cocoa}" -requirements_ecore_sdl="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_sdl}" -requirements_ecore_psl1ght="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_sdl}" -requirements_ecore_win32="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_win32}" -requirements_ecore_wince="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_wince}" -requirements_ecore_x="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_x}" +requirements_ecore="eina >= 1.2.0 ${requirements_ecore}" +requirements_ecore_con="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_con}" +#requirements_ecore_config="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_config}" +requirements_ecore_directfb="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_directfb}" +requirements_ecore_evas="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_evas}" +requirements_ecore_fb="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_fb}" +requirements_ecore_file="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_file}" +requirements_ecore_imf="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_imf}" +requirements_ecore_imf_evas="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_imf_evas}" +requirements_ecore_input="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_input}" +requirements_ecore_input_evas="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_input_evas}" +requirements_ecore_ipc="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_ipc}" +requirements_ecore_cocoa="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_cocoa}" +requirements_ecore_sdl="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_sdl}" +requirements_ecore_psl1ght="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_sdl}" +requirements_ecore_win32="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_win32}" +requirements_ecore_wince="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_wince}" +requirements_ecore_x="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_x}" # glib support (main loop integration) @@ -20550,11 +20380,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 $as_echo_n "checking for GLIB... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$GLIB_CFLAGS"; then - pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$GLIB_CFLAGS"; then + pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? @@ -20564,15 +20393,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$GLIB_LIBS"; then - pkg_cv_GLIB_LIBS="$GLIB_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$GLIB_LIBS"; then + pkg_cv_GLIB_LIBS="$GLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? @@ -20582,14 +20409,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -20597,17 +20425,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0"` + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0" 2>&1` else - GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0"` + GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_glib="no" + have_glib="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_glib="no" else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS @@ -20620,7 +20448,7 @@ else have_glib="no" fi if test "x$want_glib" = "xyes" -a "x$have_glib" = "xno"; then - as_fn_error "GLib support requested, but no GLib found by pkg-config." "$LINENO" 5 + as_fn_error $? "GLib support requested, but no GLib found by pkg-config." "$LINENO" 5 elif test "x$have_glib" = "xyes"; then $as_echo "#define HAVE_GLIB 1" >>confdefs.h @@ -20637,11 +20465,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5 $as_echo_n "checking for SDL... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$SDL_CFLAGS"; then - pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$SDL_CFLAGS"; then + pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl >= 1.2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl >= 1.2.0") 2>&5 ac_status=$? @@ -20651,15 +20478,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$SDL_LIBS"; then - pkg_cv_SDL_LIBS="$SDL_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$SDL_LIBS"; then + pkg_cv_SDL_LIBS="$SDL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl >= 1.2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "sdl >= 1.2.0") 2>&5 ac_status=$? @@ -20669,14 +20494,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -20684,17 +20510,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sdl >= 1.2.0"` + SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sdl >= 1.2.0" 2>&1` else - SDL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sdl >= 1.2.0"` + SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors "sdl >= 1.2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_sdl="no" + have_sdl="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_sdl="no" else SDL_CFLAGS=$pkg_cv_SDL_CFLAGS @@ -20788,11 +20614,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRECTFB" >&5 $as_echo_n "checking for DIRECTFB... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DIRECTFB_CFLAGS"; then - pkg_cv_DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$DIRECTFB_CFLAGS"; then + pkg_cv_DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"directfb >= 0.9.16\""; } >&5 ($PKG_CONFIG --exists --print-errors "directfb >= 0.9.16") 2>&5 ac_status=$? @@ -20802,15 +20627,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DIRECTFB_LIBS"; then - pkg_cv_DIRECTFB_LIBS="$DIRECTFB_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$DIRECTFB_LIBS"; then + pkg_cv_DIRECTFB_LIBS="$DIRECTFB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"directfb >= 0.9.16\""; } >&5 ($PKG_CONFIG --exists --print-errors "directfb >= 0.9.16") 2>&5 ac_status=$? @@ -20820,14 +20643,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -20835,17 +20659,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "directfb >= 0.9.16"` + DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "directfb >= 0.9.16" 2>&1` else - DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "directfb >= 0.9.16"` + DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --print-errors "directfb >= 0.9.16" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DIRECTFB_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_directfb="no" + have_directfb="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_directfb="no" else DIRECTFB_CFLAGS=$pkg_cv_DIRECTFB_CFLAGS @@ -20866,6 +20690,75 @@ fi # Xlib and XCB (ecore_x) +ac_fn_c_check_decl "$LINENO" "MAXHOSTNAMELEN" "ac_cv_have_decl_MAXHOSTNAMELEN" "$ac_includes_default" +if test "x$ac_cv_have_decl_MAXHOSTNAMELEN" = x""yes; then : + FOUND_MAXHOSTNAMELEN=yes +fi + + +if test "x${FOUND_MAXHOSTNAMELEN}" != "xyes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for header that defines MAXHOSTNAMELEN" >&5 +$as_echo_n "checking for header that defines MAXHOSTNAMELEN... " >&6; } + FOUND_MAXHOSTNAMELEN="not found" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + +int +main () +{ + +int h = MAXHOSTNAMELEN; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + FOUND_MAXHOSTNAMELEN="sys/param.h" + +$as_echo "#define NEED_SYS_PARAM_H 1" >>confdefs.h + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + +int +main () +{ + +int h = MAXHOSTNAMELEN; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + FOUND_MAXHOSTNAMELEN="netdb.h" + +$as_echo "#define NEED_NETDB_H 1" >>confdefs.h + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOUND_MAXHOSTNAMELEN" >&5 +$as_echo "$FOUND_MAXHOSTNAMELEN" >&6; } +fi + have_x="no" have_ecore_x="no" have_ecore_x_xlib="no" @@ -20995,7 +20888,7 @@ $as_echo_n "checking keysym definitions... " >&6; } if test -f "$KEYSYMDEFDIR/$i"; then KEYSYMDEFS="$KEYSYMDEFS $KEYSYMDEFDIR/$i" elif test "x$i" = "xkeysymdef.h"; then - as_fn_error "Cannot find keysymdef.h" "$LINENO" 5 + as_fn_error $? "Cannot find keysymdef.h" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KEYSYMDEFS" >&5 @@ -21159,11 +21052,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECORE_XCB" >&5 $as_echo_n "checking for ECORE_XCB... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$ECORE_XCB_CFLAGS"; then - pkg_cv_ECORE_XCB_CFLAGS="$ECORE_XCB_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$ECORE_XCB_CFLAGS"; then + pkg_cv_ECORE_XCB_CFLAGS="$ECORE_XCB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb xcb-shm xcb-event xcb-icccm >= 0.3.8 xcb-util >= 0.3.8 xcb-image xcb-keysyms >= 0.3.8\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb xcb xcb-shm xcb-event xcb-icccm >= 0.3.8 xcb-util >= 0.3.8 xcb-image xcb-keysyms >= 0.3.8") 2>&5 ac_status=$? @@ -21173,15 +21065,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$ECORE_XCB_LIBS"; then - pkg_cv_ECORE_XCB_LIBS="$ECORE_XCB_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$ECORE_XCB_LIBS"; then + pkg_cv_ECORE_XCB_LIBS="$ECORE_XCB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb xcb-shm xcb-event xcb-icccm >= 0.3.8 xcb-util >= 0.3.8 xcb-image xcb-keysyms >= 0.3.8\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb xcb xcb-shm xcb-event xcb-icccm >= 0.3.8 xcb-util >= 0.3.8 xcb-image xcb-keysyms >= 0.3.8") 2>&5 ac_status=$? @@ -21191,14 +21081,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21206,26 +21097,23 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11-xcb xcb xcb-shm xcb-event xcb-icccm >= 0.3.8 xcb-util >= 0.3.8 xcb-image xcb-keysyms >= 0.3.8"` + ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11-xcb xcb xcb-shm xcb-event xcb-icccm >= 0.3.8 xcb-util >= 0.3.8 xcb-image xcb-keysyms >= 0.3.8" 2>&1` else - ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11-xcb xcb xcb-shm xcb-event xcb-icccm >= 0.3.8 xcb-util >= 0.3.8 xcb-image xcb-keysyms >= 0.3.8"` + ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11-xcb xcb xcb-shm xcb-event xcb-icccm >= 0.3.8 xcb-util >= 0.3.8 xcb-image xcb-keysyms >= 0.3.8" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$ECORE_XCB_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECORE_XCB" >&5 $as_echo_n "checking for ECORE_XCB... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$ECORE_XCB_CFLAGS"; then - pkg_cv_ECORE_XCB_CFLAGS="$ECORE_XCB_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$ECORE_XCB_CFLAGS"; then + pkg_cv_ECORE_XCB_CFLAGS="$ECORE_XCB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms") 2>&5 ac_status=$? @@ -21235,15 +21123,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$ECORE_XCB_LIBS"; then - pkg_cv_ECORE_XCB_LIBS="$ECORE_XCB_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$ECORE_XCB_LIBS"; then + pkg_cv_ECORE_XCB_LIBS="$ECORE_XCB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms") 2>&5 ac_status=$? @@ -21253,14 +21139,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21268,17 +21155,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms"` + ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms" 2>&1` else - ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms"` + ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$ECORE_XCB_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb="no" + have_ecore_x_xcb="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb="no" else ECORE_XCB_CFLAGS=$pkg_cv_ECORE_XCB_CFLAGS @@ -21293,17 +21180,18 @@ $as_echo "#define OLD_XCB_VERSION 1" >>confdefs.h fi elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECORE_XCB" >&5 $as_echo_n "checking for ECORE_XCB... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$ECORE_XCB_CFLAGS"; then - pkg_cv_ECORE_XCB_CFLAGS="$ECORE_XCB_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$ECORE_XCB_CFLAGS"; then + pkg_cv_ECORE_XCB_CFLAGS="$ECORE_XCB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms") 2>&5 ac_status=$? @@ -21313,15 +21201,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$ECORE_XCB_LIBS"; then - pkg_cv_ECORE_XCB_LIBS="$ECORE_XCB_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$ECORE_XCB_LIBS"; then + pkg_cv_ECORE_XCB_LIBS="$ECORE_XCB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms") 2>&5 ac_status=$? @@ -21331,14 +21217,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21346,17 +21233,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms"` + ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms" 2>&1` else - ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms"` + ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$ECORE_XCB_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb="no" + have_ecore_x_xcb="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb="no" else ECORE_XCB_CFLAGS=$pkg_cv_ECORE_XCB_CFLAGS @@ -21387,11 +21274,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIXMAN" >&5 $as_echo_n "checking for PIXMAN... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$PIXMAN_CFLAGS"; then - pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$PIXMAN_CFLAGS"; then + pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pixman-1\""; } >&5 ($PKG_CONFIG --exists --print-errors "pixman-1") 2>&5 ac_status=$? @@ -21401,15 +21287,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$PIXMAN_LIBS"; then - pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$PIXMAN_LIBS"; then + pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pixman-1\""; } >&5 ($PKG_CONFIG --exists --print-errors "pixman-1") 2>&5 ac_status=$? @@ -21419,14 +21303,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21434,24 +21319,24 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pixman-1"` + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pixman-1" 2>&1` else - PIXMAN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pixman-1"` + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors "pixman-1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PIXMAN_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } if test "x${want_pixman}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error "Pixman not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error $? "Pixman not found (strict dependencies checking)" "$LINENO" 5 fi elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if test "x${want_pixman}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error "Pixman not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error $? "Pixman not found (strict dependencies checking)" "$LINENO" 5 fi else @@ -21474,11 +21359,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_COMPOSITE" >&5 $as_echo_n "checking for XCB_COMPOSITE... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_COMPOSITE_CFLAGS"; then - pkg_cv_XCB_COMPOSITE_CFLAGS="$XCB_COMPOSITE_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_COMPOSITE_CFLAGS"; then + pkg_cv_XCB_COMPOSITE_CFLAGS="$XCB_COMPOSITE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-composite\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-composite") 2>&5 ac_status=$? @@ -21488,15 +21372,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_COMPOSITE_LIBS"; then - pkg_cv_XCB_COMPOSITE_LIBS="$XCB_COMPOSITE_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_COMPOSITE_LIBS"; then + pkg_cv_XCB_COMPOSITE_LIBS="$XCB_COMPOSITE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-composite\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-composite") 2>&5 ac_status=$? @@ -21506,14 +21388,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21521,17 +21404,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_COMPOSITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-composite"` + XCB_COMPOSITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-composite" 2>&1` else - XCB_COMPOSITE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-composite"` + XCB_COMPOSITE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-composite" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_COMPOSITE_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_composite="no" + have_ecore_x_xcb_composite="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_composite="no" else XCB_COMPOSITE_CFLAGS=$pkg_cv_XCB_COMPOSITE_CFLAGS @@ -21556,11 +21439,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_DAMAGE" >&5 $as_echo_n "checking for XCB_DAMAGE... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_DAMAGE_CFLAGS"; then - pkg_cv_XCB_DAMAGE_CFLAGS="$XCB_DAMAGE_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_DAMAGE_CFLAGS"; then + pkg_cv_XCB_DAMAGE_CFLAGS="$XCB_DAMAGE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-damage\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-damage") 2>&5 ac_status=$? @@ -21570,15 +21452,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_DAMAGE_LIBS"; then - pkg_cv_XCB_DAMAGE_LIBS="$XCB_DAMAGE_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_DAMAGE_LIBS"; then + pkg_cv_XCB_DAMAGE_LIBS="$XCB_DAMAGE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-damage\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-damage") 2>&5 ac_status=$? @@ -21588,14 +21468,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21603,17 +21484,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_DAMAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-damage"` + XCB_DAMAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-damage" 2>&1` else - XCB_DAMAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-damage"` + XCB_DAMAGE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-damage" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_DAMAGE_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_damage="no" + have_ecore_x_xcb_damage="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_damage="no" else XCB_DAMAGE_CFLAGS=$pkg_cv_XCB_DAMAGE_CFLAGS @@ -21638,11 +21519,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_DPMS" >&5 $as_echo_n "checking for XCB_DPMS... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_DPMS_CFLAGS"; then - pkg_cv_XCB_DPMS_CFLAGS="$XCB_DPMS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_DPMS_CFLAGS"; then + pkg_cv_XCB_DPMS_CFLAGS="$XCB_DPMS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-dpms\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-dpms") 2>&5 ac_status=$? @@ -21652,15 +21532,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_DPMS_LIBS"; then - pkg_cv_XCB_DPMS_LIBS="$XCB_DPMS_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_DPMS_LIBS"; then + pkg_cv_XCB_DPMS_LIBS="$XCB_DPMS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-dpms\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-dpms") 2>&5 ac_status=$? @@ -21670,14 +21548,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21685,17 +21564,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_DPMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-dpms"` + XCB_DPMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-dpms" 2>&1` else - XCB_DPMS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-dpms"` + XCB_DPMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-dpms" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_DPMS_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_dpms="no" + have_ecore_x_xcb_dpms="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_dpms="no" else XCB_DPMS_CFLAGS=$pkg_cv_XCB_DPMS_CFLAGS @@ -21720,11 +21599,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_RANDR" >&5 $as_echo_n "checking for XCB_RANDR... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_RANDR_CFLAGS"; then - pkg_cv_XCB_RANDR_CFLAGS="$XCB_RANDR_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_RANDR_CFLAGS"; then + pkg_cv_XCB_RANDR_CFLAGS="$XCB_RANDR_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-randr\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-randr") 2>&5 ac_status=$? @@ -21734,15 +21612,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_RANDR_LIBS"; then - pkg_cv_XCB_RANDR_LIBS="$XCB_RANDR_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_RANDR_LIBS"; then + pkg_cv_XCB_RANDR_LIBS="$XCB_RANDR_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-randr\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-randr") 2>&5 ac_status=$? @@ -21752,14 +21628,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21767,17 +21644,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_RANDR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-randr"` + XCB_RANDR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-randr" 2>&1` else - XCB_RANDR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-randr"` + XCB_RANDR_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-randr" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_RANDR_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_randr="no" + have_ecore_x_xcb_randr="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_randr="no" else XCB_RANDR_CFLAGS=$pkg_cv_XCB_RANDR_CFLAGS @@ -21802,11 +21679,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_RENDER" >&5 $as_echo_n "checking for XCB_RENDER... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_RENDER_CFLAGS"; then - pkg_cv_XCB_RENDER_CFLAGS="$XCB_RENDER_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_RENDER_CFLAGS"; then + pkg_cv_XCB_RENDER_CFLAGS="$XCB_RENDER_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-render xcb-renderutil\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-render xcb-renderutil") 2>&5 ac_status=$? @@ -21816,15 +21692,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_RENDER_LIBS"; then - pkg_cv_XCB_RENDER_LIBS="$XCB_RENDER_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_RENDER_LIBS"; then + pkg_cv_XCB_RENDER_LIBS="$XCB_RENDER_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-render xcb-renderutil\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-render xcb-renderutil") 2>&5 ac_status=$? @@ -21834,14 +21708,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21849,17 +21724,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_RENDER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-render xcb-renderutil"` + XCB_RENDER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-render xcb-renderutil" 2>&1` else - XCB_RENDER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-render xcb-renderutil"` + XCB_RENDER_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-render xcb-renderutil" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_RENDER_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_render="no" + have_ecore_x_xcb_render="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_render="no" else XCB_RENDER_CFLAGS=$pkg_cv_XCB_RENDER_CFLAGS @@ -21884,11 +21759,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_SCREENSAVER" >&5 $as_echo_n "checking for XCB_SCREENSAVER... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_SCREENSAVER_CFLAGS"; then - pkg_cv_XCB_SCREENSAVER_CFLAGS="$XCB_SCREENSAVER_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_SCREENSAVER_CFLAGS"; then + pkg_cv_XCB_SCREENSAVER_CFLAGS="$XCB_SCREENSAVER_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-screensaver\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-screensaver") 2>&5 ac_status=$? @@ -21898,15 +21772,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_SCREENSAVER_LIBS"; then - pkg_cv_XCB_SCREENSAVER_LIBS="$XCB_SCREENSAVER_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_SCREENSAVER_LIBS"; then + pkg_cv_XCB_SCREENSAVER_LIBS="$XCB_SCREENSAVER_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-screensaver\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-screensaver") 2>&5 ac_status=$? @@ -21916,14 +21788,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -21931,17 +21804,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_SCREENSAVER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-screensaver"` + XCB_SCREENSAVER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-screensaver" 2>&1` else - XCB_SCREENSAVER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-screensaver"` + XCB_SCREENSAVER_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-screensaver" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_SCREENSAVER_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_screensaver="no" + have_ecore_x_xcb_screensaver="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_screensaver="no" else XCB_SCREENSAVER_CFLAGS=$pkg_cv_XCB_SCREENSAVER_CFLAGS @@ -21966,11 +21839,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_SHAPE" >&5 $as_echo_n "checking for XCB_SHAPE... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_SHAPE_CFLAGS"; then - pkg_cv_XCB_SHAPE_CFLAGS="$XCB_SHAPE_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_SHAPE_CFLAGS"; then + pkg_cv_XCB_SHAPE_CFLAGS="$XCB_SHAPE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-shape\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-shape") 2>&5 ac_status=$? @@ -21980,15 +21852,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_SHAPE_LIBS"; then - pkg_cv_XCB_SHAPE_LIBS="$XCB_SHAPE_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_SHAPE_LIBS"; then + pkg_cv_XCB_SHAPE_LIBS="$XCB_SHAPE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-shape\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-shape") 2>&5 ac_status=$? @@ -21998,14 +21868,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -22013,17 +21884,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_SHAPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-shape"` + XCB_SHAPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-shape" 2>&1` else - XCB_SHAPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-shape"` + XCB_SHAPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-shape" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_SHAPE_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_shape="no" + have_ecore_x_xcb_shape="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_shape="no" else XCB_SHAPE_CFLAGS=$pkg_cv_XCB_SHAPE_CFLAGS @@ -22048,11 +21919,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_XGESTURE" >&5 $as_echo_n "checking for XCB_XGESTURE... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_XGESTURE_CFLAGS"; then - pkg_cv_XCB_XGESTURE_CFLAGS="$XCB_XGESTURE_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_XGESTURE_CFLAGS"; then + pkg_cv_XCB_XGESTURE_CFLAGS="$XCB_XGESTURE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-gesture\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-gesture") 2>&5 ac_status=$? @@ -22062,15 +21932,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_XGESTURE_LIBS"; then - pkg_cv_XCB_XGESTURE_LIBS="$XCB_XGESTURE_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_XGESTURE_LIBS"; then + pkg_cv_XCB_XGESTURE_LIBS="$XCB_XGESTURE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-gesture\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-gesture") 2>&5 ac_status=$? @@ -22080,14 +21948,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -22095,17 +21964,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_XGESTURE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-gesture"` + XCB_XGESTURE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-gesture" 2>&1` else - XCB_XGESTURE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-gesture"` + XCB_XGESTURE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-gesture" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_XGESTURE_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_gesture="no" + have_ecore_x_xcb_gesture="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_gesture="no" else XCB_XGESTURE_CFLAGS=$pkg_cv_XCB_XGESTURE_CFLAGS @@ -22130,11 +21999,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_SYNC" >&5 $as_echo_n "checking for XCB_SYNC... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_SYNC_CFLAGS"; then - pkg_cv_XCB_SYNC_CFLAGS="$XCB_SYNC_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_SYNC_CFLAGS"; then + pkg_cv_XCB_SYNC_CFLAGS="$XCB_SYNC_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-sync\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-sync") 2>&5 ac_status=$? @@ -22144,15 +22012,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_SYNC_LIBS"; then - pkg_cv_XCB_SYNC_LIBS="$XCB_SYNC_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_SYNC_LIBS"; then + pkg_cv_XCB_SYNC_LIBS="$XCB_SYNC_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-sync\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-sync") 2>&5 ac_status=$? @@ -22162,14 +22028,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -22177,17 +22044,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_SYNC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-sync"` + XCB_SYNC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-sync" 2>&1` else - XCB_SYNC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-sync"` + XCB_SYNC_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-sync" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_SYNC_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_sync="no" + have_ecore_x_xcb_sync="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_sync="no" else XCB_SYNC_CFLAGS=$pkg_cv_XCB_SYNC_CFLAGS @@ -22212,11 +22079,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_XFIXES" >&5 $as_echo_n "checking for XCB_XFIXES... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_XFIXES_CFLAGS"; then - pkg_cv_XCB_XFIXES_CFLAGS="$XCB_XFIXES_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_XFIXES_CFLAGS"; then + pkg_cv_XCB_XFIXES_CFLAGS="$XCB_XFIXES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-xfixes\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-xfixes") 2>&5 ac_status=$? @@ -22226,15 +22092,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_XFIXES_LIBS"; then - pkg_cv_XCB_XFIXES_LIBS="$XCB_XFIXES_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_XFIXES_LIBS"; then + pkg_cv_XCB_XFIXES_LIBS="$XCB_XFIXES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-xfixes\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-xfixes") 2>&5 ac_status=$? @@ -22244,14 +22108,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -22259,17 +22124,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_XFIXES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-xfixes"` + XCB_XFIXES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-xfixes" 2>&1` else - XCB_XFIXES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-xfixes"` + XCB_XFIXES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-xfixes" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_XFIXES_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_xfixes="no" + have_ecore_x_xcb_xfixes="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_xfixes="no" else XCB_XFIXES_CFLAGS=$pkg_cv_XCB_XFIXES_CFLAGS @@ -22294,11 +22159,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_XINERAMA" >&5 $as_echo_n "checking for XCB_XINERAMA... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_XINERAMA_CFLAGS"; then - pkg_cv_XCB_XINERAMA_CFLAGS="$XCB_XINERAMA_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_XINERAMA_CFLAGS"; then + pkg_cv_XCB_XINERAMA_CFLAGS="$XCB_XINERAMA_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-xinerama\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-xinerama") 2>&5 ac_status=$? @@ -22308,15 +22172,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_XINERAMA_LIBS"; then - pkg_cv_XCB_XINERAMA_LIBS="$XCB_XINERAMA_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_XINERAMA_LIBS"; then + pkg_cv_XCB_XINERAMA_LIBS="$XCB_XINERAMA_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-xinerama\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-xinerama") 2>&5 ac_status=$? @@ -22326,14 +22188,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -22341,17 +22204,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_XINERAMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-xinerama"` + XCB_XINERAMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-xinerama" 2>&1` else - XCB_XINERAMA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-xinerama"` + XCB_XINERAMA_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-xinerama" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_XINERAMA_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_xinerama="no" + have_ecore_x_xcb_xinerama="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_xinerama="no" else XCB_XINERAMA_CFLAGS=$pkg_cv_XCB_XINERAMA_CFLAGS @@ -22376,11 +22239,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_XPRINT" >&5 $as_echo_n "checking for XCB_XPRINT... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_XPRINT_CFLAGS"; then - pkg_cv_XCB_XPRINT_CFLAGS="$XCB_XPRINT_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_XPRINT_CFLAGS"; then + pkg_cv_XCB_XPRINT_CFLAGS="$XCB_XPRINT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-xprint\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-xprint") 2>&5 ac_status=$? @@ -22390,15 +22252,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_XPRINT_LIBS"; then - pkg_cv_XCB_XPRINT_LIBS="$XCB_XPRINT_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_XPRINT_LIBS"; then + pkg_cv_XCB_XPRINT_LIBS="$XCB_XPRINT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-xprint\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-xprint") 2>&5 ac_status=$? @@ -22408,14 +22268,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -22423,17 +22284,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_XPRINT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-xprint"` + XCB_XPRINT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-xprint" 2>&1` else - XCB_XPRINT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-xprint"` + XCB_XPRINT_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-xprint" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_XPRINT_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_xprint="no" + have_ecore_x_xcb_xprint="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_xprint="no" else XCB_XPRINT_CFLAGS=$pkg_cv_XCB_XPRINT_CFLAGS @@ -22458,11 +22319,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_XTEST" >&5 $as_echo_n "checking for XCB_XTEST... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_XTEST_CFLAGS"; then - pkg_cv_XCB_XTEST_CFLAGS="$XCB_XTEST_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_XTEST_CFLAGS"; then + pkg_cv_XCB_XTEST_CFLAGS="$XCB_XTEST_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-xtest\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-xtest") 2>&5 ac_status=$? @@ -22472,15 +22332,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_XTEST_LIBS"; then - pkg_cv_XCB_XTEST_LIBS="$XCB_XTEST_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_XTEST_LIBS"; then + pkg_cv_XCB_XTEST_LIBS="$XCB_XTEST_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-xtest\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-xtest") 2>&5 ac_status=$? @@ -22490,14 +22348,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -22505,17 +22364,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_XTEST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-xtest"` + XCB_XTEST_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-xtest" 2>&1` else - XCB_XTEST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-xtest"` + XCB_XTEST_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-xtest" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_XTEST_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_xtest="no" + have_ecore_x_xcb_xtest="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_xtest="no" else XCB_XTEST_CFLAGS=$pkg_cv_XCB_XTEST_CFLAGS @@ -22542,11 +22401,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_XINPUT" >&5 $as_echo_n "checking for XCB_XINPUT... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_XINPUT_CFLAGS"; then - pkg_cv_XCB_XINPUT_CFLAGS="$XCB_XINPUT_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_XINPUT_CFLAGS"; then + pkg_cv_XCB_XINPUT_CFLAGS="$XCB_XINPUT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-xinput\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-xinput") 2>&5 ac_status=$? @@ -22556,15 +22414,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_XINPUT_LIBS"; then - pkg_cv_XCB_XINPUT_LIBS="$XCB_XINPUT_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_XINPUT_LIBS"; then + pkg_cv_XCB_XINPUT_LIBS="$XCB_XINPUT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-xinput\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-xinput") 2>&5 ac_status=$? @@ -22574,14 +22430,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -22589,17 +22446,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_XINPUT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-xinput"` + XCB_XINPUT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-xinput" 2>&1` else - XCB_XINPUT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-xinput"` + XCB_XINPUT_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-xinput" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_XINPUT_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_xinput="no" + have_ecore_x_xcb_xinput="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_xinput="no" else XCB_XINPUT_CFLAGS=$pkg_cv_XCB_XINPUT_CFLAGS @@ -22624,11 +22481,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_CURSOR" >&5 $as_echo_n "checking for XCB_CURSOR... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_CURSOR_CFLAGS"; then - pkg_cv_XCB_CURSOR_CFLAGS="$XCB_CURSOR_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_CURSOR_CFLAGS"; then + pkg_cv_XCB_CURSOR_CFLAGS="$XCB_CURSOR_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-render xcb-renderutil\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-render xcb-renderutil") 2>&5 ac_status=$? @@ -22638,15 +22494,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_CURSOR_LIBS"; then - pkg_cv_XCB_CURSOR_LIBS="$XCB_CURSOR_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_CURSOR_LIBS"; then + pkg_cv_XCB_CURSOR_LIBS="$XCB_CURSOR_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-render xcb-renderutil\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-render xcb-renderutil") 2>&5 ac_status=$? @@ -22656,14 +22510,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -22671,17 +22526,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_CURSOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-render xcb-renderutil"` + XCB_CURSOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-render xcb-renderutil" 2>&1` else - XCB_CURSOR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-render xcb-renderutil"` + XCB_CURSOR_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-render xcb-renderutil" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_CURSOR_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_xcb_cursor="no" + have_ecore_x_xcb_cursor="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_xcb_cursor="no" else XCB_CURSOR_CFLAGS=$pkg_cv_XCB_CURSOR_CFLAGS @@ -22740,7 +22595,7 @@ if test "x$with_x" = xno; then have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( + *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -22758,7 +22613,7 @@ libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done @@ -22844,7 +22699,7 @@ else fi done fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -24710,46 +24565,44 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVAS" >&5 $as_echo_n "checking for EVAS... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$EVAS_CFLAGS"; then - pkg_cv_EVAS_CFLAGS="$EVAS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas >= 1.1.99\""; } >&5 - ($PKG_CONFIG --exists --print-errors "evas >= 1.1.99") 2>&5 +if test -n "$EVAS_CFLAGS"; then + pkg_cv_EVAS_CFLAGS="$EVAS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas >= 1.2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "evas >= 1.2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_EVAS_CFLAGS=`$PKG_CONFIG --cflags "evas >= 1.1.99" 2>/dev/null` + pkg_cv_EVAS_CFLAGS=`$PKG_CONFIG --cflags "evas >= 1.2.0" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$EVAS_LIBS"; then - pkg_cv_EVAS_LIBS="$EVAS_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas >= 1.1.99\""; } >&5 - ($PKG_CONFIG --exists --print-errors "evas >= 1.1.99") 2>&5 +if test -n "$EVAS_LIBS"; then + pkg_cv_EVAS_LIBS="$EVAS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas >= 1.2.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "evas >= 1.2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_EVAS_LIBS=`$PKG_CONFIG --libs "evas >= 1.1.99" 2>/dev/null` + pkg_cv_EVAS_LIBS=`$PKG_CONFIG --libs "evas >= 1.2.0" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -24757,17 +24610,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EVAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evas >= 1.1.99"` + EVAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "evas >= 1.2.0" 2>&1` else - EVAS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evas >= 1.1.99"` + EVAS_PKG_ERRORS=`$PKG_CONFIG --print-errors "evas >= 1.2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$EVAS_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_evas="no" + have_evas="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_evas="no" else EVAS_CFLAGS=$pkg_cv_EVAS_CFLAGS @@ -24784,8 +24637,7 @@ for ac_header in sys/select.h sys/prctl.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -25106,8 +24958,7 @@ $as_echo "#define HAVE_SYS_TIME_H 1" >>confdefs.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -25121,12 +24972,49 @@ esac # ecore_con -for ac_header in arpa/inet.h arpa/nameser.h netinet/tcp.h net/if.h netinet/in.h sys/socket.h sys/un.h ws2tcpip.h netdb.h +for ac_header in sys/socket.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_socket_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_SOCKET_H 1 +_ACEOF + +fi + +done + +for ac_header in net/if.h +do : + ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" " +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif + +" +if test "x$ac_cv_header_net_if_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NET_IF_H 1 +_ACEOF + +fi + +done + +for ac_header in sys/un.h arpa/inet.h arpa/nameser.h netinet/tcp.h netinet/in.h ws2tcpip.h netdb.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -25326,7 +25214,7 @@ if test "x${_efl_enable_win32_threads}" = "xyes" ; then mingw*) ;; *) - as_fn_error "Win32 threads support requested but non Windows system found." "$LINENO" 5 + as_fn_error $? "Win32 threads support requested but non Windows system found." "$LINENO" 5 ;; esac fi @@ -25334,7 +25222,7 @@ fi if test "x${_efl_enable_posix_threads}" = "xyes" ; then case "$host_os" in mingw*) - as_fn_error "POSIX threads support requested but Windows system found." "$LINENO" 5 + as_fn_error $? "POSIX threads support requested but Windows system found." "$LINENO" 5 ;; *) ;; @@ -25397,7 +25285,7 @@ $as_echo_n "checking whether system support POSIX threads... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_efl_have_posix_threads}" >&5 $as_echo "${_efl_have_posix_threads}" >&6; } if test "$x{_efl_enable_posix_threads}" = "xyes" && test "x${_efl_have_posix_threads}" = "xno"; then - as_fn_error "POSIX threads support requested but not found." "$LINENO" 5 + as_fn_error $? "POSIX threads support requested but not found." "$LINENO" 5 fi EFL_PTHREAD_CFLAGS="" @@ -25497,9 +25385,8 @@ else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (int) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (int) +See \`config.log' for more details" "$LINENO" 5 ; } else ac_cv_sizeof_int=0 fi @@ -25531,9 +25418,8 @@ else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (long) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5 ; } else ac_cv_sizeof_long=0 fi @@ -26149,8 +26035,8 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) - as_fn_error "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 @@ -26351,14 +26237,12 @@ esac ### Checks for library functions - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5 -$as_echo_n "checking for strerror in -lcposix... " >&6; } -if test "${ac_cv_lib_cposix_strerror+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 +$as_echo_n "checking for library containing strerror... " >&6; } +if test "${ac_cv_search_strerror+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcposix $LIBS" + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -26377,22 +26261,37 @@ return strerror (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_cposix_strerror=yes -else - ac_cv_lib_cposix_strerror=no +for ac_lib in '' cposix; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cposix_strerror" >&5 -$as_echo "$ac_cv_lib_cposix_strerror" >&6; } -if test "x$ac_cv_lib_cposix_strerror" = x""yes; then : - LIBS="$LIBS -lcposix" + conftest$ac_exeext + if test "${ac_cv_search_strerror+set}" = set; then : + break fi +done +if test "${ac_cv_search_strerror+set}" = set; then : +else + ac_cv_search_strerror=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 +$as_echo "$ac_cv_search_strerror" >&6; } +ac_res=$ac_cv_search_strerror +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! @@ -26521,8 +26420,7 @@ if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -26588,8 +26486,7 @@ for ac_func in gettimeofday strlcpy execvp do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -26661,7 +26558,7 @@ $as_echo "#define HAVE_ATFILE_SOURCE 1" >>confdefs.h else if test "x${have_atfile_source}" = "xyes" ; then - as_fn_error "required atfile-source but no mkdirat()" "$LINENO" 5 + as_fn_error $? "required atfile-source but no mkdirat()" "$LINENO" 5 fi have_atfile_source="no" @@ -26670,6 +26567,94 @@ done fi +SHM_OPEN_LIBS="" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether shm_open is in libc" >&5 +$as_echo_n "checking whether shm_open is in libc... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +int +main () +{ + +int fd; +fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); +shm_unlink("/"); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + have_shm_open="yes" + +$as_echo "#define HAVE_SHM_OPEN 1" >>confdefs.h + + +else + have_shm_open="no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS="${LIBS_save}" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_shm_open}" >&5 +$as_echo "${have_shm_open}" >&6; } + +if ! test "x${have_shm_open}" = "xyes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether shm_open is in librt" >&5 +$as_echo_n "checking whether shm_open is in librt... " >&6; } + LIBS_save="${LIBS}" + LIBS="${LIBS} -lrt" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include + +int +main () +{ + +int fd; +fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); +shm_unlink("/"); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + have_shm_open="yes" + +$as_echo "#define HAVE_SHM_OPEN 1" >>confdefs.h + + SHM_OPEN_LIBS="-lrt" + +else + have_shm_open="no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${LIBS_save}" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_shm_open}" >&5 +$as_echo "${have_shm_open}" >&6; } +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether shm_open is available" >&5 +$as_echo_n "checking whether shm_open is available... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_shm_open}" >&5 +$as_echo "${have_shm_open}" >&6; } + ### Checks for optionnal feature ac_fn_c_check_func "$LINENO" "mallinfo" "ac_cv_func_mallinfo" if test "x$ac_cv_func_mallinfo" = x""yes; then : @@ -26823,11 +26808,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURL" >&5 $as_echo_n "checking for CURL... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$CURL_CFLAGS"; then - pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$CURL_CFLAGS"; then + pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcurl") 2>&5 ac_status=$? @@ -26837,15 +26821,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$CURL_LIBS"; then - pkg_cv_CURL_LIBS="$CURL_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$CURL_LIBS"; then + pkg_cv_CURL_LIBS="$CURL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcurl") 2>&5 ac_status=$? @@ -26855,14 +26837,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -26870,17 +26853,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcurl"` + CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcurl" 2>&1` else - CURL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcurl"` + CURL_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcurl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CURL_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _ecore_have_curl="no" + _ecore_have_curl="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } _ecore_have_curl="no" else CURL_CFLAGS=$pkg_cv_CURL_CFLAGS @@ -26928,11 +26911,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TLS" >&5 $as_echo_n "checking for TLS... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$TLS_CFLAGS"; then - pkg_cv_TLS_CFLAGS="$TLS_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$TLS_CFLAGS"; then + pkg_cv_TLS_CFLAGS="$TLS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.10.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnutls >= 2.10.2") 2>&5 ac_status=$? @@ -26942,15 +26924,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$TLS_LIBS"; then - pkg_cv_TLS_LIBS="$TLS_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$TLS_LIBS"; then + pkg_cv_TLS_LIBS="$TLS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.10.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnutls >= 2.10.2") 2>&5 ac_status=$? @@ -26960,14 +26940,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -26975,17 +26956,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - TLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gnutls >= 2.10.2"` + TLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gnutls >= 2.10.2" 2>&1` else - TLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.10.2"` + TLS_PKG_ERRORS=`$PKG_CONFIG --print-errors "gnutls >= 2.10.2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$TLS_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _ecore_have_gnutls="no" + _ecore_have_gnutls="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } _ecore_have_gnutls="no" else TLS_CFLAGS=$pkg_cv_TLS_CFLAGS @@ -27005,11 +26986,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TLS2" >&5 $as_echo_n "checking for TLS2... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$TLS2_CFLAGS"; then - pkg_cv_TLS2_CFLAGS="$TLS2_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$TLS2_CFLAGS"; then + pkg_cv_TLS2_CFLAGS="$TLS2_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.10.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnutls >= 2.10.2") 2>&5 ac_status=$? @@ -27019,15 +26999,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$TLS2_LIBS"; then - pkg_cv_TLS2_LIBS="$TLS2_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$TLS2_LIBS"; then + pkg_cv_TLS2_LIBS="$TLS2_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.10.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnutls >= 2.10.2") 2>&5 ac_status=$? @@ -27037,14 +27015,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -27052,17 +27031,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - TLS2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gnutls >= 2.10.2"` + TLS2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gnutls >= 2.10.2" 2>&1` else - TLS2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.10.2"` + TLS2_PKG_ERRORS=`$PKG_CONFIG --print-errors "gnutls >= 2.10.2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$TLS2_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - dummy="no" + dummy="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } dummy="no" else TLS2_CFLAGS=$pkg_cv_TLS2_CFLAGS @@ -27220,11 +27199,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5 $as_echo_n "checking for SSL... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$SSL_CFLAGS"; then - pkg_cv_SSL_CFLAGS="$SSL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$SSL_CFLAGS"; then + pkg_cv_SSL_CFLAGS="$SSL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 ac_status=$? @@ -27234,15 +27212,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$SSL_LIBS"; then - pkg_cv_SSL_LIBS="$SSL_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$SSL_LIBS"; then + pkg_cv_SSL_LIBS="$SSL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 ac_status=$? @@ -27252,14 +27228,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -27267,17 +27244,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "openssl"` + SSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "openssl" 2>&1` else - SSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl"` + SSL_PKG_ERRORS=`$PKG_CONFIG --print-errors "openssl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SSL_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _ecore_have_openssl="no" + _ecore_have_openssl="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } _ecore_have_openssl="no" else SSL_CFLAGS=$pkg_cv_SSL_CFLAGS @@ -27334,46 +27311,44 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CARES" >&5 $as_echo_n "checking for CARES... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$CARES_CFLAGS"; then - pkg_cv_CARES_CFLAGS="$CARES_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares >= 1.6.1 libcares != 1.7.5\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcares >= 1.6.1 libcares != 1.7.5") 2>&5 +if test -n "$CARES_CFLAGS"; then + pkg_cv_CARES_CFLAGS="$CARES_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares >= 1.6.1\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcares >= 1.6.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_CARES_CFLAGS=`$PKG_CONFIG --cflags "libcares >= 1.6.1 libcares != 1.7.5" 2>/dev/null` + pkg_cv_CARES_CFLAGS=`$PKG_CONFIG --cflags "libcares >= 1.6.1" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$CARES_LIBS"; then - pkg_cv_CARES_LIBS="$CARES_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares >= 1.6.1 libcares != 1.7.5\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcares >= 1.6.1 libcares != 1.7.5") 2>&5 +if test -n "$CARES_LIBS"; then + pkg_cv_CARES_LIBS="$CARES_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcares >= 1.6.1\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcares >= 1.6.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_CARES_LIBS=`$PKG_CONFIG --libs "libcares >= 1.6.1 libcares != 1.7.5" 2>/dev/null` + pkg_cv_CARES_LIBS=`$PKG_CONFIG --libs "libcares >= 1.6.1" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -27381,17 +27356,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - CARES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcares >= 1.6.1 libcares != 1.7.5"` + CARES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcares >= 1.6.1" 2>&1` else - CARES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcares >= 1.6.1 libcares != 1.7.5"` + CARES_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcares >= 1.6.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CARES_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _ecore_have_cares="no" + _ecore_have_cares="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } _ecore_have_cares="no" else CARES_CFLAGS=$pkg_cv_CARES_CFLAGS @@ -27481,8 +27456,8 @@ fi if test "x$have_ecore_ipc" = "xyes"; then : - requirements_ecore_ipc="ecore-con >= 1.1.99 ${requirements_ecore_ipc}" - requirements_ecore_evas="ecore-ipc >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_ipc="ecore-con >= 1.2.0 ${requirements_ecore_ipc}" + requirements_ecore_evas="ecore-ipc >= 1.2.0 ${requirements_ecore_evas}" fi @@ -27736,7 +27711,7 @@ fi if test "x${have_ecore_con}" = "xyes" ; then - requirements_ecore_file="ecore-con >= 1.1.99 ${requirements_ecore_file}" + requirements_ecore_file="ecore-con >= 1.2.0 ${requirements_ecore_file}" else _ecore_want_curl=${want_curl} @@ -27760,11 +27735,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURL" >&5 $as_echo_n "checking for CURL... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$CURL_CFLAGS"; then - pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$CURL_CFLAGS"; then + pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcurl") 2>&5 ac_status=$? @@ -27774,15 +27748,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$CURL_LIBS"; then - pkg_cv_CURL_LIBS="$CURL_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$CURL_LIBS"; then + pkg_cv_CURL_LIBS="$CURL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcurl") 2>&5 ac_status=$? @@ -27792,14 +27764,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -27807,17 +27780,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcurl"` + CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcurl" 2>&1` else - CURL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcurl"` + CURL_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcurl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CURL_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - _ecore_have_curl="no" + _ecore_have_curl="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } _ecore_have_curl="no" else CURL_CFLAGS=$pkg_cv_CURL_CFLAGS @@ -27853,7 +27826,7 @@ fi #fi #ECORE_CHECK_MODULE([config], [${want_ecore_config}], [Config], [${ecore_config_deps}], -# [requirements_ecore_config="ecore-ipc >= 1.1.99 evas >= 1.1.99 eet >= 1.5.0 ${requirements_ecore_config}"]) +# [requirements_ecore_config="ecore-ipc >= 1.2.0 evas >= 1.2.0 eet >= 1.6.0 ${requirements_ecore_config}"]) if false; then BUILD_ECORE_CONFIG_TRUE= @@ -27983,7 +27956,7 @@ fi if test "x$have_ecore_imf_evas" = "xyes"; then : - requirements_ecore_imf_evas="ecore-imf >= 1.1.99 evas >= 1.1.99 ${requirements_ecore_imf_evas}" + requirements_ecore_imf_evas="ecore-imf >= 1.2.0 evas >= 1.2.0 ${requirements_ecore_imf_evas}" fi @@ -28103,7 +28076,7 @@ fi if test "x$have_ecore_input_evas" = "xyes"; then : - requirements_ecore_input_evas="ecore-input >= 1.1.99 evas >= 1.1.99 ${requirements_ecore_input}" + requirements_ecore_input_evas="ecore-input >= 1.2.0 evas >= 1.2.0 ${requirements_ecore_input}" fi @@ -28183,7 +28156,7 @@ fi if test "x$have_ecore_imf_xim" = "xyes"; then : - requirements_ecore_imf_xim="ecore-imf >= 1.1.99 ecore-x >= 1.1.99 ecore-input >= 1.1.99 ${requirements_ecore_imf_xim}" + requirements_ecore_imf_xim="ecore-imf >= 1.2.0 ecore-x >= 1.2.0 ecore-input >= 1.2.0 ${requirements_ecore_imf_xim}" fi @@ -28199,11 +28172,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SCIM" >&5 $as_echo_n "checking for SCIM... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$SCIM_CFLAGS"; then - pkg_cv_SCIM_CFLAGS="$SCIM_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$SCIM_CFLAGS"; then + pkg_cv_SCIM_CFLAGS="$SCIM_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"scim\""; } >&5 ($PKG_CONFIG --exists --print-errors "scim") 2>&5 ac_status=$? @@ -28213,15 +28185,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$SCIM_LIBS"; then - pkg_cv_SCIM_LIBS="$SCIM_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$SCIM_LIBS"; then + pkg_cv_SCIM_LIBS="$SCIM_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"scim\""; } >&5 ($PKG_CONFIG --exists --print-errors "scim") 2>&5 ac_status=$? @@ -28231,14 +28201,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -28246,17 +28217,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SCIM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "scim"` + SCIM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "scim" 2>&1` else - SCIM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "scim"` + SCIM_PKG_ERRORS=`$PKG_CONFIG --print-errors "scim" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SCIM_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_scim="no" + have_scim="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_scim="no" else SCIM_CFLAGS=$pkg_cv_SCIM_CFLAGS @@ -28335,7 +28306,7 @@ fi if test "x$have_ecore_imf_scim" = "xyes"; then : - requirements_ecore_imf_scim="ecore-imf >= 1.1.0 ecore-x >= 1.1.0 ecore-input >= 1.1.0 ${requirements_ecore_imf_scim}" + requirements_ecore_imf_scim="ecore-imf >= 1.2.0 ecore-x >= 1.2.0 ecore-input >= 1.2.0 ${requirements_ecore_imf_scim}" fi @@ -28407,7 +28378,7 @@ fi if test "x$have_ecore_x" = "xyes"; then : ecore_x_libs="$ecore_x_libs $x_libs" - requirements_ecore_x="ecore-input >= 1.1.99 ${requirements_ecore_x}" + requirements_ecore_x="ecore-input >= 1.2.0 ${requirements_ecore_x}" fi @@ -28472,7 +28443,7 @@ fi if test "x$have_ecore_win32" = "xyes"; then : ecore_win32_libs="-lole32 -lgdi32" - requirements_ecore_win32="ecore-input >= 1.1.99 ${requirements_ecore_win32}" + requirements_ecore_win32="ecore-input >= 1.2.0 ${requirements_ecore_win32}" fi @@ -28541,7 +28512,7 @@ fi if test "x$have_ecore_cocoa" = "xyes"; then : - requirements_ecore_cocoa="ecore-input >= 1.1.99 ${requirements_ecore_cocoa}" + requirements_ecore_cocoa="ecore-input >= 1.2.0 ${requirements_ecore_cocoa}" fi @@ -28608,7 +28579,7 @@ fi if test "x$have_ecore_sdl" = "xyes"; then : - requirements_ecore_sdl="ecore-input >= 1.1.99 ${requirements_ecore_sdl}" + requirements_ecore_sdl="ecore-input >= 1.2.0 ${requirements_ecore_sdl}" fi @@ -28668,7 +28639,7 @@ fi if test "x$have_ecore_psl1ght" = "xyes"; then : - requirements_ecore_psl1ght="ecore-input >= 1.1.99 ${requirements_ecore_psl1ght}" + requirements_ecore_psl1ght="ecore-input >= 1.2.0 ${requirements_ecore_psl1ght}" fi @@ -28765,11 +28736,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TSLIB" >&5 $as_echo_n "checking for TSLIB... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$TSLIB_CFLAGS"; then - pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$TSLIB_CFLAGS"; then + pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib-1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "tslib-1.0") 2>&5 ac_status=$? @@ -28779,15 +28749,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$TSLIB_LIBS"; then - pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$TSLIB_LIBS"; then + pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib-1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "tslib-1.0") 2>&5 ac_status=$? @@ -28797,14 +28765,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -28812,26 +28781,23 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "tslib-1.0"` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tslib-1.0" 2>&1` else - TSLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "tslib-1.0"` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "tslib-1.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$TSLIB_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TSLIB" >&5 $as_echo_n "checking for TSLIB... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$TSLIB_CFLAGS"; then - pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$TSLIB_CFLAGS"; then + pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib\""; } >&5 ($PKG_CONFIG --exists --print-errors "tslib") 2>&5 ac_status=$? @@ -28841,15 +28807,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$TSLIB_LIBS"; then - pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$TSLIB_LIBS"; then + pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib\""; } >&5 ($PKG_CONFIG --exists --print-errors "tslib") 2>&5 ac_status=$? @@ -28859,14 +28823,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -28874,15 +28839,13 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "tslib"` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tslib" 2>&1` else - TSLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "tslib"` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "tslib" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$TSLIB_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "tslib.h" "ac_cv_header_tslib_h" "$ac_includes_default" if test "x$ac_cv_header_tslib_h" = x""yes; then : @@ -28994,6 +28957,8 @@ fi elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "tslib.h" "ac_cv_header_tslib_h" "$ac_includes_default" if test "x$ac_cv_header_tslib_h" = x""yes; then : @@ -29119,17 +29084,18 @@ $as_echo "#define HAVE_TSLIB 1" >>confdefs.h fi elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TSLIB" >&5 $as_echo_n "checking for TSLIB... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$TSLIB_CFLAGS"; then - pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$TSLIB_CFLAGS"; then + pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib\""; } >&5 ($PKG_CONFIG --exists --print-errors "tslib") 2>&5 ac_status=$? @@ -29139,15 +29105,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$TSLIB_LIBS"; then - pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$TSLIB_LIBS"; then + pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"tslib\""; } >&5 ($PKG_CONFIG --exists --print-errors "tslib") 2>&5 ac_status=$? @@ -29157,14 +29121,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -29172,15 +29137,13 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "tslib"` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tslib" 2>&1` else - TSLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "tslib"` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "tslib" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$TSLIB_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "tslib.h" "ac_cv_header_tslib_h" "$ac_includes_default" if test "x$ac_cv_header_tslib_h" = x""yes; then : @@ -29292,6 +29255,8 @@ fi elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "tslib.h" "ac_cv_header_tslib_h" "$ac_includes_default" if test "x$ac_cv_header_tslib_h" = x""yes; then : @@ -29559,7 +29524,7 @@ fi if test "x$have_ecore_wince" = "xyes"; then : - requirements_ecore_win32="ecore-input >= 1.1.99 ${requirements_ecore_win32}" + requirements_ecore_win32="ecore-input >= 1.2.0 ${requirements_ecore_win32}" fi @@ -29574,7 +29539,7 @@ fi # ecore_evas ecore_evas_deps="no" -if test "x${have_evas}" = "xyes" -a "x${have_ecore_input}" = "xyes" -a "x${have_ecore_input_evas}" = "xyes" ; then +if test "x${have_evas}" = "xyes" && test "x${have_ecore_input}" = "xyes" && test "x${have_ecore_input_evas}" = "xyes" ; then ecore_evas_deps="yes" fi @@ -29628,7 +29593,7 @@ fi if test "x$have_ecore_evas" = "xyes"; then : - requirements_ecore_evas="ecore-input >= 1.1.99 ecore-input-evas >= 1.1.99 evas >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-input >= 1.2.0 ecore-input-evas >= 1.2.0 evas >= 1.2.0 ${requirements_ecore_evas}" fi @@ -29662,9 +29627,9 @@ $as_echo_n "checking whether ecore_evas Software Buffer support is to be built.. { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "xyes" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "xyes" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-software-buffer\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-software-buffer") 2>&5 @@ -29719,9 +29684,9 @@ $as_echo_n "checking whether ecore_evas Software X11 support is to be built... " { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_x}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_x}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-software-x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-software-x11") 2>&5 @@ -29797,9 +29762,9 @@ $as_echo_n "checking whether ecore_evas OpenGL Xlib support is to be built... " { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_x}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_x}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-opengl-x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-opengl-x11") 2>&5 @@ -29849,11 +29814,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_X11" >&5 $as_echo_n "checking for XCB_X11... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_X11_CFLAGS"; then - pkg_cv_XCB_X11_CFLAGS="$XCB_X11_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_X11_CFLAGS"; then + pkg_cv_XCB_X11_CFLAGS="$XCB_X11_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb") 2>&5 ac_status=$? @@ -29863,15 +29827,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_X11_LIBS"; then - pkg_cv_XCB_X11_LIBS="$XCB_X11_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$XCB_X11_LIBS"; then + pkg_cv_XCB_X11_LIBS="$XCB_X11_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb") 2>&5 ac_status=$? @@ -29881,14 +29843,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -29896,17 +29859,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11-xcb"` + XCB_X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11-xcb" 2>&1` else - XCB_X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11-xcb"` + XCB_X11_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11-xcb" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_X11_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_ecore_x_opengl_xcb="no" + have_ecore_x_opengl_xcb="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_ecore_x_opengl_xcb="no" else XCB_X11_CFLAGS=$pkg_cv_XCB_X11_CFLAGS @@ -29954,9 +29917,9 @@ $as_echo_n "checking whether ecore_evas Software Xlib 16 bits support is to be b { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_x_xlib}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_x_xlib}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-software-16-x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-software-16-x11") 2>&5 @@ -30007,9 +29970,9 @@ $as_echo_n "checking whether ecore_evas Software 8bit X11 support is to be built { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x$have_ecore_x_xcb" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x$have_ecore_x_xcb" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-software-8-x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-software-8-x11") 2>&5 @@ -30047,7 +30010,7 @@ if test "x$have_ecore_evas_software_x11" = "xyes" -o \ $as_echo "#define BUILD_ECORE_EVAS_X11 1" >>confdefs.h - requirements_ecore_evas="ecore-x >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-x >= 1.2.0 ${requirements_ecore_evas}" fi # ecore_evas_win32 @@ -30074,9 +30037,9 @@ $as_echo_n "checking whether ecore_evas Software GDI support is to be built... " { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_win32}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_win32}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-software-gdi\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-software-gdi") 2>&5 @@ -30127,9 +30090,9 @@ $as_echo_n "checking whether ecore_evas Software DirectDraw support is to be bui { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_win32}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_win32}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-software-ddraw\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-software-ddraw") 2>&5 @@ -30180,9 +30143,9 @@ $as_echo_n "checking whether ecore_evas Direct3d support is to be built... " >&6 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_win32}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_win32}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-direct3d\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-direct3d") 2>&5 @@ -30233,9 +30196,9 @@ $as_echo_n "checking whether ecore_evas Glew OpenGL support is to be built... " { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_win32}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_win32}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-opengl-glew\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-opengl-glew") 2>&5 @@ -30286,9 +30249,9 @@ $as_echo_n "checking whether ecore_evas 16 bpp Software DirectDraw support is to { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_win32}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_win32}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-software-16-ddraw\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-software-16-ddraw") 2>&5 @@ -30325,64 +30288,21 @@ if test "x${have_ecore_evas_software_gdi}" = "xyes" -o \ $as_echo "#define BUILD_ECORE_EVAS_WIN32 1" >>confdefs.h - requirements_ecore_evas="ecore-win32 >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-win32 >= 1.2.0 ${requirements_ecore_evas}" fi # ecore_evas_software_sdl - - have_ecore_evas_software_sdl="no" -want_module="${want_ecore_evas_software_sdl}" - -# Check whether --enable-ecore-evas-software-sdl was given. -if test "${enable_ecore_evas_software_sdl+set}" = set; then : - enableval=$enable_ecore_evas_software_sdl; - if test "x${enableval}" = "xyes" ; then - want_module="yes" - else - want_module="no" - fi - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ecore_evas Software SDL support is to be built" >&5 -$as_echo_n "checking whether ecore_evas Software SDL support is to be built... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 -$as_echo "${want_module}" >&6; } - -if test "x${have_ecore_sdl}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-software-sdl\""; } >&5 - ($PKG_CONFIG --exists --print-errors "evas-software-sdl") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - +if test "x${have_ecore_sdl}" = "xyes"; then + requirements_ecore_evas="ecore-sdl >= 1.2.0 ${requirements_ecore_evas}" + have_ecore_evas_software_sdl="yes" $as_echo "#define BUILD_ECORE_EVAS_SOFTWARE_SDL 1" >>confdefs.h - have_ecore_evas_software_sdl="yes" - -fi -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ecore_evas Software SDL support is built" >&5 -$as_echo_n "checking whether ecore_evas Software SDL support is built... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ecore_evas_software_sdl" >&5 -$as_echo "$have_ecore_evas_software_sdl" >&6; } - -if test "x$have_ecore_evas_software_sdl" = "xyes"; then : - requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-sdl >= 1.2.0 ${requirements_ecore_evas}" fi - - - - # ecore_evas_gl_sdl @@ -30407,9 +30327,9 @@ $as_echo_n "checking whether ecore_evas OpenGL SDL support is to be built... " > { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_sdl}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_sdl}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-opengl-sdl\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-opengl-sdl") 2>&5 @@ -30431,7 +30351,7 @@ $as_echo_n "checking whether ecore_evas OpenGL SDL support is built... " >&6; } $as_echo "$have_ecore_evas_opengl_sdl" >&6; } if test "x$have_ecore_evas_opengl_sdl" = "xyes"; then : - requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-sdl >= 1.2.0 ${requirements_ecore_evas}" fi @@ -30462,9 +30382,9 @@ $as_echo_n "checking whether ecore_evas OpenGL Cocoa support is to be built... " { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_cocoa}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_cocoa}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-opengl-cocoa\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-opengl-cocoa") 2>&5 @@ -30486,7 +30406,7 @@ $as_echo_n "checking whether ecore_evas OpenGL Cocoa support is built... " >&6; $as_echo "$have_ecore_evas_opengl_cocoa" >&6; } if test "x$have_ecore_evas_opengl_cocoa" = "xyes"; then : - requirements_ecore_evas="ecore-cocoa >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-cocoa >= 1.2.0 ${requirements_ecore_evas}" fi @@ -30517,9 +30437,9 @@ $as_echo_n "checking whether ecore_evas DirectFB support is to be built... " >&6 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_directfb}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_directfb}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-directfb\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-directfb") 2>&5 @@ -30541,7 +30461,7 @@ $as_echo_n "checking whether ecore_evas DirectFB support is built... " >&6; } $as_echo "$have_ecore_evas_directfb" >&6; } if test "x$have_ecore_evas_directfb" = "xyes"; then : - requirements_ecore_evas="ecore-directfb >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-directfb >= 1.2.0 ${requirements_ecore_evas}" fi @@ -30572,9 +30492,9 @@ $as_echo_n "checking whether ecore_evas Linux Framebuffer support is to be built { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_fb}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_fb}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-fb\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-fb") 2>&5 @@ -30596,7 +30516,7 @@ $as_echo_n "checking whether ecore_evas Linux Framebuffer support is built... " $as_echo "$have_ecore_evas_fb" >&6; } if test "x$have_ecore_evas_fb" = "xyes"; then : - requirements_ecore_evas="ecore-fb >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-fb >= 1.2.0 ${requirements_ecore_evas}" fi @@ -30627,9 +30547,9 @@ $as_echo_n "checking whether ecore_evas 16 bpp Software Windows CE support is to { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_wince}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_wince}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-software-16-wince\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-software-16-wince") 2>&5 @@ -30651,7 +30571,7 @@ $as_echo_n "checking whether ecore_evas 16 bpp Software Windows CE support is bu $as_echo "$have_ecore_evas_software_16_wince" >&6; } if test "x$have_ecore_evas_software_16_wince" = "xyes"; then : - requirements_ecore_evas="ecore-wince >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-wince >= 1.2.0 ${requirements_ecore_evas}" fi @@ -30682,9 +30602,9 @@ $as_echo_n "checking whether ecore_evas Ecore Evas Single Process Windowing Syst { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "xyes" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "xyes" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-software-buffer\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-software-buffer") 2>&5 @@ -30713,6 +30633,25 @@ fi +# ecore_evas_extn + +have_extn="yes" +if test "x${have_ecore_ipc}" = "xno" || \ + test "x${have_ecore_evas_software_buffer}" = "xno" || \ + test "x${have_shm_open}" = "xno" ; then + have_extn="no" +fi + +have_ecore_evas_extn="no" +if test "x${want_ecore_evas_extn}" = "xyes" && \ + test "x${have_extn}" = "xyes" && \ + test "x${have_ecore_evas}" = "xyes"; then + +$as_echo "#define BUILD_ECORE_EVAS_EXTN 1" >>confdefs.h + + have_ecore_evas_extn="yes" +fi + # ecore_evas_psl1ght @@ -30737,9 +30676,9 @@ $as_echo_n "checking whether ecore_evas PSL1GHT support is to be built... " >&6; { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_psl1ght}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_psl1ght}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-psl1ght\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-psl1ght") 2>&5 @@ -30761,7 +30700,7 @@ $as_echo_n "checking whether ecore_evas PSL1GHT support is built... " >&6; } $as_echo "$have_ecore_evas_psl1ght" >&6; } if test "x$have_ecore_evas_psl1ght" = "xyes"; then : - requirements_ecore_evas="ecore-psl1ght >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-psl1ght >= 1.2.0 ${requirements_ecore_evas}" fi @@ -30778,46 +30717,44 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAYLAND" >&5 $as_echo_n "checking for WAYLAND... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$WAYLAND_CFLAGS"; then - pkg_cv_WAYLAND_CFLAGS="$WAYLAND_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-client xkbcommon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "wayland-client xkbcommon") 2>&5 +if test -n "$WAYLAND_CFLAGS"; then + pkg_cv_WAYLAND_CFLAGS="$WAYLAND_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"egl wayland-egl wayland-client xkbcommon\""; } >&5 + ($PKG_CONFIG --exists --print-errors "egl wayland-egl wayland-client xkbcommon") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_WAYLAND_CFLAGS=`$PKG_CONFIG --cflags "wayland-client xkbcommon" 2>/dev/null` + pkg_cv_WAYLAND_CFLAGS=`$PKG_CONFIG --cflags "egl wayland-egl wayland-client xkbcommon" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$WAYLAND_LIBS"; then - pkg_cv_WAYLAND_LIBS="$WAYLAND_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-client xkbcommon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "wayland-client xkbcommon") 2>&5 +if test -n "$WAYLAND_LIBS"; then + pkg_cv_WAYLAND_LIBS="$WAYLAND_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"egl wayland-egl wayland-client xkbcommon\""; } >&5 + ($PKG_CONFIG --exists --print-errors "egl wayland-egl wayland-client xkbcommon") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_WAYLAND_LIBS=`$PKG_CONFIG --libs "wayland-client xkbcommon" 2>/dev/null` + pkg_cv_WAYLAND_LIBS=`$PKG_CONFIG --libs "egl wayland-egl wayland-client xkbcommon" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -30825,17 +30762,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - WAYLAND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "wayland-client xkbcommon"` + WAYLAND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "egl wayland-egl wayland-client xkbcommon" 2>&1` else - WAYLAND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "wayland-client xkbcommon"` + WAYLAND_PKG_ERRORS=`$PKG_CONFIG --print-errors "egl wayland-egl wayland-client xkbcommon" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$WAYLAND_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_wayland="no" + have_wayland="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_wayland="no" else WAYLAND_CFLAGS=$pkg_cv_WAYLAND_CFLAGS @@ -30909,7 +30846,7 @@ fi if test "x${have_ecore_wayland}" = "xyes" ; then - requirements_ecore_wayland="ecore-input >= 1.1.0 wayland-client xkbcommon ${requirements_ecore_wayland}" + requirements_ecore_wayland="ecore-input >= 1.2.0 egl wayland-egl wayland-client xkbcommon ${requirements_ecore_wayland}" fi @@ -30934,9 +30871,9 @@ $as_echo_n "checking whether ecore_evas Wayland Shm support is to be built... " { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_wayland}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_wayland}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-wayland-shm\""; } >&5 ($PKG_CONFIG --exists --print-errors "evas-wayland-shm") 2>&5 @@ -30987,12 +30924,12 @@ $as_echo_n "checking whether ecore_evas Wayland Egl support is to be built... " { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_module}" >&5 $as_echo "${want_module}" >&6; } -if test "x${have_ecore_wayland}" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x${have_ecore_wayland}" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-wayland-egl\""; } >&5 - ($PKG_CONFIG --exists --print-errors "evas-wayland-egl") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"evas-wayland-egl egl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "evas-wayland-egl egl") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then @@ -31017,11 +30954,10 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAYLAND_EGL" >&5 $as_echo_n "checking for WAYLAND_EGL... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$WAYLAND_EGL_CFLAGS"; then - pkg_cv_WAYLAND_EGL_CFLAGS="$WAYLAND_EGL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$WAYLAND_EGL_CFLAGS"; then + pkg_cv_WAYLAND_EGL_CFLAGS="$WAYLAND_EGL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-egl\""; } >&5 ($PKG_CONFIG --exists --print-errors "wayland-egl") 2>&5 ac_status=$? @@ -31031,15 +30967,13 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$WAYLAND_EGL_LIBS"; then - pkg_cv_WAYLAND_EGL_LIBS="$WAYLAND_EGL_LIBS" - else - if test -n "$PKG_CONFIG" && \ +if test -n "$WAYLAND_EGL_LIBS"; then + pkg_cv_WAYLAND_EGL_LIBS="$WAYLAND_EGL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wayland-egl\""; } >&5 ($PKG_CONFIG --exists --print-errors "wayland-egl") 2>&5 ac_status=$? @@ -31049,14 +30983,15 @@ if test -n "$PKG_CONFIG"; then else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -31064,17 +30999,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - WAYLAND_EGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "wayland-egl"` + WAYLAND_EGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "wayland-egl" 2>&1` else - WAYLAND_EGL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "wayland-egl"` + WAYLAND_EGL_PKG_ERRORS=`$PKG_CONFIG --print-errors "wayland-egl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$WAYLAND_EGL_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_wayland_egl="no" + have_wayland_egl="no" elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_wayland_egl="no" else WAYLAND_EGL_CFLAGS=$pkg_cv_WAYLAND_EGL_CFLAGS @@ -31093,6 +31028,120 @@ fi +### Unit tests + + + + +# Check whether --enable-tests was given. +if test "${enable_tests+set}" = set; then : + enableval=$enable_tests; + if test "x${enableval}" = "xyes" ; then + _efl_enable_tests="yes" + else + _efl_enable_tests="no" + fi + +else + _efl_enable_tests="no" +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tests are built" >&5 +$as_echo_n "checking whether tests are built... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_efl_enable_tests}" >&5 +$as_echo "${_efl_enable_tests}" >&6; } + + + +if test "x${_efl_enable_tests}" = "xyes" ; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHECK" >&5 +$as_echo_n "checking for CHECK... " >&6; } + +if test -n "$CHECK_CFLAGS"; then + pkg_cv_CHECK_CFLAGS="$CHECK_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.5\""; } >&5 + ($PKG_CONFIG --exists --print-errors "check >= 0.9.5") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CHECK_CFLAGS=`$PKG_CONFIG --cflags "check >= 0.9.5" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CHECK_LIBS"; then + pkg_cv_CHECK_LIBS="$CHECK_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.5\""; } >&5 + ($PKG_CONFIG --exists --print-errors "check >= 0.9.5") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CHECK_LIBS=`$PKG_CONFIG --libs "check >= 0.9.5" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "check >= 0.9.5" 2>&1` + else + CHECK_PKG_ERRORS=`$PKG_CONFIG --print-errors "check >= 0.9.5" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CHECK_PKG_ERRORS" >&5 + + _efl_enable_tests="no" +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _efl_enable_tests="no" +else + CHECK_CFLAGS=$pkg_cv_CHECK_CFLAGS + CHECK_LIBS=$pkg_cv_CHECK_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + dummy="yes" +fi +fi + + if test "x${_efl_enable_tests}" = "xyes"; then + EFL_ENABLE_TESTS_TRUE= + EFL_ENABLE_TESTS_FALSE='#' +else + EFL_ENABLE_TESTS_TRUE='#' + EFL_ENABLE_TESTS_FALSE= +fi + + +if test "x$_efl_enable_tests" = "xyes"; then : + enable_tests="yes" +else + enable_tests="no" +fi + + ### install and build examples @@ -31280,6 +31329,7 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -31303,168 +31353,172 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PO_TRUE}" && test -z "${HAVE_PO_FALSE}"; then - as_fn_error "conditional \"HAVE_PO\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${EFL_ENABLE_TESTS_TRUE}" && test -z "${EFL_ENABLE_TESTS_FALSE}"; then - as_fn_error "conditional \"EFL_ENABLE_TESTS\" was never defined. + as_fn_error $? "conditional \"HAVE_PO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepOBJC_TRUE}" && test -z "${am__fastdepOBJC_FALSE}"; then - as_fn_error "conditional \"am__fastdepOBJC\" was never defined. + as_fn_error $? "conditional \"am__fastdepOBJC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepOBJC_TRUE}" && test -z "${am__fastdepOBJC_FALSE}"; then - as_fn_error "conditional \"am__fastdepOBJC\" was never defined. + as_fn_error $? "conditional \"am__fastdepOBJC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepOBJC_TRUE}" && test -z "${am__fastdepOBJC_FALSE}"; then - as_fn_error "conditional \"am__fastdepOBJC\" was never defined. + as_fn_error $? "conditional \"am__fastdepOBJC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EFL_BUILD_DOC_TRUE}" && test -z "${EFL_BUILD_DOC_FALSE}"; then - as_fn_error "conditional \"EFL_BUILD_DOC\" was never defined. + as_fn_error $? "conditional \"EFL_BUILD_DOC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ECORE_HAVE_EXOTIC_TRUE}" && test -z "${ECORE_HAVE_EXOTIC_FALSE}"; then + as_fn_error $? "conditional \"ECORE_HAVE_EXOTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ECORE_HAVE_WINCE_TRUE}" && test -z "${ECORE_HAVE_WINCE_FALSE}"; then - as_fn_error "conditional \"ECORE_HAVE_WINCE\" was never defined. + as_fn_error $? "conditional \"ECORE_HAVE_WINCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ECORE_HAVE_WIN32_TRUE}" && test -z "${ECORE_HAVE_WIN32_FALSE}"; then - as_fn_error "conditional \"ECORE_HAVE_WIN32\" was never defined. + as_fn_error $? "conditional \"ECORE_HAVE_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ECORE_HAVE_PS3_TRUE}" && test -z "${ECORE_HAVE_PS3_FALSE}"; then - as_fn_error "conditional \"ECORE_HAVE_PS3\" was never defined. + as_fn_error $? "conditional \"ECORE_HAVE_PS3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_X_XLIB_TRUE}" && test -z "${BUILD_ECORE_X_XLIB_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_X_XLIB\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_X_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_X_XCB_TRUE}" && test -z "${BUILD_ECORE_X_XCB_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_X_XCB\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_X_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_CON_TRUE}" && test -z "${BUILD_ECORE_CON_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_CON\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_CON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CARES_TRUE}" && test -z "${HAVE_CARES_FALSE}"; then - as_fn_error "conditional \"HAVE_CARES\" was never defined. + as_fn_error $? "conditional \"HAVE_CARES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_IPC_TRUE}" && test -z "${BUILD_ECORE_IPC_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_IPC\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_IPC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_FILE_TRUE}" && test -z "${BUILD_ECORE_FILE_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_FILE\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_FILE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_CONFIG_TRUE}" && test -z "${BUILD_ECORE_CONFIG_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_CONFIG\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_CONFIG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_IMF_TRUE}" && test -z "${BUILD_ECORE_IMF_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_IMF\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_IMF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_IMF_EVAS_TRUE}" && test -z "${BUILD_ECORE_IMF_EVAS_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_IMF_EVAS\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_IMF_EVAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_INPUT_TRUE}" && test -z "${BUILD_ECORE_INPUT_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_INPUT\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_INPUT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_INPUT_EVAS_TRUE}" && test -z "${BUILD_ECORE_INPUT_EVAS_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_INPUT_EVAS\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_INPUT_EVAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_IMF_XIM_TRUE}" && test -z "${BUILD_ECORE_IMF_XIM_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_IMF_XIM\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_IMF_XIM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_IMF_XIM_TRUE}" && test -z "${BUILD_ECORE_IMF_XIM_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_IMF_XIM\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_IMF_XIM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_IMF_SCIM_TRUE}" && test -z "${BUILD_ECORE_IMF_SCIM_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_IMF_SCIM\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_IMF_SCIM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_IMF_SCIM_TRUE}" && test -z "${BUILD_ECORE_IMF_SCIM_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_IMF_SCIM\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_IMF_SCIM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_X_TRUE}" && test -z "${BUILD_ECORE_X_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_X\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_X\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_WIN32_TRUE}" && test -z "${BUILD_ECORE_WIN32_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_WIN32\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_COCOA_TRUE}" && test -z "${BUILD_ECORE_COCOA_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_COCOA\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_COCOA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_SDL_TRUE}" && test -z "${BUILD_ECORE_SDL_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_SDL\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_SDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_PSL1GHT_TRUE}" && test -z "${BUILD_ECORE_PSL1GHT_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_PSL1GHT\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_PSL1GHT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_FB_TRUE}" && test -z "${BUILD_ECORE_FB_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_FB\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_FB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_DIRECTFB_TRUE}" && test -z "${BUILD_ECORE_DIRECTFB_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_DIRECTFB\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_DIRECTFB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_WINCE_TRUE}" && test -z "${BUILD_ECORE_WINCE_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_WINCE\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_WINCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_EVAS_TRUE}" && test -z "${BUILD_ECORE_EVAS_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_EVAS\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_EVAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ECORE_WAYLAND_TRUE}" && test -z "${BUILD_ECORE_WAYLAND_FALSE}"; then - as_fn_error "conditional \"BUILD_ECORE_WAYLAND\" was never defined. + as_fn_error $? "conditional \"BUILD_ECORE_WAYLAND\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${EFL_ENABLE_TESTS_TRUE}" && test -z "${EFL_ENABLE_TESTS_FALSE}"; then + as_fn_error $? "conditional \"EFL_ENABLE_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EFL_BUILD_EXAMPLES_TRUE}" && test -z "${EFL_BUILD_EXAMPLES_FALSE}"; then - as_fn_error "conditional \"EFL_BUILD_EXAMPLES\" was never defined. + as_fn_error $? "conditional \"EFL_BUILD_EXAMPLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EFL_INSTALL_EXAMPLES_TRUE}" && test -z "${EFL_INSTALL_EXAMPLES_FALSE}"; then - as_fn_error "conditional \"EFL_INSTALL_EXAMPLES\" was never defined. + as_fn_error $? "conditional \"EFL_INSTALL_EXAMPLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -31614,19 +31668,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -31822,7 +31876,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -31875,8 +31929,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ecore $as_me 1.1.99.67344, which was -generated by GNU Autoconf 2.65. Invocation command line was +This file was extended by ecore $as_me 1.2.0-alpha, which was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -31941,11 +31995,11 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ecore config.status 1.1.99.67344 -configured by $0, generated by GNU Autoconf 2.65, +ecore config.status 1.2.0-alpha +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -31963,11 +32017,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -31989,6 +32048,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -32001,7 +32061,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -32010,7 +32070,7 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -32484,7 +32544,7 @@ do "ecore.spec") CONFIG_FILES="$CONFIG_FILES ecore.spec" ;; "$po_makefile_in") CONFIG_FILES="$CONFIG_FILES $po_makefile_in" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done @@ -32522,7 +32582,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -32539,7 +32599,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -32553,18 +32613,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -32653,20 +32713,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -32694,7 +32762,7 @@ for ac_last_try in false false :; do if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -32779,7 +32847,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -32792,7 +32860,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -32820,7 +32888,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -32847,7 +32915,7 @@ $as_echo "$as_me: creating $ac_file" >&6;} case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -32984,22 +33052,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -33010,19 +33078,19 @@ which seems to be undefined. Please make sure it is defined." >&2;} $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -34093,7 +34161,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -34114,7 +34182,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 @@ -34266,6 +34334,7 @@ if test "x${have_ecore_evas}" = "xyes" ; then echo " Sing.Proc. Windowing System: $have_ecore_evas_ews" echo " Wayland Shm................: $have_ecore_evas_wayland_shm" echo " Wayland Egl................: $have_ecore_evas_wayland_egl" + echo " Extn (Plug/socket Extn)....: $have_ecore_evas_extn" fi echo echo " Tests................: ${enable_tests}" diff --git a/libraries/ecore/configure.ac b/libraries/ecore/configure.ac index 21393dd..3d93c9b 100644 --- a/libraries/ecore/configure.ac +++ b/libraries/ecore/configure.ac @@ -1,12 +1,12 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) -m4_define([v_min], [1]) -m4_define([v_mic], [99]) +m4_define([v_min], [2]) +m4_define([v_mic], [0]) m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n' | sed 's/Unversioneddirectory/0/' | tr -d '\n'])) m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))]) ##-- When released, remove the dnl on the below line -dnl m4_undefine([v_rev]) +m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line dnl m4_define([relname], [ver-pre-svn-07]) dnl m4_define([v_rel], [-release relname]) @@ -18,7 +18,7 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([ecore], [v_ver], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([ecore], [v_ver]-alpha, [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.52]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) @@ -174,6 +174,7 @@ want_ecore_evas_directfb="no" want_ecore_evas_fb="no" want_ecore_evas_software_16_wince="no" want_ecore_evas_ews="yes" +want_ecore_evas_extn="yes" want_ecore_evas_wayland_shm="no" want_ecore_evas_wayland_egl="no" @@ -182,11 +183,12 @@ want_ecore_imf_xim="no" want_ecore_imf_scim="no" case "$host_os" in - mingw32ce* | cegcc*) + mingw32ce*) want_ecore_con="no" want_ecore_ipc="no" want_ecore_wince="yes" want_ecore_evas_software_16_wince="yes" + want_ecore_evas_extn="no" ;; mingw*) want_notify_win32="yes" @@ -273,30 +275,6 @@ requirements_ecore_imf_xim="" requirements_ecore_imf_scim="" requirements_ecore_wayland="" -AC_CHECK_DECL([MAXHOSTNAMELEN],[FOUND_MAXHOSTNAMELEN=yes]) - -if test x$FOUND_MAXHOSTNAMELEN != xyes ; then - AC_MSG_CHECKING([for header that defines MAXHOSTNAMELEN]) - - FOUND_MAXHOSTNAMELEN='not found' - - AC_COMPILE_IFELSE( - AC_LANG_PROGRAM([#include ], - [int h = MAXHOSTNAMELEN;]), - [FOUND_MAXHOSTNAMELEN='sys/param.h' - AC_DEFINE(NEED_SYS_PARAM_H,1, - [Define to 1 if you need to define MAXHOSTNAMELEN])]) - - AC_COMPILE_IFELSE( - AC_LANG_PROGRAM([#include ], - [int h = MAXHOSTNAMELEN;]), - [FOUND_MAXHOSTNAMELEN='netdb.h' - AC_DEFINE(NEED_NETDB_H,1, - [Define to 1 if you need to define MAXHOSTNAMELEN])]) - - AC_MSG_RESULT([$FOUND_MAXHOSTNAMELEN]) -fi - ### Additional options to configure want_glib_integration_always=no @@ -377,10 +355,6 @@ if test "x${want_xim}" = "xyes" ; then AC_DEFINE([ENABLE_XIM], [1], [Enable X Input Method]) fi -# Unit tests - -EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"]) - ### Checks for programs m4_ifdef([AC_PROG_OBJC], @@ -499,6 +473,21 @@ case "$host_vendor" in ;; esac + +### Checks for portability layer + +PKG_CHECK_MODULES([EXOTIC], + [exotic], + [enable_exotic="yes"], + [enable_exotic="no"]) + +if test "x${enable_exotic}" = "xyes"; then + requirements_ecore="exotic ${requirements_ecore}" + + AC_DEFINE([HAVE_EXOTIC], [1], [Define to 1 if you have Exotic.]) +fi +AM_CONDITIONAL([ECORE_HAVE_EXOTIC], [test "x${enable_exotic}" = "xyes"]) + AC_SUBST(EFL_ECORE_BUILD) AC_SUBST(EFL_ECORE_CON_BUILD) AC_SUBST(EFL_ECORE_EVAS_BUILD) @@ -549,26 +538,26 @@ AC_SUBST(rt_libs) # Eina library -PKG_CHECK_MODULES(EINA, [eina >= 1.1.0]) +PKG_CHECK_MODULES(EINA, [eina >= 1.2.0]) #FIXME check all the requirements when the eina move will be finished -requirements_ecore="eina >= 1.1.0 ${requirements_ecore}" -requirements_ecore_con="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_con}" -#requirements_ecore_config="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_config}" -requirements_ecore_directfb="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_directfb}" -requirements_ecore_evas="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_evas}" -requirements_ecore_fb="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_fb}" -requirements_ecore_file="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_file}" -requirements_ecore_imf="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_imf}" -requirements_ecore_imf_evas="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_imf_evas}" -requirements_ecore_input="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_input}" -requirements_ecore_input_evas="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_input_evas}" -requirements_ecore_ipc="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_ipc}" -requirements_ecore_cocoa="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_cocoa}" -requirements_ecore_sdl="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_sdl}" -requirements_ecore_psl1ght="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_sdl}" -requirements_ecore_win32="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_win32}" -requirements_ecore_wince="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_wince}" -requirements_ecore_x="ecore >= 1.1.99 eina >= 1.1.0 ${requirements_ecore_x}" +requirements_ecore="eina >= 1.2.0 ${requirements_ecore}" +requirements_ecore_con="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_con}" +#requirements_ecore_config="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_config}" +requirements_ecore_directfb="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_directfb}" +requirements_ecore_evas="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_evas}" +requirements_ecore_fb="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_fb}" +requirements_ecore_file="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_file}" +requirements_ecore_imf="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_imf}" +requirements_ecore_imf_evas="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_imf_evas}" +requirements_ecore_input="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_input}" +requirements_ecore_input_evas="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_input_evas}" +requirements_ecore_ipc="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_ipc}" +requirements_ecore_cocoa="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_cocoa}" +requirements_ecore_sdl="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_sdl}" +requirements_ecore_psl1ght="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_sdl}" +requirements_ecore_win32="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_win32}" +requirements_ecore_wince="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_wince}" +requirements_ecore_x="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_x}" # glib support (main loop integration) @@ -637,6 +626,45 @@ PKG_CHECK_MODULES([DIRECTFB], # Xlib and XCB (ecore_x) +AC_CHECK_DECL([MAXHOSTNAMELEN], [FOUND_MAXHOSTNAMELEN=yes]) + +if test "x${FOUND_MAXHOSTNAMELEN}" != "xyes" ; then + AC_MSG_CHECKING([for header that defines MAXHOSTNAMELEN]) + FOUND_MAXHOSTNAMELEN="not found" + + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM( + [[ +#include + ]], + [[ +int h = MAXHOSTNAMELEN; + ]]) + ], + [ + FOUND_MAXHOSTNAMELEN="sys/param.h" + AC_DEFINE([NEED_SYS_PARAM_H], [1], [Define to 1 if you need to define MAXHOSTNAMELEN]) + ]) + + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM( + [[ +#include + ]], + [[ +int h = MAXHOSTNAMELEN; + ]]) + ], + [ + FOUND_MAXHOSTNAMELEN="netdb.h" + AC_DEFINE([NEED_NETDB_H], [1], [Define to 1 if you need to define MAXHOSTNAMELEN]) + ]) + + AC_MSG_RESULT([$FOUND_MAXHOSTNAMELEN]) +fi + have_x="no" have_ecore_x="no" have_ecore_x_xlib="no" @@ -1171,7 +1199,7 @@ AM_CONDITIONAL(BUILD_ECORE_X_XCB, test $have_ecore_x_xcb = yes) # Evas library (ecore_config, ecore_input_evas, ecore_imf_evas and ecore_evas) -PKG_CHECK_MODULES([EVAS], [evas >= 1.1.99], +PKG_CHECK_MODULES([EVAS], [evas >= 1.2.0], [have_evas="yes"], [have_evas="no"]) @@ -1200,7 +1228,23 @@ esac # ecore_con -AC_CHECK_HEADERS([arpa/inet.h arpa/nameser.h netinet/tcp.h net/if.h netinet/in.h sys/socket.h sys/un.h ws2tcpip.h netdb.h]) +AC_CHECK_HEADERS([sys/socket.h]) +AC_CHECK_HEADERS([net/if.h], [], [], +[ +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +]) +AC_CHECK_HEADERS([sys/un.h arpa/inet.h arpa/nameser.h netinet/tcp.h netinet/in.h ws2tcpip.h netdb.h]) if test "x${ac_cv_header_netdb_h}" = "xyes" ; then have_addrinfo="yes" @@ -1390,6 +1434,60 @@ if ! test "x${have_atfile_source}" = "xno" ; then ]) fi +SHM_OPEN_LIBS="" + +AC_MSG_CHECKING([whether shm_open is in libc]) +AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include +#include + ]], + [[ +int fd; +fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); +shm_unlink("/"); + ]])], + [ + have_shm_open="yes" + AC_DEFINE(HAVE_SHM_OPEN, 1, [Have shm_open() call]) + ], + [have_shm_open="no"]) +LIBS="${LIBS_save}" +AC_MSG_RESULT([${have_shm_open}]) + +if ! test "x${have_shm_open}" = "xyes" ; then + AC_MSG_CHECKING([whether shm_open is in librt]) + LIBS_save="${LIBS}" + LIBS="${LIBS} -lrt" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include +#include + ]], + [[ +int fd; +fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); +shm_unlink("/"); + ]])], + [ + have_shm_open="yes" + AC_DEFINE(HAVE_SHM_OPEN, 1, [Have shm_open() call]) + SHM_OPEN_LIBS="-lrt" + ], + [have_shm_open="no"]) + LIBS="${LIBS_save}" + AC_MSG_RESULT([${have_shm_open}]) +fi + +AC_SUBST([SHM_OPEN_LIBS]) + +AC_MSG_CHECKING([whether shm_open is available]) +AC_MSG_RESULT([${have_shm_open}]) + ### Checks for optionnal feature AC_CHECK_FUNC([mallinfo], [ @@ -1485,8 +1583,8 @@ AM_CONDITIONAL([HAVE_CARES], [test "x${have_cares}" = "xyes"]) # ecore_ipc ECORE_CHECK_MODULE([ipc], [${want_ecore_ipc}], [Ipc], [${have_ecore_con}], [ - requirements_ecore_ipc="ecore-con >= 1.1.99 ${requirements_ecore_ipc}" - requirements_ecore_evas="ecore-ipc >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_ipc="ecore-con >= 1.2.0 ${requirements_ecore_ipc}" + requirements_ecore_evas="ecore-ipc >= 1.2.0 ${requirements_ecore_evas}" ]) # ecore_file @@ -1501,7 +1599,7 @@ if test "x${have_ecore_file}" = "xyes" ; then ECORE_CHECK_NOTIFY_WIN32([${want_notify_win32}], [have_notify_win32="yes"], [have_notify_win32="no"]) if test "x${have_ecore_con}" = "xyes" ; then - requirements_ecore_file="ecore-con >= 1.1.99 ${requirements_ecore_file}" + requirements_ecore_file="ecore-con >= 1.2.0 ${requirements_ecore_file}" else ECORE_CHECK_CURL([${want_curl}], [ @@ -1520,7 +1618,7 @@ fi #fi #ECORE_CHECK_MODULE([config], [${want_ecore_config}], [Config], [${ecore_config_deps}], -# [requirements_ecore_config="ecore-ipc >= 1.1.99 evas >= 1.1.99 eet >= 1.5.0 ${requirements_ecore_config}"]) +# [requirements_ecore_config="ecore-ipc >= 1.2.0 evas >= 1.2.0 eet >= 1.6.0 ${requirements_ecore_config}"]) AM_CONDITIONAL(BUILD_ECORE_CONFIG, false) @@ -1536,12 +1634,12 @@ if test "x${have_ecore_imf}" = "xyes" -a "x${have_evas}" = "xyes" ; then fi ECORE_CHECK_MODULE([imf-evas], [${want_ecore_imf}], [Imf_Evas], [${ecore_imf_evas_deps}], - [requirements_ecore_imf_evas="ecore-imf >= 1.1.99 evas >= 1.1.99 ${requirements_ecore_imf_evas}"]) + [requirements_ecore_imf_evas="ecore-imf >= 1.2.0 evas >= 1.2.0 ${requirements_ecore_imf_evas}"]) # ecore_input{_evas} ECORE_CHECK_MODULE([input], [${want_ecore_input}], [Input]) ECORE_CHECK_MODULE([input-evas], [${want_ecore_input}], [Input_Evas], [${have_evas}], - [requirements_ecore_input_evas="ecore-input >= 1.1.99 evas >= 1.1.99 ${requirements_ecore_input}"]) + [requirements_ecore_input_evas="ecore-input >= 1.2.0 evas >= 1.2.0 ${requirements_ecore_input}"]) # ecore_imf_xim AM_CONDITIONAL(BUILD_ECORE_IMF_XIM, false) @@ -1555,7 +1653,7 @@ if test "x${have_ecore_imf}" = "xyes" \ fi ECORE_CHECK_MODULE([imf-xim], [${want_ecore_imf}], [Imf_XIM], [${ecore_imf_xim_deps}], - [requirements_ecore_imf_xim="ecore-imf >= 1.1.99 ecore-x >= 1.1.99 ecore-input >= 1.1.99 ${requirements_ecore_imf_xim}"]) + [requirements_ecore_imf_xim="ecore-imf >= 1.2.0 ecore-x >= 1.2.0 ecore-input >= 1.2.0 ${requirements_ecore_imf_xim}"]) # ecore_imf_scim PKG_CHECK_MODULES([SCIM], [scim], [have_scim="yes"], [have_scim="no"]) @@ -1571,7 +1669,7 @@ if test "x${have_ecore_imf}" = "xyes" \ fi ECORE_CHECK_MODULE([imf-scim], [${want_ecore_imf}], [Imf_SCIM], [${ecore_imf_scim_deps}], - [requirements_ecore_imf_scim="ecore-imf >= 1.1.0 ecore-x >= 1.1.0 ecore-input >= 1.1.0 ${requirements_ecore_imf_scim}"]) + [requirements_ecore_imf_scim="ecore-imf >= 1.2.0 ecore-x >= 1.2.0 ecore-input >= 1.2.0 ${requirements_ecore_imf_scim}"]) ## Graphic systems @@ -1586,7 +1684,7 @@ fi ECORE_CHECK_MODULE([x], [${want_ecore_x}], [X], [${ecore_x_deps}], [ ecore_x_libs="$ecore_x_libs $x_libs" - requirements_ecore_x="ecore-input >= 1.1.99 ${requirements_ecore_x}" + requirements_ecore_x="ecore-input >= 1.2.0 ${requirements_ecore_x}" ]) # ecore_win32 @@ -1594,7 +1692,7 @@ ECORE_CHECK_MODULE([x], [${want_ecore_x}], [X], [${ecore_x_deps}], ECORE_CHECK_MODULE([win32], [${want_ecore_win32}], [Win32], [${have_ecore_input}], [ ecore_win32_libs="-lole32 -lgdi32" - requirements_ecore_win32="ecore-input >= 1.1.99 ${requirements_ecore_win32}" + requirements_ecore_win32="ecore-input >= 1.2.0 ${requirements_ecore_win32}" ]) AC_SUBST(ecore_win32_libs) @@ -1606,7 +1704,7 @@ if test "x${have_ecore_input}" = "xyes" -a "x${have_cocoa}" = "xyes" ; then fi ECORE_CHECK_MODULE([cocoa], [${want_ecore_cocoa}], [Cocoa], [${ecore_cocoa_deps}], - [requirements_ecore_cocoa="ecore-input >= 1.1.99 ${requirements_ecore_cocoa}"]) + [requirements_ecore_cocoa="ecore-input >= 1.2.0 ${requirements_ecore_cocoa}"]) # ecore_sdl @@ -1616,10 +1714,10 @@ if test "x${have_sdl}" = "xyes" -a "x${have_ecore_input}" = "xyes" ; then fi ECORE_CHECK_MODULE([sdl], [${want_ecore_sdl}], [Sdl], [${ecore_sdl_deps}], - [requirements_ecore_sdl="ecore-input >= 1.1.99 ${requirements_ecore_sdl}"]) + [requirements_ecore_sdl="ecore-input >= 1.2.0 ${requirements_ecore_sdl}"]) ECORE_CHECK_MODULE([psl1ght], [${want_ecore_psl1ght}], [psl1ght], [${ecore_psl1ght_deps}], - [requirements_ecore_psl1ght="ecore-input >= 1.1.99 ${requirements_ecore_psl1ght}"]) + [requirements_ecore_psl1ght="ecore-input >= 1.2.0 ${requirements_ecore_psl1ght}"]) # ecore_fb ECORE_CHECK_MODULE([fb], [${want_ecore_fb}], [FB], [$have_fb]) @@ -1641,19 +1739,19 @@ ECORE_CHECK_MODULE([directfb], [${want_ecore_directfb}], [DirectFB], [${have_dir # ecore_wince ECORE_CHECK_MODULE([wince], [${want_ecore_wince}], [WinCE], [${have_ecore_input}], - [requirements_ecore_win32="ecore-input >= 1.1.99 ${requirements_ecore_win32}"]) + [requirements_ecore_win32="ecore-input >= 1.2.0 ${requirements_ecore_win32}"]) ## Ecore Evas # ecore_evas ecore_evas_deps="no" -if test "x${have_evas}" = "xyes" -a "x${have_ecore_input}" = "xyes" -a "x${have_ecore_input_evas}" = "xyes" ; then +if test "x${have_evas}" = "xyes" && test "x${have_ecore_input}" = "xyes" && test "x${have_ecore_input_evas}" = "xyes" ; then ecore_evas_deps="yes" fi ECORE_CHECK_MODULE([evas], [${want_ecore_evas}], [Evas], [${ecore_evas_deps}], - [requirements_ecore_evas="ecore-input >= 1.1.99 ecore-input-evas >= 1.1.99 evas >= 1.1.99 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-input >= 1.2.0 ecore-input-evas >= 1.2.0 evas >= 1.2.0 ${requirements_ecore_evas}"]) # ecore_evas_buffer @@ -1743,7 +1841,7 @@ if test "x$have_ecore_evas_software_x11" = "xyes" -o \ "x$have_ecore_evas_software_16_x11" = "xyes" -o \ "x$have_ecore_evas_software_xcb" = "xyes"; then AC_DEFINE(BUILD_ECORE_EVAS_X11, 1, [Support for X Window Engines in Ecore_Evas]) - requirements_ecore_evas="ecore-x >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-x >= 1.2.0 ${requirements_ecore_evas}" fi # ecore_evas_win32 @@ -1779,16 +1877,18 @@ if test "x${have_ecore_evas_software_gdi}" = "xyes" -o \ "x${have_ecore_evas_opengl_glew}" = "xyes" -o \ "x${have_ecore_evas_software_16_ddraw}" = "xyes" ; then AC_DEFINE(BUILD_ECORE_EVAS_WIN32, 1, [Support for Win32 Engine in Ecore_Evas]) - requirements_ecore_evas="ecore-win32 >= 1.1.99 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-win32 >= 1.2.0 ${requirements_ecore_evas}" fi # ecore_evas_software_sdl -ECORE_EVAS_CHECK_MODULE([software-sdl], - [${want_ecore_evas_software_sdl}], - [Software SDL], - [${have_ecore_sdl}], - [requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}"]) +have_ecore_evas_software_sdl="no" +if test "x${have_ecore_sdl}" = "xyes"; then + requirements_ecore_evas="ecore-sdl >= 1.2.0 ${requirements_ecore_evas}" + have_ecore_evas_software_sdl="yes" + AC_DEFINE(BUILD_ECORE_EVAS_SOFTWARE_SDL, 1, [Support for Software SDL Engine in Ecore_Evas]) + requirements_ecore_evas="ecore-sdl >= 1.2.0 ${requirements_ecore_evas}" +fi # ecore_evas_gl_sdl @@ -1796,7 +1896,7 @@ ECORE_EVAS_CHECK_MODULE([opengl-sdl], [${want_ecore_evas_gl_sdl}], [OpenGL SDL], [${have_ecore_sdl}], - [requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-sdl >= 1.2.0 ${requirements_ecore_evas}"]) # ecore_evas_cocoa @@ -1804,7 +1904,7 @@ ECORE_EVAS_CHECK_MODULE([opengl-cocoa], [${want_ecore_evas_gl_cocoa}], [OpenGL Cocoa], [${have_ecore_cocoa}], - [requirements_ecore_evas="ecore-cocoa >= 1.1.99 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-cocoa >= 1.2.0 ${requirements_ecore_evas}"]) # ecore_evas_directfb @@ -1812,7 +1912,7 @@ ECORE_EVAS_CHECK_MODULE([directfb], [${want_ecore_evas_directfb}], [DirectFB], [${have_ecore_directfb}], - [requirements_ecore_evas="ecore-directfb >= 1.1.99 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-directfb >= 1.2.0 ${requirements_ecore_evas}"]) # ecore_evas_fb @@ -1820,7 +1920,7 @@ ECORE_EVAS_CHECK_MODULE([fb], [${want_ecore_evas_fb}], [Linux Framebuffer], [${have_ecore_fb}], - [requirements_ecore_evas="ecore-fb >= 1.1.99 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-fb >= 1.2.0 ${requirements_ecore_evas}"]) # ecore_evas_wince @@ -1828,7 +1928,7 @@ ECORE_EVAS_CHECK_MODULE([software-16-wince], [${want_ecore_evas_software_16_wince}], [16 bpp Software Windows CE], [${have_ecore_wince}], - [requirements_ecore_evas="ecore-wince >= 1.1.99 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-wince >= 1.2.0 ${requirements_ecore_evas}"]) # ecore_evas_ews @@ -1837,20 +1937,38 @@ ECORE_EVAS_CHECK_MODULE_FULL([ews], [software-buffer], [Ecore Evas Single Process Windowing System], [yes], []) +# ecore_evas_extn + +have_extn="yes" +if test "x${have_ecore_ipc}" = "xno" || \ + test "x${have_ecore_evas_software_buffer}" = "xno" || \ + test "x${have_shm_open}" = "xno" ; then + have_extn="no" +fi + +dnl THIS IS SPECIAL - dont use normal ECORE_EVAS_CHECK_MODULE +have_ecore_evas_extn="no" +if test "x${want_ecore_evas_extn}" = "xyes" && \ + test "x${have_extn}" = "xyes" && \ + test "x${have_ecore_evas}" = "xyes"; then + AC_DEFINE([BUILD_ECORE_EVAS_EXTN], [1], [Support for Extn Engine in Ecore_Evas]) + have_ecore_evas_extn="yes" +fi + # ecore_evas_psl1ght ECORE_EVAS_CHECK_MODULE([psl1ght], [${want_ecore_evas_psl1ght}], [PSL1GHT], [${have_ecore_psl1ght}], - [requirements_ecore_evas="ecore-psl1ght >= 1.1.99 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-psl1ght >= 1.2.0 ${requirements_ecore_evas}"]) ### WAYLAND ecore_wayland_deps="no" have_wayland="no" if test "x${want_ecore_wayland}" = "xyes" ; then - PKG_CHECK_MODULES([WAYLAND], [wayland-client xkbcommon], [have_wayland="yes"], [have_wayland="no"]) + PKG_CHECK_MODULES([WAYLAND], [egl wayland-egl wayland-client xkbcommon], [have_wayland="yes"], [have_wayland="no"]) fi if test "x${have_ecore_input}" = "xyes" -a "x${have_wayland}" = "xyes" ; then ecore_wayland_deps="yes" @@ -1858,7 +1976,7 @@ fi ECORE_CHECK_MODULE([wayland], [${want_ecore_wayland}], [Wayland], [${ecore_wayland_deps}]) if test "x${have_ecore_wayland}" = "xyes" ; then - requirements_ecore_wayland="ecore-input >= 1.1.0 wayland-client xkbcommon ${requirements_ecore_wayland}" + requirements_ecore_wayland="ecore-input >= 1.2.0 egl wayland-egl wayland-client xkbcommon ${requirements_ecore_wayland}" fi ECORE_EVAS_CHECK_MODULE_FULL([wayland-shm], [wayland-shm], @@ -1867,7 +1985,7 @@ ECORE_EVAS_CHECK_MODULE_FULL([wayland-shm], [wayland-shm], [${have_ecore_wayland}], [requirements_ecore_evas="${requirements_ecore_wayland} ${requirements_ecore_evas}"]) -ECORE_EVAS_CHECK_MODULE_FULL([wayland-egl], [wayland-egl], +ECORE_EVAS_CHECK_MODULE_FULL([wayland-egl], [wayland-egl egl], [${want_ecore_evas_wayland_egl}], [Wayland Egl], [${have_ecore_wayland}], @@ -1878,6 +1996,10 @@ ECORE_EVAS_CHECK_MODULE_FULL([wayland-egl], [wayland-egl], fi ]) +### Unit tests + +EFL_CHECK_TESTS([enable_tests="yes"], [enable_tests="no"]) + ### install and build examples EFL_CHECK_BUILD_EXAMPLES([enable_build_examples="yes"], [enable_build_examples="no"]) @@ -2112,6 +2234,7 @@ if test "x${have_ecore_evas}" = "xyes" ; then echo " Sing.Proc. Windowing System: $have_ecore_evas_ews" echo " Wayland Shm................: $have_ecore_evas_wayland_shm" echo " Wayland Egl................: $have_ecore_evas_wayland_egl" + echo " Extn (Plug/socket Extn)....: $have_ecore_evas_extn" fi echo echo " Tests................: ${enable_tests}" diff --git a/libraries/ecore/doc/Makefile.in b/libraries/ecore/doc/Makefile.in index e71c120..b7593f5 100644 --- a/libraries/ecore/doc/Makefile.in +++ b/libraries/ecore/doc/Makefile.in @@ -48,16 +48,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = ecore.dox Doxyfile CONFIG_CLEAN_VPATH_FILES = @@ -133,6 +132,8 @@ 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@ @@ -188,6 +189,8 @@ 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@ @@ -198,6 +201,7 @@ 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@ diff --git a/libraries/ecore/ecore-win32.pc.in b/libraries/ecore/ecore-win32.pc.in index 17dba6e..ac5ab32 100644 --- a/libraries/ecore/ecore-win32.pc.in +++ b/libraries/ecore/ecore-win32.pc.in @@ -8,5 +8,5 @@ Description: E core library, Win32 module @pkgconfig_requires_private@: @requirements_ecore_win32@ Version: @VERSION@ Libs: -L${libdir} -lecore_win32 -Libs.private: +Libs.private: @WIN32_LIBS@ Cflags: -I${includedir}/ecore-@VMAJ@ diff --git a/libraries/ecore/ecore.pc.in b/libraries/ecore/ecore.pc.in index 950a96b..65c5a11 100644 --- a/libraries/ecore/ecore.pc.in +++ b/libraries/ecore/ecore.pc.in @@ -7,6 +7,6 @@ Name: ecore Description: Ecore event abstraction library @pkgconfig_requires_private@: @requirements_ecore@ Version: @VERSION@ -Libs: -L${libdir} -lecore +Libs: -L${libdir} -lecore @EINA_LIBS@ Libs.private: -lm -Cflags: -I${includedir}/ecore-@VMAJ@ +Cflags: -I${includedir}/ecore-@VMAJ@ @EINA_CFLAGS@ diff --git a/libraries/ecore/ecore.spec b/libraries/ecore/ecore.spec index 475a2d7..c88bf35 100644 --- a/libraries/ecore/ecore.spec +++ b/libraries/ecore/ecore.spec @@ -39,7 +39,7 @@ Summary: Enlightened Core X interface library Name: ecore -Version: 1.1.99.67344 +Version: 1.2.0-alpha Release: %{_rel} License: BSD Group: User Interface/X diff --git a/libraries/ecore/ecore.supp b/libraries/ecore/ecore.supp index 0b10a6c..31dd0e0 100644 --- a/libraries/ecore/ecore.supp +++ b/libraries/ecore/ecore.supp @@ -1,4 +1,4 @@ -# $Id: ecore.supp 11909 2004-10-19 16:40:25Z tsauerbeck $ +# $Id: ecore.supp 35497 2008-08-17 07:44:18Z raster $ # valgrind suppression file for Ecore # { diff --git a/libraries/ecore/ltmain.sh b/libraries/ecore/ltmain.sh index 7ed280b..fa4b1e1 100755 --- a/libraries/ecore/ltmain.sh +++ b/libraries/ecore/ltmain.sh @@ -65,7 +65,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu3 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,7 +73,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" +VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" TIMESTAMP="" package_revision=1.3017 diff --git a/libraries/ecore/m4/ecore_check_module.m4 b/libraries/ecore/m4/ecore_check_module.m4 index 658b42e..01c4e0e 100644 --- a/libraries/ecore/m4/ecore_check_module.m4 +++ b/libraries/ecore/m4/ecore_check_module.m4 @@ -73,9 +73,9 @@ AC_ARG_ENABLE(ecore-evas-$1, AC_MSG_CHECKING([whether ecore_evas $4 support is to be built]) AC_MSG_RESULT([${want_module}]) -if test "x$5" = "xyes" -a \ - "x$have_ecore_evas" = "xyes" -a \ - "x$want_module" = "xyes" ; then +if test "x$5" = "xyes" && \ + test "x$have_ecore_evas" = "xyes" && \ + test "x$want_module" = "xyes" ; then PKG_CHECK_EXISTS([evas-$2], [ AC_DEFINE([BUILD_ECORE_EVAS_]m4_defn([UP]), [1], [Support for $4 Engine in Ecore_Evas]) diff --git a/libraries/ecore/m4/ecore_check_options.m4 b/libraries/ecore/m4/ecore_check_options.m4 index 36792a1..fb7031a 100644 --- a/libraries/ecore/m4/ecore_check_options.m4 +++ b/libraries/ecore/m4/ecore_check_options.m4 @@ -314,7 +314,7 @@ AC_ARG_ENABLE(cares, ]) if test "x${_ecore_want_cares}" = "xyes" -o "x${_ecore_want_cares}" = "xauto" ; then - PKG_CHECK_MODULES([CARES], [libcares >= 1.6.1 libcares != 1.7.5], + PKG_CHECK_MODULES([CARES], [libcares >= 1.6.1], [_ecore_have_cares="yes"], [_ecore_have_cares="no"]) fi diff --git a/libraries/ecore/po/cs.gmo b/libraries/ecore/po/cs.gmo index 44b8f00..4ba668c 100644 Binary files a/libraries/ecore/po/cs.gmo and b/libraries/ecore/po/cs.gmo differ diff --git a/libraries/ecore/po/cs.po b/libraries/ecore/po/cs.po index 436b1a7..4492269 100644 --- a/libraries/ecore/po/cs.po +++ b/libraries/ecore/po/cs.po @@ -5,170 +5,170 @@ msgid "" msgstr "" "Project-Id-Version: ecore\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2012-01-23 23:19+1000\n" +"POT-Creation-Date: 2012-03-17 11:44+0900\n" "PO-Revision-Date: 2011-10-23 01:28+0100\n" "Last-Translator: Daniel Kolesa \n" "Language-Team: Czech \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "X-Generator: Lokalize 1.2\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: src/lib/ecore/ecore_getopt.c:91 +#: src/lib/ecore/ecore_getopt.c:95 msgid "Version:" msgstr "Verze:" -#: src/lib/ecore/ecore_getopt.c:100 +#: src/lib/ecore/ecore_getopt.c:104 msgid "Usage:" msgstr "Použití:" -#: src/lib/ecore/ecore_getopt.c:105 +#: src/lib/ecore/ecore_getopt.c:109 #, c-format msgid "%s [options]\n" msgstr "%s [volby]\n" -#: src/lib/ecore/ecore_getopt.c:260 +#: src/lib/ecore/ecore_getopt.c:264 msgid "Copyright:" msgstr "Copyright:" -#: src/lib/ecore/ecore_getopt.c:272 +#: src/lib/ecore/ecore_getopt.c:276 msgid "License:" msgstr "Licence:" -#: src/lib/ecore/ecore_getopt.c:453 +#: src/lib/ecore/ecore_getopt.c:457 msgid "Type: " msgstr "Typ: " -#: src/lib/ecore/ecore_getopt.c:529 +#: src/lib/ecore/ecore_getopt.c:533 msgid "Default: " msgstr "Výchozí: " -#: src/lib/ecore/ecore_getopt.c:556 +#: src/lib/ecore/ecore_getopt.c:560 msgid "Choices: " msgstr "Možnosti: " -#: src/lib/ecore/ecore_getopt.c:657 +#: src/lib/ecore/ecore_getopt.c:661 msgid "Options:\n" msgstr "Volby:\n" -#: src/lib/ecore/ecore_getopt.c:782 +#: src/lib/ecore/ecore_getopt.c:786 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "CHYBA: neznámá volba --%s.\n" -#: src/lib/ecore/ecore_getopt.c:784 +#: src/lib/ecore/ecore_getopt.c:788 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "CHYBA: neznámá volba -%c.\n" -#: src/lib/ecore/ecore_getopt.c:842 +#: src/lib/ecore/ecore_getopt.c:846 msgid "ERROR: " msgstr "CHYBA: " -#: src/lib/ecore/ecore_getopt.c:925 src/lib/ecore/ecore_getopt.c:1062 -#: src/lib/ecore/ecore_getopt.c:1078 src/lib/ecore/ecore_getopt.c:1093 -#: src/lib/ecore/ecore_getopt.c:1110 src/lib/ecore/ecore_getopt.c:1157 -#: src/lib/ecore/ecore_getopt.c:1277 src/lib/ecore/ecore_getopt.c:1318 +#: src/lib/ecore/ecore_getopt.c:929 src/lib/ecore/ecore_getopt.c:1066 +#: src/lib/ecore/ecore_getopt.c:1082 src/lib/ecore/ecore_getopt.c:1097 +#: src/lib/ecore/ecore_getopt.c:1114 src/lib/ecore/ecore_getopt.c:1161 +#: src/lib/ecore/ecore_getopt.c:1281 src/lib/ecore/ecore_getopt.c:1322 msgid "value has no pointer set.\n" msgstr "hodnota nemá nastaven pointer.\n" -#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 +#: src/lib/ecore/ecore_getopt.c:961 src/lib/ecore/ecore_getopt.c:1181 #, c-format msgid "unknown boolean value %s.\n" msgstr "neznámá boolean hodnota %s.\n" -#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 +#: src/lib/ecore/ecore_getopt.c:1012 src/lib/ecore/ecore_getopt.c:1269 #, c-format msgid "invalid number format %s\n" msgstr "neznámý číselný formát %s\n" -#: src/lib/ecore/ecore_getopt.c:1123 +#: src/lib/ecore/ecore_getopt.c:1127 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "neznámá volba \"%s\". Možné hodnoty jsou: " -#: src/lib/ecore/ecore_getopt.c:1151 +#: src/lib/ecore/ecore_getopt.c:1155 msgid "missing parameter to append.\n" msgstr "chybějící parametr k připojení.\n" -#: src/lib/ecore/ecore_getopt.c:1255 +#: src/lib/ecore/ecore_getopt.c:1259 msgid "could not parse value.\n" msgstr "nemůžu parsovat hodnotu.\n" -#: src/lib/ecore/ecore_getopt.c:1312 +#: src/lib/ecore/ecore_getopt.c:1316 msgid "missing parameter.\n" msgstr "chybějící parametr.\n" -#: src/lib/ecore/ecore_getopt.c:1325 +#: src/lib/ecore/ecore_getopt.c:1329 msgid "missing callback function!\n" msgstr "chybějící callback funkce!\n" -#: src/lib/ecore/ecore_getopt.c:1354 +#: src/lib/ecore/ecore_getopt.c:1358 msgid "no version was defined.\n" msgstr "nebyla definována verze.\n" -#: src/lib/ecore/ecore_getopt.c:1371 +#: src/lib/ecore/ecore_getopt.c:1375 msgid "no copyright was defined.\n" msgstr "nebyl definován copyright.\n" -#: src/lib/ecore/ecore_getopt.c:1388 +#: src/lib/ecore/ecore_getopt.c:1392 msgid "no license was defined.\n" msgstr "nebyla definována licence.\n" -#: src/lib/ecore/ecore_getopt.c:1463 +#: src/lib/ecore/ecore_getopt.c:1467 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "CHYBA: neznámá volba --%s, ignoruji.\n" -#: src/lib/ecore/ecore_getopt.c:1496 +#: src/lib/ecore/ecore_getopt.c:1500 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "CHYBA: volba --%s vyžaduje argument!\n" -#: src/lib/ecore/ecore_getopt.c:1538 +#: src/lib/ecore/ecore_getopt.c:1542 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "CHYBA: neznámá volba -%c, ignoruji.\n" -#: src/lib/ecore/ecore_getopt.c:1576 +#: src/lib/ecore/ecore_getopt.c:1580 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "CHYBA: volba -%c vyžaduje argument!\n" -#: src/lib/ecore/ecore_getopt.c:1785 +#: src/lib/ecore/ecore_getopt.c:1789 msgid "ERROR: no parser provided.\n" msgstr "CHYBA: nebyl poskytnut parser.\n" -#: src/lib/ecore/ecore_getopt.c:1790 +#: src/lib/ecore/ecore_getopt.c:1794 msgid "ERROR: no values provided.\n" msgstr "CHYBA: nebyly poskytnuty hodnoty.\n" -#: src/lib/ecore/ecore_getopt.c:1799 +#: src/lib/ecore/ecore_getopt.c:1803 msgid "ERROR: no arguments provided.\n" msgstr "CHYBA: nebyly poskytnuty argumenty.\n" -#: src/lib/ecore/ecore_getopt.c:1825 +#: src/lib/ecore/ecore_getopt.c:1829 msgid "ERROR: invalid options found." msgstr "CHYBA: nalezeny neplatné volby." -#: src/lib/ecore/ecore_getopt.c:1831 +#: src/lib/ecore/ecore_getopt.c:1835 #, c-format msgid " See --%s.\n" msgstr " Viz --%s.\n" -#: src/lib/ecore/ecore_getopt.c:1833 +#: src/lib/ecore/ecore_getopt.c:1837 #, c-format msgid " See -%c.\n" msgstr " Viz -%c.\n" -#: src/lib/ecore/ecore_getopt.c:1875 +#: src/lib/ecore/ecore_getopt.c:1879 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "CHYBA: neplatná hodnota geometrie '%s'\n" -#: src/lib/ecore/ecore_getopt.c:1903 +#: src/lib/ecore/ecore_getopt.c:1907 #, c-format msgid "ERROR: incorrect size value '%s'\n" msgstr "CHYBA: neplatná hodnota velikosti '%s'\n" diff --git a/libraries/ecore/po/de.gmo b/libraries/ecore/po/de.gmo index b26411f..0507965 100644 Binary files a/libraries/ecore/po/de.gmo and b/libraries/ecore/po/de.gmo differ diff --git a/libraries/ecore/po/de.po b/libraries/ecore/po/de.po index c6072bc..9dacdbf 100644 --- a/libraries/ecore/po/de.po +++ b/libraries/ecore/po/de.po @@ -8,168 +8,168 @@ msgid "" msgstr "" "Project-Id-Version: ecore 0.9.9.063-2\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2012-01-23 23:19+1000\n" +"POT-Creation-Date: 2012-03-17 11:44+0900\n" "PO-Revision-Date: 2010-01-03 21:52+GMT\n" "Last-Translator: Fabian Nowak \n" "Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: de\n" -#: src/lib/ecore/ecore_getopt.c:91 +#: src/lib/ecore/ecore_getopt.c:95 msgid "Version:" msgstr "Version:" -#: src/lib/ecore/ecore_getopt.c:100 +#: src/lib/ecore/ecore_getopt.c:104 msgid "Usage:" msgstr "Aufruf:" -#: src/lib/ecore/ecore_getopt.c:105 +#: src/lib/ecore/ecore_getopt.c:109 #, c-format msgid "%s [options]\n" msgstr "%s [Optionen]\n" -#: src/lib/ecore/ecore_getopt.c:260 +#: src/lib/ecore/ecore_getopt.c:264 msgid "Copyright:" msgstr "Copyright:" -#: src/lib/ecore/ecore_getopt.c:272 +#: src/lib/ecore/ecore_getopt.c:276 msgid "License:" msgstr "Lizenz:" -#: src/lib/ecore/ecore_getopt.c:453 +#: src/lib/ecore/ecore_getopt.c:457 msgid "Type: " msgstr "Typ: " -#: src/lib/ecore/ecore_getopt.c:529 +#: src/lib/ecore/ecore_getopt.c:533 msgid "Default: " msgstr "Standard: " -#: src/lib/ecore/ecore_getopt.c:556 +#: src/lib/ecore/ecore_getopt.c:560 msgid "Choices: " msgstr "Auswahlmöglichkeiten: " -#: src/lib/ecore/ecore_getopt.c:657 +#: src/lib/ecore/ecore_getopt.c:661 msgid "Options:\n" msgstr "Optionen:\n" -#: src/lib/ecore/ecore_getopt.c:782 +#: src/lib/ecore/ecore_getopt.c:786 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "FEHLER: Unbekannte Option --%s\n" -#: src/lib/ecore/ecore_getopt.c:784 +#: src/lib/ecore/ecore_getopt.c:788 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "FEHLER: Unbekannte Option -%c\n" -#: src/lib/ecore/ecore_getopt.c:842 +#: src/lib/ecore/ecore_getopt.c:846 msgid "ERROR: " msgstr "FEHLER: " -#: src/lib/ecore/ecore_getopt.c:925 src/lib/ecore/ecore_getopt.c:1062 -#: src/lib/ecore/ecore_getopt.c:1078 src/lib/ecore/ecore_getopt.c:1093 -#: src/lib/ecore/ecore_getopt.c:1110 src/lib/ecore/ecore_getopt.c:1157 -#: src/lib/ecore/ecore_getopt.c:1277 src/lib/ecore/ecore_getopt.c:1318 +#: src/lib/ecore/ecore_getopt.c:929 src/lib/ecore/ecore_getopt.c:1066 +#: src/lib/ecore/ecore_getopt.c:1082 src/lib/ecore/ecore_getopt.c:1097 +#: src/lib/ecore/ecore_getopt.c:1114 src/lib/ecore/ecore_getopt.c:1161 +#: src/lib/ecore/ecore_getopt.c:1281 src/lib/ecore/ecore_getopt.c:1322 msgid "value has no pointer set.\n" msgstr "kein Zeiger auf Wert gesetzt\n" -#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 +#: src/lib/ecore/ecore_getopt.c:961 src/lib/ecore/ecore_getopt.c:1181 #, c-format msgid "unknown boolean value %s.\n" msgstr "unbekannter boolescher Wert %s\n" -#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 +#: src/lib/ecore/ecore_getopt.c:1012 src/lib/ecore/ecore_getopt.c:1269 #, c-format msgid "invalid number format %s\n" msgstr "ungültiges Zahlenformat %s\n" -#: src/lib/ecore/ecore_getopt.c:1123 +#: src/lib/ecore/ecore_getopt.c:1127 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "ungültige Auswahl \"%s\". Gültige Werte sind: " -#: src/lib/ecore/ecore_getopt.c:1151 +#: src/lib/ecore/ecore_getopt.c:1155 msgid "missing parameter to append.\n" msgstr "fehlender Parameter zum Anhängen.\n" -#: src/lib/ecore/ecore_getopt.c:1255 +#: src/lib/ecore/ecore_getopt.c:1259 msgid "could not parse value.\n" msgstr "Wert kann nicht ausgewertet werden.\n" -#: src/lib/ecore/ecore_getopt.c:1312 +#: src/lib/ecore/ecore_getopt.c:1316 msgid "missing parameter.\n" msgstr "fehlender Parameter.\n" -#: src/lib/ecore/ecore_getopt.c:1325 +#: src/lib/ecore/ecore_getopt.c:1329 msgid "missing callback function!\n" msgstr "fehlende Rückruffunktion!\n" -#: src/lib/ecore/ecore_getopt.c:1354 +#: src/lib/ecore/ecore_getopt.c:1358 msgid "no version was defined.\n" msgstr "es wurde keine Version angegeben.\n" -#: src/lib/ecore/ecore_getopt.c:1371 +#: src/lib/ecore/ecore_getopt.c:1375 msgid "no copyright was defined.\n" msgstr "es wurde kein Copyright angegeben.\n" -#: src/lib/ecore/ecore_getopt.c:1388 +#: src/lib/ecore/ecore_getopt.c:1392 msgid "no license was defined.\n" msgstr "es wurde keine Lizenz angegeben.\n" -#: src/lib/ecore/ecore_getopt.c:1463 +#: src/lib/ecore/ecore_getopt.c:1467 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "FEHLER: Unbekannte Option --%s, ignoriert\n" -#: src/lib/ecore/ecore_getopt.c:1496 +#: src/lib/ecore/ecore_getopt.c:1500 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "FEHLER: Option --%s benötigt ein Argument!\n" -#: src/lib/ecore/ecore_getopt.c:1538 +#: src/lib/ecore/ecore_getopt.c:1542 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "FEHLER: Unbekannte Option -%c, ignoriert\n" -#: src/lib/ecore/ecore_getopt.c:1576 +#: src/lib/ecore/ecore_getopt.c:1580 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "FEHLER: Option -%c benötigt ein Argument!\n" -#: src/lib/ecore/ecore_getopt.c:1785 +#: src/lib/ecore/ecore_getopt.c:1789 msgid "ERROR: no parser provided.\n" msgstr "FEHLER: Kein Parser bereitgestellt.\n" -#: src/lib/ecore/ecore_getopt.c:1790 +#: src/lib/ecore/ecore_getopt.c:1794 msgid "ERROR: no values provided.\n" msgstr "FEHLER: Keine Werte bereitgestellt.\n" -#: src/lib/ecore/ecore_getopt.c:1799 +#: src/lib/ecore/ecore_getopt.c:1803 msgid "ERROR: no arguments provided.\n" msgstr "FEHLER: Keine Argumente bereitgestellt.\n" -#: src/lib/ecore/ecore_getopt.c:1825 +#: src/lib/ecore/ecore_getopt.c:1829 msgid "ERROR: invalid options found." msgstr "FEHLER: Ungültige Optionen gefunden." -#: src/lib/ecore/ecore_getopt.c:1831 +#: src/lib/ecore/ecore_getopt.c:1835 #, c-format msgid " See --%s.\n" msgstr " Siehe --%s\n" -#: src/lib/ecore/ecore_getopt.c:1833 +#: src/lib/ecore/ecore_getopt.c:1837 #, c-format msgid " See -%c.\n" msgstr " Siehe -%c\n" -#: src/lib/ecore/ecore_getopt.c:1875 +#: src/lib/ecore/ecore_getopt.c:1879 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "FEHLER: Falscher Geometriewert \"%s\"\n" -#: src/lib/ecore/ecore_getopt.c:1903 +#: src/lib/ecore/ecore_getopt.c:1907 #, c-format msgid "ERROR: incorrect size value '%s'\n" msgstr "FEHLER: Falscher Größenwert \"%s\"\n" diff --git a/libraries/ecore/po/ecore.pot b/libraries/ecore/po/ecore.pot index 69cbec8..b7e3500 100644 --- a/libraries/ecore/po/ecore.pot +++ b/libraries/ecore/po/ecore.pot @@ -6,169 +6,170 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: ecore 1.1.99.67344\n" +"Project-Id-Version: ecore 1.2.0-alpha\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2012-01-23 23:19+1000\n" +"POT-Creation-Date: 2012-03-17 11:44+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: src/lib/ecore/ecore_getopt.c:91 +#: src/lib/ecore/ecore_getopt.c:95 msgid "Version:" msgstr "" -#: src/lib/ecore/ecore_getopt.c:100 +#: src/lib/ecore/ecore_getopt.c:104 msgid "Usage:" msgstr "" -#: src/lib/ecore/ecore_getopt.c:105 +#: src/lib/ecore/ecore_getopt.c:109 #, c-format msgid "%s [options]\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:260 +#: src/lib/ecore/ecore_getopt.c:264 msgid "Copyright:" msgstr "" -#: src/lib/ecore/ecore_getopt.c:272 +#: src/lib/ecore/ecore_getopt.c:276 msgid "License:" msgstr "" -#: src/lib/ecore/ecore_getopt.c:453 +#: src/lib/ecore/ecore_getopt.c:457 msgid "Type: " msgstr "" -#: src/lib/ecore/ecore_getopt.c:529 +#: src/lib/ecore/ecore_getopt.c:533 msgid "Default: " msgstr "" -#: src/lib/ecore/ecore_getopt.c:556 +#: src/lib/ecore/ecore_getopt.c:560 msgid "Choices: " msgstr "" -#: src/lib/ecore/ecore_getopt.c:657 +#: src/lib/ecore/ecore_getopt.c:661 msgid "Options:\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:782 +#: src/lib/ecore/ecore_getopt.c:786 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:784 +#: src/lib/ecore/ecore_getopt.c:788 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:842 +#: src/lib/ecore/ecore_getopt.c:846 msgid "ERROR: " msgstr "" -#: src/lib/ecore/ecore_getopt.c:925 src/lib/ecore/ecore_getopt.c:1062 -#: src/lib/ecore/ecore_getopt.c:1078 src/lib/ecore/ecore_getopt.c:1093 -#: src/lib/ecore/ecore_getopt.c:1110 src/lib/ecore/ecore_getopt.c:1157 -#: src/lib/ecore/ecore_getopt.c:1277 src/lib/ecore/ecore_getopt.c:1318 +#: src/lib/ecore/ecore_getopt.c:929 src/lib/ecore/ecore_getopt.c:1066 +#: src/lib/ecore/ecore_getopt.c:1082 src/lib/ecore/ecore_getopt.c:1097 +#: src/lib/ecore/ecore_getopt.c:1114 src/lib/ecore/ecore_getopt.c:1161 +#: src/lib/ecore/ecore_getopt.c:1281 src/lib/ecore/ecore_getopt.c:1322 msgid "value has no pointer set.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 +#: src/lib/ecore/ecore_getopt.c:961 src/lib/ecore/ecore_getopt.c:1181 #, c-format msgid "unknown boolean value %s.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 +#: src/lib/ecore/ecore_getopt.c:1012 src/lib/ecore/ecore_getopt.c:1269 #, c-format msgid "invalid number format %s\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1123 +#: src/lib/ecore/ecore_getopt.c:1127 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "" -#: src/lib/ecore/ecore_getopt.c:1151 +#: src/lib/ecore/ecore_getopt.c:1155 msgid "missing parameter to append.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1255 +#: src/lib/ecore/ecore_getopt.c:1259 msgid "could not parse value.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1312 +#: src/lib/ecore/ecore_getopt.c:1316 msgid "missing parameter.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1325 +#: src/lib/ecore/ecore_getopt.c:1329 msgid "missing callback function!\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1354 +#: src/lib/ecore/ecore_getopt.c:1358 msgid "no version was defined.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1371 +#: src/lib/ecore/ecore_getopt.c:1375 msgid "no copyright was defined.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1388 +#: src/lib/ecore/ecore_getopt.c:1392 msgid "no license was defined.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1463 +#: src/lib/ecore/ecore_getopt.c:1467 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1496 +#: src/lib/ecore/ecore_getopt.c:1500 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1538 +#: src/lib/ecore/ecore_getopt.c:1542 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1576 +#: src/lib/ecore/ecore_getopt.c:1580 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1785 +#: src/lib/ecore/ecore_getopt.c:1789 msgid "ERROR: no parser provided.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1790 +#: src/lib/ecore/ecore_getopt.c:1794 msgid "ERROR: no values provided.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1799 +#: src/lib/ecore/ecore_getopt.c:1803 msgid "ERROR: no arguments provided.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1825 +#: src/lib/ecore/ecore_getopt.c:1829 msgid "ERROR: invalid options found." msgstr "" -#: src/lib/ecore/ecore_getopt.c:1831 +#: src/lib/ecore/ecore_getopt.c:1835 #, c-format msgid " See --%s.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1833 +#: src/lib/ecore/ecore_getopt.c:1837 #, c-format msgid " See -%c.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1875 +#: src/lib/ecore/ecore_getopt.c:1879 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1903 +#: src/lib/ecore/ecore_getopt.c:1907 #, c-format msgid "ERROR: incorrect size value '%s'\n" msgstr "" diff --git a/libraries/ecore/po/el.gmo b/libraries/ecore/po/el.gmo index 0f2bac2..2c9ce48 100644 Binary files a/libraries/ecore/po/el.gmo and b/libraries/ecore/po/el.gmo differ diff --git a/libraries/ecore/po/el.po b/libraries/ecore/po/el.po index cdf9cf3..0dd56bd 100644 --- a/libraries/ecore/po/el.po +++ b/libraries/ecore/po/el.po @@ -6,169 +6,169 @@ msgid "" msgstr "" "Project-Id-Version: Ecore\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2012-01-23 23:19+1000\n" +"POT-Creation-Date: 2012-03-17 11:44+0900\n" "PO-Revision-Date: 2011-11-20 22:42+0200\n" "Last-Translator: George Rizopoulos \n" "Language-Team: Greek\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" -#: src/lib/ecore/ecore_getopt.c:91 +#: src/lib/ecore/ecore_getopt.c:95 msgid "Version:" msgstr "Έκδοση:" -#: src/lib/ecore/ecore_getopt.c:100 +#: src/lib/ecore/ecore_getopt.c:104 msgid "Usage:" msgstr "Χρήση:" -#: src/lib/ecore/ecore_getopt.c:105 +#: src/lib/ecore/ecore_getopt.c:109 #, c-format msgid "%s [options]\n" msgstr "%s [επιλογές]\n" -#: src/lib/ecore/ecore_getopt.c:260 +#: src/lib/ecore/ecore_getopt.c:264 msgid "Copyright:" msgstr "Πνευματικά δικαιώματα:" -#: src/lib/ecore/ecore_getopt.c:272 +#: src/lib/ecore/ecore_getopt.c:276 msgid "License:" msgstr "Άδεια:" -#: src/lib/ecore/ecore_getopt.c:453 +#: src/lib/ecore/ecore_getopt.c:457 msgid "Type: " msgstr "Τύπος:" -#: src/lib/ecore/ecore_getopt.c:529 +#: src/lib/ecore/ecore_getopt.c:533 msgid "Default: " msgstr "Προκαθορισμένο:" -#: src/lib/ecore/ecore_getopt.c:556 +#: src/lib/ecore/ecore_getopt.c:560 msgid "Choices: " msgstr "Επιλογές:" -#: src/lib/ecore/ecore_getopt.c:657 +#: src/lib/ecore/ecore_getopt.c:661 msgid "Options:\n" msgstr "Επιλογές:\n" -#: src/lib/ecore/ecore_getopt.c:782 +#: src/lib/ecore/ecore_getopt.c:786 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "ΣΦΑΛΜΑ: άγνωστη επιλογή --%s.\n" -#: src/lib/ecore/ecore_getopt.c:784 +#: src/lib/ecore/ecore_getopt.c:788 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "ΣΦΑΛΜΑ: άγνωστη επιλογή -%c.\n" -#: src/lib/ecore/ecore_getopt.c:842 +#: src/lib/ecore/ecore_getopt.c:846 msgid "ERROR: " msgstr "ΣΦΑΛΜΑ:" -#: src/lib/ecore/ecore_getopt.c:925 src/lib/ecore/ecore_getopt.c:1062 -#: src/lib/ecore/ecore_getopt.c:1078 src/lib/ecore/ecore_getopt.c:1093 -#: src/lib/ecore/ecore_getopt.c:1110 src/lib/ecore/ecore_getopt.c:1157 -#: src/lib/ecore/ecore_getopt.c:1277 src/lib/ecore/ecore_getopt.c:1318 +#: src/lib/ecore/ecore_getopt.c:929 src/lib/ecore/ecore_getopt.c:1066 +#: src/lib/ecore/ecore_getopt.c:1082 src/lib/ecore/ecore_getopt.c:1097 +#: src/lib/ecore/ecore_getopt.c:1114 src/lib/ecore/ecore_getopt.c:1161 +#: src/lib/ecore/ecore_getopt.c:1281 src/lib/ecore/ecore_getopt.c:1322 msgid "value has no pointer set.\n" msgstr "η τιμή δεν έχει δείκτη ορισμένο.\n" -#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 +#: src/lib/ecore/ecore_getopt.c:961 src/lib/ecore/ecore_getopt.c:1181 #, c-format msgid "unknown boolean value %s.\n" msgstr "άγνωστη τιμή boolean %s.\n" -#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 +#: src/lib/ecore/ecore_getopt.c:1012 src/lib/ecore/ecore_getopt.c:1269 #, c-format msgid "invalid number format %s\n" msgstr "άγνωστη μορφή αριθμού %s\n" -#: src/lib/ecore/ecore_getopt.c:1123 +#: src/lib/ecore/ecore_getopt.c:1127 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "μη έγκυρη επιλογή \"%s\". Οι έγκυρες τιμές είναι: " -#: src/lib/ecore/ecore_getopt.c:1151 +#: src/lib/ecore/ecore_getopt.c:1155 msgid "missing parameter to append.\n" msgstr "ελλιπής παράμετρος προς επισύναψη.\n" -#: src/lib/ecore/ecore_getopt.c:1255 +#: src/lib/ecore/ecore_getopt.c:1259 msgid "could not parse value.\n" msgstr "αδυναμία ανάλυσης τιμών.\n" -#: src/lib/ecore/ecore_getopt.c:1312 +#: src/lib/ecore/ecore_getopt.c:1316 msgid "missing parameter.\n" msgstr "ελλιπής παράμετρος.\n" -#: src/lib/ecore/ecore_getopt.c:1325 +#: src/lib/ecore/ecore_getopt.c:1329 msgid "missing callback function!\n" msgstr "λείπει η λειτουργία επανάκλησης!\n" -#: src/lib/ecore/ecore_getopt.c:1354 +#: src/lib/ecore/ecore_getopt.c:1358 msgid "no version was defined.\n" msgstr "δεν έχει οριστεί έκδοση.\n" -#: src/lib/ecore/ecore_getopt.c:1371 +#: src/lib/ecore/ecore_getopt.c:1375 msgid "no copyright was defined.\n" msgstr "δεν έχουν οριστεί πνευματικά δικαιώματα.\n" -#: src/lib/ecore/ecore_getopt.c:1388 +#: src/lib/ecore/ecore_getopt.c:1392 msgid "no license was defined.\n" msgstr "δεν έχει οριστεί άδεια.\n" -#: src/lib/ecore/ecore_getopt.c:1463 +#: src/lib/ecore/ecore_getopt.c:1467 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "ΣΦΑΛΜΑ:άγνωστη επιλογή --%s, αγνοήθηκε.\n" -#: src/lib/ecore/ecore_getopt.c:1496 +#: src/lib/ecore/ecore_getopt.c:1500 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "ΣΦΑΛΜΑ: η επιλογή --%s απαιτεί παραμέτρους!\n" -#: src/lib/ecore/ecore_getopt.c:1538 +#: src/lib/ecore/ecore_getopt.c:1542 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "ΣΦΑΛΜΑ: άγνωστη επιλογή -%c, αγνοήθηκε.\n" -#: src/lib/ecore/ecore_getopt.c:1576 +#: src/lib/ecore/ecore_getopt.c:1580 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "ΣΦAΛΜΑ: η επιλογή -%c απαιτεί μία παράμετρο!\n" -#: src/lib/ecore/ecore_getopt.c:1785 +#: src/lib/ecore/ecore_getopt.c:1789 #, fuzzy msgid "ERROR: no parser provided.\n" msgstr "ΣΦΑΛΜΑ:δεν παρέχεται αναλυτής.\n" -#: src/lib/ecore/ecore_getopt.c:1790 +#: src/lib/ecore/ecore_getopt.c:1794 msgid "ERROR: no values provided.\n" msgstr "ΣΦΑΛΜΑ:δεν έχουν δοθεί τιμές.\n" -#: src/lib/ecore/ecore_getopt.c:1799 +#: src/lib/ecore/ecore_getopt.c:1803 msgid "ERROR: no arguments provided.\n" msgstr "ΣΦΑΛΜΑ:δεν έχουν δοθεί παράμετροι.\n" -#: src/lib/ecore/ecore_getopt.c:1825 +#: src/lib/ecore/ecore_getopt.c:1829 msgid "ERROR: invalid options found." msgstr "ΣΦΑΛΜΑ: βρέθηκαν μη έγκυρες επιλογές." -#: src/lib/ecore/ecore_getopt.c:1831 +#: src/lib/ecore/ecore_getopt.c:1835 #, c-format msgid " See --%s.\n" msgstr " Δείτε --%s.\n" -#: src/lib/ecore/ecore_getopt.c:1833 +#: src/lib/ecore/ecore_getopt.c:1837 #, c-format msgid " See -%c.\n" msgstr " Δείτε -%c.\n" -#: src/lib/ecore/ecore_getopt.c:1875 +#: src/lib/ecore/ecore_getopt.c:1879 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "ΣΦΑΛΜΑ: μη έγκυρη γεωμετρική τιμή '%s'\n" -#: src/lib/ecore/ecore_getopt.c:1903 +#: src/lib/ecore/ecore_getopt.c:1907 #, c-format msgid "ERROR: incorrect size value '%s'\n" msgstr "ΣΦΑΛΜΑ: μη έγκυρη τιμή μεγέθους '%s'\n" diff --git a/libraries/ecore/po/fr.gmo b/libraries/ecore/po/fr.gmo index 2669256..766db87 100644 Binary files a/libraries/ecore/po/fr.gmo and b/libraries/ecore/po/fr.gmo differ diff --git a/libraries/ecore/po/fr.po b/libraries/ecore/po/fr.po index 6c752c1..3435366 100644 --- a/libraries/ecore/po/fr.po +++ b/libraries/ecore/po/fr.po @@ -6,172 +6,172 @@ msgid "" msgstr "" "Project-Id-Version: Ecore\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2012-01-23 23:19+1000\n" +"POT-Creation-Date: 2012-03-17 11:44+0900\n" "PO-Revision-Date: 2010-07-11 11:01+0400\n" "Last-Translator: batden \n" "Language-Team: Enlightenment French Team \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "Plural-Forms: nplurals=2; plural=n>1;\n" "X-Poedit-Language: French\n" "X-Poedit-Country: FRANCE\n" "X-Poedit-SourceCharset: utf-8\n" -#: src/lib/ecore/ecore_getopt.c:91 +#: src/lib/ecore/ecore_getopt.c:95 msgid "Version:" msgstr "Version :" -#: src/lib/ecore/ecore_getopt.c:100 +#: src/lib/ecore/ecore_getopt.c:104 msgid "Usage:" msgstr "Usage :" -#: src/lib/ecore/ecore_getopt.c:105 +#: src/lib/ecore/ecore_getopt.c:109 #, c-format msgid "%s [options]\n" msgstr "%s [options]\n" -#: src/lib/ecore/ecore_getopt.c:260 +#: src/lib/ecore/ecore_getopt.c:264 msgid "Copyright:" msgstr "Copyright :" -#: src/lib/ecore/ecore_getopt.c:272 +#: src/lib/ecore/ecore_getopt.c:276 msgid "License:" msgstr "Licence :" -#: src/lib/ecore/ecore_getopt.c:453 +#: src/lib/ecore/ecore_getopt.c:457 msgid "Type: " msgstr "Type : " -#: src/lib/ecore/ecore_getopt.c:529 +#: src/lib/ecore/ecore_getopt.c:533 msgid "Default: " msgstr "Par défaut :" -#: src/lib/ecore/ecore_getopt.c:556 +#: src/lib/ecore/ecore_getopt.c:560 msgid "Choices: " msgstr "Choix :" -#: src/lib/ecore/ecore_getopt.c:657 +#: src/lib/ecore/ecore_getopt.c:661 msgid "Options:\n" msgstr "Options :\n" -#: src/lib/ecore/ecore_getopt.c:782 +#: src/lib/ecore/ecore_getopt.c:786 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "ERREUR : option inconnue --%s.\n" -#: src/lib/ecore/ecore_getopt.c:784 +#: src/lib/ecore/ecore_getopt.c:788 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "ERREUR : option inconnue -%c.\n" -#: src/lib/ecore/ecore_getopt.c:842 +#: src/lib/ecore/ecore_getopt.c:846 msgid "ERROR: " msgstr "ERREUR :" -#: src/lib/ecore/ecore_getopt.c:925 src/lib/ecore/ecore_getopt.c:1062 -#: src/lib/ecore/ecore_getopt.c:1078 src/lib/ecore/ecore_getopt.c:1093 -#: src/lib/ecore/ecore_getopt.c:1110 src/lib/ecore/ecore_getopt.c:1157 -#: src/lib/ecore/ecore_getopt.c:1277 src/lib/ecore/ecore_getopt.c:1318 +#: src/lib/ecore/ecore_getopt.c:929 src/lib/ecore/ecore_getopt.c:1066 +#: src/lib/ecore/ecore_getopt.c:1082 src/lib/ecore/ecore_getopt.c:1097 +#: src/lib/ecore/ecore_getopt.c:1114 src/lib/ecore/ecore_getopt.c:1161 +#: src/lib/ecore/ecore_getopt.c:1281 src/lib/ecore/ecore_getopt.c:1322 msgid "value has no pointer set.\n" msgstr "la valeur n'a aucun pointeur défini.\n" -#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 +#: src/lib/ecore/ecore_getopt.c:961 src/lib/ecore/ecore_getopt.c:1181 #, c-format msgid "unknown boolean value %s.\n" msgstr "valeur booléenne inconnue %s.\n" -#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 +#: src/lib/ecore/ecore_getopt.c:1012 src/lib/ecore/ecore_getopt.c:1269 #, c-format msgid "invalid number format %s\n" msgstr "format du nombre non valide %s\n" -#: src/lib/ecore/ecore_getopt.c:1123 +#: src/lib/ecore/ecore_getopt.c:1127 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "choix non valide « %s ». Les valeurs valides sont : " -#: src/lib/ecore/ecore_getopt.c:1151 +#: src/lib/ecore/ecore_getopt.c:1155 msgid "missing parameter to append.\n" msgstr "paramètre manquant à ajouter.\n" -#: src/lib/ecore/ecore_getopt.c:1255 +#: src/lib/ecore/ecore_getopt.c:1259 msgid "could not parse value.\n" msgstr "analyse de la valeur impossible.\n" -#: src/lib/ecore/ecore_getopt.c:1312 +#: src/lib/ecore/ecore_getopt.c:1316 msgid "missing parameter.\n" msgstr "paramètre manquant.\n" -#: src/lib/ecore/ecore_getopt.c:1325 +#: src/lib/ecore/ecore_getopt.c:1329 msgid "missing callback function!\n" msgstr "fonction de rappel manquante !\n" -#: src/lib/ecore/ecore_getopt.c:1354 +#: src/lib/ecore/ecore_getopt.c:1358 msgid "no version was defined.\n" msgstr "aucune version n'est définie.\n" -#: src/lib/ecore/ecore_getopt.c:1371 +#: src/lib/ecore/ecore_getopt.c:1375 msgid "no copyright was defined.\n" msgstr "aucun copyright n'est défini.\n" -#: src/lib/ecore/ecore_getopt.c:1388 +#: src/lib/ecore/ecore_getopt.c:1392 msgid "no license was defined.\n" msgstr "aucune licence n'est définie.\n" -#: src/lib/ecore/ecore_getopt.c:1463 +#: src/lib/ecore/ecore_getopt.c:1467 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "ERREUR : option inconnue --%s, non prise en compte.\n" -#: src/lib/ecore/ecore_getopt.c:1496 +#: src/lib/ecore/ecore_getopt.c:1500 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "ERREUR : l'option --%s requiert un argument !\n" -#: src/lib/ecore/ecore_getopt.c:1538 +#: src/lib/ecore/ecore_getopt.c:1542 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "ERREUR : option inconnue -%c, non prise en compte.\n" -#: src/lib/ecore/ecore_getopt.c:1576 +#: src/lib/ecore/ecore_getopt.c:1580 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "ERREUR : l'option -%c requiert un argument !\n" -#: src/lib/ecore/ecore_getopt.c:1785 +#: src/lib/ecore/ecore_getopt.c:1789 msgid "ERROR: no parser provided.\n" msgstr "ERREUR : aucun analyseur n'est fourni.\n" -#: src/lib/ecore/ecore_getopt.c:1790 +#: src/lib/ecore/ecore_getopt.c:1794 msgid "ERROR: no values provided.\n" msgstr "ERREUR : aucune valeur n'est fournie.\n" -#: src/lib/ecore/ecore_getopt.c:1799 +#: src/lib/ecore/ecore_getopt.c:1803 msgid "ERROR: no arguments provided.\n" msgstr "ERREUR : aucun argument n'est fourni.\n" -#: src/lib/ecore/ecore_getopt.c:1825 +#: src/lib/ecore/ecore_getopt.c:1829 msgid "ERROR: invalid options found." msgstr "ERREUR : options non valides détectées." -#: src/lib/ecore/ecore_getopt.c:1831 +#: src/lib/ecore/ecore_getopt.c:1835 #, c-format msgid " See --%s.\n" msgstr " Voir --%s.\n" -#: src/lib/ecore/ecore_getopt.c:1833 +#: src/lib/ecore/ecore_getopt.c:1837 #, c-format msgid " See -%c.\n" msgstr " Voir -%c.\n" -#: src/lib/ecore/ecore_getopt.c:1875 +#: src/lib/ecore/ecore_getopt.c:1879 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "ERREUR : valeur géométrique incorrecte « %s »\n" -#: src/lib/ecore/ecore_getopt.c:1903 +#: src/lib/ecore/ecore_getopt.c:1907 #, c-format msgid "ERROR: incorrect size value '%s'\n" msgstr "ERREUR : valeur de taille incorrecte « %s »\n" diff --git a/libraries/ecore/po/it.gmo b/libraries/ecore/po/it.gmo index 3361b47..3a83e76 100644 Binary files a/libraries/ecore/po/it.gmo and b/libraries/ecore/po/it.gmo differ diff --git a/libraries/ecore/po/it.po b/libraries/ecore/po/it.po index b4ff61d..45ceb9f 100644 --- a/libraries/ecore/po/it.po +++ b/libraries/ecore/po/it.po @@ -6,168 +6,168 @@ msgid "" msgstr "" "Project-Id-Version: Ecore\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2012-01-23 23:19+1000\n" +"POT-Creation-Date: 2012-03-17 11:44+0900\n" "PO-Revision-Date: 2009-10-27 19:36+0100\n" "Last-Translator: quaker66 \n" "Language-Team: none\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" -#: src/lib/ecore/ecore_getopt.c:91 +#: src/lib/ecore/ecore_getopt.c:95 msgid "Version:" msgstr "Versione:" -#: src/lib/ecore/ecore_getopt.c:100 +#: src/lib/ecore/ecore_getopt.c:104 msgid "Usage:" msgstr "Uso:" -#: src/lib/ecore/ecore_getopt.c:105 +#: src/lib/ecore/ecore_getopt.c:109 #, c-format msgid "%s [options]\n" msgstr "%s [opzioni]\n" -#: src/lib/ecore/ecore_getopt.c:260 +#: src/lib/ecore/ecore_getopt.c:264 msgid "Copyright:" msgstr "Copyright:" -#: src/lib/ecore/ecore_getopt.c:272 +#: src/lib/ecore/ecore_getopt.c:276 msgid "License:" msgstr "Licenza:" -#: src/lib/ecore/ecore_getopt.c:453 +#: src/lib/ecore/ecore_getopt.c:457 msgid "Type: " msgstr "Tipo: " -#: src/lib/ecore/ecore_getopt.c:529 +#: src/lib/ecore/ecore_getopt.c:533 msgid "Default: " msgstr "Predefinito:" -#: src/lib/ecore/ecore_getopt.c:556 +#: src/lib/ecore/ecore_getopt.c:560 msgid "Choices: " msgstr "Scelte:" -#: src/lib/ecore/ecore_getopt.c:657 +#: src/lib/ecore/ecore_getopt.c:661 msgid "Options:\n" msgstr "Opzioni:\n" -#: src/lib/ecore/ecore_getopt.c:782 +#: src/lib/ecore/ecore_getopt.c:786 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "ERRORE: opzione sconosciuta --%s.\n" -#: src/lib/ecore/ecore_getopt.c:784 +#: src/lib/ecore/ecore_getopt.c:788 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "ERRORE: opzione sconosciuta -%c.\n" -#: src/lib/ecore/ecore_getopt.c:842 +#: src/lib/ecore/ecore_getopt.c:846 msgid "ERROR: " msgstr "ERRORE:" -#: src/lib/ecore/ecore_getopt.c:925 src/lib/ecore/ecore_getopt.c:1062 -#: src/lib/ecore/ecore_getopt.c:1078 src/lib/ecore/ecore_getopt.c:1093 -#: src/lib/ecore/ecore_getopt.c:1110 src/lib/ecore/ecore_getopt.c:1157 -#: src/lib/ecore/ecore_getopt.c:1277 src/lib/ecore/ecore_getopt.c:1318 +#: src/lib/ecore/ecore_getopt.c:929 src/lib/ecore/ecore_getopt.c:1066 +#: src/lib/ecore/ecore_getopt.c:1082 src/lib/ecore/ecore_getopt.c:1097 +#: src/lib/ecore/ecore_getopt.c:1114 src/lib/ecore/ecore_getopt.c:1161 +#: src/lib/ecore/ecore_getopt.c:1281 src/lib/ecore/ecore_getopt.c:1322 msgid "value has no pointer set.\n" msgstr "il valore non ha puntatori impostati.\n" -#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 +#: src/lib/ecore/ecore_getopt.c:961 src/lib/ecore/ecore_getopt.c:1181 #, c-format msgid "unknown boolean value %s.\n" msgstr "valore booleano sconosciuto %s.\n" -#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 +#: src/lib/ecore/ecore_getopt.c:1012 src/lib/ecore/ecore_getopt.c:1269 #, c-format msgid "invalid number format %s\n" msgstr "formato numero non valido %s\n" -#: src/lib/ecore/ecore_getopt.c:1123 +#: src/lib/ecore/ecore_getopt.c:1127 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "scelta non valida \"%s\". I valori ammessi sono: " -#: src/lib/ecore/ecore_getopt.c:1151 +#: src/lib/ecore/ecore_getopt.c:1155 msgid "missing parameter to append.\n" msgstr "parametro da appendere mancante.\n" -#: src/lib/ecore/ecore_getopt.c:1255 +#: src/lib/ecore/ecore_getopt.c:1259 msgid "could not parse value.\n" msgstr "impossibile il parsing del valore.\n" -#: src/lib/ecore/ecore_getopt.c:1312 +#: src/lib/ecore/ecore_getopt.c:1316 msgid "missing parameter.\n" msgstr "parametro mancante.\n" -#: src/lib/ecore/ecore_getopt.c:1325 +#: src/lib/ecore/ecore_getopt.c:1329 msgid "missing callback function!\n" msgstr "funzione callback mancante!\n" -#: src/lib/ecore/ecore_getopt.c:1354 +#: src/lib/ecore/ecore_getopt.c:1358 msgid "no version was defined.\n" msgstr "nessuna versione definita.\n" -#: src/lib/ecore/ecore_getopt.c:1371 +#: src/lib/ecore/ecore_getopt.c:1375 msgid "no copyright was defined.\n" msgstr "nessun copyright definito.\n" -#: src/lib/ecore/ecore_getopt.c:1388 +#: src/lib/ecore/ecore_getopt.c:1392 msgid "no license was defined.\n" msgstr "nessuna licenza definita.\n" -#: src/lib/ecore/ecore_getopt.c:1463 +#: src/lib/ecore/ecore_getopt.c:1467 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "ERRORE: opzione sconosciuta --%s, ignorata.\n" -#: src/lib/ecore/ecore_getopt.c:1496 +#: src/lib/ecore/ecore_getopt.c:1500 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "ERRORE: l'opzione --%s richiede un argomento!\n" -#: src/lib/ecore/ecore_getopt.c:1538 +#: src/lib/ecore/ecore_getopt.c:1542 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "ERRORE: opzione sconosciuta -%c, ignorata.\n" -#: src/lib/ecore/ecore_getopt.c:1576 +#: src/lib/ecore/ecore_getopt.c:1580 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "ERRORE: l'opzione -%c richiede un argomento!\n" -#: src/lib/ecore/ecore_getopt.c:1785 +#: src/lib/ecore/ecore_getopt.c:1789 msgid "ERROR: no parser provided.\n" msgstr "ERRORE: nessun parser fornito.\n" -#: src/lib/ecore/ecore_getopt.c:1790 +#: src/lib/ecore/ecore_getopt.c:1794 msgid "ERROR: no values provided.\n" msgstr "ERRORE: nessun valore fornito.\n" -#: src/lib/ecore/ecore_getopt.c:1799 +#: src/lib/ecore/ecore_getopt.c:1803 msgid "ERROR: no arguments provided.\n" msgstr "ERRORE: nessun argomento fornito.\n" -#: src/lib/ecore/ecore_getopt.c:1825 +#: src/lib/ecore/ecore_getopt.c:1829 msgid "ERROR: invalid options found." msgstr "ERRORE: trovate opzioni non valide." -#: src/lib/ecore/ecore_getopt.c:1831 +#: src/lib/ecore/ecore_getopt.c:1835 #, c-format msgid " See --%s.\n" msgstr " Vedere --%s.\n" -#: src/lib/ecore/ecore_getopt.c:1833 +#: src/lib/ecore/ecore_getopt.c:1837 #, c-format msgid " See -%c.\n" msgstr " Vedere -%c.\n" -#: src/lib/ecore/ecore_getopt.c:1875 +#: src/lib/ecore/ecore_getopt.c:1879 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "ERRORE: valore geometrico non corretto '%s'\n" -#: src/lib/ecore/ecore_getopt.c:1903 +#: src/lib/ecore/ecore_getopt.c:1907 #, c-format msgid "ERROR: incorrect size value '%s'\n" msgstr "ERRORE: valore dimensione non corretto '%s'\n" diff --git a/libraries/ecore/po/nl.gmo b/libraries/ecore/po/nl.gmo index 746f7df..babde95 100644 Binary files a/libraries/ecore/po/nl.gmo and b/libraries/ecore/po/nl.gmo differ diff --git a/libraries/ecore/po/nl.po b/libraries/ecore/po/nl.po index 04e3256..54785e2 100644 --- a/libraries/ecore/po/nl.po +++ b/libraries/ecore/po/nl.po @@ -6,170 +6,170 @@ msgid "" msgstr "" "Project-Id-Version: Ecore\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2012-01-23 23:19+1000\n" +"POT-Creation-Date: 2012-03-17 11:44+0900\n" "PO-Revision-Date: 2011-09-03 15:48+0100\n" "Last-Translator: Heimen Stoffels \n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "X-Poedit-Language: NL\n" "X-Poedit-Country: Nederland\n" -#: src/lib/ecore/ecore_getopt.c:91 +#: src/lib/ecore/ecore_getopt.c:95 msgid "Version:" msgstr "Versie:" -#: src/lib/ecore/ecore_getopt.c:100 +#: src/lib/ecore/ecore_getopt.c:104 msgid "Usage:" msgstr "Gebruik:" -#: src/lib/ecore/ecore_getopt.c:105 +#: src/lib/ecore/ecore_getopt.c:109 #, c-format msgid "%s [options]\n" msgstr "%s [opties]\n" -#: src/lib/ecore/ecore_getopt.c:260 +#: src/lib/ecore/ecore_getopt.c:264 msgid "Copyright:" msgstr "Copyright:" -#: src/lib/ecore/ecore_getopt.c:272 +#: src/lib/ecore/ecore_getopt.c:276 msgid "License:" msgstr "Licentie:" -#: src/lib/ecore/ecore_getopt.c:453 +#: src/lib/ecore/ecore_getopt.c:457 msgid "Type: " msgstr "Type:" -#: src/lib/ecore/ecore_getopt.c:529 +#: src/lib/ecore/ecore_getopt.c:533 msgid "Default: " msgstr "Standaard:" -#: src/lib/ecore/ecore_getopt.c:556 +#: src/lib/ecore/ecore_getopt.c:560 msgid "Choices: " msgstr "Keuzes:" -#: src/lib/ecore/ecore_getopt.c:657 +#: src/lib/ecore/ecore_getopt.c:661 msgid "Options:\n" msgstr "Opties:\n" -#: src/lib/ecore/ecore_getopt.c:782 +#: src/lib/ecore/ecore_getopt.c:786 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "FOUT: onbekende optie --%s.\n" -#: src/lib/ecore/ecore_getopt.c:784 +#: src/lib/ecore/ecore_getopt.c:788 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "FOUT: onbekende optie -%c.\n" -#: src/lib/ecore/ecore_getopt.c:842 +#: src/lib/ecore/ecore_getopt.c:846 msgid "ERROR: " msgstr "FOUT:" -#: src/lib/ecore/ecore_getopt.c:925 src/lib/ecore/ecore_getopt.c:1062 -#: src/lib/ecore/ecore_getopt.c:1078 src/lib/ecore/ecore_getopt.c:1093 -#: src/lib/ecore/ecore_getopt.c:1110 src/lib/ecore/ecore_getopt.c:1157 -#: src/lib/ecore/ecore_getopt.c:1277 src/lib/ecore/ecore_getopt.c:1318 +#: src/lib/ecore/ecore_getopt.c:929 src/lib/ecore/ecore_getopt.c:1066 +#: src/lib/ecore/ecore_getopt.c:1082 src/lib/ecore/ecore_getopt.c:1097 +#: src/lib/ecore/ecore_getopt.c:1114 src/lib/ecore/ecore_getopt.c:1161 +#: src/lib/ecore/ecore_getopt.c:1281 src/lib/ecore/ecore_getopt.c:1322 msgid "value has no pointer set.\n" msgstr "waarde heeft geen pointer ingsteld.\n" -#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 +#: src/lib/ecore/ecore_getopt.c:961 src/lib/ecore/ecore_getopt.c:1181 #, c-format msgid "unknown boolean value %s.\n" msgstr "onbekende boolean-waarde %s.\n" -#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 +#: src/lib/ecore/ecore_getopt.c:1012 src/lib/ecore/ecore_getopt.c:1269 #, c-format msgid "invalid number format %s\n" msgstr "ongeldig nummerformaat %s\n" -#: src/lib/ecore/ecore_getopt.c:1123 +#: src/lib/ecore/ecore_getopt.c:1127 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "ongeldige keuze \"%s\". Geldige waardes zijn:" -#: src/lib/ecore/ecore_getopt.c:1151 +#: src/lib/ecore/ecore_getopt.c:1155 msgid "missing parameter to append.\n" msgstr "parameter om toe te wijzen ontbreekt.\n" -#: src/lib/ecore/ecore_getopt.c:1255 +#: src/lib/ecore/ecore_getopt.c:1259 msgid "could not parse value.\n" msgstr "kon waarde niet doorvoeren.\n" -#: src/lib/ecore/ecore_getopt.c:1312 +#: src/lib/ecore/ecore_getopt.c:1316 msgid "missing parameter.\n" msgstr "paramater ontbreekt.\n" -#: src/lib/ecore/ecore_getopt.c:1325 +#: src/lib/ecore/ecore_getopt.c:1329 msgid "missing callback function!\n" msgstr "ontbrekende terugroep-functie!\n" -#: src/lib/ecore/ecore_getopt.c:1354 +#: src/lib/ecore/ecore_getopt.c:1358 msgid "no version was defined.\n" msgstr "geen versie was gedefinieerd.\n" -#: src/lib/ecore/ecore_getopt.c:1371 +#: src/lib/ecore/ecore_getopt.c:1375 msgid "no copyright was defined.\n" msgstr "geen copyright was gedefinieerd.\n" -#: src/lib/ecore/ecore_getopt.c:1388 +#: src/lib/ecore/ecore_getopt.c:1392 msgid "no license was defined.\n" msgstr "geen licentie was gedefinieerd.\n" -#: src/lib/ecore/ecore_getopt.c:1463 +#: src/lib/ecore/ecore_getopt.c:1467 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "FOUT: onbekende optie --%s, genegeerd.\n" -#: src/lib/ecore/ecore_getopt.c:1496 +#: src/lib/ecore/ecore_getopt.c:1500 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "FOUT: optie --%s vereist een argument!\n" -#: src/lib/ecore/ecore_getopt.c:1538 +#: src/lib/ecore/ecore_getopt.c:1542 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "FOUT: onbekende opties -%c, genegeerd.\n" -#: src/lib/ecore/ecore_getopt.c:1576 +#: src/lib/ecore/ecore_getopt.c:1580 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "FOUT: optie -%c vereist een argument!\n" -#: src/lib/ecore/ecore_getopt.c:1785 +#: src/lib/ecore/ecore_getopt.c:1789 msgid "ERROR: no parser provided.\n" msgstr "FOUT: geen doorvoerder beschikbaar gesteld.\n" -#: src/lib/ecore/ecore_getopt.c:1790 +#: src/lib/ecore/ecore_getopt.c:1794 msgid "ERROR: no values provided.\n" msgstr "FOUT: geen waarden beschikbaar gesteld.\n" -#: src/lib/ecore/ecore_getopt.c:1799 +#: src/lib/ecore/ecore_getopt.c:1803 msgid "ERROR: no arguments provided.\n" msgstr "FOUT: geen argumenten beschibaar gesteld.\n" -#: src/lib/ecore/ecore_getopt.c:1825 +#: src/lib/ecore/ecore_getopt.c:1829 msgid "ERROR: invalid options found." msgstr "FOUT: ongeldige opties gevonden." -#: src/lib/ecore/ecore_getopt.c:1831 +#: src/lib/ecore/ecore_getopt.c:1835 #, c-format msgid " See --%s.\n" msgstr "Zie --%s.\n" -#: src/lib/ecore/ecore_getopt.c:1833 +#: src/lib/ecore/ecore_getopt.c:1837 #, c-format msgid " See -%c.\n" msgstr "Zie -%c.\n" -#: src/lib/ecore/ecore_getopt.c:1875 +#: src/lib/ecore/ecore_getopt.c:1879 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "Fout: foutieve wiskundige waarde '%s'\n" -#: src/lib/ecore/ecore_getopt.c:1903 +#: src/lib/ecore/ecore_getopt.c:1907 #, c-format msgid "ERROR: incorrect size value '%s'\n" msgstr "FOUT: foutieve grootte-waarden '%s'\n" diff --git a/libraries/ecore/po/pt.gmo b/libraries/ecore/po/pt.gmo index 617b5cb..ff7ef91 100644 Binary files a/libraries/ecore/po/pt.gmo and b/libraries/ecore/po/pt.gmo differ diff --git a/libraries/ecore/po/pt.po b/libraries/ecore/po/pt.po index b192be9..3892c6b 100644 --- a/libraries/ecore/po/pt.po +++ b/libraries/ecore/po/pt.po @@ -6,171 +6,171 @@ msgid "" msgstr "" "Project-Id-Version: ecore\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2012-01-23 23:19+1000\n" +"POT-Creation-Date: 2012-03-17 11:44+0900\n" "PO-Revision-Date: 2010-10-06 12:37-0000\n" "Last-Translator: Sérgio Marques \n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Poedit-Language: Portuguese\n" "X-Poedit-Country: Portugal\n" -#: src/lib/ecore/ecore_getopt.c:91 +#: src/lib/ecore/ecore_getopt.c:95 msgid "Version:" msgstr "Versão:" -#: src/lib/ecore/ecore_getopt.c:100 +#: src/lib/ecore/ecore_getopt.c:104 msgid "Usage:" msgstr "Utilização:" -#: src/lib/ecore/ecore_getopt.c:105 +#: src/lib/ecore/ecore_getopt.c:109 #, c-format msgid "%s [options]\n" msgstr "%s [opções]\n" -#: src/lib/ecore/ecore_getopt.c:260 +#: src/lib/ecore/ecore_getopt.c:264 msgid "Copyright:" msgstr "Direitos de autor:" -#: src/lib/ecore/ecore_getopt.c:272 +#: src/lib/ecore/ecore_getopt.c:276 msgid "License:" msgstr "Licença:" -#: src/lib/ecore/ecore_getopt.c:453 +#: src/lib/ecore/ecore_getopt.c:457 msgid "Type: " msgstr "Tipo:" -#: src/lib/ecore/ecore_getopt.c:529 +#: src/lib/ecore/ecore_getopt.c:533 msgid "Default: " msgstr "Omissão:" -#: src/lib/ecore/ecore_getopt.c:556 +#: src/lib/ecore/ecore_getopt.c:560 msgid "Choices: " msgstr "Escolhas:" -#: src/lib/ecore/ecore_getopt.c:657 +#: src/lib/ecore/ecore_getopt.c:661 msgid "Options:\n" msgstr "Opções:\n" -#: src/lib/ecore/ecore_getopt.c:782 +#: src/lib/ecore/ecore_getopt.c:786 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "ERRO: opção desconhecida --%s.\n" -#: src/lib/ecore/ecore_getopt.c:784 +#: src/lib/ecore/ecore_getopt.c:788 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "ERRO: opção desconhecida -%c.\n" -#: src/lib/ecore/ecore_getopt.c:842 +#: src/lib/ecore/ecore_getopt.c:846 msgid "ERROR: " msgstr "ERRO: " -#: src/lib/ecore/ecore_getopt.c:925 src/lib/ecore/ecore_getopt.c:1062 -#: src/lib/ecore/ecore_getopt.c:1078 src/lib/ecore/ecore_getopt.c:1093 -#: src/lib/ecore/ecore_getopt.c:1110 src/lib/ecore/ecore_getopt.c:1157 -#: src/lib/ecore/ecore_getopt.c:1277 src/lib/ecore/ecore_getopt.c:1318 +#: src/lib/ecore/ecore_getopt.c:929 src/lib/ecore/ecore_getopt.c:1066 +#: src/lib/ecore/ecore_getopt.c:1082 src/lib/ecore/ecore_getopt.c:1097 +#: src/lib/ecore/ecore_getopt.c:1114 src/lib/ecore/ecore_getopt.c:1161 +#: src/lib/ecore/ecore_getopt.c:1281 src/lib/ecore/ecore_getopt.c:1322 msgid "value has no pointer set.\n" msgstr "o valor não está definido.\n" -#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 +#: src/lib/ecore/ecore_getopt.c:961 src/lib/ecore/ecore_getopt.c:1181 #, c-format msgid "unknown boolean value %s.\n" msgstr "valor booleano desconhecido %s.\n" -#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 +#: src/lib/ecore/ecore_getopt.c:1012 src/lib/ecore/ecore_getopt.c:1269 #, c-format msgid "invalid number format %s\n" msgstr "formato do número inválido %s\n" -#: src/lib/ecore/ecore_getopt.c:1123 +#: src/lib/ecore/ecore_getopt.c:1127 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "escolha inválida \"%s\". O valores possíveis são:" -#: src/lib/ecore/ecore_getopt.c:1151 +#: src/lib/ecore/ecore_getopt.c:1155 msgid "missing parameter to append.\n" msgstr "faltam os parâmetros a anexar.\n" -#: src/lib/ecore/ecore_getopt.c:1255 +#: src/lib/ecore/ecore_getopt.c:1259 msgid "could not parse value.\n" msgstr "incapaz de analisar o valor.\n" -#: src/lib/ecore/ecore_getopt.c:1312 +#: src/lib/ecore/ecore_getopt.c:1316 msgid "missing parameter.\n" msgstr "parâmetro em falta.\n" -#: src/lib/ecore/ecore_getopt.c:1325 +#: src/lib/ecore/ecore_getopt.c:1329 msgid "missing callback function!\n" msgstr "função de chamada em falta!\n" -#: src/lib/ecore/ecore_getopt.c:1354 +#: src/lib/ecore/ecore_getopt.c:1358 msgid "no version was defined.\n" msgstr "nenhuma versão definida.\n" -#: src/lib/ecore/ecore_getopt.c:1371 +#: src/lib/ecore/ecore_getopt.c:1375 msgid "no copyright was defined.\n" msgstr "direitos de autor não definidos.\n" -#: src/lib/ecore/ecore_getopt.c:1388 +#: src/lib/ecore/ecore_getopt.c:1392 msgid "no license was defined.\n" msgstr "licença não definida.\n" -#: src/lib/ecore/ecore_getopt.c:1463 +#: src/lib/ecore/ecore_getopt.c:1467 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "ERRO: opção desconhecida --%s, ignorada.\n" -#: src/lib/ecore/ecore_getopt.c:1496 +#: src/lib/ecore/ecore_getopt.c:1500 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "ERRO: a opção --%s requer um argumento!\n" -#: src/lib/ecore/ecore_getopt.c:1538 +#: src/lib/ecore/ecore_getopt.c:1542 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "ERRO: opção desconhecida --%c, ignorada.\n" -#: src/lib/ecore/ecore_getopt.c:1576 +#: src/lib/ecore/ecore_getopt.c:1580 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "ERRO: a opção --%c requer um argumento!\n" -#: src/lib/ecore/ecore_getopt.c:1785 +#: src/lib/ecore/ecore_getopt.c:1789 msgid "ERROR: no parser provided.\n" msgstr "ERRO: nenhum analisador fornecido.\n" -#: src/lib/ecore/ecore_getopt.c:1790 +#: src/lib/ecore/ecore_getopt.c:1794 msgid "ERROR: no values provided.\n" msgstr "ERRO: nenhum valor fornecido.\n" -#: src/lib/ecore/ecore_getopt.c:1799 +#: src/lib/ecore/ecore_getopt.c:1803 msgid "ERROR: no arguments provided.\n" msgstr "ERRO: nenhum argumento fornecido.\n" -#: src/lib/ecore/ecore_getopt.c:1825 +#: src/lib/ecore/ecore_getopt.c:1829 msgid "ERROR: invalid options found." msgstr "ERRO: encontradas opções inválidas." -#: src/lib/ecore/ecore_getopt.c:1831 +#: src/lib/ecore/ecore_getopt.c:1835 #, c-format msgid " See --%s.\n" msgstr " Veja --%s.\n" -#: src/lib/ecore/ecore_getopt.c:1833 +#: src/lib/ecore/ecore_getopt.c:1837 #, c-format msgid " See -%c.\n" msgstr " Veja -%c.\n" -#: src/lib/ecore/ecore_getopt.c:1875 +#: src/lib/ecore/ecore_getopt.c:1879 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "ERRO: valor geométrico incorreto \"%s\"\n" -#: src/lib/ecore/ecore_getopt.c:1903 +#: src/lib/ecore/ecore_getopt.c:1907 #, c-format msgid "ERROR: incorrect size value '%s'\n" msgstr "ERRO: tamanho incorreto \"%s\"\n" diff --git a/libraries/ecore/po/sl.gmo b/libraries/ecore/po/sl.gmo index b826ffc..4c4ca71 100644 Binary files a/libraries/ecore/po/sl.gmo and b/libraries/ecore/po/sl.gmo differ diff --git a/libraries/ecore/po/sl.po b/libraries/ecore/po/sl.po index fef52ac..f16b172 100644 --- a/libraries/ecore/po/sl.po +++ b/libraries/ecore/po/sl.po @@ -8,168 +8,168 @@ msgid "" msgstr "" "Project-Id-Version: ecore 1.0\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2012-01-23 23:19+1000\n" +"POT-Creation-Date: 2012-03-17 11:44+0900\n" "PO-Revision-Date: 2011-02-24 16:54+0100\n" "Last-Translator: r1to \n" "Language-Team: Slovenian \n" +"Language: sl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: sl\n" -#: src/lib/ecore/ecore_getopt.c:91 +#: src/lib/ecore/ecore_getopt.c:95 msgid "Version:" msgstr "Različica" -#: src/lib/ecore/ecore_getopt.c:100 +#: src/lib/ecore/ecore_getopt.c:104 msgid "Usage:" msgstr "Uporaba:" -#: src/lib/ecore/ecore_getopt.c:105 +#: src/lib/ecore/ecore_getopt.c:109 #, c-format msgid "%s [options]\n" msgstr "%s·[možnosti]\n" -#: src/lib/ecore/ecore_getopt.c:260 +#: src/lib/ecore/ecore_getopt.c:264 msgid "Copyright:" msgstr "Avtorstvo:" -#: src/lib/ecore/ecore_getopt.c:272 +#: src/lib/ecore/ecore_getopt.c:276 msgid "License:" msgstr "Licenca:" -#: src/lib/ecore/ecore_getopt.c:453 +#: src/lib/ecore/ecore_getopt.c:457 msgid "Type: " msgstr "Vrsta:·" -#: src/lib/ecore/ecore_getopt.c:529 +#: src/lib/ecore/ecore_getopt.c:533 msgid "Default: " msgstr "Privzeto:·" -#: src/lib/ecore/ecore_getopt.c:556 +#: src/lib/ecore/ecore_getopt.c:560 msgid "Choices: " msgstr "Izbire:·" -#: src/lib/ecore/ecore_getopt.c:657 +#: src/lib/ecore/ecore_getopt.c:661 msgid "Options:\n" msgstr "Možnosti:\n" -#: src/lib/ecore/ecore_getopt.c:782 +#: src/lib/ecore/ecore_getopt.c:786 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "NAPAKA:·Neznana možnost·--%s.\n" -#: src/lib/ecore/ecore_getopt.c:784 +#: src/lib/ecore/ecore_getopt.c:788 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "NAPAKA:·neznana možnost·-%c.\n" -#: src/lib/ecore/ecore_getopt.c:842 +#: src/lib/ecore/ecore_getopt.c:846 msgid "ERROR: " msgstr "NAPAKA:" -#: src/lib/ecore/ecore_getopt.c:925 src/lib/ecore/ecore_getopt.c:1062 -#: src/lib/ecore/ecore_getopt.c:1078 src/lib/ecore/ecore_getopt.c:1093 -#: src/lib/ecore/ecore_getopt.c:1110 src/lib/ecore/ecore_getopt.c:1157 -#: src/lib/ecore/ecore_getopt.c:1277 src/lib/ecore/ecore_getopt.c:1318 +#: src/lib/ecore/ecore_getopt.c:929 src/lib/ecore/ecore_getopt.c:1066 +#: src/lib/ecore/ecore_getopt.c:1082 src/lib/ecore/ecore_getopt.c:1097 +#: src/lib/ecore/ecore_getopt.c:1114 src/lib/ecore/ecore_getopt.c:1161 +#: src/lib/ecore/ecore_getopt.c:1281 src/lib/ecore/ecore_getopt.c:1322 msgid "value has no pointer set.\n" msgstr "vrednost nima nastavljenega kazalnika.\n" -#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 +#: src/lib/ecore/ecore_getopt.c:961 src/lib/ecore/ecore_getopt.c:1181 #, c-format msgid "unknown boolean value %s.\n" msgstr "neznana Boolova vrednost·%s.\n" -#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 +#: src/lib/ecore/ecore_getopt.c:1012 src/lib/ecore/ecore_getopt.c:1269 #, c-format msgid "invalid number format %s\n" msgstr "napačen·format števila·%s\n" -#: src/lib/ecore/ecore_getopt.c:1123 +#: src/lib/ecore/ecore_getopt.c:1127 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "napačna izbira·\"%s\".·Pravilne izbire so:·" -#: src/lib/ecore/ecore_getopt.c:1151 +#: src/lib/ecore/ecore_getopt.c:1155 msgid "missing parameter to append.\n" msgstr "manjka·parameter·za dodajo.\n" -#: src/lib/ecore/ecore_getopt.c:1255 +#: src/lib/ecore/ecore_getopt.c:1259 msgid "could not parse value.\n" msgstr "vrednosti ni bilo možno razčleniti.\n" -#: src/lib/ecore/ecore_getopt.c:1312 +#: src/lib/ecore/ecore_getopt.c:1316 msgid "missing parameter.\n" msgstr "manjkajoči·parameter.\n" -#: src/lib/ecore/ecore_getopt.c:1325 +#: src/lib/ecore/ecore_getopt.c:1329 msgid "missing callback function!\n" msgstr "manjkajoča povratno-zasilna funkcija !\n" -#: src/lib/ecore/ecore_getopt.c:1354 +#: src/lib/ecore/ecore_getopt.c:1358 msgid "no version was defined.\n" msgstr "definirana ni bila nobena različica.\n" -#: src/lib/ecore/ecore_getopt.c:1371 +#: src/lib/ecore/ecore_getopt.c:1375 msgid "no copyright was defined.\n" msgstr "definirano ni bilo nobeno avtorstvo.\n" -#: src/lib/ecore/ecore_getopt.c:1388 +#: src/lib/ecore/ecore_getopt.c:1392 msgid "no license was defined.\n" msgstr "definirana ni bila nobena licenca.\n" -#: src/lib/ecore/ecore_getopt.c:1463 +#: src/lib/ecore/ecore_getopt.c:1467 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "NAPAKA:·neznana možnost·--%s,·prezrto.\n" -#: src/lib/ecore/ecore_getopt.c:1496 +#: src/lib/ecore/ecore_getopt.c:1500 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "NAPAKA:·možnost·--%s·zahteva argument!\n" -#: src/lib/ecore/ecore_getopt.c:1538 +#: src/lib/ecore/ecore_getopt.c:1542 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "NAPAKA:·neznana možnost·-%c,·prezrto.\n" -#: src/lib/ecore/ecore_getopt.c:1576 +#: src/lib/ecore/ecore_getopt.c:1580 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "NAPAKA:·možnost·-%c zahteva argument!\n" -#: src/lib/ecore/ecore_getopt.c:1785 +#: src/lib/ecore/ecore_getopt.c:1789 msgid "ERROR: no parser provided.\n" msgstr "NAPAKA:·ni podan razčlenjevalnik.\n" -#: src/lib/ecore/ecore_getopt.c:1790 +#: src/lib/ecore/ecore_getopt.c:1794 msgid "ERROR: no values provided.\n" msgstr "NAPAKA::·ni podanih vrednosti.\n" -#: src/lib/ecore/ecore_getopt.c:1799 +#: src/lib/ecore/ecore_getopt.c:1803 msgid "ERROR: no arguments provided.\n" msgstr "NAPAKA::·ni podanih argumentov.\n" -#: src/lib/ecore/ecore_getopt.c:1825 +#: src/lib/ecore/ecore_getopt.c:1829 msgid "ERROR: invalid options found." msgstr "NAPAKA::·najdene nepravilne možnosti" -#: src/lib/ecore/ecore_getopt.c:1831 +#: src/lib/ecore/ecore_getopt.c:1835 #, c-format msgid " See --%s.\n" msgstr "·Glej·--%s.\n" -#: src/lib/ecore/ecore_getopt.c:1833 +#: src/lib/ecore/ecore_getopt.c:1837 #, c-format msgid " See -%c.\n" msgstr "·Glej·-%c.\n" -#: src/lib/ecore/ecore_getopt.c:1875 +#: src/lib/ecore/ecore_getopt.c:1879 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "NAPAKA::·nepravilna geometrijska vrednost·'%s'\n" -#: src/lib/ecore/ecore_getopt.c:1903 +#: src/lib/ecore/ecore_getopt.c:1907 #, c-format msgid "ERROR: incorrect size value '%s'\n" msgstr "NAPAKA::·nepravilna vrednost velikosti·'%s'\n" diff --git a/libraries/ecore/src/Makefile.in b/libraries/ecore/src/Makefile.in index bf6f05c..51ad5e0 100644 --- a/libraries/ecore/src/Makefile.in +++ b/libraries/ecore/src/Makefile.in @@ -49,16 +49,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -174,6 +173,8 @@ 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@ @@ -229,6 +230,8 @@ 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@ @@ -239,6 +242,7 @@ 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@ diff --git a/libraries/ecore/src/bin/Makefile.in b/libraries/ecore/src/bin/Makefile.in index 72d2bfd..aabc6ab 100644 --- a/libraries/ecore/src/bin/Makefile.in +++ b/libraries/ecore/src/bin/Makefile.in @@ -49,16 +49,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -168,6 +167,8 @@ 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@ @@ -223,6 +224,8 @@ 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@ @@ -233,6 +236,7 @@ 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@ diff --git a/libraries/ecore/src/examples/Makefile.in b/libraries/ecore/src/examples/Makefile.in index 7fac88c..5b984ed 100644 --- a/libraries/ecore/src/examples/Makefile.in +++ b/libraries/ecore/src/examples/Makefile.in @@ -81,16 +81,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -408,6 +407,8 @@ 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@ @@ -463,6 +464,8 @@ 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@ @@ -473,6 +476,7 @@ 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@ diff --git a/libraries/ecore/src/examples/ecore_evas_basics_example.c b/libraries/ecore/src/examples/ecore_evas_basics_example.c index 5f0231f..942f9c6 100644 --- a/libraries/ecore/src/examples/ecore_evas_basics_example.c +++ b/libraries/ecore/src/examples/ecore_evas_basics_example.c @@ -77,10 +77,7 @@ main(void) evas_object_show(bg); ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE); - ecore_main_fd_handler_add(STDIN_FILENO, - ECORE_FD_READ | ECORE_FD_ERROR, - _stdin_cb, - NULL, NULL, NULL); + ecore_main_fd_handler_add(STDIN_FILENO, ECORE_FD_READ, _stdin_cb, NULL, NULL, NULL); ecore_main_loop_begin(); diff --git a/libraries/ecore/src/lib/Makefile.in b/libraries/ecore/src/lib/Makefile.in index 09271c2..a5fd01f 100644 --- a/libraries/ecore/src/lib/Makefile.in +++ b/libraries/ecore/src/lib/Makefile.in @@ -65,16 +65,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -193,6 +192,8 @@ 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@ @@ -248,6 +249,8 @@ 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@ @@ -258,6 +261,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore/Ecore.h b/libraries/ecore/src/lib/ecore/Ecore.h index fbe4dda..eace560 100644 --- a/libraries/ecore/src/lib/ecore/Ecore.h +++ b/libraries/ecore/src/lib/ecore/Ecore.h @@ -9,7 +9,7 @@ @mainpage Ecore @version 1.1 - @date 2000-2011 + @date 2000-2012 Please see the @ref authors page for contact details. @@ -22,7 +22,7 @@ @li @ref Ecore_Main_Loop_Group @li @ref Ecore_File_Group @li @ref Ecore_Con_Group - @li @link Ecore_Evas.h Ecore_Evas - Evas convenience functions. @endlink + @li @ref Ecore_Evas_Group @li @ref Ecore_FB_Group @li @link Ecore_Ipc.h Ecore_IPC - Inter Process Communication functions. @endlink @li @link Ecore_X.h Ecore_X - X Windows System wrapper. @endlink @@ -35,21 +35,31 @@ pkgconfig (.pc) files are installed for every ecore module. Thus, to compile using any of them, you can use something like the following: - @verbatim - gcc *.c $(pkg-config ecore ecore-$x ecore-$y [...] --cflags --libs) - @endverbatim +@verbatim +gcc *.c $(pkg-config ecore ecore-$x ecore-$y [...] --cflags --libs) +@endverbatim @section install How is it installed? - Suggested configure options for evas for a Linux desktop X display: + Suggested configure options for ecore for a Linux desktop X display + with OpenGL and Software support, communication (networking) and + IPC (inter process communication): - @verbatim - ./configure \ - make - su - - ... - make install - @endverbatim +@verbatim +./configure \ + --enable-ecore-con \ + --enable-ecore-ipc \ + --enable-ecore-file \ + --enable-ecore-input \ + --enable-ecore-input-evas \ + --enable-ecore-x \ + --enable-ecore-evas \ + --enable-ecore-evas-software-buffer \ + --enable-ecore-evas-software-x11 \ + --enable-ecore-evas-opengl-x11 +make +sudo make install +@endverbatim */ @@ -112,140 +122,175 @@ */ /** - @page Ecore_Main_Loop_Page The Ecore Main Loop - - @section intro What is Ecore? - - Ecore is a clean and tiny event loop library with many modules to do lots of - convenient things for a programmer, to save time and effort. - - It's small and lean, designed to work on embedded systems all the way to - large and powerful multi-cpu workstations. It serialises all system signals, - events etc. into a single event queue, that is easily processed without - needing to worry about concurrency. A properly written, event-driven program - using this kind of programming doesn't need threads, nor has to worry about - concurrency. It turns a program into a state machine, and makes it very - robust and easy to follow. - - Ecore gives you other handy primitives, such as timers to tick over for you - and call specified functions at particular times so the programmer can use - this to do things, like animate, or time out on connections or tasks that take - too long etc. - - Idle handlers are provided too, as well as calls on entering an idle state - (often a very good time to update the state of the program). All events that - enter the system are passed to specific callback functions that the program - sets up to handle those events. Handling them is simple and other Ecore - modules produce more events on the queue, coming from other sources such as - file descriptors etc. - - Ecore also lets you have functions called when file descriptors become active - for reading or writing, allowing for streamlined, non-blocking IO. - - Here is an example of a simple program and its basic event loop flow: - - @image html prog_flow.png - @image latex prog_flow.eps width=\textwidth - - - - @section work How does Ecore work? - - Ecore is very easy to learn and use. All the function calls are designed to - be easy to remember, explicit in describing what they do, and heavily - name-spaced. Ecore programs can start and be very simple. - - For example: - - @code - #include - - int - main(int argc, const char **argv) - { - ecore_init(); - ecore_app_args_set(argc, argv); - ecore_main_loop_begin(); - ecore_shutdown(); - return 0; - } - @endcode - - This program is very simple and doesn't check for errors, but it does start up - and begin a main loop waiting for events or timers to tick off. This program - doesn't set up any, but now we can expand on this simple program a little - more by adding some event handlers and timers. - - @code - #include - - Ecore_Timer *timer1 = NULL; - Ecore_Event_Handler *handler1 = NULL; - double start_time = 0.0; - - int - timer_func(void *data) - { - printf("Tick timer. Sec: %3.2f\n", ecore_time_get() - start_time); - return 1; - } - - int - exit_func(void *data, int ev_type, void *ev) - { - Ecore_Event_Signal_Exit *e; - - e = (Ecore_Event_Signal_Exit *)ev; - if (e->interrupt) printf("Exit: interrupt\n"); - else if (e->quit) printf("Exit: quit\n"); - else if (e->terminate) printf("Exit: terminate\n"); - ecore_main_loop_quit(); - return 1; - } - - int - main(int argc, const char **argv) - { - ecore_init(); - ecore_app_args_set(argc, argv); - start_time = ecore_time_get(); - handler1 = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL); - timer1 = ecore_timer_add(0.5, timer_func, NULL); - ecore_main_loop_begin(); - ecore_shutdown(); - return 0; - } - @endcode - - In the previous example, we initialize our application and get the time at - which our program has started so we can calculate an offset. We set - up a timer to tick off in 0.5 seconds, and since it returns 1, will - keep ticking off every 0.5 seconds until it returns 0, or is deleted - by hand. An event handler is set up to call a function - - exit_func(), - whenever an event of type ECORE_EVENT_SIGNAL_EXIT is received (CTRL-C - on the command line will cause such an event to happen). If this event - occurs it tells you what kind of exit signal was received, and asks - the main loop to quit when it is finished by calling - ecore_main_loop_quit(). - - The handles returned by ecore_timer_add() and - ecore_event_handler_add() are - only stored here as an example. If you don't need to address the timer or - event handler again you don't need to store the result, so just call the - function, and don't assign the result to any variable. - - This program looks slightly more complex than needed to do these simple - things, but in principle, programs don't get any more complex. You add more - event handlers, for more events, will have more timers and such, BUT it all - follows the same principles as shown in this example. - + * @page Ecore_Main_Loop_Page The Ecore Main Loop + * + * @section intro What is Ecore? + * + * Ecore is a clean and tiny event loop library with many modules to do lots of + * convenient things for a programmer, to save time and effort. It's small and + * lean, designed to work from embedded systems all the way up to large and + * powerful multi-cpu workstations. The main loop has a number of primitives to + * be used with its main loop. It serializes all the primitives and allows for + * great responsiveness without the need for threads(or any other concurrency). + * + * @subsection timers Timers + * + * Timers serve two main purposes: doing something at a specified time and + * repeatedly doing something with a set interval. + * @see Ecore_Timer_Group + * + * @subsection poolers Poolers + * + * Poolers allow for pooling to be centralized into a single place therefore + * alleviating the need for different parts of the program to wake up at + * different times to do pooling, thereby making the code simpler and more + * efficient. + * @see Ecore_Poller_Group + * + * @subsection idler Idlers + * + * There are three types of idlers, enterers, idlers(proper) and exiters, they + * are called, respectively, when the program is about to enter an idle state, + * when the program is idle and when the program is leaving an idle state. Idler + * enterers are usually a good place to update the program state. Proper idlers + * are the appropriate place to do heavy computational tasks thereby using what + * would otherwise be wasted CPU cycles. Exiters are the perfect place to do + * anything your program should do just before processing events(also timers, + * poolers, file descriptor handlers and animators) + * @see Ecore_Idle_Group + * + * @subsection fd_handler File descriptor handlers + * + * File descriptor handlers allow you to monitor when there is data available to + * read on file descriptors, when writing will not block or if there was an + * error. Any valid file descriptor can be used with this API, regardless of if + * was gotten with an OS specific API or from ecore. + * @see Ecore_FD_Handler_Group + * + * @subsection animators Animators + * + * Ecore provides a facility called animators, so named since the intended use + * was in animations, that facilitates knowing what percentage of a given + * interval has elapsed. This is perfect for performing animations, but is not + * limited to that use, it can, for example, also be used to create a progress + * bar. + * @see Ecore_Animator_Group + * + * @subsection ev_handlers Event handlers + * + * Event handlers are, arguably, the most important feature of the ecore main + * loop, they are what allows the programmer to easily handle user interaction. + * Events however are not only things the user does, events can represent + * anything for which a type is created. + * @see Ecore_Event_Group + * + * All of these primitives are discussed in more detail in their respective + * pages linked above. + * + * Here is a diagram of the main loop flow of a simple program: + * + * @image html prog_flow.png + * @image latex prog_flow.eps width=\textwidth + * + * + * + * @section work How does Ecore work? + * + * Ecore is very easy to learn and use. All the function calls are designed to + * be easy to remember, explicit in describing what they do, and heavily + * name-spaced. Ecore programs can start and be very simple. + * + * For example: + * + * @code + * #include + * + * int + * main(int argc, const char **argv) + * { + * ecore_init(); + * ecore_app_args_set(argc, argv); + * ecore_main_loop_begin(); + * ecore_shutdown(); + * return 0; + * } + * @endcode + * + * This program is very simple and doesn't check for errors, but it does start up + * and begin a main loop waiting for events or timers to tick off. This program + * doesn't set up any, but now we can expand on this simple program a little + * more by adding some event handlers and timers. + * + * @code + * #include + * + * Ecore_Timer *timer1 = NULL; + * Ecore_Event_Handler *handler1 = NULL; + * double start_time = 0.0; + * + * int + * timer_func(void *data) + * { + * printf("Tick timer. Sec: %3.2f\n", ecore_time_get() - start_time); + * return 1; + * } + * + * int + * exit_func(void *data, int ev_type, void *ev) + * { + * Ecore_Event_Signal_Exit *e; + * + * e = (Ecore_Event_Signal_Exit *)ev; + * if (e->interrupt) printf("Exit: interrupt\n"); + * else if (e->quit) printf("Exit: quit\n"); + * else if (e->terminate) printf("Exit: terminate\n"); + * ecore_main_loop_quit(); + * return 1; + * } + * + * int + * main(int argc, const char **argv) + * { + * ecore_init(); + * ecore_app_args_set(argc, argv); + * start_time = ecore_time_get(); + * handler1 = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL); + * timer1 = ecore_timer_add(0.5, timer_func, NULL); + * ecore_main_loop_begin(); + * ecore_shutdown(); + * return 0; + * } + * @endcode + * + * In the previous example, we initialize our application and get the time at + * which our program has started so we can calculate an offset. We set + * up a timer to tick off in 0.5 seconds, and since it returns 1, will + * keep ticking off every 0.5 seconds until it returns 0, or is deleted + * by hand. An event handler is set up to call a function - + * exit_func(), + * whenever an event of type ECORE_EVENT_SIGNAL_EXIT is received (CTRL-C + * on the command line will cause such an event to happen). If this event + * occurs it tells you what kind of exit signal was received, and asks + * the main loop to quit when it is finished by calling + * ecore_main_loop_quit(). + * + * The handles returned by ecore_timer_add() and + * ecore_event_handler_add() are + * only stored here as an example. If you don't need to address the timer or + * event handler again you don't need to store the result, so just call the + * function, and don't assign the result to any variable. + * + * This program looks slightly more complex than needed to do these simple + * things, but in principle, programs don't get any more complex. You add more + * event handlers, for more events, will have more timers and such, BUT it all + * follows the same principles as shown in this example. + * */ /* @page Ecore_Config_Page The Enlightened Property Library - The Enlightened Property Library (Ecore_Config) is an adbstraction + The Enlightened Property Library (Ecore_Config) is an abstraction from the complexities of writing your own configuration. It provides many features using the Enlightenment 17 development libraries. @@ -310,7 +355,9 @@ # include #else # include -# include +# if !defined (EXOTIC_NO_SIGNAL) +# include +# endif #endif #include @@ -333,47 +380,21 @@ EAPI int ecore_shutdown(void); */ /** + * @defgroup Ecore_Main_Loop_Group Ecore main loop * - * @defgroup Ecore_Main_Loop_Group Ecore main loop functions - * - * These are functions acting on Ecore's main loop itself or on - * events and infrastructure directly linked to it. This loop is - * designed to work on embedded systems all the way to large and - * powerful multi-cpu workstations. + * This group discusses functions that are acting on Ecore's main loop itself or + * on events and infrastructure directly linked to it. Most programs only need + * to start and end the main loop, the rest of the function discussed here are + * meant to be used in special situations, and with great care. * - * It serialises all system signals and events into a single event - * queue, that can be easily processed without needing to worry - * about concurrency. A properly written, event-driven program - * using this kind of programming does not need threads. It makes - * the program very robust and easy to follow. - * - * For example, for the main loop to be of any use, you need to be - * able to add @b events and event handlers on it. Events for file - * descriptor events are covered in @ref Ecore_FD_Handler_Group. - * - * Timer functions are covered in @ref Ecore_Time_Group. - * - * There is also provision for callbacks for when the loop enters or - * exits an @b idle state. See @ref Ecore_Idle_Group for more - * information on it. - * - * Functions are also provided for spawning child processes using - * @c fork(). See @ref Ecore_Exe_Group for more details on it. - * - * Here is an example of simple program and its basic event loop - * flow: - * - * @image html prog_flow.png - * @image latex prog_flow.eps width=\textwidth - * - * For examples of setting up and using a main loop, see - * @ref Ecore_Main_Loop_Page. + * For details on the usage of ecore's main loop and how it interacts with other + * ecore facilities see: @ref Ecore_Main_Loop_Page. * * @{ */ #define ECORE_VERSION_MAJOR 1 -#define ECORE_VERSION_MINOR 0 +#define ECORE_VERSION_MINOR 2 typedef struct _Ecore_Version { @@ -469,7 +490,7 @@ EAPI void *ecore_main_loop_thread_safe_call_sync(Ecore_Data_Cb callback, void *d * in this thread, if the main loop was suspended correctly. If not, it return @c -1. * * This function suspend the main loop in a know state, this let you - * use any EFL call you want after it return. Be carefull, the main loop + * use any EFL call you want after it return. Be carefully, the main loop * is blocked until you call ecore_thread_main_loop_end(). This is * the only sane way to achieve pseudo thread safety. * @@ -489,7 +510,7 @@ EAPI int ecore_thread_main_loop_begin(void); * the main loop is unlocked again. @c -1 will be returned if you are trying to unlock * when there wasn't enough call to ecore_thread_main_loop_begin(). * - * After a call to ecore_thread_main_loop_begin(), you need to absolutly + * After a call to ecore_thread_main_loop_begin(), you need to absolutely * call ecore_thread_main_loop_end(), or you application will stay frozen. */ EAPI int ecore_thread_main_loop_end(void); @@ -501,34 +522,51 @@ EAPI int ecore_thread_main_loop_end(void); /** * @defgroup Ecore_Event_Group Ecore Event functions * - * Ecore events are used to wake up the Ecore main loop to warn - * about state changes, tasks completed, data available for reading - * or writing, etc. They are the base of the event oriented - * programming. - * - * The idea is to write many functions (callbacks) that will be - * registered to specific events, and called when these events - * happen. This way, when the system state changes (a mouse click is - * detected, a key is pressed, or the content of a file changes, for - * example), the respective callbacks will be called with some - * information about that event. Usually the function/callback will - * have a data pointer to the event info (the position in the screen - * where the mouse was clicked, the name of the key that was - * pressed, or the name of the file that has changed). - * - * The basic usage, when one needs to watch for an existing event, - * is to register a callback to it using ecore_event_add(). Of - * course it's necessary to know beforehand what are the types of - * events that the system/library will emmit. This should be - * available with the documentation from that system/library. - * - * When writing a library or group of functions that need to inform - * about something, and you already are running on top of a main - * loop, it is usually a good approach to use events. This way you - * allow others to register as many callbacks as necessary to this - * event, and don't have to care about who is registering to it. The - * functions ecore_event_type_new() and ecore_event_add() are - * available for this purpose. + * Ecore events provide two main features that are of use to those using ecore: + * creating events and being notified of events. Those two will usually be used + * in different contexts, creating events is mainly done by libraries wrapping + * some system functionality while being notified of events is mainly a + * necessity of applications. + * + * For a program to be notified of events it's interested in it needs to have a + * function to process the event and to register that function as the callback + * to the event, that's all: + * @code + * ecore_event_handler_add(EVENT_TYPE, _my_event_handler, some_data); + * ... + * static Eina_Bool + * _my_event_handler(void *data, int type, void *event) + * { + * //data is some_data + * //event is provided by whoever created the event + * //Do really cool stuff with event + * } + * @endcode + * + * One very important thing to note here is the @c EVENT_TYPE, to register a + * handler for an event you must know it's type before hand. This information + * can be found on the documentation of the library emitting the signal, so, + * for example, for events related to windowing one would look in @ref + * Ecore_Evas_Group. + * + * Examples of libraries that integrate into ecore's main loop by providing + * events are @ref Ecore_Con_Group, @ref Ecore_Evas_Group and @ref + * Ecore_Exe_Group amongst others. This usage can be divided into two parts, + * setup and adding events. The setup is very simple, all that needs doing is + * getting a type id for the event: + * @code + * int MY_EV_TYPE = ecore_event_type_new(); + * @endcode + * @note This variable should be declared in the header since it'll be needed by + * anyone wishing to register a handler to your event. + * + * The complexity of adding of an event to the queue depends on whether that + * event sends uses @c event, if it doesn't it a one-liner: + * @code + * ecore_event_add(MY_EV_TYPE, NULL, NULL, NULL); + * @endcode + * The usage when an @c event is needed is not that much more complex and can be + * seen in @ref ecore_event_add. * * Example that deals with events: * @@ -582,7 +620,7 @@ struct _Ecore_Event_Signal_User /** User signal event */ int number; /**< The signal number. Either 1 or 2 */ void *ext_data; /**< Extension data - not used */ -#if !defined (_WIN32) && !defined (__lv2ppu__) +#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL) siginfo_t data; /**< Signal info */ #endif }; @@ -591,7 +629,7 @@ struct _Ecore_Event_Signal_Hup /** Hup signal event */ { void *ext_data; /**< Extension data - not used */ -#if !defined (_WIN32) && !defined (__lv2ppu__) +#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL) siginfo_t data; /**< Signal info */ #endif }; @@ -600,10 +638,10 @@ struct _Ecore_Event_Signal_Exit /** Exit request event */ { Eina_Bool interrupt : 1; /**< Set if the exit request was an interrupt signal*/ Eina_Bool quit : 1; /**< set if the exit request was a quit signal */ - Eina_Bool terminate : 1; /**< Set if the exit request was a terminate singal */ + Eina_Bool terminate : 1; /**< Set if the exit request was a terminate signal */ void *ext_data; /**< Extension data - not used */ -#if !defined (_WIN32) && !defined (__lv2ppu__) +#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL) siginfo_t data; /**< Signal info */ #endif }; @@ -612,7 +650,7 @@ struct _Ecore_Event_Signal_Power /** Power event */ { void *ext_data; /**< Extension data - not used */ -#if !defined (_WIN32) && !defined (__lv2ppu__) +#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL) siginfo_t data; /**< Signal info */ #endif }; @@ -621,21 +659,161 @@ struct _Ecore_Event_Signal_Realtime /** Realtime event */ { int num; /**< The realtime signal's number */ -#if !defined (_WIN32) && !defined (__lv2ppu__) +#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL) siginfo_t data; /**< Signal info */ #endif }; +/** + * @brief Add an event handler. + * @param type The type of the event this handler will get called for + * @param func The function to call when the event is found in the queue + * @param data A data pointer to pass to the called function @p func + * @return A new Event handler, or NULL on failure + * + * Add an event handler to the list of handlers. This will, on success, return + * a handle to the event handler object that was created, that can be used + * later to remove the handler using ecore_event_handler_del(). The @p type + * parameter is the integer of the event type that will trigger this callback + * to be called. The callback @p func is called when this event is processed + * and will be passed the event type, a pointer to the private event + * structure that is specific to that event type, and a data pointer that is + * provided in this call as the @p data parameter. + * + * When the callback @p func is called, it must return 1 or 0. If it returns + * 1 (or ECORE_CALLBACK_PASS_ON), It will keep being called as per normal, for + * each handler set up for that event type. If it returns 0 (or + * ECORE_CALLBACK_DONE), it will cease processing handlers for that particular + * event, so all handler set to handle that event type that have not already + * been called, will not be. + */ EAPI Ecore_Event_Handler *ecore_event_handler_add(int type, Ecore_Event_Handler_Cb func, const void *data); +/** + * @brief Delete an event handler. + * @param event_handler Event handler handle to delete + * @return Data passed to handler + * + * Delete a specified event handler from the handler list. On success this will + * delete the event handler and return the pointer passed as @p data when the + * handler was added by ecore_event_handler_add(). On failure NULL will be + * returned. Once a handler is deleted it will no longer be called. + */ EAPI void *ecore_event_handler_del(Ecore_Event_Handler *event_handler); +/** + * @brief Add an event to the event queue. + * @param type The event type to add to the end of the event queue + * @param ev The data structure passed as @c event to event handlers + * @param func_free The function to be called to free @a ev + * @param data The data pointer to be passed to the free function + * @return A Handle for that event on success, otherwise NULL + * + * If it succeeds, an event of type @a type will be added to the queue for + * processing by event handlers added by ecore_event_handler_add(). The @a ev + * parameter will be passed as the @c event parameter of the handler. When the + * event is no longer needed, @a func_free will be called and passed @a ev for + * cleaning up. If @p func_free is NULL, free() will be called with the private + * structure pointer. + */ EAPI Ecore_Event *ecore_event_add(int type, void *ev, Ecore_End_Cb func_free, void *data); +/** + * @brief Delete an event from the queue. + * @param event The event handle to delete + * @return The data pointer originally set for the event free function + * + * This deletes the event @p event from the event queue, and returns the + * @p data parameter originally set when adding it with ecore_event_add(). This + * does not immediately call the free function, and it may be called later on + * cleanup, and so if the free function depends on the data pointer to work, + * you should defer cleaning of this till the free function is called later. + */ EAPI void *ecore_event_del(Ecore_Event *event); +/** + * @brief Get the data associated with an #Ecore_Event_Handler + * @param eh The event handler + * @return The data + * + * This function returns the data previously associated with @p eh by + * ecore_event_handler_add(). + */ EAPI void *ecore_event_handler_data_get(Ecore_Event_Handler *eh); +/** + * @brief Set the data associated with an #Ecore_Event_Handler + * @param eh The event handler + * @param data The data to associate + * @return The previous data + * + * This function sets @p data to @p eh and returns the old data pointer + * which was previously associated with @p eh by ecore_event_handler_add(). + */ EAPI void *ecore_event_handler_data_set(Ecore_Event_Handler *eh, const void *data); +/** + * @brief Allocate a new event type id sensibly and return the new id. + * @return A new event type id. + * + * This function allocates a new event type id and returns it. Once an event + * type has been allocated it can never be de-allocated during the life of + * the program. There is no guarantee of the contents of this event ID, or how + * it is calculated, except that the ID will be unique to the current instance + * of the process. + */ EAPI int ecore_event_type_new(void); +/** + * @brief Add a filter the current event queue. + * + * @param func_start Function to call just before filtering and return data + * @param func_filter Function to call on each event + * @param func_end Function to call after the queue has been filtered + * @param data Data to pass to the filter functions + * @return A filter handle on success, NULL otherwise + * + * Adds a callback to filter events from the event queue. Filters are called on + * the queue just before Event handler processing to try and remove redundant + * events. Just as processing is about to start @a func_start is called and + * passed the @a data pointer, the return value of this functions is passed to + * @a func_filter as loop_data. @a func_filter is also passed @a data and the + * event type and event structure. If this @a func_filter returns #EINA_FALSE, + * the event is removed from the queue, if it returns #EINA_TRUE, the event is + * kept. When processing is finished @p func_end is called and is passed the + * loop_data(returned by @c func_start) and @p data pointer to clean up. + */ EAPI Ecore_Event_Filter *ecore_event_filter_add(Ecore_Data_Cb func_start, Ecore_Filter_Cb func_filter, Ecore_End_Cb func_end, const void *data); +/** + * @brief Delete an event filter. + * @param ef The event filter handle + * @return The data set for the filter on success, NULL otherwise + * + * Delete a filter that has been added by its @p ef handle. + */ EAPI void *ecore_event_filter_del(Ecore_Event_Filter *ef); +/** + * @brief Return the current event type being handled. + * @return The current event type being handled if inside a handler callback, + * ECORE_EVENT_NONE otherwise + * + * If the program is currently inside an Ecore event handler callback this + * will return the type of the current event being processed. + * + * This is useful when certain Ecore modules such as Ecore_Evas "swallow" + * events and not all the original information is passed on. In special cases + * this extra information may be useful or needed and using this call can let + * the program know if the event type being handled is one it wants to get more + * information about. + */ EAPI int ecore_event_current_type_get(void); +/** + * @brief Return the current event type pointer handled. + * @return The current event pointer being handled if inside a handler callback, + * NULL otherwise + * + * If the program is currently inside an Ecore event handler callback this + * will return the pointer of the current event being processed. + * + * This is useful when certain Ecore modules such as Ecore_Evas "swallow" + * events and not all the original information is passed on. In special cases + * this extra information may be useful or needed and using this call can let + * the program access the event data if the type of the event is handled by + * the program. + */ EAPI void *ecore_event_current_event_get(void); /** @@ -652,7 +830,8 @@ EAPI void *ecore_event_current_event_get(void); * @{ */ - #define ECORE_EXE_PRIORITY_INHERIT 9999 +/** Inherit priority from parent process */ +#define ECORE_EXE_PRIORITY_INHERIT 9999 EAPI extern int ECORE_EXE_EVENT_ADD; /**< A child process has been added */ EAPI extern int ECORE_EXE_EVENT_DEL; /**< A child process has been deleted (it exited, naming consistent with the rest of ecore). */ @@ -715,7 +894,7 @@ struct _Ecore_Exe_Event_Del /** Process exit event */ Eina_Bool exited : 1; /** < set to 1 if the process exited of its own accord */ Eina_Bool signalled : 1; /** < set to 1 id the process exited due to uncaught signal */ void *ext_data; /**< Extension data - not used */ -#if !defined (_WIN32) && !defined (__lv2ppu__) +#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL) siginfo_t data; /**< Signal info */ #endif }; @@ -768,24 +947,30 @@ EAPI void ecore_exe_hup(Ecore_Exe *exe); /** * @defgroup Ecore_FD_Handler_Group File Event Handling Functions * - * Functions that deal with file descriptor handlers. + * @brief Functions that deal with file descriptor handlers. + * + * File descriptor handlers facilitate reading, writing and checking for errors + * without blocking the program or doing expensive pooling. This can be used to + * monitor a socket, pipe, or other stream for which an FD can be had. * - * The @ref Ecore_Fd_Handler can be used to watch a file descriptor - * for data available for reading, for the availability to write - * without blocking, and for errors on the file descriptor. + * @warning This function @b can't be used for monitoring to regular files! * - *ecore_main_fd_handler_add() is used to setup a handler for a - * given file descriptor. This file descriptor can be the standard - * input, a network socket, a stream received through some driver - * of a hardware decoder, etc. Thus it can contain errors, like a - * disconnection, a broken pipe, and so, and that's why it's - * possible to check for these errors with the @ref ECORE_FD_ERROR - * flag. + * One common FD to be monitored is the standard input(stdin), monitoring it for + * reading requires a single call: + * @code + * static Eina_Bool + * _my_cb_func(void *data, Ecore_Fd_Handler *handler) + * { + * char c; + * scanf("%c", &c); //Guaranteed not to block + * ... do stuff with c ... + * } + * ecore_main_fd_handler_add(STDIN_FILENO, ECORE_FD_READ, _my_cb_func, NULL, NULL, NULL); + * @endcode * - * An @ref Ecore_Fd_Handler can be used to watch on a file - * descriptor without blocking, still being able to receive events, - * expire timers, and other watch for other things that happen in - * the Ecore main loop. + * When using a socket, pipe or other stream it's important to remember that + * errors may occur and as such to monitor not only for reading/writing but also + * for errors using the @ref ECORE_FD_ERROR flag. * * Example of use of a file descriptor handler: * @li @ref ecore_fd_handler_example_c @@ -823,11 +1008,93 @@ typedef void (*Ecore_Fd_Prep_Cb)(void *data, Ecore_Fd_Handler *fd_handler); */ typedef Eina_Bool (*Ecore_Win32_Handle_Cb)(void *data, Ecore_Win32_Handler *wh); +/** + * @brief Adds a callback for activity on the given file descriptor. + * + * @param fd The file descriptor to watch. + * @param flags To monitor it for reading use @c ECORE_FD_READ, for writing @c + * ECORE_FD_WRITE, and for error @c ECORE_FD_ERROR. Values bay |(ored). + * @param func The callback function. + * @param data The data to pass to the callback. + * @param buf_func The function to call to check if any data has been buffered + * and already read from the fd. May be @c NULL. + * @param buf_data The data to pass to the @p buf_func function. + * @return A fd handler handle on success, @c NULL otherwise. + * + * @a func will be called during the execution of @ref Ecore_Main_Loop_Page + * when the file descriptor is available for reading, writing, or there has been + * an error(depending on the given @a flags). + * + * When @a func returns ECORE_CALLBACK_CANCEL, it indicates that the + * handler should be marked for deletion (identical to calling @ref + * ecore_main_fd_handler_del). + * + * @warning @a buf_func is meant for @b internal use only and should be @b + * avoided. + * + * The return value of @a buf_func has a different meaning, when it returns + * ECORE_CALLBACK_CANCEL, it indicates that @a func @b shouldn't be called, and + * when it returns ECORE_CALLBACK_RENEW it indicates @a func should be called. + * The return value of @a buf_func will not cause the FD handler to be deleted. + * + * @a buf_func is called during event loop handling to check if data that has + * been read from the file descriptor is in a buffer and is available to read. + * Some systems, notably xlib, handle their own buffering, and would otherwise + * not work with select(). These systems should use a @a buf_func. This is a + * most annoying hack, only ecore_x uses it, so refer to that for an example. + */ EAPI Ecore_Fd_Handler *ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, Ecore_Fd_Cb func, const void *data, Ecore_Fd_Cb buf_func, const void *buf_data); +/** + * @brief Set the prepare callback with data for a given #Ecore_Fd_Handler + * + * @param fd_handler The fd handler + * @param func The prep function + * @param data The data to pass to the prep function + * + * This function will be called prior to any fd handler's callback function + * (even the other fd handlers), before entering the main loop select function. + * + * @note Once a prepare callback is set for a fd handler, it cannot be changed. + * You need to delete the fd handler and create a new one, to set another + * callback. + * @note You probably don't need this function. It is only necessary for very + * uncommon cases that need special behavior. + */ EAPI void ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Prep_Cb func, const void *data); +/** + * @brief Marks an FD handler for deletion. + * @param fd_handler The FD handler. + * @return The data pointer set using @ref ecore_main_fd_handler_add, for @a + * fd_handler on success, @c NULL otherwise. + * This function marks an fd handler to be deleted during an iteration of the + * main loop. It does NOT close the associated fd! + * + * @warning If the underlying fd is already closed ecore may complain if the + * main loop is using epoll internally, and also in some rare cases this may + * cause crashes and instability. Remember to delete your fd handlers before the + * fds they listen to are closed. + */ EAPI void *ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler); +/** + * @brief Retrieves the file descriptor that the given handler is handling. + * @param fd_handler The given FD handler. + * @return The file descriptor the handler is watching. + */ EAPI int ecore_main_fd_handler_fd_get(Ecore_Fd_Handler *fd_handler); +/** + * @brief Gets which flags are active on an FD handler. + * @param fd_handler The given FD handler. + * @param flags The flags, @c ECORE_FD_READ, @c ECORE_FD_WRITE or @c + * ECORE_FD_ERROR to query. + * @return #EINA_TRUE if any of the given flags are active, #EINA_FALSE + * otherwise. + */ EAPI Eina_Bool ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags); +/** + * @brief Set what active streams the given FD handler should be monitoring. + * @param fd_handler The given FD handler. + * @param flags The flags to be watching. + */ EAPI void ecore_main_fd_handler_active_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags); EAPI Ecore_Win32_Handler *ecore_main_win32_handler_add(void *h, Ecore_Win32_Handle_Cb func, const void *data); @@ -840,13 +1107,30 @@ EAPI void *ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler); /** * @defgroup Ecore_Poller_Group Ecore Poll functions * - * These functions are for the need to poll information, but provide - * a shared abstracted API to pool such polling to minimise wakeup - * and ensure all the polling happens in as few spots as possible - * areound a core poll interval. For now only 1 core poller type is - * supprted: ECORE_POLLER_CORE + * Ecore poller provides infrastructure for the creation of pollers. Pollers + * are, in essence, callbacks that share a single timer per type. Because not + * all pollers need to be called at the same frequency the user may specify the + * frequency in ticks(each expiration of the shared timer is called a tick, in + * ecore poller parlance) for each added poller. Ecore pollers should only be + * used when the poller doesn't have specific requirements on the exact times + * to poll. * - * Example of @ref Ecore_Poller : + * This architecture means that the main loop is only woken up once to handle + * all pollers of that type, this will save power as the CPU has more of a + * chance to go into a low power state the longer it is asleep for, so this + * should be used in situations where power usage is a concern. + * + * For now only 1 core poller type is supported: ECORE_POLLER_CORE, the default + * interval for ECORE_POLLER_CORE is 0.125(or 1/8th) second. + * + * The creation of a poller is extremely simple and only required one line: + * @code + * ecore_poller_add(ECORE_POLLER_CORE, 1, my_poller_function, NULL); + * @endcode + * This sample creates a poller to call @c my_poller_function at every tick with + * @c NULL as data. + * + * Example: * @li @ref ecore_poller_example_c * * @ingroup Ecore_Main_Loop_Group @@ -862,11 +1146,76 @@ typedef enum _Ecore_Poller_Type Ecore_Poller_Type; typedef struct _Ecore_Poller Ecore_Poller; /**< A handle for pollers */ +/** + * @brief Sets the time(in seconds) between ticks for the given poller type. + * @param type The poller type to adjust. + * @param poll_time The time(in seconds) between ticks of the timer. + * + * This will adjust the time between ticks of the given timer type defined by + * @p type to the time period defined by @p poll_time. + */ EAPI void ecore_poller_poll_interval_set(Ecore_Poller_Type type, double poll_time); +/** + * @brief Gets the time(in seconds) between ticks for the given poller type. + * @param type The poller type to query. + * @return The time in seconds between ticks of the poller timer. + * + * This will get the time between ticks of the specified poller timer. + */ EAPI double ecore_poller_poll_interval_get(Ecore_Poller_Type type); +/** + * @brief Changes the polling interval rate of @p poller. + * @param poller The Ecore_Poller to change the interval of. + * @param interval The tick interval to set; must be a power of 2 and <= 32768. + * @return Returns true on success, false on failure. + * + * This allows the changing of a poller's polling interval. It is useful when + * you want to alter a poll rate without deleting and re-creating a poller. + */ EAPI Eina_Bool ecore_poller_poller_interval_set(Ecore_Poller *poller, int interval); +/** + * @brief Gets the polling interval rate of @p poller. + * @param poller The Ecore_Poller to change the interval of. + * @return Returns the interval, in ticks, that @p poller polls at. + * + * This returns a poller's polling interval, or 0 on error. + */ EAPI int ecore_poller_poller_interval_get(Ecore_Poller *poller); +/** + * @brief Creates a poller to call the given function at a particular tick interval. + * @param type The ticker type to attach the poller to. Must be ECORE_POLLER_CORE. + * @param interval The poll interval. + * @param func The poller function. + * @param data Data to pass to @a func when it is called. + * @return A poller object on success, @c NULL otherwise. + * + * This function adds @a func as a poller callback that will be called every @a + * interval ticks together with other pollers of type @a type. @a func will be + * passed the @p data pointer as a parameter. + * + * The @p interval must be between 1 and 32768 inclusive, and must be a power of + * 2 (i.e. 1, 2, 4, 8, 16, ... 16384, 32768). The exact tick in which @a func + * will be called is undefined, as only the interval between calls can be + * defined. Ecore will endeavor to keep pollers synchronized and to call as + * many in 1 wakeup event as possible. If @a interval is not a power of two, the + * closest power of 2 greater than @a interval will be used. + * + * When the poller @p func is called, it must return a value of either + * ECORE_CALLBACK_RENEW(or 1) or ECORE_CALLBACK_CANCEL(or 0). If it + * returns 1, it will be called again at the next tick, or if it returns + * 0 it will be deleted automatically making any references/handles for it + * invalid. + */ EAPI Ecore_Poller *ecore_poller_add(Ecore_Poller_Type type, int interval, Ecore_Task_Cb func, const void *data); +/** + * @brief Delete the specified poller from the timer list. + * @param poller The poller to delete. + * @return The data pointer set for the timer when @ref ecore_poller_add was + * called on success, @c NULL otherwise. + * + * @note @a poller must be a valid handle. If the poller function has already + * returned 0, the handle is no longer valid (and does not need to be deleted). + */ EAPI void *ecore_poller_del(Ecore_Poller *poller); /** @@ -941,7 +1290,7 @@ typedef enum _Ecore_Animator_Source Ecore_Animator_Source; typedef Eina_Bool (*Ecore_Timeline_Cb)(void *data, double pos); /** - * @brief Add an animator to call @p func at every animaton tick during main + * @brief Add an animator to call @p func at every animation tick during main * loop execution. * * @param func The function to call when it ticks off @@ -1011,7 +1360,7 @@ EAPI void *ecore_animator_del(Ecore_Animator *animator); * * @param animator The animator to delete * - * The specified @p animator will be temporarly removed from the set of + * The specified @p animator will be temporarily removed from the set of * animators that are executed during main loop. * * @warning Freezing an animator doesn't freeze accounting of how long that @@ -1069,7 +1418,7 @@ EAPI double ecore_animator_frametime_get(void); * has "overshot" the mark) using some interpolation (mapping) algorithm. * * This function useful to create non-linear animations. It offers a variety - * of possible animaton curves to be used: + * of possible animation curves to be used: * @li ECORE_POS_MAP_LINEAR - Linear, returns @p pos * @li ECORE_POS_MAP_ACCELERATE - Start slow then speed up * @li ECORE_POS_MAP_DECELERATE - Start fast then slow down @@ -1107,7 +1456,7 @@ EAPI double ecore_animator_frametime_get(void); * y = (y1 * out) + (y2 * (1.0 - out)); * move_my_object_to(myobject, x, y); * @endcode - * This will make an animaton that bounces 7 each times diminishing by a + * This will make an animation that bounces 7 each times diminishing by a * factor of 1.8. * * @see _Ecore_Pos_Map @@ -1205,16 +1554,39 @@ EAPI void ecore_animator_custom_tick(void); */ /** - * @defgroup Ecore_Time_Group Ecore Time functions - * - * Functions that deal with time. These functions include those - * that simply retrieve it in a given format, and those that create - * events based on it. + * @defgroup Ecore_Time_Group Ecore time functions * - * The timer allows callbacks to be called at specific intervals. + * These are function to retrieve time in a given format. * - * Examples with functions that deal with time: + * Examples: * @li @ref ecore_time_functions_example_c + * @{ + */ +EAPI double ecore_time_get(void); +EAPI double ecore_time_unix_get(void); +EAPI double ecore_loop_time_get(void); + +/** + * @} + */ + +/** + * @defgroup Ecore_Timer_Group Ecore Timer functions + * + * Ecore provides very flexible timer functionality. The basic usage of timers, + * to call a certain function at a certain interval can be achieved with a + * single line: + * @code + * Eina_Bool my_func(void *data) { + * do_funky_stuff_with_data(data); + * return EINA_TRUE; + * } + * ecore_timer_add(interval_in_seconds, my_func, data_given_to_function); + * @endcode + * @note If the function was to be executed only once simply return EINA_FALSE + * instead. + * + * An example that shows the usage of a lot of these: * @li @ref ecore_timer_example_c * * @ingroup Ecore_Main_Loop_Group @@ -1224,10 +1596,6 @@ EAPI void ecore_animator_custom_tick(void); typedef struct _Ecore_Timer Ecore_Timer; /**< A handle for timers */ -EAPI double ecore_time_get(void); -EAPI double ecore_time_unix_get(void); -EAPI double ecore_loop_time_get(void); - EAPI Ecore_Timer *ecore_timer_add(double in, Ecore_Task_Cb func, const void *data); EAPI Ecore_Timer *ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data); EAPI void *ecore_timer_del(Ecore_Timer *timer); @@ -1249,14 +1617,15 @@ EAPI char *ecore_timer_dump(void); /** * @defgroup Ecore_Idle_Group Ecore Idle functions * - * Callbacks that are called when the program enters or exits an - * idle state. + * The idler functionality in Ecore allows for callbacks to be called when the + * program isn't handling @ref Ecore_Event_Group "events", @ref Ecore_Timer_Group + * "timers" or @ref Ecore_FD_Handler_Group "fd handlers". * - * The ecore main loop enters an idle state when it is waiting for - * timers to time out, data to come in on a file descriptor or any - * other event to occur. You can set callbacks to be called when - * the main loop enters an idle state, during an idle state or just - * after the program wakes up. + * There are three types of idlers: Enterers, Idlers(proper) and Exiters. They + * are called, respectively, when the program is about to enter an idle state, + * when the program is in an idle state and when the program has just left an + * idle state and will begin processing @ref Ecore_Event_Group "events", @ref + * Ecore_Timer_Group "timers" or @ref Ecore_FD_Handler_Group "fd handlers". * * Enterer callbacks are good for updating your program's state, if * it has a state engine. Once all of the enterer handlers are @@ -1266,14 +1635,13 @@ EAPI char *ecore_timer_dump(void); * enterer handlers. They are useful for interfaces that require * polling and timers would be too slow to use. * + * Exiter callbacks are called when the main loop wakes up from an idle state. + * * If no idler callbacks are specified, then the process literally * goes to sleep. Otherwise, the idler callbacks are called * continuously while the loop is "idle", using as much CPU as is * available to the process. * - * Exiter callbacks are called when the main loop wakes up from an - * idle state. - * * @note Idle state doesn't mean that the @b program is idle, but * that the main loop is idle. It doesn't have any timers, * events, fd handlers or anything else to process (which in most @@ -1343,7 +1711,7 @@ EAPI void *ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter); * thread, the one running the main loop. This problem can be solved * by running a thread that sends messages to the main one using an * @ref Ecore_Pipe_Group "Ecore_Pipe", but when you need to handle other - * things like cancelling the thread, your code grows in coplexity and gets + * things like cancelling the thread, your code grows in complexity and gets * much harder to maintain. * * Ecore Thread is here to solve that problem. It is @b not a simple wrapper @@ -1514,7 +1882,7 @@ EAPI Ecore_Thread *ecore_thread_run(Ecore_Thread_Cb func_blocking, Ecore_Thread_ * with ecore_thread_feedback(). * * Like with ecore_thread_run(), a new thread will be launched to run - * @p func_heavy unless the maximum number of simultaneous threadas has been + * @p func_heavy unless the maximum number of simultaneous threads has been * reached, in which case the function will be scheduled to run whenever a * running task ends and a thread becomes free. But if @p try_no_queue is * set, Ecore will first try to launch a thread outside of the pool to run @@ -2076,7 +2444,7 @@ EAPI int ecore_pipe_wait(Ecore_Pipe *p, int message_count, double wait); * also will be executed in the order in which they were added. * * A good use for them is when you don't want to execute an action - * immeditately, but want to give the control back to the main loop + * immediately, but want to give the control back to the main loop * so that it will call your job callback when jobs start being * processed (and if there are other jobs added before yours, they * will be processed first). This also gives the chance to other diff --git a/libraries/ecore/src/lib/ecore/Makefile.am b/libraries/ecore/src/lib/ecore/Makefile.am index ec3d99f..6f14387 100644 --- a/libraries/ecore/src/lib/ecore/Makefile.am +++ b/libraries/ecore/src/lib/ecore/Makefile.am @@ -47,6 +47,12 @@ libecore_la_SOURCES += ecore_exe_ps3.c else +if ECORE_HAVE_EXOTIC + +libecore_la_SOURCES += + +else + libecore_la_SOURCES += ecore_signal.c ecore_exe.c endif @@ -55,6 +61,8 @@ endif endif +endif + libecore_la_LIBADD = @dlopen_libs@ @EINA_LIBS@ @EVIL_LIBS@ @GLIB_LIBS@ @WIN32_LIBS@ @LTLIBINTL@ @EFL_PTHREAD_LIBS@ @rt_libs@ -lm libecore_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ @EFL_PTHREAD_LIBS@ diff --git a/libraries/ecore/src/lib/ecore/Makefile.in b/libraries/ecore/src/lib/ecore/Makefile.in index 66a25cd..71e2ac4 100644 --- a/libraries/ecore/src/lib/ecore/Makefile.in +++ b/libraries/ecore/src/lib/ecore/Makefile.in @@ -38,7 +38,8 @@ host_triplet = @host@ @ECORE_HAVE_WIN32_TRUE@am__append_1 = ecore_exe_win32.c @ECORE_HAVE_WIN32_FALSE@@ECORE_HAVE_WINCE_TRUE@am__append_2 = ecore_exe_wince.c @ECORE_HAVE_PS3_TRUE@@ECORE_HAVE_WIN32_FALSE@@ECORE_HAVE_WINCE_FALSE@am__append_3 = ecore_exe_ps3.c -@ECORE_HAVE_PS3_FALSE@@ECORE_HAVE_WIN32_FALSE@@ECORE_HAVE_WINCE_FALSE@am__append_4 = ecore_signal.c ecore_exe.c +@ECORE_HAVE_EXOTIC_TRUE@@ECORE_HAVE_PS3_FALSE@@ECORE_HAVE_WIN32_FALSE@@ECORE_HAVE_WINCE_FALSE@am__append_4 = +@ECORE_HAVE_EXOTIC_FALSE@@ECORE_HAVE_PS3_FALSE@@ECORE_HAVE_WIN32_FALSE@@ECORE_HAVE_WINCE_FALSE@am__append_5 = ecore_signal.c ecore_exe.c subdir = src/lib/ecore DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -54,16 +55,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -100,15 +100,16 @@ am__libecore_la_SOURCES_DIST = ecore.c ecore_alloc.c ecore_anim.c \ @ECORE_HAVE_WIN32_TRUE@am__objects_1 = ecore_exe_win32.lo @ECORE_HAVE_WIN32_FALSE@@ECORE_HAVE_WINCE_TRUE@am__objects_2 = ecore_exe_wince.lo @ECORE_HAVE_PS3_TRUE@@ECORE_HAVE_WIN32_FALSE@@ECORE_HAVE_WINCE_FALSE@am__objects_3 = ecore_exe_ps3.lo -@ECORE_HAVE_PS3_FALSE@@ECORE_HAVE_WIN32_FALSE@@ECORE_HAVE_WINCE_FALSE@am__objects_4 = ecore_signal.lo \ -@ECORE_HAVE_PS3_FALSE@@ECORE_HAVE_WIN32_FALSE@@ECORE_HAVE_WINCE_FALSE@ ecore_exe.lo +am__objects_4 = +@ECORE_HAVE_EXOTIC_FALSE@@ECORE_HAVE_PS3_FALSE@@ECORE_HAVE_WIN32_FALSE@@ECORE_HAVE_WINCE_FALSE@am__objects_5 = ecore_signal.lo \ +@ECORE_HAVE_EXOTIC_FALSE@@ECORE_HAVE_PS3_FALSE@@ECORE_HAVE_WIN32_FALSE@@ECORE_HAVE_WINCE_FALSE@ ecore_exe.lo am_libecore_la_OBJECTS = ecore.lo ecore_alloc.lo ecore_anim.lo \ ecore_app.lo ecore_events.lo ecore_getopt.lo \ ecore_idle_enterer.lo ecore_idle_exiter.lo ecore_idler.lo \ ecore_job.lo ecore_main.lo ecore_pipe.lo ecore_poll.lo \ ecore_time.lo ecore_timer.lo ecore_thread.lo ecore_glib.lo \ ecore_throttle.lo $(am__objects_1) $(am__objects_2) \ - $(am__objects_3) $(am__objects_4) + $(am__objects_3) $(am__objects_4) $(am__objects_5) libecore_la_OBJECTS = $(am_libecore_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) @@ -211,6 +212,8 @@ 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@ @@ -266,6 +269,8 @@ 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@ @@ -276,6 +281,7 @@ 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@ @@ -503,7 +509,8 @@ libecore_la_SOURCES = ecore.c ecore_alloc.c ecore_anim.c ecore_app.c \ ecore_idle_exiter.c ecore_idler.c ecore_job.c ecore_main.c \ ecore_pipe.c ecore_poll.c ecore_time.c ecore_timer.c \ ecore_thread.c ecore_glib.c ecore_throttle.c $(am__append_1) \ - $(am__append_2) $(am__append_3) $(am__append_4) + $(am__append_2) $(am__append_3) $(am__append_4) \ + $(am__append_5) libecore_la_LIBADD = @dlopen_libs@ @EINA_LIBS@ @EVIL_LIBS@ @GLIB_LIBS@ @WIN32_LIBS@ @LTLIBINTL@ @EFL_PTHREAD_LIBS@ @rt_libs@ -lm libecore_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ @EFL_PTHREAD_LIBS@ EXTRA_DIST = ecore_private.h diff --git a/libraries/ecore/src/lib/ecore/ecore.c b/libraries/ecore/src/lib/ecore/ecore.c index 7e0f973..d8b8723 100644 --- a/libraries/ecore/src/lib/ecore/ecore.c +++ b/libraries/ecore/src/lib/ecore/ecore.c @@ -163,8 +163,10 @@ ecore_init(void) if (!ecore_mempool_init()) goto shutdown_mempool; _ecore_main_loop_init(); _ecore_signal_init(); - _ecore_thread_init(); +#ifndef HAVE_EXOTIC _ecore_exe_init(); +#endif + _ecore_thread_init(); _ecore_glib_init(); _ecore_job_init(); _ecore_time_init(); @@ -252,7 +254,9 @@ ecore_shutdown(void) _ecore_glib_shutdown(); _ecore_job_shutdown(); _ecore_thread_shutdown(); +#ifndef HAVE_EXOTIC _ecore_exe_shutdown(); +#endif _ecore_idle_enterer_shutdown(); _ecore_idle_exiter_shutdown(); _ecore_idler_shutdown(); diff --git a/libraries/ecore/src/lib/ecore/ecore_anim.c b/libraries/ecore/src/lib/ecore/ecore_anim.c index 78abad7..22c1f8c 100644 --- a/libraries/ecore/src/lib/ecore/ecore_anim.c +++ b/libraries/ecore/src/lib/ecore/ecore_anim.c @@ -272,11 +272,11 @@ ecore_animator_pos_map(double pos, return pos; case ECORE_POS_MAP_ACCELERATE: - pos = 1.0 - _pos_map_sin((M_PI / 2.0) + ((pos * M_PI) / 2.0)); + pos = 1.0 - _pos_map_sin(M_PI_2 + pos * M_PI_2); return pos; case ECORE_POS_MAP_DECELERATE: - pos = _pos_map_sin((pos * M_PI) / 2.0); + pos = _pos_map_sin(pos * M_PI_2); return pos; case ECORE_POS_MAP_SINUSOIDAL: diff --git a/libraries/ecore/src/lib/ecore/ecore_events.c b/libraries/ecore/src/lib/ecore/ecore_events.c index 0550224..500cf74 100644 --- a/libraries/ecore/src/lib/ecore/ecore_events.c +++ b/libraries/ecore/src/lib/ecore/ecore_events.c @@ -72,35 +72,6 @@ static void *ecore_raw_event_event = NULL; static void _ecore_event_purge_deleted(void); static void *_ecore_event_del(Ecore_Event *event); -/** - * @addtogroup Ecore_Event_Group - * - * @{ - */ - -/** - * Add an event handler. - * @param type The type of the event this handler will get called for - * @param func The function to call when the event is found in the queue - * @param data A data pointer to pass to the called function @p func - * @return A new Event handler, or NULL on failure - * - * Add an event handler to the list of handlers. This will, on success, return - * a handle to the event handler object that was created, that can be used - * later to remove the handler using ecore_event_handler_del(). The @p type - * parameter is the integer of the event type that will trigger this callback - * to be called. The callback @p func is called when this event is processed - * and will be passed the event type, a pointer to the private event - * structure that is specific to that event type, and a data pointer that is - * provided in this call as the @p data parameter. - * - * When the callback @p func is called, it must return 1 or 0. If it returns - * 1 (or ECORE_CALLBACK_PASS_ON), It will keep being called as per normal, for - * each handler set up for that event type. If it returns 0 (or - * ECORE_CALLBACK_DONE), it will cease processing handlers for that particular - * event, so all handler set to handle that event type that have not already - * been called, will not be. - */ EAPI Ecore_Event_Handler * ecore_event_handler_add(int type, Ecore_Event_Handler_Cb func, @@ -151,16 +122,6 @@ unlock: return eh; } -/** - * Delete an event handler. - * @param event_handler Event handler handle to delete - * @return Data passed to handler - * - * Delete a specified event handler from the handler list. On success this will - * delete the event handler and return the pointer passed as @p data when the - * handler was added by ecore_event_handler_add(). On failure NULL will be - * returned. Once a handler is deleted it will no longer be called. - */ EAPI void * ecore_event_handler_del(Ecore_Event_Handler *event_handler) { @@ -180,14 +141,6 @@ unlock: return data; } -/** - * @brief Get the data associated with an #Ecore_Event_Handler - * @param eh The event handler - * @return The data - * - * This function returns the data previously associated with @p eh by - * ecore_event_handler_add(). - */ EAPI void * ecore_event_handler_data_get(Ecore_Event_Handler *eh) { @@ -205,15 +158,6 @@ unlock: return data; } -/** - * @brief Set the data associated with an #Ecore_Event_Handler - * @param eh The event handler - * @param data The data to associate - * @return The previous data - * - * This function sets @p data to @p eh and returns the old data pointer - * which was previously associated with @p eh by ecore_event_handler_add(). - */ EAPI void * ecore_event_handler_data_set(Ecore_Event_Handler *eh, const void *data) @@ -238,27 +182,9 @@ static void _ecore_event_generic_free(void *data __UNUSED__, void *event) { /* DO NOT MEMPOOL FREE THIS */ - free (event); + free(event); } -/** - * Add an event to the event queue. - * @param type The event type to add to the end of the event queue - * @param ev The private data structure for this event type - * @param func_free The function to be called to free this private structure - * @param data The data pointer to be passed to the free function - * @return A Handle for that event - * - * On success this function returns a handle to an event on the event queue, or - * NULL if it fails. If it succeeds, an event of type @p type will be added - * to the queue for processing by event handlers added by - * ecore_event_handler_add(). The @p ev parameter will be a pointer to the event - * private data that is specific to that event type. When the event is no - * longer needed, @p func_free will be called and passed the private structure - * pointer for cleaning up. If @p func_free is NULL, free() will be called - * with the private structure pointer. - * func_free is passed @p data as its data parameter. - */ EAPI Ecore_Event * ecore_event_add(int type, void *ev, @@ -279,17 +205,6 @@ unlock: return event; } -/** - * Delete an event from the queue. - * @param event The event handle to delete - * @return The data pointer originally set for the event free function - * - * This deletes the event @p event from the event queue, and returns the - * @p data parameer originally set when adding it with ecore_event_add(). This - * does not immediately call the free function, and it may be called later on - * cleanup, and so if the free function depends on the data pointer to work, - * you should defer cleaning of this till the free function is called later. - */ EAPI void * ecore_event_del(Ecore_Event *event) { @@ -309,16 +224,6 @@ unlock: return data; } -/** - * Allocate a new event type id sensibly and return the new id. - * @return A new event type id. - * - * This function allocates a new event type id and returns it. Once an event - * type has been allocated it can never be de-allocated during the life of - * the program. There is no guarantee of the contents of this event ID, or how - * it is calculated, except that the ID will be unique to the current instance - * of the process. - */ EAPI int ecore_event_type_new(void) { @@ -331,26 +236,6 @@ ecore_event_type_new(void) return id; } -/** - * Add a filter the current event queue. - * @param func_start Function to call just before filtering and return data - * @param func_filter Function to call on each event - * @param func_end Function to call after the queu has been filtered - * @param data Data to pass to the filter functions - * @return A filter handle - * - * This adds a filter to call callbacks to loop through the event queue and - * filter events out of the queue. On failure NULL is returned. On success a - * Filter handle is returned. Filters are called on the queue just before - * Event handler processing to try and remove redundant events. Just as - * processing starts @p func_start is called and passed the @p data pointer. - * This function returns a pointer that is used as loop_data that is now passed to - * @p func_filter as loop_data. @p func_filter is also passed @p data and the - * event type and private event structure. If this callback returns 0, the - * event is removed from the queue. If it returns 1, the event is kept. When - * processing is finished @p func_end is called and is passed the loop_data - * and @p data pointer to clean up. - */ EAPI Ecore_Event_Filter * ecore_event_filter_add(Ecore_Data_Cb func_start, Ecore_Filter_Cb func_filter, @@ -374,15 +259,6 @@ unlock: return ef; } -/** - * Delete an event filter. - * @param ef The event filter handle - * @return The data set for the filter - * - * Delete a filter that has been added by its @p ef handle. On success this - * will return the data pointer set when this filter was added. On failure - * NULL is returned. - */ EAPI void * ecore_event_filter_del(Ecore_Event_Filter *ef) { @@ -404,50 +280,18 @@ unlock: return data; } -/** - * Return the current event type being handled. - * @return The current event type being handled if inside a handler callback - * - * If the program is currently inside an Ecore event handler callback this - * will return the type of the current event being processed. If Ecore is - * not inside an event handler, ECORE_EVENT_NONE is returned. - * - * This is useful when certain Ecore modules such as Ecore_Evas "swallow" - * events and not all the original information is passed on. In special cases - * this extra information may be useful or needed and using this call can let - * the program know if the event type being handled is one it wants to get more - * information about. - */ EAPI int ecore_event_current_type_get(void) { return ecore_raw_event_type; } -/** - * Return the current event type pointer handled. - * @return The current event pointer being handled if inside a handler callback - * - * If the program is currently inside an Ecore event handler callback this - * will return the pointer of the current event being processed. If Ecore is - * not inside an event handler, NULL will be returned. - * - * This is useful when certain Ecore modules such as Ecore_Evas "swallow" - * events and not all the original information is passed on. In special cases - * this extra information may be useful or needed and using this call can let - * the program access the event data if the type of the event is handled by - * the program. - */ EAPI void * ecore_event_current_event_get(void) { return ecore_raw_event_event; } -/** - * @} - */ - EAPI void * _ecore_event_handler_del(Ecore_Event_Handler *event_handler) { diff --git a/libraries/ecore/src/lib/ecore/ecore_exe.c b/libraries/ecore/src/lib/ecore/ecore_exe.c index d5465fc..47f8dc9 100644 --- a/libraries/ecore/src/lib/ecore/ecore_exe.c +++ b/libraries/ecore/src/lib/ecore/ecore_exe.c @@ -331,15 +331,15 @@ static int run_pri = ECORE_EXE_PRIORITY_INHERIT; * This sets the priority of processes run by ecore_exe_run() and * ecore_exe_pipe_run(). * @li On Windows, the child process is created by default with the - * #ECORE_EXE_WIN32_PRIORITY_NORMAL priority, unless the calling - * process is in #ECORE_EXE_WIN32_PRIORITY_IDLE or - * #ECORE_EXE_WIN32_PRIORITY_BELOW_NORMAL priority. In that case, the + * @ref ECORE_EXE_WIN32_PRIORITY_NORMAL priority, unless the calling + * process is in @ref ECORE_EXE_WIN32_PRIORITY_IDLE or + * @ref ECORE_EXE_WIN32_PRIORITY_BELOW_NORMAL priority. In that case, the * child process inherits this priority. - * @li On other platforms, if set to #ECORE_EXE_PRIORITY_INHERIT child + * @li On other platforms, if set to @ref ECORE_EXE_PRIORITY_INHERIT child * processes inherits the priority of their parent. This is the default. * * @param pri value a Ecore_Exe_Win32_Priority value on Windows, -20 - * to 19 or ECORE_EXE_PRIORITY_INHERIT on other OS. + * to 19 or @ref ECORE_EXE_PRIORITY_INHERIT on other OS. */ EAPI void ecore_exe_run_priority_set(int pri) diff --git a/libraries/ecore/src/lib/ecore/ecore_getopt.c b/libraries/ecore/src/lib/ecore/ecore_getopt.c index 76272d3..cd68189 100644 --- a/libraries/ecore/src/lib/ecore/ecore_getopt.c +++ b/libraries/ecore/src/lib/ecore/ecore_getopt.c @@ -38,6 +38,10 @@ void *alloca(size_t); # include #endif +#ifdef HAVE_EXOTIC +# include +#endif + #include "Ecore.h" #include "Ecore_Getopt.h" diff --git a/libraries/ecore/src/lib/ecore/ecore_main.c b/libraries/ecore/src/lib/ecore/ecore_main.c index 76aced6..587c83b 100644 --- a/libraries/ecore/src/lib/ecore/ecore_main.c +++ b/libraries/ecore/src/lib/ecore/ecore_main.c @@ -229,10 +229,14 @@ static Eina_Bool win32_handlers_delete_me = EINA_FALSE; #ifdef _WIN32 Ecore_Select_Function main_loop_select = _ecore_main_win32_select; #else -# ifdef HAVE_SYS_SELECT_H -# include -# endif +# if !defined EXOTIC_NO_SELECT +# ifdef HAVE_SYS_SELECT_H +# include +# endif Ecore_Select_Function main_loop_select = select; +# else +Ecore_Select_Function main_loop_select = NULL; +# endif #endif #ifndef USE_G_MAIN_LOOP @@ -848,6 +852,21 @@ _ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler) * DO NOT use this function unless you are the person God comes to ask for * advice when He has trouble managing the Universe. */ + +EAPI int +ecore_main_loop_iterate_may_block(int may_block) +{ +#ifndef USE_G_MAIN_LOOP + _ecore_lock(); +in_main_loop++; + _ecore_main_loop_iterate_internal(!may_block); +in_main_loop--; + _ecore_unlock(); + return _ecore_event_exist(); +#else + return g_main_context_iteration(NULL, may_block); +#endif +} EAPI void ecore_main_loop_iterate(void) { @@ -945,39 +964,6 @@ ecore_main_loop_select_func_get(void) return main_loop_select; } -/** - * Adds a callback for activity on the given file descriptor. - * - * @p func will be called during the execution of @ref ecore_main_loop_begin - * when the file descriptor is available for reading, or writing, or both. - * - * Normally when @p func returns ECORE_CALLBACK_CANCEL, it indicates that the - * handler should be marked for deletion (identical to calling @ref ecore_main_fd_handler_del). - * However, if the @p buf_func is supplied, then the return value from the @p func indicates that - * @p func should be called repeatedly until it returns ECORE_CALLBACK_CANCEL. - * - * @p buf_func is called during event loop handling to check if data that has - * been read from the file descriptor is in a buffer and is available to - * read. Some systems (notably xlib) handle their own buffering, and would - * otherwise not work with select(). These systems should use a @p buf_func. - * This is a most annoying hack, only ecore_x uses it, so refer to that for - * an example. NOTE - @p func should probably return ECORE_CALLBACK_RENEW always if - * @p buf_func is used, to avoid confusion with the other return value - * semantics. - * - * @param fd The file descriptor to watch. - * @param flags To watch it for read (@c ECORE_FD_READ) and/or - * (@c ECORE_FD_WRITE) write ability. @c ECORE_FD_ERROR - * - * @param func The callback function. - * @param data The data to pass to the callback. - * @param buf_func The function to call to check if any data has been - * buffered and already read from the fd. Can be @c NULL. - * @param buf_data The data to pass to the @p buf_func function. - * @return A fd handler handle if successful. @c NULL otherwise. - * @note This function CANNOT be used for reading/writing to regular files! - * @ingroup Ecore_FD_Handler_Group - */ EAPI Ecore_Fd_Handler * ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, @@ -1059,20 +1045,6 @@ ecore_main_win32_handler_add(void *h __UNUSED__, #endif -/** - * Marks an FD handler for deletion. - * @param fd_handler The FD handler. - * @return The data pointer set using @ref ecore_main_fd_handler_add, - * for @p fd_handler on success. @c NULL otherwise. - * @ingroup Ecore_FD_Handler_Group - * This function marks an fd handler to be deleted during an iteration of the main loop. - * It does NOT close the associated fd! - * - * @note If the underlying fd is already closed ecore may complain if the main loop - * is using epoll internally, and also in some rare cases this may cause - * crashes and instability. Remember to delete your fd handlers before the - * fds they listen to are closed. - */ EAPI void * ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler) { @@ -1116,24 +1088,6 @@ ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler __UNUSED__) #endif -/** - * @brief Set the prepare callback with data for a given #Ecore_Fd_Handler - * - * @param fd_handler The fd handler - * @param func The prep function - * @param data The data to pass to the prep function - * - * This function will be called prior to any fd handler's callback function - * (even the other fd handlers), before entering the main loop select function. - * - * @note Once a prepare callback is set for a fd handler, it cannot be changed. - * You need to delete the fd handler and create a new one, to set another - * callback. - * @note You probably don't need this function. It is only necessary for very - * uncommon cases that need special behavior. - * - * @ingroup Ecore_FD_Handler_Group - */ EAPI void ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Prep_Cb func, @@ -1157,12 +1111,6 @@ unlock: _ecore_unlock(); } -/** - * Retrieves the file descriptor that the given handler is handling. - * @param fd_handler The given FD handler. - * @return The file descriptor the handler is watching. - * @ingroup Ecore_FD_Handler_Group - */ EAPI int ecore_main_fd_handler_fd_get(Ecore_Fd_Handler *fd_handler) { @@ -1182,15 +1130,6 @@ unlock: return fd; } -/** - * Return if read, write or error, or a combination thereof, is active on the - * file descriptor of the given FD handler. - * @param fd_handler The given FD handler. - * @param flags The flags, @c ECORE_FD_READ, @c ECORE_FD_WRITE or - * @c ECORE_FD_ERROR to query. - * @return #EINA_TRUE if any of the given flags are active. #EINA_FALSE otherwise. - * @ingroup Ecore_FD_Handler_Group - */ EAPI Eina_Bool ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags) @@ -1213,12 +1152,6 @@ unlock: return ret; } -/** - * Set what active streams the given FD handler should be monitoring. - * @param fd_handler The given FD handler. - * @param flags The flags to be watching. - * @ingroup Ecore_FD_Handler_Group - */ EAPI void ecore_main_fd_handler_active_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags) @@ -1742,14 +1675,14 @@ _ecore_main_loop_iterate_internal(int once_only) if (_ecore_event_exist()) { /* but first conceptually enter an idle state */ - _ecore_idle_enterer_call(); - _ecore_throttle(); - /* now quickly poll to see which input fd's are active */ - _ecore_main_select(0.0); - /* allow newly queued timers to expire from now on */ - _ecore_timer_enable_new(); - /* go straight to processing the events we had queued */ - goto process_all; + _ecore_idle_enterer_call(); + _ecore_throttle(); + /* now quickly poll to see which input fd's are active */ + _ecore_main_select(0.0); + /* allow newly queued timers to expire from now on */ + _ecore_timer_enable_new(); + /* go straight to processing the events we had queued */ + goto process_all; } if (once_only) @@ -1758,17 +1691,17 @@ _ecore_main_loop_iterate_internal(int once_only) * if we got any events or signals, allow new timers to process. * use bitwise or to force both conditions to be tested and * merged together */ - if (_ecore_main_select(0.0) | _ecore_signal_count_get()) - { - _ecore_timer_enable_new(); - goto process_all; - } + if (_ecore_main_select(0.0) | _ecore_signal_count_get()) + { + _ecore_timer_enable_new(); + goto process_all; + } } else { /* call idle enterers ... */ - _ecore_idle_enterer_call(); - _ecore_throttle(); + _ecore_idle_enterer_call(); + _ecore_throttle(); } /* if these calls caused any buffered events to appear - deal with them */ @@ -1787,10 +1720,10 @@ _ecore_main_loop_iterate_internal(int once_only) if (once_only) { /* in once_only mode enter idle here instead and then return */ - _ecore_idle_enterer_call(); - _ecore_throttle(); - _ecore_timer_enable_new(); - goto done; + _ecore_idle_enterer_call(); + _ecore_throttle(); + _ecore_timer_enable_new(); + goto done; } _ecore_fps_marker_1(); @@ -1808,23 +1741,23 @@ start_loop: /***************************************************************/ if (!_ecore_event_exist()) { /* init flags */ - next_time = _ecore_timer_next_get(); - /* no idlers */ - if (!_ecore_idler_exist()) - { - /* sleep until timeout or forever (-1.0) waiting for on fds */ - _ecore_main_select(next_time); - } - else - { - int action = LOOP_CONTINUE; + next_time = _ecore_timer_next_get(); + /* no idlers */ + if (!_ecore_idler_exist()) + { + /* sleep until timeout or forever (-1.0) waiting for on fds */ + _ecore_main_select(next_time); + } + else + { + int action = LOOP_CONTINUE; - /* no timers - spin */ - if (next_time < 0) action = _ecore_main_loop_spin_no_timers(); - /* timers - spin */ - else action = _ecore_main_loop_spin_timers(); - if (action == SPIN_RESTART) goto start_loop; - } + /* no timers - spin */ + if (next_time < 0) action = _ecore_main_loop_spin_no_timers(); + /* timers - spin */ + else action = _ecore_main_loop_spin_timers(); + if (action == SPIN_RESTART) goto start_loop; + } } _ecore_fps_marker_2(); @@ -1847,8 +1780,8 @@ process_all: /***********************************************************/ if (once_only) { /* if in once_only mode handle idle exiting */ - _ecore_idle_enterer_call(); - _ecore_throttle(); + _ecore_idle_enterer_call(); + _ecore_throttle(); } done: /*******************************************************************/ diff --git a/libraries/ecore/src/lib/ecore/ecore_pipe.c b/libraries/ecore/src/lib/ecore/ecore_pipe.c index aa640cd..ea7453e 100644 --- a/libraries/ecore/src/lib/ecore/ecore_pipe.c +++ b/libraries/ecore/src/lib/ecore/ecore_pipe.c @@ -36,15 +36,13 @@ # include #endif +#ifdef HAVE_EXOTIC +# include +#endif + #include "Ecore.h" #include "ecore_private.h" -#ifdef _WIN32 -# define FMT_SSIZE_T "%Id" -#else -# define FMT_SSIZE_T "%zd" -#endif - /* How of then we should retry to write to the pipe */ #define ECORE_PIPE_WRITE_RETRY 6 @@ -80,6 +78,9 @@ #endif /* ! _WIN32 */ +#include +#include "ecore_private.h" + struct _Ecore_Pipe { ECORE_MAGIC; @@ -414,7 +415,7 @@ ecore_pipe_write(Ecore_Pipe *p, ; else { - ERR("An unhandled error (ret: " FMT_SSIZE_T " errno: %d)" + ERR("An unhandled error (ret: %zd errno: %d)" "occurred while writing to the pipe the length", ret, errno); } @@ -448,7 +449,7 @@ ecore_pipe_write(Ecore_Pipe *p, ; else { - ERR("An unhandled error (ret: " FMT_SSIZE_T " errno: %d)" + ERR("An unhandled error (ret: %zd errno: %d)" "occurred while writing to the pipe the length", ret, errno); } diff --git a/libraries/ecore/src/lib/ecore/ecore_poll.c b/libraries/ecore/src/lib/ecore/ecore_poll.c index 732850b..bf4da6a 100644 --- a/libraries/ecore/src/lib/ecore/ecore_poll.c +++ b/libraries/ecore/src/lib/ecore/ecore_poll.c @@ -189,20 +189,6 @@ _ecore_poller_cb_timer(void *data __UNUSED__) return ECORE_CALLBACK_RENEW; } -/** - * @addtogroup Ecore_Poller_Group - * - * @{ - */ - -/** - * Sets the time between ticks (in seconds) for the given ticker clock. - * @param type The ticker type to adjust - * @param poll_time The time (in seconds) between ticks of the clock - * - * This will adjust the time between ticks of the given ticker type defined - * by @p type to the time period defined by @p poll_time. - */ EAPI void ecore_poller_poll_interval_set(Ecore_Poller_Type type __UNUSED__, double poll_time) @@ -211,65 +197,12 @@ ecore_poller_poll_interval_set(Ecore_Poller_Type type __UNUSED__, _ecore_poller_next_tick_eval(); } -/** - * Gets the time between ticks (in seconds) for the given ticker clock. - * @param type The ticker type to query - * @return The time in seconds between ticks of the ticker clock - * - * This will get the time between ticks of the specified ticker clock. - */ EAPI double ecore_poller_poll_interval_get(Ecore_Poller_Type type __UNUSED__) { return poll_interval; } -/** - * Creates a poller to call the given function at a particular tick interval. - * @param type The ticker type to attach the poller to - * @param interval The poll interval - * @param func The given function. If @p func returns 1, the poller is - * rescheduled for the next tick interval. - * @param data Data to pass to @p func when it is called. - * @return A poller object on success. @c NULL on failure. - * - * This function adds a poller callback that is to be called regularly - * along with all other poller callbacks so the pollers are synchronized with - * all other pollers running off the same poller type and at the same tick - * interval. This should be used for polling things when polling is desired - * or required, and you do not have specific requirements on the exact times - * to poll and want to avoid extra process wakeups for polling. This will - * save power as the CPU has more of a chance to go into a low power state - * the longer it is asleep for, so this should be used if you are at all - * power conscious. - * - * The @p type parameter defines the poller tick type (there is a virtual - * clock ticking all the time - though ecore avoids making it tick when - * there will not be any work to do at that tick point). There is only one - * ticker at the moment - that is ECORE_POLLER_CORE. This is here for future - * expansion if multiple clocks with different frequencies are really required. - * The default time between ticks for the ECORE_POLLER_CORE ticker is 0.125 - * seconds. - * - * The @p interval is the number of ticker ticks that will pass by in between - * invocations of the @p func callback. This must be between 1 and 32768 - * inclusive, and must be a power of 2 (i.e. 1, 2, 4, 8, 16, ... 16384, 32768). - * If it is 1, then the function will be called every tick. if it is 2, then it - * will be called every 2nd tick, if it is 8, then every 8th tick etc. Exactly - * which tick is undefined, as only the interval between calls can be defined. - * Ecore will endeavour to keep pollers synchronised and to call as many in - * 1 wakeup event as possible. - * - * This function adds a poller and returns its handle on success and NULL on - * failure. The function @p func will be called at tick intervals described - * above. The function will be passed the @p data pointer as its parameter. - * - * When the poller @p func is called, it must return a value of either - * 1 (or ECORE_CALLBACK_RENEW) or 0 (or ECORE_CALLBACK_CANCEL). If it - * returns 1, it will be called again at the next tick, or if it returns - * 0 it will be deleted automatically making any references/handles for it - * invalid. - */ EAPI Ecore_Poller * ecore_poller_add(Ecore_Poller_Type type __UNUSED__, int interval, @@ -307,16 +240,6 @@ ecore_poller_add(Ecore_Poller_Type type __UNUSED__, return poller; } -/** - * Changes the polling interval rate of @p poller. - * - * @param poller The Ecore_Poller to change the interval of - * @param interval The tick interval to set; must be a power of 2 but <= 32768 - * @return Returns true on success, false on failure - * - * This allows the changing of a poller's polling interval. It is useful when you want to alter - * a poll rate without deleting and re-creating a poller. - */ EAPI Eina_Bool ecore_poller_poller_interval_set(Ecore_Poller *poller, int interval) @@ -353,14 +276,6 @@ ecore_poller_poller_interval_set(Ecore_Poller *poller, return EINA_TRUE; } -/** - * Gets the polling interval rate of @p poller. - * - * @param poller The Ecore_Poller to change the interval of - * @return Returns the interval, in ticks, that @p poller polls at - * - * This returns a poller's polling interval, or 0 on error. - */ EAPI int ecore_poller_poller_interval_get(Ecore_Poller *poller) { @@ -382,15 +297,6 @@ ecore_poller_poller_interval_get(Ecore_Poller *poller) return interval; } -/** - * Delete the specified poller from the timer list. - * @param poller The poller to delete. - * @return The data pointer set for the timer when @ref ecore_poller_add was - * called. @c NULL is returned if the function is unsuccessful. - * - * Note: @p poller must be a valid handle. If the poller function has already - * returned 0, the handle is no longer valid (and does not need to be delete). - */ EAPI void * ecore_poller_del(Ecore_Poller *poller) { diff --git a/libraries/ecore/src/lib/ecore/ecore_private.h b/libraries/ecore/src/lib/ecore/ecore_private.h index 50d502c..f0c5d6b 100644 --- a/libraries/ecore/src/lib/ecore/ecore_private.h +++ b/libraries/ecore/src/lib/ecore/ecore_private.h @@ -174,7 +174,7 @@ void *_ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler); void _ecore_main_shutdown(void); -#if defined (_WIN32) || defined (__lv2ppu__) +#if defined (_WIN32) || defined (__lv2ppu__) || defined (HAVE_EXOTIC) static inline void _ecore_signal_shutdown(void) { } static inline void _ecore_signal_init(void) { } @@ -237,14 +237,14 @@ _ecore_lock(void) EINA_MAIN_LOOP_CHECK_RETURN; #endif _ecore_main_lock_count++; - assert(_ecore_main_lock_count == 1); + /* assert(_ecore_main_lock_count == 1); */ } static inline void _ecore_unlock(void) { _ecore_main_lock_count--; - assert(_ecore_main_lock_count == 0); + /* assert(_ecore_main_lock_count == 0); */ #ifdef HAVE_THREAD_SAFETY eina_lock_release(&_ecore_main_loop_lock); #endif diff --git a/libraries/ecore/src/lib/ecore/ecore_thread.c b/libraries/ecore/src/lib/ecore/ecore_thread.c index 4444ad4..85fbe64 100644 --- a/libraries/ecore/src/lib/ecore/ecore_thread.c +++ b/libraries/ecore/src/lib/ecore/ecore_thread.c @@ -17,6 +17,25 @@ #ifdef EFL_HAVE_THREADS +# define LK(x) Eina_Lock x +# define LKI(x) eina_lock_new(&(x)) +# define LKD(x) eina_lock_free(&(x)) +# define LKL(x) eina_lock_take(&(x)) +# define LKU(x) eina_lock_release(&(x)) + +# define CD(x) Eina_Condition x +# define CDI(x, m) eina_condition_new(&(x), &(m)) +# define CDD(x) eina_condition_free(&(x)) +# define CDB(x) eina_condition_broadcast(&(x)) +# define CDW(x, t) eina_condition_timedwait(&(x), t) + +# define LRWK(x) Eina_RWLock x +# define LRWKI(x) eina_rwlock_new(&(x)); +# define LRWKD(x) eina_rwlock_free(&(x)); +# define LRWKWL(x) eina_rwlock_take_write(&(x)); +# define LRWKRL(x) eina_rwlock_take_read(&(x)); +# define LRWKU(x) eina_rwlock_release(&(x)); + # ifdef EFL_HAVE_POSIX_THREADS # include # ifdef __linux__ @@ -31,28 +50,9 @@ # define PHE(x, y) pthread_equal(x, y) # define PHS() pthread_self() # define PHC(x, f, d) pthread_create(&(x), NULL, (void *)f, d) -# define PHJ(x, p) pthread_join(x, (void **)(&(p))) +# define PHJ(x) pthread_join(x, NULL) # define PHA(x) pthread_cancel(x) -# define CD(x) pthread_cond_t x -# define CDI(x) pthread_cond_init(&(x), NULL); -# define CDD(x) pthread_cond_destroy(&(x)); -# define CDB(x) pthread_cond_broadcast(&(x)); -# define CDW(x, y, t) pthread_cond_timedwait(&(x), &(y), t); - -# define LK(x) pthread_mutex_t x -# define LKI(x) pthread_mutex_init(&(x), NULL); -# define LKD(x) pthread_mutex_destroy(&(x)); -# define LKL(x) pthread_mutex_lock(&(x)); -# define LKU(x) pthread_mutex_unlock(&(x)); - -# define LRWK(x) pthread_rwlock_t x -# define LRWKI(x) pthread_rwlock_init(&(x), NULL); -# define LRWKD(x) pthread_rwlock_destroy(&(x)); -# define LRWKWL(x) pthread_rwlock_wrlock(&(x)); -# define LRWKRL(x) pthread_rwlock_rdlock(&(x)); -# define LRWKU(x) pthread_rwlock_unlock(&(x)); - # else /* EFL_HAVE_WIN32_THREADS */ # define WIN32_LEAN_AND_MEAN @@ -108,209 +108,9 @@ _ecore_thread_win32_join(win32_thread *x, return 0; } -# define PHJ(x, p) _ecore_thread_win32_join(x, (void **)(&(p))) +# define PHJ(x) _ecore_thread_win32_join(x, NULL) # define PHA(x) TerminateThread(x->thread, 0) -# define LK(x) HANDLE x -# define LKI(x) x = CreateMutex(NULL, FALSE, NULL) -# define LKD(x) CloseHandle(x) -# define LKL(x) WaitForSingleObject(x, INFINITE) -# define LKU(x) ReleaseMutex(x) - -typedef struct -{ - HANDLE semaphore; - LONG threads_count; - CRITICAL_SECTION threads_count_lock; -} win32_cond; - -# define CD(x) win32_cond * x - -# define CDI(x) \ - do { \ - x = (win32_cond *)calloc(1, sizeof(win32_cond)); \ - if (x) \ - { \ - x->semaphore = CreateSemaphore(NULL, 0, 0x7fffffff, NULL); \ - if (x->semaphore) \ - InitializeCriticalSection(&x->threads_count_lock); \ - else \ - { \ - free(x); \ - x = NULL; \ - } \ - } \ - } while (0) - -# define CDD(x) \ - do { \ - CloseHandle(x->semaphore); \ - free(x); \ - x = NULL; \ - } while (0) - -# define CDB(x) \ - do { \ - EnterCriticalSection(&x->threads_count_lock); \ - if (x->threads_count > 0) \ - ReleaseSemaphore(x->semaphore, x->threads_count, NULL); \ - LeaveCriticalSection (&x->threads_count_lock); \ - } while (0) - -int -_ecore_thread_win32_cond_timedwait(win32_cond *c, - HANDLE *external_mutex, - struct timeval *t) -{ - DWORD res; - DWORD val = t->tv_sec * 1000 + (t->tv_usec / 1000); - LKL(external_mutex); - EnterCriticalSection (&c->threads_count_lock); - c->threads_count++; - LeaveCriticalSection (&c->threads_count_lock); - LKU(external_mutex); - res = WaitForSingleObject(c->semaphore, val); - if (res == WAIT_OBJECT_0) - return 0; - else - return -1; -} - -# define CDW(x, y, t) _ecore_thread_win32_cond_timedwait(x, y, t) - -typedef struct -{ - LONG readers_count; - LONG writers_count; - int readers; - int writers; - LK(mutex); - CD(cond_read); - CD(cond_write); -} win32_rwl; - -# define LRWK(x) win32_rwl * x -# define LRWKI(x) \ - do { \ - x = (win32_rwl *)calloc(1, sizeof(win32_rwl)); \ - if (x) \ - { \ - LKI(x->mutex); \ - if (x->mutex) \ - { \ - CDI(x->cond_read); \ - if (x->cond_read) \ - { \ - CDI(x->cond_write); \ - if (!x->cond_write) \ - { \ - CDD(x->cond_read); \ - LKD(x->mutex); \ - free(x); \ - x = NULL; \ - } \ - } \ - else \ - { \ - LKD(x->mutex); \ - free(x); \ - x = NULL; \ - } \ - } \ - else \ - { \ - free(x); \ - x = NULL; \ - } \ - } \ - } while (0) - -# define LRWKD(x) \ - do { \ - LKU(x->mutex); \ - LKD(x->mutex); \ - CDD(x->cond_write); \ - CDD(x->cond_read); \ - free(x); \ - } while (0) -# define LRWKWL(x) \ - do { \ - DWORD res; \ - LKU(x->mutex); \ - if (x->writers || x->readers > 0) \ - { \ - x->writers_count++; \ - while (x->writers || x->readers > 0) \ - { \ - EnterCriticalSection(&x->cond_write->threads_count_lock); \ - x->cond_read->threads_count++; \ - LeaveCriticalSection(&x->cond_write->threads_count_lock); \ - res = WaitForSingleObject(x->cond_write->semaphore, INFINITE); \ - if (res != WAIT_OBJECT_0) break; \ - } \ - x->writers_count--; \ - } \ - if (res == 0) x->writers_count = 1; \ - LKU(x->mutex); \ - } while (0) -# define LRWKRL(x) \ - do { \ - DWORD res; \ - LKL(x->mutex); \ - if (x->writers) \ - { \ - x->readers_count++; \ - while (x->writers) \ - { \ - EnterCriticalSection(&x->cond_write->threads_count_lock); \ - x->cond_read->threads_count++; \ - LeaveCriticalSection(&x->cond_write->threads_count_lock); \ - res = WaitForSingleObject(x->cond_write->semaphore, INFINITE); \ - if (res != WAIT_OBJECT_0) break; \ - } \ - x->readers_count--; \ - } \ - if (res == 0) \ - x->readers++; \ - LKU(x->mutex); \ - } while (0) -# define LRWKU(x) \ - do { \ - LKL(x->mutex); \ - if (x->writers) \ - { \ - x->writers = 0; \ - if (x->readers_count == 1) \ - { \ - EnterCriticalSection(&x->cond_read->threads_count_lock); \ - if (x->cond_read->threads_count > 0) \ - ReleaseSemaphore(x->cond_read->semaphore, 1, 0); \ - LeaveCriticalSection(&x->cond_read->threads_count_lock); \ - } \ - else if (x->readers_count > 0) \ - CDB(x->cond_read); \ - else if (x->writers_count > 0) \ - { \ - EnterCriticalSection (&x->cond_write->threads_count_lock); \ - if (x->cond_write->threads_count > 0) \ - ReleaseSemaphore(x->cond_write->semaphore, 1, 0); \ - LeaveCriticalSection (&x->cond_write->threads_count_lock); \ - } \ - } \ - else if (x->readers > 0) \ - { \ - x->readers--; \ - if (x->readers == 0 && x->writers_count > 0) \ - { \ - EnterCriticalSection (&x->cond_write->threads_count_lock); \ - if (x->cond_write->threads_count > 0) \ - ReleaseSemaphore(x->cond_write->semaphore, 1, 0); \ - LeaveCriticalSection (&x->cond_write->threads_count_lock); \ - } \ - } \ - LKU(x->mutex); \ - } while (0) - # endif #endif @@ -336,14 +136,24 @@ struct _Ecore_Pthread_Worker { Ecore_Thread_Cb func_heavy; Ecore_Thread_Notify_Cb func_notify; - Ecore_Pipe *notify; - Ecore_Pipe *direct_pipe; Ecore_Pthread_Worker *direct_worker; int send; int received; } feedback_run; + struct { + Ecore_Thread_Cb func_main; + Ecore_Thread_Notify_Cb func_notify; + + Ecore_Pipe *send; + Ecore_Pthread_Worker *direct_worker; + + struct { + int send; + int received; + } from, to; + } message_run; } u; Ecore_Thread_Cb func_cancel; @@ -357,47 +167,63 @@ struct _Ecore_Pthread_Worker const void *data; - Eina_Bool cancel : 1; - Eina_Bool feedback_run : 1; - Eina_Bool kill : 1; - Eina_Bool reschedule : 1; - Eina_Bool no_queue : 1; + volatile int cancel; + +#ifdef EFL_HAVE_THREADS + LK(cancel_mutex); +#endif + + Eina_Bool message_run : 1; + Eina_Bool feedback_run : 1; + Eina_Bool kill : 1; + Eina_Bool reschedule : 1; + Eina_Bool no_queue : 1; }; #ifdef EFL_HAVE_THREADS typedef struct _Ecore_Pthread_Data Ecore_Pthread_Data; - struct _Ecore_Pthread_Data { Ecore_Pthread_Worker *death_job; - Ecore_Pipe *p; void *data; PH(thread); }; + +typedef struct _Ecore_Pthread_Notify Ecore_Pthread_Notify; +struct _Ecore_Pthread_Notify +{ + Ecore_Pthread_Worker *work; + const void *user_data; +}; + +typedef void *(*Ecore_Thread_Sync_Cb)(void* data, Ecore_Thread *thread); + +typedef struct _Ecore_Pthread_Message Ecore_Pthread_Message; +struct _Ecore_Pthread_Message +{ + union { + Ecore_Thread_Cb async; + Ecore_Thread_Sync_Cb sync; + } u; + + const void *data; + + int code; + + Eina_Bool callback : 1; + Eina_Bool sync : 1; +}; + #endif static int _ecore_thread_count_max = 0; -static int ECORE_THREAD_PIPE_DEL = 0; -static Eina_Array *_ecore_thread_pipe = NULL; #ifdef EFL_HAVE_THREADS -static void _ecore_thread_handler(void *data __UNUSED__, - void *buffer, - unsigned int nbyte); - -static Ecore_Pipe * -_ecore_thread_pipe_get(void) -{ - if (eina_array_count(_ecore_thread_pipe) > 0) - return eina_array_pop(_ecore_thread_pipe); - - return ecore_pipe_add(_ecore_thread_handler, NULL); -} +static void _ecore_thread_handler(void *data); static int _ecore_thread_count = 0; -static Ecore_Event_Handler *del_handler = NULL; static Eina_List *_ecore_active_job_threads = NULL; static Eina_List *_ecore_pending_job_threads = NULL; static Eina_List *_ecore_pending_job_threads_feedback = NULL; @@ -435,6 +261,10 @@ static PH(get_main_loop_thread) (void) static void _ecore_thread_worker_free(Ecore_Pthread_Worker *worker) { + LKD(worker->cancel_mutex); + CDD(worker->cond); + LKD(worker->mutex); + if (_ecore_thread_worker_count > (_ecore_thread_count_max + 1) * 16) { free(worker); @@ -454,38 +284,15 @@ _ecore_thread_data_free(void *data) } static void -_ecore_thread_pipe_free(void *data __UNUSED__, - void *event) -{ - Ecore_Pipe *p = event; - - if (eina_array_count(_ecore_thread_pipe) < 50) - eina_array_push(_ecore_thread_pipe, p); - else - ecore_pipe_del(p); - eina_threads_shutdown(); -} - -static Eina_Bool -_ecore_thread_pipe_del(void *data __UNUSED__, - int type __UNUSED__, - void *event __UNUSED__) -{ - /* This is a hack to delay pipe destruction until we are out of its internal loop. */ - return ECORE_CALLBACK_CANCEL; -} - -static void _ecore_thread_end(Ecore_Pthread_Data *pth, Ecore_Thread *work) { Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)work; - Ecore_Pipe *p; - if (!worker->feedback_run || (worker->feedback_run && !worker->no_queue)) + if (!worker->message_run || !worker->feedback_run || (worker->feedback_run && !worker->no_queue)) _ecore_thread_count--; - if (PHJ(pth->thread, p) != 0) + if (PHJ(pth->thread) != 0) return; if (eina_list_count(_ecore_pending_job_threads) > 0 @@ -496,7 +303,7 @@ _ecore_thread_end(Ecore_Pthread_Data *pth, INF("spawning threads because of still pending jobs."); pth->death_job = _ecore_thread_worker_new(); - if (!pth->p || !pth->death_job) goto end; + if (!pth->death_job) goto end; eina_threads_init(); @@ -514,7 +321,6 @@ end: _ecore_active_job_threads = eina_list_remove(_ecore_active_job_threads, pth); - ecore_event_add(ECORE_THREAD_PIPE_DEL, pth->p, _ecore_thread_pipe_free, NULL); free(pth); } @@ -534,30 +340,18 @@ _ecore_thread_kill(Ecore_Pthread_Worker *work) if (work->feedback_run) { - ecore_pipe_del(work->u.feedback_run.notify); - - if (work->u.feedback_run.direct_pipe) - eina_array_push(_ecore_thread_pipe, work->u.feedback_run.direct_pipe); if (work->u.feedback_run.direct_worker) _ecore_thread_worker_free(work->u.feedback_run.direct_worker); } - CDD(work->cond); - LKD(work->mutex); if (work->hash) eina_hash_free(work->hash); _ecore_thread_worker_free(work); } static void -_ecore_thread_handler(void *data __UNUSED__, - void *buffer, - unsigned int nbyte) +_ecore_thread_handler(void *data) { - Ecore_Pthread_Worker *work; - - if (nbyte != sizeof (Ecore_Pthread_Worker *)) return; - - work = *(Ecore_Pthread_Worker **)buffer; + Ecore_Pthread_Worker *work = data; if (work->feedback_run) { @@ -571,17 +365,20 @@ _ecore_thread_handler(void *data __UNUSED__, _ecore_thread_kill(work); } +#if 0 static void -_ecore_notify_handler(void *data, - void *buffer, - unsigned int nbyte) +_ecore_nothing_handler(void *data __UNUSED__, void *buffer __UNUSED__, unsigned int nbyte __UNUSED__) { - Ecore_Pthread_Worker *work = data; - void *user_data; +} +#endif - if (nbyte != sizeof (Ecore_Pthread_Worker *)) return; +static void +_ecore_notify_handler(void *data) +{ + Ecore_Pthread_Notify *notify = data; + Ecore_Pthread_Worker *work = notify->work; + void *user_data = (void*) notify->user_data; - user_data = *(void **)buffer; work->u.feedback_run.received++; if (work->u.feedback_run.func_notify) @@ -592,16 +389,64 @@ _ecore_notify_handler(void *data, { _ecore_thread_kill(work); } + + free(notify); +} + +static void +_ecore_message_notify_handler(void *data) +{ + Ecore_Pthread_Notify *notify = data; + Ecore_Pthread_Worker *work = notify->work; + Ecore_Pthread_Message *user_data = (void *) notify->user_data; + Eina_Bool delete = EINA_TRUE; + + work->u.message_run.from.received++; + + if (!user_data->callback) + { + if (work->u.message_run.func_notify) + work->u.message_run.func_notify((void *) work->data, (Ecore_Thread *) work, (void *) user_data->data); + } + else + { + if (user_data->sync) + { + user_data->data = user_data->u.sync((void*) user_data->data, (Ecore_Thread *) work); + user_data->callback = EINA_FALSE; + user_data->code = INT_MAX; + ecore_pipe_write(work->u.message_run.send, &user_data, sizeof (Ecore_Pthread_Message *)); + + delete = EINA_FALSE; + } + else + { + user_data->u.async((void*) user_data->data, (Ecore_Thread *) work); + } + } + + if (delete) + { + free(user_data); + } + + /* Force reading all notify event before killing the thread */ + if (work->kill && work->u.message_run.from.send == work->u.message_run.from.received) + { + _ecore_thread_kill(work); + } + free(notify); } static void -_ecore_short_job(Ecore_Pipe *end_pipe, - PH(thread)) +_ecore_short_job(PH(thread)) { Ecore_Pthread_Worker *work; while (_ecore_pending_job_threads) { + int cancel; + LKL(_ecore_pending_job_threads_mutex); if (!_ecore_pending_job_threads) @@ -616,9 +461,12 @@ _ecore_short_job(Ecore_Pipe *end_pipe, LKU(_ecore_pending_job_threads_mutex); + LKL(work->cancel_mutex); + cancel = work->cancel; + LKU(work->cancel_mutex); work->self = thread; - if (!work->cancel) - work->u.short_run.func_blocking((void *)work->data, (Ecore_Thread *)work); + if (!cancel) + work->u.short_run.func_blocking((void *) work->data, (Ecore_Thread*) work); if (work->reschedule) { @@ -630,19 +478,20 @@ _ecore_short_job(Ecore_Pipe *end_pipe, } else { - ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *)); + ecore_main_loop_thread_safe_call_async(_ecore_thread_handler, work); } } } static void -_ecore_feedback_job(Ecore_Pipe *end_pipe, - PH(thread)) +_ecore_feedback_job(PH(thread)) { Ecore_Pthread_Worker *work; while (_ecore_pending_job_threads_feedback) { + int cancel; + LKL(_ecore_pending_job_threads_mutex); if (!_ecore_pending_job_threads_feedback) @@ -657,9 +506,12 @@ _ecore_feedback_job(Ecore_Pipe *end_pipe, LKU(_ecore_pending_job_threads_mutex); + LKL(work->cancel_mutex); + cancel = work->cancel; + LKU(work->cancel_mutex); work->self = thread; - if (!work->cancel) - work->u.feedback_run.func_heavy((void *)work->data, (Ecore_Thread *)work); + if (!cancel) + work->u.feedback_run.func_heavy((void *) work->data, (Ecore_Thread *) work); if (work->reschedule) { @@ -671,7 +523,7 @@ _ecore_feedback_job(Ecore_Pipe *end_pipe, } else { - ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *)); + ecore_main_loop_thread_safe_call_async(_ecore_thread_handler, work); } } } @@ -679,6 +531,7 @@ _ecore_feedback_job(Ecore_Pipe *end_pipe, static void * _ecore_direct_worker(Ecore_Pthread_Worker *work) { + Ecore_Pthread_Worker *end; Ecore_Pthread_Data *pth; #ifdef EFL_POSIX_THREADS @@ -691,40 +544,49 @@ _ecore_direct_worker(Ecore_Pthread_Worker *work) pth = malloc(sizeof (Ecore_Pthread_Data)); if (!pth) return NULL; - pth->p = work->u.feedback_run.direct_pipe; - if (!pth->p) - { - free(pth); - return NULL; - } pth->thread = PHS(); work->self = pth->thread; - work->u.feedback_run.func_heavy((void *)work->data, (Ecore_Thread *)work); + if (work->message_run) + work->u.message_run.func_main((void *) work->data, (Ecore_Thread *) work); + else + work->u.feedback_run.func_heavy((void *) work->data, (Ecore_Thread *) work); - ecore_pipe_write(pth->p, &work, sizeof (Ecore_Pthread_Worker *)); + if (work->message_run) + { + end = work->u.message_run.direct_worker; + work->u.message_run.direct_worker = NULL; + } + else + { + end = work->u.feedback_run.direct_worker; + work->u.feedback_run.direct_worker = NULL; + } - work = work->u.feedback_run.direct_worker; - if (!work) + ecore_main_loop_thread_safe_call_async(_ecore_thread_handler, work); + + if (!end) { free(pth); return NULL; } - work->data = pth; - work->u.short_run.func_blocking = NULL; - work->func_end = (void *)_ecore_thread_end; - work->func_cancel = NULL; - work->cancel = EINA_FALSE; - work->feedback_run = EINA_FALSE; - work->kill = EINA_FALSE; - work->hash = NULL; - CDI(work->cond); - LKI(work->mutex); - - ecore_pipe_write(pth->p, &work, sizeof (Ecore_Pthread_Worker *)); + end->data = pth; + end->u.short_run.func_blocking = NULL; + end->func_end = (void *)_ecore_thread_end; + end->func_cancel = NULL; + end->cancel = EINA_FALSE; + end->feedback_run = EINA_FALSE; + end->message_run = EINA_FALSE; + end->no_queue = EINA_FALSE; + end->kill = EINA_FALSE; + end->hash = NULL; + LKI(end->mutex); + CDI(end->cond, end->mutex); + + ecore_main_loop_thread_safe_call_async(_ecore_thread_handler, end); - return pth->p; + return NULL; } static void * @@ -740,8 +602,8 @@ _ecore_thread_worker(Ecore_Pthread_Data *pth) eina_sched_prio_drop(); restart: - if (_ecore_pending_job_threads) _ecore_short_job(pth->p, pth->thread); - if (_ecore_pending_job_threads_feedback) _ecore_feedback_job(pth->p, pth->thread); + if (_ecore_pending_job_threads) _ecore_short_job(pth->thread); + if (_ecore_pending_job_threads_feedback) _ecore_feedback_job(pth->thread); /* FIXME: Check if there is feedback running task todo, and switch to feedback run handler. */ @@ -777,14 +639,14 @@ restart: work->func_cancel = NULL; work->cancel = EINA_FALSE; work->feedback_run = EINA_FALSE; + work->message_run = EINA_FALSE; work->kill = EINA_FALSE; + work->no_queue = EINA_FALSE; work->hash = NULL; - CDI(work->cond); - LKI(work->mutex); - ecore_pipe_write(pth->p, &work, sizeof (Ecore_Pthread_Worker *)); + ecore_main_loop_thread_safe_call_async(_ecore_thread_handler, work); - return pth->p; + return NULL; } #endif @@ -800,6 +662,10 @@ _ecore_thread_worker_new(void) if (!result) result = malloc(sizeof (Ecore_Pthread_Worker)); else _ecore_thread_worker_count--; + LKI(result->cancel_mutex); + LKI(result->mutex); + CDI(result->cond, result->mutex); + return result; #else return malloc(sizeof (Ecore_Pthread_Worker)); @@ -813,16 +679,11 @@ _ecore_thread_init(void) if (_ecore_thread_count_max <= 0) _ecore_thread_count_max = 1; - ECORE_THREAD_PIPE_DEL = ecore_event_type_new(); - _ecore_thread_pipe = eina_array_new(8); - #ifdef EFL_HAVE_THREADS - del_handler = ecore_event_handler_add(ECORE_THREAD_PIPE_DEL, _ecore_thread_pipe_del, NULL); - LKI(_ecore_pending_job_threads_mutex); LRWKI(_ecore_thread_global_hash_lock); LKI(_ecore_thread_global_hash_mutex); - CDI(_ecore_thread_global_hash_cond); + CDI(_ecore_thread_global_hash_cond, _ecore_thread_global_hash_mutex); #endif } @@ -830,10 +691,6 @@ void _ecore_thread_shutdown(void) { /* FIXME: If function are still running in the background, should we kill them ? */ - Ecore_Pipe *p; - Eina_Array_Iterator it; - unsigned int i; - #ifdef EFL_HAVE_THREADS Ecore_Pthread_Worker *work; Ecore_Pthread_Data *pth; @@ -843,46 +700,39 @@ _ecore_thread_shutdown(void) EINA_LIST_FREE(_ecore_pending_job_threads, work) { if (work->func_cancel) - work->func_cancel((void *)work->data, (Ecore_Thread *)work); + work->func_cancel((void *)work->data, (Ecore_Thread *) work); free(work); } EINA_LIST_FREE(_ecore_pending_job_threads_feedback, work) { if (work->func_cancel) - work->func_cancel((void *)work->data, (Ecore_Thread *)work); + work->func_cancel((void *)work->data, (Ecore_Thread *) work); free(work); } LKU(_ecore_pending_job_threads_mutex); - /* Improve emergency shutdown */ + /* FIXME: Improve emergency shutdown, now that we use async call, we can do something */ EINA_LIST_FREE(_ecore_active_job_threads, pth) { - Ecore_Pipe *ep; - PHA(pth->thread); - PHJ(pth->thread, ep); - - ecore_pipe_del(pth->p); + PHJ(pth->thread); } if (_ecore_thread_global_hash) eina_hash_free(_ecore_thread_global_hash); - _ecore_event_handler_del(del_handler); have_main_loop_thread = 0; - del_handler = NULL; + + while ((work = eina_trash_pop(&_ecore_thread_worker_trash))) + { + free(work); + } LKD(_ecore_pending_job_threads_mutex); LRWKD(_ecore_thread_global_hash_lock); LKD(_ecore_thread_global_hash_mutex); CDD(_ecore_thread_global_hash_cond); #endif - - EINA_ARRAY_ITER_NEXT(_ecore_thread_pipe, i, p, it) - ecore_pipe_del(p); - - eina_array_free(_ecore_thread_pipe); - _ecore_thread_pipe = NULL; } void @@ -927,15 +777,15 @@ ecore_thread_run(Ecore_Thread_Cb func_blocking, work->func_cancel = func_cancel; work->cancel = EINA_FALSE; work->feedback_run = EINA_FALSE; + work->message_run = EINA_FALSE; work->kill = EINA_FALSE; work->reschedule = EINA_FALSE; + work->no_queue = EINA_FALSE; work->data = data; #ifdef EFL_HAVE_THREADS work->self = 0; work->hash = NULL; - CDI(work->cond); - LKI(work->mutex); LKL(_ecore_pending_job_threads_mutex); _ecore_pending_job_threads = eina_list_append(_ecore_pending_job_threads, work); @@ -952,9 +802,8 @@ ecore_thread_run(Ecore_Thread_Cb func_blocking, pth = malloc(sizeof (Ecore_Pthread_Data)); if (!pth) goto on_error; - pth->p = _ecore_thread_pipe_get(); pth->death_job = _ecore_thread_worker_new(); - if (!pth->p || !pth->death_job) goto on_error; + if (!pth->death_job) goto on_error; eina_threads_init(); @@ -969,7 +818,6 @@ ecore_thread_run(Ecore_Thread_Cb func_blocking, on_error: if (pth) { - if (pth->p) eina_array_push(_ecore_thread_pipe, pth->p); if (pth->death_job) _ecore_thread_worker_free(pth->death_job); free(pth); } @@ -981,7 +829,11 @@ on_error: LKU(_ecore_pending_job_threads_mutex); if (work->func_cancel) - work->func_cancel((void *)work->data, (Ecore_Thread *)work); + work->func_cancel((void *) work->data, (Ecore_Thread *) work); + + CDD(work->cond); + LKD(work->mutex); + LKD(work->cancel_mutex); free(work); work = NULL; } @@ -1013,12 +865,16 @@ EAPI Eina_Bool ecore_thread_cancel(Ecore_Thread *thread) { #ifdef EFL_HAVE_THREADS - Ecore_Pthread_Worker *work = (Ecore_Pthread_Worker *)thread; + Ecore_Pthread_Worker *volatile work = (Ecore_Pthread_Worker *)thread; Eina_List *l; + int cancel; if (!work) return EINA_TRUE; - if (work->cancel) + LKL(work->cancel_mutex); + cancel = work->cancel; + LKU(work->cancel_mutex); + if (cancel) return EINA_FALSE; if (work->feedback_run) @@ -1070,9 +926,14 @@ ecore_thread_cancel(Ecore_Thread *thread) LKU(_ecore_pending_job_threads_mutex); + work = (Ecore_Pthread_Worker *)thread; + /* Delay the destruction */ -on_exit: - ((Ecore_Pthread_Worker *)thread)->cancel = EINA_TRUE; + on_exit: + LKL(work->cancel_mutex); + work->cancel = EINA_TRUE; + LKU(work->cancel_mutex); + return EINA_FALSE; #else (void) thread; @@ -1083,10 +944,23 @@ on_exit: EAPI Eina_Bool ecore_thread_check(Ecore_Thread *thread) { - Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread; + Ecore_Pthread_Worker *volatile worker = (Ecore_Pthread_Worker *) thread; + int cancel; if (!worker) return EINA_TRUE; - return worker->cancel; +#ifdef EFL_HAVE_THREADS + LKL(worker->cancel_mutex); +#endif + cancel = worker->cancel; + /* FIXME: there is an insane bug driving me nuts here. I don't know if + it's a race condition, some cache issue or some alien attack on our software. + But ecore_thread_check will only work correctly with a printf, all the volatile, + lock and even usleep don't help here... */ + /* fprintf(stderr, "wc: %i\n", cancel); */ +#ifdef EFL_HAVE_THREADS + LKU(worker->cancel_mutex); +#endif + return cancel; } EAPI Ecore_Thread * @@ -1109,12 +983,11 @@ ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy, worker->u.feedback_run.func_heavy = func_heavy; worker->u.feedback_run.func_notify = func_notify; worker->hash = NULL; - CDI(worker->cond); - LKI(worker->mutex); worker->func_cancel = func_cancel; worker->func_end = func_end; worker->data = data; worker->cancel = EINA_FALSE; + worker->message_run = EINA_FALSE; worker->feedback_run = EINA_TRUE; worker->kill = EINA_FALSE; worker->reschedule = EINA_FALSE; @@ -1123,15 +996,12 @@ ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy, worker->u.feedback_run.send = 0; worker->u.feedback_run.received = 0; - worker->u.feedback_run.notify = ecore_pipe_add(_ecore_notify_handler, worker); - worker->u.feedback_run.direct_pipe = NULL; worker->u.feedback_run.direct_worker = NULL; - if (!try_no_queue) + if (try_no_queue) { PH(t); - worker->u.feedback_run.direct_pipe = _ecore_thread_pipe_get(); worker->u.feedback_run.direct_worker = _ecore_thread_worker_new(); worker->no_queue = EINA_TRUE; @@ -1140,6 +1010,12 @@ ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy, if (PHC(t, _ecore_direct_worker, worker) == 0) return (Ecore_Thread *)worker; + if (worker->u.feedback_run.direct_worker) + { + _ecore_thread_worker_free(worker->u.feedback_run.direct_worker); + worker->u.feedback_run.direct_worker = NULL; + } + eina_threads_shutdown(); } @@ -1160,9 +1036,8 @@ ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy, pth = malloc(sizeof (Ecore_Pthread_Data)); if (!pth) goto on_error; - pth->p = _ecore_thread_pipe_get(); pth->death_job = _ecore_thread_worker_new(); - if (!pth->p || !pth->death_job) goto on_error; + if (!pth->death_job) goto on_error; eina_threads_init(); @@ -1177,7 +1052,6 @@ ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy, on_error: if (pth) { - if (pth->p) eina_array_push(_ecore_thread_pipe, pth->p); if (pth->death_job) _ecore_thread_worker_free(pth->death_job); free(pth); } @@ -1193,7 +1067,8 @@ on_error: if (worker) { - ecore_pipe_del(worker->u.feedback_run.notify); + CDD(worker->cond); + LKD(worker->mutex); free(worker); worker = NULL; } @@ -1211,7 +1086,6 @@ on_error: */ worker.u.feedback_run.func_heavy = func_heavy; worker.u.feedback_run.func_notify = func_notify; - worker.u.feedback_run.notify = NULL; worker.u.feedback_run.send = 0; worker.u.feedback_run.received = 0; worker.func_cancel = func_cancel; @@ -1219,6 +1093,7 @@ on_error: worker.data = data; worker.cancel = EINA_FALSE; worker.feedback_run = EINA_TRUE; + worker.message_run = EINA_FALSE; worker.kill = EINA_FALSE; do { @@ -1241,13 +1116,48 @@ ecore_thread_feedback(Ecore_Thread *thread, Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread; if (!worker) return EINA_FALSE; - if (!worker->feedback_run) return EINA_FALSE; #ifdef EFL_HAVE_THREADS if (!PHE(worker->self, PHS())) return EINA_FALSE; - worker->u.feedback_run.send++; - ecore_pipe_write(worker->u.feedback_run.notify, &data, sizeof (void *)); + if (worker->feedback_run) + { + Ecore_Pthread_Notify *notify; + + notify = malloc(sizeof (Ecore_Pthread_Notify)); + if (!notify) return EINA_FALSE; + + notify->user_data = data; + notify->work = worker; + worker->u.feedback_run.send++; + + ecore_main_loop_thread_safe_call_async(_ecore_notify_handler, notify); + } + else if (worker->message_run) + { + Ecore_Pthread_Message *msg; + Ecore_Pthread_Notify *notify; + + msg = malloc(sizeof (Ecore_Pthread_Message*)); + if (!msg) return EINA_FALSE; + msg->data = data; + msg->callback = EINA_FALSE; + msg->sync = EINA_FALSE; + + notify = malloc(sizeof (Ecore_Pthread_Notify)); + if (!notify) + { + free(msg); + return EINA_FALSE; + } + notify->work = worker; + notify->user_data = msg; + + worker->u.message_run.from.send++; + ecore_main_loop_thread_safe_call_async(_ecore_message_notify_handler, notify); + } + else + return EINA_FALSE; return EINA_TRUE; #else @@ -1257,6 +1167,71 @@ ecore_thread_feedback(Ecore_Thread *thread, #endif } +#if 0 +EAPI Ecore_Thread * +ecore_thread_message_run(Ecore_Thread_Cb func_main, + Ecore_Thread_Notify_Cb func_notify, + Ecore_Thread_Cb func_end, + Ecore_Thread_Cb func_cancel, + const void *data) +{ +#ifdef EFL_HAVE_THREADS + Ecore_Pthread_Worker *worker; + PH(t); + + if (!func_main) return NULL; + + worker = _ecore_thread_worker_new(); + if (!worker) return NULL; + + worker->u.message_run.func_main = func_main; + worker->u.message_run.func_notify = func_notify; + worker->u.message_run.direct_worker = _ecore_thread_worker_new(); + worker->u.message_run.send = ecore_pipe_add(_ecore_nothing_handler, worker); + worker->u.message_run.from.send = 0; + worker->u.message_run.from.received = 0; + worker->u.message_run.to.send = 0; + worker->u.message_run.to.received = 0; + + ecore_pipe_freeze(worker->u.message_run.send); + + worker->func_cancel = func_cancel; + worker->func_end = func_end; + worker->hash = NULL; + worker->data = data; + + worker->cancel = EINA_FALSE; + worker->message_run = EINA_TRUE; + worker->feedback_run = EINA_FALSE; + worker->kill = EINA_FALSE; + worker->reschedule = EINA_FALSE; + worker->no_queue = EINA_FALSE; + worker->self = 0; + + eina_threads_init(); + + if (PHC(t, _ecore_direct_worker, worker) == 0) + return (Ecore_Thread*) worker; + + eina_threads_shutdown(); + + if (worker->u.message_run.direct_worker) _ecore_thread_worker_free(worker->u.message_run.direct_worker); + if (worker->u.message_run.send) ecore_pipe_del(worker->u.message_run.send); + + CDD(worker->cond); + LKD(worker->mutex); +#else + /* Note: This type of thread can't and never will work without thread support */ + WRN("ecore_thread_message_run called, but threads disable in Ecore, things will go wrong. Starting now !"); +# warning "You disabled threads support in ecore, I hope you know what you are doing !" +#endif + + func_cancel((void *) data, NULL); + + return NULL; +} +#endif + EAPI Eina_Bool ecore_thread_reschedule(Ecore_Thread *thread) { @@ -1641,24 +1616,13 @@ ecore_thread_global_data_wait(const char *key, while (1) { -#ifndef _WIN32 - struct timespec t = { 0, 0 }; - - t.tv_sec = (long int)tm; - t.tv_nsec = (long int)((tm - (double)t.tv_sec) * 1000000000); -#else - struct timeval t = { 0, 0 }; - - t.tv_sec = (long int)tm; - t.tv_usec = (long int)((tm - (double)t.tv_sec) * 1000000); -#endif LRWKRL(_ecore_thread_global_hash_lock); ret = eina_hash_find(_ecore_thread_global_hash, key); LRWKU(_ecore_thread_global_hash_lock); if ((ret) || (!seconds) || ((seconds > 0) && (tm <= ecore_time_get()))) break; LKL(_ecore_thread_global_hash_mutex); - CDW(_ecore_thread_global_hash_cond, _ecore_thread_global_hash_mutex, &t); + CDW(_ecore_thread_global_hash_cond, tm); LKU(_ecore_thread_global_hash_mutex); } if (ret) return ret->data; diff --git a/libraries/ecore/src/lib/ecore/ecore_time.c b/libraries/ecore/src/lib/ecore/ecore_time.c index 8e7611b..0eeb1d6 100644 --- a/libraries/ecore/src/lib/ecore/ecore_time.c +++ b/libraries/ecore/src/lib/ecore/ecore_time.c @@ -21,7 +21,7 @@ #include -#ifdef HAVE_CLOCK_GETTIME +#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME) static clockid_t _ecore_time_clock_id = -1; #elif defined(__APPLE__) && defined(__MACH__) static double _ecore_time_clock_conversion = 1e-9; @@ -52,7 +52,7 @@ double _ecore_time_loop_time = -1.0; EAPI double ecore_time_get(void) { -#ifdef HAVE_CLOCK_GETTIME +#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME) struct timespec t; if (EINA_UNLIKELY(_ecore_time_clock_id < 0)) @@ -136,7 +136,7 @@ ecore_loop_time_get(void) void _ecore_time_init(void) { -#ifdef HAVE_CLOCK_GETTIME +#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME) struct timespec t; if (_ecore_time_clock_id != -1) return; diff --git a/libraries/ecore/src/lib/ecore/ecore_timer.c b/libraries/ecore/src/lib/ecore/ecore_timer.c index cc19e3f..d76733b 100644 --- a/libraries/ecore/src/lib/ecore/ecore_timer.c +++ b/libraries/ecore/src/lib/ecore/ecore_timer.c @@ -56,7 +56,7 @@ static double last_check = 0.0; static double precision = 10.0 / 1000000.0; /** - * @addtogroup Ecore_Time_Group + * @addtogroup Ecore_Timer_Group * * @{ */ @@ -73,12 +73,15 @@ ecore_timer_precision_get(void) } /** - * Sets the precision to be used by timer infrastructure. + * @brief Sets the precision to be used by timer infrastructure. * - * When system calculates time to expire the next timer we'll be able - * to delay the timer by the given amount so more timers will fit in - * the same dispatch, waking up the system less often and thus being - * able to save power. + * @param value allowed introduced timeout delay, in seconds. + * + * This sets the precision for @b all timers. The precision determines how much + * of an difference from the requested interval is acceptable. One common reason + * to use this function is to @b increase the allowed timeout and thus @b + * decrease precision of the timers, this is because less precise the timers + * result in the system waking up less often and thus consuming less resources. * * Be aware that kernel may delay delivery even further, these delays * are always possible due other tasks having higher priorities or @@ -93,8 +96,6 @@ ecore_timer_precision_get(void) * @note Ecore is smart enough to see if there are timers in the * precision range, if it does not, in our example if no second timer * in (T + precision) existed, then it would use the minimum timeout. - * - * @param value allowed introduced timeout delay, in seconds. */ EAPI void ecore_timer_precision_set(double value) @@ -322,7 +323,7 @@ ecore_timer_reset(Ecore_Timer *timer) * Get the pending time regarding a timer. * * @param timer The timer to learn from. - * @ingroup Ecore_Time_Group + * @ingroup Ecore_Timer_Group */ EAPI double ecore_timer_pending_get(Ecore_Timer *timer) diff --git a/libraries/ecore/src/lib/ecore_cocoa/Makefile.in b/libraries/ecore/src/lib/ecore_cocoa/Makefile.in index 15ce879..447c3ef 100644 --- a/libraries/ecore/src/lib/ecore_cocoa/Makefile.in +++ b/libraries/ecore/src/lib/ecore_cocoa/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -192,6 +191,8 @@ 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@ @@ -247,6 +248,8 @@ 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@ @@ -257,6 +260,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_con/Ecore_Con.h b/libraries/ecore/src/lib/ecore_con/Ecore_Con.h index c3af46a..d0ca6f6 100644 --- a/libraries/ecore/src/lib/ecore_con/Ecore_Con.h +++ b/libraries/ecore/src/lib/ecore_con/Ecore_Con.h @@ -723,10 +723,13 @@ EAPI Eina_Bool ecore_con_ssl_client_upgrade(Ecore_Con_Client *cl, Ecore_ */ EAPI Ecore_Con_Socks *ecore_con_socks4_remote_add(const char *ip, int port, const char *username); -EAPI void ecore_con_socks4_lookup_set(Ecore_Con_Socks *ecs, Eina_Bool enable); -EAPI Eina_Bool ecore_con_socks4_lookup_get(Ecore_Con_Socks *ecs); EAPI Eina_Bool ecore_con_socks4_remote_exists(const char *ip, int port, const char *username); EAPI void ecore_con_socks4_remote_del(const char *ip, int port, const char *username); +EAPI Ecore_Con_Socks *ecore_con_socks5_remote_add(const char *ip, int port, const char *username, const char *password); +EAPI Eina_Bool ecore_con_socks5_remote_exists(const char *ip, int port, const char *username, const char *password); +EAPI void ecore_con_socks5_remote_del(const char *ip, int port, const char *username, const char *password); +EAPI void ecore_con_socks_lookup_set(Ecore_Con_Socks *ecs, Eina_Bool enable); +EAPI Eina_Bool ecore_con_socks_lookup_get(Ecore_Con_Socks *ecs); EAPI void ecore_con_socks_bind_set(Ecore_Con_Socks *ecs, Eina_Bool is_bind); EAPI Eina_Bool ecore_con_socks_bind_get(Ecore_Con_Socks *ecs); EAPI unsigned int ecore_con_socks_version_get(Ecore_Con_Socks *ecs); @@ -744,8 +747,8 @@ EAPI void ecore_con_socks_apply_always(Ecore_Con_Socks *ecs); * * Setting up a server is very simple: you just need to start it with * ecore_con_server_add() and setup some callbacks to the events - * #ECORE_CON_EVENT_CLIENT_ADD, #ECORE_CON_EVENT_CLIENT_DEL and - * #ECORE_CON_EVENT_CLIENT_DATA, that will be called when a client is + * @ref ECORE_CON_EVENT_CLIENT_ADD, @ref ECORE_CON_EVENT_CLIENT_DEL and + * @ref ECORE_CON_EVENT_CLIENT_DATA, that will be called when a client is * communicating with the server: * * @code @@ -867,8 +870,8 @@ EAPI Ecore_Con_Server *ecore_con_server_add(Ecore_Con_Type type, * * However, even if this call returns a valid @ref Ecore_Con_Server, the * connection will only be successfully completed if an event of type - * #ECORE_CON_EVENT_SERVER_ADD is received. If it fails to complete, an - * #ECORE_CON_EVENT_SERVER_DEL will be received. + * @ref ECORE_CON_EVENT_SERVER_ADD is received. If it fails to complete, an + * @ref ECORE_CON_EVENT_SERVER_DEL will be received. * * The @p data parameter can be fetched later using ecore_con_server_data_get() * or changed with ecore_con_server_data_set(). @@ -1335,6 +1338,35 @@ typedef enum _Ecore_Con_Url_Time } Ecore_Con_Url_Time; /** + * @typedef Ecore_Con_Url_Http_Version + * @enum _Ecore_Con_Url_Http_Version + * The http version to use + * @since 1.2 + */ +typedef enum _Ecore_Con_Url_Http_Version +{ + /** + * HTTP version 1.0 + * @since 1.2 + */ + ECORE_CON_URL_HTTP_VERSION_1_0, + /** + * HTTP version 1.1 (default) + * @since 1.2 + */ + ECORE_CON_URL_HTTP_VERSION_1_1 +} Ecore_Con_Url_Http_Version; + +/** + * Change the HTTP version used for the request + * @param version The version to be used + * @return EINA_TRUE on success, EINA_FALSE on failure to change version + * @since 1.2 + * @see ecore_con_url_pipeline_get() + */ +EAPI Eina_Bool ecore_con_url_http_version_set(Ecore_Con_Url *url_con, Ecore_Con_Url_Http_Version version); + +/** * Initialises the Ecore_Con_Url library. * @return Number of times the library has been initialised without being * shut down. @@ -1554,33 +1586,6 @@ EAPI Eina_Bool ecore_con_url_httpauth_set(Ecore_Con_Url *url_con, const char *password, Eina_Bool safe); /** - * Sends a request. - * - * @param url_con Connection object to perform a request on, previously created - * with ecore_con_url_new() or ecore_con_url_custom_new(). - * @param data Payload (data sent on the request) - * @param length Payload length. If @c -1, rely on automatic length - * calculation via @c strlen() on @p data. - * @param content_type Content type of the payload (e.g. text/xml) - * - * @return #EINA_TRUE on success, #EINA_FALSE on error. - * - * @see ecore_con_url_custom_new() - * @see ecore_con_url_additional_headers_clear() - * @see ecore_con_url_additional_header_add() - * @see ecore_con_url_data_set() - * @see ecore_con_url_data_get() - * @see ecore_con_url_response_headers_get() - * @see ecore_con_url_time() - * @see ecore_con_url_get() - * @see ecore_con_url_post() - * - * @deprecated Use ecore_con_url_post() instead of this. - */ -EINA_DEPRECATED EAPI Eina_Bool ecore_con_url_send(Ecore_Con_Url *url_con, - const void *data, long length, - const char *content_type); -/** * Sends a get request. * * @param url_con Connection object to perform a request on, previously created @@ -1913,6 +1918,16 @@ EAPI Eina_Bool ecore_con_url_proxy_password_set(Ecore_Con_Url *url_con, const ch EAPI void ecore_con_url_timeout_set(Ecore_Con_Url *url_con, double timeout); /** + * Get the returned HTTP STATUS code + * + * This is used to, at any time, try to return the status code for a transmission. + * @param url_con Connection object + * @return A valid HTTP STATUS code, or 0 on failure + * + * @since 1.2 + */ +EAPI int ecore_con_url_status_code_get(Ecore_Con_Url *url_con); +/** * @} */ diff --git a/libraries/ecore/src/lib/ecore_con/Makefile.in b/libraries/ecore/src/lib/ecore_con/Makefile.in index 58811da..c35b08e 100644 --- a/libraries/ecore/src/lib/ecore_con/Makefile.in +++ b/libraries/ecore/src/lib/ecore_con/Makefile.in @@ -54,16 +54,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -210,6 +209,8 @@ 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@ @@ -265,6 +266,8 @@ 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@ @@ -275,6 +278,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_con/ecore_con.c b/libraries/ecore/src/lib/ecore_con/ecore_con.c index de291b3..fe83478 100644 --- a/libraries/ecore/src/lib/ecore_con/ecore_con.c +++ b/libraries/ecore/src/lib/ecore_con/ecore_con.c @@ -110,7 +110,10 @@ _ecore_con_client_kill(Ecore_Con_Client *cl) if (cl->delete_me) DBG("Multi kill request for client %p", cl); else - ecore_con_event_client_del(cl); + { + ecore_con_event_client_del(cl); + if (cl->buf) return; + } INF("Lost client %s", (cl->ip) ? cl->ip : ""); if (cl->fd_handler) ecore_main_fd_handler_del(cl->fd_handler); @@ -461,7 +464,7 @@ ecore_con_server_connect(Ecore_Con_Type compl_type, (!ecore_con_lookup(svr->name, (Ecore_Con_Dns_Cb)ecore_con_socks_dns_cb, svr))) goto error; if (svr->ecs->lookup) - svr->ecs_state = ECORE_CON_SOCKS_STATE_RESOLVED; + svr->ecs_state = ECORE_CON_PROXY_STATE_RESOLVED; } } if (ecore_con_ssl_server_prepare(svr, compl_type & ECORE_CON_SSL)) @@ -1031,7 +1034,7 @@ ecore_con_event_server_del(Ecore_Con_Server *svr) e->server = svr; if (svr->ecs) { - svr->ecs_state = svr->ecs->lookup ? ECORE_CON_SOCKS_STATE_RESOLVED : ECORE_CON_SOCKS_STATE_DONE; + svr->ecs_state = svr->ecs->lookup ? ECORE_CON_PROXY_STATE_RESOLVED : ECORE_CON_PROXY_STATE_DONE; eina_stringshare_replace(&svr->proxyip, NULL); svr->proxyport = 0; } @@ -1320,7 +1323,7 @@ _ecore_con_client_free(Ecore_Con_Client *cl) if (cl->event_count) return; ECORE_MAGIC_SET(cl, ECORE_MAGIC_NONE); - free(cl->buf); + if (cl->buf) eina_binbuf_free(cl->buf); if (cl->host_server->type & ECORE_CON_SSL) ecore_con_ssl_client_shutdown(cl); @@ -1736,7 +1739,7 @@ svr_try_connect_plain(Ecore_Con_Server *svr) if (so_err) { /* we lost our server! */ - ecore_con_event_server_error(svr, strerror(errno)); + ecore_con_event_server_error(svr, strerror(so_err)); ERR("Connection lost: %s", strerror(so_err)); _ecore_con_server_kill(svr); return ECORE_CON_DISCONNECTED; @@ -1971,9 +1974,9 @@ _ecore_con_cl_handler(void *data, ecore_con_event_server_add(svr); return ECORE_CALLBACK_RENEW; } - if (svr->ecs && svr->ecs_state && (svr->ecs_state < ECORE_CON_SOCKS_STATE_READ) && (!svr->ecs_buf)) + if (svr->ecs && svr->ecs_state && (svr->ecs_state < ECORE_CON_PROXY_STATE_READ) && (!svr->ecs_buf)) { - if (svr->ecs_state < ECORE_CON_SOCKS_STATE_INIT) + if (svr->ecs_state < ECORE_CON_PROXY_STATE_INIT) { INF("PROXY STATE++"); svr->ecs_state++; @@ -2271,7 +2274,7 @@ _ecore_con_server_flush(Ecore_Con_Server *svr) static void _ecore_con_client_flush(Ecore_Con_Client *cl) { - int num, count = 0; + int num = 0, count = 0; #ifdef _WIN32 if (ecore_con_local_win32_client_flush(cl)) @@ -2314,7 +2317,7 @@ _ecore_con_client_flush(Ecore_Con_Client *cl) } if (count) ecore_con_event_client_write(cl, count); - cl->buf_offset += count; + cl->buf_offset += count, num -= count; if (cl->buf_offset >= eina_binbuf_length_get(cl->buf)) { cl->buf_offset = 0; @@ -2332,7 +2335,7 @@ _ecore_con_client_flush(Ecore_Con_Client *cl) if (cl->fd_handler) ecore_main_fd_handler_active_set(cl->fd_handler, ECORE_FD_READ); } - else if ((count < num) && cl->fd_handler) + else if (cl->fd_handler && (num >= 0)) ecore_main_fd_handler_active_set(cl->fd_handler, ECORE_FD_WRITE); } diff --git a/libraries/ecore/src/lib/ecore_con/ecore_con_private.h b/libraries/ecore/src/lib/ecore_con/ecore_con_private.h index 35f2310..91f5d39 100644 --- a/libraries/ecore/src/lib/ecore_con/ecore_con_private.h +++ b/libraries/ecore/src/lib/ecore_con/ecore_con_private.h @@ -56,7 +56,7 @@ extern int _ecore_con_log_dom; typedef struct _Ecore_Con_Lookup Ecore_Con_Lookup; typedef struct _Ecore_Con_Info Ecore_Con_Info; -typedef struct Ecore_Con_Socks_v4 Ecore_Con_Socks_v4; +typedef struct Ecore_Con_Socks Ecore_Con_Socks_v4; typedef struct Ecore_Con_Socks_v5 Ecore_Con_Socks_v5; typedef void (*Ecore_Con_Info_Cb)(void *data, Ecore_Con_Info *infos); @@ -83,13 +83,18 @@ typedef enum _Ecore_Con_Ssl_Handshake ECORE_CON_SSL_STATE_INIT } Ecore_Con_Ssl_State; -typedef enum Ecore_Con_Socks_State -{ - ECORE_CON_SOCKS_STATE_DONE = 0, - ECORE_CON_SOCKS_STATE_RESOLVED, - ECORE_CON_SOCKS_STATE_INIT, - ECORE_CON_SOCKS_STATE_READ -} Ecore_Con_Socks_State; +typedef enum Ecore_Con_Proxy_State +{ /* named PROXY instead of SOCKS in case some handsome and enterprising + * developer decides to add HTTP CONNECT support + */ + ECORE_CON_PROXY_STATE_DONE = 0, + ECORE_CON_PROXY_STATE_RESOLVED, + ECORE_CON_PROXY_STATE_INIT, + ECORE_CON_PROXY_STATE_READ, + ECORE_CON_PROXY_STATE_AUTH, + ECORE_CON_PROXY_STATE_REQUEST, + ECORE_CON_PROXY_STATE_CONFIRM, +} Ecore_Con_Proxy_State; struct _Ecore_Con_Client { @@ -140,7 +145,7 @@ struct _Ecore_Con_Server pid_t ppid; /* socks */ Ecore_Con_Socks *ecs; - Ecore_Con_Socks_State ecs_state; + Ecore_Con_Proxy_State ecs_state; int ecs_addrlen; unsigned char ecs_addr[16]; unsigned int ecs_buf_offset; @@ -202,6 +207,7 @@ struct _Ecore_Con_Url Eina_List *response_headers; const char *url; long proxy_type; + int status; Ecore_Timer *timer; @@ -213,6 +219,10 @@ struct _Ecore_Con_Url int received; int write_fd; + + unsigned int event_count; + Eina_Bool dead : 1; + Eina_Bool multi : 1; }; #endif @@ -239,24 +249,14 @@ struct _Ecore_Con_Lookup v5 = (Ecore_Con_Socks_v5*)(X); \ else -struct Ecore_Con_Socks -{ - unsigned char version; - - const char *ip; - int port; - const char *username; - Eina_Bool lookup : 1; - Eina_Bool bind : 1; -}; - -struct Ecore_Con_Socks_v4 +struct Ecore_Con_Socks /* v4 */ { unsigned char version; const char *ip; int port; const char *username; + unsigned int ulen; Eina_Bool lookup : 1; Eina_Bool bind : 1; }; @@ -268,8 +268,13 @@ struct Ecore_Con_Socks_v5 const char *ip; int port; const char *username; + unsigned int ulen; Eina_Bool lookup : 1; Eina_Bool bind : 1; + /* v5 only */ + unsigned char method; + const char *password; + unsigned int plen; }; extern Ecore_Con_Socks *_ecore_con_proxy_once; diff --git a/libraries/ecore/src/lib/ecore_con/ecore_con_socks.c b/libraries/ecore/src/lib/ecore_con/ecore_con_socks.c index aecaff0..686f73b 100644 --- a/libraries/ecore/src/lib/ecore_con/ecore_con_socks.c +++ b/libraries/ecore/src/lib/ecore_con/ecore_con_socks.c @@ -10,6 +10,10 @@ #include #include +#ifdef HAVE_SYS_SOCKET_H +# include +#endif + #ifdef HAVE_NETINET_TCP_H # include #endif @@ -36,10 +40,6 @@ # include #endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif - #ifdef HAVE_SYS_UN_H # include #endif @@ -57,6 +57,27 @@ #include "Ecore_Con.h" #include "ecore_con_private.h" +/* http://tools.ietf.org/html/rfc1928 + o X'00' NO AUTHENTICATION REQUIRED + o X'01' GSSAPI + o X'02' USERNAME/PASSWORD + o X'03' to X'7F' IANA ASSIGNED + o X'80' to X'FE' RESERVED FOR PRIVATE METHODS + o X'FF' NO ACCEPTABLE METHODS +*/ +#define ECORE_CON_SOCKS_V5_METHOD_NONE 0 +#define ECORE_CON_SOCKS_V5_METHOD_GSSAPI 1 +#define ECORE_CON_SOCKS_V5_METHOD_USERPASS 2 + +static int ECORE_CON_SOCKS_V5_METHODS[] = +{ + ECORE_CON_SOCKS_V5_METHOD_NONE, +// ECORE_CON_SOCKS_V5_METHOD_GSSAPI, TODO + ECORE_CON_SOCKS_V5_METHOD_USERPASS +}; + +#define ECORE_CON_SOCKS_V5_TOTAL_METHODS sizeof(ECORE_CON_SOCKS_V5_METHODS) + #define _ecore_con_server_kill(svr) do { \ DBG("KILL %p", (svr)); \ _ecore_con_server_kill((svr)); \ @@ -65,10 +86,10 @@ Eina_List *ecore_con_socks_proxies = NULL; static Ecore_Con_Socks * -_ecore_con_socks_find(unsigned char version, const char *ip, int port, const char *username) +_ecore_con_socks_find(unsigned char version, const char *ip, int port, const char *username, size_t ulen, const char *password, size_t plen) { Eina_List *l; - Ecore_Con_Socks *ecs; + Ecore_Con_Socks_v5 *ecs; if (!ecore_con_socks_proxies) return NULL; @@ -77,8 +98,14 @@ _ecore_con_socks_find(unsigned char version, const char *ip, int port, const cha if (ecs->version != version) continue; if (strcmp(ecs->ip, ip)) continue; if ((port != -1) && (port != ecs->port)) continue; + if (ulen != ecs->ulen) continue; if (username && strcmp(ecs->username, username)) continue; - return ecs; + if (version == 5) + { + if (plen != ecs->plen) continue; + if (password && strcmp(ecs->password, password)) continue; + } + return (Ecore_Con_Socks*)ecs; } return NULL; } @@ -94,146 +121,424 @@ _ecore_con_socks_free(Ecore_Con_Socks *ecs) eina_stringshare_del(ecs->username); free(ecs); } -///////////////////////////////////////////////////////////////////////////////////// -void -ecore_con_socks_shutdown(void) + +static Eina_Bool +_ecore_con_socks_svr_init_v4(Ecore_Con_Server *svr, Ecore_Con_Socks_v4 *v4) { - Ecore_Con_Socks *ecs; - EINA_LIST_FREE(ecore_con_socks_proxies, ecs) - _ecore_con_socks_free(ecs); - _ecore_con_proxy_once = NULL; - _ecore_con_proxy_global = NULL; + size_t addrlen, buflen, ulen = 1; + unsigned char *sbuf; + + addrlen = v4->lookup ? strlen(svr->name) + 1 : 0; + if (v4->username) ulen += v4->ulen; + buflen = sizeof(char) * (8 + ulen + addrlen); + sbuf = malloc(buflen); + if (!sbuf) + { + ecore_con_event_server_error(svr, "Memory allocation failure!"); + _ecore_con_server_kill(svr); + return EINA_FALSE; + } + /* http://en.wikipedia.org/wiki/SOCKS */ + sbuf[0] = 4; + sbuf[1] = v4->bind ? 2 : 1; + sbuf[2] = svr->port >> 8; + sbuf[3] = svr->port & 0xff; + if (addrlen) + { + sbuf[4] = sbuf[5] = sbuf[6] = 0; + sbuf[7] = 1; + } + else + /* SOCKSv4 only handles IPV4, so addrlen is always 4 */ + memcpy(sbuf + 4, svr->ecs_addr, 4); + if (v4->username) + memcpy(sbuf + 8, v4->username, ulen); + else + sbuf[8] = 0; + if (addrlen) memcpy(sbuf + 8 + ulen, svr->name, addrlen); + + svr->ecs_buf = eina_binbuf_manage_new_length(sbuf, buflen); + return EINA_TRUE; } -void -ecore_con_socks_read(Ecore_Con_Server *svr, unsigned char *buf, int num) +static Eina_Bool +_ecore_con_socks_svr_init_v5(Ecore_Con_Server *svr, Ecore_Con_Socks_v5 *v5) +{ + size_t buflen; + unsigned int x; + unsigned char *sbuf; + + if (v5->username) + buflen = sizeof(char) * (2 + ECORE_CON_SOCKS_V5_TOTAL_METHODS); + else + buflen = 3; + sbuf = malloc(buflen); + if (!sbuf) + { + ecore_con_event_server_error(svr, "Memory allocation failure!"); + _ecore_con_server_kill(svr); + return EINA_FALSE; + } + /* http://en.wikipedia.org/wiki/SOCKS + * http://tools.ietf.org/html/rfc1928 + */ + sbuf[0] = 5; + if (v5->username) + { + sbuf[1] = ECORE_CON_SOCKS_V5_TOTAL_METHODS; + for (x = 2; x < 2 + ECORE_CON_SOCKS_V5_TOTAL_METHODS; x++) + sbuf[x] = ECORE_CON_SOCKS_V5_METHODS[x - 2]; + } + else + { + sbuf[1] = 1; + sbuf[2] = ECORE_CON_SOCKS_V5_METHOD_NONE; + } + + svr->ecs_buf = eina_binbuf_manage_new_length(sbuf, buflen); + return EINA_TRUE; +} + +#define ECORE_CON_SOCKS_READ(EXACT) \ + if (num < EXACT) \ + { \ + if (!svr->ecs_recvbuf) svr->ecs_recvbuf = eina_binbuf_new(); \ + if (!svr->ecs_recvbuf) goto error; \ + eina_binbuf_append_length(svr->ecs_recvbuf, buf, num); \ + /* the slowest connection on earth */ \ + if (eina_binbuf_length_get(svr->ecs_recvbuf) != EXACT) return; \ + data = eina_binbuf_string_get(svr->ecs_recvbuf); \ + } \ + else if (num > EXACT) goto error; \ + else \ + data = buf + +static void +_ecore_con_socks_read_v4(Ecore_Con_Server *svr, Ecore_Con_Socks_v4 *v4 __UNUSED__, const unsigned char *buf, unsigned int num) { const unsigned char *data; - ECORE_CON_SOCKS_CAST_ELSE(svr->ecs) return; + DBG("SOCKS: %d bytes", num); + ECORE_CON_SOCKS_READ(8); - if (svr->ecs_state != ECORE_CON_SOCKS_STATE_READ) return; +/* http://ufasoft.com/doc/socks4_protocol.htm */ + if (data[0]) goto error; + switch (data[1]) + { + case 90: + /* success! */ + break; + case 91: + ecore_con_event_server_error(svr, "proxy request rejected or failed"); + goto error; + case 92: + ecore_con_event_server_error(svr, "proxying SOCKS server could not perform authentication"); + goto error; + case 93: + ecore_con_event_server_error(svr, "proxy request authentication rejected"); + goto error; + default: + ecore_con_event_server_error(svr, "garbage data from proxy"); + goto error; + } + if (svr->ecs->bind) + { + unsigned int nport; + char naddr[IF_NAMESIZE]; - if (v4) + memcpy(&nport, &data[2], 2); + svr->proxyport = ntohl(nport); + + if (!inet_ntop(AF_INET, &data[4], naddr, sizeof(naddr))) goto error; + svr->proxyip = eina_stringshare_add(naddr); + ecore_con_event_proxy_bind(svr); + } + svr->ecs_state = ECORE_CON_PROXY_STATE_DONE; + INF("PROXY CONNECTED"); + if (svr->ecs_recvbuf) eina_binbuf_free(svr->ecs_recvbuf); + svr->ecs_recvbuf = NULL; + svr->ecs_buf_offset = svr->ecs_addrlen = 0; + memset(svr->ecs_addr, 0, sizeof(svr->ecs_addr)); + if (!svr->ssl_state) + ecore_con_event_server_add(svr); + if (svr->ssl_state || (svr->buf && eina_binbuf_length_get(svr->buf))) + ecore_main_fd_handler_active_set(svr->fd_handler, ECORE_FD_READ | ECORE_FD_WRITE); + return; +error: + _ecore_con_server_kill(svr); +} + +static Eina_Bool +_ecore_con_socks_auth_v5(Ecore_Con_Server *svr, Ecore_Con_Socks_v5 *v5) +{ + size_t size; + unsigned char *data; + switch (v5->method) + { + case ECORE_CON_SOCKS_V5_METHOD_NONE: + svr->ecs_state = ECORE_CON_PROXY_STATE_REQUEST; + return EINA_TRUE; + case ECORE_CON_SOCKS_V5_METHOD_GSSAPI: + return EINA_TRUE; + case ECORE_CON_SOCKS_V5_METHOD_USERPASS: + if (!v5->username) return EINA_FALSE; + if (!v5->password) v5->plen = 1; + /* http://tools.ietf.org/html/rfc1929 */ + size = sizeof(char) * (3 + v5->ulen + v5->plen); + data = malloc(size); + if (!data) break; + data[0] = 1; + data[1] = v5->ulen; + memcpy(&data[2], v5->username, v5->ulen); + data[1 + v5->ulen] = v5->plen; + if (v5->password) + memcpy(&data[2 + v5->ulen], v5->password, v5->plen); + else + data[2 + v5->ulen] = 0; + svr->ecs_buf = eina_binbuf_manage_new_length(data, size); + return EINA_TRUE; + default: + break; + } + return EINA_FALSE; +} + +static void +_ecore_con_socks_read_v5(Ecore_Con_Server *svr, Ecore_Con_Socks_v5 *v5, const unsigned char *buf, unsigned int num) +{ + const unsigned char *data; + + DBG("SOCKS: %d bytes", num); + switch (svr->ecs_state) { - DBG("SOCKS: %d bytes", num); - if (num < 8) - { - if (!svr->ecs_recvbuf) svr->ecs_recvbuf = eina_binbuf_new(); - if (!svr->ecs_recvbuf) goto error; - eina_binbuf_append_length(svr->ecs_recvbuf, buf, num); - /* the slowest connection on earth */ - if (eina_binbuf_length_get(svr->ecs_recvbuf) != 8) return; - data = eina_binbuf_string_get(svr->ecs_recvbuf); - } - else if (num > 8) goto error; - else - data = buf; - /* http://ufasoft.com/doc/socks4_protocol.htm */ - if (data[0]) goto error; - switch (data[1]) + case ECORE_CON_PROXY_STATE_READ: + ECORE_CON_SOCKS_READ(2); + /* http://en.wikipedia.org/wiki/SOCKS */ + if (data[0] != 5) goto error; + if (data[1] == 0xFF) + { + ecore_con_event_server_error(svr, "proxy authentication methods rejected"); + goto error; + } + v5->method = data[1]; + if (!_ecore_con_socks_auth_v5(svr, v5)) goto error; + if (svr->ecs_state == ECORE_CON_PROXY_STATE_REQUEST) + { + /* run again to skip auth reading */ + _ecore_con_socks_read_v5(svr, v5, NULL, 0); + return; + } + ecore_main_fd_handler_active_set(svr->fd_handler, ECORE_FD_WRITE); + svr->ecs_state = ECORE_CON_PROXY_STATE_AUTH; + break; + case ECORE_CON_PROXY_STATE_AUTH: + ECORE_CON_SOCKS_READ(2); + switch (v5->method) + { + case ECORE_CON_SOCKS_V5_METHOD_NONE: + CRIT("HOW DID THIS HAPPEN?????????"); + goto error; + case ECORE_CON_SOCKS_V5_METHOD_GSSAPI: + /* TODO: this */ + break; + case ECORE_CON_SOCKS_V5_METHOD_USERPASS: + if (data[0] != 1) + { + ecore_con_event_server_error(svr, "protocol error"); + goto error; /* wrong version */ + } + if (data[1]) + { + ecore_con_event_server_error(svr, "proxy request authentication rejected"); + goto error; + } + default: + break; + } + case ECORE_CON_PROXY_STATE_REQUEST: { - case 90: - /* success! */ - break; - case 91: - ecore_con_event_server_error(svr, "proxy request rejected or failed"); - goto error; - case 92: - ecore_con_event_server_error(svr, "proxying SOCKS server could not perform authentication"); - goto error; - case 93: - ecore_con_event_server_error(svr, "proxy request authentication rejected"); - goto error; - default: - ecore_con_event_server_error(svr, "garbage data from proxy"); - goto error; + size_t addrlen, buflen; + unsigned char *sbuf; + addrlen = v5->lookup ? strlen(svr->name) + 1 : (unsigned int)svr->ecs_addrlen; + buflen = sizeof(char) * (6 + addrlen); + sbuf = malloc(buflen); + if (!sbuf) + { + ecore_con_event_server_error(svr, "Memory allocation failure!"); + goto error; + } + sbuf[0] = 5; + sbuf[1] = v5->bind ? 2 : 1; /* TODO: 0x03 for UDP port association */ + sbuf[2] = 0; + if (v5->lookup) /* domain name */ + { + sbuf[3] = 3; + sbuf[4] = addrlen - 1; + memcpy(sbuf + 5, svr->name, addrlen - 1); + } + else + { + sbuf[3] = (svr->ecs_addrlen == 4) ? 1 : 4; + memcpy(sbuf + 4, svr->ecs_addr, addrlen); + } + sbuf[addrlen + 4] = svr->port >> 8; + sbuf[addrlen + 5] = svr->port & 0xff; + + svr->ecs_buf = eina_binbuf_manage_new_length(sbuf, buflen); + ecore_main_fd_handler_active_set(svr->fd_handler, ECORE_FD_WRITE); + break; } - if (svr->ecs->bind) + case ECORE_CON_PROXY_STATE_CONFIRM: { - unsigned int nport; - char naddr[IF_NAMESIZE]; - - memcpy(&nport, &data[2], 2); - svr->proxyport = ntohl(nport); - - if (!inet_ntop(AF_INET, &data[4], naddr, sizeof(naddr))) goto error; - svr->proxyip = eina_stringshare_add(naddr); - ecore_con_event_proxy_bind(svr); + /* this is ugly because we have to read an exact number of bytes, + * but we don't know what that number is until we've already read + * at least 5 bytes to determine the length of the unknown stream. + * yep. + */ + size_t to_read, len = svr->ecs_recvbuf ? eina_binbuf_length_get(svr->ecs_recvbuf) : 0; + if (num + len < 5) + { + /* guarantees we get called again */ + ECORE_CON_SOCKS_READ(5); + } + if (len >= 5) + { + data = eina_binbuf_string_get(svr->ecs_recvbuf); + data += 3; + } + else + data = buf + 3 - len; + switch (data[0]) + { + case 1: + to_read = 4; + break; + case 3: + to_read = data[1] + 1; + break; + case 4: + to_read = 16; + /* lazy debugging stub comment */ + break; + default: + ecore_con_event_server_error(svr, "protocol error"); + goto error; + } + /* at this point, we finally know exactly how much we need to read */ + ECORE_CON_SOCKS_READ(6 + to_read); + + if (data[0] != 5) + { + ecore_con_event_server_error(svr, "protocol error"); + goto error; /* wrong version */ + } + switch (data[1]) + { + case 0: + break; + case 1: + ecore_con_event_server_error(svr, "general proxy failure"); + goto error; + case 2: + ecore_con_event_server_error(svr, "connection not allowed by ruleset"); + goto error; + case 3: + ecore_con_event_server_error(svr, "network unreachable"); + goto error; + case 4: + ecore_con_event_server_error(svr, "host unreachable"); + goto error; + case 5: + ecore_con_event_server_error(svr, "connection refused by destination host"); + goto error; + case 6: + ecore_con_event_server_error(svr, "TTL expired"); + goto error; + case 7: + ecore_con_event_server_error(svr, "command not supported / protocol error"); + goto error; + case 8: + ecore_con_event_server_error(svr, "address type not supported"); + default: + goto error; + } + if (data[2]) + { + ecore_con_event_server_error(svr, "protocol error"); + goto error; + } + memset(svr->ecs_addr, 0, sizeof(svr->ecs_addr)); + if (!svr->ssl_state) + ecore_con_event_server_add(svr); + if (svr->ssl_state || (svr->buf && eina_binbuf_length_get(svr->buf))) + ecore_main_fd_handler_active_set(svr->fd_handler, ECORE_FD_READ | ECORE_FD_WRITE); + svr->ecs_buf_offset = svr->ecs_addrlen = 0; + svr->ecs_state = ECORE_CON_PROXY_STATE_DONE; + INF("PROXY CONNECTED"); + break; } - svr->ecs_state = ECORE_CON_SOCKS_STATE_DONE; - INF("PROXY CONNECTED"); - if (svr->ecs_recvbuf) eina_binbuf_free(svr->ecs_recvbuf); - svr->ecs_recvbuf = NULL; - svr->ecs_buf_offset = svr->ecs_addrlen = 0; - memset(svr->ecs_addr, 0, sizeof(svr->ecs_addr)); - if (!svr->ssl_state) - ecore_con_event_server_add(svr); - if (svr->ssl_state || (svr->buf && eina_binbuf_length_get(svr->buf))) - ecore_main_fd_handler_active_set(svr->fd_handler, ECORE_FD_READ | ECORE_FD_WRITE); + default: + break; } + if (svr->ecs_recvbuf) eina_binbuf_free(svr->ecs_recvbuf); + svr->ecs_recvbuf = NULL; + return; error: _ecore_con_server_kill(svr); } +///////////////////////////////////////////////////////////////////////////////////// +void +ecore_con_socks_shutdown(void) +{ + Ecore_Con_Socks *ecs; + EINA_LIST_FREE(ecore_con_socks_proxies, ecs) + _ecore_con_socks_free(ecs); + _ecore_con_proxy_once = NULL; + _ecore_con_proxy_global = NULL; +} + +void +ecore_con_socks_read(Ecore_Con_Server *svr, unsigned char *buf, int num) +{ + ECORE_CON_SOCKS_CAST_ELSE(svr->ecs) return; + + if (svr->ecs_state < ECORE_CON_PROXY_STATE_READ) return; + + if (v4) _ecore_con_socks_read_v4(svr, v4, buf, (unsigned int)num); + else _ecore_con_socks_read_v5(svr, v5, buf, (unsigned int)num); +} + Eina_Bool ecore_con_socks_svr_init(Ecore_Con_Server *svr) { - unsigned char *sbuf; ECORE_CON_SOCKS_CAST_ELSE(svr->ecs) return EINA_FALSE; if (!svr->ip) return EINA_FALSE; if (svr->ecs_buf) return EINA_FALSE; - if (svr->ecs_state != ECORE_CON_SOCKS_STATE_INIT) return EINA_FALSE; + if (svr->ecs_state != ECORE_CON_PROXY_STATE_INIT) return EINA_FALSE; ecore_main_fd_handler_active_set(svr->fd_handler, ECORE_FD_WRITE); - if (v4) - { - size_t addrlen, buflen, ulen = 1; - addrlen = svr->ecs->lookup ? strlen(svr->name) + 1: 0; - if (svr->ecs->username) ulen += strlen(svr->ecs->username); - buflen = sizeof(char) * (8 + ulen + addrlen); - sbuf = malloc(buflen); - if (!sbuf) - { - ecore_con_event_server_error(svr, "Memory allocation failure!"); - _ecore_con_server_kill(svr); - return EINA_FALSE; - } - /* http://en.wikipedia.org/wiki/SOCKS */ - sbuf[0] = 4; - sbuf[1] = v4->bind ? 2 : 1; - sbuf[2] = svr->port >> 8; - sbuf[3] = svr->port & 0xff; - if (addrlen) - { - sbuf[4] = sbuf[5] = sbuf[6] = 0; - sbuf[7] = 1; - } - else - memcpy(sbuf + 4, svr->ecs_addr, 4); - if (svr->ecs->username) - memcpy(sbuf + 8, svr->ecs->username, ulen); - else - sbuf[8] = 0; - if (addrlen) memcpy(sbuf + 8 + ulen, svr->name, addrlen); - - svr->ecs_buf = eina_binbuf_manage_new_length(sbuf, buflen); - } - return EINA_TRUE; + if (v4) return _ecore_con_socks_svr_init_v4(svr, v4); + return _ecore_con_socks_svr_init_v5(svr, v5); } void -ecore_con_socks_dns_cb(const char *canonname __UNUSED__, const char *ip, struct sockaddr *addr, int addrlen, Ecore_Con_Server *svr) +ecore_con_socks_dns_cb(const char *canonname __UNUSED__, const char *ip, struct sockaddr *addr, int addrlen __UNUSED__, Ecore_Con_Server *svr) { svr->ip = eina_stringshare_add(ip); - svr->ecs_addrlen = addrlen; svr->ecs_state++; if (addr->sa_family == AF_INET) - memcpy(svr->ecs_addr, &((struct sockaddr_in *)addr)->sin_addr.s_addr, 4); + { + memcpy(svr->ecs_addr, &((struct sockaddr_in *)addr)->sin_addr.s_addr, 4); + svr->ecs_addrlen = 4; + } #ifdef HAVE_IPV6 else - memcpy(svr->ecs_addr, &((struct sockaddr_in6 *)addr)->sin6_addr.s6_addr, addrlen); + { + memcpy(svr->ecs_addr, &((struct sockaddr_in6 *)addr)->sin6_addr.s6_addr, 16); + svr->ecs_addrlen = 16; + } #endif ecore_con_socks_svr_init(svr); } @@ -242,36 +547,57 @@ void ecore_con_socks_init(void) { const char *socks; - char *u, *h, *p, *l; - char buf[64]; + char *h, *p, *l, *u = NULL; + char buf[512]; int port, lookup = 0; + Eina_Bool v5 = EINA_FALSE; Ecore_Con_Socks *ecs; unsigned char addr[sizeof(struct in_addr)]; +#ifdef HAVE_IPV6 + unsigned char addr6[sizeof(struct in6_addr)]; +#endif - /* ECORE_CON_SOCKS_V4=user@host:port:[1|0] */ + /* ECORE_CON_SOCKS_V4=[user@]host:port-[1|0] */ socks = getenv("ECORE_CON_SOCKS_V4"); - if ((!socks) || (!socks[0]) || (strlen(socks) > 64)) return; + if (!socks) + { + /* ECORE_CON_SOCKS_V5=[user@]host-port:[1|0] */ + socks = getenv("ECORE_CON_SOCKS_V5"); + v5 = EINA_TRUE; + } + if ((!socks) || (!socks[0]) || (strlen(socks) > 512)) return; strncpy(buf, socks, sizeof(buf)); h = strchr(buf, '@'); - u = NULL; /* username */ if (h && (h - buf > 0)) *h++ = 0, u = buf; else h = buf; /* host ip; I ain't resolvin shit here */ - p = strchr(h, ':'); + p = strchr(h, '-'); if (!p) return; *p++ = 0; - if (!inet_pton(AF_INET, h, addr)) return; + if (!inet_pton(AF_INET, h, addr)) +#ifdef HAVE_IPV6 + { + if (!v5) return; + if (!inet_pton(AF_INET6, h, addr6)) + return; + } +#else + return; +#endif errno = 0; port = strtol(p, &l, 10); if (errno || (port < 0) || (port > 65535)) return; if (l && (l[0] == ':')) lookup = (l[1] == '1'); - ecs = ecore_con_socks4_remote_add(h, port, u); + if (v5) + ecs = ecore_con_socks5_remote_add(h, port, u, NULL); + else + ecs = ecore_con_socks4_remote_add(h, port, u); if (!ecs) return; - ecore_con_socks4_lookup_set(ecs, lookup); + ecore_con_socks_lookup_set(ecs, lookup); ecore_con_socks_apply_always(ecs); INF("Added global proxy server %s%s%s:%d - DNS lookup %s", u ?: "", u ? "@" : "", h, port, lookup ? "ENABLED" : "DISABLED"); @@ -300,10 +626,17 @@ EAPI Ecore_Con_Socks * ecore_con_socks4_remote_add(const char *ip, int port, const char *username) { Ecore_Con_Socks *ecs; + size_t ulen = 0; if ((!ip) || (!ip[0]) || (port < 0) || (port > 65535)) return NULL; - ecs = _ecore_con_socks_find(4, ip, port, username); + if (username) + { + ulen = strlen(username); + /* max length for protocol */ + if ((!ulen) || (ulen > 255)) return NULL; + } + ecs = _ecore_con_socks_find(4, ip, port, username, ulen, NULL, 0); if (ecs) return ecs; ecs = calloc(1, sizeof(Ecore_Con_Socks_v4)); @@ -313,92 +646,194 @@ ecore_con_socks4_remote_add(const char *ip, int port, const char *username) ecs->ip = eina_stringshare_add(ip); ecs->port = port; ecs->username = eina_stringshare_add(username); + ecs->ulen = ulen; ecore_con_socks_proxies = eina_list_append(ecore_con_socks_proxies, ecs); return ecs; } /** - * Set DNS lookup mode on an existing SOCKS v4 proxy + * Find a SOCKS v4 proxy in the proxy list * - * According to RFC, SOCKS v4 does not require that a proxy perform - * its own DNS lookups for addresses. SOCKS v4a specifies the protocol - * for this. If you want to enable remote DNS lookup and are sure that your - * proxy supports it, use this function. - * @param ecs The proxy object - * @param enable If true, the proxy will perform the dns lookup - * @note By default, this setting is DISABLED. + * Use this to determine if a SOCKS proxy was previously added by checking + * the proxy list against the parameters given. + * @param ip The ip address of the proxy (NOT DOMAIN NAME. IP ADDRESS.) + * @param port The port to connect to on the proxy, or -1 to match the first proxy with @p ip + * @param username The username used for the proxy (OPTIONAL) + * @return true only if a proxy exists matching the given params + * @note This function matches slightly more loosely than ecore_con_socks4_remote_add(), and + * ecore_con_socks4_remote_add() should be used to return the actual object. * @since 1.2 */ -EAPI void -ecore_con_socks4_lookup_set(Ecore_Con_Socks *ecs, Eina_Bool enable) +EAPI Eina_Bool +ecore_con_socks4_remote_exists(const char *ip, int port, const char *username) { - ECORE_CON_SOCKS_CAST_ELSE(ecs) return; - if (v4) v4->lookup = !!enable; + if ((!ip) || (!ip[0]) || (port < -1) || (port > 65535) || (username && (!username[0]))) + return EINA_FALSE; + return !!_ecore_con_socks_find(4, ip, port, username, username ? strlen(username) : 0, NULL, 0); } /** - * Get DNS lookup mode on an existing SOCKS v4 proxy + * Remove a SOCKS v4 proxy from the proxy list and delete it * - * According to RFC, SOCKS v4 does not require that a proxy perform - * its own DNS lookups for addresses. SOCKS v4a specifies the protocol - * for this. This function returns whether lookups are enabled on a proxy object. - * @param ecs The proxy object - * @return If true, the proxy will perform the dns lookup - * @note By default, this setting is DISABLED. + * Use this to remove a SOCKS proxy from the proxy list by checking + * the list against the parameters given. The proxy will then be deleted. + * @param ip The ip address of the proxy (NOT DOMAIN NAME. IP ADDRESS.) + * @param port The port to connect to on the proxy, or -1 to match the first proxy with @p ip + * @param username The username used for the proxy (OPTIONAL) + * @note This function matches in the same way as ecore_con_socks4_remote_exists(). + * @warning Be aware that deleting a proxy which is being used WILL ruin your life. * @since 1.2 */ -EAPI Eina_Bool -ecore_con_socks4_lookup_get(Ecore_Con_Socks *ecs) +EAPI void +ecore_con_socks4_remote_del(const char *ip, int port, const char *username) { - ECORE_CON_SOCKS_CAST_ELSE(ecs) return EINA_FALSE; - return v4 ? v4->lookup : EINA_FALSE; + Ecore_Con_Socks_v4 *v4; + + if ((!ip) || (!ip[0]) || (port < -1) || (port > 65535) || (username && (!username[0]))) return; + if (!ecore_con_socks_proxies) return; + + v4 = (Ecore_Con_Socks_v4*)_ecore_con_socks_find(4, ip, port, username, username ? strlen(username) : 0, NULL, 0); + if (!v4) return; + ecore_con_socks_proxies = eina_list_remove(ecore_con_socks_proxies, v4); + _ecore_con_socks_free((Ecore_Con_Socks*)v4); +} +/** + * Add a SOCKS v5 proxy to the proxy list + * + * Use this to create (or return, if previously added) a SOCKS proxy + * object which can be used by any ecore_con servers. + * @param ip The ip address of the proxy (NOT DOMAIN NAME. IP ADDRESS.) + * @param port The port to connect to on the proxy + * @param username The username to use for the proxy (OPTIONAL) + * @param password The password to use for the proxy (OPTIONAL) + * @return An allocated proxy object, or NULL on failure + * @note This object NEVER needs to be explicitly freed. + * @since 1.2 + */ +EAPI Ecore_Con_Socks * +ecore_con_socks5_remote_add(const char *ip, int port, const char *username, const char *password) +{ + Ecore_Con_Socks_v5 *ecs5; + size_t ulen = 0, plen = 0; + + if ((!ip) || (!ip[0]) || (port < 0) || (port > 65535)) return NULL; + + if (username) + { + ulen = strlen(username); + /* max length for protocol */ + if ((!ulen) || (ulen > 255)) return NULL; + } + if (password) + { + plen = strlen(password); + /* max length for protocol */ + if ((!plen) || (plen > 255)) return NULL; + } + ecs5 = (Ecore_Con_Socks_v5*)_ecore_con_socks_find(5, ip, port, username, ulen, password, plen); + if (ecs5) return (Ecore_Con_Socks*)ecs5; + + ecs5 = calloc(1, sizeof(Ecore_Con_Socks_v5)); + if (!ecs5) return NULL; + + ecs5->version = 5; + ecs5->ip = eina_stringshare_add(ip); + ecs5->port = port; + ecs5->username = eina_stringshare_add(username); + ecs5->ulen = ulen; + ecs5->password = eina_stringshare_add(password); + ecs5->plen = plen; + ecore_con_socks_proxies = eina_list_append(ecore_con_socks_proxies, ecs5); + return (Ecore_Con_Socks*)ecs5; } /** - * Find a SOCKS v4 proxy in the proxy list + * Find a SOCKS v5 proxy in the proxy list * * Use this to determine if a SOCKS proxy was previously added by checking * the proxy list against the parameters given. * @param ip The ip address of the proxy (NOT DOMAIN NAME. IP ADDRESS.) * @param port The port to connect to on the proxy, or -1 to match the first proxy with @p ip * @param username The username used for the proxy (OPTIONAL) + * @param password The password used for the proxy (OPTIONAL) * @return true only if a proxy exists matching the given params - * @note This function matches slightly more loosely than ecore_con_socks4_remote_add(), and - * ecore_con_socks4_remote_add() should be used to return the actual object. + * @note This function matches slightly more loosely than ecore_con_socks5_remote_add(), and + * ecore_con_socks5_remote_add() should be used to return the actual object. * @since 1.2 */ EAPI Eina_Bool -ecore_con_socks4_remote_exists(const char *ip, int port, const char *username) +ecore_con_socks5_remote_exists(const char *ip, int port, const char *username, const char *password) { - if ((!ip) || (!ip[0]) || (port < -1) || (port > 65535) || (username && (!username[0]))) + if ((!ip) || (!ip[0]) || (port < -1) || (port > 65535) || (username && (!username[0])) || (password && (!password[0]))) return EINA_FALSE; - return !!_ecore_con_socks_find(4, ip, port, username); + return !!_ecore_con_socks_find(5, ip, port, username, username ? strlen(username) : 0, password, password ? strlen(password) : 0); } /** - * Remove a SOCKS v4 proxy from the proxy list and delete it + * Remove a SOCKS v5 proxy from the proxy list and delete it * * Use this to remove a SOCKS proxy from the proxy list by checking * the list against the parameters given. The proxy will then be deleted. * @param ip The ip address of the proxy (NOT DOMAIN NAME. IP ADDRESS.) * @param port The port to connect to on the proxy, or -1 to match the first proxy with @p ip * @param username The username used for the proxy (OPTIONAL) + * @param password The password used for the proxy (OPTIONAL) * @note This function matches in the same way as ecore_con_socks4_remote_exists(). * @warning Be aware that deleting a proxy which is being used WILL ruin your life. * @since 1.2 */ EAPI void -ecore_con_socks4_remote_del(const char *ip, int port, const char *username) +ecore_con_socks5_remote_del(const char *ip, int port, const char *username, const char *password) { - Ecore_Con_Socks_v4 *v4; + Ecore_Con_Socks_v5 *v5; - if ((!ip) || (!ip[0]) || (port < -1) || (port > 65535) || (username && (!username[0]))) return; + if ((!ip) || (!ip[0]) || (port < -1) || (port > 65535) || (username && (!username[0])) || (password && (!password[0]))) + return; if (!ecore_con_socks_proxies) return; - v4 = (Ecore_Con_Socks_v4*)_ecore_con_socks_find(4, ip, port, username); - if (!v4) return; - ecore_con_socks_proxies = eina_list_remove(ecore_con_socks_proxies, v4); - _ecore_con_socks_free((Ecore_Con_Socks*)v4); + v5 = (Ecore_Con_Socks_v5*)_ecore_con_socks_find(5, ip, port, username, username ? strlen(username) : 0, password, password ? strlen(password) : 0); + if (!v5) return; + ecore_con_socks_proxies = eina_list_remove(ecore_con_socks_proxies, v5); + _ecore_con_socks_free((Ecore_Con_Socks*)v5); +} + +/** + * Set DNS lookup mode on an existing SOCKS proxy + * + * According to RFC, SOCKS v4 does not require that a proxy perform + * its own DNS lookups for addresses. SOCKS v4a specifies the protocol + * for this. SOCKS v5 allows DNS lookups. + * If you want to enable remote DNS lookup and are sure that your + * proxy supports it, use this function. + * @param ecs The proxy object + * @param enable If true, the proxy will perform the dns lookup + * @note By default, this setting is DISABLED. + * @since 1.2 + */ +EAPI void +ecore_con_socks_lookup_set(Ecore_Con_Socks *ecs, Eina_Bool enable) +{ + ECORE_CON_SOCKS_CAST_ELSE(ecs) return; + ecs->lookup = !!enable; +} + +/** + * Get DNS lookup mode on an existing SOCKS proxy + * + * According to RFC, SOCKS v4 does not require that a proxy perform + * its own DNS lookups for addresses. SOCKS v4a specifies the protocol + * for this. SOCKS v5 allows DNS lookups. + * This function returns whether lookups are enabled on a proxy object. + * @param ecs The proxy object + * @return If true, the proxy will perform the dns lookup + * @note By default, this setting is DISABLED. + * @since 1.2 + */ +EAPI Eina_Bool +ecore_con_socks_lookup_get(Ecore_Con_Socks *ecs) +{ + ECORE_CON_SOCKS_CAST_ELSE(ecs) return EINA_FALSE; + return ecs->lookup; } /** @@ -434,6 +869,14 @@ ecore_con_socks_bind_get(Ecore_Con_Socks *ecs) return ecs->bind; } +/** + * Return SOCKS version of a SOCKS proxy + * + * Use this function to return the SOCKS protocol version of a proxy + * @param ecs The proxy object + * @return 0 on error, else 4/5 + * @since 1.2 + */ EAPI unsigned int ecore_con_socks_version_get(Ecore_Con_Socks *ecs) { @@ -482,7 +925,8 @@ ecore_con_socks_apply_once(Ecore_Con_Socks *ecs) * @see ecore_con_socks_apply_once() * @since 1.2 * @note ecore-con supports setting this through environment variables like so: - * ECORE_CON_SOCKS_V4=[user@]server:port:lookup + * ECORE_CON_SOCKS_V4=[user@]server-port:lookup + * ECORE_CON_SOCKS_V5=[user@]server-port:lookup * user is the OPTIONAL string that would be passed to the proxy as the username * server is the IP_ADDRESS of the proxy server * port is the port to connect to on the proxy server diff --git a/libraries/ecore/src/lib/ecore_con/ecore_con_ssl.c b/libraries/ecore/src/lib/ecore_con/ecore_con_ssl.c index 6104632..cd8b9c6 100644 --- a/libraries/ecore/src/lib/ecore_con/ecore_con_ssl.c +++ b/libraries/ecore/src/lib/ecore_con/ecore_con_ssl.c @@ -652,6 +652,7 @@ ecore_con_ssl_server_verify_name_get(Ecore_Con_Server *svr) * Use this function to add a SSL PEM certificate. * Simply specify the cert here to use it in the server object for connecting or listening. * If there is an error loading the certificate, an error will automatically be logged. + * @param svr The server object * @param cert The path to the certificate. * @return EINA_FALSE if the file cannot be loaded, otherwise EINA_TRUE. */ @@ -683,6 +684,7 @@ ecore_con_ssl_server_cert_add(Ecore_Con_Server *svr, * Use this function to add a SSL PEM CA file. * Simply specify the file here to use it in the server object for connecting or listening. * If there is an error loading the CAs, an error will automatically be logged. + * @param svr The server object * @param ca_file The path to the CA file. * @return EINA_FALSE if the file cannot be loaded, otherwise EINA_TRUE. * @note since 1.2, this function can load directores @@ -747,6 +749,7 @@ ecore_con_ssl_server_privkey_add(Ecore_Con_Server *svr, * Use this function to add a SSL PEM CRL file * Simply specify the CRL file here to use it in the server object for connecting or listening. * If there is an error loading the CRL, an error will automatically be logged. + * @param svr The server object * @param crl_file The path to the CRL file. * @return EINA_FALSE if the file cannot be loaded, * otherwise EINA_TRUE. diff --git a/libraries/ecore/src/lib/ecore_con/ecore_con_url.c b/libraries/ecore/src/lib/ecore_con/ecore_con_url.c index 709b554..05f0678 100644 --- a/libraries/ecore/src/lib/ecore_con/ecore_con_url.c +++ b/libraries/ecore/src/lib/ecore_con/ecore_con_url.c @@ -30,41 +30,31 @@ #include "Ecore_Con.h" #include "ecore_con_private.h" +#define CURL_MIN_TIMEOUT 100 + int ECORE_CON_EVENT_URL_DATA = 0; int ECORE_CON_EVENT_URL_COMPLETE = 0; int ECORE_CON_EVENT_URL_PROGRESS = 0; #ifdef HAVE_CURL +static void _ecore_con_url_event_url_complete(Ecore_Con_Url *url_con, CURLMsg *curlmsg); +static void _ecore_con_url_multi_remove(Ecore_Con_Url *url_con); static Eina_Bool _ecore_con_url_perform(Ecore_Con_Url *url_con); -static size_t _ecore_con_url_header_cb(void *ptr, - size_t size, - size_t nitems, - void *stream); -static size_t _ecore_con_url_data_cb(void *buffer, - size_t size, - size_t nitems, - void *userp); -static int _ecore_con_url_progress_cb(void *clientp, - double dltotal, - double dlnow, - double ultotal, - double ulnow); -static size_t _ecore_con_url_read_cb(void *ptr, - size_t size, - size_t nitems, - void *stream); -static void _ecore_con_event_url_free(void *data __UNUSED__, - void *ev); -static Eina_Bool _ecore_con_url_idler_handler(void *data); -static Eina_Bool _ecore_con_url_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UNUSED__); +static size_t _ecore_con_url_header_cb(void *ptr, size_t size, size_t nitems, void *stream); +static size_t _ecore_con_url_data_cb(void *buffer, size_t size, size_t nitems, void *userp); +static int _ecore_con_url_progress_cb(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow); +static size_t _ecore_con_url_read_cb(void *ptr, size_t size, size_t nitems, void *stream); +static void _ecore_con_event_url_free(Ecore_Con_Url *url_con, void *ev); +static Eina_Bool _ecore_con_url_timer(void *data); +static Eina_Bool _ecore_con_url_fd_handler(void *data, Ecore_Fd_Handler *fd_handler); static Eina_Bool _ecore_con_url_timeout_cb(void *data); +static void _ecore_con_url_status_get(Ecore_Con_Url *url_con); static Eina_List *_url_con_list = NULL; static Eina_List *_fd_hd_list = NULL; static CURLM *_curlm = NULL; -static fd_set _current_fd_set; static int _init_count = 0; -static Ecore_Timer *_curl_timeout = NULL; +static Ecore_Timer *_curl_timer = NULL; static Eina_Bool pipelining = EINA_FALSE; #endif @@ -79,28 +69,28 @@ EAPI int ecore_con_url_init(void) { #ifdef HAVE_CURL + long ms; if (++_init_count > 1) return _init_count; - if (!ECORE_CON_EVENT_URL_DATA) ECORE_CON_EVENT_URL_DATA = ecore_event_type_new(); - if (!ECORE_CON_EVENT_URL_COMPLETE) ECORE_CON_EVENT_URL_COMPLETE = ecore_event_type_new(); - if (!ECORE_CON_EVENT_URL_PROGRESS) ECORE_CON_EVENT_URL_PROGRESS = ecore_event_type_new(); + ECORE_CON_EVENT_URL_DATA = ecore_event_type_new(); + ECORE_CON_EVENT_URL_COMPLETE = ecore_event_type_new(); + ECORE_CON_EVENT_URL_PROGRESS = ecore_event_type_new(); + + // curl_global_init() is not thread safe! + if (curl_global_init(CURL_GLOBAL_ALL)) return --_init_count; + _curlm = curl_multi_init(); if (!_curlm) { - long ms; - - // curl_global_init() is not thread safe! - if (curl_global_init(CURL_GLOBAL_ALL)) return --_init_count; - - _curlm = curl_multi_init(); - if (!_curlm) return --_init_count; + curl_global_cleanup(); + return --_init_count; + } - curl_multi_timeout(_curlm, &ms); - if (ms <= 0) ms = 100; + curl_multi_timeout(_curlm, &ms); + if (ms >= CURL_MIN_TIMEOUT || ms <= 0) ms = CURL_MIN_TIMEOUT; - _curl_timeout = ecore_timer_add((double)ms / 1000, _ecore_con_url_idler_handler, (void *)0xACE); - ecore_timer_freeze(_curl_timeout); - } + _curl_timer = ecore_timer_add((double)ms / 1000, _ecore_con_url_timer, NULL); + ecore_timer_freeze(_curl_timer); return _init_count; #else @@ -112,31 +102,30 @@ EAPI int ecore_con_url_shutdown(void) { #ifdef HAVE_CURL + Ecore_Con_Url *url_con; + Ecore_Fd_Handler *fd_handler; if (_init_count == 0) return 0; + --_init_count; + if (_init_count) return _init_count; - if (--_init_count == 0) + if (_curl_timer) { - Ecore_Con_Url *con_url; - Ecore_Fd_Handler *fd_handler; - - if (_curl_timeout) - { - ecore_timer_del(_curl_timeout); - _curl_timeout = NULL; - } + ecore_timer_del(_curl_timer); + _curl_timer = NULL; + } - FD_ZERO(&_current_fd_set); - EINA_LIST_FREE(_url_con_list, con_url) ecore_con_url_free(con_url); - EINA_LIST_FREE(_fd_hd_list, fd_handler) ecore_main_fd_handler_del(fd_handler); + EINA_LIST_FREE(_url_con_list, url_con) + ecore_con_url_free(url_con); + EINA_LIST_FREE(_fd_hd_list, fd_handler) + ecore_main_fd_handler_del(fd_handler); - if (_curlm) - { - curl_multi_cleanup(_curlm); - _curlm = NULL; - } - curl_global_cleanup(); - } - return _init_count; + if (_curlm) + { + curl_multi_cleanup(_curlm); + _curlm = NULL; + } + curl_global_cleanup(); + return 0; #endif return 1; } @@ -145,14 +134,12 @@ EAPI void ecore_con_url_pipeline_set(Eina_Bool enable) { #ifdef HAVE_CURL - if (enable) - curl_multi_setopt(_curlm, CURLMOPT_PIPELINING, 1); - else - curl_multi_setopt(_curlm, CURLMOPT_PIPELINING, 0); - pipelining = enable; + if (enable == pipelining) return; + curl_multi_setopt(_curlm, CURLMOPT_PIPELINING, !!enable); + pipelining = enable; #else - return; - (void)enable; + return; + (void)enable; #endif } @@ -160,11 +147,13 @@ EAPI Eina_Bool ecore_con_url_pipeline_get(void) { #ifdef HAVE_CURL - return pipelining; + return pipelining; #endif - return EINA_FALSE; + return EINA_FALSE; } +extern Ecore_Con_Socks *_ecore_con_proxy_global; + EAPI Ecore_Con_Url * ecore_con_url_new(const char *url) { @@ -196,22 +185,41 @@ ecore_con_url_new(const char *url) return NULL; } + // Read socks proxy url_con->proxy_type = -1; - if (_ecore_con_proxy_global) + if (_ecore_con_proxy_global && _ecore_con_proxy_global->ip && + (_ecore_con_proxy_global->version == 4 || + _ecore_con_proxy_global->version == 5)) { - if (_ecore_con_proxy_global->ip) + char proxy[256]; + char host[256]; + + if (_ecore_con_proxy_global->version == 5) { - char host[128]; - if (_ecore_con_proxy_global->port > 0 && - _ecore_con_proxy_global->port <= 65535) - snprintf(host, sizeof(host), "socks4://%s:%d", - _ecore_con_proxy_global->ip, - _ecore_con_proxy_global->port); - else - snprintf(host, sizeof(host), "socks4://%s", + if (_ecore_con_proxy_global->lookup) + snprintf(host, sizeof(host), "socks5h://%s", + _ecore_con_proxy_global->ip); + else snprintf(host, sizeof(host), "socks5://%s", + _ecore_con_proxy_global->ip); + } + else if (_ecore_con_proxy_global->version == 4) + { + if (_ecore_con_proxy_global->lookup) + snprintf(host, sizeof(host), "socks4a://%s", _ecore_con_proxy_global->ip); - ecore_con_url_proxy_set(url_con, host); + else snprintf(host, sizeof(host), "socks4://%s", + _ecore_con_proxy_global->ip); } + + if (_ecore_con_proxy_global->port > 0 && + _ecore_con_proxy_global->port <= 65535) + snprintf(proxy, sizeof(proxy), "%s:%d", host, + _ecore_con_proxy_global->port); + else snprintf(proxy, sizeof(proxy), "%s", host); + + ecore_con_url_proxy_set(url_con, proxy); + ecore_con_url_proxy_username_set(url_con, + _ecore_con_proxy_global->username); } ret = curl_easy_setopt(url_con->curl_easy, CURLOPT_ENCODING, "gzip,deflate"); @@ -291,10 +299,8 @@ ecore_con_url_free(Ecore_Con_Url *url_con) { #ifdef HAVE_CURL char *s; - CURLMcode ret; - if (!url_con) - return; + if (!url_con) return; if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) { @@ -302,17 +308,16 @@ ecore_con_url_free(Ecore_Con_Url *url_con) return; } - ECORE_MAGIC_SET(url_con, ECORE_MAGIC_NONE); - if (url_con->curl_easy) { + // FIXME : How can we delete curl_easy's fds ?? (Curl do not give this info.) + // This cause "Failed to delete epoll fd xx!" error messages curl_easy_setopt(url_con->curl_easy, CURLOPT_PROGRESSFUNCTION, NULL); curl_easy_setopt(url_con->curl_easy, CURLOPT_NOPROGRESS, EINA_TRUE); - if (eina_list_data_find(_url_con_list, url_con)) + if (url_con->multi) { - ret = curl_multi_remove_handle(_curlm, url_con->curl_easy); - if (ret != CURLM_OK) ERR("curl_multi_remove_handle failed: %s", curl_multi_strerror(ret)); + _ecore_con_url_multi_remove(url_con); _url_con_list = eina_list_remove(_url_con_list, url_con); } @@ -320,6 +325,12 @@ ecore_con_url_free(Ecore_Con_Url *url_con) } if (url_con->timer) ecore_timer_del(url_con->timer); + url_con->curl_easy = NULL; + url_con->timer = NULL; + url_con->dead = EINA_TRUE; + if (url_con->event_count) return; + ECORE_MAGIC_SET(url_con, ECORE_MAGIC_NONE); + curl_slist_free_all(url_con->headers); EINA_LIST_FREE(url_con->additional_headers, s) free(s); @@ -350,9 +361,27 @@ ecore_con_url_url_get(Ecore_Con_Url *url_con) #endif } +EAPI int +ecore_con_url_status_code_get(Ecore_Con_Url *url_con) +{ +#ifdef HAVE_CURL + if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) + { + ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, __func__); + return 0; + } + + if (url_con->status) return url_con->status; + _ecore_con_url_status_get(url_con); + return url_con->status; +#else + return -1; + (void)url_con; +#endif +} + EAPI Eina_Bool -ecore_con_url_url_set(Ecore_Con_Url *url_con, - const char *url) +ecore_con_url_url_set(Ecore_Con_Url *url_con, const char *url) { #ifdef HAVE_CURL if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) @@ -361,8 +390,7 @@ ecore_con_url_url_set(Ecore_Con_Url *url_con, return EINA_FALSE; } - if (eina_list_data_find(_url_con_list, url_con)) return EINA_FALSE; - + if (url_con->dead) return EINA_FALSE; eina_stringshare_replace(&url_con->url, url); if (url_con->url) @@ -380,8 +408,7 @@ ecore_con_url_url_set(Ecore_Con_Url *url_con, } EAPI void -ecore_con_url_data_set(Ecore_Con_Url *url_con, - void *data) +ecore_con_url_data_set(Ecore_Con_Url *url_con, void *data) { #ifdef HAVE_CURL if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) @@ -399,13 +426,12 @@ ecore_con_url_data_set(Ecore_Con_Url *url_con, } EAPI void -ecore_con_url_additional_header_add(Ecore_Con_Url *url_con, - const char *key, - const char *value) +ecore_con_url_additional_header_add(Ecore_Con_Url *url_con, const char *key, const char *value) { #ifdef HAVE_CURL char *tmp; + if (url_con->dead) return; if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) { ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, @@ -413,6 +439,7 @@ ecore_con_url_additional_header_add(Ecore_Con_Url *url_con, return; } + if (url_con->dead) return; tmp = malloc(strlen(key) + strlen(value) + 3); if (!tmp) return; @@ -467,9 +494,7 @@ ecore_con_url_data_get(Ecore_Con_Url *url_con) } EAPI void -ecore_con_url_time(Ecore_Con_Url *url_con, - Ecore_Con_Url_Time condition, - double timestamp) +ecore_con_url_time(Ecore_Con_Url *url_con, Ecore_Con_Url_Time condition, double timestamp) { #ifdef HAVE_CURL if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) @@ -478,6 +503,7 @@ ecore_con_url_time(Ecore_Con_Url *url_con, return; } + if (url_con->dead) return; url_con->time_condition = condition; url_con->timestamp = timestamp; #else @@ -489,8 +515,7 @@ ecore_con_url_time(Ecore_Con_Url *url_con, } EAPI void -ecore_con_url_fd_set(Ecore_Con_Url *url_con, - int fd) +ecore_con_url_fd_set(Ecore_Con_Url *url_con, int fd) { #ifdef HAVE_CURL if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) @@ -499,6 +524,7 @@ ecore_con_url_fd_set(Ecore_Con_Url *url_con, return; } + if (url_con->dead) return; url_con->write_fd = fd; #else return; @@ -537,10 +563,7 @@ ecore_con_url_response_headers_get(Ecore_Con_Url *url_con) } EAPI Eina_Bool -ecore_con_url_httpauth_set(Ecore_Con_Url *url_con, - const char *username, - const char *password, - Eina_Bool safe) +ecore_con_url_httpauth_set(Ecore_Con_Url *url_con, const char *username, const char *password, Eina_Bool safe) { #ifdef HAVE_CURL CURLcode ret; @@ -552,6 +575,7 @@ ecore_con_url_httpauth_set(Ecore_Con_Url *url_con, return EINA_FALSE; } + if (url_con->dead) return EINA_FALSE; # if LIBCURL_VERSION_NUM >= 0x071301 if ((username) && (password)) { @@ -596,11 +620,7 @@ ecore_con_url_httpauth_set(Ecore_Con_Url *url_con, #define MODE_POST 2 static Eina_Bool -_ecore_con_url_send(Ecore_Con_Url *url_con, - int mode, - const void *data, - long length, - const char *content_type) +_ecore_con_url_send(Ecore_Con_Url *url_con, int mode, const void *data, long length, const char *content_type) { #ifdef HAVE_CURL Eina_List *l; @@ -613,15 +633,14 @@ _ecore_con_url_send(Ecore_Con_Url *url_con, return EINA_FALSE; } - if (eina_list_data_find(_url_con_list, url_con)) return EINA_FALSE; - - if (!url_con->url) - return EINA_FALSE; + if (!url_con->url) return EINA_FALSE; + if (url_con->dead) return EINA_FALSE; /* Free response headers from previous send() calls */ EINA_LIST_FREE(url_con->response_headers, s) free((char *)s); url_con->response_headers = NULL; + url_con->status = 0; curl_slist_free_all(url_con->headers); url_con->headers = NULL; @@ -693,15 +712,6 @@ _ecore_con_url_send(Ecore_Con_Url *url_con, #endif } -EINA_DEPRECATED EAPI Eina_Bool -ecore_con_url_send(Ecore_Con_Url *url_con, - const void *data, - long length, - const char *content_type) -{ - return _ecore_con_url_send(url_con, MODE_AUTO, data, length, content_type); -} - EAPI Eina_Bool ecore_con_url_get(Ecore_Con_Url *url_con) { @@ -709,20 +719,13 @@ ecore_con_url_get(Ecore_Con_Url *url_con) } EAPI Eina_Bool -ecore_con_url_post(Ecore_Con_Url *url_con, - const void *data, - long length, - const char *content_type) +ecore_con_url_post(Ecore_Con_Url *url_con, const void *data, long length, const char *content_type) { return _ecore_con_url_send(url_con, MODE_POST, data, length, content_type); } EAPI Eina_Bool -ecore_con_url_ftp_upload(Ecore_Con_Url *url_con, - const char *filename, - const char *user, - const char *pass, - const char *upload_dir) +ecore_con_url_ftp_upload(Ecore_Con_Url *url_con, const char *filename, const char *user, const char *pass, const char *upload_dir) { #ifdef HAVE_CURL char url[4096]; @@ -739,54 +742,50 @@ ecore_con_url_ftp_upload(Ecore_Con_Url *url_con, return EINA_FALSE; } - if (eina_list_data_find(_url_con_list, url_con)) return EINA_FALSE; + if (url_con->dead) return EINA_FALSE; + if (!url_con->url) return EINA_FALSE; + if ((!filename) || (!filename[0])) return EINA_FALSE; - if (!url_con->url) + if (stat(filename, &file_info)) return EINA_FALSE; - if (filename) + snprintf(userpwd, sizeof(userpwd), "%s:%s", user, pass); + ret = curl_easy_setopt(url_con->curl_easy, CURLOPT_USERPWD, userpwd); + if (ret != CURLE_OK) { - if (stat(filename, &file_info)) - return EINA_FALSE; - - snprintf(userpwd, sizeof(userpwd), "%s:%s", user, pass); - ret = curl_easy_setopt(url_con->curl_easy, CURLOPT_USERPWD, userpwd); - if (ret != CURLE_OK) - { - ERR("Could not set username and password for FTP upload: %s", - curl_easy_strerror(ret)); - return EINA_FALSE; - } + ERR("Could not set username and password for FTP upload: %s", + curl_easy_strerror(ret)); + return EINA_FALSE; + } - char tmp[PATH_MAX]; - snprintf(tmp, PATH_MAX, "%s", filename); + char tmp[PATH_MAX]; + snprintf(tmp, PATH_MAX, "%s", filename); - if (upload_dir) - snprintf(url, sizeof(url), "ftp://%s/%s/%s", url_con->url, - upload_dir, basename(tmp)); - else - snprintf(url, sizeof(url), "ftp://%s/%s", url_con->url, - basename(tmp)); + if (upload_dir) + snprintf(url, sizeof(url), "ftp://%s/%s/%s", url_con->url, + upload_dir, basename(tmp)); + else + snprintf(url, sizeof(url), "ftp://%s/%s", url_con->url, + basename(tmp)); - if (!ecore_con_url_url_set(url_con, url)) - return EINA_FALSE; + if (!ecore_con_url_url_set(url_con, url)) + return EINA_FALSE; - curl_easy_setopt(url_con->curl_easy, CURLOPT_INFILESIZE_LARGE, - (curl_off_t)file_info.st_size); - curl_easy_setopt(url_con->curl_easy, CURLOPT_UPLOAD, 1); - curl_easy_setopt(url_con->curl_easy, CURLOPT_READFUNCTION, - _ecore_con_url_read_cb); + curl_easy_setopt(url_con->curl_easy, CURLOPT_INFILESIZE_LARGE, + (curl_off_t)file_info.st_size); + curl_easy_setopt(url_con->curl_easy, CURLOPT_UPLOAD, 1); + curl_easy_setopt(url_con->curl_easy, CURLOPT_READFUNCTION, + _ecore_con_url_read_cb); - fd = fopen(filename, "rb"); - if (!fd) - { - ERR("Could not open \"%s\" for FTP upload", filename); - return EINA_FALSE; - } - curl_easy_setopt(url_con->curl_easy, CURLOPT_READDATA, fd); - - return _ecore_con_url_perform(url_con); + fd = fopen(filename, "rb"); + if (!fd) + { + ERR("Could not open \"%s\" for FTP upload", filename); + return EINA_FALSE; } + curl_easy_setopt(url_con->curl_easy, CURLOPT_READDATA, fd); + + return _ecore_con_url_perform(url_con); #else return EINA_FALSE; (void)url_con; @@ -795,8 +794,6 @@ ecore_con_url_ftp_upload(Ecore_Con_Url *url_con, (void)pass; (void)upload_dir; #endif - - return EINA_FALSE; } EAPI void @@ -813,6 +810,7 @@ ecore_con_url_cookies_init(Ecore_Con_Url *url_con) return; } + if (url_con->dead) return; curl_easy_setopt(url_con->curl_easy, CURLOPT_COOKIEFILE, ""); #else return; @@ -834,6 +832,7 @@ ecore_con_url_cookies_ignore_old_session_set(Ecore_Con_Url *url_con, Eina_Bool i return; } + if (url_con->dead) return; curl_easy_setopt(url_con->curl_easy, CURLOPT_COOKIESESSION, ignore); #else return; @@ -856,6 +855,7 @@ ecore_con_url_cookies_clear(Ecore_Con_Url *url_con) return; } + if (url_con->dead) return; curl_easy_setopt(url_con->curl_easy, CURLOPT_COOKIELIST, "ALL"); #else return; @@ -877,6 +877,7 @@ ecore_con_url_cookies_session_clear(Ecore_Con_Url *url_con) return; } + if (url_con->dead) return; curl_easy_setopt(url_con->curl_easy, CURLOPT_COOKIELIST, "SESS"); #else return; @@ -885,7 +886,7 @@ ecore_con_url_cookies_session_clear(Ecore_Con_Url *url_con) } EAPI void -ecore_con_url_cookies_file_add(Ecore_Con_Url *url_con, const char * const file_name) +ecore_con_url_cookies_file_add(Ecore_Con_Url *url_con, const char *const file_name) { #ifdef HAVE_CURL if (!url_con) @@ -898,6 +899,7 @@ ecore_con_url_cookies_file_add(Ecore_Con_Url *url_con, const char * const file_n return; } + if (url_con->dead) return; curl_easy_setopt(url_con->curl_easy, CURLOPT_COOKIEFILE, file_name); #else return; @@ -907,7 +909,7 @@ ecore_con_url_cookies_file_add(Ecore_Con_Url *url_con, const char * const file_n } EAPI Eina_Bool -ecore_con_url_cookies_jar_file_set(Ecore_Con_Url *url_con, const char * const cookiejar_file) +ecore_con_url_cookies_jar_file_set(Ecore_Con_Url *url_con, const char *const cookiejar_file) { #ifdef HAVE_CURL CURLcode ret; @@ -922,6 +924,7 @@ ecore_con_url_cookies_jar_file_set(Ecore_Con_Url *url_con, const char * const co return EINA_FALSE; } + if (url_con->dead) return EINA_FALSE; ret = curl_easy_setopt(url_con->curl_easy, CURLOPT_COOKIEJAR, cookiejar_file); if (ret != CURLE_OK) @@ -953,6 +956,7 @@ ecore_con_url_cookies_jar_write(Ecore_Con_Url *url_con) return; } + if (url_con->dead) return; curl_easy_setopt(url_con->curl_easy, CURLOPT_COOKIELIST, "FLUSH"); #else return; @@ -961,8 +965,7 @@ ecore_con_url_cookies_jar_write(Ecore_Con_Url *url_con) } EAPI void -ecore_con_url_verbose_set(Ecore_Con_Url *url_con, - Eina_Bool verbose) +ecore_con_url_verbose_set(Ecore_Con_Url *url_con, Eina_Bool verbose) { #ifdef HAVE_CURL if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) @@ -972,11 +975,10 @@ ecore_con_url_verbose_set(Ecore_Con_Url *url_con, return; } - if (eina_list_data_find(_url_con_list, url_con)) return; - if (!url_con->url) return; + if (url_con->dead) return; curl_easy_setopt(url_con->curl_easy, CURLOPT_VERBOSE, (int)verbose); #else return; @@ -986,8 +988,7 @@ ecore_con_url_verbose_set(Ecore_Con_Url *url_con, } EAPI void -ecore_con_url_ftp_use_epsv_set(Ecore_Con_Url *url_con, - Eina_Bool use_epsv) +ecore_con_url_ftp_use_epsv_set(Ecore_Con_Url *url_con, Eina_Bool use_epsv) { #ifdef HAVE_CURL if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) @@ -997,11 +998,10 @@ ecore_con_url_ftp_use_epsv_set(Ecore_Con_Url *url_con, return; } - if (eina_list_data_find(_url_con_list, url_con)) return; - if (!url_con->url) return; + if (url_con->dead) return; curl_easy_setopt(url_con->curl_easy, CURLOPT_FTP_USE_EPSV, (int)use_epsv); #else return; @@ -1023,8 +1023,7 @@ ecore_con_url_ftp_use_epsv_set(Ecore_Con_Url *url_con, * @since 1.1.0 */ EAPI void -ecore_con_url_ssl_verify_peer_set(Ecore_Con_Url *url_con, - Eina_Bool verify) +ecore_con_url_ssl_verify_peer_set(Ecore_Con_Url *url_con, Eina_Bool verify) { #ifdef HAVE_CURL if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) @@ -1034,11 +1033,10 @@ ecore_con_url_ssl_verify_peer_set(Ecore_Con_Url *url_con, return; } - if (eina_list_data_find(_url_con_list, url_con)) return; - if (!url_con->url) return; + if (url_con->dead) return; curl_easy_setopt(url_con->curl_easy, CURLOPT_SSL_VERIFYPEER, (int)verify); #else return; @@ -1073,19 +1071,19 @@ ecore_con_url_ssl_ca_set(Ecore_Con_Url *url_con, const char *ca_path) #ifdef HAVE_CURL if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) { - ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, "ecore_con_url_ssl_ca_set"); - return -1; + ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, "ecore_con_url_ssl_ca_set"); + return -1; } - if (eina_list_data_find(_url_con_list, url_con)) return -1; if (!url_con->url) return -1; + if (url_con->dead) return -1; if (ca_path == NULL) res = curl_easy_setopt(url_con->curl_easy, CURLOPT_SSL_VERIFYPEER, 0); else { - res = curl_easy_setopt(url_con->curl_easy, CURLOPT_SSL_VERIFYPEER, 1); - if (!res) - res = curl_easy_setopt(url_con->curl_easy, CURLOPT_CAINFO, ca_path); + res = curl_easy_setopt(url_con->curl_easy, CURLOPT_SSL_VERIFYPEER, 1); + if (!res) + res = curl_easy_setopt(url_con->curl_easy, CURLOPT_CAINFO, ca_path); } #else return -1; @@ -1097,6 +1095,47 @@ ecore_con_url_ssl_ca_set(Ecore_Con_Url *url_con, const char *ca_path) } EAPI Eina_Bool +ecore_con_url_http_version_set(Ecore_Con_Url *url_con, Ecore_Con_Url_Http_Version version) +{ +#ifdef HAVE_CURL + int res = -1; + if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) + { + ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, "ecore_con_url_http_version_set"); + return EINA_FALSE; + } + if (url_con->dead) return EINA_FALSE; + switch (version) + { + case ECORE_CON_URL_HTTP_VERSION_1_0: + res = curl_easy_setopt(url_con->curl_easy, + CURLOPT_HTTP_VERSION, + CURL_HTTP_VERSION_1_0); + break; + + case ECORE_CON_URL_HTTP_VERSION_1_1: + res = curl_easy_setopt(url_con->curl_easy, + CURLOPT_HTTP_VERSION, + CURL_HTTP_VERSION_1_1); + break; + + default: + break; + } + if (res != CURLE_OK) + { + ERR("curl http version setting failed: %s", curl_easy_strerror(res)); + return EINA_FALSE; + } + return EINA_TRUE; +#else + (void)url_con; + (void)version; + return EINA_FALSE; +#endif +} + +EAPI Eina_Bool ecore_con_url_proxy_set(Ecore_Con_Url *url_con, const char *proxy) { #ifdef HAVE_CURL @@ -1109,8 +1148,8 @@ ecore_con_url_proxy_set(Ecore_Con_Url *url_con, const char *proxy) return EINA_FALSE; } - if (eina_list_data_find(_url_con_list, url_con)) return EINA_FALSE; if (!url_con->url) return EINA_FALSE; + if (url_con->dead) return EINA_FALSE; if (!proxy) res = curl_easy_setopt(url_con->curl_easy, CURLOPT_PROXY, ""); else @@ -1121,14 +1160,20 @@ ecore_con_url_proxy_set(Ecore_Con_Url *url_con, const char *proxy) if (vers->version_num < 0x71507) { url_con->proxy_type = CURLPROXY_HTTP; - if (strstr(proxy, "socks4")) url_con->proxy_type = CURLPROXY_SOCKS4; - else if (strstr(proxy, "socks4a")) url_con->proxy_type = CURLPROXY_SOCKS4A; - else if (strstr(proxy, "socks5")) url_con->proxy_type = CURLPROXY_SOCKS5; - else if (strstr(proxy, "socks5h")) url_con->proxy_type = CURLPROXY_SOCKS5_HOSTNAME; - res = curl_easy_setopt(url_con->curl_easy, CURLOPT_PROXYTYPE, url_con->proxy_type); + if (strstr(proxy, "socks4a")) + url_con->proxy_type = CURLPROXY_SOCKS4A; + else if (strstr(proxy, "socks4")) + url_con->proxy_type = CURLPROXY_SOCKS4; + else if (strstr(proxy, "socks5h")) + url_con->proxy_type = CURLPROXY_SOCKS5_HOSTNAME; + else if (strstr(proxy, "socks5")) + url_con->proxy_type = CURLPROXY_SOCKS5; + res = curl_easy_setopt(url_con->curl_easy, CURLOPT_PROXYTYPE, + url_con->proxy_type); if (res != CURLE_OK) { - ERR("curl proxy type setting failed: %s", curl_easy_strerror(res)); + ERR("curl proxy type setting failed: %s", + curl_easy_strerror(res)); url_con->proxy_type = -1; return EINA_FALSE; } @@ -1159,7 +1204,7 @@ ecore_con_url_timeout_set(Ecore_Con_Url *url_con, double timeout) return; } - if (eina_list_data_find(_url_con_list, url_con)) return; + if (url_con->dead) return; if (!url_con->url || timeout < 0) return; if (url_con->timer) ecore_timer_del(url_con->timer); url_con->timer = ecore_timer_add(timeout, _ecore_con_url_timeout_cb, url_con); @@ -1181,9 +1226,9 @@ ecore_con_url_proxy_username_set(Ecore_Con_Url *url_con, const char *username) return EINA_FALSE; } - if (eina_list_data_find(_url_con_list, url_con)) return EINA_FALSE; + if (url_con->dead) return EINA_FALSE; if (!url_con->url) return EINA_FALSE; - if (!username) return EINA_FALSE; + if ((!username) || (!username[0])) return EINA_FALSE; if (url_con->proxy_type == CURLPROXY_SOCKS4 || url_con->proxy_type == CURLPROXY_SOCKS4A) { ERR("Proxy type should be socks5 and above"); @@ -1214,8 +1259,8 @@ ecore_con_url_proxy_password_set(Ecore_Con_Url *url_con, const char *password) ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, "ecore_con_url_proxy_password_set"); return EINA_FALSE; } - if (eina_list_data_find(_url_con_list, url_con)) return EINA_FALSE; if (!url_con->url) return EINA_FALSE; + if (url_con->dead) return EINA_FALSE; if (!password) return EINA_FALSE; if (url_con->proxy_type == CURLPROXY_SOCKS4 || url_con->proxy_type == CURLPROXY_SOCKS4A) { @@ -1242,19 +1287,61 @@ ecore_con_url_proxy_password_set(Ecore_Con_Url *url_con, const char *password) */ #ifdef HAVE_CURL +static void +_ecore_con_url_status_get(Ecore_Con_Url *url_con) +{ + long status = 0; + + if (!url_con->curl_easy) return; + if (!curl_easy_getinfo(url_con->curl_easy, CURLINFO_RESPONSE_CODE, &status)) + url_con->status = status; + else + url_con->status = 0; +} + +static void +_ecore_con_url_event_url_complete(Ecore_Con_Url *url_con, CURLMsg *curlmsg) +{ + Ecore_Con_Event_Url_Complete *e; + + e = calloc(1, sizeof(Ecore_Con_Event_Url_Complete)); + if (!e) return; + + if (curlmsg && (curlmsg->data.result == CURLE_OK)) + { + if (!url_con->status) + _ecore_con_url_status_get(url_con); + } + else if (curlmsg) + ERR("Curl message have errors: %d", curlmsg->data.result); + else + CRIT("THIS IS BAD."); + + e->status = url_con->status; + e->url_con = url_con; + url_con->event_count++; + ecore_event_add(ECORE_CON_EVENT_URL_COMPLETE, e, (Ecore_End_Cb)_ecore_con_event_url_free, url_con); +} + +static void +_ecore_con_url_multi_remove(Ecore_Con_Url *url_con) +{ + CURLMcode ret; + + ret = curl_multi_remove_handle(_curlm, url_con->curl_easy); + url_con->multi = EINA_FALSE; + if (ret != CURLM_OK) ERR("curl_multi_remove_handle failed: %s", curl_multi_strerror(ret)); +} + static Eina_Bool _ecore_con_url_timeout_cb(void *data) { Ecore_Con_Url *url_con = data; - CURLMcode ret; - Ecore_Con_Event_Url_Complete *e; if (!url_con) return ECORE_CALLBACK_CANCEL; if (!url_con->curl_easy) return ECORE_CALLBACK_CANCEL; - if (!eina_list_data_find(_url_con_list, url_con)) return ECORE_CALLBACK_CANCEL; - ret = curl_multi_remove_handle(_curlm, url_con->curl_easy); - if (ret != CURLM_OK) ERR("curl_multi_remove_handle failed: %s", curl_multi_strerror(ret)); + _ecore_con_url_multi_remove(url_con); _url_con_list = eina_list_remove(_url_con_list, url_con); curl_slist_free_all(url_con->headers); @@ -1262,21 +1349,12 @@ _ecore_con_url_timeout_cb(void *data) url_con->timer = NULL; - e = calloc(1, sizeof(Ecore_Con_Event_Url_Complete)); - if (e) - { - e->url_con = url_con; - e->status = 0; - ecore_event_add(ECORE_CON_EVENT_URL_COMPLETE, e, _ecore_con_event_url_free, NULL); - } + _ecore_con_url_event_url_complete(url_con, NULL); return ECORE_CALLBACK_CANCEL; } static size_t -_ecore_con_url_data_cb(void *buffer, - size_t size, - size_t nitems, - void *userp) +_ecore_con_url_data_cb(void *buffer, size_t size, size_t nitems, void *userp) { Ecore_Con_Url *url_con; Ecore_Con_Event_Url_Data *e; @@ -1295,6 +1373,7 @@ _ecore_con_url_data_cb(void *buffer, url_con->received += real_size; + INF("reading from %s", url_con->url); if (url_con->write_fd < 0) { e = @@ -1305,7 +1384,8 @@ _ecore_con_url_data_cb(void *buffer, e->url_con = url_con; e->size = real_size; memcpy(e->data, buffer, real_size); - ecore_event_add(ECORE_CON_EVENT_URL_DATA, e, _ecore_con_event_url_free, NULL); + url_con->event_count++; + ecore_event_add(ECORE_CON_EVENT_URL_DATA, e, (Ecore_End_Cb)_ecore_con_event_url_free, url_con); } } else @@ -1336,10 +1416,7 @@ _ecore_con_url_data_cb(void *buffer, } static size_t -_ecore_con_url_header_cb(void *ptr, - size_t size, - size_t nitems, - void *stream) +_ecore_con_url_header_cb(void *ptr, size_t size, size_t nitems, void *stream) { size_t real_size = size * nitems; Ecore_Con_Url *url_con = stream; @@ -1358,11 +1435,7 @@ _ecore_con_url_header_cb(void *ptr, } static int -_ecore_con_url_progress_cb(void *clientp, - double dltotal, - double dlnow, - double ultotal, - double ulnow) +_ecore_con_url_progress_cb(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow) { Ecore_Con_Event_Url_Progress *e; Ecore_Con_Url *url_con; @@ -1377,17 +1450,15 @@ _ecore_con_url_progress_cb(void *clientp, e->down.now = dlnow; e->up.total = ultotal; e->up.now = ulnow; - ecore_event_add(ECORE_CON_EVENT_URL_PROGRESS, e, _ecore_con_event_url_free, NULL); + url_con->event_count++; + ecore_event_add(ECORE_CON_EVENT_URL_PROGRESS, e, (Ecore_End_Cb)_ecore_con_event_url_free, url_con); } return 0; } static size_t -_ecore_con_url_read_cb(void *ptr, - size_t size, - size_t nitems, - void *stream) +_ecore_con_url_read_cb(void *ptr, size_t size, size_t nitems, void *stream) { size_t retcode = fread(ptr, size, nitems, stream); @@ -1418,96 +1489,38 @@ _ecore_con_url_info_read(void) while ((curlmsg = curl_multi_info_read(_curlm, &n_remaining))) { + Eina_List *l, *ll; + Ecore_Con_Url *url_con = NULL; + DBG("Curl message: %d", curlmsg->msg); + if (curlmsg->msg == CURLMSG_DONE) { - Eina_List *l, *ll; - Ecore_Con_Url *url_con; - EINA_LIST_FOREACH_SAFE(_url_con_list, l, ll, url_con) { if (curlmsg->easy_handle == url_con->curl_easy) - { - CURLMcode ret; - Ecore_Con_Event_Url_Complete *e; - - e = calloc(1, sizeof(Ecore_Con_Event_Url_Complete)); - if (e) - { - e->url_con = url_con; - e->status = 0; - if (curlmsg->data.result == CURLE_OK) - { - long status; /* curl API uses long, not int */ - status = 0; - curl_easy_getinfo(curlmsg->easy_handle, CURLINFO_RESPONSE_CODE, &status); - e->status = status; - } - ecore_event_add(ECORE_CON_EVENT_URL_COMPLETE, e, _ecore_con_event_url_free, NULL); - } - - ret = curl_multi_remove_handle(_curlm, url_con->curl_easy); - if (ret != CURLM_OK) ERR("curl_multi_remove_handle failed: %s", curl_multi_strerror(ret)); - _url_con_list = eina_list_remove(_url_con_list, url_con); - break; - } + _ecore_con_url_event_url_complete(url_con, curlmsg); } - } + } } } static void _ecore_con_url_curl_clear(void) { + Ecore_Fd_Handler *fdh; Ecore_Con_Url *url_con; - FD_ZERO(&_current_fd_set); - if (_fd_hd_list) - { - Ecore_Fd_Handler *fd_handler; - EINA_LIST_FREE(_fd_hd_list, fd_handler) - { - int fd = ecore_main_fd_handler_fd_get(fd_handler); - FD_CLR(fd, &_current_fd_set); - // FIXME: ecore_main_fd_handler_del() sometimes give errors - // because curl do not make fd itself controlled by users, but it can be ignored. - ecore_main_fd_handler_del(fd_handler); - } - } - - EINA_LIST_FREE(_url_con_list, url_con) - { - CURLMcode ret; - Ecore_Con_Event_Url_Complete *e; - - e = calloc(1, sizeof(Ecore_Con_Event_Url_Complete)); - if (e) - { - e->url_con = url_con; - e->status = 0; - ecore_event_add(ECORE_CON_EVENT_URL_COMPLETE, e, _ecore_con_event_url_free, NULL); - } - ret = curl_multi_remove_handle(_curlm, url_con->curl_easy); - if (ret != CURLM_OK) ERR("curl_multi_remove_handle failed: %s", curl_multi_strerror(ret)); - } + EINA_LIST_FREE(_fd_hd_list, fdh) ecore_main_fd_handler_del(fdh); + EINA_LIST_FREE(_url_con_list, url_con) _ecore_con_url_multi_remove(url_con); } static Eina_Bool _ecore_con_url_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UNUSED__) { - if (_fd_hd_list) - { - Ecore_Fd_Handler *fd_handler; - EINA_LIST_FREE(_fd_hd_list, fd_handler) - { - int fd = ecore_main_fd_handler_fd_get(fd_handler); - FD_CLR(fd, &_current_fd_set); - // FIXME: ecore_main_fd_handler_del() sometimes give errors - // because curl do not make fd itself controlled by users, but it can be ignored. - ecore_main_fd_handler_del(fd_handler); - } - } - ecore_timer_thaw(_curl_timeout); - return ECORE_CALLBACK_RENEW; + Ecore_Fd_Handler *fdh; + EINA_LIST_FREE(_fd_hd_list, fdh) ecore_main_fd_handler_del(fdh); + ecore_timer_interval_set(_curl_timer, 0.1); + return ECORE_CALLBACK_CANCEL; } static void @@ -1516,7 +1529,6 @@ _ecore_con_url_fdset(void) CURLMcode ret; fd_set read_set, write_set, exc_set; int fd, fd_max; - Ecore_Fd_Handler *fd_handler; FD_ZERO(&read_set); FD_ZERO(&write_set); @@ -1532,53 +1544,61 @@ _ecore_con_url_fdset(void) for (fd = 0; fd <= fd_max; fd++) { int flags = 0; - if (FD_ISSET(fd, &read_set)) flags |= ECORE_FD_READ; + if (FD_ISSET(fd, &read_set)) flags |= ECORE_FD_READ; if (FD_ISSET(fd, &write_set)) flags |= ECORE_FD_WRITE; - if (FD_ISSET(fd, &exc_set)) flags |= ECORE_FD_ERROR; + if (FD_ISSET(fd, &exc_set)) flags |= ECORE_FD_ERROR; if (flags) { - if (!FD_ISSET(fd, &_current_fd_set)) - { - FD_SET(fd, &_current_fd_set); - fd_handler = ecore_main_fd_handler_add(fd, flags, _ecore_con_url_fd_handler, NULL, NULL, NULL); - if (fd_handler) _fd_hd_list = eina_list_append(_fd_hd_list, fd_handler); - ecore_timer_freeze(_curl_timeout); - } + // FIXME: Who is owner (easy_handle) of this fd?? (Curl do not give this info.) + // This cause "Failed to delete epoll fd xx!" error messages + Ecore_Fd_Handler *fd_handler; + fd_handler = ecore_main_fd_handler_add(fd, flags, + _ecore_con_url_fd_handler, + NULL, NULL, NULL); + if (fd_handler) + _fd_hd_list = eina_list_append(_fd_hd_list, fd_handler); } } } static Eina_Bool -_ecore_con_url_idler_handler(void *data __UNUSED__) +_ecore_con_url_timer(void *data __UNUSED__) { + Ecore_Fd_Handler *fdh; int still_running; CURLMcode ret; + EINA_LIST_FREE(_fd_hd_list, fdh) ecore_main_fd_handler_del(fdh); + _ecore_con_url_info_read(); + ret = curl_multi_perform(_curlm, &still_running); if (ret == CURLM_CALL_MULTI_PERFORM) { - DBG("Call multiperform again"); + DBG("curl_multi_perform() again immediately"); return ECORE_CALLBACK_RENEW; } else if (ret != CURLM_OK) { ERR("curl_multi_perform() failed: %s", curl_multi_strerror(ret)); _ecore_con_url_curl_clear(); - ecore_timer_freeze(_curl_timeout); - return ECORE_CALLBACK_RENEW; + ecore_timer_freeze(_curl_timer); } - _ecore_con_url_info_read(); if (still_running) { - DBG("multiperform is still_running"); + long ms; _ecore_con_url_fdset(); + curl_multi_timeout(_curlm, &ms); + DBG("multiperform is still running: %d, timeout: %ld", still_running, ms); + if (ms >= CURL_MIN_TIMEOUT || ms <= 0) ms = CURL_MIN_TIMEOUT; + ecore_timer_interval_set(_curl_timer, (double)ms / 1000); } else { DBG("multiperform ended"); + _ecore_con_url_info_read(); _ecore_con_url_curl_clear(); - ecore_timer_freeze(_curl_timeout); + ecore_timer_freeze(_curl_timer); } return ECORE_CALLBACK_RENEW; @@ -1596,17 +1616,20 @@ _ecore_con_url_perform(Ecore_Con_Url *url_con) return EINA_FALSE; } + url_con->multi = EINA_TRUE; _url_con_list = eina_list_append(_url_con_list, url_con); - ecore_timer_thaw(_curl_timeout); + ecore_timer_thaw(_curl_timer); return EINA_TRUE; } static void -_ecore_con_event_url_free(void *data __UNUSED__, - void *ev) +_ecore_con_event_url_free(Ecore_Con_Url *url_con, void *ev) { free(ev); + url_con->event_count--; + if (url_con->dead && (!url_con->event_count)) + ecore_con_url_free(url_con); } #endif diff --git a/libraries/ecore/src/lib/ecore_config/Makefile.in b/libraries/ecore/src/lib/ecore_config/Makefile.in index 6870d44..4b908cd 100644 --- a/libraries/ecore/src/lib/ecore_config/Makefile.in +++ b/libraries/ecore/src/lib/ecore_config/Makefile.in @@ -55,16 +55,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -205,6 +204,8 @@ 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@ @@ -260,6 +261,8 @@ 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@ @@ -270,6 +273,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_directfb/Makefile.in b/libraries/ecore/src/lib/ecore_directfb/Makefile.in index b7e1d29..f1b270a 100644 --- a/libraries/ecore/src/lib/ecore_directfb/Makefile.in +++ b/libraries/ecore/src/lib/ecore_directfb/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -190,6 +189,8 @@ 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@ @@ -245,6 +246,8 @@ 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@ @@ -255,6 +258,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_evas/Ecore_Evas.h b/libraries/ecore/src/lib/ecore_evas/Ecore_Evas.h index 8d9abc4..a78824e 100644 --- a/libraries/ecore/src/lib/ecore_evas/Ecore_Evas.h +++ b/libraries/ecore/src/lib/ecore_evas/Ecore_Evas.h @@ -39,6 +39,9 @@ * @li @ref ecore_evas_callbacks_example_c * @li @ref ecore_evas_object_example_c * @li @ref ecore_evas_basics_example_c + * @li @ref Ecore_Evas_Window_Sizes_Example_c + * @li @ref Ecore_Evas_Buffer_Example_01_c + * @li @ref Ecore_Evas_Buffer_Example_02_c */ /* FIXME: @@ -60,10 +63,26 @@ extern "C" { /** * @defgroup Ecore_Evas_Group Ecore_Evas wrapper/helper set of functions * + * Ecore evas is a set of functions that makes it easy to tie together ecore's + * main loop and input handling to evas. As such it's a natural base for EFL + * applications. While this combination makes it easy to create the basic + * aspects all applications need, for normal applications(ones with buttons, + * checkboxes and layouts) one should consider using Elementary. + * + * Ecore evas is extremely well suited for applications that are not based on + * widgets. It has a main loop that delivers events, does basic window handling + * and leaves all of the drawing up to the user. This works very well if used + * in conjunction with Edje or if doing custom drawing as, for example, is done + * in games. + * * This is a list of examples of these functions: - * - @ref Ecore_Evas_Window_Sizes_Example_c - * - @ref Ecore_Evas_Buffer_Example_01_c - * - @ref Ecore_Evas_Buffer_Example_02_c + * @li @ref ecore_evas_basics_example_c + * @li @ref ecore_evas_object_example_c + * @li @ref ecore_evas_callbacks_example_c + * @li @ref Ecore_Evas_Window_Sizes_Example_c + * @li @ref Ecore_Evas_Buffer_Example_01_c + * @li @ref Ecore_Evas_Buffer_Example_02_c + * * @{ */ @@ -151,6 +170,12 @@ typedef struct _Ecore_Cocoa_Window Ecore_Cocoa_Window; #ifndef _ECORE_EVAS_PRIVATE_H /* basic data types */ typedef struct _Ecore_Evas Ecore_Evas; +typedef void (*Ecore_Evas_Event_Cb) (Ecore_Evas *ee); /**< Callback used for several ecore evas events @since 1.2 */ +#endif + +#ifndef _ECORE_WAYLAND_H_ +#define _ECORE_WAYLAND_WINDOW_PREDEF +typedef struct _Ecore_Wl_Window Ecore_Wl_Window; #endif /* module setup/shutdown calls */ @@ -222,7 +247,7 @@ EAPI Ecore_Evas *ecore_evas_new(const char *engine_name, int x, int y, int w, in * This function allows you to make an Ecore_Evas translucent using an * alpha channel. See ecore_evas_shaped_set() for details. The difference * between a shaped window and a window with an alpha channel is that an - * alpha channel supports multiple levels of transpararency, as opposed to + * alpha channel supports multiple levels of transparency, as opposed to * the 1 bit transparency of a shaped window (a pixel is either opaque, or * it's transparent). * @@ -300,7 +325,7 @@ EAPI void ecore_evas_geometry_get(const Ecore_Evas *ee, int *x, int *y, i * This function takes four pointers to (already allocated) ints, and places * the geometry which @p ee was latest recently requested . If any of the parameters is not desired you * may pass NULL on them. - * This function can represent recently requested geomety. + * This function can represent recently requested geometry. * ecore_evas_geometry_get function returns the value is updated after engine finished request. * By comparison, ecore_evas_request_geometry_get returns recently requested value. * @@ -342,7 +367,7 @@ EAPI Eina_Bool ecore_evas_focus_get(const Ecore_Evas *ee); * This function iconifies @p ee if @p on is EINA_TRUE, or uniconifies @p ee if * @p on is EINA_FALSE. * - * @note Iconify and minize are synonims. + * @note Iconify and minimize are synonyms. * * @warning Support for this depends on the underlying windowing system. */ @@ -353,7 +378,7 @@ EAPI void ecore_evas_iconified_set(Ecore_Evas *ee, Eina_Bool on); * @param ee The Ecore_Evas to set * @return EINA_TRUE if @p ee is iconified, EINA_FALSE if not. * - * @note Iconify and minize are synonims. + * @note Iconify and minimize are synonyms. * * @see ecore_evas_iconified_set() */ @@ -401,6 +426,161 @@ EAPI void ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on); */ EAPI Eina_Bool ecore_evas_fullscreen_get(const Ecore_Evas *ee); /** + * @brief Set another window that this window is a group member of + * + * @param ee The Ecore_Evas + * @param ee_group The other group member + * + * If @p ee_group is NULL, @p ee is removed from the group, otherwise it is + * added. Note that if you free the @p ee_group canvas before @p ee, then + * getting the group canvas with ecore_evas_window_group_get() will return + * an invalid handle. + * + * @warning Support for this depends on the underlying windowing system. + * @since 1.2 + */ +EAPI void ecore_evas_window_group_set(Ecore_Evas *ee, const Ecore_Evas *ee_group); +/** + * @brief Get the canvas group set. + * + * This returns the handle set by ecore_evas_window_group_set(). + * + * @param ee The Ecore_Evas to set + * @return The Canvas group handle + * + * @see ecore_evas_window_group_set() + * @since 1.2 + */ +EAPI const Ecore_Evas *ecore_evas_window_group_get(const Ecore_Evas *ee); +/** + * @brief Set the aspect ratio of a canvas window + * + * @param ee The Ecore_Evas + * @param aspect The aspect ratio (width divided by height), or 0 to disable + * + * This sets the desired aspect ratio of a canvas window + * + * @warning Support for this depends on the underlying windowing system. + * @since 1.2 + */ +EAPI void ecore_evas_aspect_set(Ecore_Evas *ee, double aspect); +/** + * @brief Get the aspect ratio of a canvas window + * + * This returns the value set by ecore_evas_aspect_set(). + * + * @param ee The Ecore_Evas to set + * @return The aspect ratio + * + * @see ecore_evas_aspect_set() + * @since 1.2 + */ +EAPI double ecore_evas_aspect_get(const Ecore_Evas *ee); +/** + * @brief Set The urgent hint flag + * + * @param ee The Ecore_Evas + * @param urgent The urgent state flag + * + * This sets the "urgent" state hint on a window so the desktop environment + * can highlight it somehow. + * + * @warning Support for this depends on the underlying windowing system. + * @since 1.2 + */ +EAPI void ecore_evas_urgent_set(Ecore_Evas *ee, Eina_Bool urgent); +/** + * @brief Get the urgent state on the cavas window + * + * This returns the value set by ecore_evas_urgent_set() + * + * @param ee The Ecore_Evas to set + * @return The urgent state set + * + * @see ecore_evas_urgent_set() + * @since 1.2 + */ +EAPI Eina_Bool ecore_evas_urgent_get(const Ecore_Evas *ee); +/** + * @brief Set the modal state flag on the canvas window + * + * @param ee The Ecore_Evas + * @param modal The modal hint flag + * + * This hints if the window should be modal (eg if it is also transient + * for another window, the other window will maybe be denied focus by + * the desktop window manager). + * + * @warning Support for this depends on the underlying windowing system. + * @since 1.2 + */ +EAPI void ecore_evas_modal_set(Ecore_Evas *ee, Eina_Bool modal); +/** + * @brief Get The modal flag + * + * This returns the value set by ecore_evas_modal_set(). + * + * @param ee The Ecore_Evas to set + * @return The modal flag + * + * @see ecore_evas_modal_set() + * @since 1.2 + */ +EAPI Eina_Bool ecore_evas_modal_get(const Ecore_Evas *ee); +/** + * @brief Set the "i demand attention" flag on a canvas window + * + * @param ee The Ecore_Evas + * @param demand_attention The flag state to set + * + * A window may demand attention now (eg you must enter a password before + * continuing), and so it may flag a window with this. + * + * @warning Support for this depends on the underlying windowing system. + * @since 1.2 + */ +EAPI void ecore_evas_demand_attention_set(Ecore_Evas *ee, Eina_Bool demand); +/** + * @brief Get the "i demand attention" flag + * + * This returns the value set by ecore_evas_demand_attention_set(). + * + * @param ee The Ecore_Evas to set + * @return The "i demand attention" flag. + * + * @see ecore_evas_demand_attention_set() + * @since 1.2 + */ +EAPI Eina_Bool ecore_evas_demand_attention_get(const Ecore_Evas *ee); +/** + * @brief Set the "focus skip" flag + * + * @param ee The Ecore_Evas + * @param skip The "focus skip" state to set. + * + * A window may not want to accept focus, be in the taskbar, pager etc. + * sometimes (example for a small notification window that hovers around + * a taskbar or panel, or hovers around a window until some activity + * dismisses it). + * + * @warning Support for this depends on the underlying windowing system. + * @since 1.2 + */ +EAPI void ecore_evas_focus_skip_set(Ecore_Evas *ee, Eina_Bool skip); +/** + * @brief Get the "focus skip" flag + * + * This returns the value set by ecore_evas_focus_skip_set(). + * + * @param ee The Ecore_Evas to set + * @return The "focus skip" flag. + * + * @see ecore_evas_focus_skip_set() + * @since 1.2 + */ +EAPI Eina_Bool ecore_evas_focus_skip_get(const Ecore_Evas *ee); + +/** * @brief Set if this evas should ignore @b all events. * * @param ee The Ecore_Evas whose window's to ignore events. @@ -693,10 +873,13 @@ EAPI Ecore_Evas *ecore_evas_fb_new(const char *disp_name, int rotation, int EAPI Ecore_Evas *ecore_evas_directfb_new(const char *disp_name, int windowed, int x, int y, int w, int h); EAPI Ecore_DirectFB_Window *ecore_evas_directfb_window_get(const Ecore_Evas *ee); -EAPI Ecore_Evas *ecore_evas_wayland_shm_new(const char *disp_name, int x, int y, int w, int h, int frame); -EAPI Ecore_Evas *ecore_evas_wayland_egl_new(const char *disp_name, int x, int y, int w, int h, int frame); + +EAPI Ecore_Evas *ecore_evas_wayland_shm_new(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame); +EAPI Ecore_Evas *ecore_evas_wayland_egl_new(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame); EAPI void ecore_evas_wayland_resize(Ecore_Evas *ee, int location); -EAPI void ecore_evas_wayland_drag_start(Ecore_Evas *ee, Ecore_Evas *drag_ee, void *source); +/* EAPI void ecore_evas_wayland_drag_start(Ecore_Evas *ee, Ecore_Evas *drag_ee, void *source); */ +/* EAPI void ecore_evas_wayland_pointer_set(Ecore_Evas *ee, int hot_x, int hot_y); */ +/* EAPI void ecore_evas_wayland_type_set(Ecore_Evas *ee, int type); */ /** * @brief Create a new @c Ecore_Evas canvas bound to the Evas @@ -1038,7 +1221,7 @@ EAPI void ecore_evas_data_set(Ecore_Evas *ee, const char *key, const void * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_resize_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_resize_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas move events. * @param ee The Ecore_Evas to set callbacks on @@ -1050,7 +1233,7 @@ EAPI void ecore_evas_callback_resize_set(Ecore_Evas *ee, void (*func) (Ec * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_move_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_move_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas show events. * @param ee The Ecore_Evas to set callbacks on @@ -1062,7 +1245,7 @@ EAPI void ecore_evas_callback_move_set(Ecore_Evas *ee, void (*func) (Ecor * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_show_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_show_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas hide events. * @param ee The Ecore_Evas to set callbacks on @@ -1074,7 +1257,7 @@ EAPI void ecore_evas_callback_show_set(Ecore_Evas *ee, void (*func) (Ecor * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_hide_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_hide_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas delete request events. * @param ee The Ecore_Evas to set callbacks on @@ -1086,7 +1269,7 @@ EAPI void ecore_evas_callback_hide_set(Ecore_Evas *ee, void (*func) (Ecor * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_delete_request_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_delete_request_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas destroy events. * @param ee The Ecore_Evas to set callbacks on @@ -1098,7 +1281,7 @@ EAPI void ecore_evas_callback_delete_request_set(Ecore_Evas *ee, void (*f * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_destroy_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_destroy_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas focus in events. * @param ee The Ecore_Evas to set callbacks on @@ -1110,7 +1293,7 @@ EAPI void ecore_evas_callback_destroy_set(Ecore_Evas *ee, void (*func) (E * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_focus_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_focus_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas focus out events. * @param ee The Ecore_Evas to set callbacks on @@ -1122,7 +1305,7 @@ EAPI void ecore_evas_callback_focus_in_set(Ecore_Evas *ee, void (*func) ( * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_focus_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_focus_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas sticky events. * @param ee The Ecore_Evas to set callbacks on @@ -1134,7 +1317,7 @@ EAPI void ecore_evas_callback_focus_out_set(Ecore_Evas *ee, void (*func) * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_sticky_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_sticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas un-sticky events. * @param ee The Ecore_Evas to set callbacks on @@ -1146,7 +1329,7 @@ EAPI void ecore_evas_callback_sticky_set(Ecore_Evas *ee, void (*func) (Ec * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_unsticky_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_unsticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas mouse in events. * @param ee The Ecore_Evas to set callbacks on @@ -1158,7 +1341,7 @@ EAPI void ecore_evas_callback_unsticky_set(Ecore_Evas *ee, void (*func) ( * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas mouse out events. * @param ee The Ecore_Evas to set callbacks on @@ -1170,7 +1353,7 @@ EAPI void ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, void (*func) ( * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas pre render events. * @param ee The Ecore_Evas to set callbacks on @@ -1182,7 +1365,7 @@ EAPI void ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, void (*func) * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_pre_render_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_pre_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas mouse post render events. * @param ee The Ecore_Evas to set callbacks on @@ -1194,7 +1377,7 @@ EAPI void ecore_evas_callback_pre_render_set(Ecore_Evas *ee, void (*func) * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_post_render_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_post_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); /** * Set a callback for Ecore_Evas pre-free event. * @param ee The Ecore_Evas to set callbacks on @@ -1206,7 +1389,21 @@ EAPI void ecore_evas_callback_post_render_set(Ecore_Evas *ee, void (*func * @warning If and when this function is called depends on the underlying * windowing system. */ -EAPI void ecore_evas_callback_pre_free_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); +EAPI void ecore_evas_callback_pre_free_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); +/** + * Set a callback for Ecore_Evas state changes. + * @param ee The Ecore_Evas to set callbacks on + * @param func The function to call + + * A call to this function will set a callback on an Ecore_Evas, causing + * @p func to be called whenever @p ee changes state. + * + * @since 1.2 + * @warning If and when this function is called depends on the underlying + * windowing system. + */ +EAPI void ecore_evas_callback_state_change_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + EAPI Evas *ecore_evas_get(const Ecore_Evas *ee); EAPI void ecore_evas_managed_move(Ecore_Evas *ee, int x, int y); EAPI void ecore_evas_shaped_set(Ecore_Evas *ee, Eina_Bool shaped); @@ -1572,7 +1769,7 @@ EAPI Eina_Bool ecore_evas_ews_setup(int x, int y, int w, int h); /** * Return the internal backing store in use. * - * @note this will foced it to be created, making future calls to + * @note this will forced it to be created, making future calls to * ecore_evas_ews_engine_set() void. * * @see ecore_evas_ews_evas_get() @@ -1583,7 +1780,7 @@ EAPI Ecore_Evas *ecore_evas_ews_ecore_evas_get(void); /** * Return the internal backing store in use. * - * @note this will foced it to be created, making future calls to + * @note this will forced it to be created, making future calls to * ecore_evas_ews_engine_set() void. * * @see ecore_evas_ews_ecore_evas_get() @@ -1762,6 +1959,7 @@ EAPI Ecore_Evas *ecore_evas_extn_socket_new(int w, int h); /** * @brief Create a socket to provide the service for external ecore evas socket. * + * @param ee The Ecore_Evas * @param svcname The name of the service to be advertised. ensure that it is unique (when combined with @p svcnum) otherwise creation may fail. * @param svcnum A number (any value, 0 beig the common default) to differentiate multiple instances of services with the same name. * @param svcsys A boolean that if true, specifies to create a system-wide service all users can connect to, otherwise the service is private to the user ide that created the service. @@ -1791,7 +1989,7 @@ EAPI Eina_Bool ecore_evas_extn_socket_listen(Ecore_Evas *ee, const char *svcname * image data so the external plug process will not render to it or alter it. * * You should only hold the lock for just as long as you need to read out the - * image data or otherwise deal with it, and then unlokc it with + * image data or otherwise deal with it, and then unlock it with * ecore_evas_extn_plug_object_data_unlock(). Keeping a lock over more than * 1 iteration of the main ecore loop will be problematic, so avoid it. Also * forgetting to unlock may cause the socket process to freeze and thus create @@ -1831,7 +2029,7 @@ EAPI void ecore_evas_extn_plug_object_data_unlock(Evas_Object *obj); * in the canvas of the plug process in place of the image object. The image * object by default is created to be filled (equivalent of * evas_object_image_filled_add() on creation) so image content will scale - * toi fill the image unless otherwise reconfigured. The Ecore_Evas size + * to fill the image unless otherwise reconfigured. The Ecore_Evas size * of the plug is the master size and determines size in pixels of the * plug canvas. You can change the size with something like: * diff --git a/libraries/ecore/src/lib/ecore_evas/Makefile.am b/libraries/ecore/src/lib/ecore_evas/Makefile.am index a1d9215..c85af09 100644 --- a/libraries/ecore/src/lib/ecore_evas/Makefile.am +++ b/libraries/ecore/src/lib/ecore_evas/Makefile.am @@ -151,6 +151,7 @@ $(top_builddir)/src/lib/ecore/libecore.la \ @EVAS_LIBS@ \ @EINA_LIBS@ \ @EVIL_LIBS@ \ +@SHM_OPEN_LIBS@ \ @WAYLAND_EGL_LIBS@ libecore_evas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ diff --git a/libraries/ecore/src/lib/ecore_evas/Makefile.in b/libraries/ecore/src/lib/ecore_evas/Makefile.in index a269b75..b48f26f 100644 --- a/libraries/ecore/src/lib/ecore_evas/Makefile.in +++ b/libraries/ecore/src/lib/ecore_evas/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -216,6 +215,8 @@ 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@ @@ -271,6 +272,8 @@ 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@ @@ -281,6 +284,7 @@ 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@ @@ -605,6 +609,7 @@ $(top_builddir)/src/lib/ecore/libecore.la \ @EVAS_LIBS@ \ @EINA_LIBS@ \ @EVIL_LIBS@ \ +@SHM_OPEN_LIBS@ \ @WAYLAND_EGL_LIBS@ libecore_evas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas.c index 2b04488..6ecd609 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas.c @@ -509,24 +509,6 @@ _ecore_evas_constructor_sdl(int x __UNUSED__, int y __UNUSED__, int w, int h, co return ee; } - -static Ecore_Evas * -_ecore_evas_constructor_sdl16(int x __UNUSED__, int y __UNUSED__, int w, int h, const char *extra_options) -{ - Ecore_Evas *ee; - unsigned int fullscreen = 0, hwsurface = 0, noframe = 0, alpha = 0; - char *name = NULL; - - _ecore_evas_parse_extra_options_str(extra_options, "name=", &name); - _ecore_evas_parse_extra_options_uint(extra_options, "fullscreen=", &fullscreen); - _ecore_evas_parse_extra_options_uint(extra_options, "hwsurface=", &hwsurface); - _ecore_evas_parse_extra_options_uint(extra_options, "alpha=", &alpha); - - ee = ecore_evas_sdl16_new(name, w, h, fullscreen, hwsurface, noframe, alpha); - free(name); - - return ee; -} #endif #ifdef BUILD_ECORE_EVAS_OPENGL_SDL @@ -606,12 +588,13 @@ static Ecore_Evas * _ecore_evas_constructor_wayland_shm(int x, int y, int w, int h, const char *extra_options) { char *disp_name = NULL; - unsigned int frame = 0; + unsigned int frame = 0, parent = 0; Ecore_Evas *ee; _ecore_evas_parse_extra_options_str(extra_options, "display=", &disp_name); _ecore_evas_parse_extra_options_uint(extra_options, "frame=", &frame); - ee = ecore_evas_wayland_shm_new(disp_name, x, y, w, h, frame); + _ecore_evas_parse_extra_options_uint(extra_options, "parent=", &parent); + ee = ecore_evas_wayland_shm_new(disp_name, parent, x, y, w, h, frame); free(disp_name); return ee; @@ -623,12 +606,13 @@ static Ecore_Evas * _ecore_evas_constructor_wayland_egl(int x, int y, int w, int h, const char *extra_options) { char *disp_name = NULL; - unsigned int frame = 0; + unsigned int frame = 0, parent = 0; Ecore_Evas *ee; _ecore_evas_parse_extra_options_str(extra_options, "display=", &disp_name); _ecore_evas_parse_extra_options_uint(extra_options, "frame=", &frame); - ee = ecore_evas_wayland_egl_new(disp_name, x, y, w, h, frame); + _ecore_evas_parse_extra_options_uint(extra_options, "parent=", &parent); + ee = ecore_evas_wayland_egl_new(disp_name, parent, x, y, w, h, frame); free(disp_name); return ee; @@ -788,7 +772,6 @@ static const struct ecore_evas_engine _engines[] = { #ifdef BUILD_ECORE_EVAS_SOFTWARE_SDL {"sdl", _ecore_evas_constructor_sdl}, - {"software_16_sdl", _ecore_evas_constructor_sdl16}, #endif /* independent */ @@ -944,7 +927,7 @@ ecore_evas_data_set(Ecore_Evas *ee, const char *key, const void *data) #define IFE return;} EAPI void -ecore_evas_callback_resize_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_resize_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -958,7 +941,7 @@ ecore_evas_callback_resize_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) } EAPI void -ecore_evas_callback_move_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_move_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -972,7 +955,7 @@ ecore_evas_callback_move_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) } EAPI void -ecore_evas_callback_show_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_show_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -986,7 +969,7 @@ ecore_evas_callback_show_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) } EAPI void -ecore_evas_callback_hide_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_hide_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -1000,7 +983,7 @@ ecore_evas_callback_hide_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) } EAPI void -ecore_evas_callback_delete_request_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_delete_request_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -1014,7 +997,7 @@ ecore_evas_callback_delete_request_set(Ecore_Evas *ee, void (*func) (Ecore_Evas } EAPI void -ecore_evas_callback_destroy_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_destroy_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -1028,7 +1011,7 @@ ecore_evas_callback_destroy_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) } EAPI void -ecore_evas_callback_focus_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_focus_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -1042,7 +1025,7 @@ ecore_evas_callback_focus_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) } EAPI void -ecore_evas_callback_focus_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_focus_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -1056,7 +1039,7 @@ ecore_evas_callback_focus_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) } EAPI void -ecore_evas_callback_sticky_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_sticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -1070,7 +1053,7 @@ ecore_evas_callback_sticky_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) } EAPI void -ecore_evas_callback_unsticky_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_unsticky_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -1084,7 +1067,7 @@ ecore_evas_callback_unsticky_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) } EAPI void -ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -1098,7 +1081,7 @@ ecore_evas_callback_mouse_in_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) } EAPI void -ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -1112,7 +1095,7 @@ ecore_evas_callback_mouse_out_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) } EAPI void -ecore_evas_callback_pre_render_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_pre_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -1126,7 +1109,7 @@ ecore_evas_callback_pre_render_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee) } EAPI void -ecore_evas_callback_post_render_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_post_render_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -1140,7 +1123,7 @@ ecore_evas_callback_post_render_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee } EAPI void -ecore_evas_callback_pre_free_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +ecore_evas_callback_pre_free_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) { @@ -1151,6 +1134,18 @@ ecore_evas_callback_pre_free_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) ee->func.fn_pre_free = func; } +EAPI void +ecore_evas_callback_state_change_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "ecore_evas_callback_state_change_set"); + return; + } + ee->func.fn_state_change = func; +} + /** * Get an Ecore_Evas's Evas * @param ee The Ecore_Evas whose Evas you wish to get @@ -2120,6 +2115,162 @@ ecore_evas_sticky_get(const Ecore_Evas *ee) } EAPI void +ecore_evas_window_group_set(Ecore_Evas *ee, const Ecore_Evas *ee_group) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "XXX"); + return; + } + + IFC(ee, fn_window_group_set) (ee, ee_group); + IFE; +} + +EAPI const Ecore_Evas * +ecore_evas_window_group_get(const Ecore_Evas *ee) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "XXX"); + return EINA_FALSE; + } + return ee->prop.group_ee; +} + +EAPI void +ecore_evas_aspect_set(Ecore_Evas *ee, double aspect) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "XXX"); + return; + } + + IFC(ee, fn_aspect_set) (ee, aspect); + IFE; +} + +EAPI double +ecore_evas_aspect_get(const Ecore_Evas *ee) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "XXX"); + return EINA_FALSE; + } + return ee->prop.aspect; +} + +EAPI void +ecore_evas_urgent_set(Ecore_Evas *ee, Eina_Bool urgent) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "XXX"); + return; + } + + IFC(ee, fn_urgent_set) (ee, urgent); + IFE; +} + +EAPI Eina_Bool +ecore_evas_urgent_get(const Ecore_Evas *ee) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "XXX"); + return EINA_FALSE; + } + return ee->prop.urgent ? EINA_TRUE : EINA_FALSE; +} + +EAPI void +ecore_evas_modal_set(Ecore_Evas *ee, Eina_Bool modal) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "XXX"); + return; + } + + IFC(ee, fn_modal_set) (ee, modal); + IFE; +} + +EAPI Eina_Bool +ecore_evas_modal_get(const Ecore_Evas *ee) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "XXX"); + return EINA_FALSE; + } + return ee->prop.modal ? EINA_TRUE : EINA_FALSE; +} + +EAPI void +ecore_evas_demand_attention_set(Ecore_Evas *ee, Eina_Bool demand) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "XXX"); + return; + } + + IFC(ee, fn_demands_attention_set) (ee, demand); + IFE; +} + +EAPI Eina_Bool +ecore_evas_demand_attention_get(const Ecore_Evas *ee) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "XXX"); + return EINA_FALSE; + } + return ee->prop.demand_attention ? EINA_TRUE : EINA_FALSE; +} + +EAPI void +ecore_evas_focus_skip_set(Ecore_Evas *ee, Eina_Bool skip) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "XXX"); + return; + } + + IFC(ee, fn_focus_skip_set) (ee, skip); + IFE; +} + +EAPI Eina_Bool +ecore_evas_focus_skip_get(const Ecore_Evas *ee) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, + "XXX"); + return EINA_FALSE; + } + return ee->prop.focus_skip ? EINA_TRUE : EINA_FALSE; +} + +EAPI void ecore_evas_ignore_events_set(Ecore_Evas *ee, Eina_Bool ignore) { if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) @@ -2695,35 +2846,10 @@ ecore_evas_wayland_resize(Ecore_Evas *ee, int location) } } -EAPI void -ecore_evas_wayland_drag_start(Ecore_Evas *ee, Ecore_Evas *drag_ee, void *source) -{ - if ((!ee) || (!source)) return; - if (!ee->engine.wl.surface) return; - - if (!strcmp(ee->driver, "wayland_shm")) - { -#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM - _ecore_evas_wayland_shm_drag_start(ee, drag_ee, source); -#endif - } - else if (!strcmp(ee->driver, "wayland_egl")) - { -#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL - _ecore_evas_wayland_egl_drag_start(ee, drag_ee, source); -#endif - } -} #else EAPI void ecore_evas_wayland_resize(Ecore_Evas *ee __UNUSED__, int location __UNUSED__) { } - -EAPI void -ecore_evas_wayland_drag_start(Ecore_Evas *ee __UNUSED__, Ecore_Evas *drag_ee __UNUSED__, void *source __UNUSED__) -{ - -} #endif diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_buffer.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_buffer.c index 3f82efb..4c81db7 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_buffer.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_buffer.c @@ -513,6 +513,13 @@ static Ecore_Evas_Engine_Func _ecore_buffer_engine_func = _ecore_evas_buffer_alpha_set, NULL, //transparent + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + _ecore_evas_buffer_render, NULL // screen_geometry_get }; diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_cocoa.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_cocoa.c index 36d41f8..0947b11 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_cocoa.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_cocoa.c @@ -9,7 +9,7 @@ #ifdef BUILD_ECORE_EVAS_OPENGL_COCOA #include -#include +#include #endif #include "ecore_evas_private.h" @@ -463,6 +463,14 @@ static Ecore_Evas_Engine_Func _ecore_cocoa_engine_func = NULL, NULL, NULL, //transparent + + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, // render NULL }; diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_directfb.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_directfb.c index 457f9e9..ed24355 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_directfb.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_directfb.c @@ -490,6 +490,13 @@ static Ecore_Evas_Engine_Func _ecore_directfb_engine_func = NULL, /* alpha */ NULL, //transparent + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, // render NULL // screen_geometry_get }; diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_ews.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_ews.c index eccf98b..ec02472 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_ews.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_ews.c @@ -683,6 +683,14 @@ static const Ecore_Evas_Engine_Func _ecore_ews_engine_func = _ecore_evas_ews_ignore_events_set, _ecore_evas_ews_alpha_set, _ecore_evas_ews_transparent_set, + + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + _ecore_evas_ews_render, _ecore_evas_ews_screen_geometry_get }; diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_extn.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_extn.c index e46ab4a..a7ea4c3 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_extn.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_extn.c @@ -2,35 +2,37 @@ # include #endif +#include #include +#include +#include +#include +#include +#ifdef HAVE_SYS_MMAN_H +# include +#endif +#include +#include +#include +#include #include #include #include "ecore_private.h" #include -#ifdef BUILD_ECORE_IPC -# ifdef BUILD_ECORE_EVAS_SOFTWARE_BUFFER -# define EXTN_ENABLED 1 -# endif +#ifdef BUILD_ECORE_EVAS_EXTN + +#include + #endif #include "ecore_evas_private.h" #include "Ecore_Evas.h" -#ifdef EXTN_ENABLED -#include "Ecore_Ipc.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include + +#ifdef BUILD_ECORE_EVAS_EXTN + typedef struct _Shmfile Shmfile; @@ -1102,6 +1104,13 @@ static const Ecore_Evas_Engine_Func _ecore_extn_plug_engine_func = NULL, NULL, //transparent + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, // render NULL // screen_geometry_get }; @@ -1286,12 +1295,13 @@ void _ecore_evas_extn_shutdown(void) { } -#endif + +#endif /* BUILD_ECORE_EVAS_EXTN */ EAPI Evas_Object * ecore_evas_extn_plug_new(Ecore_Evas *ee_target) { -#ifdef EXTN_ENABLED +#ifdef BUILD_ECORE_EVAS_EXTN Evas_Object *o; Ecore_Evas *ee; int w = 1, h = 1; @@ -1408,7 +1418,7 @@ ecore_evas_extn_plug_new(Ecore_Evas *ee_target) EAPI Eina_Bool ecore_evas_extn_plug_connect(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys) { -#ifdef EXTN_ENABLED +#ifdef BUILD_ECORE_EVAS_EXTN Extn *extn; Ecore_Evas *ee = NULL; @@ -1459,7 +1469,7 @@ ecore_evas_extn_plug_connect(Evas_Object *obj, const char *svcname, int svcnum, EAPI void ecore_evas_extn_plug_object_data_lock(Evas_Object *obj) { -#ifdef EXTN_ENABLED +#ifdef BUILD_ECORE_EVAS_EXTN Ecore_Evas *ee; ee = ecore_evas_object_ecore_evas_get(obj); @@ -1471,7 +1481,7 @@ ecore_evas_extn_plug_object_data_lock(Evas_Object *obj) EAPI void ecore_evas_extn_plug_object_data_unlock(Evas_Object *obj) { -#ifdef EXTN_ENABLED +#ifdef BUILD_ECORE_EVAS_EXTN Ecore_Evas *ee; ee = ecore_evas_object_ecore_evas_get(obj); @@ -1480,7 +1490,7 @@ ecore_evas_extn_plug_object_data_unlock(Evas_Object *obj) #endif } -#ifdef EXTN_ENABLED +#ifdef BUILD_ECORE_EVAS_EXTN static void _ecore_evas_socket_resize(Ecore_Evas *ee, int w, int h) { @@ -1830,7 +1840,7 @@ _ipc_client_data(void *data, int type __UNUSED__, void *event) #define STRGET(val) \ do { \ - if ((ipc->val) && (ipc->val < (char *)(e->size - 1))) \ + if ((ipc->val) && (ipc->val < (char *)(long)(e->size - 1))) \ ipc->val = ((char *)ipc) + (long)ipc->val; \ else \ ipc->val = NULL; \ @@ -1978,6 +1988,13 @@ static const Ecore_Evas_Engine_Func _ecore_extn_socket_engine_func = _ecore_evas_extn_socket_alpha_set, NULL, //transparent + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + _ecore_evas_extn_socket_render, // render NULL // screen_geometry_get }; @@ -1987,7 +2004,7 @@ static const Ecore_Evas_Engine_Func _ecore_extn_socket_engine_func = EAPI Ecore_Evas * ecore_evas_extn_socket_new(int w, int h) { -#ifdef EXTN_ENABLED +#ifdef BUILD_ECORE_EVAS_EXTN Evas_Engine_Info_Buffer *einfo; Ecore_Evas *ee; int rmethod; @@ -2077,7 +2094,7 @@ ecore_evas_extn_socket_new(int w, int h) EAPI Eina_Bool ecore_evas_extn_socket_listen(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys) { -#ifdef EXTN_ENABLED +#ifdef BUILD_ECORE_EVAS_EXTN Extn *extn; extn = calloc(1, sizeof(Extn)); diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_fb.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_fb.c index 74caada..11e2ffd 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_fb.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_fb.c @@ -541,6 +541,13 @@ static Ecore_Evas_Engine_Func _ecore_fb_engine_func = NULL, NULL, //transparent + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, // render NULL // screen_geometry_get }; diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_private.h b/libraries/ecore/src/lib/ecore_evas/ecore_evas_private.h index 9a88a7a..e31653a 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_private.h +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_private.h @@ -123,6 +123,7 @@ extern int _ecore_evas_log_dom; #define IDLE_FLUSH_TIME 0.5 #ifndef _ECORE_EVAS_H typedef struct _Ecore_Evas Ecore_Evas; +typedef void (*Ecore_Evas_Event_Cb) (Ecore_Evas *ee); #endif typedef struct _Ecore_Evas_Engine Ecore_Evas_Engine; @@ -131,20 +132,20 @@ typedef struct _Ecore_Evas_Engine_Func Ecore_Evas_Engine_Func; struct _Ecore_Evas_Engine_Func { void (*fn_free) (Ecore_Evas *ee); - void (*fn_callback_resize_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); - void (*fn_callback_move_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); - void (*fn_callback_show_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); - void (*fn_callback_hide_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); - void (*fn_callback_delete_request_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); - void (*fn_callback_destroy_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); - void (*fn_callback_focus_in_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); - void (*fn_callback_focus_out_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); - void (*fn_callback_mouse_in_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); - void (*fn_callback_mouse_out_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); - void (*fn_callback_sticky_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); - void (*fn_callback_unsticky_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); - void (*fn_callback_pre_render_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); - void (*fn_callback_post_render_set) (Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)); + void (*fn_callback_resize_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + void (*fn_callback_move_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + void (*fn_callback_show_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + void (*fn_callback_hide_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + void (*fn_callback_delete_request_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + void (*fn_callback_destroy_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + void (*fn_callback_focus_in_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + void (*fn_callback_focus_out_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + void (*fn_callback_mouse_in_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + void (*fn_callback_mouse_out_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + void (*fn_callback_sticky_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + void (*fn_callback_unsticky_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + void (*fn_callback_pre_render_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); + void (*fn_callback_post_render_set) (Ecore_Evas *ee, Ecore_Evas_Event_Cb func); void (*fn_move) (Ecore_Evas *ee, int x, int y); void (*fn_managed_move) (Ecore_Evas *ee, int x, int y); void (*fn_resize) (Ecore_Evas *ee, int w, int h); @@ -177,6 +178,13 @@ struct _Ecore_Evas_Engine_Func void (*fn_alpha_set) (Ecore_Evas *ee, int alpha); void (*fn_transparent_set) (Ecore_Evas *ee, int transparent); + void (*fn_window_group_set) (Ecore_Evas *ee, const Ecore_Evas *ee_group); + void (*fn_aspect_set) (Ecore_Evas *ee, double aspect); + void (*fn_urgent_set) (Ecore_Evas *ee, int urgent); + void (*fn_modal_set) (Ecore_Evas *ee, int modal); + void (*fn_demands_attention_set) (Ecore_Evas *ee, int demand); + void (*fn_focus_skip_set) (Ecore_Evas *ee, int skip); + int (*fn_render) (Ecore_Evas *ee); void (*fn_screen_geometry_get) (const Ecore_Evas *ee, int *x, int *y, int *w, int *h); }; @@ -271,11 +279,13 @@ struct _Ecore_Evas_Engine #if defined(BUILD_ECORE_EVAS_WAYLAND_SHM) || defined(BUILD_ECORE_EVAS_WAYLAND_EGL) struct { + Ecore_Wl_Window *parent, *win; Evas_Object *frame; - struct wl_shell_surface *shell_surface; - struct wl_surface *surface; +# if defined(BUILD_ECORE_EVAS_WAYLAND_SHM) struct wl_buffer *buffer; +# endif + } wl; #endif @@ -333,6 +343,9 @@ struct _Ecore_Evas int layer; Ecore_Window window; unsigned char avoid_damage; + Ecore_Evas *group_ee; + Ecore_Window group_ee_win; + double aspect; char focused : 1; char iconified : 1; char borderless : 1; @@ -343,7 +356,12 @@ struct _Ecore_Evas char sticky : 1; char request_pos : 1; char draw_frame : 1; - } prop; + char hwsurface : 1; + char urgent : 1; + char modal : 1; + char demand_attention : 1; + char focus_skip : 1; + } prop; struct { void (*fn_resize) (Ecore_Evas *ee); @@ -361,6 +379,7 @@ struct _Ecore_Evas void (*fn_pre_render) (Ecore_Evas *ee); void (*fn_post_render) (Ecore_Evas *ee); void (*fn_pre_free) (Ecore_Evas *ee); + void (*fn_state_change) (Ecore_Evas *ee); } func; Ecore_Evas_Engine engine; @@ -406,11 +425,15 @@ int _ecore_evas_ews_shutdown(void); #ifdef BUILD_ECORE_EVAS_WAYLAND_SHM void _ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location); void _ecore_evas_wayland_shm_drag_start(Ecore_Evas *ee, Ecore_Evas *drag_ee, void *source); +void _ecore_evas_wayland_shm_pointer_set(Ecore_Evas *ee, int hot_x, int hot_y); +void _ecore_evas_wayland_shm_type_set(Ecore_Evas *ee, int type); #endif #ifdef BUILD_ECORE_EVAS_WAYLAND_EGL void _ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location); void _ecore_evas_wayland_egl_drag_start(Ecore_Evas *ee, Ecore_Evas *drag_ee, void *source); +void _ecore_evas_wayland_egl_pointer_set(Ecore_Evas *ee, int hot_x, int hot_y); +void _ecore_evas_wayland_egl_type_set(Ecore_Evas *ee, int type); #endif void _ecore_evas_fps_debug_init(void); diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c index be130ad..038654a 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c @@ -233,7 +233,7 @@ _ecore_evas_psl1ght_free(Ecore_Evas *ee) } static void -_ecore_evas_psl1ght_callback_delete_request_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +_ecore_evas_psl1ght_callback_delete_request_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { ee->func.fn_delete_request = func; } @@ -396,6 +396,13 @@ static Ecore_Evas_Engine_Func _ecore_psl1ght_engine_func = NULL, NULL, //transparent + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, // render _ecore_evas_screen_geometry_get // screen_geometry_get }; diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_sdl.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_sdl.c index a3be2c7..b246a26 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_sdl.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_sdl.c @@ -7,9 +7,6 @@ #include #if defined(BUILD_ECORE_EVAS_SOFTWARE_SDL) || defined(BUILD_ECORE_EVAS_OPENGL_SDL) # include -# ifdef BUILD_ECORE_EVAS_SOFTWARE_SDL -# include -# endif # ifdef BUILD_ECORE_EVAS_OPENGL_SDL # include # endif @@ -18,10 +15,17 @@ #include #include +#if defined(BUILD_ECORE_EVAS_SOFTWARE_SDL) || defined(BUILD_ECORE_EVAS_OPENGL_SDL) +#include +#endif + #include "ecore_evas_private.h" #include "Ecore_Evas.h" -// fixme: 1 sdl window only at a time? seems wrong +/** + ** SDL only handle one window at a time. That's by definition, there is nothing wrong here. + ** + **/ #if defined(BUILD_ECORE_EVAS_SOFTWARE_SDL) || defined(BUILD_ECORE_EVAS_OPENGL_SDL) @@ -45,6 +49,13 @@ _ecore_evas_sdl_match(void) return sdl_ee; } +static void * +_ecore_evas_sdl_switch_buffer(void *data, void *dest __UNUSED__) +{ + SDL_Flip(data); + return ((SDL_Surface*)data)->pixels; +} + static Eina_Bool _ecore_evas_sdl_event_got_focus(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__) { @@ -80,12 +91,54 @@ _ecore_evas_sdl_event_video_resize(void *data __UNUSED__, int type __UNUSED__, v { Ecore_Sdl_Event_Video_Resize *e; Ecore_Evas *ee; + int rmethod; e = event; ee = _ecore_evas_sdl_match(); if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */ + + rmethod = evas_output_method_get(ee->evas); + if (rmethod == evas_render_method_lookup("buffer")) + { + Evas_Engine_Info_Buffer *einfo; + + einfo = (Evas_Engine_Info_Buffer *) evas_engine_info_get(ee->evas); + if (einfo) + { + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_RGB32; + einfo->info.switch_data = SDL_SetVideoMode(e->w, e->h, 32, + (ee->prop.hwsurface ? SDL_HWSURFACE : SDL_SWSURFACE) + | (ee->prop.fullscreen ? SDL_FULLSCREEN : 0) + | (ee->alpha ? SDL_SRCALPHA : 0) + | SDL_DOUBLEBUF); + if (!einfo->info.switch_data) + { + return EINA_FALSE; + } + + SDL_SetAlpha(einfo->info.switch_data, SDL_SRCALPHA, 0); + SDL_FillRect(einfo->info.switch_data, NULL, 0); + + einfo->info.dest_buffer = ((SDL_Surface*)einfo->info.switch_data)->pixels; + einfo->info.dest_buffer_row_bytes = e->w * sizeof (int); + einfo->info.use_color_key = 0; + einfo->info.alpha_threshold = 0; + einfo->info.func.new_update_region = NULL; + einfo->info.func.free_update_region = NULL; + einfo->info.func.switch_buffer = _ecore_evas_sdl_switch_buffer; + if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *) einfo)) + { + return EINA_FALSE; + } + } + } + + ee->w = e->w; + ee->h = e->h; + evas_output_size_set(ee->evas, e->w, e->h); + evas_output_viewport_set(ee->evas, 0, 0, e->w, e->h); return ECORE_CALLBACK_PASS_ON; } @@ -191,7 +244,7 @@ _ecore_evas_sdl_shutdown(void) _ecore_evas_init_count--; if (_ecore_evas_init_count == 0) { - int i; + unsigned int i; for (i = 0; i < sizeof (ecore_evas_event_handlers) / sizeof (Ecore_Event_Handler*); i++) ecore_event_handler_del(ecore_evas_event_handlers[i]); @@ -219,10 +272,48 @@ _ecore_evas_sdl_free(Ecore_Evas *ee) static void _ecore_evas_resize(Ecore_Evas *ee, int w, int h) { + int rmethod; + if ((w == ee->w) && (h == ee->h)) return; ee->w = w; ee->h = h; + rmethod = evas_output_method_get(ee->evas); + if (rmethod == evas_render_method_lookup("buffer")) + { + Evas_Engine_Info_Buffer *einfo; + + einfo = (Evas_Engine_Info_Buffer *) evas_engine_info_get(ee->evas); + if (einfo) + { + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_RGB32; + einfo->info.switch_data = SDL_SetVideoMode(w, h, 32, + (ee->prop.hwsurface ? SDL_HWSURFACE : SDL_SWSURFACE) + | (ee->prop.fullscreen ? SDL_FULLSCREEN : 0) + | (ee->alpha ? SDL_SRCALPHA : 0) + | SDL_DOUBLEBUF); + if (!einfo->info.switch_data) + { + return ; + } + + SDL_SetAlpha(einfo->info.switch_data, SDL_SRCALPHA, 0); + SDL_FillRect(einfo->info.switch_data, NULL, 0); + + einfo->info.dest_buffer = ((SDL_Surface*)einfo->info.switch_data)->pixels; + einfo->info.dest_buffer_row_bytes = w * sizeof (int); + einfo->info.use_color_key = 0; + einfo->info.alpha_threshold = 0; + einfo->info.func.new_update_region = NULL; + einfo->info.func.free_update_region = NULL; + einfo->info.func.switch_buffer = _ecore_evas_sdl_switch_buffer; + if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *) einfo)) + { + return ; + } + } + } + evas_output_size_set(ee->evas, ee->w, ee->h); evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); @@ -342,6 +433,13 @@ static Ecore_Evas_Engine_Func _ecore_sdl_engine_func = NULL, NULL, //transparent + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, // render NULL // screen_geometry_get }; @@ -349,7 +447,6 @@ static Ecore_Evas_Engine_Func _ecore_sdl_engine_func = static Ecore_Evas* _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha) { - void *einfo; Ecore_Evas *ee; if (!name) @@ -382,6 +479,8 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu ee->prop.withdrawn = 0; ee->prop.sticky = 0; ee->prop.window = 0; + ee->alpha = alpha; + ee->prop.hwsurface = hwsurface; /* init evas here */ ee->evas = evas_new(); @@ -391,19 +490,47 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu evas_output_size_set(ee->evas, w, h); evas_output_viewport_set(ee->evas, 0, 0, w, h); - if (rmethod == evas_render_method_lookup("software_sdl") || - rmethod == evas_render_method_lookup("software_16_sdl") ) + if (rmethod == evas_render_method_lookup("buffer")) { -#ifdef BUILD_ECORE_EVAS_SOFTWARE_SDL - einfo = evas_engine_info_get(ee->evas); + Evas_Engine_Info_Buffer *einfo; + + einfo = (Evas_Engine_Info_Buffer *) evas_engine_info_get(ee->evas); if (einfo) { - ((Evas_Engine_Info_SDL *)einfo)->info.rotation = 0; - ((Evas_Engine_Info_SDL *)einfo)->info.fullscreen = fullscreen; - ((Evas_Engine_Info_SDL *)einfo)->info.hwsurface = hwsurface; - ((Evas_Engine_Info_SDL *)einfo)->info.noframe = noframe; - ((Evas_Engine_Info_SDL *)einfo)->info.alpha = alpha; - if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) + SDL_Init(SDL_INIT_NOPARACHUTE); + + if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) + { + ERR("SDL_Init failed with %s", SDL_GetError()); + SDL_Quit(); + return NULL; + } + + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_RGB32; + einfo->info.switch_data = SDL_SetVideoMode(w, h, 32, + (hwsurface ? SDL_HWSURFACE : SDL_SWSURFACE) + | (fullscreen ? SDL_FULLSCREEN : 0) + | (noframe ? SDL_NOFRAME : 0) + | (alpha ? SDL_SRCALPHA : 0) + | SDL_DOUBLEBUF); + if (!einfo->info.switch_data) + { + ERR("SDL_SetVideoMode failed !"); + ecore_evas_free(ee); + return NULL; + } + + SDL_SetAlpha(einfo->info.switch_data, SDL_SRCALPHA, 0); + SDL_FillRect(einfo->info.switch_data, NULL, 0); + + einfo->info.dest_buffer = ((SDL_Surface*)einfo->info.switch_data)->pixels; + einfo->info.dest_buffer_row_bytes = w * sizeof (int); + einfo->info.use_color_key = 0; + einfo->info.alpha_threshold = 0; + einfo->info.func.new_update_region = NULL; + einfo->info.func.free_update_region = NULL; + einfo->info.func.switch_buffer = _ecore_evas_sdl_switch_buffer; + if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *) einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); ecore_evas_free(ee); @@ -416,16 +543,17 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu ecore_evas_free(ee); return NULL; } -#endif } else if (rmethod == evas_render_method_lookup("gl_sdl")) { #ifdef BUILD_ECORE_EVAS_OPENGL_SDL - einfo = evas_engine_info_get(ee->evas); + Evas_Engine_Info_GL_SDL *einfo; + + einfo = (Evas_Engine_Info_GL_SDL *) evas_engine_info_get(ee->evas); if (einfo) { - ((Evas_Engine_Info_GL_SDL *)einfo)->flags.fullscreen = fullscreen; - ((Evas_Engine_Info_GL_SDL *)einfo)->flags.noframe = noframe; + einfo->flags.fullscreen = fullscreen; + einfo->flags.noframe = noframe; if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); @@ -464,7 +592,7 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process, (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process); - SDL_ShowCursor(SDL_DISABLE); + SDL_ShowCursor(SDL_ENABLE); ee->engine.func->fn_render = _ecore_evas_sdl_render; _ecore_evas_register(ee); @@ -481,11 +609,10 @@ ecore_evas_sdl_new(const char* name, int w, int h, int fullscreen, int hwsurface Ecore_Evas *ee; int rmethod; - rmethod = evas_render_method_lookup("software_sdl"); + rmethod = evas_render_method_lookup("buffer"); if (!rmethod) return NULL; ee = _ecore_evas_internal_sdl_new(rmethod, name, w, h, fullscreen, hwsurface, noframe, alpha); - ee->driver = "sdl"; return ee; } #else @@ -497,28 +624,12 @@ ecore_evas_sdl_new(const char* name __UNUSED__, int w __UNUSED__, int h __UNUSED } #endif -#ifdef BUILD_ECORE_EVAS_SOFTWARE_SDL -EAPI Ecore_Evas* -ecore_evas_sdl16_new(const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha) -{ - Ecore_Evas *ee; - int rmethod; - - rmethod = evas_render_method_lookup("software_16_sdl"); - if (!rmethod) return NULL; - - ee = _ecore_evas_internal_sdl_new(rmethod, name, w, h, fullscreen, hwsurface, noframe, alpha); - ee->driver = "software_16_sdl"; - return ee; -} -#else EAPI Ecore_Evas* ecore_evas_sdl16_new(const char* name __UNUSED__, int w __UNUSED__, int h __UNUSED__, int fullscreen __UNUSED__, int hwsurface __UNUSED__, int noframe __UNUSED__, int alpha __UNUSED__) { ERR("OUTCH !"); return NULL; } -#endif #ifdef BUILD_ECORE_EVAS_OPENGL_SDL EAPI Ecore_Evas* diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c index 72e8555..e88fc35 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c @@ -1,8 +1,8 @@ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif -#define LOGFNS 1 +//#define LOGFNS 1 #ifdef LOGFNS # include @@ -28,15 +28,15 @@ #include "Ecore_Evas.h" #ifdef BUILD_ECORE_EVAS_WAYLAND_EGL -# include # include # include /* local structures */ typedef struct _EE_Wl_Smart_Data EE_Wl_Smart_Data; -struct _EE_Wl_Smart_Data +struct _EE_Wl_Smart_Data { - Evas_Object *frame, *text; + Evas_Object *frame; + Evas_Object *text; Evas_Coord x, y, w, h; }; @@ -51,40 +51,33 @@ static void _ecore_evas_wl_callback_delete_request_set(Ecore_Evas *ee, void (*fu static void _ecore_evas_wl_callback_focus_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); static void _ecore_evas_wl_callback_focus_out_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); static void _ecore_evas_wl_callback_mouse_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); +static void _ecore_evas_wl_callback_mouse_out_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); static void _ecore_evas_wl_move(Ecore_Evas *ee, int x, int y); static void _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h); static void _ecore_evas_wl_show(Ecore_Evas *ee); static void _ecore_evas_wl_hide(Ecore_Evas *ee); static void _ecore_evas_wl_raise(Ecore_Evas *ee); -static void _ecore_evas_wl_lower(Ecore_Evas *ee); -static void _ecore_evas_wl_activate(Ecore_Evas *ee); -static void _ecore_evas_wl_title_set(Ecore_Evas *ee, const char *t); +static void _ecore_evas_wl_title_set(Ecore_Evas *ee, const char *title); static void _ecore_evas_wl_name_class_set(Ecore_Evas *ee, const char *n, const char *c); static void _ecore_evas_wl_size_min_set(Ecore_Evas *ee, int w, int h); static void _ecore_evas_wl_size_max_set(Ecore_Evas *ee, int w, int h); static void _ecore_evas_wl_size_base_set(Ecore_Evas *ee, int w, int h); static void _ecore_evas_wl_size_step_set(Ecore_Evas *ee, int w, int h); -static void _ecore_evas_wl_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y); -static void _ecore_evas_wl_object_cursor_del(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__); static void _ecore_evas_wl_layer_set(Ecore_Evas *ee, int layer); -static void _ecore_evas_wl_focus_set(Ecore_Evas *ee, int focus __UNUSED__); static void _ecore_evas_wl_iconified_set(Ecore_Evas *ee, int iconify); static void _ecore_evas_wl_maximized_set(Ecore_Evas *ee, int max); -static void _ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full __UNUSED__); +static void _ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full); +static void _ecore_evas_wl_ignore_events_set(Ecore_Evas *ee, int ignore); +static void _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha); +static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent); static int _ecore_evas_wl_render(Ecore_Evas *ee); static void _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h); -static Eina_Bool _ecore_evas_wl_event_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event); - -static void _ecore_evas_wl_handle_configure(void *data, struct wl_shell_surface *shell_surface __UNUSED__, uint32_t timestamp __UNUSED__, uint32_t edges __UNUSED__, int32_t width, int32_t height); -static void _ecore_evas_wl_handle_popup_done(void *data __UNUSED__, struct wl_shell_surface *shell_surface __UNUSED__); +static Eina_Bool _ecore_evas_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _ecore_evas_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _ecore_evas_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _ecore_evas_wl_cb_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, void *event); /* SMART stuff for frame */ static Evas_Smart *_ecore_evas_wl_smart = NULL; @@ -100,94 +93,94 @@ static Evas_Object *_ecore_evas_wl_frame_add(Evas *evas); /* local variables */ static int _ecore_evas_wl_init_count = 0; -static Ecore_Event_Handler *_ecore_evas_wl_event_handlers[8]; -static uint32_t _ecore_evas_wl_btn_timestamp; -static const struct wl_shell_surface_listener _ecore_evas_wl_shell_surface_listener = -{ - _ecore_evas_wl_handle_configure, - _ecore_evas_wl_handle_popup_done -}; +static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[5]; static Ecore_Evas_Engine_Func _ecore_wl_engine_func = { - _ecore_evas_wl_free, - _ecore_evas_wl_callback_resize_set, - _ecore_evas_wl_callback_move_set, - NULL, // callback show set - NULL, // callback hide set - _ecore_evas_wl_callback_delete_request_set, - NULL, // callback destroy set - _ecore_evas_wl_callback_focus_in_set, - _ecore_evas_wl_callback_focus_out_set, - _ecore_evas_wl_callback_mouse_in_set, - NULL, // callback mouse out set - NULL, // callback sticky set - NULL, // callback unsticky set - NULL, // callback pre render set - NULL, // callback post render set - _ecore_evas_wl_move, - NULL, // func managed move - _ecore_evas_wl_resize, - NULL, // _ecore_evas_wl_move_resize, - NULL, // func rotation set - NULL, // func shaped set - _ecore_evas_wl_show, - _ecore_evas_wl_hide, - _ecore_evas_wl_raise, - _ecore_evas_wl_lower, - _ecore_evas_wl_activate, - _ecore_evas_wl_title_set, - _ecore_evas_wl_name_class_set, - _ecore_evas_wl_size_min_set, - _ecore_evas_wl_size_max_set, - _ecore_evas_wl_size_base_set, - _ecore_evas_wl_size_step_set, - _ecore_evas_wl_object_cursor_set, - _ecore_evas_wl_layer_set, - _ecore_evas_wl_focus_set, - _ecore_evas_wl_iconified_set, - NULL, // func borderless set - NULL, // func override set - _ecore_evas_wl_maximized_set, + _ecore_evas_wl_free, + _ecore_evas_wl_callback_resize_set, + _ecore_evas_wl_callback_move_set, + NULL, + NULL, + _ecore_evas_wl_callback_delete_request_set, + NULL, + _ecore_evas_wl_callback_focus_in_set, + _ecore_evas_wl_callback_focus_out_set, + _ecore_evas_wl_callback_mouse_in_set, + _ecore_evas_wl_callback_mouse_out_set, + NULL, // sticky_set + NULL, // unsticky_set + NULL, // pre_render_set + NULL, // post_render_set + _ecore_evas_wl_move, + NULL, // managed_move + _ecore_evas_wl_resize, + NULL, // move_resize + NULL, // rotation_set + NULL, // shaped_set + _ecore_evas_wl_show, + _ecore_evas_wl_hide, + _ecore_evas_wl_raise, + NULL, // lower + NULL, // activate + _ecore_evas_wl_title_set, + _ecore_evas_wl_name_class_set, + _ecore_evas_wl_size_min_set, + _ecore_evas_wl_size_max_set, + _ecore_evas_wl_size_base_set, + _ecore_evas_wl_size_step_set, + NULL, // object_cursor_set + _ecore_evas_wl_layer_set, + NULL, // focus set + _ecore_evas_wl_iconified_set, + NULL, // borderless set + NULL, // override set + _ecore_evas_wl_maximized_set, _ecore_evas_wl_fullscreen_set, - NULL, // _ecore_evas_wl_avoid_damage_set, + NULL, // func avoid_damage set NULL, // func withdrawn set NULL, // func sticky set - NULL, // func ignore events set - NULL, // func alpha set - NULL, // func transparent set + _ecore_evas_wl_ignore_events_set, + _ecore_evas_wl_alpha_set, + _ecore_evas_wl_transparent_set, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, _ecore_evas_wl_render, _ecore_evas_wl_screen_geometry_get }; -#endif +/* external variables */ -#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL +/* external functions */ EAPI Ecore_Evas * -ecore_evas_wayland_egl_new(const char *disp_name, int x, int y, int w, int h, int frame) +ecore_evas_wayland_egl_new(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame) { + Ecore_Wl_Window *p = NULL; Evas_Engine_Info_Wayland_Egl *einfo; Ecore_Evas *ee; int method = 0; - static int _win_id = 1; LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!(method = evas_render_method_lookup("wayland_egl"))) + if (!(method = evas_render_method_lookup("wayland_egl"))) { - printf("Render method lookup failed for Wayland Egl"); + ERR("Render method lookup failed for Wayland_Egl"); return NULL; } - if (!ecore_wl_init(disp_name)) + if (!ecore_wl_init(disp_name)) { - printf("Failed to initialize Ecore Wayland"); + ERR("Failed to initialize Ecore_Wayland"); return NULL; } - if (!(ee = calloc(1, sizeof(Ecore_Evas)))) + if (!(ee = calloc(1, sizeof(Ecore_Evas)))) { - printf("Failed to allocate Ecore_Evas."); + ERR("Failed to allocate Ecore_Evas"); ecore_wl_shutdown(); return NULL; } @@ -204,17 +197,22 @@ ecore_evas_wayland_egl_new(const char *disp_name, int x, int y, int w, int h, in if (w < 1) w = 1; if (h < 1) h = 1; - ee->req.x = ee->x = x; - ee->req.y = ee->y = y; - ee->req.w = ee->w = w; - ee->req.h = ee->h = h; + ee->x = x; + ee->y = y; + ee->w = w; + ee->h = h; + ee->req.x = ee->x; + ee->req.y = ee->y; + ee->req.w = ee->w; + ee->req.h = ee->h; ee->rotation = 0; - ee->prop.max.w = ee->prop.max.h = 32767; + ee->prop.max.w = 32767; + ee->prop.max.h = 32767; ee->prop.layer = 4; ee->prop.request_pos = 0; ee->prop.sticky = 0; ee->prop.draw_frame = frame; - ee->prop.window = _win_id++; + ee->alpha = EINA_FALSE; ee->evas = evas_new(); evas_data_attach_set(ee->evas, ee); @@ -222,29 +220,43 @@ ecore_evas_wayland_egl_new(const char *disp_name, int x, int y, int w, int h, in evas_output_size_set(ee->evas, ee->w, ee->h); evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); - if (ee->prop.draw_frame) + /* FIXME: This needs to be set based on theme & scale */ + if (ee->prop.draw_frame) evas_output_framespace_set(ee->evas, 4, 18, 8, 22); - if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas))) + if (parent) + p = ecore_wl_window_find(parent); + + /* FIXME: Get if parent is alpha, and set */ + + ee->engine.wl.parent = p; + ee->engine.wl.win = + ecore_wl_window_new(p, x, y, w, h, ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW); + ee->prop.window = ee->engine.wl.win->id; + + if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas))) { einfo->info.display = ecore_wl_display_get(); + einfo->info.destination_alpha = EINA_FALSE; einfo->info.rotation = ee->rotation; - if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) + if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { - printf("Failed to set Evas Engine Info for '%s'.", ee->driver); + ERR("Failed to set Evas Engine Info for '%s'", ee->driver); ecore_evas_free(ee); + _ecore_evas_wl_shutdown(); + ecore_wl_shutdown(); return NULL; } } else { - printf("Failed to get Evas Engine Info for '%s'.", ee->driver); + ERR("Failed to get Evas Engine Info for '%s'", ee->driver); ecore_evas_free(ee); + _ecore_evas_wl_shutdown(); + ecore_wl_shutdown(); return NULL; } - /* NB: we need to be notified before 'free' so we can munmap the evas - * engine destination */ ecore_evas_callback_pre_free_set(ee, _ecore_evas_wl_pre_free); if (ee->prop.draw_frame) @@ -270,37 +282,28 @@ ecore_evas_wayland_egl_new(const char *disp_name, int x, int y, int w, int h, in /* local functions */ static int -_ecore_evas_wl_init(void) +_ecore_evas_wl_init(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (++_ecore_evas_wl_init_count != 1) return _ecore_evas_wl_init_count; - _ecore_evas_wl_event_handlers[0] = - ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, - _ecore_evas_wl_event_mouse_down, NULL); - _ecore_evas_wl_event_handlers[1] = - ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, - _ecore_evas_wl_event_mouse_up, NULL); - _ecore_evas_wl_event_handlers[2] = - ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, - _ecore_evas_wl_event_mouse_move, NULL); - _ecore_evas_wl_event_handlers[3] = - ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, - _ecore_evas_wl_event_mouse_wheel, NULL); - _ecore_evas_wl_event_handlers[4] = + _ecore_evas_wl_event_hdls[0] = ecore_event_handler_add(ECORE_WL_EVENT_MOUSE_IN, - _ecore_evas_wl_event_mouse_in, NULL); - _ecore_evas_wl_event_handlers[5] = + _ecore_evas_wl_cb_mouse_in, NULL); + _ecore_evas_wl_event_hdls[1] = ecore_event_handler_add(ECORE_WL_EVENT_MOUSE_OUT, - _ecore_evas_wl_event_mouse_out, NULL); - _ecore_evas_wl_event_handlers[6] = + _ecore_evas_wl_cb_mouse_out, NULL); + _ecore_evas_wl_event_hdls[2] = ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_IN, - _ecore_evas_wl_event_focus_in, NULL); - _ecore_evas_wl_event_handlers[7] = + _ecore_evas_wl_cb_focus_in, NULL); + _ecore_evas_wl_event_hdls[3] = ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_OUT, - _ecore_evas_wl_event_focus_out, NULL); + _ecore_evas_wl_cb_focus_out, NULL); + _ecore_evas_wl_event_hdls[4] = + ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_CONFIGURE, + _ecore_evas_wl_cb_window_configure, NULL); ecore_event_evas_init(); @@ -308,7 +311,7 @@ _ecore_evas_wl_init(void) } static int -_ecore_evas_wl_shutdown(void) +_ecore_evas_wl_shutdown(void) { unsigned int i = 0; @@ -317,10 +320,10 @@ _ecore_evas_wl_shutdown(void) if (--_ecore_evas_wl_init_count != 0) return _ecore_evas_wl_init_count; - for (i = 0; i < sizeof(_ecore_evas_wl_event_handlers) / sizeof(Ecore_Event_Handler *); i++) + for (i = 0; i < sizeof(_ecore_evas_wl_event_hdls) / sizeof(Ecore_Event_Handler *); i++) { - if (_ecore_evas_wl_event_handlers[i]) - ecore_event_handler_del(_ecore_evas_wl_event_handlers[i]); + if (_ecore_evas_wl_event_hdls[i]) + ecore_event_handler_del(_ecore_evas_wl_event_hdls[i]); } ecore_event_evas_shutdown(); @@ -338,24 +341,16 @@ _ecore_evas_wl_pre_free(Ecore_Evas *ee) } static void -_ecore_evas_wl_free(Ecore_Evas *ee) +_ecore_evas_wl_free(Ecore_Evas *ee) { LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (ee) - { - /* destroy shell surface */ - if (ee->engine.wl.shell_surface) - wl_shell_surface_destroy(ee->engine.wl.shell_surface); - ee->engine.wl.shell_surface = NULL; + if (ee->engine.wl.win) ecore_wl_window_free(ee->engine.wl.win); + ee->engine.wl.win = NULL; - /* destroy surface */ - if (ee->engine.wl.surface) wl_surface_destroy(ee->engine.wl.surface); - ee->engine.wl.surface = NULL; + ecore_event_window_unregister(ee->prop.window); + ecore_evas_input_event_unregister(ee); - ecore_event_window_unregister(ee->prop.window); - ecore_evas_input_event_unregister(ee); - } _ecore_evas_wl_shutdown(); ecore_wl_shutdown(); } @@ -415,138 +410,131 @@ _ecore_evas_wl_callback_mouse_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee } static void -_ecore_evas_wl_move(Ecore_Evas *ee, int x, int y) +_ecore_evas_wl_callback_mouse_out_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_mouse_out = func; +} + +static void +_ecore_evas_wl_move(Ecore_Evas *ee, int x, int y) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; -// if ((ee->x == x) && (ee->y == y)) return; ee->req.x = x; ee->req.y = y; - ee->x = x; ee->y = y; - if (ee->engine.wl.shell_surface) - { - wl_shell_surface_move(ee->engine.wl.shell_surface, - ecore_wl_input_device_get(), - _ecore_evas_wl_btn_timestamp); - } + if (ee->engine.wl.win) ecore_wl_window_move(ee->engine.wl.win, x, y); if (ee->func.fn_move) ee->func.fn_move(ee); } static void -_ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h) +_ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; if (w < 1) w = 1; if (h < 1) h = 1; - if ((ee->w == w) && (ee->h == h)) return; +// if ((ee->w == w) && (ee->h == h)) return; + + if (ee->prop.min.w > w) w = ee->prop.min.w; + else if (w > ee->prop.max.w) w = ee->prop.max.w; + if (ee->prop.min.h > h) h = ee->prop.min.h; + else if (h > ee->prop.max.h) h = ee->prop.max.h; ee->req.w = w; ee->req.h = h; - /* if (ee->visible) */ - /* { */ - /* damage old surface, if it exists */ - - /* NB: This removes any lingering screen artifacts in the compositor. - * This may be a 'HACK' if the issue is actually in the wayland - * compositor, but for now lets implement this so we don't have screen - * artifacts laying around during a resize */ - /* if (ee->engine.wl.surface) */ - /* wl_surface_damage(ee->engine.wl.surface, 0, 0, ee->w, ee->h); */ - /* } */ +// ecore_wl_window_damage(ee->engine.wl.win, 0, 0, ee->w, ee->h); ee->w = w; ee->h = h; -// ecore_wl_flush(); - + /* change evas output & viewport sizes */ evas_output_size_set(ee->evas, ee->w, ee->h); evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); if (ee->engine.wl.frame) evas_object_resize(ee->engine.wl.frame, ee->w, ee->h); - /* if ((ee->visible) && (ee->engine.wl.surface)) */ - /* wl_surface_damage(ee->engine.wl.surface, 0, 0, ee->w, ee->h); */ + /* set new engine destination */ + /* evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); */ + + /* ecore_wl_window_damage(ee->engine.wl.win, 0, 0, ee->w, ee->h); */ + ecore_wl_flush(); + + ecore_wl_window_update_size(ee->engine.wl.win, ee->w, ee->h); if (ee->func.fn_resize) ee->func.fn_resize(ee); } static void -_ecore_evas_wl_show(Ecore_Evas *ee) +_ecore_evas_wl_show(Ecore_Evas *ee) { Evas_Engine_Info_Wayland_Egl *einfo; LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!ee) return; - if (ee->visible) return; - - einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas); + if ((!ee) || (ee->visible)) return; - /* create new surface */ - ee->engine.wl.surface = - wl_compositor_create_surface(ecore_wl_compositor_get()); - wl_surface_set_user_data(ee->engine.wl.surface, (void *)ee->prop.window); + if (ee->engine.wl.win) + { + ecore_wl_window_show(ee->engine.wl.win); + ecore_wl_flush(); + } - /* create new shell surface */ - ee->engine.wl.shell_surface = - wl_shell_get_shell_surface(ecore_wl_shell_get(), ee->engine.wl.surface); + einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas); + if (!einfo) + { + ERR("Failed to get Evas Engine Info for '%s'", ee->driver); + return; + } - /* set the engine surface here. This should trigger an egl window create */ - einfo->info.surface = ee->engine.wl.surface; + einfo->info.surface = ecore_wl_window_surface_get(ee->engine.wl.win); evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); - /* add listener for configure events (happen on shell surface resize) */ - wl_shell_surface_add_listener(ee->engine.wl.shell_surface, - &_ecore_evas_wl_shell_surface_listener, ee); - - /* Raise this surface to the top */ - wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); - if (ee->engine.wl.frame) { evas_object_show(ee->engine.wl.frame); evas_object_resize(ee->engine.wl.frame, ee->w, ee->h); } - ecore_wl_flush(); + /* ecore_wl_window_buffer_attach(ee->engine.wl.win, ee->engine.wl.buffer, 0, 0); */ ee->visible = 1; if (ee->func.fn_show) ee->func.fn_show(ee); } static void -_ecore_evas_wl_hide(Ecore_Evas *ee) +_ecore_evas_wl_hide(Ecore_Evas *ee) { Evas_Engine_Info_Wayland_Egl *einfo; LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!ee) return; - if (!ee->visible) return; - - /* get engine info */ - einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas); - einfo->info.surface = NULL; - evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); + if ((!ee) || (!ee->visible)) return; - /* destroy shell surface */ - if (ee->engine.wl.shell_surface) - wl_shell_surface_destroy(ee->engine.wl.shell_surface); - ee->engine.wl.shell_surface = NULL; + if (ee->engine.wl.win) + { + ecore_wl_window_hide(ee->engine.wl.win); + ecore_wl_flush(); + } - /* destroy surface */ - if (ee->engine.wl.surface) wl_surface_destroy(ee->engine.wl.surface); - ee->engine.wl.surface = NULL; + einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas); + if (einfo) + { + einfo->info.surface = NULL; + evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); + } ee->visible = 0; ee->should_be_visible = 0; + if (ee->func.fn_hide) ee->func.fn_hide(ee); } @@ -556,39 +544,18 @@ _ecore_evas_wl_raise(Ecore_Evas *ee) LOGFN(__FILE__, __LINE__, __FUNCTION__); if ((!ee) || (!ee->visible)) return; - if (!ee->engine.wl.shell_surface) return; - wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); -} - -static void -_ecore_evas_wl_lower(Ecore_Evas *ee) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if ((!ee) || (!ee->visible)) return; - /* FIXME: Need a way to tell Wayland to lower */ -} - -static void -_ecore_evas_wl_activate(Ecore_Evas *ee) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if ((!ee) || (!ee->visible)) return; - if (!ee->engine.wl.shell_surface) return; - wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); + ecore_wl_window_raise(ee->engine.wl.win); } static void -_ecore_evas_wl_title_set(Ecore_Evas *ee, const char *t) +_ecore_evas_wl_title_set(Ecore_Evas *ee, const char *title) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; if (ee->prop.title) free(ee->prop.title); ee->prop.title = NULL; - if (t) ee->prop.title = strdup(t); - + if (title) ee->prop.title = strdup(title); if ((ee->prop.draw_frame) && (ee->engine.wl.frame)) { EE_Wl_Smart_Data *sd; @@ -666,106 +633,101 @@ _ecore_evas_wl_size_step_set(Ecore_Evas *ee, int w, int h) } static void -_ecore_evas_wl_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y) +_ecore_evas_wl_layer_set(Ecore_Evas *ee, int layer) { - int x = 0, y = 0; - LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; - if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); - ee->prop.cursor.object = NULL; - - if (!obj) - { - ee->prop.cursor.layer = 0; - ee->prop.cursor.hot.x = 0; - ee->prop.cursor.hot.y = 0; - return; - } - - ee->prop.cursor.object = obj; - ee->prop.cursor.layer = layer; - ee->prop.cursor.hot.x = hot_x; - ee->prop.cursor.hot.y = hot_y; - - evas_pointer_output_xy_get(ee->evas, &x, &y); - evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer); - evas_object_move(ee->prop.cursor.object, - x - ee->prop.cursor.hot.x, y - ee->prop.cursor.hot.y); - evas_object_pass_events_set(ee->prop.cursor.object, 1); - if (evas_pointer_inside_get(ee->evas)) - evas_object_show(ee->prop.cursor.object); - - evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, - _ecore_evas_wl_object_cursor_del, ee); + if (ee->prop.layer == layer) return; + if (layer < 1) layer = 1; + else if (layer > 255) layer = 255; + ee->prop.layer = layer; } static void -_ecore_evas_wl_object_cursor_del(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_ecore_evas_wl_iconified_set(Ecore_Evas *ee, int iconify) { - Ecore_Evas *ee; + LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!(ee = data)) return; - ee->prop.cursor.object = NULL; + if (!ee) return; + if (ee->prop.iconified == iconify) return; + ee->prop.iconified = iconify; + /* FIXME: Implement this in Wayland someshow */ } static void -_ecore_evas_wl_layer_set(Ecore_Evas *ee, int layer) +_ecore_evas_wl_maximized_set(Ecore_Evas *ee, int max) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; - if (ee->prop.layer == layer) return; - if (layer < 1) layer = 1; - else if (layer > 255) layer = 255; - ee->prop.layer = layer; + if (ee->prop.maximized == max) return; + ee->prop.maximized = max; + ecore_wl_window_maximized_set(ee->engine.wl.win, max); } static void -_ecore_evas_wl_focus_set(Ecore_Evas *ee, int focus __UNUSED__) +_ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if ((!ee) || (!ee->visible)) return; - if (!ee->engine.wl.shell_surface) return; - wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); + if (ee->prop.fullscreen == full) return; + ee->prop.fullscreen = full; + ecore_wl_window_fullscreen_set(ee->engine.wl.win, full); } static void -_ecore_evas_wl_iconified_set(Ecore_Evas *ee, int iconify) +_ecore_evas_wl_ignore_events_set(Ecore_Evas *ee, int ignore) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; - if (ee->prop.iconified == iconify) return; - ee->prop.iconified = iconify; - /* FIXME: Implement this in Wayland someshow */ + ee->ignore_events = ignore; + /* NB: Hmmm, may need to pass this to ecore_wl_window in the future */ } static void -_ecore_evas_wl_maximized_set(Ecore_Evas *ee, int max) +_ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha) { + Evas_Engine_Info_Wayland_Egl *einfo; + LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; - if (ee->prop.maximized == max) return; - ee->prop.maximized = max; - /* FIXME: Implement this in Wayland someshow */ + if ((ee->alpha == alpha)) return; + ee->alpha = alpha; + if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas))) + { + einfo->info.destination_alpha = alpha; + if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) + ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); + } } static void -_ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full __UNUSED__) +_ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent) { + Evas_Engine_Info_Wayland_Egl *einfo; + LOGFN(__FILE__, __LINE__, __FUNCTION__); - if ((!ee) || (!ee->visible)) return; - if (!ee->engine.wl.shell_surface) return; - wl_shell_surface_set_fullscreen(ee->engine.wl.shell_surface); + if (!ee) return; + if ((ee->transparent == transparent)) return; + ee->transparent = transparent; + if (!ee->visible) return; + if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas))) + { + einfo->info.destination_alpha = transparent; + if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) + ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); + } } static int -_ecore_evas_wl_render(Ecore_Evas *ee) +_ecore_evas_wl_render(Ecore_Evas *ee) { int rend = 0; @@ -789,26 +751,24 @@ _ecore_evas_wl_render(Ecore_Evas *ee) if ((updates = evas_render_updates(ee->evas))) { - /* if (ee->engine.wl.surface) */ - /* { */ - /* Eina_List *l = NULL; */ - /* Eina_Rectangle *r; */ + Eina_List *l = NULL; + Eina_Rectangle *r; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); - /* EINA_LIST_FOREACH(updates, l, r) */ - /* wl_surface_damage(ee->engine.wl.surface, */ - /* r->x, r->y, r->w, r->h); */ - /* } */ + EINA_LIST_FOREACH(updates, l, r) + ecore_wl_window_damage(ee->engine.wl.win, + r->x, r->y, r->w, r->h); + + ecore_wl_flush(); evas_render_updates_free(updates); _ecore_evas_idle_timeout_update(ee); rend = 1; - - ecore_wl_flush(); } if (ee->func.fn_post_render) ee->func.fn_post_render(ee); } - return rend; } @@ -822,77 +782,18 @@ _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int ecore_wl_screen_size_get(w, h); } -static Eina_Bool -_ecore_evas_wl_event_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *event) -{ - Ecore_Evas *ee; - Ecore_Event_Mouse_Button *ev; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - ev = event; - _ecore_evas_wl_btn_timestamp = ev->timestamp; - ee = ecore_event_window_match(ev->window); - if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; - evas_event_feed_mouse_down(ee->evas, ev->buttons, ev->modifiers, - ev->timestamp, NULL); - return ECORE_CALLBACK_PASS_ON; -} - -static Eina_Bool -_ecore_evas_wl_event_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *event) -{ - Ecore_Evas *ee; - Ecore_Event_Mouse_Button *ev; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - ev = event; - ee = ecore_event_window_match(ev->window); - if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; - evas_event_feed_mouse_up(ee->evas, ev->buttons, ev->modifiers, - ev->timestamp, NULL); - return ECORE_CALLBACK_PASS_ON; -} - -static Eina_Bool -_ecore_evas_wl_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event) -{ - Ecore_Evas *ee; - Ecore_Event_Mouse_Move *ev; - - ev = event; - ee = ecore_event_window_match(ev->window); - if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; - ee->mouse.x = ev->x; - ee->mouse.y = ev->y; - evas_event_feed_mouse_move(ee->evas, ev->x, ev->y, ev->timestamp, NULL); - _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->timestamp); - return ECORE_CALLBACK_PASS_ON; -} - -static Eina_Bool -_ecore_evas_wl_event_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *event) +void +_ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location) { - Ecore_Evas *ee; - Ecore_Event_Mouse_Wheel *ev; - LOGFN(__FILE__, __LINE__, __FUNCTION__); - ev = event; - ee = ecore_event_window_match(ev->window); - if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; - evas_event_feed_mouse_wheel(ee->evas, ev->direction, ev->z, - ev->timestamp, NULL); - return ECORE_CALLBACK_PASS_ON; + if (!ee) return; + if (ee->engine.wl.win) + ecore_wl_window_resize(ee->engine.wl.win, ee->w, ee->h, location); } static Eina_Bool -_ecore_evas_wl_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event) +_ecore_evas_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event) { Ecore_Evas *ee; Ecore_Wl_Event_Mouse_In *ev; @@ -900,18 +801,18 @@ _ecore_evas_wl_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void * LOGFN(__FILE__, __LINE__, __FUNCTION__); ev = event; - ee = ecore_event_window_match(ev->window); + ee = ecore_event_window_match(ev->win); if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; + if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee); ecore_event_evas_modifier_lock_update(ee->evas, ev->modifiers); - evas_event_feed_mouse_in(ee->evas, ev->time, NULL); - _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->time); + evas_event_feed_mouse_in(ee->evas, ev->timestamp, NULL); + _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->timestamp); return ECORE_CALLBACK_PASS_ON; } static Eina_Bool -_ecore_evas_wl_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event) +_ecore_evas_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event) { Ecore_Evas *ee; Ecore_Wl_Event_Mouse_Out *ev; @@ -919,19 +820,19 @@ _ecore_evas_wl_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void LOGFN(__FILE__, __LINE__, __FUNCTION__); ev = event; - ee = ecore_event_window_match(ev->window); + ee = ecore_event_window_match(ev->win); if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; + if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; ecore_event_evas_modifier_lock_update(ee->evas, ev->modifiers); - _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->time); - evas_event_feed_mouse_out(ee->evas, ev->time, NULL); + _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->timestamp); + evas_event_feed_mouse_out(ee->evas, ev->timestamp, NULL); if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee); if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object); return ECORE_CALLBACK_PASS_ON; } static Eina_Bool -_ecore_evas_wl_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event) +_ecore_evas_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event) { Ecore_Evas *ee; Ecore_Wl_Event_Focus_In *ev; @@ -939,9 +840,9 @@ _ecore_evas_wl_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void * LOGFN(__FILE__, __LINE__, __FUNCTION__); ev = event; - ee = ecore_event_window_match(ev->window); + ee = ecore_event_window_match(ev->win); if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; + if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; ee->prop.focused = 1; evas_focus_in(ee->evas); if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee); @@ -949,45 +850,51 @@ _ecore_evas_wl_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void * } static Eina_Bool -_ecore_evas_wl_event_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event) +_ecore_evas_wl_cb_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event) { Ecore_Evas *ee; - Ecore_Wl_Event_Focus_Out *ev; + Ecore_Wl_Event_Focus_In *ev; LOGFN(__FILE__, __LINE__, __FUNCTION__); ev = event; - ee = ecore_event_window_match(ev->window); + ee = ecore_event_window_match(ev->win); if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; + if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; evas_focus_out(ee->evas); ee->prop.focused = 0; if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee); return ECORE_CALLBACK_PASS_ON; } -static void -_ecore_evas_wl_handle_configure(void *data, struct wl_shell_surface *shell_surface, uint32_t timestamp __UNUSED__, uint32_t edges __UNUSED__, int32_t width, int32_t height) +static Eina_Bool +_ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, void *event) { Ecore_Evas *ee; + Ecore_Wl_Event_Window_Configure *ev; - /* NB: Trap to prevent compositor from crashing */ - if ((width <= 0) || (height <= 0)) return; - - if (!(ee = data)) return; + LOGFN(__FILE__, __LINE__, __FUNCTION__); - printf("EGL Handle Configure Message\n"); - if ((shell_surface) && (ee->engine.wl.shell_surface)) + ev = event; + ee = ecore_event_window_match(ev->win); + if (!ee) return ECORE_CALLBACK_PASS_ON; + if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; + if ((ee->x != ev->x) || (ee->y != ev->y)) { - if (ee->engine.wl.shell_surface != shell_surface) return; - ecore_evas_resize(ee, width, height); + ee->x = ev->x; + ee->y = ev->y; + ee->req.x = ee->x; + ee->req.y = ee->y; + if (ee->func.fn_move) ee->func.fn_move(ee); + } + if ((ee->req.w != ev->w) || (ee->req.h != ev->h)) + { + ee->req.w = ev->w; + ee->req.h = ev->h; + if (ee->func.fn_resize) ee->func.fn_resize(ee); } -} - -static void -_ecore_evas_wl_handle_popup_done(void *data __UNUSED__, struct wl_shell_surface *shell_surface __UNUSED__) -{ + return ECORE_CALLBACK_PASS_ON; } static void @@ -1101,30 +1008,9 @@ _ecore_evas_wl_frame_add(Evas *evas) return evas_object_smart_add(evas, _ecore_evas_wl_smart); } -void -_ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if ((!ee) || (!ee->engine.wl.shell_surface)) return; - wl_shell_surface_resize(ee->engine.wl.shell_surface, - ecore_wl_input_device_get(), - _ecore_evas_wl_btn_timestamp, location); -} - -void -_ecore_evas_wayland_egl_drag_start(Ecore_Evas *ee, Ecore_Evas *drag_ee, void *source) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if ((!ee) || (!ee->engine.wl.surface)) return; - if ((!source) || (!drag_ee)) return; - ecore_wl_drag_start(source, ee->engine.wl.surface, drag_ee->engine.wl.buffer); -} - #else EAPI Ecore_Evas * -ecore_evas_wayland_egl_new(const char *disp_name __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__, int frame __UNUSED__) +ecore_evas_wayland_egl_new(const char *disp_name __UNUSED__, unsigned int parent __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__, Eina_Bool frame __UNUSED__) { return NULL; } diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c index e3b15c8..4c7ee2d 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c @@ -2,7 +2,7 @@ # include "config.h" #endif -//#define LOGFNS 1 +#define LOGFNS 1 #ifdef LOGFNS # include @@ -20,12 +20,12 @@ # include #endif -# include -# include -# include +#include +#include +#include -# include "ecore_evas_private.h" -# include "Ecore_Evas.h" +#include "ecore_evas_private.h" +#include "Ecore_Evas.h" #ifdef BUILD_ECORE_EVAS_WAYLAND_SHM # include @@ -51,41 +51,34 @@ static void _ecore_evas_wl_callback_delete_request_set(Ecore_Evas *ee, void (*fu static void _ecore_evas_wl_callback_focus_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); static void _ecore_evas_wl_callback_focus_out_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); static void _ecore_evas_wl_callback_mouse_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); +static void _ecore_evas_wl_callback_mouse_out_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); static void _ecore_evas_wl_move(Ecore_Evas *ee, int x, int y); static void _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h); static void _ecore_evas_wl_show(Ecore_Evas *ee); static void _ecore_evas_wl_hide(Ecore_Evas *ee); static void _ecore_evas_wl_raise(Ecore_Evas *ee); -static void _ecore_evas_wl_lower(Ecore_Evas *ee); -static void _ecore_evas_wl_activate(Ecore_Evas *ee); -static void _ecore_evas_wl_title_set(Ecore_Evas *ee, const char *t); +static void _ecore_evas_wl_title_set(Ecore_Evas *ee, const char *title); static void _ecore_evas_wl_name_class_set(Ecore_Evas *ee, const char *n, const char *c); static void _ecore_evas_wl_size_min_set(Ecore_Evas *ee, int w, int h); static void _ecore_evas_wl_size_max_set(Ecore_Evas *ee, int w, int h); static void _ecore_evas_wl_size_base_set(Ecore_Evas *ee, int w, int h); static void _ecore_evas_wl_size_step_set(Ecore_Evas *ee, int w, int h); -static void _ecore_evas_wl_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y); -static void _ecore_evas_wl_object_cursor_del(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__); static void _ecore_evas_wl_layer_set(Ecore_Evas *ee, int layer); -static void _ecore_evas_wl_focus_set(Ecore_Evas *ee, int focus __UNUSED__); static void _ecore_evas_wl_iconified_set(Ecore_Evas *ee, int iconify); static void _ecore_evas_wl_maximized_set(Ecore_Evas *ee, int max); -static void _ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full __UNUSED__); +static void _ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full); +static void _ecore_evas_wl_ignore_events_set(Ecore_Evas *ee, int ignore); +static void _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha); +static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent); static int _ecore_evas_wl_render(Ecore_Evas *ee); static void _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h); static void _ecore_evas_wl_buffer_new(Ecore_Evas *ee, void **dest); -static Eina_Bool _ecore_evas_wl_event_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event); -static Eina_Bool _ecore_evas_wl_event_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event); - -static void _ecore_evas_wl_handle_configure(void *data, struct wl_shell_surface *shell_surface __UNUSED__, uint32_t timestamp __UNUSED__, uint32_t edges __UNUSED__, int32_t width, int32_t height); -static void _ecore_evas_wl_handle_popup_done(void *data __UNUSED__, struct wl_shell_surface *shell_surface __UNUSED__); +static Eina_Bool _ecore_evas_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _ecore_evas_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _ecore_evas_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _ecore_evas_wl_cb_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event); +static Eina_Bool _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, void *event); /* SMART stuff for frame */ static Evas_Smart *_ecore_evas_wl_smart = NULL; @@ -101,95 +94,94 @@ static Evas_Object *_ecore_evas_wl_frame_add(Evas *evas); /* local variables */ static int _ecore_evas_wl_init_count = 0; -static Ecore_Event_Handler *_ecore_evas_wl_event_handlers[8]; -static uint32_t _ecore_evas_wl_btn_timestamp; -static const struct wl_shell_surface_listener _ecore_evas_wl_shell_surface_listener = -{ - _ecore_evas_wl_handle_configure, - _ecore_evas_wl_handle_popup_done -}; +static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[5]; static Ecore_Evas_Engine_Func _ecore_wl_engine_func = { - _ecore_evas_wl_free, - _ecore_evas_wl_callback_resize_set, - _ecore_evas_wl_callback_move_set, - NULL, // callback show set - NULL, // callback hide set - _ecore_evas_wl_callback_delete_request_set, - NULL, // callback destroy set - _ecore_evas_wl_callback_focus_in_set, - _ecore_evas_wl_callback_focus_out_set, - _ecore_evas_wl_callback_mouse_in_set, - NULL, // callback mouse out set - NULL, // callback sticky set - NULL, // callback unsticky set - NULL, // callback pre render set - NULL, // callback post render set - _ecore_evas_wl_move, - NULL, // func managed move - _ecore_evas_wl_resize, - NULL, // func move_resize - NULL, // func rotation set - NULL, // func shaped set - _ecore_evas_wl_show, - _ecore_evas_wl_hide, - _ecore_evas_wl_raise, - _ecore_evas_wl_lower, - _ecore_evas_wl_activate, - _ecore_evas_wl_title_set, - _ecore_evas_wl_name_class_set, - _ecore_evas_wl_size_min_set, - _ecore_evas_wl_size_max_set, - _ecore_evas_wl_size_base_set, - _ecore_evas_wl_size_step_set, - _ecore_evas_wl_object_cursor_set, - _ecore_evas_wl_layer_set, - _ecore_evas_wl_focus_set, - _ecore_evas_wl_iconified_set, - NULL, // func borderless set - NULL, // func override set - _ecore_evas_wl_maximized_set, - _ecore_evas_wl_fullscreen_set, + _ecore_evas_wl_free, + _ecore_evas_wl_callback_resize_set, + _ecore_evas_wl_callback_move_set, + NULL, + NULL, + _ecore_evas_wl_callback_delete_request_set, + NULL, + _ecore_evas_wl_callback_focus_in_set, + _ecore_evas_wl_callback_focus_out_set, + _ecore_evas_wl_callback_mouse_in_set, + _ecore_evas_wl_callback_mouse_out_set, + NULL, // sticky_set + NULL, // unsticky_set + NULL, // pre_render_set + NULL, // post_render_set + _ecore_evas_wl_move, + NULL, // managed_move + _ecore_evas_wl_resize, + NULL, // move_resize + NULL, // rotation_set + NULL, // shaped_set + _ecore_evas_wl_show, + _ecore_evas_wl_hide, + _ecore_evas_wl_raise, + NULL, // lower + NULL, // activate + _ecore_evas_wl_title_set, + _ecore_evas_wl_name_class_set, + _ecore_evas_wl_size_min_set, + _ecore_evas_wl_size_max_set, + _ecore_evas_wl_size_base_set, + _ecore_evas_wl_size_step_set, + NULL, // object_cursor_set + _ecore_evas_wl_layer_set, + NULL, // focus set + _ecore_evas_wl_iconified_set, + NULL, // borderless set + NULL, // override set + _ecore_evas_wl_maximized_set, + _ecore_evas_wl_fullscreen_set, NULL, // func avoid_damage set NULL, // func withdrawn set NULL, // func sticky set - NULL, // func ignore_events set - NULL, // func alpha set - NULL, // func transparent set + _ecore_evas_wl_ignore_events_set, + _ecore_evas_wl_alpha_set, + _ecore_evas_wl_transparent_set, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, _ecore_evas_wl_render, _ecore_evas_wl_screen_geometry_get }; /* external variables */ -#endif -#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM +/* external functions */ EAPI Ecore_Evas * -ecore_evas_wayland_shm_new(const char *disp_name, int x, int y, int w, int h, int frame) +ecore_evas_wayland_shm_new(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame) { + Ecore_Wl_Window *p = NULL; Evas_Engine_Info_Wayland_Shm *einfo; Ecore_Evas *ee; int method = 0; - static int _win_id = 1; LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!(method = evas_render_method_lookup("wayland_shm"))) + if (!(method = evas_render_method_lookup("wayland_shm"))) { - ERR("Render method lookup failed."); + ERR("Render method lookup failed for Wayland_Shm"); return NULL; } - if (!(ecore_wl_init(disp_name))) + if (!ecore_wl_init(disp_name)) { - ERR("Failed to initialize Ecore Wayland."); + ERR("Failed to initialize Ecore_Wayland"); return NULL; } - if (!(ee = calloc(1, sizeof(Ecore_Evas)))) + if (!(ee = calloc(1, sizeof(Ecore_Evas)))) { - ERR("Failed to allocate Ecore_Evas."); + ERR("Failed to allocate Ecore_Evas"); ecore_wl_shutdown(); return NULL; } @@ -206,17 +198,21 @@ ecore_evas_wayland_shm_new(const char *disp_name, int x, int y, int w, int h, in if (w < 1) w = 1; if (h < 1) h = 1; - ee->req.x = ee->x = x; - ee->req.y = ee->y = y; - ee->req.w = ee->w = w; - ee->req.h = ee->h = h; + ee->x = x; + ee->y = y; + ee->w = w; + ee->h = h; + ee->req.x = ee->x; + ee->req.y = ee->y; + ee->req.w = ee->w; + ee->req.h = ee->h; ee->rotation = 0; - ee->prop.max.w = ee->prop.max.h = 32767; + ee->prop.max.w = 32767; + ee->prop.max.h = 32767; ee->prop.layer = 4; ee->prop.request_pos = 0; ee->prop.sticky = 0; ee->prop.draw_frame = frame; - ee->prop.window = _win_id++; ee->evas = evas_new(); evas_data_attach_set(ee->evas, ee); @@ -224,29 +220,42 @@ ecore_evas_wayland_shm_new(const char *disp_name, int x, int y, int w, int h, in evas_output_size_set(ee->evas, ee->w, ee->h); evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); - if (ee->prop.draw_frame) + /* FIXME: This needs to be set based on theme & scale */ + if (ee->prop.draw_frame) evas_output_framespace_set(ee->evas, 4, 18, 8, 22); - if ((einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas))) + if (parent) + p = ecore_wl_window_find(parent); + + /* FIXME: Get if parent is alpha, and set */ + + ee->engine.wl.parent = p; + ee->engine.wl.win = + ecore_wl_window_new(p, x, y, w, h, ECORE_WL_WINDOW_BUFFER_TYPE_SHM); + ee->prop.window = ee->engine.wl.win->id; + + if ((einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas))) { einfo->info.rotation = ee->rotation; einfo->info.debug = EINA_FALSE; - if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) + if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { - ERR("Failed to set Evas Engine Info for '%s'.", ee->driver); + ERR("Failed to set Evas Engine Info for '%s'", ee->driver); ecore_evas_free(ee); + _ecore_evas_wl_shutdown(); + ecore_wl_shutdown(); return NULL; } } else { - ERR("Failed to get Evas Engine Info for '%s'.", ee->driver); + ERR("Failed to get Evas Engine Info for '%s'", ee->driver); ecore_evas_free(ee); + _ecore_evas_wl_shutdown(); + ecore_wl_shutdown(); return NULL; } - /* NB: we need to be notified before 'free' so we can munmap the evas - * engine destination */ ecore_evas_callback_pre_free_set(ee, _ecore_evas_wl_pre_free); if (ee->prop.draw_frame) @@ -279,30 +288,21 @@ _ecore_evas_wl_init(void) if (++_ecore_evas_wl_init_count != 1) return _ecore_evas_wl_init_count; - _ecore_evas_wl_event_handlers[0] = - ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, - _ecore_evas_wl_event_mouse_down, NULL); - _ecore_evas_wl_event_handlers[1] = - ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, - _ecore_evas_wl_event_mouse_up, NULL); - _ecore_evas_wl_event_handlers[2] = - ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, - _ecore_evas_wl_event_mouse_move, NULL); - _ecore_evas_wl_event_handlers[3] = - ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, - _ecore_evas_wl_event_mouse_wheel, NULL); - _ecore_evas_wl_event_handlers[4] = + _ecore_evas_wl_event_hdls[0] = ecore_event_handler_add(ECORE_WL_EVENT_MOUSE_IN, - _ecore_evas_wl_event_mouse_in, NULL); - _ecore_evas_wl_event_handlers[5] = + _ecore_evas_wl_cb_mouse_in, NULL); + _ecore_evas_wl_event_hdls[1] = ecore_event_handler_add(ECORE_WL_EVENT_MOUSE_OUT, - _ecore_evas_wl_event_mouse_out, NULL); - _ecore_evas_wl_event_handlers[6] = + _ecore_evas_wl_cb_mouse_out, NULL); + _ecore_evas_wl_event_hdls[2] = ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_IN, - _ecore_evas_wl_event_focus_in, NULL); - _ecore_evas_wl_event_handlers[7] = + _ecore_evas_wl_cb_focus_in, NULL); + _ecore_evas_wl_event_hdls[3] = ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_OUT, - _ecore_evas_wl_event_focus_out, NULL); + _ecore_evas_wl_cb_focus_out, NULL); + _ecore_evas_wl_event_hdls[4] = + ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_CONFIGURE, + _ecore_evas_wl_cb_window_configure, NULL); ecore_event_evas_init(); @@ -319,10 +319,10 @@ _ecore_evas_wl_shutdown(void) if (--_ecore_evas_wl_init_count != 0) return _ecore_evas_wl_init_count; - for (i = 0; i < sizeof(_ecore_evas_wl_event_handlers) / sizeof(Ecore_Event_Handler *); i++) + for (i = 0; i < sizeof(_ecore_evas_wl_event_hdls) / sizeof(Ecore_Event_Handler *); i++) { - if (_ecore_evas_wl_event_handlers[i]) - ecore_event_handler_del(_ecore_evas_wl_event_handlers[i]); + if (_ecore_evas_wl_event_hdls[i]) + ecore_event_handler_del(_ecore_evas_wl_event_hdls[i]); } ecore_event_evas_shutdown(); @@ -337,17 +337,15 @@ _ecore_evas_wl_pre_free(Ecore_Evas *ee) LOGFN(__FILE__, __LINE__, __FUNCTION__); - /* destroy frame */ if (ee->engine.wl.frame) evas_object_del(ee->engine.wl.frame); - /* get engine info */ einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas); if ((einfo) && (einfo->info.dest)) { int ret = 0; - /* munmap previous engine destination */ ret = munmap(einfo->info.dest, ((ee->w * sizeof(int)) * ee->h)); + if (!ret) ERR("Failed to unmap engine destination: %m"); } } @@ -356,18 +354,11 @@ _ecore_evas_wl_free(Ecore_Evas *ee) { LOGFN(__FILE__, __LINE__, __FUNCTION__); - /* destroy buffer */ if (ee->engine.wl.buffer) wl_buffer_destroy(ee->engine.wl.buffer); ee->engine.wl.buffer = NULL; - /* destroy shell surface */ - if (ee->engine.wl.shell_surface) - wl_shell_surface_destroy(ee->engine.wl.shell_surface); - ee->engine.wl.shell_surface = NULL; - - /* destroy surface */ - if (ee->engine.wl.surface) wl_surface_destroy(ee->engine.wl.surface); - ee->engine.wl.surface = NULL; + if (ee->engine.wl.win) ecore_wl_window_free(ee->engine.wl.win); + ee->engine.wl.win = NULL; ecore_event_window_unregister(ee->prop.window); ecore_evas_input_event_unregister(ee); @@ -431,25 +422,25 @@ _ecore_evas_wl_callback_mouse_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee } static void -_ecore_evas_wl_move(Ecore_Evas *ee, int x, int y) +_ecore_evas_wl_callback_mouse_out_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_mouse_out = func; +} + +static void +_ecore_evas_wl_move(Ecore_Evas *ee, int x, int y) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; -// if ((ee->x == x) && (ee->y == y)) return; ee->req.x = x; ee->req.y = y; - ee->x = x; ee->y = y; - - if (ee->engine.wl.shell_surface) - { - wl_shell_surface_move(ee->engine.wl.shell_surface, - ecore_wl_input_device_get(), - _ecore_evas_wl_btn_timestamp); - } - + if (ee->engine.wl.win) ecore_wl_window_move(ee->engine.wl.win, x, y); if (ee->func.fn_move) ee->func.fn_move(ee); } @@ -458,49 +449,44 @@ _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h) { Evas_Engine_Info_Wayland_Shm *einfo; - LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!ee) return; if (w < 1) w = 1; if (h < 1) h = 1; - if ((ee->w == w) && (ee->h == h)) return; +// if ((ee->w == w) && (ee->h == h)) return; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (ee->prop.min.w > w) w = ee->prop.min.w; + else if (w > ee->prop.max.w) w = ee->prop.max.w; + if (ee->prop.min.h > h) h = ee->prop.min.h; + else if (h > ee->prop.max.h) h = ee->prop.max.h; ee->req.w = w; ee->req.h = h; - if (ee->visible) - { - /* damage old surface, if it exists */ - - /* NB: This removes any lingering screen artifacts in the compositor. - * This may be a 'HACK' if the issue is actually in the wayland - * compositor, but for now lets implement this so we don't have screen - * artifacts laying around during a resize */ - if (ee->engine.wl.surface) - wl_surface_damage(ee->engine.wl.surface, 0, 0, ee->w, ee->h); - } +// ecore_wl_window_damage(ee->engine.wl.win, 0, 0, ee->w, ee->h); - /* get engine info */ einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas); - if (einfo->info.dest) + if ((einfo) && (einfo->info.dest)) { int ret = 0; - /* munmap previous engine destination */ ret = munmap(einfo->info.dest, ((ee->w * sizeof(int)) * ee->h)); + if (!ret) ERR("Failed to unmap engine destination: %m"); + } + else if (!einfo) + { + ERR("Failed to get Evas Engine Info for '%s'", ee->driver); + return; } - /* free old buffer */ if (ee->engine.wl.buffer) wl_buffer_destroy(ee->engine.wl.buffer); ee->engine.wl.buffer = NULL; ee->w = w; ee->h = h; - /* create buffer @ new size (also mmaps the new destination) */ _ecore_evas_wl_buffer_new(ee, &einfo->info.dest); - - /* flush new buffer fd */ ecore_wl_flush(); /* change evas output & viewport sizes */ @@ -514,16 +500,13 @@ _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h) evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); /* damage buffer */ - wl_buffer_damage(ee->engine.wl.buffer, 0, 0, ee->w, ee->h); +// wl_buffer_damage(ee->engine.wl.buffer, 0, 0, ee->w, ee->h); - if (ee->visible) - { - /* damage surface */ - wl_surface_damage(ee->engine.wl.surface, 0, 0, ee->w, ee->h); + ecore_wl_window_buffer_attach(ee->engine.wl.win, ee->engine.wl.buffer, 0, 0); + /* ecore_wl_window_damage(ee->engine.wl.win, 0, 0, ee->w, ee->h); */ + /* ecore_wl_flush(); */ - /* if visible, attach to surface */ - wl_surface_attach(ee->engine.wl.surface, ee->engine.wl.buffer, 0, 0); - } + ecore_wl_window_update_size(ee->engine.wl.win, ee->w, ee->h); if (ee->func.fn_resize) ee->func.fn_resize(ee); } @@ -535,93 +518,64 @@ _ecore_evas_wl_show(Ecore_Evas *ee) LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!ee) return; - if (ee->visible) return; + if ((!ee) || (ee->visible)) return; - /* get engine info */ - einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas); - - /* create new surface */ - ee->engine.wl.surface = - wl_compositor_create_surface(ecore_wl_compositor_get()); - wl_surface_set_user_data(ee->engine.wl.surface, (void *)ee->prop.window); + if (ee->engine.wl.win) + ecore_wl_window_show(ee->engine.wl.win); - /* get new shell surface */ - ee->engine.wl.shell_surface = - wl_shell_get_shell_surface(ecore_wl_shell_get(), ee->engine.wl.surface); - - /* set toplevel */ - wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); + einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas); + if (!einfo) + { + ERR("Failed to get Evas Engine Info for '%s'", ee->driver); + return; + } - /* create buffer @ new size (also mmaps the new destination) */ _ecore_evas_wl_buffer_new(ee, &einfo->info.dest); + evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); - if (ee->engine.wl.frame) + if (ee->engine.wl.frame) { evas_object_show(ee->engine.wl.frame); evas_object_resize(ee->engine.wl.frame, ee->w, ee->h); } - /* set new engine destination */ - evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); - - /* add configure listener for wayland resize events */ - wl_shell_surface_add_listener(ee->engine.wl.shell_surface, - &_ecore_evas_wl_shell_surface_listener, ee); - - /* flush new buffer fd */ ecore_wl_flush(); - /* attach buffer to surface */ - wl_surface_attach(ee->engine.wl.surface, ee->engine.wl.buffer, 0, 0); - - /* NB: No need to do a damage here. If we do, we end up w/ screen - * artifacts in the compositor */ - /* wl_surface_damage(ee->engine.wl.surface, 0, 0, ee->w, ee->h); */ + if (ee->engine.wl.win) + ecore_wl_window_buffer_attach(ee->engine.wl.win, ee->engine.wl.buffer, 0, 0); ee->visible = 1; if (ee->func.fn_show) ee->func.fn_show(ee); } static void -_ecore_evas_wl_hide(Ecore_Evas *ee) +_ecore_evas_wl_hide(Ecore_Evas *ee) { Evas_Engine_Info_Wayland_Shm *einfo; LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!ee) return; - if (!ee->visible) return; + if ((!ee) || (!ee->visible)) return; - /* get engine info */ einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas); - if (einfo->info.dest) + if ((einfo) && (einfo->info.dest)) { int ret = 0; - /* munmap previous engine destination */ ret = munmap(einfo->info.dest, ((ee->w * sizeof(int)) * ee->h)); - einfo->info.dest = NULL; + if (!ret) ERR("Failed to unmap engine destination: %m"); } - /* free old buffer */ if (ee->engine.wl.buffer) wl_buffer_destroy(ee->engine.wl.buffer); ee->engine.wl.buffer = NULL; - /* set new engine destination */ evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); - /* destroy shell surface */ - if (ee->engine.wl.shell_surface) - wl_shell_surface_destroy(ee->engine.wl.shell_surface); - ee->engine.wl.shell_surface = NULL; - - /* destroy surface */ - if (ee->engine.wl.surface) wl_surface_destroy(ee->engine.wl.surface); - ee->engine.wl.surface = NULL; + ecore_wl_window_hide(ee->engine.wl.win); ee->visible = 0; ee->should_be_visible = 0; + if (ee->func.fn_hide) ee->func.fn_hide(ee); } @@ -631,39 +585,18 @@ _ecore_evas_wl_raise(Ecore_Evas *ee) LOGFN(__FILE__, __LINE__, __FUNCTION__); if ((!ee) || (!ee->visible)) return; - if (!ee->engine.wl.shell_surface) return; - wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); + ecore_wl_window_raise(ee->engine.wl.win); } static void -_ecore_evas_wl_lower(Ecore_Evas *ee) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if ((!ee) || (!ee->visible)) return; - /* FIXME: Need a way to tell Wayland to lower */ -} - -static void -_ecore_evas_wl_activate(Ecore_Evas *ee) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if ((!ee) || (!ee->visible)) return; - if (!ee->engine.wl.shell_surface) return; - wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); -} - -static void -_ecore_evas_wl_title_set(Ecore_Evas *ee, const char *t) +_ecore_evas_wl_title_set(Ecore_Evas *ee, const char *title) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; if (ee->prop.title) free(ee->prop.title); ee->prop.title = NULL; - if (t) ee->prop.title = strdup(t); - + if (title) ee->prop.title = strdup(title); if ((ee->prop.draw_frame) && (ee->engine.wl.frame)) { EE_Wl_Smart_Data *sd; @@ -741,102 +674,96 @@ _ecore_evas_wl_size_step_set(Ecore_Evas *ee, int w, int h) } static void -_ecore_evas_wl_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y) +_ecore_evas_wl_layer_set(Ecore_Evas *ee, int layer) { - int x = 0, y = 0; - LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; - if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); - ee->prop.cursor.object = NULL; - - if (!obj) - { - ee->prop.cursor.layer = 0; - ee->prop.cursor.hot.x = 0; - ee->prop.cursor.hot.y = 0; - return; - } - - ee->prop.cursor.object = obj; - ee->prop.cursor.layer = layer; - ee->prop.cursor.hot.x = hot_x; - ee->prop.cursor.hot.y = hot_y; - - evas_pointer_output_xy_get(ee->evas, &x, &y); - evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer); - evas_object_move(ee->prop.cursor.object, - x - ee->prop.cursor.hot.x, y - ee->prop.cursor.hot.y); - evas_object_pass_events_set(ee->prop.cursor.object, 1); - if (evas_pointer_inside_get(ee->evas)) - evas_object_show(ee->prop.cursor.object); - - evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, - _ecore_evas_wl_object_cursor_del, ee); + if (ee->prop.layer == layer) return; + if (layer < 1) layer = 1; + else if (layer > 255) layer = 255; + ee->prop.layer = layer; } static void -_ecore_evas_wl_object_cursor_del(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +_ecore_evas_wl_iconified_set(Ecore_Evas *ee, int iconify) { - Ecore_Evas *ee; + LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!(ee = data)) return; - ee->prop.cursor.object = NULL; + if (!ee) return; + if (ee->prop.iconified == iconify) return; + ee->prop.iconified = iconify; + /* FIXME: Implement this in Wayland someshow */ } static void -_ecore_evas_wl_layer_set(Ecore_Evas *ee, int layer) +_ecore_evas_wl_maximized_set(Ecore_Evas *ee, int max) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; - if (ee->prop.layer == layer) return; - if (layer < 1) layer = 1; - else if (layer > 255) layer = 255; - ee->prop.layer = layer; + if (ee->prop.maximized == max) return; + ee->prop.maximized = max; + ecore_wl_window_maximized_set(ee->engine.wl.win, max); } static void -_ecore_evas_wl_focus_set(Ecore_Evas *ee, int focus __UNUSED__) +_ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if ((!ee) || (!ee->visible)) return; - if (!ee->engine.wl.shell_surface) return; - wl_shell_surface_set_toplevel(ee->engine.wl.shell_surface); + if (ee->prop.fullscreen == full) return; + ee->prop.fullscreen = full; + ecore_wl_window_fullscreen_set(ee->engine.wl.win, full); } static void -_ecore_evas_wl_iconified_set(Ecore_Evas *ee, int iconify) +_ecore_evas_wl_ignore_events_set(Ecore_Evas *ee, int ignore) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; - if (ee->prop.iconified == iconify) return; - ee->prop.iconified = iconify; - /* FIXME: Implement this in Wayland someshow */ + ee->ignore_events = ignore; + /* NB: Hmmm, may need to pass this to ecore_wl_window in the future */ } static void -_ecore_evas_wl_maximized_set(Ecore_Evas *ee, int max) +_ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha) { + Evas_Engine_Info_Wayland_Shm *einfo; + LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; - if (ee->prop.maximized == max) return; - ee->prop.maximized = max; - /* FIXME: Implement this in Wayland someshow */ + if ((ee->alpha == alpha)) return; + ee->alpha = alpha; + if ((einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas))) + { + einfo->info.destination_alpha = alpha; + if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) + ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); + } } static void -_ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full __UNUSED__) +_ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent) { + Evas_Engine_Info_Wayland_Shm *einfo; + LOGFN(__FILE__, __LINE__, __FUNCTION__); - if ((!ee) || (!ee->visible)) return; - if (!ee->engine.wl.shell_surface) return; - wl_shell_surface_set_fullscreen(ee->engine.wl.shell_surface); + if (!ee) return; + if ((ee->transparent == transparent)) return; + ee->transparent = transparent; + if ((einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas))) + { + einfo->info.destination_alpha = transparent; + if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) + ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); + } } static int @@ -845,9 +772,9 @@ _ecore_evas_wl_render(Ecore_Evas *ee) int rend = 0; if (!ee) return 0; - if (!ee->visible) + if (!ee->visible) evas_norender(ee->evas); - else + else { Eina_List *ll = NULL, *updates = NULL; Ecore_Evas *ee2 = NULL; @@ -867,27 +794,27 @@ _ecore_evas_wl_render(Ecore_Evas *ee) Eina_List *l = NULL; Eina_Rectangle *r; + LOGFN(__FILE__, __LINE__, __FUNCTION__); + EINA_LIST_FOREACH(updates, l, r) { if (ee->engine.wl.buffer) wl_buffer_damage(ee->engine.wl.buffer, r->x, r->y, r->w, r->h); - if (ee->engine.wl.surface) - wl_surface_damage(ee->engine.wl.surface, - r->x, r->y, r->w, r->h); + ecore_wl_window_damage(ee->engine.wl.win, + r->x, r->y, r->w, r->h); } + ecore_wl_flush(); + evas_render_updates_free(updates); _ecore_evas_idle_timeout_update(ee); rend = 1; - - ecore_wl_flush(); } if (ee->func.fn_post_render) ee->func.fn_post_render(ee); } - return rend; } @@ -901,77 +828,67 @@ _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int ecore_wl_screen_size_get(w, h); } -static Eina_Bool -_ecore_evas_wl_event_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *event) +static void +_ecore_evas_wl_buffer_new(Ecore_Evas *ee, void **dest) { - Ecore_Evas *ee; - Ecore_Event_Mouse_Button *ev; + struct wl_shm *shm; + static unsigned int format; + char tmp[PATH_MAX]; + int fd = -1, stride = 0, size = 0; + void *ret; LOGFN(__FILE__, __LINE__, __FUNCTION__); - ev = event; - _ecore_evas_wl_btn_timestamp = ev->timestamp; - ee = ecore_event_window_match(ev->window); - if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; - evas_event_feed_mouse_down(ee->evas, ev->buttons, ev->modifiers, - ev->timestamp, NULL); - return ECORE_CALLBACK_PASS_ON; -} + if (dest) *dest = NULL; + if (!(shm = ecore_wl_shm_get())) return; + if (!format) format = WL_SHM_FORMAT_ARGB8888; //ecore_wl_format_get(); -static Eina_Bool -_ecore_evas_wl_event_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *event) -{ - Ecore_Evas *ee; - Ecore_Event_Mouse_Button *ev; + strcpy(tmp, "/tmp/ecore-wayland_shm-XXXXXX"); + if ((fd = mkstemp(tmp)) < 0) + { + ERR("Could not create temporary file."); + return; + } - LOGFN(__FILE__, __LINE__, __FUNCTION__); + stride = (ee->w * sizeof(int)); + size = (stride * ee->h); + if (ftruncate(fd, size) < 0) + { + ERR("Could not truncate temporary file."); + close(fd); + return; + } - ev = event; - ee = ecore_event_window_match(ev->window); - if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; - evas_event_feed_mouse_up(ee->evas, ev->buttons, ev->modifiers, - ev->timestamp, NULL); - return ECORE_CALLBACK_PASS_ON; -} + ret = mmap(NULL, size, (PROT_READ | PROT_WRITE), MAP_SHARED, fd, 0); + unlink(tmp); -static Eina_Bool -_ecore_evas_wl_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event) -{ - Ecore_Evas *ee; - Ecore_Event_Mouse_Move *ev; + if (ret == MAP_FAILED) + { + ERR("mmap of temporary file failed."); + close(fd); + return; + } - ev = event; - ee = ecore_event_window_match(ev->window); - if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; - ee->mouse.x = ev->x; - ee->mouse.y = ev->y; - evas_event_feed_mouse_move(ee->evas, ev->x, ev->y, ev->timestamp, NULL); - _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->timestamp); - return ECORE_CALLBACK_PASS_ON; + if (dest) *dest = ret; + + ee->engine.wl.buffer = + wl_shm_create_buffer(ecore_wl_shm_get(), fd, ee->w, ee->h, stride, format); + + close(fd); } -static Eina_Bool -_ecore_evas_wl_event_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *event) +void +_ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location) { - Ecore_Evas *ee; - Ecore_Event_Mouse_Wheel *ev; - LOGFN(__FILE__, __LINE__, __FUNCTION__); - ev = event; - ee = ecore_event_window_match(ev->window); - if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; - evas_event_feed_mouse_wheel(ee->evas, ev->direction, ev->z, - ev->timestamp, NULL); - return ECORE_CALLBACK_PASS_ON; + if (!ee) return; + if (ee->engine.wl.win) + ecore_wl_window_resize(ee->engine.wl.win, ee->w, ee->h, location); } static Eina_Bool -_ecore_evas_wl_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event) +_ecore_evas_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event) { Ecore_Evas *ee; Ecore_Wl_Event_Mouse_In *ev; @@ -979,18 +896,18 @@ _ecore_evas_wl_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void * LOGFN(__FILE__, __LINE__, __FUNCTION__); ev = event; - ee = ecore_event_window_match(ev->window); + ee = ecore_event_window_match(ev->win); if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; + if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee); ecore_event_evas_modifier_lock_update(ee->evas, ev->modifiers); - evas_event_feed_mouse_in(ee->evas, ev->time, NULL); - _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->time); + evas_event_feed_mouse_in(ee->evas, ev->timestamp, NULL); + _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->timestamp); return ECORE_CALLBACK_PASS_ON; } static Eina_Bool -_ecore_evas_wl_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event) +_ecore_evas_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event) { Ecore_Evas *ee; Ecore_Wl_Event_Mouse_Out *ev; @@ -998,19 +915,19 @@ _ecore_evas_wl_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void LOGFN(__FILE__, __LINE__, __FUNCTION__); ev = event; - ee = ecore_event_window_match(ev->window); + ee = ecore_event_window_match(ev->win); if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; + if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; ecore_event_evas_modifier_lock_update(ee->evas, ev->modifiers); - _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->time); - evas_event_feed_mouse_out(ee->evas, ev->time, NULL); + _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->timestamp); + evas_event_feed_mouse_out(ee->evas, ev->timestamp, NULL); if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee); if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object); return ECORE_CALLBACK_PASS_ON; } static Eina_Bool -_ecore_evas_wl_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event) +_ecore_evas_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event) { Ecore_Evas *ee; Ecore_Wl_Event_Focus_In *ev; @@ -1018,9 +935,9 @@ _ecore_evas_wl_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void * LOGFN(__FILE__, __LINE__, __FUNCTION__); ev = event; - ee = ecore_event_window_match(ev->window); + ee = ecore_event_window_match(ev->win); if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; + if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; ee->prop.focused = 1; evas_focus_in(ee->evas); if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee); @@ -1028,92 +945,53 @@ _ecore_evas_wl_event_focus_in(void *data __UNUSED__, int type __UNUSED__, void * } static Eina_Bool -_ecore_evas_wl_event_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event) +_ecore_evas_wl_cb_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event) { Ecore_Evas *ee; - Ecore_Wl_Event_Focus_Out *ev; + Ecore_Wl_Event_Focus_In *ev; LOGFN(__FILE__, __LINE__, __FUNCTION__); ev = event; - ee = ecore_event_window_match(ev->window); + ee = ecore_event_window_match(ev->win); if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; - if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; + if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; evas_focus_out(ee->evas); ee->prop.focused = 0; if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee); return ECORE_CALLBACK_PASS_ON; } -static void -_ecore_evas_wl_handle_configure(void *data, struct wl_shell_surface *shell_surface, uint32_t timestamp __UNUSED__, uint32_t edges __UNUSED__, int32_t width, int32_t height) +static Eina_Bool +_ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, void *event) { Ecore_Evas *ee; - - /* NB: Trap to prevent compositor from crashing */ - if ((width <= 0) || (height <= 0)) return; - - if (!(ee = data)) return; - - if ((shell_surface) && (ee->engine.wl.shell_surface)) - { - if (ee->engine.wl.shell_surface != shell_surface) return; - ecore_evas_resize(ee, width, height); - } -} - -static void -_ecore_evas_wl_handle_popup_done(void *data __UNUSED__, struct wl_shell_surface *shell_surface __UNUSED__) -{ - -} - -static void -_ecore_evas_wl_buffer_new(Ecore_Evas *ee, void **dest) -{ - static unsigned int format; - char tmp[PATH_MAX]; - int fd = -1, stride = 0, size = 0; - void *ret; + Ecore_Wl_Event_Window_Configure *ev; LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (dest) *dest = NULL; - - if (!format) format = ecore_wl_format_get(); - - strcpy(tmp, "/tmp/ecore-wayland_shm-XXXXXX"); - if ((fd = mkstemp(tmp)) < 0) - { - ERR("Could not create temporary file."); - return; - } - - stride = (ee->w * sizeof(int)); - size = (stride * ee->h); - if (ftruncate(fd, size) < 0) + ev = event; + ee = ecore_event_window_match(ev->win); + if (!ee) return ECORE_CALLBACK_PASS_ON; + if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; + if ((ee->x != ev->x) || (ee->y != ev->y)) { - ERR("Could not truncate temporary file."); - close(fd); - return; + ee->x = ev->x; + ee->y = ev->y; + ee->req.x = ee->x; + ee->req.y = ee->y; + if (ee->func.fn_move) ee->func.fn_move(ee); } - - ret = mmap(NULL, size, (PROT_READ | PROT_WRITE), MAP_SHARED, fd, 0); - unlink(tmp); - - if (ret == MAP_FAILED) + if ((ee->req.w != ev->w) || (ee->req.h != ev->h)) { - ERR("mmap of temporary file failed."); - close(fd); - return; + /* ee->w = ev->w; */ + /* ee->h = ev->h; */ + ee->req.w = ev->w; + ee->req.h = ev->h; + if (ee->func.fn_resize) ee->func.fn_resize(ee); } - if (dest) *dest = ret; - - ee->engine.wl.buffer = - wl_shm_create_buffer(ecore_wl_shm_get(), fd, ee->w, ee->h, stride, format); - - close(fd); + return ECORE_CALLBACK_PASS_ON; } static void @@ -1227,30 +1105,9 @@ _ecore_evas_wl_frame_add(Evas *evas) return evas_object_smart_add(evas, _ecore_evas_wl_smart); } -void -_ecore_evas_wayland_shm_resize(Ecore_Evas *ee, int location) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if ((!ee) || (!ee->engine.wl.shell_surface)) return; - wl_shell_surface_resize(ee->engine.wl.shell_surface, - ecore_wl_input_device_get(), - _ecore_evas_wl_btn_timestamp, location); -} - -void -_ecore_evas_wayland_shm_drag_start(Ecore_Evas *ee, Ecore_Evas *drag_ee, void *source) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if ((!ee) || (!ee->engine.wl.surface)) return; - if ((!source) || (!drag_ee)) return; - ecore_wl_drag_start(source, ee->engine.wl.surface, drag_ee->engine.wl.buffer); -} - #else EAPI Ecore_Evas * -ecore_evas_wayland_shm_new(const char *disp_name __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__, int frame __UNUSED__) +ecore_evas_wayland_shm_new(const char *disp_name __UNUSED__, unsigned int parent __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__, Eina_Bool frame __UNUSED__) { return NULL; } diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_win32.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_win32.c index cfec528..32132b3 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_win32.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_win32.c @@ -420,7 +420,7 @@ _ecore_evas_win32_free(Ecore_Evas *ee) static void _ecore_evas_win32_callback_delete_request_set(Ecore_Evas *ee, - void (*func) (Ecore_Evas *ee)) + Ecore_Evas_Event_Cb func) { ee->func.fn_delete_request = func; } @@ -717,7 +717,7 @@ _ecore_evas_win32_activate(Ecore_Evas *ee) { INF("ecore evas activate"); - ecore_win32_window_focus_set((struct _Ecore_Win32_Window *)ee->prop.window); + ecore_win32_window_focus((struct _Ecore_Win32_Window *)ee->prop.window); } static void @@ -819,7 +819,7 @@ _ecore_evas_win32_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho static void _ecore_evas_win32_focus_set(Ecore_Evas *ee, int on __UNUSED__) { - ecore_win32_window_focus_set((struct _Ecore_Win32_Window *)ee->prop.window); + ecore_win32_window_focus((struct _Ecore_Win32_Window *)ee->prop.window); } static void @@ -879,18 +879,12 @@ _ecore_evas_win32_fullscreen_set(Ecore_Evas *ee, int on) if (on != 0) { - ecore_win32_window_shape_set((struct _Ecore_Win32_Window *)ee->prop.window, - 0, 0, NULL); ecore_win32_window_fullscreen_set((struct _Ecore_Win32_Window *)ee->prop.window, on); } else { ecore_win32_window_fullscreen_set(window, on); - ecore_win32_window_shape_set(window, - window->shape.width, - window->shape.height, - window->shape.mask); } /* Nothing to be done for the GDI backend at the evas level */ @@ -982,6 +976,13 @@ static Ecore_Evas_Engine_Func _ecore_win32_engine_func = NULL, /* _ecore_evas_x_alpha_set */ NULL, //transparent + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, // render NULL //screen_geometry_get }; diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_wince.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_wince.c index e102cb7..fecf26b 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_wince.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_wince.c @@ -345,7 +345,7 @@ _ecore_evas_wince_free(Ecore_Evas *ee) static void _ecore_evas_wince_callback_delete_request_set(Ecore_Evas *ee, - void (*func) (Ecore_Evas *ee)) + Ecore_Evas_Event_Cb func) { ee->func.fn_delete_request = func; } @@ -641,11 +641,11 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho #endif } -/* static void */ -/* _ecore_evas_wince_focus_set(Ecore_Evas *ee, int on __UNUSED__) */ -/* { */ -/* ecore_wince_window_focus_set(ee->prop.window); */ -/* } */ +static void +_ecore_evas_wince_focus_set(Ecore_Evas *ee, int on __UNUSED__) +{ + ecore_wince_window_focus(ee->prop.window); +} /* static void */ /* _ecore_evas_wince_iconified_set(Ecore_Evas *ee, int on) */ @@ -760,7 +760,7 @@ static Ecore_Evas_Engine_Func _ecore_wince_engine_func = NULL, //_ecore_evas_wince_size_step_set, _ecore_evas_wince_cursor_set, NULL, /* _ecore_evas_x_layer_set */ - NULL, //_ecore_evas_wince_focus_set, + _ecore_evas_wince_focus_set, NULL, //_ecore_evas_wince_iconified_set, NULL, //_ecore_evas_wince_borderless_set, NULL, /* _ecore_evas_x_override_set */ @@ -773,6 +773,13 @@ static Ecore_Evas_Engine_Func _ecore_wince_engine_func = NULL, /* _ecore_evas_x_alpha_set */ NULL, //transparent + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, // render NULL // screen_geometry_get }; diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c index 7d3af12..6dd13de 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c @@ -20,6 +20,22 @@ static int leader_ref = 0; static Ecore_X_Window leader_win = 0; static void +_ecore_evas_x_hints_update(Ecore_Evas *ee) +{ + ecore_x_icccm_hints_set + (ee->prop.window, + !ee->prop.focus_skip /* accepts_focus */, + ee->prop.iconified ? ECORE_X_WINDOW_STATE_HINT_ICONIC : + ee->prop.withdrawn ? ECORE_X_WINDOW_STATE_HINT_WITHDRAWN : + ECORE_X_WINDOW_STATE_HINT_NORMAL /* initial_state */, + 0 /* icon_pixmap */, + 0 /* icon_mask */, + 0 /* icon_window */, + ee->prop.group_ee_win /* window_group */, + ee->prop.urgent /* is_urgent */); +} + +static void _ecore_evas_x_group_leader_set(Ecore_Evas *ee) { leader_ref++; @@ -537,6 +553,7 @@ _ecore_evas_x_event_property_change(void *data __UNUSED__, int type __UNUSED__, { Ecore_Evas *ee; Ecore_X_Event_Window_Property *e; + int state_change = 0; e = event; ee = ecore_event_window_match(e->win); @@ -546,20 +563,62 @@ _ecore_evas_x_event_property_change(void *data __UNUSED__, int type __UNUSED__, { unsigned int i, num; Ecore_X_Window_State *state; - int sticky = 0; - - /* TODO: we need to move those to the end, with if statements */ - ee->engine.x.state.modal = 0; - ee->engine.x.state.maximized_v = 0; - ee->engine.x.state.maximized_h = 0; - ee->engine.x.state.shaded = 0; + struct { + struct { + unsigned char modal : 1; + unsigned char sticky : 1; + unsigned char maximized_v : 1; + unsigned char maximized_h : 1; + unsigned char shaded : 1; + unsigned char skip_taskbar : 1; + unsigned char skip_pager : 1; + unsigned char fullscreen : 1; + unsigned char above : 1; + unsigned char below : 1; + } x; + struct { + char modal : 1; + char maximized : 1; + char sticky : 1; + char fullscreen : 1; + char focus_skip : 1; + } prop; + } prev; + + prev.x.modal = ee->engine.x.state.modal; + prev.x.sticky = ee->engine.x.state.sticky; + prev.x.maximized_v = ee->engine.x.state.maximized_v; + prev.x.maximized_h = ee->engine.x.state.maximized_h; + prev.x.shaded = ee->engine.x.state.shaded; + prev.x.skip_taskbar = ee->engine.x.state.skip_taskbar; + prev.x.skip_pager = ee->engine.x.state.skip_pager; + prev.x.fullscreen = ee->engine.x.state.fullscreen; + prev.x.above = ee->engine.x.state.above; + prev.x.below = ee->engine.x.state.below; + + prev.prop.modal = ee->prop.modal; + prev.prop.maximized = ee->prop.maximized; + prev.prop.sticky = ee->prop.sticky; + prev.prop.fullscreen = ee->prop.fullscreen; + prev.prop.focus_skip = ee->prop.focus_skip; + + ee->engine.x.state.modal = 0; + ee->engine.x.state.sticky = 0; + ee->engine.x.state.maximized_v = 0; + ee->engine.x.state.maximized_h = 0; + ee->engine.x.state.shaded = 0; ee->engine.x.state.skip_taskbar = 0; - ee->engine.x.state.skip_pager = 0; + ee->engine.x.state.skip_pager = 0; + ee->engine.x.state.fullscreen = 0; + ee->engine.x.state.above = 0; + ee->engine.x.state.below = 0; + + ee->prop.modal = 0; + ee->prop.maximized = 0; + ee->prop.sticky = 0; ee->prop.fullscreen = 0; - ee->engine.x.state.fullscreen = 0; - ee->engine.x.state.above = 0; - ee->engine.x.state.below = 0; - + ee->prop.focus_skip = 0; + ecore_x_netwm_window_state_get(e->win, &state, &num); if (state) { @@ -568,56 +627,106 @@ _ecore_evas_x_event_property_change(void *data __UNUSED__, int type __UNUSED__, switch (state[i]) { case ECORE_X_WINDOW_STATE_MODAL: - ee->engine.x.state.modal = 1; - break; + ee->engine.x.state.modal = 1; + ee->prop.modal = 1; + break; case ECORE_X_WINDOW_STATE_STICKY: - if (ee->prop.sticky && ee->engine.x.state.sticky) - break; - - sticky = 1; - ee->prop.sticky = 1; - ee->engine.x.state.sticky = 1; - if (ee->func.fn_sticky) ee->func.fn_sticky(ee); - break; + ee->prop.sticky = 1; + ee->engine.x.state.sticky = 1; + break; case ECORE_X_WINDOW_STATE_MAXIMIZED_VERT: - ee->engine.x.state.maximized_v = 1; - break; + ee->engine.x.state.maximized_v = 1; + ee->prop.maximized = 1; + break; case ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ: - ee->engine.x.state.maximized_h = 1; - break; + ee->engine.x.state.maximized_h = 1; + ee->prop.maximized = 1; + break; case ECORE_X_WINDOW_STATE_SHADED: - ee->engine.x.state.shaded = 1; - break; + ee->engine.x.state.shaded = 1; + break; case ECORE_X_WINDOW_STATE_SKIP_TASKBAR: - ee->engine.x.state.skip_taskbar = 1; - break; + ee->engine.x.state.skip_taskbar = 1; + ee->prop.focus_skip = 1; + break; case ECORE_X_WINDOW_STATE_SKIP_PAGER: - ee->engine.x.state.skip_pager = 1; - break; + ee->engine.x.state.skip_pager = 1; + ee->prop.focus_skip = 1; + break; case ECORE_X_WINDOW_STATE_FULLSCREEN: - ee->prop.fullscreen = 1; - ee->engine.x.state.fullscreen = 1; - break; + ee->prop.fullscreen = 1; + ee->engine.x.state.fullscreen = 1; + break; case ECORE_X_WINDOW_STATE_ABOVE: - ee->engine.x.state.above = 1; - break; + ee->engine.x.state.above = 1; + break; case ECORE_X_WINDOW_STATE_BELOW: - ee->engine.x.state.below = 1; - break; + ee->engine.x.state.below = 1; + break; default: break; } } free(state); } - - if ((ee->prop.sticky) && (!sticky)) + if ( +// (prev.x.modal != ee->engine.x.state.modal) || + (prev.x.sticky != ee->engine.x.state.sticky) || + (prev.x.maximized_v != ee->engine.x.state.maximized_v) || + (prev.x.maximized_h != ee->engine.x.state.maximized_h) || +// (prev.x.shaded != ee->engine.x.state.shaded) || +// (prev.x.skip_taskbar != ee->engine.x.state.skip_taskbar) || +// (prev.x.skip_pager != ee->engine.x.state.skip_pager) || + (prev.x.fullscreen != ee->engine.x.state.fullscreen) || +// (prev.x.above != ee->engine.x.state.above) || +// (prev.x.below != ee->engine.x.state.below) || +// (prev.prop.modal != ee->prop.modal) || + (prev.prop.maximized != ee->prop.maximized) || + (prev.prop.sticky != ee->prop.sticky) || + (prev.prop.fullscreen != ee->prop.fullscreen) || + (prev.prop.focus_skip != ee->prop.focus_skip)) + state_change = 1; + } + else if (e->atom == ECORE_X_ATOM_WM_STATE) + { + Ecore_X_Window_State_Hint state; + + // handle WM_STATE changes + state = ecore_x_icccm_state_get(e->win); + switch (state) { - ee->prop.sticky = 0; - ee->engine.x.state.sticky = 0; - if (ee->func.fn_unsticky) ee->func.fn_unsticky(ee); + case ECORE_X_WINDOW_STATE_HINT_WITHDRAWN: + if ((!ee->prop.withdrawn) || (ee->prop.iconified)) + { + state_change = 1; + ee->prop.withdrawn = 1; + ee->prop.iconified = 0; + } + break; + case ECORE_X_WINDOW_STATE_HINT_ICONIC: + if ((!ee->prop.iconified) || (ee->prop.withdrawn)) + { + state_change = 1; + ee->prop.iconified = 1; + ee->prop.withdrawn = 0; + } + break; + case ECORE_X_WINDOW_STATE_HINT_NORMAL: + if ((ee->prop.iconified) || (ee->prop.withdrawn)) + { + state_change = 1; + ee->prop.iconified = 0; + ee->prop.withdrawn = 0; + } + break; + default: + break; } } + if (state_change) + { + if (ee->func.fn_state_change) ee->func.fn_state_change(ee); + } return ECORE_CALLBACK_PASS_ON; } @@ -826,7 +935,8 @@ _ecore_evas_x_event_window_focus_in(void *data __UNUSED__, int type __UNUSED__, ee = ecore_event_window_match(e->win); if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; /* pass on event */ if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; - if (e->mode == ECORE_X_EVENT_MODE_UNGRAB) return ECORE_CALLBACK_PASS_ON; +//xx// filtering with these doesnt help +//xx// if (e->mode == ECORE_X_EVENT_MODE_UNGRAB) return ECORE_CALLBACK_PASS_ON; ee->prop.focused = 1; evas_focus_in(ee->evas); if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee); @@ -843,7 +953,9 @@ _ecore_evas_x_event_window_focus_out(void *data __UNUSED__, int type __UNUSED__, ee = ecore_event_window_match(e->win); if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; /* pass on event */ if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; - if (e->mode == ECORE_X_EVENT_MODE_GRAB) return ECORE_CALLBACK_PASS_ON; +//xx// filtering with these doesnt help +//xx// if (e->mode == ECORE_X_EVENT_MODE_GRAB) return ECORE_CALLBACK_PASS_ON; + // if (ee->prop.fullscreen) // ecore_x_window_focus(ee->prop.window); evas_focus_out(ee->evas); @@ -1078,8 +1190,8 @@ _ecore_evas_x_size_pos_hints_update(Ecore_Evas *ee) ee->prop.base.h /* base_h */, ee->prop.step.w /* step_x */, ee->prop.step.h /* step_y */, - 0 /* min_aspect */, - 0 /* max_aspect */); + ee->prop.aspect /* min_aspect */, + ee->prop.aspect /* max_aspect */); } /* FIXME, should be in idler */ @@ -1089,32 +1201,30 @@ _ecore_evas_x_state_update(Ecore_Evas *ee) Ecore_X_Window_State state[10]; int num = 0; - /* - if (bd->client.netwm.state.modal) + if (ee->prop.modal) state[num++] = ECORE_X_WINDOW_STATE_MODAL; - */ - if (ee->engine.x.state.sticky) + if (ee->prop.sticky) state[num++] = ECORE_X_WINDOW_STATE_STICKY; - /* - if (bd->client.netwm.state.maximized_v) + if (ee->prop.maximized) state[num++] = ECORE_X_WINDOW_STATE_MAXIMIZED_VERT; - if (bd->client.netwm.state.maximized_h) + if (ee->prop.maximized) state[num++] = ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ; - if (bd->client.netwm.state.shaded) - state[num++] = ECORE_X_WINDOW_STATE_SHADED; - if (bd->client.netwm.state.skip_taskbar) +// if (bd->client.netwm.state.shaded) +// state[num++] = ECORE_X_WINDOW_STATE_SHADED; + if (ee->prop.focus_skip) state[num++] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR; - if (bd->client.netwm.state.skip_pager) + if (ee->prop.focus_skip) state[num++] = ECORE_X_WINDOW_STATE_SKIP_PAGER; - if (bd->client.netwm.state.hidden) - state[num++] = ECORE_X_WINDOW_STATE_HIDDEN; - */ +// if (bd->client.netwm.state.hidden) +// state[num++] = ECORE_X_WINDOW_STATE_HIDDEN; if (ee->engine.x.state.fullscreen) state[num++] = ECORE_X_WINDOW_STATE_FULLSCREEN; if (ee->engine.x.state.above) state[num++] = ECORE_X_WINDOW_STATE_ABOVE; if (ee->engine.x.state.below) state[num++] = ECORE_X_WINDOW_STATE_BELOW; + if (ee->prop.demand_attention) + state[num++] = ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION; ecore_x_netwm_window_state_set(ee->prop.window, state, num); } @@ -1292,7 +1402,7 @@ _ecore_evas_x_free(Ecore_Evas *ee) } static void -_ecore_evas_x_callback_delete_request_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +_ecore_evas_x_callback_delete_request_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func) { ee->func.fn_delete_request = func; _ecore_evas_x_protocols_set(ee); @@ -1578,6 +1688,10 @@ _ecore_evas_x_rotation_set_internal(Ecore_Evas *ee, int rotation, int resize, static void _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize) { + int angles[2]; + angles[0] = rotation; + angles[1] = ee->rotation; + if (ee->rotation == rotation) return; if (!strcmp(ee->driver, "opengl_x11")) { @@ -1589,6 +1703,9 @@ _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize) einfo->info.rotation = rotation; _ecore_evas_x_rotation_set_internal(ee, rotation, resize, (Evas_Engine_Info *)einfo); + ecore_x_window_prop_property_set(ee->prop.window, + ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_ATOM_CARDINAL, 32, &angles, 2); #endif /* BUILD_ECORE_EVAS_OPENGL_X11 */ } else if (!strcmp(ee->driver, "software_x11")) @@ -1601,6 +1718,9 @@ _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize) einfo->info.rotation = rotation; _ecore_evas_x_rotation_set_internal(ee, rotation, resize, (Evas_Engine_Info *)einfo); + ecore_x_window_prop_property_set(ee->prop.window, + ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_ATOM_CARDINAL, 32, &angles, 2); #endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */ } else if (!strcmp(ee->driver, "software_16_x11")) @@ -1613,6 +1733,9 @@ _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize) einfo->info.rotation = rotation; _ecore_evas_x_rotation_set_internal(ee, rotation, resize, (Evas_Engine_Info *)einfo); + ecore_x_window_prop_property_set(ee->prop.window, + ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_ATOM_CARDINAL, 32, &angles, 2); #endif /* BUILD_ECORE_EVAS_SOFTWARE_16_X11 */ } else if (!strcmp(ee->driver, "software_8_x11")) @@ -1625,6 +1748,9 @@ _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize) einfo->info.rotation = rotation; _ecore_evas_x_rotation_set_internal(ee, rotation, resize, (Evas_Engine_Info *)einfo); + ecore_x_window_prop_property_set(ee->prop.window, + ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE, + ECORE_X_ATOM_CARDINAL, 32, &angles, 2); #endif /* BUILD_ECORE_EVAS_SOFTWARE_8_X11 */ } } @@ -1839,14 +1965,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha) ecore_x_icccm_title_set(ee->prop.window, ee->prop.title); ecore_x_netwm_name_set(ee->prop.window, ee->prop.title); } - ecore_x_icccm_hints_set(ee->prop.window, - 1 /* accepts_focus */, - ECORE_X_WINDOW_STATE_HINT_NORMAL /* initial_state */, - 0 /* icon_pixmap */, - 0 /* icon_mask */, - 0 /* icon_window */, - 0 /* window_group */, - 0 /* is_urgent */); + _ecore_evas_x_hints_update(ee); _ecore_evas_x_group_leader_update(ee); ecore_x_window_defaults_set(ee->prop.window); _ecore_evas_x_protocols_set(ee); @@ -1962,14 +2081,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha) ecore_x_icccm_title_set(ee->prop.window, ee->prop.title); ecore_x_netwm_name_set(ee->prop.window, ee->prop.title); } - ecore_x_icccm_hints_set(ee->prop.window, - 1 /* accepts_focus */, - ECORE_X_WINDOW_STATE_HINT_NORMAL /* initial_state */, - 0 /* icon_pixmap */, - 0 /* icon_mask */, - 0 /* icon_window */, - 0 /* window_group */, - 0 /* is_urgent */); + _ecore_evas_x_hints_update(ee); _ecore_evas_x_group_leader_update(ee); ecore_x_window_defaults_set(ee->prop.window); _ecore_evas_x_protocols_set(ee); @@ -2048,14 +2160,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha) ecore_x_icccm_title_set(ee->prop.window, ee->prop.title); ecore_x_netwm_name_set(ee->prop.window, ee->prop.title); } - ecore_x_icccm_hints_set(ee->prop.window, - 1 /* accepts_focus */, - ECORE_X_WINDOW_STATE_HINT_NORMAL /* initial_state */, - 0 /* icon_pixmap */, - 0 /* icon_mask */, - 0 /* icon_window */, - 0 /* window_group */, - 0 /* is_urgent */); + _ecore_evas_x_hints_update(ee); _ecore_evas_x_group_leader_update(ee); ecore_x_window_defaults_set(ee->prop.window); _ecore_evas_x_protocols_set(ee); @@ -2134,14 +2239,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha) ecore_x_icccm_title_set(ee->prop.window, ee->prop.title); ecore_x_netwm_name_set(ee->prop.window, ee->prop.title); } - ecore_x_icccm_hints_set(ee->prop.window, - 1 /* accepts_focus */, - ECORE_X_WINDOW_STATE_HINT_NORMAL /* initial_state */, - 0 /* icon_pixmap */, - 0 /* icon_mask */, - 0 /* icon_window */, - 0 /* window_group */, - 0 /* is_urgent */); + _ecore_evas_x_hints_update(ee); _ecore_evas_x_group_leader_update(ee); ecore_x_window_defaults_set(ee->prop.window); _ecore_evas_x_protocols_set(ee); @@ -2182,6 +2280,88 @@ _ecore_evas_x_transparent_set(Ecore_Evas *ee, int transparent) #endif } } + +static void +_ecore_evas_x_window_group_set(Ecore_Evas *ee, const Ecore_Evas *group_ee) +{ + if (ee->prop.group_ee == group_ee) return; + + ee->prop.group_ee = (Ecore_Evas *)group_ee; + if (ee->prop.group_ee) + ee->prop.group_ee_win = group_ee->prop.window; + else + ee->prop.group_ee_win = 0; + _ecore_evas_x_hints_update(ee); +} + +static void +_ecore_evas_x_aspect_set(Ecore_Evas *ee, double aspect) +{ + if (ee->prop.aspect == aspect) return; + + ee->prop.aspect = aspect; + _ecore_evas_x_size_pos_hints_update(ee); +// netwm state +// if (ee->should_be_visible) +// ecore_x_netwm_state_request_send(ee->prop.window, ee->engine.x.win_root, +// ECORE_X_WINDOW_STATE_STICKY, -1, sticky); +// else +// _ecore_evas_x_state_update(ee); +} + +static void +_ecore_evas_x_urgent_set(Ecore_Evas *ee, int urgent) +{ + if (ee->prop.urgent == urgent) return; + + ee->prop.urgent = urgent; + _ecore_evas_x_hints_update(ee); +} + +static void +_ecore_evas_x_modal_set(Ecore_Evas *ee, int modal) +{ + if (ee->prop.modal == modal) return; + + ee->prop.modal = modal; + if (ee->should_be_visible) + ecore_x_netwm_state_request_send(ee->prop.window, ee->engine.x.win_root, + ECORE_X_WINDOW_STATE_MODAL, -1, modal); + else + _ecore_evas_x_state_update(ee); +} + +static void +_ecore_evas_x_demand_attention_set(Ecore_Evas *ee, int demand) +{ + if (ee->prop.demand_attention == demand) return; + + ee->prop.demand_attention = demand; + if (ee->should_be_visible) + ecore_x_netwm_state_request_send(ee->prop.window, ee->engine.x.win_root, + ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION, -1, demand); + else + _ecore_evas_x_state_update(ee); +} + +static void +_ecore_evas_x_focus_skip_set(Ecore_Evas *ee, int skip) +{ + if (ee->prop.focus_skip == skip) return; + + ee->prop.focus_skip = skip; + if (ee->should_be_visible) + { + ecore_x_netwm_state_request_send(ee->prop.window, ee->engine.x.win_root, + ECORE_X_WINDOW_STATE_SKIP_TASKBAR, -1, skip); + ecore_x_netwm_state_request_send(ee->prop.window, ee->engine.x.win_root, + ECORE_X_WINDOW_STATE_SKIP_PAGER, -1, skip); + } + else + _ecore_evas_x_state_update(ee); + _ecore_evas_x_hints_update(ee); +} + #endif /* BUILD_ECORE_EVAS_X11 */ #ifdef BUILD_ECORE_EVAS_X11 @@ -2369,30 +2549,11 @@ _ecore_evas_x_iconified_set(Ecore_Evas *ee, int on) { if (ee->prop.iconified == on) return; ee->prop.iconified = on; + _ecore_evas_x_hints_update(ee); if (on) - { - ecore_x_icccm_hints_set(ee->prop.window, - 1 /* accepts_focus */, - ECORE_X_WINDOW_STATE_HINT_ICONIC /* initial_state */, - 0 /* icon_pixmap */, - 0 /* icon_mask */, - 0 /* icon_window */, - 0 /* window_group */, - 0 /* is_urgent */); - ecore_x_icccm_iconic_request_send(ee->prop.window, ee->engine.x.win_root); - } + ecore_x_icccm_iconic_request_send(ee->prop.window, ee->engine.x.win_root); else - { - ecore_x_icccm_hints_set(ee->prop.window, - 1 /* accepts_focus */, - ECORE_X_WINDOW_STATE_HINT_NORMAL /* initial_state */, - 0 /* icon_pixmap */, - 0 /* icon_mask */, - 0 /* icon_window */, - 0 /* window_group */, - 0 /* is_urgent */); - ecore_evas_show(ee); - } + ecore_evas_show(ee); } static void @@ -2408,24 +2569,9 @@ _ecore_evas_x_borderless_set(Ecore_Evas *ee, int on) static void _ecore_evas_x_withdrawn_set(Ecore_Evas *ee, int withdrawn) { - Ecore_X_Window_State_Hint hint; - if (ee->prop.withdrawn == withdrawn) return; - ee->prop.withdrawn = withdrawn; - if (withdrawn) - hint = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN; - else - hint = ECORE_X_WINDOW_STATE_HINT_NORMAL; - - ecore_x_icccm_hints_set(ee->prop.window, - 1 /* accepts_focus */, - hint /* initial_state */, - 0 /* icon_pixmap */, - 0 /* icon_mask */, - 0 /* icon_window */, - 0 /* window_group */, - 0 /* is_urgent */); + _ecore_evas_x_hints_update(ee); } static void @@ -2762,6 +2908,13 @@ static Ecore_Evas_Engine_Func _ecore_x_engine_func = _ecore_evas_x_ignore_events_set, _ecore_evas_x_alpha_set, _ecore_evas_x_transparent_set, + + _ecore_evas_x_window_group_set, + _ecore_evas_x_aspect_set, + _ecore_evas_x_urgent_set, + _ecore_evas_x_modal_set, + _ecore_evas_x_demand_attention_set, + _ecore_evas_x_focus_skip_set, NULL, // render _ecore_evas_x_screen_geometry_get @@ -3003,14 +3156,7 @@ ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent, } } - ecore_x_icccm_hints_set(ee->prop.window, - 1 /* accepts_focus */, - ECORE_X_WINDOW_STATE_HINT_NORMAL /* initial_state */, - 0 /* icon_pixmap */, - 0 /* icon_mask */, - 0 /* icon_window */, - 0 /* window_group */, - 0 /* is_urgent */); + _ecore_evas_x_hints_update(ee); _ecore_evas_x_group_leader_set(ee); ecore_x_window_defaults_set(ee->prop.window); _ecore_evas_x_protocols_set(ee); @@ -3240,14 +3386,7 @@ ecore_evas_gl_x11_options_new(const char *disp_name, Ecore_X_Window parent, // putenv((char*)"DESKTOP_STARTUP_ID="); } - ecore_x_icccm_hints_set(ee->prop.window, - 1 /* accepts_focus */, - ECORE_X_WINDOW_STATE_HINT_NORMAL /* initial_state */, - 0 /* icon_pixmap */, - 0 /* icon_mask */, - 0 /* icon_window */, - 0 /* window_group */, - 0 /* is_urgent */); + _ecore_evas_x_hints_update(ee); _ecore_evas_x_group_leader_set(ee); ecore_x_window_defaults_set(ee->prop.window); _ecore_evas_x_protocols_set(ee); @@ -3571,14 +3710,7 @@ ecore_evas_software_x11_16_new(const char *disp_name, Ecore_X_Window parent, return NULL; } - ecore_x_icccm_hints_set(ee->prop.window, - 1 /* accepts_focus */, - ECORE_X_WINDOW_STATE_HINT_NORMAL /* initial_state */, - 0 /* icon_pixmap */, - 0 /* icon_mask */, - 0 /* icon_window */, - 0 /* window_group */, - 0 /* is_urgent */); + _ecore_evas_x_hints_update(ee); _ecore_evas_x_group_leader_set(ee); ecore_x_window_defaults_set(ee->prop.window); _ecore_evas_x_protocols_set(ee); @@ -3895,14 +4027,7 @@ ecore_evas_software_x11_8_new(const char *disp_name, Ecore_X_Window parent, return NULL; } - ecore_x_icccm_hints_set(ee->prop.window, - 1 /* accepts_focus */, - ECORE_X_WINDOW_STATE_HINT_NORMAL /* initial_state */, - 0 /* icon_pixmap */, - 0 /* icon_mask */, - 0 /* icon_window */, - 0 /* window_group */, - 0 /* is_urgent */); + _ecore_evas_x_hints_update(ee); _ecore_evas_x_group_leader_set(ee); ecore_x_window_defaults_set(ee->prop.window); _ecore_evas_x_protocols_set(ee); diff --git a/libraries/ecore/src/lib/ecore_fb/Makefile.in b/libraries/ecore/src/lib/ecore_fb/Makefile.in index c0c30a5..e8030b1 100644 --- a/libraries/ecore/src/lib/ecore_fb/Makefile.in +++ b/libraries/ecore/src/lib/ecore_fb/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -194,6 +193,8 @@ 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@ @@ -249,6 +250,8 @@ 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@ @@ -259,6 +262,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_fb/ecore_fb.c b/libraries/ecore/src/lib/ecore_fb/ecore_fb.c index ca7d73d..daeea0f 100644 --- a/libraries/ecore/src/lib/ecore_fb/ecore_fb.c +++ b/libraries/ecore/src/lib/ecore_fb/ecore_fb.c @@ -92,21 +92,18 @@ _ecore_fb_size_get(int *w, int *h) fb = open("/dev/fb0", O_RDWR); if (fb < 0) - { - if (w) *w = 0; - if (h) *h = 0; - return; - } + goto exit; + if (ioctl(fb, FBIOGET_VSCREENINFO, &fb_var) == -1) - { - if (w) *w = 0; - if (h) *h = 0; - close(fb); - return; - } + goto err_ioctl; + + *w = fb_var.xres; + *h = fb_var.yres; + +err_ioctl: close(fb); - if (w) *w = fb_var.xres; - if (h) *h = fb_var.yres; +exit: + return; } /** diff --git a/libraries/ecore/src/lib/ecore_file/Makefile.in b/libraries/ecore/src/lib/ecore_file/Makefile.in index 04e0bf1..a80ece3 100644 --- a/libraries/ecore/src/lib/ecore_file/Makefile.in +++ b/libraries/ecore/src/lib/ecore_file/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -195,6 +194,8 @@ 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@ @@ -250,6 +251,8 @@ 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@ @@ -260,6 +263,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_file/ecore_file.c b/libraries/ecore/src/lib/ecore_file/ecore_file.c index cfbf2b5..cb03717 100644 --- a/libraries/ecore/src/lib/ecore_file/ecore_file.c +++ b/libraries/ecore/src/lib/ecore_file/ecore_file.c @@ -821,6 +821,8 @@ ecore_file_ls(const char *dir) Eina_List *list = NULL; ls = eina_file_direct_ls(dir); + if (!ls) return NULL; + EINA_ITERATOR_FOREACH(ls, info) { char *f; diff --git a/libraries/ecore/src/lib/ecore_file/ecore_file_download.c b/libraries/ecore/src/lib/ecore_file/ecore_file_download.c index c5e56bd..971493e 100644 --- a/libraries/ecore/src/lib/ecore_file/ecore_file_download.c +++ b/libraries/ecore/src/lib/ecore_file/ecore_file_download.c @@ -45,22 +45,27 @@ static Ecore_Event_Handler *_url_complete_handler = NULL; static Ecore_Event_Handler *_url_progress_download = NULL; static Eina_List *_job_list; +static int download_init = 0; + #endif /* BUILD_ECORE_CON */ int ecore_file_download_init(void) { #ifdef BUILD_ECORE_CON - if (!ecore_con_url_init()) - return 0; - + download_init++; + if (download_init > 1) return 1; + if (!ecore_con_init()) return 0; + if (!ecore_con_url_init()) + { + ecore_con_shutdown(); + return 0; + } # ifdef HAVE_CURL - _url_complete_handler = ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, _ecore_file_download_url_complete_cb, NULL); - _url_progress_download = ecore_event_handler_add(ECORE_CON_EVENT_URL_PROGRESS, _ecore_file_download_url_progress_cb, NULL); + _url_complete_handler = ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, _ecore_file_download_url_complete_cb, NULL); + _url_progress_download = ecore_event_handler_add(ECORE_CON_EVENT_URL_PROGRESS, _ecore_file_download_url_progress_cb, NULL); # endif - #endif /* BUILD_ECORE_CON */ - return 1; } @@ -68,15 +73,17 @@ void ecore_file_download_shutdown(void) { #ifdef BUILD_ECORE_CON - if (_url_complete_handler) - ecore_event_handler_del(_url_complete_handler); - if (_url_progress_download) - ecore_event_handler_del(_url_progress_download); - _url_complete_handler = NULL; - _url_progress_download = NULL; - ecore_file_download_abort_all(); - - ecore_con_url_shutdown(); + download_init--; + if (download_init > 0) return; + if (_url_complete_handler) + ecore_event_handler_del(_url_complete_handler); + if (_url_progress_download) + ecore_event_handler_del(_url_progress_download); + _url_complete_handler = NULL; + _url_progress_download = NULL; + ecore_file_download_abort_all(); + ecore_con_url_shutdown(); + ecore_con_shutdown(); #endif /* BUILD_ECORE_CON */ } @@ -362,7 +369,6 @@ _ecore_file_download_curl(const char *url, const char *dst, } if (headers) eina_hash_foreach(headers, _ecore_file_download_headers_foreach_cb, job); - ecore_con_url_timeout_set(job->url_con, ECORE_FILE_DOWNLOAD_TIMEOUT); ecore_con_url_fd_set(job->url_con, fileno(job->file)); ecore_con_url_data_set(job->url_con, data); diff --git a/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h b/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h index adea35d..1757d79 100644 --- a/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h +++ b/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h @@ -33,6 +33,12 @@ extern "C" { #endif +/** + * @addtogroup Ecore_IMF_Context_Group + * + * @{ + */ + /* Events sent by the Input Method */ typedef struct _Ecore_IMF_Event_Preedit_Start Ecore_IMF_Event_Preedit_Start; typedef struct _Ecore_IMF_Event_Preedit_End Ecore_IMF_Event_Preedit_End; @@ -66,25 +72,41 @@ EAPI extern int ECORE_IMF_EVENT_DELETE_SURROUNDING; typedef void (*Ecore_IMF_Event_Cb) (void *data, Ecore_IMF_Context *ctx, void *event_info); +/** + * @enum _Ecore_IMF_Callback_Type + * @typedef Ecore_IMF_Callback_Type + * + * Ecore IMF Event callback types. + * + * @see ecore_imf_context_event_callback_add() + */ typedef enum { - ECORE_IMF_CALLBACK_PREEDIT_START, - ECORE_IMF_CALLBACK_PREEDIT_END, - ECORE_IMF_CALLBACK_PREEDIT_CHANGED, - ECORE_IMF_CALLBACK_COMMIT, - ECORE_IMF_CALLBACK_DELETE_SURROUNDING + ECORE_IMF_CALLBACK_PREEDIT_START, /**< "PREEDIT_START" is called when a new preediting sequence starts. */ + ECORE_IMF_CALLBACK_PREEDIT_END, /**< "PREEDIT_END" is called when a preediting sequence has been completed or canceled. */ + ECORE_IMF_CALLBACK_PREEDIT_CHANGED, /**< "PREEDIT_CHANGED" is called whenever the preedit sequence currently being entered has changed. */ + ECORE_IMF_CALLBACK_COMMIT, /**< "COMMIT" is called when a complete input sequence has been entered by the user */ + ECORE_IMF_CALLBACK_DELETE_SURROUNDING /**< "DELETE_SURROUNDING" is called when the input method needs to delete all or part of the context surrounding the cursor */ } Ecore_IMF_Callback_Type; +/** + * @enum _Ecore_IMF_Event_Type + * @typedef Ecore_IMF_Event_Type + * + * Ecore IMF event types. + * + * @see ecore_imf_context_filter_event() + */ typedef enum { - ECORE_IMF_EVENT_MOUSE_DOWN, - ECORE_IMF_EVENT_MOUSE_UP, - ECORE_IMF_EVENT_MOUSE_IN, - ECORE_IMF_EVENT_MOUSE_OUT, - ECORE_IMF_EVENT_MOUSE_MOVE, - ECORE_IMF_EVENT_MOUSE_WHEEL, - ECORE_IMF_EVENT_KEY_DOWN, - ECORE_IMF_EVENT_KEY_UP + ECORE_IMF_EVENT_MOUSE_DOWN, /**< Mouse Down event */ + ECORE_IMF_EVENT_MOUSE_UP, /**< Mouse Up event */ + ECORE_IMF_EVENT_MOUSE_IN, /**< Mouse In event */ + ECORE_IMF_EVENT_MOUSE_OUT, /**< Mouse Out event */ + ECORE_IMF_EVENT_MOUSE_MOVE, /**< Mouse Move event */ + ECORE_IMF_EVENT_MOUSE_WHEEL, /**< Mouse Wheel event */ + ECORE_IMF_EVENT_KEY_DOWN, /**< Key Down event */ + ECORE_IMF_EVENT_KEY_UP /**< Key Up event */ } Ecore_IMF_Event_Type; typedef enum @@ -123,22 +145,46 @@ typedef enum ECORE_IMF_INPUT_MODE_AUTOCAP = 1 << 30 } Ecore_IMF_Input_Mode; +/** + * @enum _Ecore_IMF_Preedit_Type + * @typedef Ecore_IMF_Preedit_Type + * + * Ecore IMF Preedit style types + * + * @see ecore_imf_context_preedit_string_with_attributes_get() + */ typedef enum { - ECORE_IMF_PREEDIT_TYPE_NONE, - ECORE_IMF_PREEDIT_TYPE_SUB1, - ECORE_IMF_PREEDIT_TYPE_SUB2, - ECORE_IMF_PREEDIT_TYPE_SUB3 + ECORE_IMF_PREEDIT_TYPE_NONE, /**< None style */ + ECORE_IMF_PREEDIT_TYPE_SUB1, /**< Substring style 1 */ + ECORE_IMF_PREEDIT_TYPE_SUB2, /**< Substring style 2 */ + ECORE_IMF_PREEDIT_TYPE_SUB3 /**< Substring style 3 */ } Ecore_IMF_Preedit_Type; +/** + * @enum _Ecore_IMF_Autocapital_Type + * @typedef Ecore_IMF_Autocapital_Type + * + * Autocapitalization Types. + * + * @see ecore_imf_context_autocapital_type_set() + */ typedef enum { - ECORE_IMF_AUTOCAPITAL_TYPE_NONE, - ECORE_IMF_AUTOCAPITAL_TYPE_WORD, - ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE, - ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER + ECORE_IMF_AUTOCAPITAL_TYPE_NONE, /**< No auto-capitalization when typing */ + ECORE_IMF_AUTOCAPITAL_TYPE_WORD, /**< Autocapitalize each word typed */ + ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE, /**< Autocapitalize the start of each sentence */ + ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER, /**< Autocapitalize all letters */ } Ecore_IMF_Autocapital_Type; +/** + * @enum _Ecore_IMF_Input_Panel_Layout + * @typedef Ecore_IMF_Input_Panel_Layout + * + * Input panel (virtual keyboard) layout types. + * + * @see ecore_imf_context_input_panel_layout_set() + */ typedef enum { ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */ @@ -155,12 +201,40 @@ typedef enum ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */ } Ecore_IMF_Input_Panel_Layout; +/** + * @enum _Ecore_IMF_Input_Panel_Lang + * @typedef Ecore_IMF_Input_Panel_Lang + * + * Input panel (virtual keyboard) language modes. + * + * @see ecore_imf_context_input_panel_language_set() + */ typedef enum { - ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic */ - ECORE_IMF_INPUT_PANEL_LANG_ALPHABET /**< Alphabet */ + ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic @since 1.2 */ + ECORE_IMF_INPUT_PANEL_LANG_ALPHABET /**< Alphabet @since 1.2 */ } Ecore_IMF_Input_Panel_Lang; +/** + * @enum _Ecore_IMF_Input_Panel_Return_Key_Type + * @typedef Ecore_IMF_Input_Panel_Return_Key_Type + * + * "Return" Key types on the input panel (virtual keyboard). + * + * @see ecore_imf_context_input_panel_return_key_type_set() + */ +typedef enum +{ + ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT, /**< Default @since 1.2 */ + ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE, /**< Done @since 1.2 */ + ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO, /**< Go @since 1.2 */ + ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN, /**< Join @since 1.2 */ + ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN, /**< Login @since 1.2 */ + ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT, /**< Next @since 1.2 */ + ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH, /**< Search or magnifier icon @since 1.2 */ + ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND /**< Send @since 1.2 */ +} Ecore_IMF_Input_Panel_Return_Key_Type; + struct _Ecore_IMF_Event_Preedit_Start { Ecore_IMF_Context *ctx; @@ -314,9 +388,9 @@ union _Ecore_IMF_Event struct _Ecore_IMF_Preedit_Attr { - Ecore_IMF_Preedit_Type preedit_type; - unsigned int start_index; - unsigned int end_index; + Ecore_IMF_Preedit_Type preedit_type; /**< preedit style type */ + unsigned int start_index; /**< start index of the range (in bytes) */ + unsigned int end_index; /**< end index of the range (in bytes) */ }; struct _Ecore_IMF_Context_Class @@ -345,6 +419,11 @@ struct _Ecore_IMF_Context_Class void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang); Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx); void (*cursor_location_set) (Ecore_IMF_Context *ctx, int x, int y, int w, int h); + void (*input_panel_imdata_set)(Ecore_IMF_Context *ctx, const void* data, int len); + void (*input_panel_imdata_get)(Ecore_IMF_Context *ctx, void* data, int *len); + void (*input_panel_return_key_type_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type return_key_type); + void (*input_panel_return_key_disabled_set) (Ecore_IMF_Context *ctx, Eina_Bool disabled); + void (*input_panel_caps_lock_mode_set) (Ecore_IMF_Context *ctx, Eina_Bool mode); }; struct _Ecore_IMF_Context_Info @@ -418,6 +497,14 @@ EAPI void ecore_imf_context_input_panel_language_set(Ec EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx); EAPI void ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool enable); EAPI Eina_Bool ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx); +EAPI void ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const void *data, int len); +EAPI void ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, void *data, int *len); +EAPI void ecore_imf_context_input_panel_return_key_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type return_key_type); +EAPI Ecore_IMF_Input_Panel_Return_Key_Type ecore_imf_context_input_panel_return_key_type_get(Ecore_IMF_Context *ctx); +EAPI void ecore_imf_context_input_panel_return_key_disabled_set(Ecore_IMF_Context *ctx, Eina_Bool disabled); +EAPI Eina_Bool ecore_imf_context_input_panel_return_key_disabled_get(Ecore_IMF_Context *ctx); +EAPI void ecore_imf_context_input_panel_caps_lock_mode_set(Ecore_IMF_Context *ctx, Eina_Bool mode); +EAPI Eina_Bool ecore_imf_context_input_panel_caps_lock_mode_get(Ecore_IMF_Context *ctx); /* The following entry points must be exported by each input method module */ @@ -433,3 +520,7 @@ EAPI Eina_Bool ecore_imf_context_input_panel_enabled_get(Eco #endif #endif + +/** + * @} + */ diff --git a/libraries/ecore/src/lib/ecore_imf/Makefile.in b/libraries/ecore/src/lib/ecore_imf/Makefile.in index 9f91360..4d71b5d 100644 --- a/libraries/ecore/src/lib/ecore_imf/Makefile.in +++ b/libraries/ecore/src/lib/ecore_imf/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -193,6 +192,8 @@ 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@ @@ -248,6 +249,8 @@ 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@ @@ -258,6 +261,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c b/libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c index b65ee26..423c461 100644 --- a/libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c +++ b/libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c @@ -143,6 +143,32 @@ ecore_imf_context_default_id_by_canvas_type_get(const char *canvas_type) * @return Return a #Ecore_IMF_Context_Info for the Input Method Context with @p id; * on failure it returns NULL. * @ingroup Ecore_IMF_Context_Group + * + * Example + * @code + * + * const char *ctx_id; + * const Ecore_IMF_Context_Info *ctx_info; + * Ecore_IMF_Context *imf_context; + * ctx_id = ecore_imf_context_default_id_get(); + * if (ctx_id) + * { + * ctx_info = ecore_imf_context_info_by_id_get(ctx_id); + * if (!ctx_info->canvas_type || + * strcmp(ctx_info->canvas_type, "evas") == 0) + * { + * imf_context = ecore_imf_context_add(ctx_id); + * } + * else + * { + * ctx_id = ecore_imf_context_default_id_by_canvas_type_get("evas"); + * if (ctx_id) + * { + * imf_context = ecore_imf_context_add(ctx_id); + * } + * } + * } + * @endcode */ EAPI const Ecore_IMF_Context_Info * ecore_imf_context_info_by_id_get(const char *id) @@ -188,6 +214,10 @@ ecore_imf_context_add(const char *id) * set on the immodule */ ecore_imf_context_input_panel_enabled_set(ctx, EINA_TRUE); + /* default input panel layout type is NORMAL type, so let's make sure it's + * set on the immodule */ + ecore_imf_context_input_panel_layout_set(ctx, ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL); + /* default input_mode is ECORE_IMF_INPUT_MODE_FULL, so let's make sure it's * set on the immodule */ ecore_imf_context_input_mode_set(ctx, ECORE_IMF_INPUT_MODE_FULL); @@ -403,7 +433,7 @@ ecore_imf_context_preedit_string_get(Ecore_IMF_Context *ctx, char **str, int *cu } /** - * Retrieve the current preedit string, atrributes and + * Retrieve the current preedit string, attributes and * cursor position for the Input Method Context. * * @param ctx An #Ecore_IMF_Context. @@ -413,6 +443,49 @@ ecore_imf_context_preedit_string_get(Ecore_IMF_Context *ctx, char **str, int *cu * @param cursor_pos Location to store position of cursor (in characters) * within the preedit string. * @ingroup Ecore_IMF_Context_Group + * + * Example + * @code + * char *preedit_string; + * int cursor_pos; + * Eina_List *attrs = NULL, *l = NULL; + * Ecore_IMF_Preedit_Attr *attr; + * + * ecore_imf_context_preedit_string_with_attributes_get(imf_context, + * &preedit_string, + * &attrs, &cursor_pos); + * if (!preedit_string) return; + * + * if (strlen(preedit_string) > 0) + * { + * if (attrs) + * { + * EINA_LIST_FOREACH(attrs, l, attr) + * { + * if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB1) + * { + * // Something to do + * } + * else if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB2) + * { + * // Something to do + * } + * else if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB3) + * { + * // Something to do + * } + * } + * } + * } + * + * // delete attribute list + * if (attrs) + * { + * EINA_LIST_FREE(attrs, attr) free(attr); + * } + * + * free(preedit_string); + * @endcode * @since 1.1.0 */ EAPI void @@ -440,6 +513,18 @@ ecore_imf_context_preedit_string_with_attributes_get(Ecore_IMF_Context *ctx, cha * * @param ctx An #Ecore_IMF_Context. * @ingroup Ecore_IMF_Context_Group + * + * Example + * @code + * static void + * _focus_in_cb(void *data, Evas_Object *o, const char *emission, const char *source) + * { + * ecore_imf_context_reset(imf_context); + * ecore_imf_context_focus_in(imf_context); + * } + * + * evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_IN, _focus_in_cb, ed); + * @endcode */ EAPI void ecore_imf_context_focus_in(Ecore_IMF_Context *ctx) @@ -459,6 +544,18 @@ ecore_imf_context_focus_in(Ecore_IMF_Context *ctx) * * @param ctx An #Ecore_IMF_Context. * @ingroup Ecore_IMF_Context_Group + * + * Example + * @code + * static void + * _focus_out_cb(void *data, Evas_Object *o, const char *emission, const char *source) + * { + * ecore_imf_context_reset(imf_context); + * ecore_imf_context_focus_out(imf_context); + * } + * + * evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_OUT, _focus_out_cb, ed); + * @endcode */ EAPI void ecore_imf_context_focus_out(Ecore_IMF_Context *ctx) @@ -479,6 +576,18 @@ ecore_imf_context_focus_out(Ecore_IMF_Context *ctx) * * @param ctx An #Ecore_IMF_Context. * @ingroup Ecore_IMF_Context_Group + * + * Example + * @code + * static void + * _focus_out_cb(void *data, Evas_Object *o, const char *emission, const char *source) + * { + * ecore_imf_context_reset(imf_context); + * ecore_imf_context_focus_out(imf_context); + * } + * + * evas_object_event_callback_add(obj, EVAS_CALLBACK_FOCUS_OUT, _focus_out_cb, ed); + * @endcode */ EAPI void ecore_imf_context_reset(Ecore_IMF_Context *ctx) @@ -515,10 +624,12 @@ ecore_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos) /** * Notify the Input Method Context that a change in the cursor * location has been made. The location is relative to the canvas. + * The cursor location can be used to determine the position of + * candidate word window in the immodule. * * @param ctx An #Ecore_IMF_Context. * @param x cursor x position. - * @param x cursor y position. + * @param y cursor y position. * @param w cursor width. * @param h cursor height. * @ingroup Ecore_IMF_Context_Group @@ -605,7 +716,7 @@ ecore_imf_context_prediction_allow_get(Ecore_IMF_Context *ctx) } /** - * Set the autocapitalization type on the immodule. + * Set the autocapitalization type on the immodule. * * @param ctx An #Ecore_IMF_Context. * @param autocapital_type the autocapitalization type. @@ -732,6 +843,28 @@ ecore_imf_context_input_mode_get(Ecore_IMF_Context *ctx) * @param event The event itself. * @return EINA_TRUE if the event was handled; otherwise EINA_FALSE. * @ingroup Ecore_IMF_Context_Group + * + * Example + * @code + * static void + * _key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) + * { + * Evas_Event_Key_Down *ev = event_info; + * if (!ev->keyname) return; + * + * if (imf_context) + * { + * Ecore_IMF_Event_Key_Down ecore_ev; + * ecore_imf_evas_event_key_down_wrap(ev, &ecore_ev); + * if (ecore_imf_context_filter_event(imf_context, + * ECORE_IMF_EVENT_KEY_DOWN, + * (Ecore_IMF_Event *)&ecore_ev)) + * return; + * } + * } + * + * evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_DOWN, _key_down_cb, data); + * @endcode */ EAPI Eina_Bool ecore_imf_context_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event) @@ -839,7 +972,7 @@ EAPI void *ecore_imf_context_data_get(Ecore_IMF_Context *ctx) * If the function returns EINA_TRUE, then you must free * the result stored in this location with free(). * @param cursor_pos Location to store the position in characters of - * the insertion cursor within @text. + * the insertion cursor within @p text. * @return EINA_TRUE if surrounding text was provided; otherwise EINA_FALSE. * @ingroup Ecore_IMF_Context_Module_Group */ @@ -877,6 +1010,8 @@ _ecore_imf_event_free_preedit(void *data __UNUSED__, void *event) * Adds ECORE_IMF_EVENT_PREEDIT_START to the event queue. * * ECORE_IMF_EVENT_PREEDIT_START should be added when a new preedit sequence starts. + * It's asynchronous method to put event to the event queue. + * ecore_imf_context_event_callback_call() can be used as synchronous method. * * @param ctx An #Ecore_IMF_Context. * @ingroup Ecore_IMF_Context_Module_Group @@ -903,6 +1038,8 @@ ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx) * Adds ECORE_IMF_EVENT_PREEDIT_END to the event queue. * * ECORE_IMF_EVENT_PREEDIT_END should be added when a new preedit sequence has been completed or canceled. + * It's asynchronous method to put event to the event queue. + * ecore_imf_context_event_callback_call() can be used as synchronous method. * * @param ctx An #Ecore_IMF_Context. * @ingroup Ecore_IMF_Context_Module_Group @@ -928,6 +1065,9 @@ ecore_imf_context_preedit_end_event_add(Ecore_IMF_Context *ctx) /** * Adds ECORE_IMF_EVENT_PREEDIT_CHANGED to the event queue. * + * It's asynchronous method to put event to the event queue. + * ecore_imf_context_event_callback_call() can be used as synchronous method. + * * @param ctx An #Ecore_IMF_Context. * @ingroup Ecore_IMF_Context_Module_Group */ @@ -962,6 +1102,9 @@ _ecore_imf_event_free_commit(void *data __UNUSED__, void *event) /** * Adds ECORE_IMF_EVENT_COMMIT to the event queue. * + * It's asynchronous method to put event to the event queue. + * ecore_imf_context_event_callback_call() can be used as synchronous method. + * * @param ctx An #Ecore_IMF_Context. * @param str The committed string. * @ingroup Ecore_IMF_Context_Module_Group @@ -999,6 +1142,9 @@ _ecore_imf_event_free_delete_surrounding(void *data __UNUSED__, void *event) * by adding the ECORE_IMF_EVENT_DELETE_SURROUNDING to the event queue. * Note that offset and n_chars are in characters not in bytes. * + * It's asynchronous method to put ECORE_IMF_EVENT_DELETE_SURROUNDING event to the event queue. + * ecore_imf_context_event_callback_call() can be used as synchronous method. + * * @param ctx An #Ecore_IMF_Context. * @param offset The start offset of surrounding to be deleted. * @param n_chars The number of characters to be deleted. @@ -1041,8 +1187,20 @@ ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offse * @param func The (callback) function to be called when the event is * triggered * @param data The data pointer to be passed to @p func - * @ingroup Ecore_IMF_Context_Module_Group + * @ingroup Ecore_IMF_Context_Group * @since 1.2.0 + * + * Example + * @code + * static void + * _imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx, void *event_info) + * { + * char *commit_str = event_info; + * // something to do + * } + * + * ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_COMMIT, _imf_event_commit_cb, data); + * @endcode */ EAPI void ecore_imf_context_event_callback_add(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func, const void *data) @@ -1079,10 +1237,10 @@ ecore_imf_context_event_callback_add(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_ * @see ecore_imf_context_event_callback_add() for more details * * @param ctx Ecore_IMF_Context to remove a callback from. - * @param type The type of event that was trigerring the callback + * @param type The type of event that was triggering the callback * @param func The (callback) function that was to be called when the event was triggered * @return the data pointer - * @ingroup Ecore_IMF_Context_Module_Group + * @ingroup Ecore_IMF_Context_Group * @since 1.2.0 */ EAPI void * @@ -1096,7 +1254,7 @@ ecore_imf_context_event_callback_del(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_ { ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, "ecore_imf_context_event_callback_del"); - return; + return NULL; } if (!func) return NULL; @@ -1106,7 +1264,7 @@ ecore_imf_context_event_callback_del(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_ { if ((fn) && (fn->func == func) && (fn->type == type)) { - void *tmp = fn->data; + void *tmp = (void *)fn->data; free(fn); ctx->callbacks = eina_list_remove_list(ctx->callbacks, l); return tmp; @@ -1156,11 +1314,11 @@ ecore_imf_context_event_callback_call(Ecore_IMF_Context *ctx, Ecore_IMF_Callback * Ask the Input Method Context to show the control panel of using Input Method. * * @param ctx An #Ecore_IMF_Context. - * @ingroup Ecore_IMF_Context_IMControl_Group + * @ingroup Ecore_IMF_Context_Group * @since 1.1.0 */ EAPI void -ecore_imf_context_control_panel_show (Ecore_IMF_Context *ctx) +ecore_imf_context_control_panel_show(Ecore_IMF_Context *ctx) { if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) { @@ -1176,11 +1334,11 @@ ecore_imf_context_control_panel_show (Ecore_IMF_Context *ctx) * Ask the Input Method Context to hide the control panel of using Input Method. * * @param ctx An #Ecore_IMF_Context. - * @ingroup Ecore_IMF_Context_IMControl_Group + * @ingroup Ecore_IMF_Context_Group * @since 1.1.0 */ EAPI void -ecore_imf_context_control_panel_hide (Ecore_IMF_Context *ctx) +ecore_imf_context_control_panel_hide(Ecore_IMF_Context *ctx) { if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) { @@ -1196,7 +1354,7 @@ ecore_imf_context_control_panel_hide (Ecore_IMF_Context *ctx) * Ask the Input Method Context to show the input panel (virtual keyboard). * * @param ctx An #Ecore_IMF_Context. - * @ingroup Ecore_IMF_Context_IMControl_Group + * @ingroup Ecore_IMF_Context_Group * @since 1.1.0 */ EAPI void @@ -1216,7 +1374,7 @@ ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx) * Ask the Input Method Context to hide the input panel. * * @param ctx An #Ecore_IMF_Context. - * @ingroup Ecore_IMF_Context_IMControl_Group + * @ingroup Ecore_IMF_Context_Group * @since 1.1.0 */ EAPI void @@ -1236,12 +1394,12 @@ ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx) * Set the layout of the input panel. * * @param ctx An #Ecore_IMF_Context. - * @param layout see #ECORE_IMF_INPUT_PANEL_LAYOUT - * @ingroup Ecore_IMF_Context_IMControl_Group + * @param layout see #Ecore_IMF_Input_Panel_Layout + * @ingroup Ecore_IMF_Context_Group * @since 1.1.0 */ EAPI void -ecore_imf_context_input_panel_layout_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout) +ecore_imf_context_input_panel_layout_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout) { if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) { @@ -1261,11 +1419,11 @@ ecore_imf_context_input_panel_layout_set (Ecore_IMF_Context *ctx, Ecore_IMF_Inpu * * @param ctx An #Ecore_IMF_Context. * @return layout see #Ecore_IMF_Input_Panel_Layout - * @ingroup Ecore_IMF_Context_IMControl_Group + * @ingroup Ecore_IMF_Context_Group * @since 1.1.0 */ EAPI Ecore_IMF_Input_Panel_Layout -ecore_imf_context_input_panel_layout_get (Ecore_IMF_Context *ctx) +ecore_imf_context_input_panel_layout_get(Ecore_IMF_Context *ctx) { if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) { @@ -1275,9 +1433,7 @@ ecore_imf_context_input_panel_layout_get (Ecore_IMF_Context *ctx) } if (ctx->klass->input_panel_layout_get) - { - return ctx->input_panel_layout; - } + return ctx->input_panel_layout; else return ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID; } @@ -1288,11 +1444,11 @@ ecore_imf_context_input_panel_layout_get (Ecore_IMF_Context *ctx) * * @param ctx An #Ecore_IMF_Context. * @param lang the language to be set to the input panel. - * @ingroup Ecore_IMF_Context_IMControl_Group + * @ingroup Ecore_IMF_Context_Group * @since 1.1.0 */ EAPI void -ecore_imf_context_input_panel_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang) +ecore_imf_context_input_panel_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang) { if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) { @@ -1312,11 +1468,11 @@ ecore_imf_context_input_panel_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_In * * @param ctx An #Ecore_IMF_Context. * @return Ecore_IMF_Input_Panel_Lang - * @ingroup Ecore_IMF_Context_IMControl_Group + * @ingroup Ecore_IMF_Context_Group * @since 1.1.0 */ EAPI Ecore_IMF_Input_Panel_Lang -ecore_imf_context_input_panel_language_get (Ecore_IMF_Context *ctx) +ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx) { if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) { @@ -1338,7 +1494,7 @@ ecore_imf_context_input_panel_language_get (Ecore_IMF_Context *ctx) * @since 1.1.0 */ EAPI void -ecore_imf_context_input_panel_enabled_set (Ecore_IMF_Context *ctx, +ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool enabled) { if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) @@ -1360,7 +1516,7 @@ ecore_imf_context_input_panel_enabled_set (Ecore_IMF_Context *ctx, * @since 1.1.0 */ EAPI Eina_Bool -ecore_imf_context_input_panel_enabled_get (Ecore_IMF_Context *ctx) +ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx) { if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) { @@ -1372,3 +1528,191 @@ ecore_imf_context_input_panel_enabled_get (Ecore_IMF_Context *ctx) return ctx->input_panel_enabled; } +/** + * Set the input panel-specific data to deliver to the input panel. + * This API is used by applications to deliver specific data to the input panel. + * The data format MUST be negotiated by both application and the input panel. + * The size and format of data are defined by the input panel. + * + * @param ctx An #Ecore_IMF_Context. + * @param data The specific data to be set to the input panel. + * @param len the length of data, in bytes, to send to the input panel + * @ingroup Ecore_IMF_Context_Group + * @since 1.2.0 + */ +EAPI void +ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const void *data, int len) +{ + if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) + { + ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, + "ecore_imf_context_input_panel_imdata_set"); + return; + } + + if (!data) return; + + if (ctx->klass->input_panel_imdata_set) + ctx->klass->input_panel_imdata_set(ctx, data, len); +} + +/** + * Get the specific data of the current active input panel. + * + * @param ctx An #Ecore_IMF_Context. + * @param data The specific data to be got from the input panel + * @param len The length of data + * @ingroup Ecore_IMF_Context_Group + * @since 1.2.0 + */ +EAPI void +ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, void *data, int *len) +{ + if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) + { + ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, + "ecore_imf_context_input_panel_imdata_get"); + return; + } + + if (!data) return; + + if (ctx->klass->input_panel_imdata_get) + ctx->klass->input_panel_imdata_get(ctx, data, len); +} + +/** + * Set the "return" key type. This type is used to set string or icon on the "return" key of the input panel. + * + * An input panel displays the string or icon associated with this type + * + * @param ctx An #Ecore_IMF_Context. + * @param return_key_type The type of "return" key on the input panel + * @ingroup Ecore_IMF_Context_Group + * @since 1.2.0 + */ +EAPI void +ecore_imf_context_input_panel_return_key_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type return_key_type) +{ + if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) + { + ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, + "ecore_imf_context_input_panel_return_key_type_set"); + return; + } + + ctx->input_panel_return_key_type = return_key_type; + if (ctx->klass->input_panel_return_key_type_set) ctx->klass->input_panel_return_key_type_set(ctx, return_key_type); +} + +/** + * Get the "return" key type. + * + * @see ecore_imf_context_input_panel_return_key_type_set() for more details + * + * @param ctx An #Ecore_IMF_Context. + * @return The type of "return" key on the input panel + * @ingroup Ecore_IMF_Context_Group + * @since 1.2.0 + */ +EAPI Ecore_IMF_Input_Panel_Return_Key_Type +ecore_imf_context_input_panel_return_key_type_get(Ecore_IMF_Context *ctx) +{ + if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) + { + ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, + "ecore_imf_context_input_panel_return_key_type_get"); + return EINA_FALSE; + } + + return ctx->input_panel_return_key_type; +} + +/** + * Set the return key on the input panel to be disabled. + * + * @param ctx An #Ecore_IMF_Context. + * @param disabled The state + * @ingroup Ecore_IMF_Context_Group + * @since 1.2.0 + */ +EAPI void +ecore_imf_context_input_panel_return_key_disabled_set(Ecore_IMF_Context *ctx, Eina_Bool disabled) +{ + if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) + { + ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, + "ecore_imf_context_input_panel_return_key_disabled_set"); + return; + } + + ctx->input_panel_return_key_disabled = disabled; + if (ctx->klass->input_panel_return_key_disabled_set) ctx->klass->input_panel_return_key_disabled_set(ctx, disabled); +} + +/** + * Get whether the return key on the input panel should be disabled or not. + * + * @param ctx An #Ecore_IMF_Context. + * @return EINA_TRUE if it should be disabled + * @ingroup Ecore_IMF_Context_Group + * @since 1.2.0 + */ +EAPI Eina_Bool +ecore_imf_context_input_panel_return_key_disabled_get(Ecore_IMF_Context *ctx) +{ + if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) + { + ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, + "ecore_imf_context_input_panel_return_key_disabled_get"); + return EINA_FALSE; + } + + return ctx->input_panel_return_key_disabled; +} + +/** + * Set the caps lock mode on the input panel. + * + * @param ctx An #Ecore_IMF_Context. + * @param mode Turn on caps lock on the input panel if EINA_TRUE + * @ingroup Ecore_IMF_Context_Group + * @since 1.2.0 + */ +EAPI void +ecore_imf_context_input_panel_caps_lock_mode_set(Ecore_IMF_Context *ctx, Eina_Bool mode) +{ + if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) + { + ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, + "ecore_imf_context_input_panel_caps_lock_mode_set"); + return; + } + + if (ctx->klass->input_panel_caps_lock_mode_set) + ctx->klass->input_panel_caps_lock_mode_set(ctx, mode); + + ctx->input_panel_caps_lock_mode = mode; +} + +/** + * Get the caps lock mode on the input panel. + * + * @param ctx An #Ecore_IMF_Context. + * @return EINA_TRUE if the caps lock is turned on. + * @ingroup Ecore_IMF_Context_Group + * @since 1.2.0 + */ +EAPI Eina_Bool +ecore_imf_context_input_panel_caps_lock_mode_get(Ecore_IMF_Context *ctx) +{ + if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) + { + ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, + "ecore_imf_context_input_panel_caps_lock_mode_get"); + return EINA_FALSE; + } + + return ctx->input_panel_caps_lock_mode; +} + diff --git a/libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h b/libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h index d9dae80..b4ff0f2 100644 --- a/libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h +++ b/libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h @@ -52,8 +52,11 @@ struct _Ecore_IMF_Context Ecore_IMF_Autocapital_Type autocapital_type; Ecore_IMF_Input_Panel_Layout input_panel_layout; Ecore_IMF_Input_Panel_Lang input_panel_lang; + Ecore_IMF_Input_Panel_Return_Key_Type input_panel_return_key_type; Eina_Bool allow_prediction : 1; Eina_Bool input_panel_enabled : 1; + Eina_Bool input_panel_return_key_disabled : 1; + Eina_Bool input_panel_caps_lock_mode : 1; }; struct _Ecore_IMF_Module diff --git a/libraries/ecore/src/lib/ecore_imf_evas/Makefile.in b/libraries/ecore/src/lib/ecore_imf_evas/Makefile.in index ab6503b..1542919 100644 --- a/libraries/ecore/src/lib/ecore_imf_evas/Makefile.in +++ b/libraries/ecore/src/lib/ecore_imf_evas/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -192,6 +191,8 @@ 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@ @@ -247,6 +248,8 @@ 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@ @@ -257,6 +260,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_imf_evas/ecore_imf_evas.c b/libraries/ecore/src/lib/ecore_imf_evas/ecore_imf_evas.c index 86badf5..62ba4c8 100644 --- a/libraries/ecore/src/lib/ecore_imf_evas/ecore_imf_evas.c +++ b/libraries/ecore/src/lib/ecore_imf_evas/ecore_imf_evas.c @@ -221,6 +221,28 @@ ecore_imf_evas_event_mouse_wheel_wrap(Evas_Event_Mouse_Wheel *evas_event, * @param evas_event The received Evas event. * @param imf_event The location to store the converted Ecore_IMF event. * @ingroup Ecore_IMF_Evas_Group + * + * Example + * @code + * static void + * _key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) + * { + * Evas_Event_Key_Down *ev = event_info; + * if (!ev->keyname) return; + * + * if (imf_context) + * { + * Ecore_IMF_Event_Key_Down ecore_ev; + * ecore_imf_evas_event_key_down_wrap(ev, &ecore_ev); + * if (ecore_imf_context_filter_event(imf_context, + * ECORE_IMF_EVENT_KEY_DOWN, + * (Ecore_IMF_Event *)&ecore_ev)) + * return; + * } + * } + * + * evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_DOWN, _key_down_cb, data); + * @endcode */ EAPI void ecore_imf_evas_event_key_down_wrap(Evas_Event_Key_Down *evas_event, @@ -244,6 +266,28 @@ ecore_imf_evas_event_key_down_wrap(Evas_Event_Key_Down *evas_event, * @param evas_event The received Evas event. * @param imf_event The location to store the converted Ecore_IMF event. * @ingroup Ecore_IMF_Evas_Group + * + * Example + * @code + * static void + * _key_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) + * { + * Evas_Event_Key_Up *ev = event_info; + * if (!ev->keyname) return; + * + * if (imf_context) + * { + * Ecore_IMF_Event_Key_Up ecore_ev; + * ecore_imf_evas_event_key_up_wrap(ev, &ecore_ev); + * if (ecore_imf_context_filter_event(imf_context, + * ECORE_IMF_EVENT_KEY_UP, + * (Ecore_IMF_Event *)&ecore_ev)) + * return; + * } + * } + * + * evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_UP, _key_up_cb, data); + * @endcode */ EAPI void ecore_imf_evas_event_key_up_wrap(Evas_Event_Key_Up *evas_event, diff --git a/libraries/ecore/src/lib/ecore_input/Makefile.in b/libraries/ecore/src/lib/ecore_input/Makefile.in index f9fc99a..a3eeb2e 100644 --- a/libraries/ecore/src/lib/ecore_input/Makefile.in +++ b/libraries/ecore/src/lib/ecore_input/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -192,6 +191,8 @@ 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@ @@ -247,6 +248,8 @@ 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@ @@ -257,6 +260,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_input_evas/Makefile.in b/libraries/ecore/src/lib/ecore_input_evas/Makefile.in index d0ac95e..d3937d9 100644 --- a/libraries/ecore/src/lib/ecore_input_evas/Makefile.in +++ b/libraries/ecore/src/lib/ecore_input_evas/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -193,6 +192,8 @@ 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@ @@ -248,6 +249,8 @@ 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@ @@ -258,6 +261,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_ipc/Makefile.in b/libraries/ecore/src/lib/ecore_ipc/Makefile.in index ac2cf6f..e339ffc 100644 --- a/libraries/ecore/src/lib/ecore_ipc/Makefile.in +++ b/libraries/ecore/src/lib/ecore_ipc/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -193,6 +192,8 @@ 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@ @@ -248,6 +249,8 @@ 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@ @@ -258,6 +261,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c b/libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c index e27134d..0210f1d 100644 --- a/libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c +++ b/libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c @@ -316,7 +316,10 @@ ecore_ipc_shutdown(void) if (--_ecore_ipc_init_count != 0) return _ecore_ipc_init_count; - while (servers) ecore_ipc_server_del(eina_list_data_get(servers)); + Eina_List *l, *l2; + Ecore_Ipc_Server *svr; + EINA_LIST_FOREACH_SAFE(servers, l, l2, svr) + ecore_ipc_server_del(svr); for (i = 0; i < 6; i++) ecore_event_handler_del(handler[i]); diff --git a/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in b/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in index 487231b..54a0435 100644 --- a/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in +++ b/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -194,6 +193,8 @@ 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@ @@ -249,6 +250,8 @@ 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@ @@ -259,6 +262,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_sdl/Makefile.in b/libraries/ecore/src/lib/ecore_sdl/Makefile.in index c0312b0..50003ab 100644 --- a/libraries/ecore/src/lib/ecore_sdl/Makefile.in +++ b/libraries/ecore/src/lib/ecore_sdl/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -193,6 +192,8 @@ 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@ @@ -248,6 +249,8 @@ 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@ @@ -258,6 +261,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h b/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h index fdf6314..7dab37c 100644 --- a/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h +++ b/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h @@ -1,8 +1,13 @@ #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 @@ -18,71 +23,233 @@ # 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; -typedef struct _Ecore_Wl_Drag_Source Ecore_Wl_Drag_Source; +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 +}; -typedef struct _Ecore_Wl_Event_Drag_Start Ecore_Wl_Event_Drag_Start; -typedef struct _Ecore_Wl_Event_Drag_Stop Ecore_Wl_Event_Drag_Stop; +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_Event_Mouse_In +struct _Ecore_Wl_Display { - int modifiers; - int x, y; + 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 { - int x, y; - } root; + 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; +}; - unsigned int window; +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; - unsigned int time; + /* 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_Out +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; +}; - unsigned int window; +struct _Ecore_Wl_Event_Focus_In +{ + unsigned int win; + unsigned int timestamp; +}; - unsigned int time; +struct _Ecore_Wl_Event_Focus_Out +{ + unsigned int win; + unsigned int timestamp; }; -struct _Ecore_Wl_Event_Focus_In +struct _Ecore_Wl_Event_Window_Configure { - unsigned int window; - /* TODO: mode & detail */ - unsigned int time; + unsigned int win; + unsigned int event_win; + int x, y, w, h; + unsigned int timestamp; }; -struct _Ecore_Wl_Event_Focus_Out +struct _Ecore_Wl_Event_Dnd_Enter { - unsigned int window; - /* TODO: mode & detail */ - unsigned int time; + unsigned int win, source; + char **types; + int num_types; + struct + { + int x, y; + } position; }; -struct _Ecore_Wl_Event_Drag_Start +struct _Ecore_Wl_Event_Dnd_Position { - struct wl_data_device *device; - struct wl_surface *surface; - const char *mime_type; - uint32_t timestamp; + unsigned int win, source; + struct + { + int x, y; + } position; }; -struct _Ecore_Wl_Event_Drag_Stop +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; }; /** @@ -92,32 +259,46 @@ struct _Ecore_Wl_Event_Drag_Stop * 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 struct wl_display *ecore_wl_display_get(void); -EAPI struct wl_shm *ecore_wl_shm_get(void); -EAPI struct wl_compositor *ecore_wl_compositor_get(void); -EAPI struct wl_shell *ecore_wl_shell_get(void); -EAPI struct wl_input_device *ecore_wl_input_device_get(void); -EAPI void ecore_wl_screen_size_get(int *w, int *h); -EAPI unsigned int ecore_wl_format_get(void); EAPI void ecore_wl_flush(void); EAPI void ecore_wl_sync(void); +EAPI 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_Drag_Source *ecore_wl_drag_source_create(int hotspot_x, int hotspot_y, int offset_x, int offset_y, const char *mimetype, unsigned int timestamp, void *data); -EAPI void ecore_wl_drag_start(Ecore_Wl_Drag_Source *source, struct wl_surface *surface, struct wl_buffer *buffer); -EAPI void ecore_wl_drag_stop(void); - -EAPI extern int ECORE_WL_EVENT_MOUSE_IN; -EAPI extern int ECORE_WL_EVENT_MOUSE_OUT; -EAPI extern int ECORE_WL_EVENT_FOCUS_IN; -EAPI extern int ECORE_WL_EVENT_FOCUS_OUT; -EAPI extern int ECORE_WL_EVENT_DRAG_START; -EAPI extern int ECORE_WL_EVENT_DRAG_STOP; +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 index ea005b2..f6b801d 100644 --- a/libraries/ecore/src/lib/ecore_wayland/Makefile.am +++ b/libraries/ecore/src/lib/ecore_wayland/Makefile.am @@ -14,9 +14,11 @@ includes_HEADERS = Ecore_Wayland.h includesdir = $(includedir)/ecore-@VMAJ@ libecore_wayland_la_SOURCES = \ -ecore_wl.c - -## ecore_wl_window.c +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 \ diff --git a/libraries/ecore/src/lib/ecore_wayland/Makefile.in b/libraries/ecore/src/lib/ecore_wayland/Makefile.in index 411da19..39c633d 100644 --- a/libraries/ecore/src/lib/ecore_wayland/Makefile.in +++ b/libraries/ecore/src/lib/ecore_wayland/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -86,7 +85,8 @@ am__base_list = \ 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 +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)) @@ -190,6 +190,8 @@ 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@ @@ -245,6 +247,8 @@ 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@ @@ -255,6 +259,7 @@ 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@ @@ -482,7 +487,11 @@ lib_LTLIBRARIES = libecore_wayland.la includes_HEADERS = Ecore_Wayland.h includesdir = $(includedir)/ecore-@VMAJ@ libecore_wayland_la_SOURCES = \ -ecore_wl.c +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 \ @@ -569,6 +578,10 @@ 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 $@ $< diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c b/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c index f62503b..5f1b20d 100644 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c +++ b/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c @@ -1,16 +1,11 @@ #ifdef HAVE_CONFIG_H -# include "config.h" +# include #endif -#include "Ecore.h" -#include "ecore_private.h" -#include "Ecore_Input.h" -#include "ecore_wl_private.h" -#include "Ecore_Wayland.h" +#include /* FIXME: This gives BTN_LEFT/RIGHT/MIDDLE for linux systems ... * What about other OSs ?? */ -#include #ifdef __linux__ # include #else @@ -23,150 +18,86 @@ # define BTN_BACK 0x116 #endif -#include +#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_display); -static void _ecore_wl_cb_disp_handle_global(struct wl_display *disp, uint32_t id, const char *interface, uint32_t version __UNUSED__, void *data __UNUSED__); -static int _ecore_wl_cb_disp_event_mask_update(uint32_t mask, void *data __UNUSED__); -static void _ecore_wl_cb_disp_handle_geometry(void *data __UNUSED__, struct wl_output *output __UNUSED__, int x, int y, int pw __UNUSED__, int ph __UNUSED__, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__); -static void _ecore_wl_cb_disp_handle_mode(void *data __UNUSED__, struct wl_output *output __UNUSED__, uint32_t flags, int w, int h, int refresh __UNUSED__); -static Eina_Bool _ecore_wl_cb_fd_handle(void *data, Ecore_Fd_Handler *hdl __UNUSED__); -static void _ecore_wl_cb_handle_motion(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, int32_t x, int32_t y, int32_t sx, int32_t sy); -static void _ecore_wl_cb_handle_button(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, uint32_t btn, uint32_t state); -static void _ecore_wl_cb_handle_key(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t __UNUSED__, uint32_t key, uint32_t state); -static void _ecore_wl_cb_handle_pointer_focus(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, struct wl_surface *surface, int32_t x, int32_t y, int32_t sx, int32_t sy); -static void _ecore_wl_cb_handle_keyboard_focus(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t __UNUSED__, struct wl_surface *surface, struct wl_array *keys); -static void _ecore_wl_cb_handle_touch_down(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, struct wl_surface *surface, int32_t id, int32_t x, int32_t y); -static void _ecore_wl_cb_handle_touch_up(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id); -static void _ecore_wl_cb_handle_touch_motion(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id, int32_t x, int32_t y); -static void _ecore_wl_cb_handle_touch_frame(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__); -static void _ecore_wl_cb_handle_touch_cancel(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__); -static void _ecore_wl_cb_source_target(void *data, struct wl_data_source *source __UNUSED__, const char *mime_type __UNUSED__); -static void _ecore_wl_cb_source_send(void *data, struct wl_data_source *source, const char *mime_type, int32_t fd); -static void _ecore_wl_cb_source_cancelled(void *data, struct wl_data_source *source __UNUSED__); -static void _ecore_wl_cb_source_offer(void *data, struct wl_data_offer *offer __UNUSED__, const char *type); -static void _ecore_wl_cb_data_offer(void *data, struct wl_data_device *data_dev, uint32_t id); -static void _ecore_wl_cb_data_enter(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, struct wl_surface *surface, int32_t x, int32_t y, struct wl_data_offer *offer); -static void _ecore_wl_cb_data_leave(void *data __UNUSED__, struct wl_data_device *data_dev); -static void _ecore_wl_cb_data_motion(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, int32_t x, int32_t y); -static void _ecore_wl_cb_data_drop(void *data __UNUSED__, struct wl_data_device *data_dev); -static void _ecore_wl_cb_data_selection(void *data, struct wl_data_device *data_dev, struct wl_data_offer *offer); - -static void _ecore_wl_mouse_move_send(uint32_t timestamp); -static void _ecore_wl_mouse_out_send(struct wl_surface *surface, uint32_t timestamp); -static void _ecore_wl_mouse_in_send(struct wl_surface *surface, uint32_t timestamp); -static void _ecore_wl_mouse_up_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp); -static void _ecore_wl_mouse_down_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp); -static void _ecore_wl_focus_out_send(struct wl_surface *surface, uint32_t timestamp); -static void _ecore_wl_focus_in_send(struct wl_surface *surface, uint32_t timestamp); +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; -static struct wl_display *_ecore_wl_disp = NULL; -static uint32_t _ecore_wl_disp_mask = 0; -static uint32_t _ecore_wl_disp_format = WL_SHM_FORMAT_ARGB8888; -static Eina_Rectangle _ecore_wl_screen; -static Ecore_Fd_Handler *_ecore_wl_fd_hdl = NULL; -static int _ecore_wl_screen_x = 0; -static int _ecore_wl_screen_y = 0; -static int _ecore_wl_surface_x = 0; -static int _ecore_wl_surface_y = 0; -static int _ecore_wl_touch_x = 0; -static int _ecore_wl_touch_y = 0; -static int _ecore_wl_input_modifiers = 0; -static struct xkb_desc *_ecore_wl_xkb; -static uint32_t _ecore_wl_input_button = 0; - -static struct wl_compositor *_ecore_wl_comp; -static struct wl_shm *_ecore_wl_shm; -static struct wl_shell *_ecore_wl_shell; -static struct wl_output *_ecore_wl_output; -static struct wl_input_device *_ecore_wl_input_dev; -static struct wl_surface *_ecore_wl_input_surface; -static struct wl_surface *_ecore_wl_touch_surface; -static struct wl_data_device_manager *_ecore_wl_data_manager; -static struct wl_data_device *_ecore_wl_data_dev; - -static const struct wl_output_listener _ecore_wl_output_listener = -{ - _ecore_wl_cb_disp_handle_geometry, - _ecore_wl_cb_disp_handle_mode -}; -static const struct wl_input_device_listener _ecore_wl_input_listener = -{ - _ecore_wl_cb_handle_motion, - _ecore_wl_cb_handle_button, - _ecore_wl_cb_handle_key, - _ecore_wl_cb_handle_pointer_focus, - _ecore_wl_cb_handle_keyboard_focus, - _ecore_wl_cb_handle_touch_down, - _ecore_wl_cb_handle_touch_up, - _ecore_wl_cb_handle_touch_motion, - _ecore_wl_cb_handle_touch_frame, - _ecore_wl_cb_handle_touch_cancel, -}; -static const struct wl_data_source_listener _ecore_wl_source_listener = -{ - _ecore_wl_cb_source_target, - _ecore_wl_cb_source_send, - _ecore_wl_cb_source_cancelled -}; -static const struct wl_data_device_listener _ecore_wl_data_listener = -{ - _ecore_wl_cb_data_offer, - _ecore_wl_cb_data_enter, - _ecore_wl_cb_data_leave, - _ecore_wl_cb_data_motion, - _ecore_wl_cb_data_drop, - _ecore_wl_cb_data_selection -}; -static const struct wl_data_offer_listener _ecore_wl_offer_listener = -{ - _ecore_wl_cb_source_offer, -}; /* external variables */ int _ecore_wl_log_dom = -1; +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_DRAG_START = 0; -EAPI int ECORE_WL_EVENT_DRAG_STOP = 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) +ecore_wl_init(const char *name) { - struct xkb_rule_names xkb_names; - int fd = 0; - - if (++_ecore_wl_init_count != 1) - return _ecore_wl_init_count; - LOGFN(__FILE__, __LINE__, __FUNCTION__); + if (++_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) + if (_ecore_wl_log_dom < 0) { - EINA_LOG_ERR("Cannot create a log domain for Ecore Wayland."); + EINA_LOG_ERR("Cannot create a log domain for Ecore Wayland"); eina_shutdown(); return --_ecore_wl_init_count; } - if (!ecore_init()) + 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()) + 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(); @@ -174,26 +105,23 @@ ecore_wl_init(const char *name) return --_ecore_wl_init_count; } - if (!ECORE_WL_EVENT_MOUSE_IN) + if (!ECORE_WL_EVENT_MOUSE_IN) { ECORE_WL_EVENT_MOUSE_IN = ecore_event_type_new(); ECORE_WL_EVENT_MOUSE_OUT = ecore_event_type_new(); ECORE_WL_EVENT_FOCUS_IN = ecore_event_type_new(); ECORE_WL_EVENT_FOCUS_OUT = ecore_event_type_new(); - ECORE_WL_EVENT_DRAG_START = ecore_event_type_new(); - ECORE_WL_EVENT_DRAG_STOP = ecore_event_type_new(); + 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(); } - /* init xkb */ - /* FIXME: Somehow make this portable to other languages/countries */ - xkb_names.rules = "evdev"; - xkb_names.model = "evdev"; - xkb_names.layout = "us"; - xkb_names.variant = ""; - xkb_names.options = ""; - if (!(_ecore_wl_xkb = xkb_compile_keymap_from_rules(&xkb_names))) + if (!(_ecore_wl_disp = malloc(sizeof(Ecore_Wl_Display)))) { - ERR("Could not compile keymap"); + 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(); @@ -202,9 +130,11 @@ ecore_wl_init(const char *name) return --_ecore_wl_init_count; } - /* connect to the wayland display */ - if (!(_ecore_wl_disp = wl_display_connect(name))) + 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(); @@ -213,23 +143,48 @@ ecore_wl_init(const char *name) return --_ecore_wl_init_count; } - /* setup handler for wayland interfaces */ - wl_display_add_global_listener(_ecore_wl_disp, - _ecore_wl_cb_disp_handle_global, NULL); + _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; */ + /* } */ - /* process connection events */ - wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_READABLE); + /* _ecore_wl_disp->create_image = */ + /* (void *)eglGetProcAddress("eglCreateImageKHR"); */ + /* _ecore_wl_disp->destroy_image = */ + /* (void *)eglGetProcAddress("eglDestroyImageKHR"); */ - fd = wl_display_get_fd(_ecore_wl_disp, - _ecore_wl_cb_disp_event_mask_update, NULL); + /* TODO: create pointer surfaces */ - _ecore_wl_fd_hdl = - ecore_main_fd_handler_add(fd, ECORE_FD_READ, _ecore_wl_cb_fd_handle, - _ecore_wl_disp, NULL, NULL); - if (!_ecore_wl_fd_hdl) + if (!_ecore_wl_xkb_init(_ecore_wl_disp)) { - wl_display_destroy(_ecore_wl_disp); - _ecore_wl_disp = NULL; + 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(); @@ -238,976 +193,359 @@ ecore_wl_init(const char *name) 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) +ecore_wl_shutdown(void) { - return _ecore_wl_shutdown(EINA_TRUE); -} - -EAPI struct wl_display * -ecore_wl_display_get(void) -{ - return _ecore_wl_disp; -} - -EAPI struct wl_shm * -ecore_wl_shm_get(void) -{ - return _ecore_wl_shm; -} - -EAPI struct wl_compositor * -ecore_wl_compositor_get(void) -{ - return _ecore_wl_comp; -} + LOGFN(__FILE__, __LINE__, __FUNCTION__); -EAPI struct wl_shell * -ecore_wl_shell_get(void) -{ - return _ecore_wl_shell; + return _ecore_wl_shutdown(EINA_TRUE); } -EAPI struct wl_input_device * -ecore_wl_input_device_get(void) -{ - return _ecore_wl_input_dev; -} +/** + * @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_screen_size_get(int *w, int *h) +ecore_wl_flush(void) { - if (w) *w = _ecore_wl_screen.w; - if (h) *h = _ecore_wl_screen.h; -} - -EAPI unsigned int -ecore_wl_format_get(void) -{ - return _ecore_wl_disp_format; -} + LOGFN(__FILE__, __LINE__, __FUNCTION__); -EAPI void -ecore_wl_flush(void) -{ - wl_display_flush(_ecore_wl_disp); + 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) +ecore_wl_sync(void) { - wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_READABLE); -} + LOGFN(__FILE__, __LINE__, __FUNCTION__); -EAPI void -ecore_wl_pointer_xy_get(int *x, int *y) + 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) { - if (x) *x = _ecore_wl_screen_x; - if (y) *y = _ecore_wl_screen_y; + return _ecore_wl_disp->wl.shm; } -EAPI Ecore_Wl_Drag_Source * -ecore_wl_drag_source_create(int hotspot_x, int hotspot_y, int offset_x, int offset_y, const char *mimetype, unsigned int timestamp, void *data) +/** + * 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) { - Ecore_Wl_Drag_Source *source; - - if (!(source = calloc(1, sizeof(Ecore_Wl_Drag_Source)))) return NULL; - - source->data_dev = _ecore_wl_data_dev; - source->hotspot_x = hotspot_x; - source->hotspot_y = hotspot_y; - source->offset_x = offset_x; - source->offset_y = offset_y; - source->mimetype = mimetype; - source->timestamp = timestamp; - source->data = data; - - source->data_source = - wl_data_device_manager_create_data_source(_ecore_wl_data_manager); - - wl_data_source_add_listener(source->data_source, - &_ecore_wl_source_listener, source); - - wl_data_source_offer(source->data_source, source->mimetype); - - /* NB: Do we add some default mimetypes here ?? */ - /* text/plain, etc */ - - return source; + 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_drag_start(Ecore_Wl_Drag_Source *source, struct wl_surface *surface, struct wl_buffer *buffer) +ecore_wl_screen_size_get(int *w, int *h) { - source->buffer = buffer; + LOGFN(__FILE__, __LINE__, __FUNCTION__); - wl_data_device_start_drag(source->data_dev, source->data_source, - surface, source->timestamp); + 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_drag_stop(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_display) +_ecore_wl_shutdown(Eina_Bool close) { LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (--_ecore_wl_init_count != 0) - return _ecore_wl_init_count; - + if (--_ecore_wl_init_count != 0) return _ecore_wl_init_count; if (!_ecore_wl_disp) return _ecore_wl_init_count; - if (_ecore_wl_xkb) free(_ecore_wl_xkb); + _ecore_wl_window_shutdown(); - if (_ecore_wl_fd_hdl) ecore_main_fd_handler_del(_ecore_wl_fd_hdl); - _ecore_wl_fd_hdl = NULL; + if (_ecore_wl_disp->fd_hdl) + ecore_main_fd_handler_del(_ecore_wl_disp->fd_hdl); - if (close_display) + if (close) { - if (_ecore_wl_data_dev) wl_data_device_destroy(_ecore_wl_data_dev); - if (_ecore_wl_input_dev) wl_input_device_destroy(_ecore_wl_input_dev); - if (_ecore_wl_data_manager) - wl_data_device_manager_destroy(_ecore_wl_data_manager); - if (_ecore_wl_shell) wl_shell_destroy(_ecore_wl_shell); - if (_ecore_wl_shm) wl_shm_destroy(_ecore_wl_shm); - if (_ecore_wl_comp) wl_compositor_destroy(_ecore_wl_comp); - if (_ecore_wl_disp) + 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_destroy(_ecore_wl_disp); + wl_display_flush(_ecore_wl_disp->wl.display); + wl_display_disconnect(_ecore_wl_disp->wl.display); } - _ecore_wl_disp = NULL; + free(_ecore_wl_disp); } - eina_log_domain_unregister(_ecore_wl_log_dom); - _ecore_wl_log_dom = -1; - 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 void -_ecore_wl_cb_disp_handle_global(struct wl_display *disp, uint32_t id, const char *interface, uint32_t version __UNUSED__, void *data __UNUSED__) -{ -// LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (disp != _ecore_wl_disp) return; - if (!strcmp(interface, "wl_compositor")) - { - _ecore_wl_comp = - wl_display_bind(_ecore_wl_disp, id, &wl_compositor_interface); - } - else if (!strcmp(interface, "wl_shm")) - { - _ecore_wl_shm = - wl_display_bind(_ecore_wl_disp, id, &wl_shm_interface); - } - else if (!strcmp(interface, "wl_output")) - { - _ecore_wl_output = - wl_display_bind(_ecore_wl_disp, id, &wl_output_interface); - wl_output_add_listener(_ecore_wl_output, - &_ecore_wl_output_listener, NULL); - } - else if (!strcmp(interface, "wl_shell")) - { - _ecore_wl_shell = - wl_display_bind(_ecore_wl_disp, id, &wl_shell_interface); - } - else if (!strcmp(interface, "wl_input_device")) - { - _ecore_wl_input_dev = - wl_display_bind(_ecore_wl_disp, id, &wl_input_device_interface); - wl_input_device_add_listener(_ecore_wl_input_dev, - &_ecore_wl_input_listener, NULL); - } - else if (!strcmp(interface, "wl_data_device_manager")) - { - _ecore_wl_data_manager = - wl_display_bind(_ecore_wl_disp, id, - &wl_data_device_manager_interface); - } - - if ((_ecore_wl_input_dev) && (_ecore_wl_data_manager) && (!_ecore_wl_data_dev)) - { - _ecore_wl_data_dev = - wl_data_device_manager_get_data_device(_ecore_wl_data_manager, - _ecore_wl_input_dev); - wl_data_device_add_listener(_ecore_wl_data_dev, - &_ecore_wl_data_listener, NULL); - } -} - static int -_ecore_wl_cb_disp_event_mask_update(uint32_t mask, void *data __UNUSED__) +_ecore_wl_cb_event_mask_update(unsigned int mask, void *data) { -// LOGFN(__FILE__, __LINE__, __FUNCTION__); + Ecore_Wl_Display *ewd; - _ecore_wl_disp_mask = mask; + LOGFN(__FILE__, __LINE__, __FUNCTION__); + ewd = data; + ewd->mask = mask; return 0; } -static void -_ecore_wl_cb_disp_handle_geometry(void *data __UNUSED__, struct wl_output *output __UNUSED__, int x, int y, int pw __UNUSED__, int ph __UNUSED__, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__) -{ - _ecore_wl_screen.x = x; - _ecore_wl_screen.y = y; -} - -static void -_ecore_wl_cb_disp_handle_mode(void *data __UNUSED__, struct wl_output *output __UNUSED__, uint32_t flags, int w, int h, int refresh __UNUSED__) -{ - if (flags & WL_OUTPUT_MODE_CURRENT) - { - _ecore_wl_screen.w = w; - _ecore_wl_screen.h = h; - } -} - static Eina_Bool -_ecore_wl_cb_fd_handle(void *data, Ecore_Fd_Handler *hdl __UNUSED__) +_ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl __UNUSED__) { - struct wl_display *disp; - -// LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!(disp = data)) return ECORE_CALLBACK_RENEW; - if (disp != _ecore_wl_disp) return ECORE_CALLBACK_RENEW; + Ecore_Wl_Display *ewd; - if (_ecore_wl_disp_mask & WL_DISPLAY_WRITABLE) - wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_WRITABLE); - - if (_ecore_wl_disp_mask & WL_DISPLAY_READABLE) - wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_READABLE); + 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_motion(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, int32_t x, int32_t y, int32_t sx, int32_t sy) -{ - if (dev != _ecore_wl_input_dev) return; - - _ecore_wl_screen_x = x; - _ecore_wl_screen_y = y; - _ecore_wl_surface_x = sx; - _ecore_wl_surface_y = sy; - - _ecore_wl_mouse_move_send(t); -} - -static void -_ecore_wl_cb_handle_button(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, uint32_t btn, uint32_t state) -{ - if (dev != _ecore_wl_input_dev) return; - - if ((btn >= BTN_SIDE) && (btn <= BTN_BACK)) - { - Ecore_Event_Mouse_Wheel *ev; - - if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Wheel)))) return; - - ev->timestamp = t; - ev->x = _ecore_wl_surface_x; - ev->y = _ecore_wl_surface_y; - ev->root.x = _ecore_wl_screen_x; - ev->root.y = _ecore_wl_screen_y; - ev->modifiers = _ecore_wl_input_modifiers; - ev->direction = 0; - - if (_ecore_wl_input_surface) - { - unsigned int id = 0; - - if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_input_surface))) - { - ev->window = id; - ev->event_window = id; - } - } - - /* NB: (FIXME) Currently Wayland provides no measure of how much the - * wheel has scrolled (read: delta of movement). So for now, we will - * just assume that the amount scrolled is 1 */ - if ((btn == BTN_EXTRA) || (btn == BTN_FORWARD)) // down - ev->z = 1; - else if ((btn == BTN_SIDE) || (btn == BTN_BACK)) // up - ev->z = -1; - - ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL); - } - else - { - if (state) - { - _ecore_wl_input_button = btn; - _ecore_wl_mouse_down_send(_ecore_wl_input_surface, btn, t); - /* NB: Ideally, this is not the place to check for drags. - * IMO, drags should be handled by the client. EG: we raise the - * mouse_down to the client, and the client can 'request' a - * drag_start from ecore_wl */ - if ((_ecore_wl_input_surface) || (_ecore_wl_touch_surface)) - { - /* record item which was grabbed. - * create drag source. start drag */ - } - } - else - { - if ((_ecore_wl_input_surface) || (_ecore_wl_touch_surface)) - { - /* release grabbed button and finish drag */ - if ((_ecore_wl_input_button) && - (_ecore_wl_input_button == btn)) - { - - } - } - _ecore_wl_input_button = 0; - _ecore_wl_mouse_up_send(_ecore_wl_input_surface, btn, t); - } - } -} - -static void -_ecore_wl_cb_handle_key(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t __UNUSED__, uint32_t key, uint32_t state) +_ecore_wl_cb_handle_global(struct wl_display *disp, unsigned int id, const char *interface, unsigned int version __UNUSED__, void *data) { - unsigned int keycode = 0; + Ecore_Wl_Display *ewd; - if (dev != _ecore_wl_input_dev) return; + LOGFN(__FILE__, __LINE__, __FUNCTION__); - keycode = key + _ecore_wl_xkb->min_key_code; + if ((!strcmp(interface, "wl_display")) || + (!strcmp(interface, "wl_drm")) || + (!strcmp(interface, "desktop_shell"))) + return; - if (state) - _ecore_wl_input_modifiers |= _ecore_wl_xkb->map->modmap[keycode]; - else - _ecore_wl_input_modifiers &= ~_ecore_wl_xkb->map->modmap[keycode]; -} + ewd = data; -static void -_ecore_wl_cb_handle_pointer_focus(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, struct wl_surface *surface, int32_t x, int32_t y, int32_t sx, int32_t sy) -{ - if (dev != _ecore_wl_input_dev) return; - - /* NB: Wayland pointer focus is weird. It's not pointer focus in the normal - * sense...Wayland 'moving/resizing' (and maybe other stuff) has a habit - * of stealing the pointer focus and thus this cannot be used to control - * normal pointer focus. On mouse down, the 'active' surface is stolen - * by Wayland for the grab, so 'surface' here ends up being NULL. When a - * move or resize is finished, we get this event again, but this time - * with an active surface */ - _ecore_wl_screen_x = x; - _ecore_wl_screen_y = y; - _ecore_wl_surface_x = sx; - _ecore_wl_surface_y = sy; - - if ((_ecore_wl_input_surface) && (_ecore_wl_input_surface != surface)) + if (!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")) { - if (!_ecore_wl_input_button) - _ecore_wl_mouse_out_send(_ecore_wl_input_surface, t); + ewd->wl.data_device_manager = + wl_display_bind(disp, id, &wl_data_device_manager_interface); } - if (surface) + if ((ewd->wl.compositor) && (ewd->wl.shm) && (ewd->wl.shell)) { - if (_ecore_wl_input_button) - { - _ecore_wl_mouse_up_send(surface, _ecore_wl_input_button, t); - _ecore_wl_input_button = 0; - } - else - _ecore_wl_mouse_in_send(surface, t); - } -} - -static void -_ecore_wl_cb_handle_keyboard_focus(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, struct wl_surface *surface, struct wl_array *keys) -{ - unsigned int *keyend = 0, *i = 0; - - if (dev != _ecore_wl_input_dev) return; - - /* NB: Remove old keyboard focus */ - if ((_ecore_wl_input_surface) && (_ecore_wl_input_surface != surface)) - _ecore_wl_focus_out_send(_ecore_wl_input_surface, t); + Ecore_Wl_Event_Interfaces_Bound *ev; - _ecore_wl_input_surface = NULL; + if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Interfaces_Bound)))) + return; - keyend = keys->data + keys->size; - _ecore_wl_input_modifiers = 0; - for (i = keys->data; i < keyend; i++) - _ecore_wl_input_modifiers |= _ecore_wl_xkb->map->modmap[*i]; + ev->compositor = (ewd->wl.compositor != NULL); + ev->shm = (ewd->wl.shm != NULL); + ev->shell = (ewd->wl.shell != NULL); - if (surface) - { - /* set new input surface */ - _ecore_wl_input_surface = surface; - - /* send mouse in to new surface */ - /* _ecore_wl_mouse_in_send(surface, t); */ - - /* send focus to new surface */ - _ecore_wl_focus_in_send(surface, t); + ecore_event_add(ECORE_WL_EVENT_INTERFACES_BOUND, ev, NULL, NULL); } } -static void -_ecore_wl_cb_handle_touch_down(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, struct wl_surface *surface, int32_t id, int32_t x, int32_t y) +static Eina_Bool +_ecore_wl_egl_init(Ecore_Wl_Display *ewd) { - Ecore_Event_Mouse_Button *ev; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - _ecore_wl_touch_surface = surface; - _ecore_wl_touch_x = x; - _ecore_wl_touch_y = y; - - if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; - - ev->timestamp = timestamp; - - /* NB: Need to verify using x,y for these */ - ev->x = x; - ev->y = y; - ev->root.x = x; - ev->root.y = y; - ev->modifiers = 0; - ev->buttons = 0; - ev->same_screen = 1; - - /* FIXME: Need to get these from Wayland somehow */ - ev->double_click = 0; - ev->triple_click = 0; - - ev->multi.device = id; - ev->multi.radius = 1; - ev->multi.radius_x = 1; - ev->multi.radius_y = 1; - ev->multi.pressure = 1.0; - ev->multi.angle = 0.0; - /* NB: Need to verify using x,y for these */ - ev->multi.x = x; - ev->multi.y = y; - ev->multi.root.x = x; - ev->multi.root.y = y; - + EGLint major, minor, n; + static const EGLint context_attribs[] = { - unsigned int id = 0; - - if ((id = (unsigned int)wl_surface_get_user_data(surface))) - { - ev->window = id; - ev->event_window = id; - } - } - - ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL); -} - -static void -_ecore_wl_cb_handle_touch_up(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id) -{ - Ecore_Event_Mouse_Button *ev; + 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__); - if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; - - ev->timestamp = timestamp; - - /* TODO: Need to verify using x,y for these */ - ev->x = _ecore_wl_touch_x; - ev->y = _ecore_wl_touch_y; - ev->root.x = _ecore_wl_touch_x; - ev->root.y = _ecore_wl_touch_y; - ev->modifiers = 0; - ev->buttons = 0; - ev->same_screen = 1; - - /* FIXME: Need to get these from Wayland somehow */ - ev->double_click = 0; - ev->triple_click = 0; - - ev->multi.device = id; - ev->multi.radius = 1; - ev->multi.radius_x = 1; - ev->multi.radius_y = 1; - ev->multi.pressure = 1.0; - ev->multi.angle = 0.0; - - /* TODO: Need to verify using x,y for these */ - ev->multi.x = _ecore_wl_touch_x; - ev->multi.y = _ecore_wl_touch_y; - ev->multi.root.x = _ecore_wl_touch_x; - ev->multi.root.y = _ecore_wl_touch_y; - + ewd->egl.display = eglGetDisplay(ewd->wl.display); + if (!eglInitialize(ewd->egl.display, &major, &minor)) { - unsigned int id = 0; - - if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_touch_surface))) - { - ev->window = id; - ev->event_window = id; - } + ERR("Failed to initialize EGL display"); + return EINA_FALSE; } - _ecore_wl_touch_surface = NULL; - - ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL); -} - -static void -_ecore_wl_cb_handle_touch_motion(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id, int32_t x, int32_t y) -{ - Ecore_Event_Mouse_Move *ev; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - if (!_ecore_wl_touch_surface) return; - - if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Move)))) return; - - ev->timestamp = timestamp; - /* TODO: Need to verify using x,y for these */ - ev->x = x; - ev->y = y; - ev->root.x = x; - ev->root.y = y; - ev->modifiers = 0; //_ecore_wl_input_modifiers; - ev->same_screen = 1; - - ev->multi.device = id; - ev->multi.radius = 1; - ev->multi.radius_x = 1; - ev->multi.radius_y = 1; - ev->multi.pressure = 1.0; - ev->multi.angle = 0.0; - - /* TODO: Need to verify using x,y for these */ - ev->multi.x = x; - ev->multi.y = y; - ev->multi.root.x = x; - ev->multi.root.y = y; - + if (!eglBindAPI(EGL_OPENGL_ES_API)) { - unsigned int id = 0; - - if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_touch_surface))) - { - ev->window = id; - ev->event_window = id; - } + ERR("Failed to bind EGL Api"); + return EINA_FALSE; } - ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL); -} - -static void -_ecore_wl_cb_handle_touch_frame(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - /* FIXME: Need to get a device and actually test what happens here */ -} - -static void -_ecore_wl_cb_handle_touch_cancel(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__) -{ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - /* FIXME: Need to get a device and actually test what happens here */ - _ecore_wl_touch_surface = NULL; -} - -static void -_ecore_wl_cb_source_target(void *data, struct wl_data_source *source __UNUSED__, const char *mime_type __UNUSED__) -{ - Ecore_Wl_Drag_Source *s; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - printf("Ecore_Wl Source Target\n"); - if (!(s = data)) return; - printf("\tHave Drag Source\n"); - - /* FIXME: buffer here should really be the mouse cursor buffer */ - wl_data_device_attach(s->data_dev, s->timestamp, s->buffer, - s->hotspot_x, s->hotspot_y); -} - -static void -_ecore_wl_cb_source_send(void *data, struct wl_data_source *source, const char *mime_type, int32_t fd) -{ - Ecore_Wl_Drag_Source *s; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - printf("Ecore_Wl Source Send\n"); - if (!(s = data)) return; - printf("\tHave Drag Source\n"); - - /* FIXME: write message to fd */ - - /* NB: Wayland really sucks in this regard. Why should selection stuff - * require an 'fd' ?? */ -} - -static void -_ecore_wl_cb_source_cancelled(void *data, struct wl_data_source *source __UNUSED__) -{ - Ecore_Wl_Drag_Source *s; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - - /* The cancelled event usually means source is no longer in use by - * the drag (or selection). */ - - printf("Ecore_Wl Source Cancel\n"); - if (!(s = data)) return; - printf("\tHave Drag Source\n"); - - /* FIXME: raise this to ecore_evas so the surface/buffer - * of the drag can be destroyed */ - - if (s->data_source) wl_data_source_destroy(s->data_source); - s->data_source = NULL; - - free(s); -} - -static void -_ecore_wl_cb_source_offer(void *data, struct wl_data_offer *offer __UNUSED__, const char *type) -{ - Ecore_Wl_Dnd_Source *s; - - if (!(s = data)) return; - eina_array_push(s->types, strdup(type)); -} - -static void -_ecore_wl_cb_data_offer(void *data, struct wl_data_device *data_dev, uint32_t id) -{ - Ecore_Wl_Dnd_Source *source; - - /* create a new 'data offer' structure and setup a listener for it */ - if (!(source = calloc(1, sizeof(Ecore_Wl_Dnd_Source)))) return; - - source->types = eina_array_new(1); - source->data = data; - source->refs = 1; - - /* FIXME: This will need to change when Wayland has typesafe wrappers for this */ - source->offer = (struct wl_data_offer *) - wl_proxy_create_for_id((struct wl_proxy *)data_dev, - id, &wl_data_offer_interface); - - wl_data_device_set_user_data(data_dev, source); - wl_data_offer_add_listener(source->offer, &_ecore_wl_offer_listener, source); -} - -static void -_ecore_wl_cb_data_enter(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, struct wl_surface *surface, int32_t x, int32_t y, struct wl_data_offer *offer) -{ - Ecore_Wl_Dnd_Source *source; - - if (!(source = wl_data_device_get_user_data(data_dev))) return; - - /* TODO: maybe set pointer focus here ?? */ - - source->timestamp = timestamp; -} - -static void -_ecore_wl_cb_data_leave(void *data __UNUSED__, struct wl_data_device *data_dev) -{ - Ecore_Wl_Dnd_Source *source; - - if (!(source = wl_data_device_get_user_data(data_dev))) return; - - /* destroy drag offer */ - wl_data_offer_destroy(source->offer); - - while (eina_array_count(source->types)) - free(eina_array_pop(source->types)); - - eina_array_free(source->types); - free(source); - - wl_data_device_set_user_data(data_dev, NULL); -} - -static void -_ecore_wl_cb_data_motion(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, int32_t x, int32_t y) -{ - Ecore_Wl_Dnd_Source *source; - - if (!(source = wl_data_device_get_user_data(data_dev))) return; - /* TODO: Here we should raise motion events for dragging */ -} - -static void -_ecore_wl_cb_data_drop(void *data __UNUSED__, struct wl_data_device *data_dev) -{ - Ecore_Wl_Dnd_Source *source; - - if (!(source = wl_data_device_get_user_data(data_dev))) return; - - /* TODO: Raise event for drop */ - - wl_data_offer_accept(source->offer, source->timestamp, NULL); -// eina_array_data_get(source->types, 0)); -} - -static void -_ecore_wl_cb_data_selection(void *data, struct wl_data_device *data_dev, struct wl_data_offer *offer) -{ - Ecore_Wl_Dnd_Source *source; - - printf("Ecore_Wl Data Selection\n"); - if ((source = wl_data_device_get_user_data(data_dev))) + if ((!eglChooseConfig(ewd->egl.display, argb_attribs, &ewd->egl.argb_config, + 1, &n)) || (n == 0)) { - /* destroy old source */ - wl_data_offer_destroy(source->offer); - - while (eina_array_count(source->types)) - free(eina_array_pop(source->types)); - - eina_array_free(source->types); - free(source); - - wl_data_device_set_user_data(data_dev, NULL); + ERR("Failed to choose ARGB config"); + return EINA_FALSE; } -} - -static void -_ecore_wl_mouse_move_send(uint32_t timestamp) -{ - Ecore_Event_Mouse_Move *ev; - -// if (!_ecore_wl_input_surface) return; - - if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Move)))) return; - - ev->timestamp = timestamp; - ev->x = _ecore_wl_surface_x; - ev->y = _ecore_wl_surface_y; - ev->root.x = _ecore_wl_screen_x; - ev->root.y = _ecore_wl_screen_y; - ev->modifiers = _ecore_wl_input_modifiers; - - ev->multi.device = 0; - ev->multi.radius = 1; - ev->multi.radius_x = 1; - ev->multi.radius_y = 1; - ev->multi.pressure = 1.0; - ev->multi.angle = 0.0; - ev->multi.x = _ecore_wl_surface_x; - ev->multi.y = _ecore_wl_surface_y; - ev->multi.root.x = _ecore_wl_screen_x; - ev->multi.root.y = _ecore_wl_screen_y; + ewd->egl.argb_context = + eglCreateContext(ewd->egl.display, ewd->egl.argb_config, + EGL_NO_CONTEXT, context_attribs); + if (!ewd->egl.argb_context) { - unsigned int id = 0; - - if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_input_surface))) - { - ev->window = id; - ev->event_window = id; - } + ERR("Failed to create ARGB context"); + return EINA_FALSE; } - ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL); -} - -static void -_ecore_wl_mouse_out_send(struct wl_surface *surface, uint32_t timestamp) -{ - Ecore_Wl_Event_Mouse_Out *ev; - - if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Mouse_Out)))) return; - - ev->x = _ecore_wl_surface_x; - ev->y = _ecore_wl_surface_y; - ev->root.x = _ecore_wl_screen_x; - ev->root.y = _ecore_wl_screen_y; - ev->modifiers = _ecore_wl_input_modifiers; - ev->time = timestamp; - - if (surface) + if (!eglMakeCurrent(ewd->egl.display, EGL_NO_SURFACE, + EGL_NO_SURFACE, ewd->egl.argb_context)) { - unsigned int id = 0; - - if ((id = (unsigned int)wl_surface_get_user_data(surface))) - ev->window = id; + ERR("Failed to make ARGB context current"); + return EINA_FALSE; } - ecore_event_add(ECORE_WL_EVENT_MOUSE_OUT, ev, NULL, NULL); + return EINA_TRUE; } -static void -_ecore_wl_mouse_in_send(struct wl_surface *surface, uint32_t timestamp) +static Eina_Bool +_ecore_wl_egl_shutdown(Ecore_Wl_Display *ewd) { - Ecore_Wl_Event_Mouse_In *ev; - - if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Mouse_In)))) return; - - ev->x = _ecore_wl_surface_x; - ev->y = _ecore_wl_surface_y; - ev->root.x = _ecore_wl_screen_x; - ev->root.y = _ecore_wl_screen_y; - ev->modifiers = _ecore_wl_input_modifiers; - ev->time = timestamp; + LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (surface) - { - unsigned int id = 0; + eglMakeCurrent(ewd->egl.display, + EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - if ((id = (unsigned int)wl_surface_get_user_data(surface))) - ev->window = id; - } - - ecore_event_add(ECORE_WL_EVENT_MOUSE_IN, ev, NULL, NULL); -} + eglDestroyContext(ewd->egl.display, ewd->egl.argb_context); -static void -_ecore_wl_mouse_up_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp) -{ - Ecore_Event_Mouse_Button *ev; - - if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; - - if (button == BTN_LEFT) - ev->buttons = 1; - else if (button == BTN_MIDDLE) - ev->buttons = 2; - else if (button == BTN_RIGHT) - ev->buttons = 3; - - ev->timestamp = timestamp; - ev->x = _ecore_wl_surface_x; - ev->y = _ecore_wl_surface_y; - ev->root.x = _ecore_wl_screen_x; - ev->root.y = _ecore_wl_screen_y; - ev->modifiers = _ecore_wl_input_modifiers; - - /* FIXME: Need to get these from Wayland somehow */ - ev->double_click = 0; - ev->triple_click = 0; - - ev->multi.device = 0; - ev->multi.radius = 1; - ev->multi.radius_x = 1; - ev->multi.radius_y = 1; - ev->multi.pressure = 1.0; - ev->multi.angle = 0.0; - ev->multi.x = _ecore_wl_surface_x; - ev->multi.y = _ecore_wl_surface_y; - ev->multi.root.x = _ecore_wl_screen_x; - ev->multi.root.y = _ecore_wl_screen_y; + /* NB: This is hanging when we run elm apps as wayland clients + * inside the weston compositor */ - { - unsigned int id = 0; + /* printf("Egl Terminate\n"); */ + /* eglTerminate(ewd->egl.display); */ + /* printf("Egl Terminate Done\n"); */ - if ((id = (unsigned int)wl_surface_get_user_data(surface))) - { - ev->window = id; - ev->event_window = id; - } - } + eglReleaseThread(); - ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL); + return EINA_TRUE; } -static void -_ecore_wl_mouse_down_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp) +static Eina_Bool +_ecore_wl_xkb_init(Ecore_Wl_Display *ewd) { - Ecore_Event_Mouse_Button *ev; - - if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; - - if (button == BTN_LEFT) - ev->buttons = 1; - else if (button == BTN_MIDDLE) - ev->buttons = 2; - else if (button == BTN_RIGHT) - ev->buttons = 3; - - ev->timestamp = timestamp; - ev->x = _ecore_wl_surface_x; - ev->y = _ecore_wl_surface_y; - ev->root.x = _ecore_wl_screen_x; - ev->root.y = _ecore_wl_screen_y; - ev->modifiers = _ecore_wl_input_modifiers; - - /* FIXME: Need to get these from Wayland somehow */ - ev->double_click = 0; - ev->triple_click = 0; - - ev->multi.device = 0; - ev->multi.radius = 1; - ev->multi.radius_x = 1; - ev->multi.radius_y = 1; - ev->multi.pressure = 1.0; - ev->multi.angle = 0.0; - ev->multi.x = _ecore_wl_surface_x; - ev->multi.y = _ecore_wl_surface_y; - ev->multi.root.x = _ecore_wl_screen_x; - ev->multi.root.y = _ecore_wl_screen_y; + struct xkb_rule_names names; - { - unsigned int id = 0; - - if ((id = (unsigned int)wl_surface_get_user_data(surface))) - { - ev->window = id; - ev->event_window = id; - } - } + LOGFN(__FILE__, __LINE__, __FUNCTION__); - ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL); -} + names.rules = "evdev"; + names.model = "evdev"; + names.layout = "us"; + names.variant = ""; + names.options = ""; -static void -_ecore_wl_focus_out_send(struct wl_surface *surface, uint32_t timestamp) -{ - Ecore_Wl_Event_Focus_Out *ev; - - if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Focus_Out)))) return; - ev->time = timestamp; - if (surface) + if (!(ewd->xkb = xkb_compile_keymap_from_rules(&names))) { - unsigned int id = 0; - - if ((id = (unsigned int)wl_surface_get_user_data(surface))) - ev->window = id; + ERR("Failed to compile keymap"); + return EINA_FALSE; } - ecore_event_add(ECORE_WL_EVENT_FOCUS_OUT, ev, NULL, NULL); + + return EINA_TRUE; } -static void -_ecore_wl_focus_in_send(struct wl_surface *surface, uint32_t timestamp) +static Eina_Bool +_ecore_wl_xkb_shutdown(Ecore_Wl_Display *ewd) { - Ecore_Wl_Event_Focus_In *ev; - - if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Focus_In)))) return; - ev->time = timestamp; - if (surface) - { - unsigned int id = 0; + LOGFN(__FILE__, __LINE__, __FUNCTION__); - if ((id = (unsigned int)wl_surface_get_user_data(surface))) - ev->window = id; - } - ecore_event_add(ECORE_WL_EVENT_FOCUS_IN, ev, NULL, NULL); + if (ewd->xkb) xkb_free_keymap(ewd->xkb); + return EINA_TRUE; } diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h index eec5ffe..31956a1 100644 --- a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h +++ b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h @@ -2,6 +2,9 @@ # define _ECORE_WAYLAND_PRIVATE_H # include +# include + +# include "Ecore_Wayland.h" //# define LOGFNS 1 @@ -13,6 +16,7 @@ # 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 @@ -44,42 +48,40 @@ extern int _ecore_wl_log_dom; # endif # define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_wl_log_dom, __VA_ARGS__) -typedef struct _Ecore_Wl_Dnd_Source +struct _Ecore_Wl_Dnd_Source { struct wl_data_offer *offer; - int refs; - - Eina_Array *types; + Ecore_Wl_Input *input; + struct wl_array types; + int refcount; + int fd; + int x, y; - uint32_t timestamp; + /* TODO: task & data_func */ void *data; -} Ecore_Wl_Dnd_Source; +}; -typedef struct _Ecore_Wl_Dnd_Target +struct _Ecore_Wl_Dnd_Target { - /* NB: These are not the real fields for this structure, - * and it is Bound to change....soon */ - struct wl_data_offer *offer; - int refs; - - Eina_Array *types; + Ecore_Wl_Dnd_Source *source; +}; - uint32_t timestamp; - void *data; -} Ecore_Wl_Dnd_Target; +void _ecore_wl_window_init(void); +void _ecore_wl_window_shutdown(void); -struct _Ecore_Wl_Drag_Source -{ - struct wl_data_device *data_dev; - struct wl_buffer *buffer; +void _ecore_wl_output_add(Ecore_Wl_Display *ewd, unsigned int id); +void _ecore_wl_output_del(Ecore_Wl_Output *output); - int32_t hotspot_x, hotspot_y; - int32_t offset_x, offset_y; - const char *mimetype; - uint32_t timestamp; - void *data; +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); - struct wl_data_source *data_source; -}; +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_win32/Ecore_Win32.h b/libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h index 95e3749..5df3346 100644 --- a/libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h +++ b/libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h @@ -460,7 +460,9 @@ EAPI void ecore_win32_window_lower(Ecore_Win32_Window *window); EAPI void ecore_win32_window_title_set(Ecore_Win32_Window *window, const char *title); -EAPI void ecore_win32_window_focus_set(Ecore_Win32_Window *window); +EAPI void ecore_win32_window_focus(Ecore_Win32_Window *window); + +EAPI void *ecore_win32_window_focus_get(void); EAPI void ecore_win32_window_iconified_set(Ecore_Win32_Window *window, Eina_Bool on); @@ -471,11 +473,6 @@ EAPI void ecore_win32_window_borderless_set(Ecore_Win32_Window *window, EAPI void ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window, Eina_Bool on); -EINA_DEPRECATED EAPI void ecore_win32_window_shape_set(Ecore_Win32_Window *window, - unsigned short width, - unsigned short height, - unsigned char *mask); - EAPI void ecore_win32_window_cursor_set(Ecore_Win32_Window *window, Ecore_Win32_Cursor *cursor); diff --git a/libraries/ecore/src/lib/ecore_win32/Makefile.in b/libraries/ecore/src/lib/ecore_win32/Makefile.in index 9994ee7..b512021 100644 --- a/libraries/ecore/src/lib/ecore_win32/Makefile.in +++ b/libraries/ecore/src/lib/ecore_win32/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -213,6 +212,8 @@ 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@ @@ -268,6 +269,8 @@ 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@ @@ -278,6 +281,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_win32/ecore_win32_private.h b/libraries/ecore/src/lib/ecore_win32/ecore_win32_private.h index ab54763..e3e4426 100644 --- a/libraries/ecore/src/lib/ecore_win32/ecore_win32_private.h +++ b/libraries/ecore/src/lib/ecore_win32/ecore_win32_private.h @@ -71,8 +71,8 @@ struct _Ecore_Win32_Window unsigned int min_height; unsigned int max_width; unsigned int max_height; - unsigned int base_width; - unsigned int base_height; + int base_width; + int base_height; unsigned int step_width; unsigned int step_height; diff --git a/libraries/ecore/src/lib/ecore_win32/ecore_win32_window.c b/libraries/ecore/src/lib/ecore_win32/ecore_win32_window.c index 459f051..058aef0 100644 --- a/libraries/ecore/src/lib/ecore_win32/ecore_win32_window.c +++ b/libraries/ecore/src/lib/ecore_win32/ecore_win32_window.c @@ -107,8 +107,8 @@ ecore_win32_window_internal_new(Ecore_Win32_Window *parent, w->min_height = 0; w->max_width = 32767; w->max_height = 32767; - w->base_width = 0; - w->base_height = 0; + w->base_width = -1; + w->base_height = -1; w->step_width = 1; w->step_height = 1; @@ -249,6 +249,8 @@ ecore_win32_window_free(Ecore_Win32_Window *window) * * This function returns the window HANDLE associated to @p window. If * @p window is @c NULL, this function returns @c NULL. + * + * @note The returned value is of type HWND. */ EAPI void * ecore_win32_window_hwnd_get(Ecore_Win32_Window *window) @@ -755,140 +757,6 @@ ecore_win32_window_size_step_get(Ecore_Win32_Window *window, if (step_height) *step_height = window->step_height; } -EAPI void -ecore_win32_window_shape_set(Ecore_Win32_Window *window, - unsigned short width, - unsigned short height, - unsigned char *mask) -{ - HRGN rgn; - int x; - int y; - OSVERSIONINFO version_info; - - if (!window) - return; - - if (!mask) - { - window->shape.enabled = 0; - if (window->shape.layered != 0) - { - window->shape.layered = 0; -#if defined(WS_EX_LAYERED) - SetLastError(0); - if (!SetWindowLongPtr(window->window, GWL_EXSTYLE, - GetWindowLong(window->window, GWL_EXSTYLE) & (~WS_EX_LAYERED)) && - (GetLastError() != 0)) - { - ERR("SetWindowLongPtr() failed"); - return; - } - if (!RedrawWindow(window->window, NULL, NULL, - RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN)) - { - ERR("RedrawWindow() failed"); - return; - } -#endif - } - else - if (!SetWindowRgn(window->window, NULL, TRUE)) - { - ERR("SetWindowRgn() failed"); - } - return; - } - - if (width == 0 || height == 0) - return; - - window->shape.enabled = 1; - - if (width != window->shape.width || height != window->shape.height) - { - window->shape.width = width; - window->shape.height = height; - if (window->shape.mask) - { - free(window->shape.mask); - window->shape.mask = NULL; - } - window->shape.mask = malloc(width * height); - } - memcpy(window->shape.mask, mask, width * height); - - window->shape.layered = 0; - -#if defined(WS_EX_LAYERED) - version_info.dwOSVersionInfoSize = sizeof(version_info); - if (GetVersionEx(&version_info) == TRUE && version_info.dwMajorVersion == 5) - { - SetLastError(0); - if (!SetWindowLongPtr(window->window, GWL_EXSTYLE, - GetWindowLong(window->window, GWL_EXSTYLE) | WS_EX_LAYERED) && - (GetLastError() != 0)) - { - ERR("SetWindowLongPtr() failed"); - return; - } - window->shape.layered = 1; - return; - } -#endif - - if (!(rgn = CreateRectRgn(0, 0, 0, 0))) - { - ERR("CreateRectRgn() failed"); - return; - } - for (y = 0; y < height; y++) - { - HRGN rgnLine; - - if (!(rgnLine = CreateRectRgn(0, 0, 0, 0))) - { - ERR("CreateRectRgn() failed"); - return; - } - for (x = 0; x < width; x++) - { - if (mask[y * width + x] > 0) - { - HRGN rgnDot; - - if (!(rgnDot = CreateRectRgn(x, y, x + 1, y + 1))) - { - ERR("CreateRectRgn() failed"); - return; - } - if (CombineRgn(rgnLine, rgnLine, rgnDot, RGN_OR) == ERROR) - { - ERR("CombineRgn() has not created a new region"); - } - if (!DeleteObject(rgnDot)) - { - ERR("DeleteObject() failed"); - return; - } - } - } - if (CombineRgn(rgn, rgn, rgnLine, RGN_OR) == ERROR) - { - ERR("CombineRgn() has not created a new region"); - } - if (!DeleteObject(rgnLine)) - { - ERR("DeleteObject() failed"); - return; - } - } - if (!SetWindowRgn(window->window, rgn, TRUE)) - { - ERR("SetWindowRgn() failed"); - } -} - /** * @brief Show the given window. * @@ -1011,7 +879,7 @@ ecore_win32_window_title_set(Ecore_Win32_Window *window, * @c NULL, this function does nothing. */ EAPI void -ecore_win32_window_focus_set(Ecore_Win32_Window *window) +ecore_win32_window_focus(Ecore_Win32_Window *window) { if (!window) return; @@ -1024,6 +892,37 @@ ecore_win32_window_focus_set(Ecore_Win32_Window *window) } /** + * @brief Get the current focused window. + * + * @return The window that has focus. + * + * This function returns the window that has focus. If the calling + * thread's message queue does not have an associated window with the + * keyboard focus, the return value is @c NULL. + * + * @note Even if the returned value is @c NULL, another thread's queue + * may be associated with a window that has the keyboard focus. + * + * @note The returned value is of type HWND. + */ +EAPI void * +ecore_win32_window_focus_get(void) +{ + HWND focused; + + INF("getting focused window"); + + focused = GetFocus(); + if (!focused) + { + ERR("GetFocus() failed"); + return NULL; + } + + return focused; +} + +/** * @brief Iconify or restore the given window. * * @param window The window. diff --git a/libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h b/libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h index 681b334..63e20d5 100644 --- a/libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h +++ b/libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h @@ -280,6 +280,10 @@ EAPI void ecore_wince_window_hide(Ecore_WinCE_Window *window); EAPI void ecore_wince_window_title_set(Ecore_WinCE_Window *window, const char *title); +EAPI void ecore_wince_window_focus(Ecore_WinCE_Window *window); + +EAPI void *ecore_wince_window_focus_get(void); + EAPI void ecore_wince_window_backend_set(Ecore_WinCE_Window *window, int backend); EAPI void ecore_wince_window_suspend_cb_set(Ecore_WinCE_Window *window, int (*suspend_cb)(int)); diff --git a/libraries/ecore/src/lib/ecore_wince/Makefile.in b/libraries/ecore/src/lib/ecore_wince/Makefile.in index d23bf51..340416b 100644 --- a/libraries/ecore/src/lib/ecore_wince/Makefile.in +++ b/libraries/ecore/src/lib/ecore_wince/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -194,6 +193,8 @@ 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@ @@ -249,6 +250,8 @@ 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@ @@ -259,6 +262,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c b/libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c index 4e8b7b1..72353ce 100644 --- a/libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c +++ b/libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c @@ -447,6 +447,58 @@ ecore_wince_window_title_set(Ecore_WinCE_Window *window, } /** + * @brief Set the focus to the given window. + * + * @param window The window to give focus to. + * + * This function gives the focus to @p window. If @p window is + * @c NULL, this function does nothing. + */ +EAPI void +ecore_wince_window_focus(Ecore_WinCE_Window *window) +{ + if (!window) return; + + INF("focusing window"); + + if (!SetFocus(window->window)) + { + ERR("SetFocus() failed"); + } +} + +/** + * @brief Get the current focused window. + * + * @return The window that has focus. + * + * This function returns the window that has focus. If the calling + * thread's message queue does not have an associated window with the + * keyboard focus, the return value is @c NULL. + * + * @note Even if the returned value is @c NULL, another thread's queue + * may be associated with a window that has the keyboard focus. + * + * @note The returned value is of type HWND. + */ +EAPI void * +ecore_wince_window_focus_get(void) +{ + HWND focused; + + INF("getting focused window"); + + focused = GetFocus(); + if (!focused) + { + ERR("GetFocus() failed"); + return NULL; + } + + return focused; +} + +/** * @brief Set the graphic backend used for the given window. * * @param window The window. diff --git a/libraries/ecore/src/lib/ecore_x/Ecore_X.h b/libraries/ecore/src/lib/ecore_x/Ecore_X.h index b5d2c3f..336b656 100644 --- a/libraries/ecore/src/lib/ecore_x/Ecore_X.h +++ b/libraries/ecore/src/lib/ecore_x/Ecore_X.h @@ -1104,6 +1104,28 @@ typedef enum _Ecore_X_Illume_Quickpanel_State ECORE_X_ILLUME_QUICKPANEL_STATE_ON } Ecore_X_Illume_Quickpanel_State; +typedef enum _Ecore_X_Illume_Indicator_State +{ + ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN = 0, + ECORE_X_ILLUME_INDICATOR_STATE_OFF, + ECORE_X_ILLUME_INDICATOR_STATE_ON +} Ecore_X_Illume_Indicator_State; + +typedef enum _Ecore_X_Illume_Clipboard_State +{ + ECORE_X_ILLUME_CLIPBOARD_STATE_UNKNOWN = 0, + ECORE_X_ILLUME_CLIPBOARD_STATE_OFF, + ECORE_X_ILLUME_CLIPBOARD_STATE_ON +} Ecore_X_Illume_Clipboard_State; + +typedef enum _Ecore_X_Illume_Indicator_Opacity_Mode +{ + ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN = 0, + ECORE_X_ILLUME_INDICATOR_OPAQUE, + ECORE_X_ILLUME_INDICATOR_TRANSLUCENT, + ECORE_X_ILLUME_INDICATOR_TRANSPARENT +} Ecore_X_Illume_Indicator_Opacity_Mode; + /* Window layer constants */ #define ECORE_X_WINDOW_LAYER_BELOW 2 #define ECORE_X_WINDOW_LAYER_NORMAL 4 @@ -2159,6 +2181,11 @@ ecore_x_netwm_strut_partial_get(Ecore_X_Window win, int *bottom_start_x, int *bottom_end_x); +EAPI void +ecore_x_netwm_icons_set(Ecore_X_Window win, + Ecore_X_Icon *icon, + int num); + EAPI Eina_Bool ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, @@ -2399,6 +2426,25 @@ EAPI void ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win); EAPI void +ecore_x_e_illume_clipboard_state_set(Ecore_X_Window win, + Ecore_X_Illume_Clipboard_State state); + +EAPI Ecore_X_Illume_Clipboard_State +ecore_x_e_illume_clipboard_state_get(Ecore_X_Window win); + +EAPI void +ecore_x_e_illume_clipboard_geometry_set(Ecore_X_Window win, + int x, + int y, + int w, + int h); +EAPI Eina_Bool +ecore_x_e_illume_clipboard_geometry_get(Ecore_X_Window win, + int *x, + int *y, + int *w, + int *h); +EAPI void ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, Ecore_X_Sync_Counter counter); EAPI Ecore_X_Sync_Counter @@ -2657,7 +2703,7 @@ ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, /* The usage of 'Ecore_X_Randr_None' or 'Ecore_X_Randr_Unset' * depends on the context. In most cases 'Ecore_X_Randr_Unset' * can be used, but in some cases -1 is a special value to - * functions, thus 'Ecore_X_Randr_None' (=0) musst be used. + * functions, thus 'Ecore_X_Randr_None' (=0) must be used. */ typedef short Ecore_X_Randr_Refresh_Rate; @@ -2749,6 +2795,11 @@ EAPI Eina_Bool EAPI Ecore_X_Randr_Mode_Info ** ecore_x_randr_modes_info_get(Ecore_X_Window root, int *num); +EAPI Ecore_X_Randr_Mode +ecore_x_randr_mode_info_add(Ecore_X_Window root, + Ecore_X_Randr_Mode_Info *mode_info); +EAPI void +ecore_x_randr_mode_del(Ecore_X_Randr_Mode mode); EAPI Ecore_X_Randr_Mode_Info * ecore_x_randr_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode); @@ -2762,10 +2813,13 @@ EAPI Ecore_X_Randr_Output *ecore_x_randr_outputs_get(Ecore_X_Window root, EAPI Ecore_X_Randr_Output * ecore_x_randr_window_outputs_get(Ecore_X_Window window, int *num); -EINA_DEPRECATED EAPI Ecore_X_Randr_Output * +EAPI Ecore_X_Randr_Output * ecore_x_randr_current_output_get(Ecore_X_Window window, int *num); EAPI Ecore_X_Randr_Crtc * +ecore_x_randr_window_crtcs_get(Ecore_X_Window window, + int *num); +EAPI Ecore_X_Randr_Crtc * ecore_x_randr_current_crtc_get(Ecore_X_Window window, int *num); EAPI Ecore_X_Randr_Output * @@ -2840,6 +2894,12 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc_r2, Ecore_X_Randr_Output_Policy policy, Ecore_X_Randr_Relative_Alignment alignment); +EAPI Eina_Bool +ecore_x_randr_output_mode_add(Ecore_X_Randr_Output output, + Ecore_X_Randr_Mode mode); +EAPI void +ecore_x_randr_output_mode_del(Ecore_X_Randr_Output output, + Ecore_X_Randr_Mode mode); EAPI Ecore_X_Randr_Mode * ecore_x_randr_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output output, @@ -3408,6 +3468,13 @@ EAPI Eina_Bool EAPI const char * ecore_x_keysym_string_get(int keysym); +/** + * Given a keyname, return the keycode representing that key + * + * @since 1.2.0 + */ +EAPI int ecore_x_keysym_keycode_get(const char *keyname); + typedef struct _Ecore_X_Image Ecore_X_Image; EAPI Ecore_X_Image * @@ -3617,6 +3684,26 @@ ecore_x_gesture_event_ungrab(Ecore_X_Window win, Ecore_X_Gesture_Event_Type type, int num_fingers); +EAPI void +ecore_x_e_illume_indicator_state_set(Ecore_X_Window win, + Ecore_X_Illume_Indicator_State state); +EAPI Ecore_X_Illume_Indicator_State +ecore_x_e_illume_indicator_state_get(Ecore_X_Window win); +EAPI void +ecore_x_e_illume_indicator_state_send(Ecore_X_Window win, + Ecore_X_Illume_Indicator_State state); + +EAPI void +ecore_x_e_illume_indicator_opacity_set(Ecore_X_Window win, + Ecore_X_Illume_Indicator_Opacity_Mode mode); + +EAPI Ecore_X_Illume_Indicator_Opacity_Mode +ecore_x_e_illume_indicator_opacity_get(Ecore_X_Window win); + +EAPI void +ecore_x_e_illume_indicator_opacity_send(Ecore_X_Window win, + Ecore_X_Illume_Indicator_Opacity_Mode mode); + #ifdef __cplusplus } #endif // ifdef __cplusplus diff --git a/libraries/ecore/src/lib/ecore_x/Ecore_X_Atoms.h b/libraries/ecore/src/lib/ecore_x/Ecore_X_Atoms.h index 6788a5e..1341716 100644 --- a/libraries/ecore/src/lib/ecore_x/Ecore_X_Atoms.h +++ b/libraries/ecore/src/lib/ecore_x/Ecore_X_Atoms.h @@ -238,6 +238,20 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_ON; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLE; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE; diff --git a/libraries/ecore/src/lib/ecore_x/Makefile.in b/libraries/ecore/src/lib/ecore_x/Makefile.in index 3b53cfe..fb446ef 100644 --- a/libraries/ecore/src/lib/ecore_x/Makefile.in +++ b/libraries/ecore/src/lib/ecore_x/Makefile.in @@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -224,6 +223,8 @@ 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@ @@ -279,6 +280,8 @@ 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@ @@ -289,6 +292,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_x/ecore_x_atoms_decl.h b/libraries/ecore/src/lib/ecore_x/ecore_x_atoms_decl.h index 3f22356..8952df3 100644 --- a/libraries/ecore/src/lib/ecore_x/ecore_x_atoms_decl.h +++ b/libraries/ecore/src/lib/ecore_x/ecore_x_atoms_decl.h @@ -264,6 +264,20 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_ON = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE= 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLE = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE = 0; diff --git a/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in b/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in index 9108f23..ff2227c 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in +++ b/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in @@ -48,16 +48,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -206,6 +205,8 @@ 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@ @@ -261,6 +262,8 @@ 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@ @@ -271,6 +274,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_atoms.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_atoms.c index 769ffac..ec2daaf 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_atoms.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_atoms.c @@ -249,7 +249,20 @@ static Xcb_Atom atoms[] = { "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE }, { "_E_ILLUME_QUICKPANEL_POSITION_UPDATE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE }, - + { "_E_ILLUME_INDICATOR_STATE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE }, + { "_E_ILLUME_INDICATOR_ON", &ECORE_X_ATOM_E_ILLUME_INDICATOR_ON }, + { "_E_ILLUME_INDICATOR_OFF", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF }, + { "_E_ILLUME_INDICATOR_OPACITY_MODE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE }, + { "_E_ILLUME_INDICATOR_OPAQUE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE }, + { "_E_ILLUME_INDICATOR_TRANSLUCENT", &ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT }, + { "_E_ILLUME_INDICATOR_TRANSPARENT", &ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT }, + { "_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLES", &ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLE }, + { "_E_ILLUME_ROTATE_WINDOW_ANGLE", &ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE }, + { "_E_ILLUME_ROTATE_ROOT_ANGLE", &ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE }, + { "_E_ILLUME_CLIPBOARD_STATE", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE }, + { "_E_ILLUME_CLIPBOARD_ON", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON }, + { "_E_ILLUME_CLIPBOARD_OFF", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF }, + { "_E_ILLUME_CLIPBOARD_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY }, { "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER }, { "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE }, { "_E_COMP_SYNC_SUPPORTED", &ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED }, diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c index c868f5e..60bfc9c 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c @@ -7,6 +7,8 @@ static Ecore_X_Atom _ecore_xcb_e_quickpanel_atom_get(Ecore_X_ static Ecore_X_Illume_Quickpanel_State _ecore_xcb_e_quickpanel_state_get(Ecore_X_Atom atom); static Ecore_X_Atom _ecore_xcb_e_illume_atom_get(Ecore_X_Illume_Mode mode); static Ecore_X_Illume_Mode _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom); +static Ecore_X_Atom _ecore_xcb_e_indicator_atom_get(Ecore_X_Illume_Indicator_State state); +static Ecore_X_Illume_Indicator_State _ecore_xcb_e_indicator_state_get(Ecore_X_Atom atom); EAPI void ecore_x_e_init(void) @@ -719,6 +721,99 @@ ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win) 0, 0, 0, 0, 0); } +static Ecore_X_Atom +_ecore_xcb_e_clipboard_atom_get(Ecore_X_Illume_Clipboard_State state) +{ + switch (state) + { + case ECORE_X_ILLUME_CLIPBOARD_STATE_ON: + return ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON; + case ECORE_X_ILLUME_CLIPBOARD_STATE_OFF: + return ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF; + default: + break; + } + return 0; +} + +static Ecore_X_Illume_Clipboard_State +_ecore_xcb_e_clipboard_state_get(Ecore_X_Atom atom) +{ + if (atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON) + return ECORE_X_ILLUME_CLIPBOARD_STATE_ON; + + if (atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF) + return ECORE_X_ILLUME_CLIPBOARD_STATE_OFF; + + return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; +} + +EAPI void +ecore_x_e_illume_clipboard_state_set(Ecore_X_Window win, + Ecore_X_Illume_Clipboard_State state) +{ + Ecore_X_Atom atom = 0; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + atom = _ecore_xcb_e_clipboard_atom_get(state); + + ecore_x_window_prop_atom_set(win, + ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE, + &atom, 1); +} + +EAPI Ecore_X_Illume_Clipboard_State +ecore_x_e_illume_clipboard_state_get(Ecore_X_Window win) +{ + Ecore_X_Atom atom = 0; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ecore_x_window_prop_atom_get(win, + ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE, + &atom, 1)) + return ECORE_X_ILLUME_CLIPBOARD_STATE_UNKNOWN; + return _ecore_xcb_e_clipboard_state_get(atom); +} + +EAPI void +ecore_x_e_illume_clipboard_geometry_set(Ecore_X_Window win, + int x, int y, int w, int h) +{ + unsigned int geom[4]; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + geom[0] = x; + geom[1] = y; + geom[2] = w; + geom[3] = h; + ecore_x_window_prop_card32_set(win, + ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY, + geom, 4); +} + +EAPI Eina_Bool +ecore_x_e_illume_clipboard_geometry_get(Ecore_X_Window win, + int *x, int *y, int *w, int *h) +{ + int ret = 0; + unsigned int geom[4]; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + ret = + ecore_x_window_prop_card32_get(win, + ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY, + geom, 4); + if (ret != 4) return EINA_FALSE; + + if (x) *x = geom[0]; + if (y) *y = geom[1]; + if (w) *w = geom[2]; + if (h) *h = geom[3]; + + return EINA_TRUE; +} + EAPI void ecore_x_e_illume_mode_set(Ecore_X_Window win, Ecore_X_Illume_Mode mode) @@ -1069,3 +1164,144 @@ _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom) return ECORE_X_ILLUME_MODE_UNKNOWN; } +static Ecore_X_Atom +_ecore_xcb_e_indicator_atom_get(Ecore_X_Illume_Indicator_State state) +{ + switch (state) + { + case ECORE_X_ILLUME_INDICATOR_STATE_ON: + return ECORE_X_ATOM_E_ILLUME_INDICATOR_ON; + + case ECORE_X_ILLUME_INDICATOR_STATE_OFF: + return ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF; + + default: + break; + } + return 0; +} + +static Ecore_X_Illume_Indicator_State +_ecore_xcb_e_indicator_state_get(Ecore_X_Atom atom) +{ + if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_ON) + return ECORE_X_ILLUME_INDICATOR_STATE_ON; + if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF) + return ECORE_X_ILLUME_INDICATOR_STATE_OFF; + + return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; +} + +EAPI void +ecore_x_e_illume_indicator_state_set(Ecore_X_Window win, + Ecore_X_Illume_Indicator_State state) +{ + Ecore_X_Atom atom = 0; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + atom = _ecore_xcb_e_indicator_atom_get(state); + ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, + &atom, 1); +} + +EAPI Ecore_X_Illume_Indicator_State +ecore_x_e_illume_indicator_state_get(Ecore_X_Window win) +{ + Ecore_X_Atom atom = 0; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ecore_x_window_prop_atom_get(win, + ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, + &atom, 1)) + return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; + + return _ecore_xcb_e_indicator_state_get(atom); +} + +EAPI void +ecore_x_e_illume_indicator_state_send(Ecore_X_Window win, + Ecore_X_Illume_Indicator_State state) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, + ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, + _ecore_xcb_e_indicator_atom_get(state), + 0, 0, 0, 0); +} + +static Ecore_X_Atom +_ecore_x_e_indicator_opacity_atom_get(Ecore_X_Illume_Indicator_Opacity_Mode mode) +{ + switch (mode) + { + case ECORE_X_ILLUME_INDICATOR_OPAQUE: + return ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE; + + case ECORE_X_ILLUME_INDICATOR_TRANSLUCENT: + return ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT; + + case ECORE_X_ILLUME_INDICATOR_TRANSPARENT: + return ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT; + + default: + break; + } + return 0; +} + +static Ecore_X_Illume_Indicator_Opacity_Mode +_ecore_x_e_indicator_opacity_get(Ecore_X_Atom atom) +{ + if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE) + return ECORE_X_ILLUME_INDICATOR_OPAQUE; + + if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT) + return ECORE_X_ILLUME_INDICATOR_TRANSLUCENT; + + if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT) + return ECORE_X_ILLUME_INDICATOR_TRANSPARENT; + + return ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN; +} + +EAPI void +ecore_x_e_illume_indicator_opacity_set(Ecore_X_Window win, + Ecore_X_Illume_Indicator_Opacity_Mode mode) +{ + Ecore_X_Atom atom = 0; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + atom = _ecore_x_e_indicator_opacity_atom_get(mode); + ecore_x_window_prop_atom_set(win, + ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, + &atom, 1); +} + +EAPI Ecore_X_Illume_Indicator_Opacity_Mode +ecore_x_e_illume_indicator_opacity_get(Ecore_X_Window win) +{ + Ecore_X_Atom atom; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + if (!ecore_x_window_prop_atom_get(win, + ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, + &atom, 1)) + return ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN; + + return _ecore_x_e_indicator_opacity_get(atom); +} + +EAPI void +ecore_x_e_illume_indicator_opacity_send(Ecore_X_Window win, + Ecore_X_Illume_Indicator_Opacity_Mode mode) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + ecore_x_client_message32_send(win, + ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, + ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, + _ecore_x_e_indicator_opacity_atom_get(mode), + 0, 0, 0, 0); +} + diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_keymap.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_keymap.c index 40304df..b1c7528 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_keymap.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_keymap.c @@ -279,6 +279,14 @@ ecore_x_keysym_string_get(int keysym) return _ecore_xcb_keymap_keysym_to_string(keysym); } +EAPI int +ecore_x_keysym_keycode_get(const char *keyname) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + return _ecore_xcb_keymap_string_to_keycode(keyname); +} + /* local functions */ static int _ecore_xcb_keymap_mask_get(void *reply, diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c index 0a523b9..b1e0622 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c @@ -838,6 +838,56 @@ ecore_x_netwm_icon_name_set(Ecore_X_Window win, ecore_x_window_prop_string_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME, name); } +EAPI void +ecore_x_netwm_icons_set(Ecore_X_Window win, + Ecore_X_Icon *icon, + int num) +{ + unsigned int *data, *p, *p2; + unsigned int i, size, x, y; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + size = 0; + for (i = 0; i < (unsigned int)num; i++) + { + size += 2 + (icon[i].width * icon[i].height); + } + data = malloc(size * sizeof(unsigned int)); + if (!data) return; + p = data; + for (i = 0; i < (unsigned int)num; i++) + { + p[0] = icon[i].width; + p[1] = icon[i].height; + p += 2; + p2 = icon[i].data; + for (y = 0; y < icon[i].height; y++) + { + for (x = 0; x < icon[i].width; x++) + { + unsigned int r, g, b, a; + + a = (*p2 >> 24) & 0xff; + r = (*p2 >> 16) & 0xff; + g = (*p2 >> 8 ) & 0xff; + b = (*p2 ) & 0xff; + if ((a > 0) && (a < 255)) + { + r = (r * 255) / a; + g = (g * 255) / a; + b = (b * 255) / a; + } + *p = (a << 24) | (r << 16) | (g << 8) | b; + p++; + p2++; + } + } + } + ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_ICON, + data, size); + free(data); +} + EAPI Eina_Bool ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_randr.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_randr.c index 62f7618..81a7c3f 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_randr.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_randr.c @@ -1,7 +1,6 @@ /* TODO: List of missing functions * * ecore_x_randr_crtc_clone_set - * ecore_x_randr_output_size_mm_get * ecore_x_randr_output_crtc_set * ecore_x_randr_edid_version_get * ecore_x_randr_edid_info_has_valid_checksum @@ -776,6 +775,24 @@ ecore_x_randr_output_modes_get(Ecore_X_Window root, return modes; } +EAPI Eina_Bool +ecore_x_randr_output_mode_add(Ecore_X_Randr_Output output, Ecore_X_Randr_Mode mode) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + CHECK_XCB_CONN; + +#ifdef ECORE_XCB_RANDR + RANDR_CHECK_1_2_RET(EINA_FALSE); + + if ((output == Ecore_X_Randr_None) || (mode == Ecore_X_Randr_None)) + return EINA_FALSE; + + xcb_randr_add_output_mode(_ecore_xcb_conn, output, mode); + return EINA_TRUE; +#endif + return EINA_FALSE; +} + /* * @brief get detailed information for a given mode id * @param root window which's screen's ressources are queried @@ -805,6 +822,63 @@ ecore_x_randr_mode_info_get(Ecore_X_Window root, } /* + * @brief add a mode to a display + * @param root window to which's screen's ressources are added + * @param mode_info + * @return Ecore_X_Randr_Mode of the added mode. Ecore_X_Randr_None if mode + * adding failed. + * @since 1.2.0 + */ +EAPI Ecore_X_Randr_Mode +ecore_x_randr_mode_info_add(Ecore_X_Window root, Ecore_X_Randr_Mode_Info *mode_info) +{ +#ifdef ECORE_XCB_RANDR + Ecore_X_Randr_Mode mode = Ecore_X_Randr_None; + xcb_randr_create_mode_cookie_t cookie; + xcb_randr_create_mode_reply_t *reply; + xcb_randr_mode_info_t info; + int namelen = 0; +#endif + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + CHECK_XCB_CONN; + +#ifdef ECORE_XCB_RANDR + RANDR_CHECK_1_2_RET(EINA_FALSE); + + if (!mode_info) return Ecore_X_Randr_None; + if (!_ecore_xcb_randr_root_validate(root)) return Ecore_X_Randr_None; + + namelen = strlen(mode_info->name); + + memset(&info, 0, sizeof(info)); + info.width = mode_info->width; + info.height = mode_info->height; + info.dot_clock = mode_info->dotClock; + info.hsync_start = mode_info->hSyncStart; + info.hsync_end = mode_info->hSyncEnd; + info.htotal = mode_info->hTotal; + info.hskew = mode_info->hSkew; + info.vsync_start = mode_info->vSyncStart; + info.vsync_end = mode_info->vSyncEnd; + info.vtotal = mode_info->vTotal; + info.mode_flags = mode_info->modeFlags; + info.name_len = namelen; + + cookie = + xcb_randr_create_mode_unchecked(_ecore_xcb_conn, root, info, + namelen, mode_info->name); + reply = xcb_randr_create_mode_reply(_ecore_xcb_conn, cookie, NULL); + if (reply) + { + mode = mode_info->xid; + free(reply); + } +#endif + return mode; +} + +/* * @brief get detailed information for all modes related to a root window's screen * @param root window which's screen's ressources are queried * @param num number of modes returned @@ -1057,6 +1131,53 @@ ecore_x_randr_output_crtc_get(Ecore_X_Window root, return Ecore_X_Randr_None; } +EAPI void +ecore_x_randr_output_size_mm_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *w_mm, int *h_mm) +{ +#ifdef ECORE_XCB_RANDR + xcb_randr_get_output_info_cookie_t ocookie; + xcb_randr_get_output_info_reply_t *oreply; + xcb_timestamp_t timestamp = 0; +#endif + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + CHECK_XCB_CONN; + + if (w_mm) *w_mm = 0; + if (h_mm) *h_mm = 0; + +#ifdef ECORE_XCB_RANDR + RANDR_CHECK_1_2_RET(); + + if ((output != Ecore_X_Randr_None) && (_randr_version >= RANDR_1_3)) + { + xcb_randr_get_screen_resources_current_reply_t *reply; + + reply = _ecore_xcb_randr_13_get_resources(root); + timestamp = reply->config_timestamp; + free(reply); + } + else if ((output != Ecore_X_Randr_None) && (_randr_version == RANDR_1_2)) + { + xcb_randr_get_screen_resources_reply_t *reply; + + reply = _ecore_xcb_randr_12_get_resources(root); + timestamp = reply->config_timestamp; + free(reply); + } + + ocookie = + xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, timestamp); + oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, ocookie, NULL); + if (oreply) + { + if (w_mm) *w_mm = oreply->mm_width; + if (h_mm) *h_mm = oreply->mm_height; + free(oreply); + } +#endif +} + /** * @brief sets the demanded parameters for a given CRTC. Note that the CRTC is * auto enabled in it's preferred mode, when it was disabled before. @@ -1439,6 +1560,87 @@ ecore_x_randr_crtcs_get(Ecore_X_Window root, } /* + * @deprecated bad naming. Use ecore_x_randr_window_crtcs_get instead. + * @brief get the CRTCs, which display a certain window + * @param window window the displaying CRTCs shall be found for + * @param num the number of CRTCs displaying the window + * @return array of CRTCs that display a certain window. NULL if no CRTCs + * was found that displays the specified window. + */ +EAPI Ecore_X_Randr_Crtc * +ecore_x_randr_current_crtc_get(Ecore_X_Window window, + int *num) +{ + return ecore_x_randr_window_crtcs_get(window, num); +} + +/* + * @brief get the CRTCs, which display a certain window + * @param window window the displaying crtcs shall be found for + * @param num the number of crtcs displaying the window + * @return array of crtcs that display a certain window. NULL if no crtcs + * was found that displays the specified window. + * @since 1.2.0 + */ +EAPI Ecore_X_Randr_Crtc * +ecore_x_randr_window_crtcs_get(Ecore_X_Window window, + int *num) +{ +#ifdef ECORE_XCB_RANDR + Ecore_X_Window root; + Eina_Rectangle w_geo, c_geo; + Ecore_X_Randr_Crtc *crtcs, *ret = NULL; + Ecore_X_Randr_Mode mode; + int ncrtcs, i, nret = 0; + xcb_translate_coordinates_cookie_t cookie; + xcb_translate_coordinates_reply_t *trans; +#endif + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + CHECK_XCB_CONN; + +#ifdef ECORE_XCB_RANDR + RANDR_CHECK_1_2_RET(NULL); + + ecore_x_window_geometry_get(window, &w_geo.x, &w_geo.y, &w_geo.w, &w_geo.h); + + root = ecore_x_window_root_get(window); + crtcs = ecore_x_randr_crtcs_get(root, &ncrtcs); + if (!crtcs) return NULL; + + /* now get window RELATIVE to root window - thats what matters. */ + cookie = xcb_translate_coordinates(_ecore_xcb_conn, window, root, 0, 0); + trans = xcb_translate_coordinates_reply(_ecore_xcb_conn, cookie, NULL); + w_geo.x = trans->dst_x; + w_geo.y = trans->dst_y; + free(trans); + + for (i = 0, nret = 0; i < ncrtcs; i++) + { + /* if crtc is not enabled, don't bother about it any further */ + mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]); + if (mode == Ecore_X_Randr_None) continue; + + ecore_x_randr_crtc_geometry_get(root, crtcs[i], &c_geo.x, &c_geo.y, + &c_geo.w, &c_geo.h); + if (eina_rectangles_intersect(&w_geo, &c_geo)) + { + ret = realloc(ret, (++nret * + sizeof(Ecore_X_Randr_Output))); + ret[nret] = crtcs[i]; + } + } + free(crtcs); + + if (num) *num = nret; + return ret; + +#endif + if (num) *num = 0; + return NULL; +} + +/* * @brief get a CRTC's outputs. * @param root the root window which's screen will be queried * @param num number of outputs referenced by given CRTC @@ -2172,6 +2374,22 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root, } /* + * @deprecated bad naming. Use ecore_x_randr_window_outputs_get instead. + * @brief get the outputs, which display a certain window + * @param window window the displaying outputs shall be found for + * @param num the number of outputs displaying the window + * @return array of outputs that display a certain window. NULL if no outputs + * was found that displays the specified window. + */ + +Ecore_X_Randr_Output * +ecore_x_randr_current_output_get(Ecore_X_Window window, + int *num) +{ + return ecore_x_randr_window_outputs_get(window, num); +} + +/* * @brief get the outputs, which display a certain window * @param window window the displaying outputs shall be found for * @param num the number of outputs displaying the window @@ -2184,13 +2402,9 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window, { #ifdef ECORE_XCB_RANDR Ecore_X_Window root; - Eina_Rectangle w_geo, c_geo; Ecore_X_Randr_Crtc *crtcs; - Ecore_X_Randr_Mode mode; - Ecore_X_Randr_Output *outputs, *ret = NULL, *tret; + Ecore_X_Randr_Output *outputs, *ret = NULL; int ncrtcs, noutputs, i, nret = 0; - xcb_translate_coordinates_cookie_t cookie; - xcb_translate_coordinates_reply_t *trans; #endif LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -2199,64 +2413,36 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window, if (num) *num = 0; #ifdef ECORE_XCB_RANDR - RANDR_CHECK_1_2_RET(NULL); - - ecore_x_window_geometry_get(window, &w_geo.x, &w_geo.y, &w_geo.w, &w_geo.h); + if (_randr_version < RANDR_1_2) goto _ecore_x_randr_current_output_get_fail; root = ecore_x_window_root_get(window); - crtcs = ecore_x_randr_crtcs_get(root, &ncrtcs); - if (!crtcs) return NULL; + if (!(crtcs = ecore_x_randr_window_crtcs_get(window, &ncrtcs))) + goto _ecore_x_randr_current_output_get_fail; - /* now get window RELATIVE to root window - thats what matters. */ - cookie = xcb_translate_coordinates(_ecore_xcb_conn, window, root, 0, 0); - trans = xcb_translate_coordinates_reply(_ecore_xcb_conn, cookie, NULL); - w_geo.x = trans->dst_x; - w_geo.y = trans->dst_y; - free(trans); - - for (i = 0; i < ncrtcs; i++) + for (i = 0, nret = 0; i < ncrtcs; i++) { - /* if crtc is not enabled, don't bother about it any further */ - mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]); - if (mode == Ecore_X_Randr_None) continue; - ecore_x_randr_crtc_geometry_get(root, crtcs[i], &c_geo.x, &c_geo.y, - &c_geo.w, &c_geo.h); - if (eina_rectangles_intersect(&w_geo, &c_geo)) - { - outputs = - ecore_x_randr_crtc_outputs_get(root, crtcs[i], &noutputs); - /* The case below should be impossible, but for safety reasons - * remains */ - if (!outputs) - { - if (num) *num = 0; - free(ret); - free(crtcs); - return NULL; - } - tret = realloc(ret, ((nret + noutputs) * - sizeof(Ecore_X_Randr_Output))); - if (!tret) - { - if (num) *num = 0; - free(outputs); - free(ret); - free(crtcs); - return NULL; - } - ret = tret; - memcpy(&ret[nret], outputs, - (noutputs * sizeof(Ecore_X_Randr_Output))); - nret += noutputs; - free(outputs); - } + outputs = ecore_x_randr_crtc_outputs_get(root, crtcs[i], + &noutputs); + if (!outputs) + goto _ecore_x_randr_current_output_get_fail_free; + nret += noutputs; + ret = realloc(ret, (nret * sizeof(Ecore_X_Randr_Output))); + memcpy(&ret[nret], outputs, (noutputs * sizeof(Ecore_X_Randr_Output))); + free(outputs); } free(crtcs); - if (num) *num = nret; + if (num) + *num = nret; + return ret; +_ecore_x_randr_current_output_get_fail_free: + free(outputs); + free(crtcs); + free(ret); +_ecore_x_randr_current_output_get_fail: #endif if (num) *num = 0; return NULL; diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c index 27bceaf..3458729 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c @@ -651,7 +651,7 @@ ecore_x_window_depth_get(Ecore_X_Window win) * @c _NET_WM_PID. * * @param win The given window. - * @ingroup Ecore_X_Window_Properties_Groups + * @ingroup Ecore_X_Window_Properties_Group */ EAPI void ecore_x_window_defaults_set(Ecore_X_Window win) @@ -1119,7 +1119,7 @@ ecore_x_window_save_set_del(Ecore_X_Window win) } /** - * gets the focus to the window @p win. + * gets the window that has focus. * @return The window that has focus. * @ingroup Ecore_X_Window_Focus_Functions */ diff --git a/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in b/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in index 27a2841..cada69a 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in +++ b/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in @@ -48,16 +48,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -197,6 +196,8 @@ 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@ @@ -252,6 +253,8 @@ 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@ @@ -262,6 +265,7 @@ 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@ diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_atoms.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_atoms.c index ee981fe..7a8bffa 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_atoms.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_atoms.c @@ -270,7 +270,20 @@ _ecore_x_atoms_init(void) { "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE }, { "_E_ILLUME_QUICKPANEL_POSITION_UPDATE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE }, - + { "_E_ILLUME_INDICATOR_STATE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE }, + { "_E_ILLUME_INDICATOR_ON", &ECORE_X_ATOM_E_ILLUME_INDICATOR_ON }, + { "_E_ILLUME_INDICATOR_OFF", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF }, + { "_E_ILLUME_INDICATOR_OPACITY_MODE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE }, + { "_E_ILLUME_INDICATOR_OPAQUE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE }, + { "_E_ILLUME_INDICATOR_TRANSLUCENT", &ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT }, + { "_E_ILLUME_INDICATOR_TRANSPARENT", &ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT }, + { "_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLES", &ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLE }, + { "_E_ILLUME_ROTATE_WINDOW_ANGLE", &ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE }, + { "_E_ILLUME_ROTATE_ROOT_ANGLE", &ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE }, + { "_E_ILLUME_CLIPBOARD_STATE", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE }, + { "_E_ILLUME_CLIPBOARD_ON", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON }, + { "_E_ILLUME_CLIPBOARD_OFF", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF }, + { "_E_ILLUME_CLIPBOARD_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY }, { "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER }, { "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE }, { "_E_COMP_SYNC_SUPPORTED", &ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED }, diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_e.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_e.c index 5966bbd..4bd5218 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_e.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_e.c @@ -768,6 +768,99 @@ ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win) 1, 0, 0, 0, 0); } +static Ecore_X_Atom +_ecore_x_e_clipboard_atom_get(Ecore_X_Illume_Clipboard_State state) +{ + switch (state) + { + case ECORE_X_ILLUME_CLIPBOARD_STATE_ON: + return ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON; + case ECORE_X_ILLUME_CLIPBOARD_STATE_OFF: + return ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF; + default: + break; + } + return 0; +} + +static Ecore_X_Illume_Clipboard_State +_ecore_x_e_clipboard_state_get(Ecore_X_Atom atom) +{ + if (atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON) + return ECORE_X_ILLUME_CLIPBOARD_STATE_ON; + + if (atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF) + return ECORE_X_ILLUME_CLIPBOARD_STATE_OFF; + + return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; +} + +EAPI void +ecore_x_e_illume_clipboard_state_set(Ecore_X_Window win, + Ecore_X_Illume_Clipboard_State state) +{ + Ecore_X_Atom atom = 0; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + atom = _ecore_x_e_clipboard_atom_get(state); + + ecore_x_window_prop_atom_set(win, + ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE, + &atom, 1); +} + +EAPI Ecore_X_Illume_Clipboard_State +ecore_x_e_illume_clipboard_state_get(Ecore_X_Window win) +{ + Ecore_X_Atom atom = 0; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ecore_x_window_prop_atom_get(win, + ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE, + &atom, 1)) + return ECORE_X_ILLUME_CLIPBOARD_STATE_UNKNOWN; + return _ecore_x_e_clipboard_state_get(atom); +} + +EAPI void +ecore_x_e_illume_clipboard_geometry_set(Ecore_X_Window win, + int x, int y, int w, int h) +{ + unsigned int geom[4]; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + geom[0] = x; + geom[1] = y; + geom[2] = w; + geom[3] = h; + ecore_x_window_prop_card32_set(win, + ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY, + geom, 4); +} + +EAPI Eina_Bool +ecore_x_e_illume_clipboard_geometry_get(Ecore_X_Window win, + int *x, int *y, int *w, int *h) +{ + int ret = 0; + unsigned int geom[4]; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + ret = + ecore_x_window_prop_card32_get(win, + ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY, + geom, 4); + if (ret != 4) return EINA_FALSE; + + if (x) *x = geom[0]; + if (y) *y = geom[1]; + if (w) *w = geom[2]; + if (h) *h = geom[3]; + + return EINA_TRUE; +} + EAPI void ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, Ecore_X_Sync_Counter counter) @@ -1058,3 +1151,143 @@ ecore_x_e_comp_pixmap_get(Ecore_X_Window win) return pixmap; } +static Ecore_X_Atom +_ecore_x_e_indicator_atom_get(Ecore_X_Illume_Indicator_State state) +{ + switch (state) + { + case ECORE_X_ILLUME_INDICATOR_STATE_ON: + return ECORE_X_ATOM_E_ILLUME_INDICATOR_ON; + + case ECORE_X_ILLUME_INDICATOR_STATE_OFF: + return ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF; + + default: + break; + } + return 0; +} + +static Ecore_X_Illume_Indicator_State +_ecore_x_e_indicator_state_get(Ecore_X_Atom atom) +{ + if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_ON) + return ECORE_X_ILLUME_INDICATOR_STATE_ON; + + if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF) + return ECORE_X_ILLUME_INDICATOR_STATE_OFF; + + return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; +} + +EAPI void +ecore_x_e_illume_indicator_state_set(Ecore_X_Window win, + Ecore_X_Illume_Indicator_State state) +{ + Ecore_X_Atom atom = 0; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + atom = _ecore_x_e_indicator_atom_get(state); + ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, + &atom, 1); +} + +EAPI Ecore_X_Illume_Indicator_State +ecore_x_e_illume_indicator_state_get(Ecore_X_Window win) +{ + Ecore_X_Atom atom; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + if (!ecore_x_window_prop_atom_get(win, + ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, + &atom, 1)) + return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; + + return _ecore_x_e_indicator_state_get(atom); +} + +EAPI void +ecore_x_e_illume_indicator_state_send(Ecore_X_Window win, + Ecore_X_Illume_Indicator_State state) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, + ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, + _ecore_x_e_indicator_atom_get(state), + 0, 0, 0, 0); +} + +static Ecore_X_Atom +_ecore_x_e_indicator_opacity_atom_get(Ecore_X_Illume_Indicator_Opacity_Mode mode) +{ + switch (mode) + { + case ECORE_X_ILLUME_INDICATOR_OPAQUE: + return ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE; + + case ECORE_X_ILLUME_INDICATOR_TRANSLUCENT: + return ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT; + + case ECORE_X_ILLUME_INDICATOR_TRANSPARENT: + return ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT; + + default: + break; + } + return 0; +} + +static Ecore_X_Illume_Indicator_Opacity_Mode +_ecore_x_e_indicator_opacity_get(Ecore_X_Atom atom) +{ + if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE) + return ECORE_X_ILLUME_INDICATOR_OPAQUE; + + if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT) + return ECORE_X_ILLUME_INDICATOR_TRANSLUCENT; + + if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT) + return ECORE_X_ILLUME_INDICATOR_TRANSPARENT; + + return ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN; +} + +EAPI void +ecore_x_e_illume_indicator_opacity_set(Ecore_X_Window win, + Ecore_X_Illume_Indicator_Opacity_Mode mode) +{ + Ecore_X_Atom atom = 0; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + atom = _ecore_x_e_indicator_opacity_atom_get(mode); + ecore_x_window_prop_atom_set(win, + ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, + &atom, 1); +} + +EAPI Ecore_X_Illume_Indicator_Opacity_Mode +ecore_x_e_illume_indicator_opacity_get(Ecore_X_Window win) +{ + Ecore_X_Atom atom; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + if (!ecore_x_window_prop_atom_get(win, + ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, + &atom, 1)) + return ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN; + + return _ecore_x_e_indicator_opacity_get(atom); +} + +EAPI void +ecore_x_e_illume_indicator_opacity_send(Ecore_X_Window win, + Ecore_X_Illume_Indicator_Opacity_Mode mode) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + ecore_x_client_message32_send(win, + ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, + ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, + _ecore_x_e_indicator_opacity_atom_get(mode), + 0, 0, 0, 0); +} + diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c index 9fc428a..3076c3c 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c @@ -661,6 +661,57 @@ ecore_x_netwm_strut_partial_get(Ecore_X_Window win, return EINA_TRUE; } +EAPI void +ecore_x_netwm_icons_set(Ecore_X_Window win, + Ecore_X_Icon *icon, + int num) +{ + unsigned int *data, *p, *p2; + unsigned int i, size, x, y; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + size = 0; + for (i = 0; i < (unsigned int)num; i++) + { + size += 2 + (icon[i].width * icon[i].height); + } + data = malloc(size * sizeof(unsigned int)); + if (!data) return; + p = data; + for (i = 0; i < (unsigned int)num; i++) + { + p[0] = icon[i].width; + p[1] = icon[i].height; + p += 2; + p2 = icon[i].data; + for (y = 0; y < icon[i].height; y++) + { + for (x = 0; x < icon[i].width; x++) + { + unsigned int r, g, b, a; + + a = (*p2 >> 24) & 0xff; + r = (*p2 >> 16) & 0xff; + g = (*p2 >> 8 ) & 0xff; + b = (*p2 ) & 0xff; + if ((a > 0) && (a < 255)) + { + // unpremul + r = (r * 255) / a; + g = (g * 255) / a; + b = (b * 255) / a; + } + *p = (a << 24) | (r << 16) | (g << 8) | b; + p++; + p2++; + } + } + } + ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_ICON, + data, size); + free(data); +} + EAPI Eina_Bool ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c index 38218a5..ec23b3c 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c @@ -347,9 +347,9 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, ret[i]->vSyncStart = res->modes[i].vSyncStart; ret[i]->vSyncEnd = res->modes[i].vSyncEnd; ret[i]->vTotal = res->modes[i].vTotal; - if ((ret[i]->name = (malloc(res->modes[i].nameLength)))) + if ((ret[i]->name = (malloc(res->modes[i].nameLength + 1)))) strncpy(ret[i]->name, res->modes[i].name, - res->modes[i].nameLength); + (res->modes[i].nameLength + 1)); else ret[i]->name = NULL; @@ -380,6 +380,48 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, } /* + * @brief add a mode to a display + * @param root window to which's screen's ressources are added + * @param mode_info + * @return Ecore_X_Randr_Mode of the added mode. Ecore_X_Randr_None if mode + * adding failed. + * @since 1.2.0 + */ +EAPI Ecore_X_Randr_Mode +ecore_x_randr_mode_info_add(Ecore_X_Window root, + Ecore_X_Randr_Mode_Info *mode_info) +{ +#ifdef ECORE_XRANDR + RANDR_CHECK_1_2_RET(EINA_FALSE); + Ecore_X_Randr_Mode mode = Ecore_X_Randr_None; + + if (_ecore_x_randr_root_validate(root) && mode_info) + mode = XRRCreateMode(_ecore_x_disp, root, (XRRModeInfo*)mode_info); + + return mode; +#else + return Ecore_X_Randr_None; +#endif +} + +/* + * @brief delete a mode from the display + * @param mode_info + * @since 1.2.0 + */ +EAPI void +ecore_x_randr_mode_del(Ecore_X_Randr_Mode mode) +{ +#ifdef ECORE_XRANDR + RANDR_CHECK_1_2_RET(); + + XRRDestroyMode(_ecore_x_disp, mode); +#else + return; +#endif +} + +/* * @brief get detailed information for a given mode id * @param root window which's screen's ressources are queried * @param mode the XID which identifies the mode of interest @@ -491,6 +533,83 @@ ecore_x_randr_crtcs_get(Ecore_X_Window root, #endif } +/* + * @deprecated bad naming. Use ecore_x_randr_window_crtcs_get instead. + * @brief get the CRTCs, which display a certain window + * @param window window the displaying crtcs shall be found for + * @param num the number of crtcs displaying the window + * @return array of crtcs that display a certain window. NULL if no crtcs + * was found that displays the specified window. + */ +EAPI Ecore_X_Randr_Crtc * +ecore_x_randr_current_crtc_get(Ecore_X_Window window, + int *num) +{ + return ecore_x_randr_window_crtcs_get(window, num); +} + +/* + * @brief get the CRTCs, which display a certain window + * @param window window the displaying crtcs shall be found for + * @param num the number of crtcs displaying the window + * @return array of crtcs that display a certain window. NULL if no crtcs + * was found that displays the specified window. + * @since 1.2.0 + */ +EAPI Ecore_X_Randr_Crtc * +ecore_x_randr_window_crtcs_get(Ecore_X_Window window, + int *num) +{ +#ifdef ECORE_XRANDR + Ecore_X_Window root; + Eina_Rectangle w_geo, c_geo; + Ecore_X_Randr_Crtc *crtcs; + Ecore_X_Randr_Mode mode; + Ecore_X_Randr_Output *ret = NULL; + Window tw; + int ncrtcs, i, nret = 0, rx = 0, ry = 0; + + if (_randr_version < RANDR_1_2) goto _ecore_x_randr_window_crtcs_get_fail; + + ecore_x_window_geometry_get(window, + &w_geo.x, &w_geo.y, + &w_geo.w, &w_geo.h); + + root = ecore_x_window_root_get(window); + crtcs = ecore_x_randr_crtcs_get(root, &ncrtcs); + if (!crtcs) goto _ecore_x_randr_window_crtcs_get_fail; + + /* now get window RELATIVE to root window - thats what matters. */ + XTranslateCoordinates(_ecore_x_disp, window, root, 0, 0, &rx, &ry, &tw); + w_geo.x = rx; + w_geo.y = ry; + + for (i = 0, nret = 0; i < ncrtcs; i++) + { + /* if crtc is not enabled, don't bother about it any further */ + mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]); + if (mode == Ecore_X_Randr_None) continue; + + ecore_x_randr_crtc_geometry_get(root, crtcs[i], + &c_geo.x, &c_geo.y, + &c_geo.w, &c_geo.h); + if (eina_rectangles_intersect(&w_geo, &c_geo)) + { + ret = realloc(ret, (sizeof(Ecore_X_Randr_Crtc) * ++nret)); + ret[nret] = crtcs[i]; + } + } + free(crtcs); + + if (num) *num = nret; + return ret; + +_ecore_x_randr_window_crtcs_get_fail: +#endif + if (num) *num = 0; + return NULL; +} + EAPI Ecore_X_Randr_Output * ecore_x_randr_outputs_get(Ecore_X_Window root, int *num) @@ -1364,6 +1483,54 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, #endif } +/* + * @brief add given mode to given output + * @param output the output the mode is added to + * @param mode the mode added to the output + * @return EINA_FALSE if output or mode equal Ecore_X_Randr_None, else EINA_TRUE + * Additionally, if xcb backend is used, the success of the addition is reported + * back directly. + * @since 1.2.0 + */ +EAPI Eina_Bool +ecore_x_randr_output_mode_add(Ecore_X_Randr_Output output, + Ecore_X_Randr_Mode mode) +{ +#ifdef ECORE_XRANDR + RANDR_CHECK_1_2_RET(EINA_FALSE); + + if ((output == Ecore_X_Randr_None) || (mode == Ecore_X_Randr_None)) + return EINA_FALSE; + + XRRAddOutputMode(_ecore_x_disp, output, mode); + return EINA_TRUE; +#else + return EINA_FALSE; +#endif +} + +/* + * @brief delete given mode from given output + * @param output the output the mode is removed from + * @param mode the mode removed from the output + * @since 1.2.0 + */ +EAPI void +ecore_x_randr_output_mode_del(Ecore_X_Randr_Output output, + Ecore_X_Randr_Mode mode) +{ +#ifdef ECORE_XRANDR + RANDR_CHECK_1_2_RET(); + + if ((output == Ecore_X_Randr_None) || (mode == Ecore_X_Randr_None)) + return; + + XRRDeleteOutputMode(_ecore_x_disp, output, mode); +#else + return; +#endif +} + EAPI Ecore_X_Randr_Mode * ecore_x_randr_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output output, @@ -2136,70 +2303,39 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window, { #ifdef ECORE_XRANDR Ecore_X_Window root; - Eina_Rectangle w_geo, c_geo; Ecore_X_Randr_Crtc *crtcs; - Ecore_X_Randr_Mode mode; - Ecore_X_Randr_Output *outputs, *ret = NULL, *tret; - Window tw; - int ncrtcs, noutputs, i, nret = 0, rx = 0, ry = 0; + Ecore_X_Randr_Output *outputs, *ret = NULL; + int ncrtcs, noutputs, i, nret = 0; if (_randr_version < RANDR_1_2) goto _ecore_x_randr_current_output_get_fail; - ecore_x_window_geometry_get(window, - &w_geo.x, &w_geo.y, - &w_geo.w, &w_geo.h); - root = ecore_x_window_root_get(window); - crtcs = ecore_x_randr_crtcs_get(root, &ncrtcs); - if (!crtcs) goto _ecore_x_randr_current_output_get_fail; - - /* now get window RELATIVE to root window - thats what matters. */ - XTranslateCoordinates(_ecore_x_disp, window, root, 0, 0, &rx, &ry, &tw); - w_geo.x = rx; - w_geo.y = ry; + if (!(crtcs = ecore_x_randr_window_crtcs_get(window, &ncrtcs))) + goto _ecore_x_randr_current_output_get_fail; - for (i = 0; i < ncrtcs; i++) + for (i = 0, nret = 0; i < ncrtcs; i++) { - /* if crtc is not enabled, don't bother about it any further */ - mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]); - if (mode == Ecore_X_Randr_None) continue; - ecore_x_randr_crtc_geometry_get(root, crtcs[i], - &c_geo.x, &c_geo.y, - &c_geo.w, &c_geo.h); - if (eina_rectangles_intersect(&w_geo, &c_geo)) - { - outputs = ecore_x_randr_crtc_outputs_get(root, crtcs[i], - &noutputs); - /* The case below should be impossible, but for safety reasons - * remains */ - if (!outputs) - { - if (num) *num = 0; - free(ret); - free(crtcs); - return NULL; - } - tret = realloc(ret, ((nret + noutputs) * sizeof(Ecore_X_Randr_Output))); - if (!tret) - { - if (num) *num = 0; - free(outputs); - free(ret); - free(crtcs); - return NULL; - } - ret = tret; - memcpy(&ret[nret], outputs, (noutputs * sizeof(Ecore_X_Randr_Output))); - nret += noutputs; - free(outputs); - } + outputs = ecore_x_randr_crtc_outputs_get(root, crtcs[i], + &noutputs); + if (!outputs) + goto _ecore_x_randr_current_output_get_fail_free; + nret += noutputs; + ret = realloc(ret, (nret * sizeof(Ecore_X_Randr_Output))); + memcpy(&ret[nret], outputs, (noutputs * sizeof(Ecore_X_Randr_Output))); + free(outputs); } free(crtcs); - if (num) *num = nret; + if (num) + *num = nret; + return ret; +_ecore_x_randr_current_output_get_fail_free: + free(outputs); + free(crtcs); + free(ret); _ecore_x_randr_current_output_get_fail: #endif if (num) *num = 0; @@ -2207,7 +2343,7 @@ _ecore_x_randr_current_output_get_fail: } /* - * @depricated bad naming. Use ecore_x_randr_window_outputs_get instead. + * @deprecated bad naming. Use ecore_x_randr_window_outputs_get instead. * @brief get the outputs, which display a certain window * @param window window the displaying outputs shall be found for * @param num the number of outputs displaying the window @@ -2215,7 +2351,7 @@ _ecore_x_randr_current_output_get_fail: * was found that displays the specified window. */ -EINA_DEPRECATED EAPI Ecore_X_Randr_Output * +EAPI Ecore_X_Randr_Output * ecore_x_randr_current_output_get(Ecore_X_Window window, int *num) { diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_test.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_test.c index c8c04e4..23eea10 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_test.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_test.c @@ -153,3 +153,15 @@ ecore_x_keysym_string_get(int keysym) return XKeysymToString(keysym); } +EAPI int +ecore_x_keysym_keycode_get(const char *keyname) +{ + int keycode = 0; + + if (!strncmp(keyname, "Keycode-", 8)) + keycode = atoi(keyname + 8); + else + keycode = XKeysymToKeycode(_ecore_x_disp, XStringToKeysym(keyname)); + + return keycode; +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window.c index 1adb36b..90392bf 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window.c @@ -224,7 +224,7 @@ ecore_x_window_input_new(Ecore_X_Window parent, * @c _NET_WM_PID. * * @param win The given window. - * @ingroup Ecore_X_Window_Properties_Groups + * @ingroup Ecore_X_Window_Properties_Group */ EAPI void ecore_x_window_defaults_set(Ecore_X_Window win) @@ -597,7 +597,7 @@ ecore_x_window_focus_at_time(Ecore_X_Window win, } /** - * gets the focus to the window @p win. + * gets the window that has focus. * @return The window that has focus. * @ingroup Ecore_X_Window_Focus_Functions */ diff --git a/libraries/ecore/src/modules/Makefile.in b/libraries/ecore/src/modules/Makefile.in index 4bb9420..e2cf44a 100644 --- a/libraries/ecore/src/modules/Makefile.in +++ b/libraries/ecore/src/modules/Makefile.in @@ -47,16 +47,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -172,6 +171,8 @@ 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@ @@ -227,6 +228,8 @@ 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@ @@ -237,6 +240,7 @@ 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@ diff --git a/libraries/ecore/src/modules/immodules/Makefile.in b/libraries/ecore/src/modules/immodules/Makefile.in index e65881c..5dacbed 100644 --- a/libraries/ecore/src/modules/immodules/Makefile.in +++ b/libraries/ecore/src/modules/immodules/Makefile.in @@ -49,16 +49,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -174,6 +173,8 @@ 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@ @@ -229,6 +230,8 @@ 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@ @@ -239,6 +242,7 @@ 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@ diff --git a/libraries/ecore/src/modules/immodules/scim/Makefile.in b/libraries/ecore/src/modules/immodules/scim/Makefile.in index 9fc3283..ae6fc7d 100644 --- a/libraries/ecore/src/modules/immodules/scim/Makefile.in +++ b/libraries/ecore/src/modules/immodules/scim/Makefile.in @@ -48,16 +48,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -205,6 +204,8 @@ 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@ @@ -260,6 +261,8 @@ 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@ @@ -270,6 +273,7 @@ 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@ diff --git a/libraries/ecore/src/modules/immodules/scim/scim_imcontext.cpp b/libraries/ecore/src/modules/immodules/scim/scim_imcontext.cpp index 6cb72c2..eb9b5c9 100644 --- a/libraries/ecore/src/modules/immodules/scim/scim_imcontext.cpp +++ b/libraries/ecore/src/modules/immodules/scim/scim_imcontext.cpp @@ -223,18 +223,18 @@ static int __current_super_mask = 0; static int __current_hyper_mask = 0; static int __current_numlock_mask = Mod2Mask; -// A hack to shutdown the immodule cleanly even if im_module_exit () is not called when exiting. +// A hack to shutdown the immodule cleanly even if im_module_exit() is not called when exiting. class FinalizeHandler { public: - FinalizeHandler () + FinalizeHandler() { - SCIM_DEBUG_FRONTEND(1) << "FinalizeHandler::FinalizeHandler ()\n"; + SCIM_DEBUG_FRONTEND(1) << "FinalizeHandler::FinalizeHandler()\n"; } - ~FinalizeHandler () + ~FinalizeHandler() { - SCIM_DEBUG_FRONTEND(1) << "FinalizeHandler::~FinalizeHandler ()\n"; - isf_imf_context_shutdown (); + SCIM_DEBUG_FRONTEND(1) << "FinalizeHandler::~FinalizeHandler()\n"; + isf_imf_context_shutdown(); } }; @@ -254,12 +254,12 @@ utf8_offset_to_index(const char *str, int offset) } static unsigned int -get_time (void) +get_time(void) { unsigned int tint; struct timeval tv; struct timezone tz; /* is not used since ages */ - gettimeofday (&tv, &tz); + gettimeofday(&tv, &tz); tint = tv.tv_sec * 1000; tint = tint / 1000 * 1000; tint = tint + tv.tv_usec / 1000; @@ -268,7 +268,7 @@ get_time (void) /* Function Implementations */ static EcoreIMFContextISFImpl * -new_ic_impl (EcoreIMFContextISF *parent) +new_ic_impl(EcoreIMFContextISF *parent) { EcoreIMFContextISFImpl *impl = NULL; @@ -295,7 +295,7 @@ new_ic_impl (EcoreIMFContextISF *parent) } static void -delete_ic_impl (EcoreIMFContextISFImpl *impl) +delete_ic_impl(EcoreIMFContextISFImpl *impl) { EcoreIMFContextISFImpl *rec = _used_ic_impl_list, *last = 0; @@ -312,10 +312,10 @@ delete_ic_impl (EcoreIMFContextISFImpl *impl) _free_ic_impl_list = rec; rec->parent = 0; - rec->si.reset (); + rec->si.reset(); rec->client_window = 0; - rec->preedit_string = WideString (); - rec->preedit_attrlist.clear (); + rec->preedit_string = WideString(); + rec->preedit_attrlist.clear(); return; } @@ -323,7 +323,7 @@ delete_ic_impl (EcoreIMFContextISFImpl *impl) } static void -delete_all_ic_impl (void) +delete_all_ic_impl(void) { EcoreIMFContextISFImpl *it = _used_ic_impl_list; @@ -344,7 +344,7 @@ delete_all_ic_impl (void) } static EcoreIMFContextISF * -find_ic (int id) +find_ic(int id) { EcoreIMFContextISFImpl *rec = _used_ic_impl_list; @@ -363,17 +363,18 @@ analyze_surrounding_text(Ecore_IMF_Context *ctx) { char *plain_str = NULL; char *markup_str = NULL; - const char *puncs[3] = {". ", "! ", "? "}; + const char *puncs[] = {". ", "! ", "? "}; Eina_Bool ret = EINA_FALSE; int cursor_pos = 0; int i = 0; Eina_Unicode *tail = NULL; Eina_Unicode *ustr = NULL; - Eina_Unicode *uni_puncs[3]; + const int punc_num = sizeof(puncs) / sizeof(puncs[0]); + Eina_Unicode *uni_puncs[punc_num]; EcoreIMFContextISF *context_scim; if (!ctx) return EINA_FALSE; - context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get(ctx); if (!context_scim || !context_scim->impl) return EINA_FALSE; switch (context_scim->impl->autocapital_type) @@ -386,7 +387,7 @@ analyze_surrounding_text(Ecore_IMF_Context *ctx) break; } - for (i=0; i<3; i++) + for (i = 0; i < punc_num; i++) uni_puncs[i] = eina_unicode_utf8_to_unicode(puncs[i], NULL); ecore_imf_context_surrounding_get(ctx, &markup_str, &cursor_pos); @@ -432,7 +433,7 @@ analyze_surrounding_text(Ecore_IMF_Context *ctx) if (tail) { - for (i=0; i<3; i++) + for (i = 0; i < punc_num; i++) { if (!eina_unicode_strcmp(tail, uni_puncs[i])) { @@ -450,7 +451,7 @@ done: if (markup_str) free(markup_str); if (plain_str) free(plain_str); - for (i=0; i<3; i++) + for (i = 0; i < punc_num; i++) if (uni_puncs[i]) free(uni_puncs[i]); return ret; @@ -463,7 +464,7 @@ caps_mode_check(Ecore_IMF_Context *ctx, Eina_Bool force) EcoreIMFContextISF *context_scim; if (!ctx) return; - context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get(ctx); if (autocap_allow == EINA_FALSE) return; @@ -485,28 +486,52 @@ caps_mode_check(Ecore_IMF_Context *ctx, Eina_Bool force) } static void -feed_key_event (Evas *evas, const char *str, Eina_Bool fake) +feed_key_event(Evas *evas, const char *str, Eina_Bool fake) { char key_string[128] = {0}; unsigned int timestamp = 0; if (!fake) - timestamp = get_time (); + timestamp = get_time(); - if (strncmp (str, "KeyRelease+", 11) == 0) + if (strncmp(str, "KeyRelease+", 11) == 0) { strncpy(key_string, str + 11, strlen(str)-11); - evas_event_feed_key_up (evas, key_string, key_string, NULL, NULL, timestamp, NULL); - SCIM_DEBUG_FRONTEND(1) << " evas_event_feed_key_up ()...\n"; + evas_event_feed_key_up(evas, key_string, key_string, NULL, NULL, timestamp, NULL); + SCIM_DEBUG_FRONTEND(1) << " evas_event_feed_key_up()...\n"; } else { strncpy(key_string, str, strlen(str)); - evas_event_feed_key_down (evas, key_string, key_string, NULL, NULL, timestamp, NULL); - SCIM_DEBUG_FRONTEND(1) << " evas_event_feed_key_down ()...\n"; + evas_event_feed_key_down(evas, key_string, key_string, NULL, NULL, timestamp, NULL); + SCIM_DEBUG_FRONTEND(1) << " evas_event_feed_key_down()...\n"; } } +static void +window_to_screen_geometry_get(Ecore_X_Window client_win, int *x, int *y) +{ + Ecore_X_Window root_window, win; + int win_x, win_y; + int sum_x = 0, sum_y = 0; + + root_window = ecore_x_window_root_get(client_win); + win = client_win; + + while (root_window != win) + { + ecore_x_window_geometry_get(win, &win_x, &win_y, NULL, NULL); + sum_x += win_x; + sum_y += win_y; + win = ecore_x_window_parent_get(win); + } + + if (x) + *x = sum_x; + if (y) + *y = sum_y; +} + /* Public functions */ /** * isf_imf_context_new @@ -517,18 +542,11 @@ feed_key_event (Evas *evas, const char *str, Eina_Bool fake) * Return value: A pointer to the newly created EcoreIMFContextISF instance */ EAPI EcoreIMFContextISF * -isf_imf_context_new (void) +isf_imf_context_new(void) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; char *env; - Ecore_X_Display *display = ecore_x_display_get (); - if (!display) - { - std::cerr << "ecore_x_display_get () failed !!!"; - return NULL; - } - EcoreIMFContextISF *context_scim = new EcoreIMFContextISF; if (context_scim == NULL) { @@ -540,7 +558,7 @@ isf_imf_context_new (void) if (!_scim_initialized) { - initialize (); + initialize(); _scim_initialized = true; } @@ -558,61 +576,61 @@ isf_imf_context_new (void) * cleanup job. */ EAPI void -isf_imf_context_shutdown (void) +isf_imf_context_shutdown(void) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; if (_scim_initialized) { _scim_initialized = false; - finalize (); + finalize(); } } EAPI void -isf_imf_context_add (Ecore_IMF_Context *ctx) +isf_imf_context_add(Ecore_IMF_Context *ctx) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get(ctx); if (!context_scim) return; context_scim->impl = NULL; - if (_backend.null ()) + if (_backend.null()) return; IMEngineInstancePointer si; // Use the default instance if "shared input method" mode is enabled. - if (_shared_input_method && !_default_instance.null ()) + if (_shared_input_method && !_default_instance.null()) { si = _default_instance; - SCIM_DEBUG_FRONTEND(2) << "use default instance: " << si->get_id () << " " << si->get_factory_uuid () << "\n"; + SCIM_DEBUG_FRONTEND(2) << "use default instance: " << si->get_id() << " " << si->get_factory_uuid() << "\n"; } // Not in "shared input method" mode, or no default instance, create an instance. - if (si.null ()) + if (si.null()) { - IMEngineFactoryPointer factory = _backend->get_default_factory (_language, "UTF-8"); - if (factory.null ()) return; - si = factory->create_instance ("UTF-8", _instance_count++); - if (si.null ()) return; - attach_instance (si); - SCIM_DEBUG_FRONTEND(2) << "create new instance: " << si->get_id () << " " << si->get_factory_uuid () << "\n"; + IMEngineFactoryPointer factory = _backend->get_default_factory(_language, "UTF-8"); + if (factory.null()) return; + si = factory->create_instance("UTF-8", _instance_count++); + if (si.null()) return; + attach_instance(si); + SCIM_DEBUG_FRONTEND(2) << "create new instance: " << si->get_id() << " " << si->get_factory_uuid() << "\n"; } // If "shared input method" mode is enabled, and there is no default instance, // then store this instance as default one. - if (_shared_input_method && _default_instance.null ()) + if (_shared_input_method && _default_instance.null()) { SCIM_DEBUG_FRONTEND(2) << "update default instance.\n"; _default_instance = si; } context_scim->ctx = ctx; - context_scim->impl = new_ic_impl (context_scim); + context_scim->impl = new_ic_impl(context_scim); if (context_scim->impl == NULL) { std::cerr << "memory allocation failed in " << __FUNCTION__ << "\n"; @@ -640,24 +658,24 @@ isf_imf_context_add (Ecore_IMF_Context *ctx) _ic_list = context_scim; if (_shared_input_method) - context_scim->impl->is_on = _config->read (String (SCIM_CONFIG_FRONTEND_IM_OPENED_BY_DEFAULT), context_scim->impl->is_on); + context_scim->impl->is_on = _config->read(String(SCIM_CONFIG_FRONTEND_IM_OPENED_BY_DEFAULT), context_scim->impl->is_on); - _panel_client.prepare (context_scim->id); - _panel_client.register_input_context (context_scim->id, si->get_factory_uuid ()); - set_ic_capabilities (context_scim); - _panel_client.send (); + _panel_client.prepare(context_scim->id); + _panel_client.register_input_context(context_scim->id, si->get_factory_uuid()); + set_ic_capabilities(context_scim); + _panel_client.send(); SCIM_DEBUG_FRONTEND(2) << "input context created: id = " << context_scim->id << "\n"; } EAPI void -isf_imf_context_del (Ecore_IMF_Context *ctx) +isf_imf_context_del(Ecore_IMF_Context *ctx) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; if (!_ic_list) return; - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get(ctx); if (context_scim) { @@ -682,32 +700,32 @@ isf_imf_context_del (Ecore_IMF_Context *ctx) if (context_scim && context_scim->impl) { - _panel_client.prepare (context_scim->id); + _panel_client.prepare(context_scim->id); if (context_scim == _focused_ic) - context_scim->impl->si->focus_out (); + context_scim->impl->si->focus_out(); // Delete the instance. EcoreIMFContextISF *old_focused = _focused_ic; _focused_ic = context_scim; - context_scim->impl->si.reset (); + context_scim->impl->si.reset(); _focused_ic = old_focused; if (context_scim == _focused_ic) { - _panel_client.turn_off (context_scim->id); - _panel_client.focus_out (context_scim->id); + _panel_client.turn_off(context_scim->id); + _panel_client.focus_out(context_scim->id); } - _panel_client.remove_input_context (context_scim->id); - _panel_client.send (); + _panel_client.remove_input_context(context_scim->id); + _panel_client.send(); if (context_scim->impl->client_window) - isf_imf_context_client_window_set (ctx, NULL); + isf_imf_context_client_window_set(ctx, NULL); if (context_scim->impl) { - delete_ic_impl (context_scim->impl); + delete_ic_impl(context_scim->impl); context_scim->impl = 0; } } @@ -738,11 +756,11 @@ isf_imf_context_del (Ecore_IMF_Context *ctx) * be used for purposes internal to the Input Method Context. */ EAPI void -isf_imf_context_client_canvas_set (Ecore_IMF_Context *ctx, void *canvas) +isf_imf_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get(ctx); if (context_scim && context_scim->impl && context_scim->impl->client_canvas != (Evas*) canvas) context_scim->impl->client_canvas = (Evas*)canvas; @@ -762,11 +780,11 @@ isf_imf_context_client_canvas_set (Ecore_IMF_Context *ctx, void *canvas) * and may also be used for purposes internal to the Input Method Context. */ EAPI void -isf_imf_context_client_window_set (Ecore_IMF_Context *ctx, void *window) +isf_imf_context_client_window_set(Ecore_IMF_Context *ctx, void *window) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get(ctx); if (context_scim && context_scim->impl && context_scim->impl->client_window != (Ecore_X_Window)((Ecore_Window)window)) { @@ -789,29 +807,29 @@ isf_imf_context_client_window_set (Ecore_IMF_Context *ctx, void *window) * to clear the preedit state. */ EAPI void -isf_imf_context_reset (Ecore_IMF_Context *ctx) +isf_imf_context_reset(Ecore_IMF_Context *ctx) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get(ctx); if (context_scim && context_scim->impl && context_scim == _focused_ic) { WideString wstr = context_scim->impl->preedit_string; - _panel_client.prepare (context_scim->id); - context_scim->impl->si->reset (); - _panel_client.send (); + _panel_client.prepare(context_scim->id); + context_scim->impl->si->reset(); + _panel_client.send(); if (context_scim->impl->need_commit_preedit) { - if (wstr.length ()) + if (wstr.length()) { - ecore_imf_context_commit_event_add (context_scim->ctx, utf8_wcstombs (wstr).c_str ()); + ecore_imf_context_commit_event_add(context_scim->ctx, utf8_wcstombs(wstr).c_str()); ecore_imf_context_event_callback_call(context_scim->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(wstr).c_str()); } - _panel_client.prepare (context_scim->id); - _panel_client.send (); + _panel_client.prepare(context_scim->id); + _panel_client.send(); } } } @@ -825,9 +843,9 @@ isf_imf_context_reset (Ecore_IMF_Context *ctx) * Notify the Input Method Context that the widget to which its correspond has gained focus. */ EAPI void -isf_imf_context_focus_in (Ecore_IMF_Context *ctx) +isf_imf_context_focus_in(Ecore_IMF_Context *ctx) { - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get(ctx); if (!context_scim) return; @@ -839,12 +857,11 @@ isf_imf_context_focus_in (Ecore_IMF_Context *ctx) if (_focused_ic == context_scim) { SCIM_DEBUG_FRONTEND(1) << "It's already focused.\n"; - //isf_imf_context_cursor_position_set (ctx, 0); return; } SCIM_DEBUG_FRONTEND(1) << "Focus out previous IC first: " << _focused_ic->id << "\n"; if (_focused_ic->ctx) - isf_imf_context_focus_out (_focused_ic->ctx); + isf_imf_context_focus_out(_focused_ic->ctx); } bool need_cap = false; @@ -854,28 +871,28 @@ isf_imf_context_focus_in (Ecore_IMF_Context *ctx) if (context_scim && context_scim->impl) { _focused_ic = context_scim; - _panel_client.prepare (context_scim->id); + _panel_client.prepare(context_scim->id); // Handle the "Shared Input Method" mode. if (_shared_input_method) { SCIM_DEBUG_FRONTEND(2) << "shared input method.\n"; - IMEngineFactoryPointer factory = _backend->get_default_factory (_language, "UTF-8"); - if (!factory.null ()) + IMEngineFactoryPointer factory = _backend->get_default_factory(_language, "UTF-8"); + if (!factory.null()) { - if (_default_instance.null () || _default_instance->get_factory_uuid () != factory->get_uuid ()) + if (_default_instance.null() || _default_instance->get_factory_uuid() != factory->get_uuid()) { - _default_instance = factory->create_instance ("UTF-8", _default_instance.null () ? _instance_count++ : _default_instance->get_id ()); - attach_instance (_default_instance); - SCIM_DEBUG_FRONTEND(2) << "create new default instance: " << _default_instance->get_id () << " " << _default_instance->get_factory_uuid () << "\n"; + _default_instance = factory->create_instance("UTF-8", _default_instance.null() ? _instance_count++ : _default_instance->get_id()); + attach_instance(_default_instance); + SCIM_DEBUG_FRONTEND(2) << "create new default instance: " << _default_instance->get_id() << " " << _default_instance->get_factory_uuid() << "\n"; } context_scim->impl->shared_si = true; context_scim->impl->si = _default_instance; - context_scim->impl->is_on = _config->read (String (SCIM_CONFIG_FRONTEND_IM_OPENED_BY_DEFAULT), context_scim->impl->is_on); - context_scim->impl->preedit_string.clear (); - context_scim->impl->preedit_attrlist.clear (); + context_scim->impl->is_on = _config->read(String(SCIM_CONFIG_FRONTEND_IM_OPENED_BY_DEFAULT), context_scim->impl->is_on); + context_scim->impl->preedit_string.clear(); + context_scim->impl->preedit_attrlist.clear(); context_scim->impl->preedit_caret = 0; context_scim->impl->preedit_started = false; need_cap = true; @@ -886,47 +903,50 @@ isf_imf_context_focus_in (Ecore_IMF_Context *ctx) else if (context_scim->impl->shared_si) { SCIM_DEBUG_FRONTEND(2) << "exit shared input method.\n"; - IMEngineFactoryPointer factory = _backend->get_default_factory (_language, "UTF-8"); - if (!factory.null ()) + IMEngineFactoryPointer factory = _backend->get_default_factory(_language, "UTF-8"); + if (!factory.null()) { - context_scim->impl->si = factory->create_instance ("UTF-8", _instance_count++); - context_scim->impl->preedit_string.clear (); - context_scim->impl->preedit_attrlist.clear (); + context_scim->impl->si = factory->create_instance("UTF-8", _instance_count++); + context_scim->impl->preedit_string.clear(); + context_scim->impl->preedit_attrlist.clear(); context_scim->impl->preedit_caret = 0; context_scim->impl->preedit_started = false; - attach_instance (context_scim->impl->si); + attach_instance(context_scim->impl->si); need_cap = true; need_reg = true; context_scim->impl->shared_si = false; - SCIM_DEBUG_FRONTEND(2) << "create new instance: " << context_scim->impl->si->get_id () << " " << context_scim->impl->si->get_factory_uuid () << "\n"; + SCIM_DEBUG_FRONTEND(2) << "create new instance: " << context_scim->impl->si->get_id() << " " << context_scim->impl->si->get_factory_uuid() << "\n"; } } - context_scim->impl->si->set_frontend_data (static_cast (context_scim)); + context_scim->impl->si->set_frontend_data(static_cast (context_scim)); - if (need_reg) _panel_client.register_input_context (context_scim->id, context_scim->impl->si->get_factory_uuid ()); - if (need_cap) set_ic_capabilities (context_scim); - if (need_reset) context_scim->impl->si->reset (); + if (need_reg) _panel_client.register_input_context(context_scim->id, context_scim->impl->si->get_factory_uuid()); + if (need_cap) set_ic_capabilities(context_scim); + if (need_reset) context_scim->impl->si->reset(); - panel_req_focus_in (context_scim); - panel_req_update_spot_location (context_scim); - panel_req_update_factory_info (context_scim); + panel_req_focus_in(context_scim); + panel_req_update_spot_location(context_scim); + panel_req_update_factory_info(context_scim); if (context_scim->impl->is_on) { - _panel_client.turn_on (context_scim->id); - _panel_client.hide_preedit_string (context_scim->id); - _panel_client.hide_aux_string (context_scim->id); - _panel_client.hide_lookup_table (context_scim->id); - context_scim->impl->si->focus_in (); + _panel_client.turn_on(context_scim->id); + _panel_client.hide_preedit_string(context_scim->id); + _panel_client.hide_aux_string(context_scim->id); + _panel_client.hide_lookup_table(context_scim->id); + context_scim->impl->si->focus_in(); } else { - _panel_client.turn_off (context_scim->id); + _panel_client.turn_off(context_scim->id); } - _panel_client.send (); + _panel_client.send(); } + + if (ecore_imf_context_input_panel_enabled_get(ctx)) + ecore_imf_context_input_panel_show(ctx); } /** @@ -938,9 +958,9 @@ isf_imf_context_focus_in (Ecore_IMF_Context *ctx) * Notify the Input Method Context that the widget to which its correspond has lost focus. */ EAPI void -isf_imf_context_focus_out (Ecore_IMF_Context *ctx) +isf_imf_context_focus_out(Ecore_IMF_Context *ctx) { - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get(ctx); if (!context_scim) return; @@ -952,23 +972,26 @@ isf_imf_context_focus_out (Ecore_IMF_Context *ctx) if (context_scim->impl->need_commit_preedit) { - if (wstr.length ()) + if (wstr.length()) { - ecore_imf_context_commit_event_add (context_scim->ctx, utf8_wcstombs (wstr).c_str ()); + ecore_imf_context_commit_event_add(context_scim->ctx, utf8_wcstombs(wstr).c_str()); ecore_imf_context_event_callback_call(context_scim->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(wstr).c_str()); } - _panel_client.prepare (context_scim->id); - _panel_client.send (); + _panel_client.prepare(context_scim->id); + _panel_client.send(); } - _panel_client.prepare (context_scim->id); - context_scim->impl->si->focus_out (); - context_scim->impl->si->reset (); - _panel_client.turn_off (context_scim->id); - _panel_client.focus_out (context_scim->id); - _panel_client.send (); + _panel_client.prepare(context_scim->id); + context_scim->impl->si->focus_out(); + context_scim->impl->si->reset(); + _panel_client.turn_off(context_scim->id); + _panel_client.focus_out(context_scim->id); + _panel_client.send(); _focused_ic = 0; } + + if (ecore_imf_context_input_panel_enabled_get(ctx)) + ecore_imf_context_input_panel_hide(ctx); } /** @@ -984,11 +1007,11 @@ isf_imf_context_focus_out (Ecore_IMF_Context *ctx) * Notify the Input Method Context that a change in the cursor location has been made. */ EAPI void -isf_imf_context_cursor_location_set (Ecore_IMF_Context *ctx, int cx, int cy, int cw, int ch) +isf_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int cx, int cy, int cw, int ch) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get(ctx); Ecore_Evas *ee; int canvas_x, canvas_y; @@ -1001,21 +1024,28 @@ isf_imf_context_cursor_location_set (Ecore_IMF_Context *ctx, int cx, int cy, int if (context_scim->impl->preedit_updating) return; - if (!context_scim->impl->client_canvas) - return; - - ee = ecore_evas_ecore_evas_get(context_scim->impl->client_canvas); - if (!ee) return; + if (context_scim->impl->client_canvas) + { + ee = ecore_evas_ecore_evas_get(context_scim->impl->client_canvas); + if (!ee) return; - ecore_evas_geometry_get (ee, &canvas_x, &canvas_y, NULL, NULL); + ecore_evas_geometry_get(ee, &canvas_x, &canvas_y, NULL, NULL); + } + else + { + if (context_scim->impl->client_window) + window_to_screen_geometry_get(context_scim->impl->client_window, &canvas_x, &canvas_y); + else + return; + } if (context_scim->impl->cursor_x != canvas_x + cx || context_scim->impl->cursor_y != canvas_y + cy + ch) { context_scim->impl->cursor_x = canvas_x + cx; context_scim->impl->cursor_y = canvas_y + cy + ch; - _panel_client.prepare (context_scim->id); - panel_req_update_spot_location (context_scim); - _panel_client.send (); + _panel_client.prepare(context_scim->id); + panel_req_update_spot_location(context_scim); + _panel_client.send(); SCIM_DEBUG_FRONTEND(2) << "new cursor location = " << context_scim->impl->cursor_x << "," << context_scim->impl->cursor_y << "\n"; } } @@ -1033,11 +1063,11 @@ isf_imf_context_cursor_location_set (Ecore_IMF_Context *ctx, int cx, int cy, int * display feedback, such as displaying it in a child of the root window. */ EAPI void -isf_imf_context_use_preedit_set (Ecore_IMF_Context* ctx, Eina_Bool use_preedit) +isf_imf_context_use_preedit_set(Ecore_IMF_Context* ctx, Eina_Bool use_preedit) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " = " << (use_preedit ? "true" : "false") << "...\n"; - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get(ctx); if (!_on_the_spot) return; @@ -1047,36 +1077,36 @@ isf_imf_context_use_preedit_set (Ecore_IMF_Context* ctx, Eina_Bool use_preedit) context_scim->impl->use_preedit = use_preedit; if (context_scim == _focused_ic) { - _panel_client.prepare (context_scim->id); + _panel_client.prepare(context_scim->id); if (old != use_preedit) - set_ic_capabilities (context_scim); + set_ic_capabilities(context_scim); - if (context_scim->impl->preedit_string.length ()) - slot_show_preedit_string (context_scim->impl->si); + if (context_scim->impl->preedit_string.length()) + slot_show_preedit_string(context_scim->impl->si); - _panel_client.send (); + _panel_client.send(); } } } EAPI void -isf_imf_context_preedit_string_with_attributes_get (Ecore_IMF_Context *ctx, char** str, Eina_List **attrs, int *cursor_pos) +isf_imf_context_preedit_string_with_attributes_get(Ecore_IMF_Context *ctx, char** str, Eina_List **attrs, int *cursor_pos) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get(ctx); if (context_scim && context_scim->impl && context_scim->impl->is_on) { - String mbs = utf8_wcstombs (context_scim->impl->preedit_string); + String mbs = utf8_wcstombs(context_scim->impl->preedit_string); if (str) { - if (mbs.length ()) - *str = strdup (mbs.c_str ()); + if (mbs.length()) + *str = strdup(mbs.c_str()); else - *str = strdup (""); + *str = strdup(""); } if (cursor_pos) @@ -1086,28 +1116,28 @@ isf_imf_context_preedit_string_with_attributes_get (Ecore_IMF_Context *ctx, char if (attrs) { - if (mbs.length ()) + if (mbs.length()) { int start_index, end_index; - int wlen = context_scim->impl->preedit_string.length (); + int wlen = context_scim->impl->preedit_string.length(); Ecore_IMF_Preedit_Attr *attr = NULL; AttributeList::const_iterator i; - bool *attrs_flag = new bool [mbs.length ()]; - memset (attrs_flag, 0, mbs.length () *sizeof (bool)); + bool *attrs_flag = new bool [mbs.length()]; + memset(attrs_flag, 0, mbs.length() *sizeof(bool)); - for (i = context_scim->impl->preedit_attrlist.begin (); - i != context_scim->impl->preedit_attrlist.end (); ++i) + for (i = context_scim->impl->preedit_attrlist.begin(); + i != context_scim->impl->preedit_attrlist.end(); ++i) { - start_index = i->get_start (); - end_index = i->get_end (); + start_index = i->get_start(); + end_index = i->get_end(); - if (end_index <= wlen && start_index < end_index && i->get_type () != SCIM_ATTR_DECORATE_NONE) + if (end_index <= wlen && start_index < end_index && i->get_type() != SCIM_ATTR_DECORATE_NONE) { - start_index = utf8_offset_to_index (mbs.c_str (), i->get_start ()); - end_index = utf8_offset_to_index (mbs.c_str (), i->get_end ()); + start_index = utf8_offset_to_index(mbs.c_str(), i->get_start()); + end_index = utf8_offset_to_index(mbs.c_str(), i->get_end()); - if (i->get_type () == SCIM_ATTR_DECORATE) + if (i->get_type() == SCIM_ATTR_DECORATE) { attr = (Ecore_IMF_Preedit_Attr *)calloc(1, sizeof(Ecore_IMF_Preedit_Attr)); if (attr == NULL) @@ -1115,24 +1145,24 @@ isf_imf_context_preedit_string_with_attributes_get (Ecore_IMF_Context *ctx, char attr->start_index = start_index; attr->end_index = end_index; - if (i->get_value () == SCIM_ATTR_DECORATE_UNDERLINE) + if (i->get_value() == SCIM_ATTR_DECORATE_UNDERLINE) { attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_SUB1; *attrs = eina_list_append(*attrs, (void *)attr); } - else if (i->get_value () == SCIM_ATTR_DECORATE_REVERSE) + else if (i->get_value() == SCIM_ATTR_DECORATE_REVERSE) { attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_SUB2; *attrs = eina_list_append(*attrs, (void *)attr); } - else if (i->get_value () == SCIM_ATTR_DECORATE_HIGHLIGHT) + else if (i->get_value() == SCIM_ATTR_DECORATE_HIGHLIGHT) { attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_SUB3; *attrs = eina_list_append(*attrs, (void *)attr); } else { - free (attr); + free(attr); } switch(i->get_value()) @@ -1148,11 +1178,11 @@ isf_imf_context_preedit_string_with_attributes_get (Ecore_IMF_Context *ctx, char break; } } - else if (i->get_type () == SCIM_ATTR_FOREGROUND) + else if (i->get_type() == SCIM_ATTR_FOREGROUND) { SCIM_DEBUG_FRONTEND(4) << "SCIM_ATTR_FOREGROUND\n"; } - else if (i->get_type () == SCIM_ATTR_BACKGROUND) + else if (i->get_type() == SCIM_ATTR_BACKGROUND) { SCIM_DEBUG_FRONTEND(4) << "SCIM_ATTR_BACKGROUND\n"; } @@ -1160,13 +1190,13 @@ isf_imf_context_preedit_string_with_attributes_get (Ecore_IMF_Context *ctx, char } // Add underline for all characters which don't have attribute. - for (unsigned int pos = 0; pos < mbs.length (); ++pos) + for (unsigned int pos = 0; pos < mbs.length(); ++pos) { if (!attrs_flag [pos]) { int begin_pos = pos; - while (pos < mbs.length () && !attrs_flag [pos]) + while (pos < mbs.length() && !attrs_flag[pos]) ++pos; // use REVERSE style as default @@ -1187,7 +1217,7 @@ isf_imf_context_preedit_string_with_attributes_get (Ecore_IMF_Context *ctx, char else { if (str) - *str = strdup (""); + *str = strdup(""); if (cursor_pos) *cursor_pos = 0; @@ -1208,22 +1238,22 @@ isf_imf_context_preedit_string_with_attributes_get (Ecore_IMF_Context *ctx, char * To get the preedit string of the input method. */ EAPI void -isf_imf_context_preedit_string_get (Ecore_IMF_Context *ctx, char** str, int *cursor_pos) +isf_imf_context_preedit_string_get(Ecore_IMF_Context *ctx, char** str, int *cursor_pos) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get(ctx); if (context_scim && context_scim->impl && context_scim->impl->is_on) { - String mbs = utf8_wcstombs (context_scim->impl->preedit_string); + String mbs = utf8_wcstombs(context_scim->impl->preedit_string); if (str) { - if (mbs.length ()) - *str = strdup (mbs.c_str ()); + if (mbs.length()) + *str = strdup(mbs.c_str()); else - *str = strdup (""); + *str = strdup(""); } if (cursor_pos) @@ -1232,7 +1262,7 @@ isf_imf_context_preedit_string_get (Ecore_IMF_Context *ctx, char** str, int *cur else { if (str) - *str = strdup (""); + *str = strdup(""); if (cursor_pos) *cursor_pos = 0; @@ -1249,11 +1279,11 @@ isf_imf_context_preedit_string_get (Ecore_IMF_Context *ctx, char** str, int *cur * Notify the Input Method Context that a change in the cursor position has been made. */ EAPI void -isf_imf_context_cursor_position_set (Ecore_IMF_Context *ctx, int cursor_pos) +isf_imf_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get(ctx); if (context_scim && context_scim->impl && context_scim == _focused_ic) { @@ -1280,11 +1310,11 @@ isf_imf_context_cursor_position_set (Ecore_IMF_Context *ctx, int cursor_pos) * is in Ecore_IMF.h. */ EAPI void -isf_imf_context_input_mode_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode) +isf_imf_context_input_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get(ctx); if (context_scim && context_scim->impl) context_scim->impl->input_mode = input_mode; } @@ -1299,22 +1329,22 @@ isf_imf_context_input_mode_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode inp * Set whether the IM context should use the prediction. */ EAPI void -isf_imf_context_prediction_allow_set (Ecore_IMF_Context* ctx, Eina_Bool prediction) +isf_imf_context_prediction_allow_set(Ecore_IMF_Context* ctx, Eina_Bool prediction) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " = " << (prediction ? "true" : "false") << "...\n"; - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get(ctx); if (context_scim && context_scim->impl && context_scim->impl->prediction_allow != prediction) context_scim->impl->prediction_allow = prediction; } EAPI void -isf_imf_context_autocapital_type_set (Ecore_IMF_Context* ctx, Ecore_IMF_Autocapital_Type autocapital_type) +isf_imf_context_autocapital_type_set(Ecore_IMF_Context* ctx, Ecore_IMF_Autocapital_Type autocapital_type) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " = " << autocapital_type << "...\n"; - EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get(ctx); if (context_scim && context_scim->impl && context_scim->impl->autocapital_type != autocapital_type) context_scim->impl->autocapital_type = autocapital_type; @@ -1337,11 +1367,11 @@ isf_imf_context_autocapital_type_set (Ecore_IMF_Context* ctx, Ecore_IMF_Autocapi */ EAPI Eina_Bool -isf_imf_context_filter_event (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event) +isf_imf_context_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = (EcoreIMFContextISF*)ecore_imf_context_data_get (ctx); + EcoreIMFContextISF *ic = (EcoreIMFContextISF*)ecore_imf_context_data_get(ctx); Eina_Bool ret = EINA_FALSE; if (ic == NULL || ic->impl == NULL) @@ -1352,7 +1382,7 @@ isf_imf_context_filter_event (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, if (type == ECORE_IMF_EVENT_KEY_DOWN) { Ecore_IMF_Event_Key_Down *ev = (Ecore_IMF_Event_Key_Down *)event; - scim_string_to_key (key, ev->key); + scim_string_to_key(key, ev->key); if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_SHIFT) key.mask |=SCIM_KEY_ShiftMask; if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_CTRL) key.mask |=SCIM_KEY_ControlMask; if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_ALT) key.mask |=SCIM_KEY_AltMask; @@ -1362,7 +1392,7 @@ isf_imf_context_filter_event (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, else if (type == ECORE_IMF_EVENT_KEY_UP) { Ecore_IMF_Event_Key_Up *ev = (Ecore_IMF_Event_Key_Up *)event; - scim_string_to_key (key, ev->key); + scim_string_to_key(key, ev->key); key.mask = SCIM_KEY_ReleaseMask; if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_SHIFT) key.mask |=SCIM_KEY_ShiftMask; if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_CTRL) key.mask |=SCIM_KEY_ControlMask; @@ -1377,264 +1407,290 @@ isf_imf_context_filter_event (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, key.mask &= _valid_key_mask; - _panel_client.prepare (ic->id); + _panel_client.prepare(ic->id); ret = EINA_TRUE; - if (!filter_hotkeys (ic, key)) + if (!filter_hotkeys(ic, key)) { if (!_focused_ic || !_focused_ic->impl->is_on || - !_focused_ic->impl->si->process_key_event (key)) + !_focused_ic->impl->si->process_key_event(key)) ret = EINA_FALSE; } - _panel_client.send (); + _panel_client.send(); return ret; } +EAPI void +isf_imf_context_input_panel_show(Ecore_IMF_Context *ctx) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = (EcoreIMFContextISF*)ecore_imf_context_data_get(ctx); + if (ic == NULL || ic->impl == NULL) + return; + + ecore_x_e_virtual_keyboard_state_set + (ic->impl->client_window, ECORE_X_VIRTUAL_KEYBOARD_STATE_ON); +} + +EAPI void +isf_imf_context_input_panel_hide(Ecore_IMF_Context *ctx) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = (EcoreIMFContextISF*)ecore_imf_context_data_get(ctx); + if (ic == NULL || ic->impl == NULL) + return; + + ecore_x_e_virtual_keyboard_state_set + (ic->impl->client_window, ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF); +} + /* Panel Slot functions */ static void -panel_slot_reload_config (int context __UNUSED__) +panel_slot_reload_config(int context __UNUSED__) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - _config->reload (); + _config->reload(); } static void -panel_slot_exit (int /* context */) +panel_slot_exit(int /* context */) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - finalize (); + finalize(); } static void -panel_slot_update_lookup_table_page_size (int context, int page_size) +panel_slot_update_lookup_table_page_size(int context, int page_size) { - EcoreIMFContextISF *ic = find_ic (context); + EcoreIMFContextISF *ic = find_ic(context); SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " page_size=" << page_size << " ic=" << ic << "\n"; if (ic && ic->impl) { - _panel_client.prepare (ic->id); - ic->impl->si->update_lookup_table_page_size (page_size); - _panel_client.send (); + _panel_client.prepare(ic->id); + ic->impl->si->update_lookup_table_page_size(page_size); + _panel_client.send(); } } static void -panel_slot_lookup_table_page_up (int context) +panel_slot_lookup_table_page_up(int context) { - EcoreIMFContextISF *ic = find_ic (context); + EcoreIMFContextISF *ic = find_ic(context); SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " ic=" << ic << "\n"; if (ic && ic->impl) { - _panel_client.prepare (ic->id); - ic->impl->si->lookup_table_page_up (); - _panel_client.send (); + _panel_client.prepare(ic->id); + ic->impl->si->lookup_table_page_up(); + _panel_client.send(); } } static void -panel_slot_lookup_table_page_down (int context) +panel_slot_lookup_table_page_down(int context) { - EcoreIMFContextISF *ic = find_ic (context); + EcoreIMFContextISF *ic = find_ic(context); SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " ic=" << ic << "\n"; if (ic && ic->impl) { - _panel_client.prepare (ic->id); - ic->impl->si->lookup_table_page_down (); - _panel_client.send (); + _panel_client.prepare(ic->id); + ic->impl->si->lookup_table_page_down(); + _panel_client.send(); } } static void -panel_slot_trigger_property (int context, const String &property) +panel_slot_trigger_property(int context, const String &property) { - EcoreIMFContextISF *ic = find_ic (context); + EcoreIMFContextISF *ic = find_ic(context); SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " property=" << property << " ic=" << ic << "\n"; if (ic && ic->impl) { - _panel_client.prepare (ic->id); - ic->impl->si->trigger_property (property); - _panel_client.send (); + _panel_client.prepare(ic->id); + ic->impl->si->trigger_property(property); + _panel_client.send(); } } static void -panel_slot_process_helper_event (int context, const String &target_uuid, const String &helper_uuid, const Transaction &trans) +panel_slot_process_helper_event(int context, const String &target_uuid, const String &helper_uuid, const Transaction &trans) { - EcoreIMFContextISF *ic = find_ic (context); + EcoreIMFContextISF *ic = find_ic(context); SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " target=" << target_uuid << " helper=" << helper_uuid << " ic=" << ic << " ic->impl=" << (ic ? ic->impl : 0) << " ic-uuid=" - << ((ic && ic->impl) ? ic->impl->si->get_factory_uuid () : "" ) << "\n"; - if (ic && ic->impl && ic->impl->si->get_factory_uuid () == target_uuid) + << ((ic && ic->impl) ? ic->impl->si->get_factory_uuid() : "" ) << "\n"; + if (ic && ic->impl && ic->impl->si->get_factory_uuid() == target_uuid) { - _panel_client.prepare (ic->id); + _panel_client.prepare(ic->id); SCIM_DEBUG_FRONTEND(2) << "call process_helper_event\n"; - ic->impl->si->process_helper_event (helper_uuid, trans); - _panel_client.send (); + ic->impl->si->process_helper_event(helper_uuid, trans); + _panel_client.send(); } } static void -panel_slot_move_preedit_caret (int context, int caret_pos) +panel_slot_move_preedit_caret(int context, int caret_pos) { - EcoreIMFContextISF *ic = find_ic (context); + EcoreIMFContextISF *ic = find_ic(context); SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " caret=" << caret_pos << " ic=" << ic << "\n"; if (ic && ic->impl) { - _panel_client.prepare (ic->id); - ic->impl->si->move_preedit_caret (caret_pos); - _panel_client.send (); + _panel_client.prepare(ic->id); + ic->impl->si->move_preedit_caret(caret_pos); + _panel_client.send(); } } static void -panel_slot_select_candidate (int context, int cand_index) +panel_slot_select_candidate(int context, int cand_index) { - EcoreIMFContextISF *ic = find_ic (context); + EcoreIMFContextISF *ic = find_ic(context); SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " candidate=" << cand_index << " ic=" << ic << "\n"; if (ic && ic->impl) { - _panel_client.prepare (ic->id); - ic->impl->si->select_candidate (cand_index); - _panel_client.send (); + _panel_client.prepare(ic->id); + ic->impl->si->select_candidate(cand_index); + _panel_client.send(); } } static void -panel_slot_process_key_event (int context, const KeyEvent &key) +panel_slot_process_key_event(int context, const KeyEvent &key) { - EcoreIMFContextISF *ic = find_ic (context); - SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " key=" << key.get_key_string () << " ic=" << ic << "\n"; + EcoreIMFContextISF *ic = find_ic(context); + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " key=" << key.get_key_string() << " ic=" << ic << "\n"; - if (ic && ic->impl && ic->impl->client_canvas) - feed_key_event(ic->impl->client_canvas, key.get_key_string().c_str(), EINA_FALSE); + if (key.is_key_press()) + ecore_x_test_fake_key_press(key.get_key_string().c_str()); } static void -panel_slot_commit_string (int context, const WideString &wstr) +panel_slot_commit_string(int context, const WideString &wstr) { - EcoreIMFContextISF *ic = find_ic (context); - SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " str=" << utf8_wcstombs (wstr) << " ic=" << ic << "\n"; + EcoreIMFContextISF *ic = find_ic(context); + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " str=" << utf8_wcstombs(wstr) << " ic=" << ic << "\n"; if (ic && ic->impl) { if (_focused_ic != ic) return; - ecore_imf_context_commit_event_add (ic->ctx, utf8_wcstombs (wstr).c_str ()); + ecore_imf_context_commit_event_add(ic->ctx, utf8_wcstombs(wstr).c_str()); ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(wstr).c_str()); } } static void -panel_slot_forward_key_event (int context, const KeyEvent &key) +panel_slot_forward_key_event(int context, const KeyEvent &key) { - EcoreIMFContextISF *ic = find_ic (context); - SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " key=" << key.get_key_string () << " ic=" << ic << "\n"; + EcoreIMFContextISF *ic = find_ic(context); + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " key=" << key.get_key_string() << " ic=" << ic << "\n"; if (ic && ic->impl && ic->impl->client_canvas) - feed_key_event (ic->impl->client_canvas, key.get_key_string ().c_str (), EINA_TRUE); + feed_key_event(ic->impl->client_canvas, key.get_key_string().c_str(), EINA_TRUE); } static void -panel_slot_request_help (int context) +panel_slot_request_help(int context) { - EcoreIMFContextISF *ic = find_ic (context); + EcoreIMFContextISF *ic = find_ic(context); SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " ic=" << ic << "\n"; if (ic && ic->impl) { - _panel_client.prepare (ic->id); - panel_req_show_help (ic); - _panel_client.send (); + _panel_client.prepare(ic->id); + panel_req_show_help(ic); + _panel_client.send(); } } static void -panel_slot_request_factory_menu (int context) +panel_slot_request_factory_menu(int context) { - EcoreIMFContextISF *ic = find_ic (context); + EcoreIMFContextISF *ic = find_ic(context); SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " ic=" << ic << "\n"; if (ic && ic->impl) { - _panel_client.prepare (ic->id); - panel_req_show_factory_menu (ic); - _panel_client.send (); + _panel_client.prepare(ic->id); + panel_req_show_factory_menu(ic); + _panel_client.send(); } } static void -panel_slot_change_factory (int context, const String &uuid) +panel_slot_change_factory(int context, const String &uuid) { - EcoreIMFContextISF *ic = find_ic (context); + EcoreIMFContextISF *ic = find_ic(context); SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " context=" << context << " factory=" << uuid << " ic=" << ic << "\n"; if (ic && ic->impl) { - ic->impl->si->reset (); - _panel_client.prepare (ic->id); - open_specific_factory (ic, uuid); - _panel_client.send (); + ic->impl->si->reset(); + _panel_client.prepare(ic->id); + open_specific_factory(ic, uuid); + _panel_client.send(); } } /* Panel Requestion functions. */ static void -panel_req_show_help (EcoreIMFContextISF *ic) +panel_req_show_help(EcoreIMFContextISF *ic) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; String help; - help = String ("Smart Common Input Method platform ") + - //String (SCIM_VERSION) + - String ("\n(C) 2002-2005 James Su \n\n"); + help = String("Smart Common Input Method platform ") + + //String(SCIM_VERSION) + + String("\n(C) 2002-2005 James Su \n\n"); if (ic && ic->impl) { - IMEngineFactoryPointer sf = _backend->get_factory (ic->impl->si->get_factory_uuid ()); + IMEngineFactoryPointer sf = _backend->get_factory(ic->impl->si->get_factory_uuid()); if (sf) { - help += utf8_wcstombs (sf->get_name ()); - help += String (":\n\n"); + help += utf8_wcstombs(sf->get_name()); + help += String(":\n\n"); - help += utf8_wcstombs (sf->get_help ()); - help += String ("\n\n"); + help += utf8_wcstombs(sf->get_help()); + help += String("\n\n"); - help += utf8_wcstombs (sf->get_credits ()); + help += utf8_wcstombs(sf->get_credits()); } - _panel_client.show_help (ic->id, help); + _panel_client.show_help(ic->id, help); } } static void -panel_req_show_factory_menu (EcoreIMFContextISF *ic) +panel_req_show_factory_menu(EcoreIMFContextISF *ic) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; std::vector factories; std::vector menu; - _backend->get_factories_for_encoding (factories, "UTF-8"); + _backend->get_factories_for_encoding(factories, "UTF-8"); - for (size_t i = 0; i < factories.size (); ++ i) + for (size_t i = 0; i < factories.size(); ++ i) { - menu.push_back (PanelFactoryInfo ( - factories [i]->get_uuid (), - utf8_wcstombs (factories [i]->get_name ()), - factories [i]->get_language (), - factories [i]->get_icon_file ())); + menu.push_back(PanelFactoryInfo( + factories [i]->get_uuid(), + utf8_wcstombs(factories [i]->get_name()), + factories [i]->get_language(), + factories [i]->get_icon_file())); } - if (menu.size ()) - _panel_client.show_factory_menu (ic->id, menu); + if (menu.size()) + _panel_client.show_factory_menu(ic->id, menu); } static void -panel_req_update_factory_info (EcoreIMFContextISF *ic) +panel_req_update_factory_info(EcoreIMFContextISF *ic) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; @@ -1643,160 +1699,160 @@ panel_req_update_factory_info (EcoreIMFContextISF *ic) PanelFactoryInfo info; if (ic->impl->is_on) { - IMEngineFactoryPointer sf = _backend->get_factory (ic->impl->si->get_factory_uuid ()); + IMEngineFactoryPointer sf = _backend->get_factory(ic->impl->si->get_factory_uuid()); if (sf) - info = PanelFactoryInfo (sf->get_uuid (), utf8_wcstombs (sf->get_name ()), sf->get_language (), sf->get_icon_file ()); + info = PanelFactoryInfo(sf->get_uuid(), utf8_wcstombs(sf->get_name()), sf->get_language(), sf->get_icon_file()); } else { - info = PanelFactoryInfo (String (""), String ("English/Keyboard"), String ("C"), ""); + info = PanelFactoryInfo(String(""), String("English/Keyboard"), String("C"), ""); } - _panel_client.update_factory_info (ic->id, info); + _panel_client.update_factory_info(ic->id, info); } } static void -panel_req_focus_in (EcoreIMFContextISF *ic) +panel_req_focus_in(EcoreIMFContextISF *ic) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - _panel_client.focus_in (ic->id, ic->impl->si->get_factory_uuid ()); + _panel_client.focus_in(ic->id, ic->impl->si->get_factory_uuid()); } static void -panel_req_update_spot_location (EcoreIMFContextISF *ic) +panel_req_update_spot_location(EcoreIMFContextISF *ic) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - _panel_client.update_spot_location (ic->id, ic->impl->cursor_x, ic->impl->cursor_y); + _panel_client.update_spot_location(ic->id, ic->impl->cursor_x, ic->impl->cursor_y); } static bool -filter_hotkeys (EcoreIMFContextISF *ic, const KeyEvent &key) +filter_hotkeys(EcoreIMFContextISF *ic, const KeyEvent &key) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; bool ret = false; - _frontend_hotkey_matcher.push_key_event (key); - _imengine_hotkey_matcher.push_key_event (key); + _frontend_hotkey_matcher.push_key_event(key); + _imengine_hotkey_matcher.push_key_event(key); - FrontEndHotkeyAction hotkey_action = _frontend_hotkey_matcher.get_match_result (); + FrontEndHotkeyAction hotkey_action = _frontend_hotkey_matcher.get_match_result(); if (hotkey_action == SCIM_FRONTEND_HOTKEY_TRIGGER) { if (!ic->impl->is_on) - turn_on_ic (ic); + turn_on_ic(ic); else - turn_off_ic (ic); + turn_off_ic(ic); ret = true; } else if (hotkey_action == SCIM_FRONTEND_HOTKEY_ON) { if (!ic->impl->is_on) - turn_on_ic (ic); + turn_on_ic(ic); ret = true; } else if (hotkey_action == SCIM_FRONTEND_HOTKEY_OFF) { if (ic->impl->is_on) - turn_off_ic (ic); + turn_off_ic(ic); ret = true; } else if (hotkey_action == SCIM_FRONTEND_HOTKEY_NEXT_FACTORY) { - open_next_factory (ic); + open_next_factory(ic); ret = true; } else if (hotkey_action == SCIM_FRONTEND_HOTKEY_PREVIOUS_FACTORY) { - open_previous_factory (ic); + open_previous_factory(ic); ret = true; } else if (hotkey_action == SCIM_FRONTEND_HOTKEY_SHOW_FACTORY_MENU) { - panel_req_show_factory_menu (ic); + panel_req_show_factory_menu(ic); ret = true; } - else if (_imengine_hotkey_matcher.is_matched ()) + else if (_imengine_hotkey_matcher.is_matched()) { - String sfid = _imengine_hotkey_matcher.get_match_result (); - open_specific_factory (ic, sfid); + String sfid = _imengine_hotkey_matcher.get_match_result(); + open_specific_factory(ic, sfid); ret = true; } return ret; } static bool -panel_initialize (void) +panel_initialize(void) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; String display_name; { - const char *p = getenv ("DISPLAY"); - if (p) display_name = String (p); + const char *p = getenv("DISPLAY"); + if (p) display_name = String(p); } - if (_panel_client.open_connection (_config->get_name (), display_name) >= 0) + if (_panel_client.open_connection(_config->get_name(), display_name) >= 0) { - int fd = _panel_client.get_connection_number (); + int fd = _panel_client.get_connection_number(); - _panel_iochannel_read_handler = ecore_main_fd_handler_add (fd, ECORE_FD_READ, panel_iochannel_handler, NULL, NULL, NULL); + _panel_iochannel_read_handler = ecore_main_fd_handler_add(fd, ECORE_FD_READ, panel_iochannel_handler, NULL, NULL, NULL); SCIM_DEBUG_FRONTEND(2) << " Panel FD= " << fd << "\n"; return true; } - std::cerr << "panel_initialize () failed!!!\n"; + std::cerr << "panel_initialize() failed!!!\n"; return false; } static void -panel_finalize (void) +panel_finalize(void) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - _panel_client.close_connection (); + _panel_client.close_connection(); if (_panel_iochannel_read_handler) { - ecore_main_fd_handler_del (_panel_iochannel_read_handler); + ecore_main_fd_handler_del(_panel_iochannel_read_handler); _panel_iochannel_read_handler = 0; } if (_panel_iochannel_err_handler) { - ecore_main_fd_handler_del (_panel_iochannel_err_handler); + ecore_main_fd_handler_del(_panel_iochannel_err_handler); _panel_iochannel_err_handler = 0; } } static Eina_Bool -panel_iochannel_handler (void *data __UNUSED__, Ecore_Fd_Handler *fd_handler) +panel_iochannel_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; if (fd_handler == _panel_iochannel_read_handler) { - if (!_panel_client.filter_event ()) + if (!_panel_client.filter_event()) { - panel_finalize (); - panel_initialize (); + panel_finalize(); + panel_initialize(); return ECORE_CALLBACK_CANCEL; } } else if (fd_handler == _panel_iochannel_err_handler) { - panel_finalize (); - panel_initialize (); + panel_finalize(); + panel_initialize(); return ECORE_CALLBACK_CANCEL; } return ECORE_CALLBACK_RENEW; } static void -turn_on_ic (EcoreIMFContextISF *ic) +turn_on_ic(EcoreIMFContextISF *ic) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; @@ -1806,25 +1862,25 @@ turn_on_ic (EcoreIMFContextISF *ic) if (ic == _focused_ic) { - panel_req_focus_in (ic); - panel_req_update_spot_location (ic); - panel_req_update_factory_info (ic); - _panel_client.turn_on (ic->id); - _panel_client.hide_preedit_string (ic->id); - _panel_client.hide_aux_string (ic->id); - _panel_client.hide_lookup_table (ic->id); - ic->impl->si->focus_in (); + panel_req_focus_in(ic); + panel_req_update_spot_location(ic); + panel_req_update_factory_info(ic); + _panel_client.turn_on(ic->id); + _panel_client.hide_preedit_string(ic->id); + _panel_client.hide_aux_string(ic->id); + _panel_client.hide_lookup_table(ic->id); + ic->impl->si->focus_in(); } //Record the IC on/off status if (_shared_input_method) - _config->write (String (SCIM_CONFIG_FRONTEND_IM_OPENED_BY_DEFAULT), true); + _config->write(String(SCIM_CONFIG_FRONTEND_IM_OPENED_BY_DEFAULT), true); - if (ic->impl->use_preedit && ic->impl->preedit_string.length ()) + if (ic->impl->use_preedit && ic->impl->preedit_string.length()) { - ecore_imf_context_preedit_start_event_add (ic->ctx); + ecore_imf_context_preedit_start_event_add(ic->ctx); ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL); - ecore_imf_context_preedit_changed_event_add (ic->ctx); + ecore_imf_context_preedit_changed_event_add(ic->ctx); ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL); ic->impl->preedit_started = true; } @@ -1832,7 +1888,7 @@ turn_on_ic (EcoreIMFContextISF *ic) } static void -turn_off_ic (EcoreIMFContextISF *ic) +turn_off_ic(EcoreIMFContextISF *ic) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; @@ -1842,21 +1898,21 @@ turn_off_ic (EcoreIMFContextISF *ic) if (ic == _focused_ic) { - ic->impl->si->focus_out (); + ic->impl->si->focus_out(); - panel_req_update_factory_info (ic); - _panel_client.turn_off (ic->id); + panel_req_update_factory_info(ic); + _panel_client.turn_off(ic->id); } //Record the IC on/off status if (_shared_input_method) - _config->write (String (SCIM_CONFIG_FRONTEND_IM_OPENED_BY_DEFAULT), false); + _config->write(String(SCIM_CONFIG_FRONTEND_IM_OPENED_BY_DEFAULT), false); - if (ic->impl->use_preedit && ic->impl->preedit_string.length ()) + if (ic->impl->use_preedit && ic->impl->preedit_string.length()) { - ecore_imf_context_preedit_changed_event_add (ic->ctx); + ecore_imf_context_preedit_changed_event_add(ic->ctx); ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL); - ecore_imf_context_preedit_end_event_add (ic->ctx); + ecore_imf_context_preedit_end_event_add(ic->ctx); ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL); ic->impl->preedit_started = false; } @@ -1864,7 +1920,7 @@ turn_off_ic (EcoreIMFContextISF *ic) } static void -set_ic_capabilities (EcoreIMFContextISF *ic) +set_ic_capabilities(EcoreIMFContextISF *ic) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; @@ -1875,12 +1931,12 @@ set_ic_capabilities (EcoreIMFContextISF *ic) if (!_on_the_spot || !ic->impl->use_preedit) cap -= SCIM_CLIENT_CAP_ONTHESPOT_PREEDIT; - ic->impl->si->update_client_capabilities (cap); + ic->impl->si->update_client_capabilities(cap); } } static bool -check_socket_frontend (void) +check_socket_frontend(void) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; @@ -1889,23 +1945,23 @@ check_socket_frontend (void) uint32 magic; - address.set_address (scim_get_default_socket_frontend_address ()); + address.set_address(scim_get_default_socket_frontend_address()); - if (!client.connect (address)) + if (!client.connect(address)) return false; - if (!scim_socket_open_connection (magic, - String ("ConnectionTester"), - String ("SocketFrontEnd"), - client, - 1000)) + if (!scim_socket_open_connection(magic, + String("ConnectionTester"), + String("SocketFrontEnd"), + client, + 1000)) return false; return true; } void -initialize (void) +initialize(void) { std::vector config_list; std::vector engine_list; @@ -1924,31 +1980,31 @@ initialize (void) SCIM_DEBUG_FRONTEND(1) << "Initializing Ecore SCIM IMModule...\n"; // Get system language. - _language = scim_get_locale_language (scim_get_current_locale ()); + _language = scim_get_locale_language(scim_get_current_locale()); if (socket) { // If no Socket FrontEnd is running, then launch one. // And set manual to false. - bool check_result = check_socket_frontend (); + bool check_result = check_socket_frontend(); if (!check_result) { std::cerr << "Launching a SCIM daemon with Socket FrontEnd...\n"; //get modules list - scim_get_imengine_module_list (engine_list); + scim_get_imengine_module_list(engine_list); - for (it = engine_list.begin (); it != engine_list.end (); it++) + for (it = engine_list.begin(); it != engine_list.end(); it++) { if (*it != "socket") - load_engine_list.push_back (*it); + load_engine_list.push_back(*it); } const char *new_argv [] = { "--no-stay", 0 }; - scim_launch (true, - config_module_name, - (load_engine_list.size () ? scim_combine_string_list (load_engine_list, ',') : "none"), - "socket", - (char **)new_argv); + scim_launch(true, + config_module_name, + (load_engine_list.size() ? scim_combine_string_list(load_engine_list, ',') : "none"), + "socket", + (char **)new_argv); manual = false; } @@ -1961,12 +2017,12 @@ initialize (void) if (check_result) { config_module_name = "socket"; - load_engine_list.clear (); - load_engine_list.push_back ("socket"); + load_engine_list.clear(); + load_engine_list.push_back("socket"); break; } - scim_usleep (50000); - check_result = check_socket_frontend (); + scim_usleep(50000); + check_result = check_socket_frontend(); } } } @@ -1975,69 +2031,69 @@ initialize (void) { //load config module SCIM_DEBUG_FRONTEND(1) << "Loading Config module: " << config_module_name << "...\n"; - _config_module = new ConfigModule (config_module_name); + _config_module = new ConfigModule(config_module_name); //create config instance - if (_config_module != NULL && _config_module->valid ()) - _config = _config_module->create_config (); + if (_config_module != NULL && _config_module->valid()) + _config = _config_module->create_config(); } - if (_config.null ()) + if (_config.null()) { SCIM_DEBUG_FRONTEND(1) << "Config module cannot be loaded, using dummy Config.\n"; if (_config_module) delete _config_module; _config_module = NULL; - _config = new DummyConfig (); + _config = new DummyConfig(); config_module_name = "dummy"; } - reload_config_callback (_config); - _config->signal_connect_reload (slot (reload_config_callback)); + reload_config_callback(_config); + _config->signal_connect_reload(slot(reload_config_callback)); // create backend - _backend = new CommonBackEnd (_config, load_engine_list.size () ? load_engine_list : engine_list); + _backend = new CommonBackEnd(_config, load_engine_list.size() ? load_engine_list : engine_list); - if (_backend.null ()) + if (_backend.null()) std::cerr << "Cannot create BackEnd Object!\n"; else - _fallback_factory = _backend->get_factory (SCIM_COMPOSE_KEY_FACTORY_UUID); + _fallback_factory = _backend->get_factory(SCIM_COMPOSE_KEY_FACTORY_UUID); - if (_fallback_factory.null ()) - _fallback_factory = new DummyIMEngineFactory (); + if (_fallback_factory.null()) + _fallback_factory = new DummyIMEngineFactory(); - _fallback_instance = _fallback_factory->create_instance (String ("UTF-8"), 0); - _fallback_instance->signal_connect_commit_string (slot (fallback_commit_string_cb)); + _fallback_instance = _fallback_factory->create_instance(String("UTF-8"), 0); + _fallback_instance->signal_connect_commit_string(slot(fallback_commit_string_cb)); // Attach Panel Client signal. - _panel_client.signal_connect_reload_config (slot (panel_slot_reload_config)); - _panel_client.signal_connect_exit (slot (panel_slot_exit)); - _panel_client.signal_connect_update_lookup_table_page_size (slot (panel_slot_update_lookup_table_page_size)); - _panel_client.signal_connect_lookup_table_page_up (slot (panel_slot_lookup_table_page_up)); - _panel_client.signal_connect_lookup_table_page_down (slot (panel_slot_lookup_table_page_down)); - _panel_client.signal_connect_trigger_property (slot (panel_slot_trigger_property)); - _panel_client.signal_connect_process_helper_event (slot (panel_slot_process_helper_event)); - _panel_client.signal_connect_move_preedit_caret (slot (panel_slot_move_preedit_caret)); - _panel_client.signal_connect_select_candidate (slot (panel_slot_select_candidate)); - _panel_client.signal_connect_process_key_event (slot (panel_slot_process_key_event)); - _panel_client.signal_connect_commit_string (slot (panel_slot_commit_string)); - _panel_client.signal_connect_forward_key_event (slot (panel_slot_forward_key_event)); - _panel_client.signal_connect_request_help (slot (panel_slot_request_help)); - _panel_client.signal_connect_request_factory_menu (slot (panel_slot_request_factory_menu)); - _panel_client.signal_connect_change_factory (slot (panel_slot_change_factory)); - - if (!panel_initialize ()) + _panel_client.signal_connect_reload_config (slot(panel_slot_reload_config)); + _panel_client.signal_connect_exit (slot(panel_slot_exit)); + _panel_client.signal_connect_update_lookup_table_page_size(slot(panel_slot_update_lookup_table_page_size)); + _panel_client.signal_connect_lookup_table_page_up (slot(panel_slot_lookup_table_page_up)); + _panel_client.signal_connect_lookup_table_page_down (slot(panel_slot_lookup_table_page_down)); + _panel_client.signal_connect_trigger_property (slot(panel_slot_trigger_property)); + _panel_client.signal_connect_process_helper_event (slot(panel_slot_process_helper_event)); + _panel_client.signal_connect_move_preedit_caret (slot(panel_slot_move_preedit_caret)); + _panel_client.signal_connect_select_candidate (slot(panel_slot_select_candidate)); + _panel_client.signal_connect_process_key_event (slot(panel_slot_process_key_event)); + _panel_client.signal_connect_commit_string (slot(panel_slot_commit_string)); + _panel_client.signal_connect_forward_key_event (slot(panel_slot_forward_key_event)); + _panel_client.signal_connect_request_help (slot(panel_slot_request_help)); + _panel_client.signal_connect_request_factory_menu (slot(panel_slot_request_factory_menu)); + _panel_client.signal_connect_change_factory (slot(panel_slot_change_factory)); + + if (!panel_initialize()) std::cerr << "Ecore IM Module: Cannot connect to Panel!\n"; } static void -finalize (void) +finalize(void) { SCIM_DEBUG_FRONTEND(1) << "Finalizing Ecore ISF IMModule...\n"; // Reset this first so that the shared instance could be released correctly afterwards. - _default_instance.reset (); + _default_instance.reset(); SCIM_DEBUG_FRONTEND(2) << "Finalize all IC partially.\n"; while (_used_ic_impl_list) @@ -2045,20 +2101,20 @@ finalize (void) // In case in "shared input method" mode, // all contexts share only one instance, // so we need point the reference pointer correctly before finalizing. - _used_ic_impl_list->si->set_frontend_data (static_cast (_used_ic_impl_list->parent)); - isf_imf_context_del (_used_ic_impl_list->parent->ctx); + _used_ic_impl_list->si->set_frontend_data(static_cast (_used_ic_impl_list->parent)); + isf_imf_context_del(_used_ic_impl_list->parent->ctx); } - delete_all_ic_impl (); + delete_all_ic_impl(); - _fallback_instance.reset (); - _fallback_factory.reset (); + _fallback_instance.reset(); + _fallback_factory.reset(); SCIM_DEBUG_FRONTEND(2) << " Releasing BackEnd...\n"; - _backend.reset (); + _backend.reset(); SCIM_DEBUG_FRONTEND(2) << " Releasing Config...\n"; - _config.reset (); + _config.reset(); if (_config_module) { @@ -2072,27 +2128,27 @@ finalize (void) _scim_initialized = false; - panel_finalize (); + panel_finalize(); } static void -open_next_factory (EcoreIMFContextISF *ic) +open_next_factory(EcoreIMFContextISF *ic) { SCIM_DEBUG_FRONTEND(2) << __FUNCTION__ << " context=" << ic->id << "\n"; - IMEngineFactoryPointer sf = _backend->get_next_factory ("", "UTF-8", ic->impl->si->get_factory_uuid ()); + IMEngineFactoryPointer sf = _backend->get_next_factory("", "UTF-8", ic->impl->si->get_factory_uuid()); - if (!sf.null ()) + if (!sf.null()) { - turn_off_ic (ic); - ic->impl->si = sf->create_instance ("UTF-8", ic->impl->si->get_id ()); - ic->impl->si->set_frontend_data (static_cast (ic)); - ic->impl->preedit_string = WideString (); + turn_off_ic(ic); + ic->impl->si = sf->create_instance("UTF-8", ic->impl->si->get_id()); + ic->impl->si->set_frontend_data(static_cast (ic)); + ic->impl->preedit_string = WideString(); ic->impl->preedit_caret = 0; - attach_instance (ic->impl->si); - _backend->set_default_factory (_language, sf->get_uuid ()); - _panel_client.register_input_context (ic->id, sf->get_uuid ()); - set_ic_capabilities (ic); - turn_on_ic (ic); + attach_instance(ic->impl->si); + _backend->set_default_factory(_language, sf->get_uuid()); + _panel_client.register_input_context(ic->id, sf->get_uuid()); + set_ic_capabilities(ic); + turn_on_ic(ic); if (_shared_input_method) { @@ -2103,26 +2159,26 @@ open_next_factory (EcoreIMFContextISF *ic) } static void -open_previous_factory (EcoreIMFContextISF *ic) +open_previous_factory(EcoreIMFContextISF *ic) { if (ic == NULL) return; SCIM_DEBUG_FRONTEND(2) << __FUNCTION__ << " context=" << ic->id << "\n"; - IMEngineFactoryPointer sf = _backend->get_previous_factory ("", "UTF-8", ic->impl->si->get_factory_uuid ()); + IMEngineFactoryPointer sf = _backend->get_previous_factory("", "UTF-8", ic->impl->si->get_factory_uuid()); - if (!sf.null ()) + if (!sf.null()) { - turn_off_ic (ic); - ic->impl->si = sf->create_instance ("UTF-8", ic->impl->si->get_id ()); - ic->impl->si->set_frontend_data (static_cast (ic)); - ic->impl->preedit_string = WideString (); + turn_off_ic(ic); + ic->impl->si = sf->create_instance("UTF-8", ic->impl->si->get_id()); + ic->impl->si->set_frontend_data(static_cast (ic)); + ic->impl->preedit_string = WideString(); ic->impl->preedit_caret = 0; - attach_instance (ic->impl->si); - _backend->set_default_factory (_language, sf->get_uuid ()); - _panel_client.register_input_context (ic->id, sf->get_uuid ()); - set_ic_capabilities (ic); - turn_on_ic (ic); + attach_instance(ic->impl->si); + _backend->set_default_factory(_language, sf->get_uuid()); + _panel_client.register_input_context(ic->id, sf->get_uuid()); + set_ic_capabilities(ic); + turn_on_ic(ic); if (_shared_input_method) { @@ -2133,7 +2189,7 @@ open_previous_factory (EcoreIMFContextISF *ic) } static void -open_specific_factory (EcoreIMFContextISF *ic, +open_specific_factory(EcoreIMFContextISF *ic, const String &uuid) { if (ic == NULL) @@ -2142,26 +2198,26 @@ open_specific_factory (EcoreIMFContextISF *ic, SCIM_DEBUG_FRONTEND(2) << __FUNCTION__ << " context=" << ic->id << "\n"; // The same input method is selected, just turn on the IC. - if (ic->impl->si->get_factory_uuid () == uuid) + if (ic->impl->si->get_factory_uuid() == uuid) { - turn_on_ic (ic); + turn_on_ic(ic); return; } - IMEngineFactoryPointer sf = _backend->get_factory (uuid); + IMEngineFactoryPointer sf = _backend->get_factory(uuid); - if (uuid.length () && !sf.null ()) + if (uuid.length() && !sf.null()) { - turn_off_ic (ic); - ic->impl->si = sf->create_instance ("UTF-8", ic->impl->si->get_id ()); - ic->impl->si->set_frontend_data (static_cast (ic)); - ic->impl->preedit_string = WideString (); + turn_off_ic(ic); + ic->impl->si = sf->create_instance("UTF-8", ic->impl->si->get_id()); + ic->impl->si->set_frontend_data(static_cast (ic)); + ic->impl->preedit_string = WideString(); ic->impl->preedit_caret = 0; - attach_instance (ic->impl->si); - _backend->set_default_factory (_language, sf->get_uuid ()); - _panel_client.register_input_context (ic->id, sf->get_uuid ()); - set_ic_capabilities (ic); - turn_on_ic (ic); + attach_instance(ic->impl->si); + _backend->set_default_factory(_language, sf->get_uuid()); + _panel_client.register_input_context(ic->id, sf->get_uuid()); + set_ic_capabilities(ic); + turn_on_ic(ic); if (_shared_input_method) { @@ -2171,29 +2227,29 @@ open_specific_factory (EcoreIMFContextISF *ic, } else { - // turn_off_ic comment out panel_req_update_factory_info () - turn_off_ic (ic); + // turn_off_ic comment out panel_req_update_factory_info() + turn_off_ic(ic); if (ic && ic->impl->is_on) { ic->impl->is_on = false; if (ic == _focused_ic) { - ic->impl->si->focus_out (); + ic->impl->si->focus_out(); - panel_req_update_factory_info (ic); - _panel_client.turn_off (ic->id); + panel_req_update_factory_info(ic); + _panel_client.turn_off(ic->id); } //Record the IC on/off status if (_shared_input_method) - _config->write (String (SCIM_CONFIG_FRONTEND_IM_OPENED_BY_DEFAULT), false); + _config->write(String(SCIM_CONFIG_FRONTEND_IM_OPENED_BY_DEFAULT), false); - if (ic->impl->use_preedit && ic->impl->preedit_string.length ()) + if (ic->impl->use_preedit && ic->impl->preedit_string.length()) { - ecore_imf_context_preedit_changed_event_add (ic->ctx); + ecore_imf_context_preedit_changed_event_add(ic->ctx); ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL); - ecore_imf_context_preedit_end_event_add (ic->ctx); + ecore_imf_context_preedit_end_event_add(ic->ctx); ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL); ic->impl->preedit_started = false; } @@ -2201,7 +2257,7 @@ open_specific_factory (EcoreIMFContextISF *ic, } } -static void initialize_modifier_bits (Display *display) +static void initialize_modifier_bits(Display *display) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; @@ -2222,21 +2278,21 @@ static void initialize_modifier_bits (Display *display) XModifierKeymap *mods = NULL; - ::KeyCode ctrl_l = XKeysymToKeycode (display, XK_Control_L); - ::KeyCode ctrl_r = XKeysymToKeycode (display, XK_Control_R); - ::KeyCode meta_l = XKeysymToKeycode (display, XK_Meta_L); - ::KeyCode meta_r = XKeysymToKeycode (display, XK_Meta_R); - ::KeyCode alt_l = XKeysymToKeycode (display, XK_Alt_L); - ::KeyCode alt_r = XKeysymToKeycode (display, XK_Alt_R); - ::KeyCode super_l = XKeysymToKeycode (display, XK_Super_L); - ::KeyCode super_r = XKeysymToKeycode (display, XK_Super_R); - ::KeyCode hyper_l = XKeysymToKeycode (display, XK_Hyper_L); - ::KeyCode hyper_r = XKeysymToKeycode (display, XK_Hyper_R); - ::KeyCode numlock = XKeysymToKeycode (display, XK_Num_Lock); + ::KeyCode ctrl_l = XKeysymToKeycode(display, XK_Control_L); + ::KeyCode ctrl_r = XKeysymToKeycode(display, XK_Control_R); + ::KeyCode meta_l = XKeysymToKeycode(display, XK_Meta_L); + ::KeyCode meta_r = XKeysymToKeycode(display, XK_Meta_R); + ::KeyCode alt_l = XKeysymToKeycode(display, XK_Alt_L); + ::KeyCode alt_r = XKeysymToKeycode(display, XK_Alt_R); + ::KeyCode super_l = XKeysymToKeycode(display, XK_Super_L); + ::KeyCode super_r = XKeysymToKeycode(display, XK_Super_R); + ::KeyCode hyper_l = XKeysymToKeycode(display, XK_Hyper_L); + ::KeyCode hyper_r = XKeysymToKeycode(display, XK_Hyper_R); + ::KeyCode numlock = XKeysymToKeycode(display, XK_Num_Lock); int i, j; - mods = XGetModifierMapping (display); + mods = XGetModifierMapping(display); if (mods == NULL) return; @@ -2283,13 +2339,13 @@ static void initialize_modifier_bits (Display *display) xkey.same_screen = False; xkey.subwindow = None; xkey.window = None; - xkey.root = DefaultRootWindow (display); + xkey.root = DefaultRootWindow(display); xkey.state = ShiftMask; xkey.keycode = meta_l; - XLookupString (&xkey, buf, 32, &keysym_l, 0); + XLookupString(&xkey, buf, 32, &keysym_l, 0); xkey.keycode = meta_r; - XLookupString (&xkey, buf, 32, &keysym_r, 0); + XLookupString(&xkey, buf, 32, &keysym_r, 0); if ((meta_l == alt_l && keysym_l == XK_Meta_L) || (meta_r == alt_r && keysym_r == XK_Meta_R)) __current_meta_mask = ShiftMask + __current_alt_mask; @@ -2297,16 +2353,16 @@ static void initialize_modifier_bits (Display *display) __current_meta_mask = ShiftMask + ControlMask; } - XFreeModifiermap (mods); + XFreeModifiermap(mods); } -static unsigned int scim_x11_keymask_scim_to_x11 (Display *display, uint16 scimkeymask) +static unsigned int scim_x11_keymask_scim_to_x11(Display *display, uint16 scimkeymask) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; unsigned int state = 0; - initialize_modifier_bits (display); + initialize_modifier_bits(display); if (scimkeymask & SCIM_KEY_ShiftMask) state |= ShiftMask; if (scimkeymask & SCIM_KEY_CapsLockMask) state |= LockMask; @@ -2320,9 +2376,9 @@ static unsigned int scim_x11_keymask_scim_to_x11 (Display *display, uint16 scimk return state; } -static XKeyEvent createKeyEvent (Display *display, Window &win, - Window &winRoot, bool press, - int keycode, int modifiers) +static XKeyEvent createKeyEvent(Display *display, Window &win, + Window &winRoot, bool press, + int keycode, int modifiers) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; @@ -2339,7 +2395,7 @@ static XKeyEvent createKeyEvent (Display *display, Window &win, event.y_root = 1; event.same_screen = EINA_TRUE; event.state = modifiers; - event.keycode = XKeysymToKeycode (display, keycode); + event.keycode = XKeysymToKeycode(display, keycode); if (press) event.type = KeyPress; else @@ -2350,12 +2406,12 @@ static XKeyEvent createKeyEvent (Display *display, Window &win, return event; } -static void _x_send_key_event (const KeyEvent &key) +static void _x_send_key_event(const KeyEvent &key) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; // Obtain the X11 display. - Display *display = XOpenDisplay (NULL); + Display *display = XOpenDisplay(NULL); if (display == NULL) { std::cerr << "XOpenDisplay failed\n"; @@ -2363,98 +2419,98 @@ static void _x_send_key_event (const KeyEvent &key) } // Get the root window for the current display. - Window winRoot = 0;// = XRootWindow (display, 1); + Window winRoot = 0; // Find the window which has the current keyboard focus. Window winFocus = 0; int revert = RevertToParent; - XGetInputFocus (display, &winFocus, &revert); + XGetInputFocus(display, &winFocus, &revert); // Send a fake key press event to the window. - XSelectInput (display, winFocus, FocusChangeMask|KeyPressMask|KeyReleaseMask); - XMapWindow (display, winFocus); + XSelectInput(display, winFocus, FocusChangeMask|KeyPressMask|KeyReleaseMask); + XMapWindow(display, winFocus); - unsigned int modifier = scim_x11_keymask_scim_to_x11 (display, key.mask); + unsigned int modifier = scim_x11_keymask_scim_to_x11(display, key.mask); XKeyEvent event; - if (key.is_key_press ()) + if (key.is_key_press()) { - event = createKeyEvent (display, winFocus, winRoot, true, key.code, modifier); - XSendEvent (event.display, event.window, True, KeyPressMask, (XEvent *)&event); + event = createKeyEvent(display, winFocus, winRoot, true, key.code, modifier); + XSendEvent(event.display, event.window, True, KeyPressMask, (XEvent *)&event); } else { - event = createKeyEvent (display, winFocus, winRoot, false, key.code, modifier); - XSendEvent (event.display, event.window, True, KeyReleaseMask, (XEvent *)&event); + event = createKeyEvent(display, winFocus, winRoot, false, key.code, modifier); + XSendEvent(event.display, event.window, True, KeyReleaseMask, (XEvent *)&event); } - XCloseDisplay (display); + XCloseDisplay(display); } static void -attach_instance (const IMEngineInstancePointer &si) +attach_instance(const IMEngineInstancePointer &si) { - si->signal_connect_show_preedit_string ( - slot (slot_show_preedit_string)); - si->signal_connect_show_aux_string ( - slot (slot_show_aux_string)); - si->signal_connect_show_lookup_table ( - slot (slot_show_lookup_table)); + si->signal_connect_show_preedit_string( + slot(slot_show_preedit_string)); + si->signal_connect_show_aux_string( + slot(slot_show_aux_string)); + si->signal_connect_show_lookup_table( + slot(slot_show_lookup_table)); - si->signal_connect_hide_preedit_string ( - slot (slot_hide_preedit_string)); - si->signal_connect_hide_aux_string ( - slot (slot_hide_aux_string)); - si->signal_connect_hide_lookup_table ( - slot (slot_hide_lookup_table)); + si->signal_connect_hide_preedit_string( + slot(slot_hide_preedit_string)); + si->signal_connect_hide_aux_string( + slot(slot_hide_aux_string)); + si->signal_connect_hide_lookup_table( + slot(slot_hide_lookup_table)); - si->signal_connect_update_preedit_caret ( - slot (slot_update_preedit_caret)); - si->signal_connect_update_preedit_string ( - slot (slot_update_preedit_string)); - si->signal_connect_update_aux_string ( - slot (slot_update_aux_string)); - si->signal_connect_update_lookup_table ( - slot (slot_update_lookup_table)); + si->signal_connect_update_preedit_caret( + slot(slot_update_preedit_caret)); + si->signal_connect_update_preedit_string( + slot(slot_update_preedit_string)); + si->signal_connect_update_aux_string( + slot(slot_update_aux_string)); + si->signal_connect_update_lookup_table( + slot(slot_update_lookup_table)); - si->signal_connect_commit_string ( - slot (slot_commit_string)); + si->signal_connect_commit_string( + slot(slot_commit_string)); - si->signal_connect_forward_key_event ( - slot (slot_forward_key_event)); + si->signal_connect_forward_key_event( + slot(slot_forward_key_event)); - si->signal_connect_register_properties ( - slot (slot_register_properties)); + si->signal_connect_register_properties( + slot(slot_register_properties)); - si->signal_connect_update_property ( - slot (slot_update_property)); + si->signal_connect_update_property( + slot(slot_update_property)); - si->signal_connect_beep ( - slot (slot_beep)); + si->signal_connect_beep( + slot(slot_beep)); - si->signal_connect_start_helper ( - slot (slot_start_helper)); + si->signal_connect_start_helper( + slot(slot_start_helper)); - si->signal_connect_stop_helper ( - slot (slot_stop_helper)); + si->signal_connect_stop_helper( + slot(slot_stop_helper)); - si->signal_connect_send_helper_event ( - slot (slot_send_helper_event)); + si->signal_connect_send_helper_event( + slot(slot_send_helper_event)); - si->signal_connect_get_surrounding_text ( - slot (slot_get_surrounding_text)); + si->signal_connect_get_surrounding_text( + slot(slot_get_surrounding_text)); - si->signal_connect_delete_surrounding_text ( - slot (slot_delete_surrounding_text)); + si->signal_connect_delete_surrounding_text( + slot(slot_delete_surrounding_text)); } // Implementation of slot functions static void -slot_show_preedit_string (IMEngineInstanceBase *si) +slot_show_preedit_string(IMEngineInstanceBase *si) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->impl && _focused_ic == ic) { @@ -2462,102 +2518,102 @@ slot_show_preedit_string (IMEngineInstanceBase *si) { if (!ic->impl->preedit_started) { - ecore_imf_context_preedit_start_event_add (_focused_ic->ctx); + ecore_imf_context_preedit_start_event_add(_focused_ic->ctx); ecore_imf_context_event_callback_call(_focused_ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL); ic->impl->preedit_started = true; } } else - _panel_client.show_preedit_string (ic->id); + _panel_client.show_preedit_string(ic->id); } } static void -slot_show_aux_string (IMEngineInstanceBase *si) +slot_show_aux_string(IMEngineInstanceBase *si) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->impl && _focused_ic == ic) - _panel_client.show_aux_string (ic->id); + _panel_client.show_aux_string(ic->id); } static void -slot_show_lookup_table (IMEngineInstanceBase *si) +slot_show_lookup_table(IMEngineInstanceBase *si) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->impl && _focused_ic == ic) - _panel_client.show_lookup_table (ic->id); + _panel_client.show_lookup_table(ic->id); } static void -slot_hide_preedit_string (IMEngineInstanceBase *si) +slot_hide_preedit_string(IMEngineInstanceBase *si) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->impl && _focused_ic == ic) { bool emit = false; - if (ic->impl->preedit_string.length ()) + if (ic->impl->preedit_string.length()) { - ic->impl->preedit_string = WideString (); + ic->impl->preedit_string = WideString(); ic->impl->preedit_caret = 0; - ic->impl->preedit_attrlist.clear (); + ic->impl->preedit_attrlist.clear(); emit = true; } if (ic->impl->use_preedit) { if (emit) { - ecore_imf_context_preedit_changed_event_add (ic->ctx); + ecore_imf_context_preedit_changed_event_add(ic->ctx); ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL); } if (ic->impl->preedit_started) { - ecore_imf_context_preedit_end_event_add (ic->ctx); + ecore_imf_context_preedit_end_event_add(ic->ctx); ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL); ic->impl->preedit_started = false; } } else - _panel_client.hide_preedit_string (ic->id); + _panel_client.hide_preedit_string(ic->id); } } static void -slot_hide_aux_string (IMEngineInstanceBase *si) +slot_hide_aux_string(IMEngineInstanceBase *si) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->impl && _focused_ic == ic) - _panel_client.hide_aux_string (ic->id); + _panel_client.hide_aux_string(ic->id); } static void -slot_hide_lookup_table (IMEngineInstanceBase *si) +slot_hide_lookup_table(IMEngineInstanceBase *si) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->impl && _focused_ic == ic) - _panel_client.hide_lookup_table (ic->id); + _panel_client.hide_lookup_table(ic->id); } static void -slot_update_preedit_caret (IMEngineInstanceBase *si, int caret) +slot_update_preedit_caret(IMEngineInstanceBase *si, int caret) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->impl && _focused_ic == ic && ic->impl->preedit_caret != caret) { @@ -2566,28 +2622,28 @@ slot_update_preedit_caret (IMEngineInstanceBase *si, int caret) { if (!ic->impl->preedit_started) { - ecore_imf_context_preedit_start_event_add (ic->ctx); + ecore_imf_context_preedit_start_event_add(ic->ctx); ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL); ic->impl->preedit_started = true; } - ecore_imf_context_preedit_changed_event_add (ic->ctx); + ecore_imf_context_preedit_changed_event_add(ic->ctx); ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL); } else - _panel_client.update_preedit_caret (ic->id, caret); + _panel_client.update_preedit_caret(ic->id, caret); } } static void -slot_update_preedit_string (IMEngineInstanceBase *si, +slot_update_preedit_string(IMEngineInstanceBase *si, const WideString & str, const AttributeList & attrs) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); - if (ic && ic->impl && _focused_ic == ic && (ic->impl->preedit_string != str || str.length ())) + if (ic && ic->impl && _focused_ic == ic && (ic->impl->preedit_string != str || str.length())) { ic->impl->preedit_string = str; ic->impl->preedit_attrlist = attrs; @@ -2595,178 +2651,178 @@ slot_update_preedit_string (IMEngineInstanceBase *si, { if (!ic->impl->preedit_started) { - ecore_imf_context_preedit_start_event_add (_focused_ic->ctx); + ecore_imf_context_preedit_start_event_add(_focused_ic->ctx); ecore_imf_context_event_callback_call(_focused_ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL); ic->impl->preedit_started = true; } - ic->impl->preedit_caret = str.length (); + ic->impl->preedit_caret = str.length(); ic->impl->preedit_updating = true; - ecore_imf_context_preedit_changed_event_add (ic->ctx); + ecore_imf_context_preedit_changed_event_add(ic->ctx); ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL); ic->impl->preedit_updating = false; } else { - _panel_client.update_preedit_string (ic->id, str, attrs); + _panel_client.update_preedit_string(ic->id, str, attrs); } } } static void -slot_update_aux_string (IMEngineInstanceBase *si, +slot_update_aux_string(IMEngineInstanceBase *si, const WideString & str, const AttributeList & attrs) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->impl && _focused_ic == ic) - _panel_client.update_aux_string (ic->id, str, attrs); + _panel_client.update_aux_string(ic->id, str, attrs); } static void -slot_commit_string (IMEngineInstanceBase *si, +slot_commit_string(IMEngineInstanceBase *si, const WideString & str) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->ctx) { - ecore_imf_context_commit_event_add (ic->ctx, utf8_wcstombs (str).c_str ()); + ecore_imf_context_commit_event_add(ic->ctx, utf8_wcstombs(str).c_str()); ecore_imf_context_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(str).c_str()); } } static void -slot_forward_key_event (IMEngineInstanceBase *si, +slot_forward_key_event(IMEngineInstanceBase *si, const KeyEvent & key) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && _focused_ic == ic) { - if (!_fallback_instance->process_key_event (key)) + if (!_fallback_instance->process_key_event(key)) _x_send_key_event(key); } } static void -slot_update_lookup_table (IMEngineInstanceBase *si, +slot_update_lookup_table(IMEngineInstanceBase *si, const LookupTable & table) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->impl && _focused_ic == ic) - _panel_client.update_lookup_table (ic->id, table); + _panel_client.update_lookup_table(ic->id, table); } static void -slot_register_properties (IMEngineInstanceBase *si, - const PropertyList & properties) +slot_register_properties(IMEngineInstanceBase *si, + const PropertyList & properties) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->impl && _focused_ic == ic) - _panel_client.register_properties (ic->id, properties); + _panel_client.register_properties(ic->id, properties); } static void -slot_update_property (IMEngineInstanceBase *si, - const Property & property) +slot_update_property(IMEngineInstanceBase *si, + const Property & property) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->impl && _focused_ic == ic) - _panel_client.update_property (ic->id, property); + _panel_client.update_property(ic->id, property); } static void -slot_beep (IMEngineInstanceBase *si __UNUSED__) +slot_beep(IMEngineInstanceBase *si __UNUSED__) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; } static void -slot_start_helper (IMEngineInstanceBase *si, - const String &helper_uuid) +slot_start_helper(IMEngineInstanceBase *si, + const String &helper_uuid) { - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " helper= " << helper_uuid << " context=" << (ic ? ic->id : -1) << " ic=" << ic - << " ic-uuid=" << ((ic ) ? ic->impl->si->get_factory_uuid () : "") << "...\n"; + << " ic-uuid=" << ((ic ) ? ic->impl->si->get_factory_uuid() : "") << "...\n"; if (ic && ic->impl) - _panel_client.start_helper (ic->id, helper_uuid); + _panel_client.start_helper(ic->id, helper_uuid); } static void -slot_stop_helper (IMEngineInstanceBase *si, - const String &helper_uuid) +slot_stop_helper(IMEngineInstanceBase *si, + const String &helper_uuid) { - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " helper= " << helper_uuid << " context=" << (ic ? ic->id : -1) << " ic=" << ic << "...\n"; if (ic && ic->impl) - _panel_client.stop_helper (ic->id, helper_uuid); + _panel_client.stop_helper(ic->id, helper_uuid); } static void -slot_send_helper_event (IMEngineInstanceBase *si, - const String &helper_uuid, - const Transaction &trans) +slot_send_helper_event(IMEngineInstanceBase *si, + const String &helper_uuid, + const Transaction &trans) { - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " helper= " << helper_uuid << " context=" << (ic ? ic->id : -1) << " ic=" << ic - << " ic-uuid=" << ((ic) ? ic->impl->si->get_factory_uuid () : "") << "...\n"; + << " ic-uuid=" << ((ic) ? ic->impl->si->get_factory_uuid() : "") << "...\n"; if (ic && ic->impl) - _panel_client.send_helper_event (ic->id, helper_uuid, trans); + _panel_client.send_helper_event(ic->id, helper_uuid, trans); } static bool -slot_get_surrounding_text (IMEngineInstanceBase *si, - WideString &text, - int &cursor, - int maxlen_before, - int maxlen_after) +slot_get_surrounding_text(IMEngineInstanceBase *si, + WideString &text, + int &cursor, + int maxlen_before, + int maxlen_after) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->impl && _focused_ic == ic) { char *surrounding = NULL; int cursor_index; - if (ecore_imf_context_surrounding_get (_focused_ic->ctx, &surrounding, &cursor_index)) + if (ecore_imf_context_surrounding_get(_focused_ic->ctx, &surrounding, &cursor_index)) { SCIM_DEBUG_FRONTEND(2) << "Surrounding text: " << surrounding <<"\n"; SCIM_DEBUG_FRONTEND(2) << "Cursor Index : " << cursor_index <<"\n"; - WideString before (utf8_mbstowcs (String (surrounding, surrounding + cursor_index))); - WideString after (utf8_mbstowcs (String (surrounding + cursor_index))); - if (maxlen_before > 0 && ((unsigned int)maxlen_before) < before.length ()) - before = WideString (before.begin () + (before.length () - maxlen_before), before.end ()); - else if (maxlen_before == 0) before = WideString (); - if (maxlen_after > 0 && ((unsigned int)maxlen_after) < after.length ()) - after = WideString (after.begin (), after.begin () + maxlen_after); - else if (maxlen_after == 0) after = WideString (); + WideString before(utf8_mbstowcs(String(surrounding, surrounding + cursor_index))); + WideString after(utf8_mbstowcs(String(surrounding + cursor_index))); + if (maxlen_before > 0 && ((unsigned int)maxlen_before) < before.length()) + before = WideString(before.begin() + (before.length() - maxlen_before), before.end()); + else if (maxlen_before == 0) before = WideString(); + if (maxlen_after > 0 && ((unsigned int)maxlen_after) < after.length()) + after = WideString(after.begin(), after.begin() + maxlen_after); + else if (maxlen_after == 0) after = WideString(); text = before + after; - cursor = before.length (); + cursor = before.length(); return true; } } @@ -2774,13 +2830,13 @@ slot_get_surrounding_text (IMEngineInstanceBase *si, } static bool -slot_delete_surrounding_text (IMEngineInstanceBase *si, - int offset, - int len) +slot_delete_surrounding_text(IMEngineInstanceBase *si, + int offset, + int len) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + EcoreIMFContextISF *ic = static_cast(si->get_frontend_data()); if (ic && ic->impl && _focused_ic == ic) { @@ -2788,7 +2844,7 @@ slot_delete_surrounding_text (IMEngineInstanceBase *si, ev.ctx = _focused_ic->ctx; ev.n_chars = len; ev.offset = offset; - ecore_imf_context_delete_surrounding_event_add (_focused_ic->ctx, offset, len); + ecore_imf_context_delete_surrounding_event_add(_focused_ic->ctx, offset, len); ecore_imf_context_event_callback_call(_focused_ic->ctx, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, &ev); return true; } @@ -2796,43 +2852,43 @@ slot_delete_surrounding_text (IMEngineInstanceBase *si, } static void -reload_config_callback (const ConfigPointer &config) +reload_config_callback(const ConfigPointer &config) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; - _frontend_hotkey_matcher.load_hotkeys (config); - _imengine_hotkey_matcher.load_hotkeys (config); + _frontend_hotkey_matcher.load_hotkeys(config); + _imengine_hotkey_matcher.load_hotkeys(config); KeyEvent key; - scim_string_to_key (key, - config->read (String (SCIM_CONFIG_HOTKEYS_FRONTEND_VALID_KEY_MASK), - String ("Shift+Control+Alt+Lock"))); + scim_string_to_key(key, + config->read(String(SCIM_CONFIG_HOTKEYS_FRONTEND_VALID_KEY_MASK), + String("Shift+Control+Alt+Lock"))); _valid_key_mask = (key.mask > 0)?(key.mask):0xFFFF; _valid_key_mask |= SCIM_KEY_ReleaseMask; // Special treatment for two backslash keys on jp106 keyboard. _valid_key_mask |= SCIM_KEY_QuirkKanaRoMask; - _on_the_spot = config->read (String (SCIM_CONFIG_FRONTEND_ON_THE_SPOT), _on_the_spot); - _shared_input_method = config->read (String (SCIM_CONFIG_FRONTEND_SHARED_INPUT_METHOD), _shared_input_method); + _on_the_spot = config->read(String(SCIM_CONFIG_FRONTEND_ON_THE_SPOT), _on_the_spot); + _shared_input_method = config->read(String(SCIM_CONFIG_FRONTEND_SHARED_INPUT_METHOD), _shared_input_method); // Get keyboard layout setting // Flush the global config first, in order to load the new configs from disk. - scim_global_config_flush (); + scim_global_config_flush(); - _keyboard_layout = scim_get_default_keyboard_layout (); + _keyboard_layout = scim_get_default_keyboard_layout(); } static void -fallback_commit_string_cb (IMEngineInstanceBase *si __UNUSED__, - const WideString &str) +fallback_commit_string_cb(IMEngineInstanceBase *si __UNUSED__, + const WideString &str) { SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; if (_focused_ic && _focused_ic->impl) { - ecore_imf_context_commit_event_add (_focused_ic->ctx, utf8_wcstombs (str).c_str ()); + ecore_imf_context_commit_event_add(_focused_ic->ctx, utf8_wcstombs(str).c_str()); ecore_imf_context_event_callback_call(_focused_ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(str).c_str()); } } diff --git a/libraries/ecore/src/modules/immodules/scim/scim_imcontext.h b/libraries/ecore/src/modules/immodules/scim/scim_imcontext.h index 84f1a2f..72533e2 100644 --- a/libraries/ecore/src/modules/immodules/scim/scim_imcontext.h +++ b/libraries/ecore/src/modules/immodules/scim/scim_imcontext.h @@ -32,6 +32,8 @@ Eina_Bool isf_imf_context_filter_event (Ecore_IMF_Context *ctx, Ecore_IMF_Event void isf_imf_context_prediction_allow_set (Ecore_IMF_Context* ctx, Eina_Bool prediction); void isf_imf_context_autocapital_type_set (Ecore_IMF_Context* ctx, Ecore_IMF_Autocapital_Type autocapital_type); void isf_imf_context_input_panel_layout_set (Ecore_IMF_Context* ctx, Ecore_IMF_Input_Panel_Layout layout); +void isf_imf_context_input_panel_show(Ecore_IMF_Context *ctx); +void isf_imf_context_input_panel_hide(Ecore_IMF_Context *ctx); EcoreIMFContextISF* isf_imf_context_new (void); void isf_imf_context_shutdown (void); diff --git a/libraries/ecore/src/modules/immodules/scim/scim_module.cpp b/libraries/ecore/src/modules/immodules/scim/scim_module.cpp index eff6381..d17e37a 100644 --- a/libraries/ecore/src/modules/immodules/scim/scim_module.cpp +++ b/libraries/ecore/src/modules/immodules/scim/scim_module.cpp @@ -19,8 +19,8 @@ extern "C" isf_imf_context_del, /* del */ isf_imf_context_client_window_set, /* client_window_set */ isf_imf_context_client_canvas_set, /* client_canvas_set */ - NULL, /* isf_imf_context_input_panel_show, - show */ - NULL, /* isf_imf_context_input_panel_hide, - hide */ + isf_imf_context_input_panel_show, /* input_panel_show, - show */ + isf_imf_context_input_panel_hide, /* input_panel_hide, - hide */ isf_imf_context_preedit_string_get, /* get_preedit_string */ isf_imf_context_focus_in, /* focus_in */ isf_imf_context_focus_out, /* focus_out */ @@ -38,7 +38,12 @@ extern "C" NULL, /* isf_imf_context_input_panel_layout_get, */ NULL, /* isf_imf_context_input_panel_language_set, */ NULL, /* isf_imf_context_input_panel_language_get, */ - isf_imf_context_cursor_location_set /* cursor_location_set */ + isf_imf_context_cursor_location_set, /* cursor_location_set */ + NULL, /* input_panel_imdata_set */ + NULL, /* input_panel_imdata_get */ + NULL, /* input_panel_return_key_type_set */ + NULL, /* input_panel_return_key_disabled_set */ + NULL /* input_panel_caps_lock_mode_set */ }; static Ecore_IMF_Context *imf_module_create (void); diff --git a/libraries/ecore/src/modules/immodules/xim/Makefile.in b/libraries/ecore/src/modules/immodules/xim/Makefile.in index 5b78946..775b574 100644 --- a/libraries/ecore/src/modules/immodules/xim/Makefile.in +++ b/libraries/ecore/src/modules/immodules/xim/Makefile.in @@ -48,16 +48,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -189,6 +188,8 @@ 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@ @@ -244,6 +245,8 @@ 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@ @@ -254,6 +257,7 @@ 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@ diff --git a/libraries/ecore/src/modules/immodules/xim/ecore_imf_xim.c b/libraries/ecore/src/modules/immodules/xim/ecore_imf_xim.c index ea7ee7f..01a3576 100644 --- a/libraries/ecore/src/modules/immodules/xim/ecore_imf_xim.c +++ b/libraries/ecore/src/modules/immodules/xim/ecore_imf_xim.c @@ -294,6 +294,10 @@ _ecore_imf_context_xim_focus_in(Ecore_IMF_Context *ctx) imf_context_data = ecore_imf_context_data_get(ctx); ic = imf_context_data->ic; imf_context_data->has_focus = EINA_TRUE; + + if (ecore_imf_context_input_panel_enabled_get(ctx)) + ecore_imf_context_input_panel_show(ctx); + if (ic) { char *str; @@ -326,6 +330,9 @@ _ecore_imf_context_xim_focus_out(Ecore_IMF_Context *ctx) ic = imf_context_data->ic; if (ic) XUnsetICFocus(ic); + + if (ecore_imf_context_input_panel_enabled_get(ctx)) + ecore_imf_context_input_panel_hide(ctx); } #else (void)ctx; @@ -501,6 +508,38 @@ _ecore_imf_context_xim_cursor_location_set(Ecore_IMF_Context *ctx, (void)(w); // yes w is unused, but only a bi-product of the algorithm } +static void +_ecore_imf_context_xim_input_panel_show(Ecore_IMF_Context *ctx) +{ + EINA_LOG_DBG("%s in", __FUNCTION__); + +#ifdef ENABLE_XIM + Ecore_IMF_Context_Data *imf_context_data; + imf_context_data = ecore_imf_context_data_get(ctx); + + ecore_x_e_virtual_keyboard_state_set + (imf_context_data->win, ECORE_X_VIRTUAL_KEYBOARD_STATE_ON); +#else + (void)ctx; +#endif +} + +static void +_ecore_imf_context_xim_input_panel_hide(Ecore_IMF_Context *ctx) +{ + EINA_LOG_DBG("%s in", __FUNCTION__); + +#ifdef ENABLE_XIM + Ecore_IMF_Context_Data *imf_context_data; + imf_context_data = ecore_imf_context_data_get(ctx); + + ecore_x_e_virtual_keyboard_state_set + (imf_context_data->win, ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF); +#else + (void)ctx; +#endif +} + #ifdef ENABLE_XIM static unsigned int _ecore_x_event_reverse_modifiers(unsigned int state) @@ -739,8 +778,8 @@ static Ecore_IMF_Context_Class xim_class = { .del = _ecore_imf_context_xim_del, .client_window_set = _ecore_imf_context_xim_client_window_set, .client_canvas_set = NULL, - .show = NULL, - .hide = NULL, + .show = _ecore_imf_context_xim_input_panel_show, + .hide = _ecore_imf_context_xim_input_panel_hide, .preedit_string_get = _ecore_imf_context_xim_preedit_string_get, .focus_in = _ecore_imf_context_xim_focus_in, .focus_out = _ecore_imf_context_xim_focus_out, @@ -759,6 +798,11 @@ static Ecore_IMF_Context_Class xim_class = { .input_panel_language_set = NULL, .input_panel_language_get = NULL, .cursor_location_set = _ecore_imf_context_xim_cursor_location_set, + .input_panel_imdata_set = NULL, + .input_panel_imdata_get = NULL, + .input_panel_return_key_type_set = NULL, + .input_panel_return_key_disabled_set = NULL, + .input_panel_caps_lock_mode_set = NULL }; static Ecore_IMF_Context * diff --git a/libraries/ecore/src/tests/Makefile.in b/libraries/ecore/src/tests/Makefile.in index bd7726a..aa799d9 100644 --- a/libraries/ecore/src/tests/Makefile.in +++ b/libraries/ecore/src/tests/Makefile.in @@ -53,16 +53,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -174,6 +173,8 @@ 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@ @@ -229,6 +230,8 @@ 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@ @@ -239,6 +242,7 @@ 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@ diff --git a/libraries/ecore/src/tests/ecore_test_ecore_x.c b/libraries/ecore/src/tests/ecore_test_ecore_x.c index 4b9e126..2d14ff1 100644 --- a/libraries/ecore/src/tests/ecore_test_ecore_x.c +++ b/libraries/ecore/src/tests/ecore_test_ecore_x.c @@ -6,6 +6,10 @@ #include "ecore_suite.h" +/* FIXME: Currently disable these tests. They are useless ATM and they just + * make buildbot complain. Once we add useful tests here we'll also bother + * with getting X on the server. */ +#undef HAVE_ECORE_X_XLIB /* TODO: change to HAVE_ECORE_X when xcb implementation is done */ #ifdef HAVE_ECORE_X_XLIB diff --git a/libraries/ecore/src/util/Makefile.in b/libraries/ecore/src/util/Makefile.in index 96cb48a..423c6e0 100644 --- a/libraries/ecore/src/util/Makefile.in +++ b/libraries/ecore/src/util/Makefile.in @@ -49,16 +49,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ - $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @@ -163,6 +162,8 @@ 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@ @@ -218,6 +219,8 @@ 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@ @@ -228,6 +231,7 @@ 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@ -- cgit v1.1