From 825a3d837a33f226c879cd02ad15c3fba57e8b2c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 23:30:42 +1000 Subject: Update the EFL to what I'm actually using, coz I'm using some stuff not yet released. --- libraries/ecore/AUTHORS | 4 +- libraries/ecore/ChangeLog | 115 + libraries/ecore/Makefile.am | 5 + libraries/ecore/Makefile.in | 36 +- libraries/ecore/NEWS | 36 +- libraries/ecore/TODO | 2 - libraries/ecore/aclocal.m4 | 62 +- libraries/ecore/autogen.sh | 1 + libraries/ecore/config.h.in | 15 + libraries/ecore/configure | 2735 ++++++----- libraries/ecore/configure.ac | 159 +- libraries/ecore/doc/Makefile.in | 14 +- libraries/ecore/ecore-wayland.pc.in | 12 + libraries/ecore/ecore.spec | 3 +- libraries/ecore/ecore.spec.in | 1 - libraries/ecore/ecore.supp | 2 +- libraries/ecore/ltmain.sh | 4 +- 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/sha1-for-source.txt | 1 - libraries/ecore/src/Makefile.in | 14 +- libraries/ecore/src/bin/Makefile.in | 14 +- libraries/ecore/src/examples/Makefile.am | 6 +- libraries/ecore/src/examples/Makefile.in | 76 +- libraries/ecore/src/lib/Makefile.am | 4 + libraries/ecore/src/lib/Makefile.in | 33 +- libraries/ecore/src/lib/ecore/Ecore.h | 572 +-- libraries/ecore/src/lib/ecore/Makefile.am | 1 + libraries/ecore/src/lib/ecore/Makefile.in | 45 +- libraries/ecore/src/lib/ecore/ecore.c | 24 +- libraries/ecore/src/lib/ecore/ecore_alloc.c | 132 + libraries/ecore/src/lib/ecore/ecore_anim.c | 19 +- libraries/ecore/src/lib/ecore/ecore_events.c | 25 +- libraries/ecore/src/lib/ecore/ecore_getopt.c | 11 +- libraries/ecore/src/lib/ecore/ecore_glib.c | 8 +- libraries/ecore/src/lib/ecore/ecore_idle_enterer.c | 9 +- libraries/ecore/src/lib/ecore/ecore_idle_exiter.c | 7 +- libraries/ecore/src/lib/ecore/ecore_idler.c | 7 +- libraries/ecore/src/lib/ecore/ecore_job.c | 9 +- libraries/ecore/src/lib/ecore/ecore_main.c | 33 +- libraries/ecore/src/lib/ecore/ecore_pipe.c | 9 +- libraries/ecore/src/lib/ecore/ecore_poll.c | 17 +- libraries/ecore/src/lib/ecore/ecore_private.h | 29 +- libraries/ecore/src/lib/ecore/ecore_thread.c | 15 +- libraries/ecore/src/lib/ecore/ecore_timer.c | 46 +- libraries/ecore/src/lib/ecore_cocoa/Makefile.in | 14 +- libraries/ecore/src/lib/ecore_con/Ecore_Con.h | 124 +- libraries/ecore/src/lib/ecore_con/Makefile.am | 1 + libraries/ecore/src/lib/ecore_con/Makefile.in | 38 +- libraries/ecore/src/lib/ecore_con/ecore_con.c | 646 ++- .../ecore/src/lib/ecore_con/ecore_con_alloc.c | 4 +- libraries/ecore/src/lib/ecore_con/ecore_con_ares.c | 14 +- libraries/ecore/src/lib/ecore_con/ecore_con_info.c | 9 +- .../src/lib/ecore_con/ecore_con_local_win32.c | 29 +- .../ecore/src/lib/ecore_con/ecore_con_private.h | 101 +- .../ecore/src/lib/ecore_con/ecore_con_socks.c | 496 ++ libraries/ecore/src/lib/ecore_con/ecore_con_ssl.c | 471 +- libraries/ecore/src/lib/ecore_con/ecore_con_url.c | 734 +-- libraries/ecore/src/lib/ecore_config/Makefile.in | 14 +- libraries/ecore/src/lib/ecore_directfb/Makefile.in | 14 +- .../ecore/src/lib/ecore_directfb/ecore_directfb.c | 70 +- libraries/ecore/src/lib/ecore_evas/Ecore_Evas.h | 263 +- libraries/ecore/src/lib/ecore_evas/Makefile.am | 38 +- libraries/ecore/src/lib/ecore_evas/Makefile.in | 57 +- libraries/ecore/src/lib/ecore_evas/ecore_evas.c | 153 +- .../ecore/src/lib/ecore_evas/ecore_evas_buffer.c | 164 +- .../ecore/src/lib/ecore_evas/ecore_evas_cocoa.c | 4 +- .../ecore/src/lib/ecore_evas/ecore_evas_ews.c | 5 + .../ecore/src/lib/ecore_evas/ecore_evas_extn.c | 2152 +++++++++ libraries/ecore/src/lib/ecore_evas/ecore_evas_fb.c | 22 +- .../ecore/src/lib/ecore_evas/ecore_evas_private.h | 52 +- .../ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c | 46 +- .../ecore/src/lib/ecore_evas/ecore_evas_sdl.c | 3 + .../ecore/src/lib/ecore_evas/ecore_evas_util.c | 12 +- .../src/lib/ecore_evas/ecore_evas_wayland_egl.c | 1131 +++++ .../src/lib/ecore_evas/ecore_evas_wayland_shm.c | 1257 +++++ .../ecore/src/lib/ecore_evas/ecore_evas_win32.c | 8 +- libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c | 53 +- libraries/ecore/src/lib/ecore_fb/Makefile.in | 14 +- libraries/ecore/src/lib/ecore_fb/ecore_fb_li.c | 8 +- .../ecore/src/lib/ecore_fb/ecore_fb_private.h | 3 + libraries/ecore/src/lib/ecore_file/Makefile.in | 14 +- libraries/ecore/src/lib/ecore_file/ecore_file.c | 17 +- .../ecore/src/lib/ecore_file/ecore_file_download.c | 3 + .../lib/ecore_file/ecore_file_monitor_inotify.c | 1 + .../src/lib/ecore_file/ecore_file_monitor_poll.c | 1 + .../ecore/src/lib/ecore_file/ecore_file_path.c | 3 +- libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h | 19 +- libraries/ecore/src/lib/ecore_imf/Makefile.in | 14 +- .../ecore/src/lib/ecore_imf/ecore_imf_context.c | 141 +- .../ecore/src/lib/ecore_imf/ecore_imf_private.h | 9 + libraries/ecore/src/lib/ecore_imf_evas/Makefile.in | 14 +- libraries/ecore/src/lib/ecore_input/Makefile.in | 14 +- .../ecore/src/lib/ecore_input_evas/Makefile.in | 14 +- .../src/lib/ecore_input_evas/ecore_input_evas.c | 1 + libraries/ecore/src/lib/ecore_ipc/Makefile.in | 14 +- libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c | 3 +- .../ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h | 13 +- libraries/ecore/src/lib/ecore_psl1ght/Makefile.in | 14 +- .../ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c | 111 +- libraries/ecore/src/lib/ecore_sdl/Makefile.in | 14 +- .../ecore/src/lib/ecore_wayland/Ecore_Wayland.h | 123 + libraries/ecore/src/lib/ecore_wayland/Makefile.am | 31 + libraries/ecore/src/lib/ecore_wayland/Makefile.in | 829 ++++ libraries/ecore/src/lib/ecore_wayland/ecore_wl.c | 1213 +++++ .../ecore/src/lib/ecore_wayland/ecore_wl_private.h | 85 + libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h | 36 +- libraries/ecore/src/lib/ecore_win32/Makefile.in | 14 +- libraries/ecore/src/lib/ecore_win32/ecore_win32.c | 61 +- .../ecore/src/lib/ecore_win32/ecore_win32_event.c | 192 +- .../src/lib/ecore_win32/ecore_win32_private.h | 19 +- libraries/ecore/src/lib/ecore_wince/Makefile.in | 14 +- libraries/ecore/src/lib/ecore_x/Ecore_X.h | 7 +- libraries/ecore/src/lib/ecore_x/Makefile.in | 14 +- libraries/ecore/src/lib/ecore_x/xcb/Makefile.in | 14 +- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_damage.c | 2 +- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_dnd.c | 5 +- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_dpms.c | 6 +- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c | 14 + .../ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c | 3 +- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_randr.c | 45 +- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c | 5 +- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_xfixes.c | 14 +- libraries/ecore/src/lib/ecore_x/xlib/Makefile.in | 14 +- libraries/ecore/src/lib/ecore_x/xlib/ecore_x.c | 324 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_atoms.c | 18 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_composite.c | 42 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_cursor.c | 24 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_damage.c | 12 +- libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dnd.c | 86 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_dpms.c | 32 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_drawable.c | 26 +- libraries/ecore/src/lib/ecore_x/xlib/ecore_x_e.c | 232 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_error.c | 36 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_events.c | 421 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c | 99 +- libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gc.c | 10 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_gesture.c | 18 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_icccm.c | 248 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_image.c | 100 +- libraries/ecore/src/lib/ecore_x/xlib/ecore_x_mwm.c | 10 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c | 424 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_pixmap.c | 40 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_randr_11.c | 49 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c | 339 +- .../src/lib/ecore_x/xlib/ecore_x_randr_12_edid.c | 46 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c | 9 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_region.c | 40 +- .../src/lib/ecore_x/xlib/ecore_x_screensaver.c | 24 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_selection.c | 333 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_sync.c | 30 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_test.c | 8 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_vsync.c | 38 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_window.c | 344 +- .../src/lib/ecore_x/xlib/ecore_x_window_prop.c | 190 +- .../src/lib/ecore_x/xlib/ecore_x_window_shape.c | 150 +- libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xi2.c | 10 +- .../ecore/src/lib/ecore_x/xlib/ecore_x_xinerama.c | 6 +- libraries/ecore/src/modules/Makefile.in | 14 +- libraries/ecore/src/modules/immodules/Makefile.am | 4 + libraries/ecore/src/modules/immodules/Makefile.in | 19 +- .../ecore/src/modules/immodules/scim/Makefile.am | 36 + .../ecore/src/modules/immodules/scim/Makefile.in | 849 ++++ .../src/modules/immodules/scim/scim_imcontext.cpp | 2839 +++++++++++ .../src/modules/immodules/scim/scim_imcontext.h | 40 + .../src/modules/immodules/scim/scim_module.cpp | 93 + .../ecore/src/modules/immodules/xim/Makefile.in | 14 +- .../src/modules/immodules/xim/ecore_imf_xim.c | 614 ++- libraries/ecore/src/tests/Makefile.in | 14 +- libraries/ecore/src/util/Makefile.in | 14 +- libraries/edje/ChangeLog | 66 + libraries/edje/Makefile.in | 2 - libraries/edje/NEWS | 17 + libraries/edje/README | 8 +- libraries/edje/aclocal.m4 | 64 +- libraries/edje/configure | 2047 ++++---- libraries/edje/configure.ac | 39 +- libraries/edje/data/Makefile.in | 2 - libraries/edje/data/include/Makefile.in | 2 - libraries/edje/doc/Makefile.in | 2 - libraries/edje/edje.spec | 4 +- libraries/edje/edje.spec.in | 2 +- libraries/edje/ltmain.sh | 4 +- libraries/edje/m4/libtool.m4 | 144 +- libraries/edje/m4/ltoptions.m4 | 2 +- libraries/edje/sha1-for-source.txt | 1 - libraries/edje/src/Makefile.in | 2 - libraries/edje/src/bin/Makefile.in | 2 - libraries/edje/src/bin/edje_cc.h | 1 + libraries/edje/src/bin/edje_cc_handlers.c | 129 +- libraries/edje/src/bin/edje_cc_out.c | 35 +- libraries/edje/src/bin/edje_cc_parse.c | 6 - libraries/edje/src/bin/edje_decc.c | 3 +- libraries/edje/src/bin/edje_inspector.c | 202 +- libraries/edje/src/bin/edje_multisense_convert.c | 2 +- libraries/edje/src/bin/epp/Makefile.in | 2 - libraries/edje/src/bin/epp/cppmain.c | 13 +- libraries/edje/src/examples/Makefile.am | 104 +- libraries/edje/src/examples/Makefile.in | 135 +- libraries/edje/src/examples/Vera.ttf | Bin 0 -> 65932 bytes libraries/edje/src/examples/lua_script.edc | 12 + libraries/edje/src/examples/multisense.edc | 139 + libraries/edje/src/examples/signals-messages.edc | 8 +- libraries/edje/src/lib/Edje.h | 40 +- libraries/edje/src/lib/Makefile.in | 2 - libraries/edje/src/lib/edje_cache.c | 13 +- libraries/edje/src/lib/edje_calc.c | 447 +- libraries/edje/src/lib/edje_callbacks.c | 5 + libraries/edje/src/lib/edje_data.c | 3 + libraries/edje/src/lib/edje_edit.c | 131 +- libraries/edje/src/lib/edje_embryo.c | 2 + libraries/edje/src/lib/edje_entry.c | 350 +- libraries/edje/src/lib/edje_load.c | 151 +- libraries/edje/src/lib/edje_lua2.c | 269 +- libraries/edje/src/lib/edje_main.c | 5 +- libraries/edje/src/lib/edje_message_queue.c | 4 +- libraries/edje/src/lib/edje_module.c | 4 +- libraries/edje/src/lib/edje_multisense.c | 12 +- libraries/edje/src/lib/edje_private.h | 13 +- libraries/edje/src/lib/edje_program.c | 4 +- libraries/edje/src/lib/edje_util.c | 44 +- libraries/edje/src/modules/Makefile.in | 2 - .../edje/src/modules/alsa_snd_player/Makefile.in | 2 - .../edje/src/modules/eet_snd_reader/Makefile.in | 2 - .../src/modules/multisense_factory/Makefile.in | 2 - .../multisense_factory/multisense_factory.c | 66 +- libraries/edje/src/tests/Makefile.in | 2 - libraries/edje/utils/Makefile.in | 2 - libraries/eet/ChangeLog | 21 +- libraries/eet/Makefile.am | 8 +- libraries/eet/Makefile.in | 10 +- libraries/eet/NEWS | 12 + libraries/eet/aclocal.m4 | 62 +- libraries/eet/config.guess | 149 +- libraries/eet/config.sub | 47 +- libraries/eet/configure | 656 ++- libraries/eet/configure.ac | 6 +- libraries/eet/doc/Doxyfile | 1689 ++++++- libraries/eet/doc/Doxyfile.in | 1687 ++++++- libraries/eet/doc/Makefile.am | 3 +- libraries/eet/doc/Makefile.in | 5 +- libraries/eet/eet.spec | 3 +- libraries/eet/eet.spec.in | 1 + libraries/eet/ltmain.sh | 4 +- libraries/eet/sha1-for-source.txt | 1 - libraries/eet/src/Makefile.in | 2 - libraries/eet/src/bin/Makefile.in | 2 - libraries/eet/src/bin/eet_main.c | 88 +- libraries/eet/src/examples/Makefile.am | 4 +- libraries/eet/src/examples/Makefile.in | 64 +- libraries/eet/src/lib/Eet.h | 17 +- libraries/eet/src/lib/Eet_private.h | 135 + libraries/eet/src/lib/Makefile.am | 1 + libraries/eet/src/lib/Makefile.in | 27 +- libraries/eet/src/lib/eet_alloc.c | 93 + libraries/eet/src/lib/eet_cipher.c | 26 +- libraries/eet/src/lib/eet_connection.c | 129 +- libraries/eet/src/lib/eet_data.c | 238 +- libraries/eet/src/lib/eet_dictionary.c | 55 +- libraries/eet/src/lib/eet_image.c | 74 +- libraries/eet/src/lib/eet_lib.c | 297 +- libraries/eet/src/lib/eet_node.c | 58 +- libraries/eet/src/lib/eet_utils.c | 2 +- libraries/eet/src/tests/Makefile.am | 1 + libraries/eet/src/tests/Makefile.in | 3 +- libraries/eet/src/tests/eet_suite.c | 42 +- libraries/eina/AUTHORS | 1 + libraries/eina/ChangeLog | 51 + libraries/eina/Makefile.am | 10 +- libraries/eina/Makefile.in | 14 +- libraries/eina/NEWS | 17 + libraries/eina/README | 2 +- libraries/eina/aclocal.m4 | 62 +- libraries/eina/config.guess | 149 +- libraries/eina/config.h.in | 27 +- libraries/eina/config.sub | 47 +- libraries/eina/configure | 2065 ++++---- libraries/eina/configure.ac | 184 +- libraries/eina/doc/Doxyfile.in | 1531 +++--- libraries/eina/doc/Makefile.am | 1 + libraries/eina/doc/Makefile.in | 5 +- libraries/eina/eina.pc | 4 +- libraries/eina/eina.spec | 2 +- libraries/eina/ltmain.sh | 4 +- libraries/eina/m4/libtool.m4 | 144 +- libraries/eina/m4/ltoptions.m4 | 2 +- libraries/eina/sha1-for-source.txt | 1 - libraries/eina/src/Makefile.in | 4 +- libraries/eina/src/examples/Makefile.am | 10 +- libraries/eina/src/examples/Makefile.in | 68 +- libraries/eina/src/examples/eina_array_01.c | 4 +- libraries/eina/src/include/Eina.h | 9 +- libraries/eina/src/include/Makefile.am | 6 +- libraries/eina/src/include/Makefile.in | 52 +- libraries/eina/src/include/eina_array.h | 17 +- libraries/eina/src/include/eina_benchmark.h | 8 +- libraries/eina/src/include/eina_binbuf.h | 18 + libraries/eina/src/include/eina_clist.h | 160 +- libraries/eina/src/include/eina_config.h | 10 + libraries/eina/src/include/eina_config.h.in | 10 + libraries/eina/src/include/eina_file.h | 40 + libraries/eina/src/include/eina_hash.h | 4 +- libraries/eina/src/include/eina_inarray.h | 572 +++ libraries/eina/src/include/eina_inline_array.x | 20 + libraries/eina/src/include/eina_inline_clist.x | 135 + libraries/eina/src/include/eina_inline_hash.x | 2 +- .../eina/src/include/eina_inline_lock_posix.x | 51 +- libraries/eina/src/include/eina_inline_lock_void.x | 62 +- .../eina/src/include/eina_inline_lock_win32.x | 46 + .../eina/src/include/eina_inline_lock_wince.x | 34 + libraries/eina/src/include/eina_inline_log.x | 4 +- libraries/eina/src/include/eina_inline_mempool.x | 49 +- libraries/eina/src/include/eina_inline_value.x | 1705 +++++++ libraries/eina/src/include/eina_inlist.h | 101 +- libraries/eina/src/include/eina_iterator.h | 8 +- libraries/eina/src/include/eina_list.h | 26 +- libraries/eina/src/include/eina_lock.h | 4 + libraries/eina/src/include/eina_log.h | 51 +- libraries/eina/src/include/eina_magic.h | 8 + libraries/eina/src/include/eina_main.h | 5 +- libraries/eina/src/include/eina_module.h | 47 +- .../eina/src/include/eina_simple_xml_parser.h | 62 +- libraries/eina/src/include/eina_str.h | 16 +- libraries/eina/src/include/eina_strbuf.h | 18 + libraries/eina/src/include/eina_stringshare.h | 1 + libraries/eina/src/include/eina_types.h | 4 + libraries/eina/src/include/eina_unicode.h | 23 +- libraries/eina/src/include/eina_ustrbuf.h | 20 +- libraries/eina/src/include/eina_value.h | 3114 ++++++++++++ libraries/eina/src/include/eina_xattr.h | 53 +- libraries/eina/src/lib/Makefile.am | 10 +- libraries/eina/src/lib/Makefile.in | 68 +- libraries/eina/src/lib/eina_array.c | 4 +- libraries/eina/src/lib/eina_binbuf_template_c.x | 9 + libraries/eina/src/lib/eina_cpu.c | 4 +- libraries/eina/src/lib/eina_file.c | 128 +- libraries/eina/src/lib/eina_hash.c | 6 +- libraries/eina/src/lib/eina_inarray.c | 777 +++ libraries/eina/src/lib/eina_log.c | 145 +- libraries/eina/src/lib/eina_magic.c | 11 +- libraries/eina/src/lib/eina_main.c | 16 +- libraries/eina/src/lib/eina_mmap.c | 5 + libraries/eina/src/lib/eina_module.c | 1 + libraries/eina/src/lib/eina_prefix.c | 37 +- libraries/eina/src/lib/eina_private.h | 6 + libraries/eina/src/lib/eina_rbtree.c | 10 +- libraries/eina/src/lib/eina_simple_xml_parser.c | 19 +- libraries/eina/src/lib/eina_strbuf.c | 6 +- libraries/eina/src/lib/eina_value.c | 4977 ++++++++++++++++++++ libraries/eina/src/lib/eina_xattr.c | 191 + libraries/eina/src/modules/Makefile.in | 4 +- libraries/eina/src/modules/mp/Makefile.in | 4 +- libraries/eina/src/modules/mp/buddy/Makefile.in | 4 +- libraries/eina/src/modules/mp/buddy/eina_buddy.c | 20 +- .../eina/src/modules/mp/chained_pool/Makefile.in | 4 +- .../modules/mp/chained_pool/eina_chained_mempool.c | 31 +- .../eina/src/modules/mp/ememoa_fixed/Makefile.in | 4 +- .../eina/src/modules/mp/ememoa_unknown/Makefile.in | 4 +- .../eina/src/modules/mp/fixed_bitmap/Makefile.in | 4 +- libraries/eina/src/modules/mp/one_big/Makefile.in | 4 +- .../eina/src/modules/mp/pass_through/Makefile.in | 4 +- libraries/eina/src/tests/Makefile.am | 9 +- libraries/eina/src/tests/Makefile.in | 77 +- libraries/eina/src/tests/cxx_compile_test.cxx | 34 + libraries/eina/src/tests/eina_bench.c | 3 +- libraries/eina/src/tests/eina_bench_hash.c | 2 + libraries/eina/src/tests/eina_bench_quad.c | 2 + libraries/eina/src/tests/eina_bench_stringshare.c | 8 + libraries/eina/src/tests/eina_suite.c | 2 + libraries/eina/src/tests/eina_suite.h | 2 + libraries/eina/src/tests/eina_test_array.c | 6 +- libraries/eina/src/tests/eina_test_binbuf.c | 36 +- libraries/eina/src/tests/eina_test_file.c | 4 +- libraries/eina/src/tests/eina_test_inarray.c | 401 ++ libraries/eina/src/tests/eina_test_value.c | 1799 +++++++ libraries/eina/src/tests/evas_list.c | 2 +- libraries/eina/src/tests/evas_mempool.c | 2 +- libraries/embryo/ChangeLog | 4 + libraries/embryo/Makefile.in | 2 - libraries/embryo/aclocal.m4 | 62 +- libraries/embryo/configure | 515 +- libraries/embryo/configure.ac | 6 +- libraries/embryo/doc/Makefile.in | 2 - libraries/embryo/doc/img/e.png | Bin libraries/embryo/doc/img/e_big.png | Bin libraries/embryo/doc/img/edoxy.css | 0 libraries/embryo/doc/img/foot_bg.png | Bin libraries/embryo/doc/img/head_bg.png | Bin libraries/embryo/doc/img/menu_bg.png | Bin libraries/embryo/doc/img/menu_bg_current.png | Bin libraries/embryo/doc/img/menu_bg_hover.png | Bin libraries/embryo/doc/img/menu_bg_last.png | Bin libraries/embryo/doc/img/menu_bg_unsel.png | Bin libraries/embryo/embryo.spec | 2 +- libraries/embryo/include/Makefile.in | 2 - libraries/embryo/ltmain.sh | 4 +- libraries/embryo/sha1-for-source.txt | 1 - libraries/embryo/src/Makefile.in | 2 - libraries/embryo/src/bin/Makefile.in | 2 - libraries/embryo/src/bin/embryo_cc_sc5.scp | 2 +- libraries/embryo/src/bin/embryo_cc_sc7.scp | 2 +- libraries/embryo/src/lib/Embryo.h | 2 +- libraries/embryo/src/lib/Makefile.in | 2 - libraries/evas/AUTHORS | 1 + libraries/evas/ChangeLog | 131 +- libraries/evas/Makefile.am | 10 + libraries/evas/Makefile.in | 29 +- libraries/evas/NEWS | 15 + libraries/evas/aclocal.m4 | 62 +- libraries/evas/compile | 142 - libraries/evas/config.h.in | 36 + libraries/evas/configure | 2718 ++++++----- libraries/evas/configure.ac | 130 +- libraries/evas/doc/Makefile.in | 8 +- libraries/evas/doc/img/e_big.png | Bin libraries/evas/doc/img/foot_bg.png | Bin libraries/evas/doc/img/head_bg.png | Bin libraries/evas/doc/img/menu_bg.png | Bin libraries/evas/doc/img/menu_bg_current.png | Bin libraries/evas/doc/img/menu_bg_hover.png | Bin libraries/evas/doc/img/menu_bg_last.png | Bin libraries/evas/doc/img/menu_bg_unsel.png | Bin libraries/evas/evas-wayland-egl.pc.in | 3 + libraries/evas/evas-wayland-shm.pc.in | 3 + libraries/evas/evas.spec | 2 +- libraries/evas/ltmain.sh | 4 +- libraries/evas/m4/evas_check_engine.m4 | 73 + libraries/evas/sha1-for-source.txt | 1 - libraries/evas/src/Makefile.in | 8 +- libraries/evas/src/bin/Makefile.in | 8 +- libraries/evas/src/examples/Makefile.am | 30 +- libraries/evas/src/examples/Makefile.in | 70 +- libraries/evas/src/lib/Evas.h | 433 +- libraries/evas/src/lib/Evas_GL.h | 52 +- libraries/evas/src/lib/Makefile.am | 9 +- libraries/evas/src/lib/Makefile.in | 139 +- libraries/evas/src/lib/cache/Makefile.in | 8 +- .../evas/src/lib/cache/evas_cache_engine_image.c | 4 + libraries/evas/src/lib/cache/evas_cache_image.c | 17 +- libraries/evas/src/lib/cache/evas_preload.c | 4 +- libraries/evas/src/lib/canvas/Makefile.in | 8 +- libraries/evas/src/lib/canvas/evas_callbacks.c | 274 +- libraries/evas/src/lib/canvas/evas_events.c | 520 +- libraries/evas/src/lib/canvas/evas_focus.c | 22 +- libraries/evas/src/lib/canvas/evas_gl.c | 27 + libraries/evas/src/lib/canvas/evas_main.c | 41 +- libraries/evas/src/lib/canvas/evas_map.c | 18 +- libraries/evas/src/lib/canvas/evas_name.c | 32 + libraries/evas/src/lib/canvas/evas_object_box.c | 3 +- libraries/evas/src/lib/canvas/evas_object_grid.c | 2 +- libraries/evas/src/lib/canvas/evas_object_image.c | 46 +- libraries/evas/src/lib/canvas/evas_object_inform.c | 16 +- .../evas/src/lib/canvas/evas_object_intercept.c | 112 +- libraries/evas/src/lib/canvas/evas_object_main.c | 112 +- libraries/evas/src/lib/canvas/evas_object_smart.c | 31 + libraries/evas/src/lib/canvas/evas_object_table.c | 2 +- libraries/evas/src/lib/canvas/evas_object_text.c | 4 +- .../evas/src/lib/canvas/evas_object_textblock.c | 909 +++- libraries/evas/src/lib/canvas/evas_render.c | 31 +- libraries/evas/src/lib/cserve/Makefile.in | 8 +- libraries/evas/src/lib/engines/Makefile.in | 8 +- libraries/evas/src/lib/engines/common/Makefile.in | 8 +- .../src/lib/engines/common/evas_convert_rgb_16.c | 84 +- .../src/lib/engines/common/evas_convert_rgb_32.c | 347 +- .../evas/src/lib/engines/common/evas_convert_yuv.c | 4 +- libraries/evas/src/lib/engines/common/evas_cpu.c | 4 + .../evas/src/lib/engines/common/evas_draw_main.c | 68 +- .../evas/src/lib/engines/common/evas_font_draw.c | 135 +- .../evas/src/lib/engines/common/evas_font_main.c | 4 +- .../evas/src/lib/engines/common/evas_image_data.c | 4 + .../evas/src/lib/engines/common/evas_image_load.c | 4 + .../evas/src/lib/engines/common/evas_image_main.c | 56 +- .../src/lib/engines/common/evas_image_scalecache.c | 2 - .../evas/src/lib/engines/common/evas_line_main.c | 475 +- .../src/lib/engines/common/evas_op_add/Makefile.in | 8 +- .../lib/engines/common/evas_op_blend/Makefile.in | 8 +- .../common/evas_op_blend/op_blend_color_sse3.c | 3 +- .../evas_op_blend/op_blend_mask_color_sse3.c | 3 +- .../common/evas_op_blend/op_blend_pixel_sse3.c | 1 - .../lib/engines/common/evas_op_copy/Makefile.in | 8 +- .../lib/engines/common/evas_op_mask/Makefile.in | 8 +- .../src/lib/engines/common/evas_op_mul/Makefile.in | 8 +- .../src/lib/engines/common/evas_op_sub/Makefile.in | 8 +- .../src/lib/engines/common/evas_polygon_main.c | 40 +- .../src/lib/engines/common/evas_rectangle_main.c | 34 +- .../src/lib/engines/common/evas_scale_sample.c | 113 +- libraries/evas/src/lib/engines/common/evas_tiler.c | 4 + .../lib/engines/common/language/evas_bidi_utils.c | 4 + .../engines/common/language/evas_language_utils.c | 6 + .../evas/src/lib/engines/common_16/Makefile.in | 8 +- .../evas/src/lib/engines/common_8/Makefile.in | 8 +- libraries/evas/src/lib/file/Makefile.in | 8 +- libraries/evas/src/lib/file/evas_module.c | 4 +- libraries/evas/src/lib/file/evas_path.c | 2 +- libraries/evas/src/lib/include/Makefile.in | 8 +- libraries/evas/src/lib/include/evas_common.h | 64 +- libraries/evas/src/lib/include/evas_private.h | 18 +- libraries/evas/src/modules/Makefile.in | 8 +- libraries/evas/src/modules/engines/Makefile.am | 7 +- libraries/evas/src/modules/engines/Makefile.in | 15 +- .../evas/src/modules/engines/buffer/Makefile.in | 8 +- .../evas/src/modules/engines/direct3d/Makefile.in | 8 +- .../evas/src/modules/engines/directfb/Makefile.in | 8 +- libraries/evas/src/modules/engines/fb/Makefile.in | 8 +- .../evas/src/modules/engines/gl_cocoa/Makefile.in | 8 +- .../evas/src/modules/engines/gl_common/Makefile.in | 8 +- .../src/modules/engines/gl_common/evas_gl_common.h | 2 +- .../modules/engines/gl_common/evas_gl_texture.c | 7 +- .../evas/src/modules/engines/gl_sdl/Makefile.in | 8 +- .../evas/src/modules/engines/gl_x11/Makefile.in | 8 +- .../evas/src/modules/engines/gl_x11/evas_engine.c | 104 +- .../evas/src/modules/engines/gl_x11/evas_x_main.c | 2 +- .../evas/src/modules/engines/psl1ght/Makefile.in | 8 +- .../src/modules/engines/software_16/Makefile.in | 8 +- .../modules/engines/software_16_ddraw/Makefile.in | 8 +- .../modules/engines/software_16_sdl/Makefile.in | 8 +- .../modules/engines/software_16_wince/Makefile.in | 8 +- .../modules/engines/software_16_x11/Makefile.in | 8 +- .../src/modules/engines/software_8/Makefile.in | 8 +- .../src/modules/engines/software_8_x11/Makefile.in | 8 +- .../src/modules/engines/software_ddraw/Makefile.in | 8 +- .../src/modules/engines/software_gdi/Makefile.in | 8 +- .../modules/engines/software_generic/Makefile.in | 8 +- .../modules/engines/software_generic/evas_engine.c | 1612 ++++++- .../src/modules/engines/software_sdl/Makefile.in | 8 +- .../src/modules/engines/software_x11/Makefile.in | 8 +- .../engines/software_x11/evas_xlib_outbuf.c | 2 + .../engines/wayland_egl/Evas_Engine_Wayland_Egl.h | 42 + .../src/modules/engines/wayland_egl/Makefile.am | 47 + .../src/modules/engines/wayland_egl/Makefile.in | 816 ++++ .../src/modules/engines/wayland_egl/evas_engine.c | 3174 +++++++++++++ .../src/modules/engines/wayland_egl/evas_engine.h | 82 + .../src/modules/engines/wayland_egl/evas_wl_main.c | 323 ++ .../engines/wayland_shm/Evas_Engine_Wayland_Shm.h | 20 + .../src/modules/engines/wayland_shm/Makefile.am | 45 + .../src/modules/engines/wayland_shm/Makefile.in | 816 ++++ .../src/modules/engines/wayland_shm/evas_engine.c | 370 ++ .../src/modules/engines/wayland_shm/evas_engine.h | 60 + .../src/modules/engines/wayland_shm/evas_outbuf.c | 100 + libraries/evas/src/modules/loaders/Makefile.in | 10 +- libraries/evas/src/modules/loaders/TODO | 5 - libraries/evas/src/modules/loaders/bmp/Makefile.in | 8 +- .../src/modules/loaders/bmp/evas_image_load_bmp.c | 485 +- libraries/evas/src/modules/loaders/edb/Makefile.in | 8 +- .../src/modules/loaders/edb/evas_image_load_edb.c | 3 +- libraries/evas/src/modules/loaders/eet/Makefile.in | 8 +- .../src/modules/loaders/eet/evas_image_load_eet.c | 3 +- .../evas/src/modules/loaders/generic/Makefile.in | 8 +- .../loaders/generic/evas_image_load_generic.c | 8 +- libraries/evas/src/modules/loaders/gif/Makefile.in | 8 +- .../src/modules/loaders/gif/evas_image_load_gif.c | 3 +- libraries/evas/src/modules/loaders/ico/Makefile.in | 8 +- .../src/modules/loaders/ico/evas_image_load_ico.c | 216 +- .../evas/src/modules/loaders/jpeg/Makefile.in | 8 +- .../modules/loaders/jpeg/evas_image_load_jpeg.c | 3 +- .../evas/src/modules/loaders/pmaps/Makefile.in | 8 +- .../modules/loaders/pmaps/evas_image_load_pmaps.c | 54 +- libraries/evas/src/modules/loaders/png/Makefile.in | 8 +- .../src/modules/loaders/png/evas_image_load_png.c | 3 +- libraries/evas/src/modules/loaders/psd/Makefile.in | 8 +- .../src/modules/loaders/psd/evas_image_load_psd.c | 264 +- libraries/evas/src/modules/loaders/svg/Makefile.in | 8 +- .../src/modules/loaders/svg/evas_image_load_svg.c | 3 +- libraries/evas/src/modules/loaders/tga/Makefile.in | 8 +- .../src/modules/loaders/tga/evas_image_load_tga.c | 3 +- .../evas/src/modules/loaders/tiff/Makefile.in | 8 +- .../modules/loaders/tiff/evas_image_load_tiff.c | 3 +- .../evas/src/modules/loaders/wbmp/Makefile.in | 8 +- .../modules/loaders/wbmp/evas_image_load_wbmp.c | 113 +- libraries/evas/src/modules/loaders/xpm/Makefile.in | 8 +- .../src/modules/loaders/xpm/evas_image_load_xpm.c | 162 +- libraries/evas/src/modules/savers/Makefile.in | 8 +- libraries/evas/src/modules/savers/edb/Makefile.in | 8 +- libraries/evas/src/modules/savers/eet/Makefile.in | 8 +- libraries/evas/src/modules/savers/jpeg/Makefile.in | 8 +- libraries/evas/src/modules/savers/png/Makefile.in | 8 +- libraries/evas/src/modules/savers/tiff/Makefile.in | 8 +- libraries/evas/src/static_deps/Makefile.in | 8 +- .../evas/src/static_deps/liblinebreak/AUTHORS | 2 + .../evas/src/static_deps/liblinebreak/Makefile.am | 6 +- .../evas/src/static_deps/liblinebreak/Makefile.in | 17 +- .../evas/src/static_deps/liblinebreak/wordbreak.c | 435 ++ .../evas/src/static_deps/liblinebreak/wordbreak.h | 72 + .../src/static_deps/liblinebreak/wordbreakdata.x | 858 ++++ .../src/static_deps/liblinebreak/wordbreakdef.h | 80 + libraries/evas/src/tests/Makefile.in | 8 +- libraries/evas/src/tests/evas_test_callbacks.c | 6 +- libraries/evas/src/tests/evas_test_textblock.c | 319 +- 603 files changed, 60188 insertions(+), 14782 deletions(-) delete mode 100644 libraries/ecore/TODO create mode 100644 libraries/ecore/ecore-wayland.pc.in delete mode 100644 libraries/ecore/sha1-for-source.txt create mode 100644 libraries/ecore/src/lib/ecore/ecore_alloc.c create mode 100644 libraries/ecore/src/lib/ecore_con/ecore_con_socks.c create mode 100644 libraries/ecore/src/lib/ecore_evas/ecore_evas_extn.c create mode 100644 libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c create mode 100644 libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c create mode 100644 libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h create mode 100644 libraries/ecore/src/lib/ecore_wayland/Makefile.am create mode 100644 libraries/ecore/src/lib/ecore_wayland/Makefile.in create mode 100644 libraries/ecore/src/lib/ecore_wayland/ecore_wl.c create mode 100644 libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h create mode 100644 libraries/ecore/src/modules/immodules/scim/Makefile.am create mode 100644 libraries/ecore/src/modules/immodules/scim/Makefile.in create mode 100644 libraries/ecore/src/modules/immodules/scim/scim_imcontext.cpp create mode 100644 libraries/ecore/src/modules/immodules/scim/scim_imcontext.h create mode 100644 libraries/ecore/src/modules/immodules/scim/scim_module.cpp delete mode 100644 libraries/edje/sha1-for-source.txt create mode 100644 libraries/edje/src/examples/Vera.ttf create mode 100644 libraries/edje/src/examples/multisense.edc delete mode 100644 libraries/eet/sha1-for-source.txt create mode 100644 libraries/eet/src/lib/eet_alloc.c delete mode 100644 libraries/eina/sha1-for-source.txt create mode 100644 libraries/eina/src/include/eina_inarray.h create mode 100644 libraries/eina/src/include/eina_inline_clist.x create mode 100644 libraries/eina/src/include/eina_inline_value.x create mode 100644 libraries/eina/src/include/eina_value.h create mode 100644 libraries/eina/src/lib/eina_inarray.c create mode 100644 libraries/eina/src/tests/cxx_compile_test.cxx create mode 100644 libraries/eina/src/tests/eina_test_inarray.c create mode 100644 libraries/eina/src/tests/eina_test_value.c mode change 100644 => 100755 libraries/embryo/doc/img/e.png mode change 100644 => 100755 libraries/embryo/doc/img/e_big.png mode change 100644 => 100755 libraries/embryo/doc/img/edoxy.css mode change 100644 => 100755 libraries/embryo/doc/img/foot_bg.png mode change 100644 => 100755 libraries/embryo/doc/img/head_bg.png mode change 100644 => 100755 libraries/embryo/doc/img/menu_bg.png mode change 100644 => 100755 libraries/embryo/doc/img/menu_bg_current.png mode change 100644 => 100755 libraries/embryo/doc/img/menu_bg_hover.png mode change 100644 => 100755 libraries/embryo/doc/img/menu_bg_last.png mode change 100644 => 100755 libraries/embryo/doc/img/menu_bg_unsel.png delete mode 100644 libraries/embryo/sha1-for-source.txt delete mode 100755 libraries/evas/compile mode change 100644 => 100755 libraries/evas/doc/img/e_big.png mode change 100644 => 100755 libraries/evas/doc/img/foot_bg.png mode change 100644 => 100755 libraries/evas/doc/img/head_bg.png mode change 100644 => 100755 libraries/evas/doc/img/menu_bg.png mode change 100644 => 100755 libraries/evas/doc/img/menu_bg_current.png mode change 100644 => 100755 libraries/evas/doc/img/menu_bg_hover.png mode change 100644 => 100755 libraries/evas/doc/img/menu_bg_last.png mode change 100644 => 100755 libraries/evas/doc/img/menu_bg_unsel.png create mode 100644 libraries/evas/evas-wayland-egl.pc.in create mode 100644 libraries/evas/evas-wayland-shm.pc.in delete mode 100644 libraries/evas/sha1-for-source.txt create mode 100644 libraries/evas/src/modules/engines/wayland_egl/Evas_Engine_Wayland_Egl.h create mode 100644 libraries/evas/src/modules/engines/wayland_egl/Makefile.am create mode 100644 libraries/evas/src/modules/engines/wayland_egl/Makefile.in create mode 100644 libraries/evas/src/modules/engines/wayland_egl/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/wayland_egl/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/wayland_egl/evas_wl_main.c create mode 100644 libraries/evas/src/modules/engines/wayland_shm/Evas_Engine_Wayland_Shm.h create mode 100644 libraries/evas/src/modules/engines/wayland_shm/Makefile.am create mode 100644 libraries/evas/src/modules/engines/wayland_shm/Makefile.in create mode 100644 libraries/evas/src/modules/engines/wayland_shm/evas_engine.c create mode 100644 libraries/evas/src/modules/engines/wayland_shm/evas_engine.h create mode 100644 libraries/evas/src/modules/engines/wayland_shm/evas_outbuf.c delete mode 100644 libraries/evas/src/modules/loaders/TODO create mode 100644 libraries/evas/src/static_deps/liblinebreak/wordbreak.c create mode 100644 libraries/evas/src/static_deps/liblinebreak/wordbreak.h create mode 100644 libraries/evas/src/static_deps/liblinebreak/wordbreakdata.x create mode 100644 libraries/evas/src/static_deps/liblinebreak/wordbreakdef.h (limited to 'libraries') diff --git a/libraries/ecore/AUTHORS b/libraries/ecore/AUTHORS index 16f95f0..8fc1f10 100644 --- a/libraries/ecore/AUTHORS +++ b/libraries/ecore/AUTHORS @@ -35,7 +35,7 @@ Nicolas Aguirre Brett Nash Mike Blumenkrantz Leif Middelschulte -Mike McCormack +Mike McCormack Sangho Park Jihoon Kim PnB @@ -47,3 +47,5 @@ Rafael Antognolli Kim Yunhan Youness Alaoui Bluezery +Doyoun Kang +Haifeng Deng diff --git a/libraries/ecore/ChangeLog b/libraries/ecore/ChangeLog index 410bffe..5c32d20 100644 --- a/libraries/ecore/ChangeLog +++ b/libraries/ecore/ChangeLog @@ -350,3 +350,118 @@ 2011-11-27 Vincent Torri * Fix and improve key management on Windows XP + +2011-11-29 Vincent Torri + + * Discard left Ctrl when AltGr is pressed (Windows XP) + * Fix the string value for the Delete key (Windows XP) + * Fix the key release values for non keystroke keys (Windows XP) + +2011-11-29 Mike McCormack + + * Allow quitting before entering the glib version of the main loop + +2011-12-02 Carsten Haitzler (The Rasterman) + + 1.1.0 release + +2011-12-02 Mike Blumenkrantz + + * Use mempools for allocations + +2011-12-02 Term + + * added ecore_x_randr_output_backlight_available() + +2011-12-03 Vincent Torri + + * Fix the modifiers value (Windows XP) + +2011-12-04 Mike Blumenkrantz + + * added ecore_timer_reset() + +2011-12-05 Mike Blumenkrantz + + * added ecore_con_socks api + +2011-12-07 Mike Blumenkrantz + + * Allow SSL certificates to be loaded for STARTTLS + * Added functions to set/get the hostname used for SSL certificate verification + * ecore_con_ssl_server_cafile_add() now accepts directories + +2011-12-10 Mike Blumenkrantz + + * Fix case where SSL certificates would not be used + * Added ECORE_CON_REMOTE_CORK for applying TCP_CORK to sends + +2011-12-12 Carsten Haitzler (The Rasterman) + + * Fix bug where an animator that just keeps adding another + animator keeps the animator handler in an infinite loop. Do + the same as timers and mark them as "just added" to skip in + this run of animators + +2011-12-13 Doyun Kang + + * Add ability to get resource id of last x error in ecore_x. + +2011-12-16 Carsten Haitzler (The Rasterman) + + * Clean up some ecore-evas-buffer code + * Add Ecore-evas extn (external) plug and socket canvas wrappers + allowing for any ecore-evas to contain an image object that is + a "socket" for other processes to plug into with "plugs" and + thus provide image content via a canvas remotely (from another + process) as well as the socket process passing in events to the + plug process to it can see key, mouse, multi etc. events. + + +2011-12-16 Mike Blumenkrantz + + * Fix possible 0 byte allocation in ecore-x + +2011-12-20 Carsten Haitzler (The Rasterman) + + * Fix probable leak for g_static_mutex's on some architectures + +2011-12-20 Jihoon Kim + + * Add XIM attribute support to Ecore_IMF + +2011-12-21 Tae-Hwan Kim (Bluezery) + + * Add proxy set and timeout set functions in ecore_con. + +2011-12-26 Tae-Hwan Kim (Bluezery) + + * Add proxy username/password set functions in ecore_con. + +2011-12-26 Christopher Michael (devilhorns) + + * Add Ecore_Wayland (backend to support Wayland). + * Add Shm and Egl engines for ecore_evas to draw in Wayland. + +2011-12-27 Carsten Haitzler (The Rasterman) + + * Fix mouse down grab counts going bad by missing events. + +2011-12-29 Carsten Haitzler (The Rasterman) + + * Fix massive post data probile in ecore-con that would cause + post data to be corrupted (as it was never copied into the + ecore con url struct) or could cause crashes if the memory + pointed to became invalid. + +2012-01-04 Carsten Haitzler (The Rasterman) + + * Add HEX, TERMINAL and PASSWORD layouts to ecore-imf + +2011-01-05 Jiyoun Park (Jypark) + + * Fix Ecore-evas extn (external) for multi client model. + "Socket" creates canvas and other process can show that canvas + using "Plug" image object. Before only one to one communication + is possible, but now many "plug"s can show socket's canvas. + diff --git a/libraries/ecore/Makefile.am b/libraries/ecore/Makefile.am index 3de7673..8a6ef9a 100644 --- a/libraries/ecore/Makefile.am +++ b/libraries/ecore/Makefile.am @@ -106,6 +106,7 @@ ecore-cocoa.pc.in \ ecore-psl1ght.pc.in \ ecore-input.pc.in \ ecore-wince.pc.in \ +ecore-wayland.pc.in \ ecore.spec.in \ ecore.spec \ m4/ac_abstract_socket.m4 \ @@ -190,6 +191,10 @@ if BUILD_ECORE_PSL1GHT pkgconfig_DATA += ecore-psl1ght.pc endif +if BUILD_ECORE_WAYLAND +pkgconfig_DATA += ecore-wayland.pc +endif + .PHONY: doc # Documentation diff --git a/libraries/ecore/Makefile.in b/libraries/ecore/Makefile.in index e78b5dc..7ae3118 100644 --- a/libraries/ecore/Makefile.in +++ b/libraries/ecore/Makefile.in @@ -64,6 +64,7 @@ host_triplet = @host@ @BUILD_ECORE_SDL_TRUE@am__append_17 = ecore-sdl.pc @BUILD_ECORE_COCOA_TRUE@am__append_18 = ecore-cocoa.pc @BUILD_ECORE_PSL1GHT_TRUE@am__append_19 = ecore-psl1ght.pc +@BUILD_ECORE_WAYLAND_TRUE@am__append_20 = ecore-wayland.pc subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ @@ -74,12 +75,12 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/ecore-imf.pc.in $(srcdir)/ecore-input-evas.pc.in \ $(srcdir)/ecore-input.pc.in $(srcdir)/ecore-ipc.pc.in \ $(srcdir)/ecore-psl1ght.pc.in $(srcdir)/ecore-sdl.pc.in \ - $(srcdir)/ecore-win32.pc.in $(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 TODO config.guess \ - config.rpath config.sub depcomp install-sh ltmain.sh missing \ - mkinstalldirs + $(srcdir)/ecore-wayland.pc.in $(srcdir)/ecore-win32.pc.in \ + $(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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ $(top_srcdir)/m4/ac_path_generic.m4 \ @@ -109,7 +110,8 @@ CONFIG_CLEAN_FILES = ecore-con.pc ecore-config.pc ecore-directfb.pc \ ecore-evas.pc ecore-fb.pc ecore-file.pc ecore-imf.pc \ ecore-imf-evas.pc ecore-ipc.pc ecore-x.pc ecore-input.pc \ ecore-input-evas.pc ecore-win32.pc ecore-sdl.pc ecore-cocoa.pc \ - ecore-psl1ght.pc ecore-wince.pc ecore.pc ecore.spec + ecore-psl1ght.pc ecore-wince.pc ecore-wayland.pc ecore.pc \ + ecore.spec CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -312,10 +314,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -334,6 +336,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -447,6 +453,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -459,6 +467,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -503,12 +513,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ @@ -567,6 +579,7 @@ ecore-cocoa.pc.in \ ecore-psl1ght.pc.in \ ecore-input.pc.in \ ecore-wince.pc.in \ +ecore-wayland.pc.in \ ecore.spec.in \ ecore.spec \ m4/ac_abstract_socket.m4 \ @@ -585,7 +598,8 @@ pkgconfig_DATA = ecore.pc $(am__append_3) $(am__append_4) \ $(am__append_8) $(am__append_9) $(am__append_10) \ $(am__append_11) $(am__append_12) $(am__append_13) \ $(am__append_14) $(am__append_15) $(am__append_16) \ - $(am__append_17) $(am__append_18) $(am__append_19) + $(am__append_17) $(am__append_18) $(am__append_19) \ + $(am__append_20) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -675,6 +689,8 @@ ecore-psl1ght.pc: $(top_builddir)/config.status $(srcdir)/ecore-psl1ght.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ ecore-wince.pc: $(top_builddir)/config.status $(srcdir)/ecore-wince.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ +ecore-wayland.pc: $(top_builddir)/config.status $(srcdir)/ecore-wayland.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ ecore.pc: $(top_builddir)/config.status $(srcdir)/ecore.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ ecore.spec: $(top_builddir)/config.status $(srcdir)/ecore.spec.in diff --git a/libraries/ecore/NEWS b/libraries/ecore/NEWS index 701eae6..f558bb4 100644 --- a/libraries/ecore/NEWS +++ b/libraries/ecore/NEWS @@ -1,3 +1,37 @@ +Ecore 1.2.0 + +Changes since Ecore 1.1.0: +-------------------------- + +Additions: + * ecore + - ecore_timer_reset() + * ecore_con + - ecore_con_socks api + - ecore_con_ssl_server_verify_name_set/get + - ecore_con_ssl_server_cafile_add() now accepts directories + - ECORE_CON_REMOTE_CORK + - ecore_con_url_proxy_set() + - ecore_con_url_timeout_set() + - ecore_con_url_proxy_username_set + - ecore_con_url_proxy_password_set() + * ecore_x: + - ecore_x_randr_output_backlight_available() + * 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). + +Improvements: + * ecore: + - most allocations moved to mempools + * ecore_con: + - certificates can now be added for STARTTTLS + * ecore_win32: + - fix modifiers value on Windows XP + + Ecore 1.1.0 Changes since Ecore 1.0.0: @@ -75,7 +109,7 @@ Fixes: * NULL pointer dereference in ecore_x selection notification code * sync GNUTLS thread activation with eina changes * ecore_ipc compilation on Windows - * fix Shift, Control and Alt keys detection on Windows + * fix Shift, Control, Alt and AltGr keys detection on Windows XP * "mouse-down inside and mouse-up outside" issue on Windows * ecore_x shadow tree search fixed to respect shape input of windows * fd handlers fixed when idler callbacks add jobs or events diff --git a/libraries/ecore/TODO b/libraries/ecore/TODO deleted file mode 100644 index 78c060b..0000000 --- a/libraries/ecore/TODO +++ /dev/null @@ -1,2 +0,0 @@ -* ecore_file - has fd inside. elm_quicklaunch fork fun kills it. store -pid with fd and detect change of pid and re-init then diff --git a/libraries/ecore/aclocal.m4 b/libraries/ecore/aclocal.m4 index 386d6ef..859816b 100644 --- a/libraries/ecore/aclocal.m4 +++ b/libraries/ecore/aclocal.m4 @@ -13,14 +13,13 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. 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 . # @@ -48,10 +47,7 @@ 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]) -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]) - +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -64,6 +60,7 @@ if test -n "$PKG_CONFIG"; then AC_MSG_RESULT([no]) PKG_CONFIG="" fi + fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -72,31 +69,34 @@ 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. # -# 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 +# +# 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 # -------------------------------------------------------------- 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_default([$2], [:]) + m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) + # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[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 +[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 fi[]dnl ])# _PKG_CONFIG @@ -138,17 +138,16 @@ 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 --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - m4_default([$4], [AC_MSG_ERROR( + ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -156,24 +155,25 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT])[]dnl - ]) +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( + ifelse([$4], , [AC_MSG_FAILURE(dnl [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 .])[]dnl - ]) +To get pkg-config, see .])], + [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - $3 + ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES diff --git a/libraries/ecore/autogen.sh b/libraries/ecore/autogen.sh index 2a59cac..81e1956 100755 --- a/libraries/ecore/autogen.sh +++ b/libraries/ecore/autogen.sh @@ -20,6 +20,7 @@ echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp +echo "OLD_CXXFLAGS=\"$CXXFLAGS\"" >> config.cache-env.tmp cmp config.cache-env.tmp config.cache-env >> /dev/null if [ $? -ne 0 ]; then diff --git a/libraries/ecore/config.h.in b/libraries/ecore/config.h.in index d4308f6..06c1d8e 100644 --- a/libraries/ecore/config.h.in +++ b/libraries/ecore/config.h.in @@ -90,6 +90,12 @@ /* Evas Software Xlib Engine Support */ #undef BUILD_ECORE_EVAS_SOFTWARE_XLIB +/* Support for Wayland Egl Engine in Ecore_Evas */ +#undef BUILD_ECORE_EVAS_WAYLAND_EGL + +/* Support for Wayland Shm Engine in Ecore_Evas */ +#undef BUILD_ECORE_EVAS_WAYLAND_SHM + /* Support for Win32 Engine in Ecore_Evas */ #undef BUILD_ECORE_EVAS_WIN32 @@ -108,6 +114,9 @@ /* Build Ecore_Imf_Evas Module */ #undef BUILD_ECORE_IMF_EVAS +/* Build Ecore_Imf_SCIM Module */ +#undef BUILD_ECORE_IMF_SCIM + /* Build Ecore_Imf_XIM Module */ #undef BUILD_ECORE_IMF_XIM @@ -126,6 +135,9 @@ /* Build Ecore_Sdl Module */ #undef BUILD_ECORE_SDL +/* Build Ecore_Wayland Module */ +#undef BUILD_ECORE_WAYLAND + /* Build Ecore_Win32 Module */ #undef BUILD_ECORE_WIN32 @@ -379,6 +391,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_TCP_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_IF_H + /* File monitoring with Windows notification */ #undef HAVE_NOTIFY_WIN32 diff --git a/libraries/ecore/configure b/libraries/ecore/configure index 6ac7715..2ea7dd2 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.67 for ecore 1.1.0. +# Generated by GNU Autoconf 2.65 for ecore 1.1.99.67344. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error 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=$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 + 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 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&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, old GNU/Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, 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.0' -PACKAGE_STRING='ecore 1.1.0' +PACKAGE_VERSION='1.1.99.67344' +PACKAGE_STRING='ecore 1.1.99.67344' PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net' PACKAGE_URL='' @@ -748,6 +748,8 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +requirements_ecore_wayland +requirements_ecore_imf_scim requirements_ecore_imf_xim requirements_ecore_wince requirements_ecore_win32 @@ -770,6 +772,14 @@ EFL_INSTALL_EXAMPLES_FALSE EFL_INSTALL_EXAMPLES_TRUE EFL_BUILD_EXAMPLES_FALSE EFL_BUILD_EXAMPLES_TRUE +WAYLAND_EGL_LIBS +WAYLAND_EGL_CFLAGS +ecore_wayland_libs +ecore_wayland_cflags +BUILD_ECORE_WAYLAND_FALSE +BUILD_ECORE_WAYLAND_TRUE +WAYLAND_LIBS +WAYLAND_CFLAGS XCB_X11_LIBS XCB_X11_CFLAGS ecore_evas_libs @@ -810,6 +820,12 @@ ecore_x_libs ecore_x_cflags BUILD_ECORE_X_FALSE BUILD_ECORE_X_TRUE +ecore_imf_scim_libs +ecore_imf_scim_cflags +BUILD_ECORE_IMF_SCIM_FALSE +BUILD_ECORE_IMF_SCIM_TRUE +SCIM_LIBS +SCIM_CFLAGS ecore_imf_xim_libs ecore_imf_xim_cflags BUILD_ECORE_IMF_XIM_FALSE @@ -1002,8 +1018,6 @@ EFL_ENABLE_TESTS_FALSE EFL_ENABLE_TESTS_TRUE CHECK_LIBS CHECK_CFLAGS -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH PKG_CONFIG HAVE_PO_FALSE HAVE_PO_TRUE @@ -1208,6 +1222,7 @@ enable_ecore_imf_evas enable_ecore_input enable_ecore_input_evas enable_ecore_imf_xim +enable_ecore_imf_scim enable_ecore_x enable_ecore_win32 enable_ecore_cocoa @@ -1236,6 +1251,9 @@ enable_ecore_evas_fb enable_ecore_evas_software_16_wince enable_ecore_evas_ews enable_ecore_evas_psl1ght +enable_ecore_wayland +enable_ecore_evas_wayland_shm +enable_ecore_evas_wayland_egl enable_build_examples enable_install_examples ' @@ -1249,8 +1267,6 @@ LIBS CPPFLAGS CPP PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR CHECK_CFLAGS CHECK_LIBS OBJC @@ -1318,10 +1334,16 @@ SSL_CFLAGS SSL_LIBS CARES_CFLAGS CARES_LIBS +SCIM_CFLAGS +SCIM_LIBS TSLIB_CFLAGS TSLIB_LIBS XCB_X11_CFLAGS -XCB_X11_LIBS' +XCB_X11_LIBS +WAYLAND_CFLAGS +WAYLAND_LIBS +WAYLAND_EGL_CFLAGS +WAYLAND_EGL_LIBS' # Initialize some variables set by options. @@ -1384,9 +1406,8 @@ do fi case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1431,7 +1452,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 @@ -1457,7 +1478,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 @@ -1661,7 +1682,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 @@ -1677,7 +1698,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 @@ -1707,8 +1728,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." ;; *=*) @@ -1716,7 +1737,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 ;; @@ -1734,13 +1755,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 @@ -1763,7 +1784,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' @@ -1777,8 +1798,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 @@ -1793,9 +1814,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. @@ -1834,11 +1855,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 @@ -1864,7 +1885,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.0 to adapt to many kinds of systems. +\`configure' configures ecore 1.1.99.67344 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1878,7 +1899,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 @@ -1938,7 +1959,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ecore 1.1.0:";; + short | recursive ) echo "Configuration of ecore 1.1.99.67344:";; esac cat <<\_ACEOF @@ -2042,6 +2063,7 @@ Optional Features: --enable-ecore-input-evas enable the ecore_input_evas module --enable-ecore-imf-xim enable the ecore_imf_xim module + --enable-ecore-imf-scim enable the ecore_imf_scim module --enable-ecore-x enable the ecore_x module --enable-ecore-win32 enable the ecore_win32 module --enable-ecore-cocoa enable the ecore_cocoa module @@ -2099,6 +2121,11 @@ Optional Features: support in the ecore_evas module. --enable-ecore-evas-psl1ght enable PSL1GHT support in the ecore_evas module. + --enable-ecore-wayland enable the ecore_wayland module + --enable-ecore-evas-wayland-shm + enable Wayland Shm support in the ecore_evas module. + --enable-ecore-evas-wayland-egl + enable Wayland Egl support in the ecore_evas module. --enable-build-examples enable building examples [default=disabled] --enable-install-examples enable installing example source files @@ -2138,10 +2165,6 @@ Some influential environment variables: you have headers in a nonstandard directory CPP 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 CHECK_CFLAGS C compiler flags for CHECK, overriding pkg-config CHECK_LIBS linker flags for CHECK, overriding pkg-config @@ -2246,6 +2269,8 @@ Some influential environment variables: CARES_CFLAGS C compiler flags for CARES, overriding pkg-config CARES_LIBS linker flags for CARES, overriding pkg-config + SCIM_CFLAGS C compiler flags for SCIM, overriding pkg-config + SCIM_LIBS linker flags for SCIM, overriding pkg-config TSLIB_CFLAGS C compiler flags for TSLIB, overriding pkg-config TSLIB_LIBS linker flags for TSLIB, overriding pkg-config @@ -2253,6 +2278,14 @@ Some influential environment variables: C compiler flags for XCB_X11, overriding pkg-config XCB_X11_LIBS linker flags for XCB_X11, overriding pkg-config + WAYLAND_CFLAGS + C compiler flags for WAYLAND, overriding pkg-config + WAYLAND_LIBS + linker flags for WAYLAND, overriding pkg-config + WAYLAND_EGL_CFLAGS + C compiler flags for WAYLAND_EGL, overriding pkg-config + WAYLAND_EGL_LIBS + linker flags for WAYLAND_EGL, 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. @@ -2320,10 +2353,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ecore configure 1.1.0 -generated by GNU Autoconf 2.67 +ecore configure 1.1.99.67344 +generated by GNU Autoconf 2.65 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -2393,7 +2426,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; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -2417,10 +2450,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2456,7 +2489,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2479,15 +2512,17 @@ $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;} -( $as_echo "## -------------------------------------------------------- ## +( cat <<\_ASBOX +## -------------------------------------------------------- ## ## 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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2551,7 +2586,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2627,7 +2662,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2686,18 +2721,15 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_func -# 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 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_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 "$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 @@ -2706,12 +2738,8 @@ $4 int main () { -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif +#ifndef $2 + (void) $2; #endif ; @@ -2829,7 +2857,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; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : @@ -3124,7 +3152,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -3172,8 +3200,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.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +It was created by ecore $as_me 1.1.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -3283,9 +3311,11 @@ trap 'exit_status=$? { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -3319,9 +3349,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do @@ -3334,9 +3366,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + cat <<\_ASBOX +## ------------------- ## ## File substitutions. ## -## ------------------- ##" +## ------------------- ## +_ASBOX echo for ac_var in $ac_subst_files do @@ -3350,9 +3384,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo cat confdefs.h echo @@ -3407,12 +3443,7 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # 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 + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -3427,11 +3458,7 @@ 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" \ - || { { $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 ; } + . "$ac_site_file" fi done @@ -3508,7 +3535,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. ## @@ -3534,22 +3561,16 @@ am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - 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 + 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 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, @@ -3665,11 +3686,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 @@ -3691,7 +3712,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 @@ -3701,7 +3722,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 @@ -3939,7 +3960,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 eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3947,7 +3968,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;; @@ -3981,7 +4002,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 @@ -3997,7 +4018,7 @@ fi # Define the identity of the package. PACKAGE='ecore' - VERSION='1.1.0' + VERSION='1.1.99.67344' cat >>confdefs.h <<_ACEOF @@ -4412,8 +4433,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 @@ -4527,8 +4548,9 @@ 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 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +{ as_fn_set_status 77 +as_fn_error "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; } @@ -4570,8 +4592,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 @@ -4628,9 +4650,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 @@ -4681,8 +4703,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 @@ -5072,7 +5094,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5088,11 +5110,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -5131,7 +5153,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5147,18 +5169,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f 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 @@ -5219,7 +5241,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 @@ -5285,7 +5307,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 @@ -5417,7 +5439,8 @@ 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 " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -5492,7 +5515,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; } @@ -5503,16 +5526,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='-' @@ -5537,7 +5560,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 @@ -5545,7 +5568,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='-' @@ -5946,7 +5969,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 @@ -6025,7 +6048,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 @@ -6141,7 +6164,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 : @@ -6343,13 +6366,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:6346: $ac_compile\"" >&5) + (eval echo "\"\$as_me:6369: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:6349: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:6372: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:6352: output\"" >&5) + (eval echo "\"\$as_me:6375: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -7551,7 +7574,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7554 "configure"' > conftest.$ac_ext + echo '#line 7577 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8811,11 +8834,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:8814: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8837: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8818: \$? = $ac_status" >&5 + echo "$as_me:8841: \$? = $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. @@ -9150,11 +9173,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:9153: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9176: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9157: \$? = $ac_status" >&5 + echo "$as_me:9180: \$? = $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. @@ -9255,11 +9278,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:9258: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9281: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9262: \$? = $ac_status" >&5 + echo "$as_me:9285: \$? = $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 @@ -9310,11 +9333,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:9313: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9336: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9317: \$? = $ac_status" >&5 + echo "$as_me:9340: \$? = $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 @@ -11694,7 +11717,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11697 "configure" +#line 11720 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11790,7 +11813,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11793 "configure" +#line 11816 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12034,15 +12057,15 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define VERS_MIC 0 +#define VERS_MIC 99 _ACEOF cat >>confdefs.h <<_ACEOF -#define VERS_REV 0 +#define VERS_REV 67344 _ACEOF -version_info="2:0:1" +version_info="2:99:1" release_info="" @@ -12466,7 +12489,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 : @@ -13113,7 +13136,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 eval "test \"\${$gt_func_gnugettext_libc+set}\"" = set; then : +if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13784,7 +13807,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 eval "test \"\${$gt_func_gnugettext_libintl+set}\"" = set; then : +if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -13993,7 +14016,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 @@ -14042,6 +14065,7 @@ want_ecore_psl1ght="no" want_ecore_fb="no" want_ecore_directfb="no" want_ecore_wince="no" +want_ecore_wayland="no" # ecore_x options (both xlib and xcb) want_ecore_x_composite="yes" @@ -14082,9 +14106,12 @@ 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_wayland_shm="no" +want_ecore_evas_wayland_egl="no" # ecore_imf modules want_ecore_imf_xim="no" +want_ecore_imf_scim="no" case "$host_os" in mingw32ce* | cegcc*) @@ -14133,6 +14160,7 @@ case "$host_os" in want_ecore_fb="yes" want_ecore_imf="yes" want_ecore_x="yes" + want_ecore_wayland="yes" want_ecore_evas_software_x11="yes" want_ecore_evas_opengl_x11="yes" want_ecore_evas_software_16_x11="yes" @@ -14143,7 +14171,10 @@ case "$host_os" in want_ecore_evas_gl_cocoa="no" want_ecore_evas_directfb="yes" want_ecore_evas_fb="yes" + want_ecore_evas_wayland_shm="yes" + want_ecore_evas_wayland_egl="yes" want_ecore_imf_xim="yes" + want_ecore_imf_scim="yes" ;; esac @@ -14171,6 +14202,8 @@ requirements_ecore_x="" requirements_ecore_win32="" requirements_ecore_wince="" 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 : @@ -14257,7 +14290,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) @@ -14335,10 +14368,6 @@ fi - - - - 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. @@ -14451,6 +14480,7 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } PKG_CONFIG="" fi + fi @@ -14482,10 +14512,11 @@ 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" && \ +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=$? @@ -14495,13 +14526,15 @@ if test -n "$CHECK_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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" && \ +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=$? @@ -14511,15 +14544,14 @@ if test -n "$CHECK_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -14527,17 +14559,17 @@ 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` + CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "check >= 0.9.5"` else - CHECK_PKG_ERRORS=`$PKG_CONFIG --print-errors "check >= 0.9.5" 2>&1` + 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 - _efl_enable_tests="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&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 @@ -15891,7 +15923,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -15907,11 +15939,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -15950,7 +15982,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -15966,11 +15998,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else @@ -16199,7 +16231,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 : @@ -17740,11 +17772,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:17743: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17775: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17747: \$? = $ac_status" >&5 + echo "$as_me:17779: \$? = $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. @@ -17839,11 +17871,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:17842: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17874: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17846: \$? = $ac_status" >&5 + echo "$as_me:17878: \$? = $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 @@ -17891,11 +17923,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:17894: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17926: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17898: \$? = $ac_status" >&5 + echo "$as_me:17930: \$? = $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 @@ -19139,8 +19171,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 @@ -19766,10 +19798,6 @@ 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. @@ -19882,6 +19910,7 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } PKG_CONFIG="" fi + fi # Check whether pkg-config supports Requires.private @@ -19906,7 +19935,7 @@ fi done -want_ecore_timer_dump="yes" +want_ecore_timer_dump="no" # Check whether --enable-ecore-timer-dump was given. if test "${enable_ecore_timer_dump+set}" = set; then : @@ -19931,10 +19960,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVIL" >&5 $as_echo_n "checking for EVIL... " >&6; } -if test -n "$EVIL_CFLAGS"; then - pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_CFLAGS"; then + pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" + else + 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=$? @@ -19944,13 +19974,15 @@ if test -n "$EVIL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EVIL_LIBS"; then - pkg_cv_EVIL_LIBS="$EVIL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_LIBS"; then + pkg_cv_EVIL_LIBS="$EVIL_LIBS" + else + 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=$? @@ -19960,15 +19992,14 @@ if test -n "$EVIL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -19976,14 +20007,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evil >= 1.0.0"` else - EVIL_PKG_ERRORS=`$PKG_CONFIG --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evil >= 1.0.0"` 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 @@ -19992,13 +20023,12 @@ 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. @@ -20007,13 +20037,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 @@ -20061,10 +20091,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ESCAPE" >&5 $as_echo_n "checking for ESCAPE... " >&6; } -if test -n "$ESCAPE_CFLAGS"; then - pkg_cv_ESCAPE_CFLAGS="$ESCAPE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$ESCAPE_CFLAGS"; then + pkg_cv_ESCAPE_CFLAGS="$ESCAPE_CFLAGS" + else + 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=$? @@ -20074,13 +20105,15 @@ if test -n "$ESCAPE_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$ESCAPE_LIBS"; then - pkg_cv_ESCAPE_LIBS="$ESCAPE_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$ESCAPE_LIBS"; then + pkg_cv_ESCAPE_LIBS="$ESCAPE_LIBS" + else + 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=$? @@ -20090,15 +20123,14 @@ if test -n "$ESCAPE_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -20106,14 +20138,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - ESCAPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "escape" 2>&1` + ESCAPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "escape"` else - ESCAPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "escape" 2>&1` + ESCAPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "escape"` 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 @@ -20122,13 +20154,12 @@ 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. @@ -20137,13 +20168,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" @@ -20400,10 +20431,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EINA" >&5 $as_echo_n "checking for EINA... " >&6; } -if test -n "$EINA_CFLAGS"; then - pkg_cv_EINA_CFLAGS="$EINA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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 ac_status=$? @@ -20413,13 +20445,15 @@ if test -n "$EINA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EINA_LIBS"; then - pkg_cv_EINA_LIBS="$EINA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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 ac_status=$? @@ -20429,15 +20463,14 @@ if test -n "$EINA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -20445,14 +20478,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eina >= 1.1.0" 2>&1` + EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eina >= 1.1.0"` else - EINA_PKG_ERRORS=`$PKG_CONFIG --print-errors "eina >= 1.1.0" 2>&1` + EINA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eina >= 1.1.0"` 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.1.0) were not met: $EINA_PKG_ERRORS @@ -20461,13 +20494,12 @@ 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. @@ -20476,33 +20508,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.0 eina >= 1.1.0 ${requirements_ecore_config}" -requirements_ecore_directfb="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_directfb}" -requirements_ecore_evas="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_evas}" -requirements_ecore_fb="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_fb}" -requirements_ecore_file="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_file}" -requirements_ecore_imf="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_imf}" -requirements_ecore_imf_evas="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_imf_evas}" -requirements_ecore_input="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_input}" -requirements_ecore_input_evas="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_input_evas}" -requirements_ecore_ipc="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_ipc}" -requirements_ecore_cocoa="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_cocoa}" -requirements_ecore_sdl="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_sdl}" -requirements_ecore_psl1ght="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_sdl}" -requirements_ecore_win32="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_win32}" -requirements_ecore_wince="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_wince}" -requirements_ecore_x="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_x}" +#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}" # glib support (main loop integration) @@ -20518,10 +20550,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 $as_echo_n "checking for GLIB... " >&6; } -if test -n "$GLIB_CFLAGS"; then - pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GLIB_CFLAGS"; then + pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" + else + 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=$? @@ -20531,13 +20564,15 @@ if test -n "$GLIB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$GLIB_LIBS"; then - pkg_cv_GLIB_LIBS="$GLIB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GLIB_LIBS"; then + pkg_cv_GLIB_LIBS="$GLIB_LIBS" + else + 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=$? @@ -20547,15 +20582,14 @@ if test -n "$GLIB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -20563,17 +20597,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0" 2>&1` + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0"` else - GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0" 2>&1` + GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 - have_glib="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_glib="no" +elif test $pkg_failed = untried; then have_glib="no" else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS @@ -20586,7 +20620,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 @@ -20603,10 +20637,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5 $as_echo_n "checking for SDL... " >&6; } -if test -n "$SDL_CFLAGS"; then - pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_CFLAGS"; then + pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" + else + 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=$? @@ -20616,13 +20651,15 @@ if test -n "$SDL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$SDL_LIBS"; then - pkg_cv_SDL_LIBS="$SDL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_LIBS"; then + pkg_cv_SDL_LIBS="$SDL_LIBS" + else + 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=$? @@ -20632,15 +20669,14 @@ if test -n "$SDL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -20648,17 +20684,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sdl >= 1.2.0"` else - SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sdl >= 1.2.0"` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 - have_sdl="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_sdl="no" +elif test $pkg_failed = untried; then have_sdl="no" else SDL_CFLAGS=$pkg_cv_SDL_CFLAGS @@ -20752,10 +20788,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRECTFB" >&5 $as_echo_n "checking for DIRECTFB... " >&6; } -if test -n "$DIRECTFB_CFLAGS"; then - pkg_cv_DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$DIRECTFB_CFLAGS"; then + pkg_cv_DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS" + else + 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=$? @@ -20765,13 +20802,15 @@ if test -n "$DIRECTFB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$DIRECTFB_LIBS"; then - pkg_cv_DIRECTFB_LIBS="$DIRECTFB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$DIRECTFB_LIBS"; then + pkg_cv_DIRECTFB_LIBS="$DIRECTFB_LIBS" + else + 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=$? @@ -20781,15 +20820,14 @@ if test -n "$DIRECTFB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -20797,17 +20835,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "directfb >= 0.9.16" 2>&1` + DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "directfb >= 0.9.16"` else - DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --print-errors "directfb >= 0.9.16" 2>&1` + DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "directfb >= 0.9.16"` fi # Put the nasty error message in config.log where it belongs echo "$DIRECTFB_PKG_ERRORS" >&5 - have_directfb="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_directfb="no" +elif test $pkg_failed = untried; then have_directfb="no" else DIRECTFB_CFLAGS=$pkg_cv_DIRECTFB_CFLAGS @@ -20957,7 +20995,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 @@ -21121,10 +21159,11 @@ 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 "$ECORE_XCB_CFLAGS"; then - pkg_cv_ECORE_XCB_CFLAGS="$ECORE_XCB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -21134,13 +21173,15 @@ if test -n "$ECORE_XCB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -21150,15 +21191,14 @@ if test -n "$ECORE_XCB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21166,23 +21206,26 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - 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` + 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"` else - 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` + 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"` 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 "$ECORE_XCB_CFLAGS"; then - pkg_cv_ECORE_XCB_CFLAGS="$ECORE_XCB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -21192,13 +21235,15 @@ if test -n "$ECORE_XCB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -21208,15 +21253,14 @@ if test -n "$ECORE_XCB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21224,17 +21268,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - 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` + 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"` else - ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms" 2>&1` + ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms"` fi # Put the nasty error message in config.log where it belongs echo "$ECORE_XCB_PKG_ERRORS" >&5 - have_ecore_x_xcb="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb="no" else ECORE_XCB_CFLAGS=$pkg_cv_ECORE_XCB_CFLAGS @@ -21249,18 +21293,17 @@ $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 "$ECORE_XCB_CFLAGS"; then - pkg_cv_ECORE_XCB_CFLAGS="$ECORE_XCB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -21270,13 +21313,15 @@ if test -n "$ECORE_XCB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -21286,15 +21331,14 @@ if test -n "$ECORE_XCB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21302,17 +21346,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - 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` + 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"` else - ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms" 2>&1` + ECORE_XCB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11-xcb xcb xcb-event xcb-shm xcb-icccm xcb-image xcb-keysyms"` fi # Put the nasty error message in config.log where it belongs echo "$ECORE_XCB_PKG_ERRORS" >&5 - have_ecore_x_xcb="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb="no" else ECORE_XCB_CFLAGS=$pkg_cv_ECORE_XCB_CFLAGS @@ -21343,10 +21387,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIXMAN" >&5 $as_echo_n "checking for PIXMAN... " >&6; } -if test -n "$PIXMAN_CFLAGS"; then - pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PIXMAN_CFLAGS"; then + pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS" + else + 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=$? @@ -21356,13 +21401,15 @@ if test -n "$PIXMAN_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$PIXMAN_LIBS"; then - pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PIXMAN_LIBS"; then + pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS" + else + 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=$? @@ -21372,15 +21419,14 @@ if test -n "$PIXMAN_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21388,24 +21434,24 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pixman-1" 2>&1` + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pixman-1"` else - PIXMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors "pixman-1" 2>&1` + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pixman-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 @@ -21428,10 +21474,11 @@ 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 "$XCB_COMPOSITE_CFLAGS"; then - pkg_cv_XCB_COMPOSITE_CFLAGS="$XCB_COMPOSITE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -21441,13 +21488,15 @@ if test -n "$XCB_COMPOSITE_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -21457,15 +21506,14 @@ if test -n "$XCB_COMPOSITE_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21473,17 +21521,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_COMPOSITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-composite" 2>&1` + XCB_COMPOSITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-composite"` else - XCB_COMPOSITE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-composite" 2>&1` + XCB_COMPOSITE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-composite"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_COMPOSITE_PKG_ERRORS" >&5 - have_ecore_x_xcb_composite="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_composite="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_composite="no" else XCB_COMPOSITE_CFLAGS=$pkg_cv_XCB_COMPOSITE_CFLAGS @@ -21508,10 +21556,11 @@ 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 "$XCB_DAMAGE_CFLAGS"; then - pkg_cv_XCB_DAMAGE_CFLAGS="$XCB_DAMAGE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -21521,13 +21570,15 @@ if test -n "$XCB_DAMAGE_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -21537,15 +21588,14 @@ if test -n "$XCB_DAMAGE_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21553,17 +21603,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_DAMAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-damage" 2>&1` + XCB_DAMAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-damage"` else - XCB_DAMAGE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-damage" 2>&1` + XCB_DAMAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-damage"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_DAMAGE_PKG_ERRORS" >&5 - have_ecore_x_xcb_damage="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_damage="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_damage="no" else XCB_DAMAGE_CFLAGS=$pkg_cv_XCB_DAMAGE_CFLAGS @@ -21588,10 +21638,11 @@ 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 "$XCB_DPMS_CFLAGS"; then - pkg_cv_XCB_DPMS_CFLAGS="$XCB_DPMS_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -21601,13 +21652,15 @@ if test -n "$XCB_DPMS_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -21617,15 +21670,14 @@ if test -n "$XCB_DPMS_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21633,17 +21685,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_DPMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-dpms" 2>&1` + XCB_DPMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-dpms"` else - XCB_DPMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-dpms" 2>&1` + XCB_DPMS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-dpms"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_DPMS_PKG_ERRORS" >&5 - have_ecore_x_xcb_dpms="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_dpms="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_dpms="no" else XCB_DPMS_CFLAGS=$pkg_cv_XCB_DPMS_CFLAGS @@ -21668,10 +21720,11 @@ 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 "$XCB_RANDR_CFLAGS"; then - pkg_cv_XCB_RANDR_CFLAGS="$XCB_RANDR_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -21681,13 +21734,15 @@ if test -n "$XCB_RANDR_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -21697,15 +21752,14 @@ if test -n "$XCB_RANDR_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21713,17 +21767,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_RANDR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-randr" 2>&1` + XCB_RANDR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-randr"` else - XCB_RANDR_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-randr" 2>&1` + XCB_RANDR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-randr"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_RANDR_PKG_ERRORS" >&5 - have_ecore_x_xcb_randr="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_randr="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_randr="no" else XCB_RANDR_CFLAGS=$pkg_cv_XCB_RANDR_CFLAGS @@ -21748,10 +21802,11 @@ 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 "$XCB_RENDER_CFLAGS"; then - pkg_cv_XCB_RENDER_CFLAGS="$XCB_RENDER_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -21761,13 +21816,15 @@ if test -n "$XCB_RENDER_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -21777,15 +21834,14 @@ if test -n "$XCB_RENDER_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21793,17 +21849,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_RENDER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-render xcb-renderutil" 2>&1` + XCB_RENDER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-render xcb-renderutil"` else - XCB_RENDER_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-render xcb-renderutil" 2>&1` + XCB_RENDER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-render xcb-renderutil"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_RENDER_PKG_ERRORS" >&5 - have_ecore_x_xcb_render="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_render="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_render="no" else XCB_RENDER_CFLAGS=$pkg_cv_XCB_RENDER_CFLAGS @@ -21828,10 +21884,11 @@ 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 "$XCB_SCREENSAVER_CFLAGS"; then - pkg_cv_XCB_SCREENSAVER_CFLAGS="$XCB_SCREENSAVER_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -21841,13 +21898,15 @@ if test -n "$XCB_SCREENSAVER_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -21857,15 +21916,14 @@ if test -n "$XCB_SCREENSAVER_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21873,17 +21931,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_SCREENSAVER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-screensaver" 2>&1` + XCB_SCREENSAVER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-screensaver"` else - XCB_SCREENSAVER_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-screensaver" 2>&1` + XCB_SCREENSAVER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-screensaver"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_SCREENSAVER_PKG_ERRORS" >&5 - have_ecore_x_xcb_screensaver="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_screensaver="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_screensaver="no" else XCB_SCREENSAVER_CFLAGS=$pkg_cv_XCB_SCREENSAVER_CFLAGS @@ -21908,10 +21966,11 @@ 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 "$XCB_SHAPE_CFLAGS"; then - pkg_cv_XCB_SHAPE_CFLAGS="$XCB_SHAPE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -21921,13 +21980,15 @@ if test -n "$XCB_SHAPE_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -21937,15 +21998,14 @@ if test -n "$XCB_SHAPE_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21953,17 +22013,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_SHAPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-shape" 2>&1` + XCB_SHAPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-shape"` else - XCB_SHAPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-shape" 2>&1` + XCB_SHAPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-shape"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_SHAPE_PKG_ERRORS" >&5 - have_ecore_x_xcb_shape="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_shape="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_shape="no" else XCB_SHAPE_CFLAGS=$pkg_cv_XCB_SHAPE_CFLAGS @@ -21988,10 +22048,11 @@ 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 "$XCB_XGESTURE_CFLAGS"; then - pkg_cv_XCB_XGESTURE_CFLAGS="$XCB_XGESTURE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -22001,13 +22062,15 @@ if test -n "$XCB_XGESTURE_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -22017,15 +22080,14 @@ if test -n "$XCB_XGESTURE_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -22033,17 +22095,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_XGESTURE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-gesture" 2>&1` + XCB_XGESTURE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-gesture"` else - XCB_XGESTURE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-gesture" 2>&1` + XCB_XGESTURE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-gesture"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_XGESTURE_PKG_ERRORS" >&5 - have_ecore_x_xcb_gesture="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_gesture="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_gesture="no" else XCB_XGESTURE_CFLAGS=$pkg_cv_XCB_XGESTURE_CFLAGS @@ -22068,10 +22130,11 @@ 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 "$XCB_SYNC_CFLAGS"; then - pkg_cv_XCB_SYNC_CFLAGS="$XCB_SYNC_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -22081,13 +22144,15 @@ if test -n "$XCB_SYNC_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -22097,15 +22162,14 @@ if test -n "$XCB_SYNC_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -22113,17 +22177,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_SYNC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-sync" 2>&1` + XCB_SYNC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-sync"` else - XCB_SYNC_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-sync" 2>&1` + XCB_SYNC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-sync"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_SYNC_PKG_ERRORS" >&5 - have_ecore_x_xcb_sync="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_sync="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_sync="no" else XCB_SYNC_CFLAGS=$pkg_cv_XCB_SYNC_CFLAGS @@ -22148,10 +22212,11 @@ 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 "$XCB_XFIXES_CFLAGS"; then - pkg_cv_XCB_XFIXES_CFLAGS="$XCB_XFIXES_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -22161,13 +22226,15 @@ if test -n "$XCB_XFIXES_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -22177,15 +22244,14 @@ if test -n "$XCB_XFIXES_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -22193,17 +22259,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_XFIXES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-xfixes" 2>&1` + XCB_XFIXES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-xfixes"` else - XCB_XFIXES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-xfixes" 2>&1` + XCB_XFIXES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-xfixes"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_XFIXES_PKG_ERRORS" >&5 - have_ecore_x_xcb_xfixes="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_xfixes="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_xfixes="no" else XCB_XFIXES_CFLAGS=$pkg_cv_XCB_XFIXES_CFLAGS @@ -22228,10 +22294,11 @@ 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 "$XCB_XINERAMA_CFLAGS"; then - pkg_cv_XCB_XINERAMA_CFLAGS="$XCB_XINERAMA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -22241,13 +22308,15 @@ if test -n "$XCB_XINERAMA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -22257,15 +22326,14 @@ if test -n "$XCB_XINERAMA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -22273,17 +22341,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_XINERAMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-xinerama" 2>&1` + XCB_XINERAMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-xinerama"` else - XCB_XINERAMA_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-xinerama" 2>&1` + XCB_XINERAMA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-xinerama"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_XINERAMA_PKG_ERRORS" >&5 - have_ecore_x_xcb_xinerama="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_xinerama="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_xinerama="no" else XCB_XINERAMA_CFLAGS=$pkg_cv_XCB_XINERAMA_CFLAGS @@ -22308,10 +22376,11 @@ 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 "$XCB_XPRINT_CFLAGS"; then - pkg_cv_XCB_XPRINT_CFLAGS="$XCB_XPRINT_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -22321,13 +22390,15 @@ if test -n "$XCB_XPRINT_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -22337,15 +22408,14 @@ if test -n "$XCB_XPRINT_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -22353,17 +22423,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_XPRINT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-xprint" 2>&1` + XCB_XPRINT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-xprint"` else - XCB_XPRINT_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-xprint" 2>&1` + XCB_XPRINT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-xprint"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_XPRINT_PKG_ERRORS" >&5 - have_ecore_x_xcb_xprint="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_xprint="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_xprint="no" else XCB_XPRINT_CFLAGS=$pkg_cv_XCB_XPRINT_CFLAGS @@ -22388,10 +22458,11 @@ 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 "$XCB_XTEST_CFLAGS"; then - pkg_cv_XCB_XTEST_CFLAGS="$XCB_XTEST_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -22401,13 +22472,15 @@ if test -n "$XCB_XTEST_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -22417,15 +22490,14 @@ if test -n "$XCB_XTEST_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -22433,17 +22505,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_XTEST_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-xtest" 2>&1` + XCB_XTEST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-xtest"` else - XCB_XTEST_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-xtest" 2>&1` + XCB_XTEST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-xtest"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_XTEST_PKG_ERRORS" >&5 - have_ecore_x_xcb_xtest="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_xtest="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_xtest="no" else XCB_XTEST_CFLAGS=$pkg_cv_XCB_XTEST_CFLAGS @@ -22470,10 +22542,11 @@ 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 "$XCB_XINPUT_CFLAGS"; then - pkg_cv_XCB_XINPUT_CFLAGS="$XCB_XINPUT_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -22483,13 +22556,15 @@ if test -n "$XCB_XINPUT_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -22499,15 +22574,14 @@ if test -n "$XCB_XINPUT_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -22515,17 +22589,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_XINPUT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-xinput" 2>&1` + XCB_XINPUT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-xinput"` else - XCB_XINPUT_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-xinput" 2>&1` + XCB_XINPUT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-xinput"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_XINPUT_PKG_ERRORS" >&5 - have_ecore_x_xcb_xinput="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_xinput="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_xinput="no" else XCB_XINPUT_CFLAGS=$pkg_cv_XCB_XINPUT_CFLAGS @@ -22550,10 +22624,11 @@ 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 "$XCB_CURSOR_CFLAGS"; then - pkg_cv_XCB_CURSOR_CFLAGS="$XCB_CURSOR_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -22563,13 +22638,15 @@ if test -n "$XCB_CURSOR_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -22579,15 +22656,14 @@ if test -n "$XCB_CURSOR_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -22595,17 +22671,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_CURSOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb-render xcb-renderutil" 2>&1` + XCB_CURSOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb-render xcb-renderutil"` else - XCB_CURSOR_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb-render xcb-renderutil" 2>&1` + XCB_CURSOR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb-render xcb-renderutil"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_CURSOR_PKG_ERRORS" >&5 - have_ecore_x_xcb_cursor="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_xcb_cursor="no" +elif test $pkg_failed = untried; then have_ecore_x_xcb_cursor="no" else XCB_CURSOR_CFLAGS=$pkg_cv_XCB_CURSOR_CFLAGS @@ -22664,7 +22740,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 @@ -22682,7 +22758,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 @@ -22768,7 +22844,7 @@ else fi done fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -24634,44 +24710,46 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVAS" >&5 $as_echo_n "checking for EVAS... " >&6; } -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.1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "evas >= 1.1.0") 2>&5 +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 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.0" 2>/dev/null` + pkg_cv_EVAS_CFLAGS=`$PKG_CONFIG --cflags "evas >= 1.1.99" 2>/dev/null` else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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.1.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "evas >= 1.1.0") 2>&5 +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 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.0" 2>/dev/null` + pkg_cv_EVAS_LIBS=`$PKG_CONFIG --libs "evas >= 1.1.99" 2>/dev/null` else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -24679,17 +24757,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EVAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "evas >= 1.1.0" 2>&1` + EVAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evas >= 1.1.99"` else - EVAS_PKG_ERRORS=`$PKG_CONFIG --print-errors "evas >= 1.1.0" 2>&1` + EVAS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evas >= 1.1.99"` fi # Put the nasty error message in config.log where it belongs echo "$EVAS_PKG_ERRORS" >&5 - have_evas="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_evas="no" +elif test $pkg_failed = untried; then have_evas="no" else EVAS_CFLAGS=$pkg_cv_EVAS_CFLAGS @@ -24706,7 +24784,8 @@ 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" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -25027,7 +25106,8 @@ $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" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -25041,11 +25121,12 @@ esac # ecore_con -for ac_header in arpa/inet.h arpa/nameser.h netinet/tcp.h netinet/in.h sys/socket.h sys/un.h ws2tcpip.h netdb.h +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 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" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -25245,7 +25326,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 @@ -25253,7 +25334,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 ;; *) ;; @@ -25316,7 +25397,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="" @@ -25416,8 +25497,9 @@ 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_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5 ; } +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (int) +See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_int=0 fi @@ -25449,8 +25531,9 @@ 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_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5 ; } +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (long) +See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_long=0 fi @@ -26066,8 +26149,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 @@ -26438,7 +26521,8 @@ 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" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -26504,7 +26588,8 @@ 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" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -26576,7 +26661,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" @@ -26738,10 +26823,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURL" >&5 $as_echo_n "checking for CURL... " >&6; } -if test -n "$CURL_CFLAGS"; then - pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$CURL_CFLAGS"; then + pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" + else + 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=$? @@ -26751,13 +26837,15 @@ if test -n "$CURL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$CURL_LIBS"; then - pkg_cv_CURL_LIBS="$CURL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$CURL_LIBS"; then + pkg_cv_CURL_LIBS="$CURL_LIBS" + else + 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=$? @@ -26767,15 +26855,14 @@ if test -n "$CURL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -26783,17 +26870,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcurl" 2>&1` + CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcurl"` else - CURL_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcurl" 2>&1` + CURL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcurl"` fi # Put the nasty error message in config.log where it belongs echo "$CURL_PKG_ERRORS" >&5 - _ecore_have_curl="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + _ecore_have_curl="no" +elif test $pkg_failed = untried; then _ecore_have_curl="no" else CURL_CFLAGS=$pkg_cv_CURL_CFLAGS @@ -26841,10 +26928,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TLS" >&5 $as_echo_n "checking for TLS... " >&6; } -if test -n "$TLS_CFLAGS"; then - pkg_cv_TLS_CFLAGS="$TLS_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$TLS_CFLAGS"; then + pkg_cv_TLS_CFLAGS="$TLS_CFLAGS" + else + 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=$? @@ -26854,13 +26942,15 @@ if test -n "$TLS_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$TLS_LIBS"; then - pkg_cv_TLS_LIBS="$TLS_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$TLS_LIBS"; then + pkg_cv_TLS_LIBS="$TLS_LIBS" + else + 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=$? @@ -26870,15 +26960,14 @@ if test -n "$TLS_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -26886,17 +26975,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - TLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gnutls >= 2.10.2" 2>&1` + TLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gnutls >= 2.10.2"` else - TLS_PKG_ERRORS=`$PKG_CONFIG --print-errors "gnutls >= 2.10.2" 2>&1` + TLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.10.2"` fi # Put the nasty error message in config.log where it belongs echo "$TLS_PKG_ERRORS" >&5 - _ecore_have_gnutls="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + _ecore_have_gnutls="no" +elif test $pkg_failed = untried; then _ecore_have_gnutls="no" else TLS_CFLAGS=$pkg_cv_TLS_CFLAGS @@ -26916,10 +27005,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TLS2" >&5 $as_echo_n "checking for TLS2... " >&6; } -if test -n "$TLS2_CFLAGS"; then - pkg_cv_TLS2_CFLAGS="$TLS2_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$TLS2_CFLAGS"; then + pkg_cv_TLS2_CFLAGS="$TLS2_CFLAGS" + else + 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=$? @@ -26929,13 +27019,15 @@ if test -n "$TLS2_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$TLS2_LIBS"; then - pkg_cv_TLS2_LIBS="$TLS2_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$TLS2_LIBS"; then + pkg_cv_TLS2_LIBS="$TLS2_LIBS" + else + 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=$? @@ -26945,15 +27037,14 @@ if test -n "$TLS2_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -26961,17 +27052,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - TLS2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gnutls >= 2.10.2" 2>&1` + TLS2_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gnutls >= 2.10.2"` else - TLS2_PKG_ERRORS=`$PKG_CONFIG --print-errors "gnutls >= 2.10.2" 2>&1` + TLS2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.10.2"` fi # Put the nasty error message in config.log where it belongs echo "$TLS2_PKG_ERRORS" >&5 - dummy="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + dummy="no" +elif test $pkg_failed = untried; then dummy="no" else TLS2_CFLAGS=$pkg_cv_TLS2_CFLAGS @@ -27129,10 +27220,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5 $as_echo_n "checking for SSL... " >&6; } -if test -n "$SSL_CFLAGS"; then - pkg_cv_SSL_CFLAGS="$SSL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SSL_CFLAGS"; then + pkg_cv_SSL_CFLAGS="$SSL_CFLAGS" + else + 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=$? @@ -27142,13 +27234,15 @@ if test -n "$SSL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$SSL_LIBS"; then - pkg_cv_SSL_LIBS="$SSL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SSL_LIBS"; then + pkg_cv_SSL_LIBS="$SSL_LIBS" + else + 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=$? @@ -27158,15 +27252,14 @@ if test -n "$SSL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -27174,17 +27267,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "openssl" 2>&1` + SSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "openssl"` else - SSL_PKG_ERRORS=`$PKG_CONFIG --print-errors "openssl" 2>&1` + SSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl"` fi # Put the nasty error message in config.log where it belongs echo "$SSL_PKG_ERRORS" >&5 - _ecore_have_openssl="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + _ecore_have_openssl="no" +elif test $pkg_failed = untried; then _ecore_have_openssl="no" else SSL_CFLAGS=$pkg_cv_SSL_CFLAGS @@ -27241,10 +27334,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CARES" >&5 $as_echo_n "checking for CARES... " >&6; } -if test -n "$CARES_CFLAGS"; then - pkg_cv_CARES_CFLAGS="$CARES_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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 ac_status=$? @@ -27254,13 +27348,15 @@ if test -n "$CARES_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$CARES_LIBS"; then - pkg_cv_CARES_LIBS="$CARES_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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 ac_status=$? @@ -27270,15 +27366,14 @@ if test -n "$CARES_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -27286,17 +27381,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - CARES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcares >= 1.6.1 libcares != 1.7.5" 2>&1` + CARES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcares >= 1.6.1 libcares != 1.7.5"` else - CARES_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcares >= 1.6.1 libcares != 1.7.5" 2>&1` + CARES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcares >= 1.6.1 libcares != 1.7.5"` fi # Put the nasty error message in config.log where it belongs echo "$CARES_PKG_ERRORS" >&5 - _ecore_have_cares="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + _ecore_have_cares="no" +elif test $pkg_failed = untried; then _ecore_have_cares="no" else CARES_CFLAGS=$pkg_cv_CARES_CFLAGS @@ -27385,7 +27480,10 @@ fi if test "x$have_ecore_ipc" = "xyes"; then : - requirements_ecore_ipc="ecore-con >= 1.1.0 ${requirements_ecore_ipc}" + + requirements_ecore_ipc="ecore-con >= 1.1.99 ${requirements_ecore_ipc}" + requirements_ecore_evas="ecore-ipc >= 1.1.99 ${requirements_ecore_evas}" + fi @@ -27638,7 +27736,7 @@ fi if test "x${have_ecore_con}" = "xyes" ; then - requirements_ecore_file="ecore-con >= 1.1.0 ${requirements_ecore_file}" + requirements_ecore_file="ecore-con >= 1.1.99 ${requirements_ecore_file}" else _ecore_want_curl=${want_curl} @@ -27662,10 +27760,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CURL" >&5 $as_echo_n "checking for CURL... " >&6; } -if test -n "$CURL_CFLAGS"; then - pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$CURL_CFLAGS"; then + pkg_cv_CURL_CFLAGS="$CURL_CFLAGS" + else + 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=$? @@ -27675,13 +27774,15 @@ if test -n "$CURL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$CURL_LIBS"; then - pkg_cv_CURL_LIBS="$CURL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$CURL_LIBS"; then + pkg_cv_CURL_LIBS="$CURL_LIBS" + else + 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=$? @@ -27691,15 +27792,14 @@ if test -n "$CURL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -27707,17 +27807,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcurl" 2>&1` + CURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcurl"` else - CURL_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcurl" 2>&1` + CURL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcurl"` fi # Put the nasty error message in config.log where it belongs echo "$CURL_PKG_ERRORS" >&5 - _ecore_have_curl="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + _ecore_have_curl="no" +elif test $pkg_failed = untried; then _ecore_have_curl="no" else CURL_CFLAGS=$pkg_cv_CURL_CFLAGS @@ -27753,7 +27853,7 @@ fi #fi #ECORE_CHECK_MODULE([config], [${want_ecore_config}], [Config], [${ecore_config_deps}], -# [requirements_ecore_config="ecore-ipc >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 ${requirements_ecore_config}"]) +# [requirements_ecore_config="ecore-ipc >= 1.1.99 evas >= 1.1.99 eet >= 1.5.0 ${requirements_ecore_config}"]) if false; then BUILD_ECORE_CONFIG_TRUE= @@ -27883,7 +27983,7 @@ fi if test "x$have_ecore_imf_evas" = "xyes"; then : - requirements_ecore_imf_evas="ecore-imf >= 1.1.0 evas >= 1.1.0 ${requirements_ecore_imf_evas}" + requirements_ecore_imf_evas="ecore-imf >= 1.1.99 evas >= 1.1.99 ${requirements_ecore_imf_evas}" fi @@ -28003,7 +28103,7 @@ fi if test "x$have_ecore_input_evas" = "xyes"; then : - requirements_ecore_input_evas="ecore-input >= 1.1.0 evas >= 1.1.0 ${requirements_ecore_input}" + requirements_ecore_input_evas="ecore-input >= 1.1.99 evas >= 1.1.99 ${requirements_ecore_input}" fi @@ -28083,7 +28183,159 @@ fi if test "x$have_ecore_imf_xim" = "xyes"; then : - requirements_ecore_imf_xim="ecore-imf >= 1.1.0 ecore-x >= 1.1.0 ecore-input >= 1.1.0 ${requirements_ecore_imf_xim}" + requirements_ecore_imf_xim="ecore-imf >= 1.1.99 ecore-x >= 1.1.99 ecore-input >= 1.1.99 ${requirements_ecore_imf_xim}" +fi + + + + + + + + +# ecore_imf_scim + +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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"scim\""; } >&5 + ($PKG_CONFIG --exists --print-errors "scim") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SCIM_CFLAGS=`$PKG_CONFIG --cflags "scim" 2>/dev/null` +else + pkg_failed=yes +fi + fi +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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"scim\""; } >&5 + ($PKG_CONFIG --exists --print-errors "scim") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SCIM_LIBS=`$PKG_CONFIG --libs "scim" 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 + SCIM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "scim"` + else + SCIM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "scim"` + 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" +elif test $pkg_failed = untried; then + have_scim="no" +else + SCIM_CFLAGS=$pkg_cv_SCIM_CFLAGS + SCIM_LIBS=$pkg_cv_SCIM_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_scim="yes" +fi + + if false; then + BUILD_ECORE_IMF_SCIM_TRUE= + BUILD_ECORE_IMF_SCIM_FALSE='#' +else + BUILD_ECORE_IMF_SCIM_TRUE='#' + BUILD_ECORE_IMF_SCIM_FALSE= +fi + +ecore_imf_scim_deps="no" +echo "have_ecore_x_xlib: ${have_ecore_x_xlib}" +if test "x${have_ecore_imf}" = "xyes" \ + -a "x${have_scim}" = "xyes" \ + -a "x${have_ecore_input}" = "xyes" ; then + ecore_imf_scim_deps="yes" + +$as_echo "#define BUILD_ECORE_IMF_SCIM 1" >>confdefs.h + +fi + + + +have_ecore_imf_scim=no +ecore_imf_scim_cflags= +ecore_imf_scim_libs= +want_module=${want_ecore_imf} + +# Check whether --enable-ecore-imf-scim was given. +if test "${enable_ecore_imf_scim+set}" = set; then : + enableval=$enable_ecore_imf_scim; + 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_Imf_SCIM module is to be built" >&5 +$as_echo_n "checking whether Ecore_Imf_SCIM module is to be built... " >&6; } + +if test "x${want_module}" = "xyes" ; then + if test "x${ecore_imf_scim_deps}" = "x" || test "x${ecore_imf_scim_deps}" = "xyes" ; then + +$as_echo "#define BUILD_ECORE_IMF_SCIM 1" >>confdefs.h + + have_ecore_imf_scim="yes" + ecore_imf_scim_libs="-lecore_imf_scim" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (dependency failed)" >&5 +$as_echo "no (dependency failed)" >&6; } + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$have_ecore_imf_scim" = "xyes"; then + BUILD_ECORE_IMF_SCIM_TRUE= + BUILD_ECORE_IMF_SCIM_FALSE='#' +else + BUILD_ECORE_IMF_SCIM_TRUE='#' + BUILD_ECORE_IMF_SCIM_FALSE= +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}" fi @@ -28155,7 +28407,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.0 ${requirements_ecore_x}" + requirements_ecore_x="ecore-input >= 1.1.99 ${requirements_ecore_x}" fi @@ -28220,7 +28472,7 @@ fi if test "x$have_ecore_win32" = "xyes"; then : ecore_win32_libs="-lole32 -lgdi32" - requirements_ecore_win32="ecore-input >= 1.1.0 ${requirements_ecore_win32}" + requirements_ecore_win32="ecore-input >= 1.1.99 ${requirements_ecore_win32}" fi @@ -28289,7 +28541,7 @@ fi if test "x$have_ecore_cocoa" = "xyes"; then : - requirements_ecore_cocoa="ecore-input >= 1.1.0 ${requirements_ecore_cocoa}" + requirements_ecore_cocoa="ecore-input >= 1.1.99 ${requirements_ecore_cocoa}" fi @@ -28356,7 +28608,7 @@ fi if test "x$have_ecore_sdl" = "xyes"; then : - requirements_ecore_sdl="ecore-input >= 1.1.0 ${requirements_ecore_sdl}" + requirements_ecore_sdl="ecore-input >= 1.1.99 ${requirements_ecore_sdl}" fi @@ -28416,7 +28668,7 @@ fi if test "x$have_ecore_psl1ght" = "xyes"; then : - requirements_ecore_psl1ght="ecore-input >= 1.1.0 ${requirements_ecore_psl1ght}" + requirements_ecore_psl1ght="ecore-input >= 1.1.99 ${requirements_ecore_psl1ght}" fi @@ -28513,10 +28765,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TSLIB" >&5 $as_echo_n "checking for TSLIB... " >&6; } -if test -n "$TSLIB_CFLAGS"; then - pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$TSLIB_CFLAGS"; then + pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" + else + 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=$? @@ -28526,13 +28779,15 @@ if test -n "$TSLIB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$TSLIB_LIBS"; then - pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$TSLIB_LIBS"; then + pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" + else + 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=$? @@ -28542,15 +28797,14 @@ if test -n "$TSLIB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -28558,23 +28812,26 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tslib-1.0" 2>&1` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "tslib-1.0"` else - TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "tslib-1.0" 2>&1` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "tslib-1.0"` 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 "$TSLIB_CFLAGS"; then - pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$TSLIB_CFLAGS"; then + pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" + else + 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=$? @@ -28584,13 +28841,15 @@ if test -n "$TSLIB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$TSLIB_LIBS"; then - pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$TSLIB_LIBS"; then + pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" + else + 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=$? @@ -28600,15 +28859,14 @@ if test -n "$TSLIB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -28616,13 +28874,15 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tslib" 2>&1` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "tslib"` else - TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "tslib" 2>&1` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "tslib"` 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 : @@ -28734,8 +28994,6 @@ 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 : @@ -28861,18 +29119,17 @@ $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 "$TSLIB_CFLAGS"; then - pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$TSLIB_CFLAGS"; then + pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" + else + 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=$? @@ -28882,13 +29139,15 @@ if test -n "$TSLIB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$TSLIB_LIBS"; then - pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$TSLIB_LIBS"; then + pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" + else + 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=$? @@ -28898,15 +29157,14 @@ if test -n "$TSLIB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -28914,13 +29172,15 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tslib" 2>&1` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "tslib"` else - TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "tslib" 2>&1` + TSLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "tslib"` 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 : @@ -29032,8 +29292,6 @@ 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 : @@ -29301,7 +29559,7 @@ fi if test "x$have_ecore_wince" = "xyes"; then : - requirements_ecore_win32="ecore-input >= 1.1.0 ${requirements_ecore_win32}" + requirements_ecore_win32="ecore-input >= 1.1.99 ${requirements_ecore_win32}" fi @@ -29370,7 +29628,7 @@ fi if test "x$have_ecore_evas" = "xyes"; then : - requirements_ecore_evas="ecore-input >= 1.1.0 ecore-input-evas >= 1.1.0 evas >= 1.1.0 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-input >= 1.1.99 ecore-input-evas >= 1.1.99 evas >= 1.1.99 ${requirements_ecore_evas}" fi @@ -29591,10 +29849,11 @@ 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 "$XCB_X11_CFLAGS"; then - pkg_cv_XCB_X11_CFLAGS="$XCB_X11_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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" && \ { { $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=$? @@ -29604,13 +29863,15 @@ if test -n "$XCB_X11_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -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" && \ +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" && \ { { $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=$? @@ -29620,15 +29881,14 @@ if test -n "$XCB_X11_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -29636,17 +29896,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11-xcb" 2>&1` + XCB_X11_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11-xcb"` else - XCB_X11_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11-xcb" 2>&1` + XCB_X11_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11-xcb"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_X11_PKG_ERRORS" >&5 - have_ecore_x_opengl_xcb="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_x_opengl_xcb="no" +elif test $pkg_failed = untried; then have_ecore_x_opengl_xcb="no" else XCB_X11_CFLAGS=$pkg_cv_XCB_X11_CFLAGS @@ -29787,7 +30047,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.0 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-x >= 1.1.99 ${requirements_ecore_evas}" fi # ecore_evas_win32 @@ -30065,7 +30325,7 @@ 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.0 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-win32 >= 1.1.99 ${requirements_ecore_evas}" fi # ecore_evas_software_sdl @@ -30116,7 +30376,7 @@ $as_echo_n "checking whether ecore_evas Software SDL support is built... " >&6; $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.0 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}" fi @@ -30171,7 +30431,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.0 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}" fi @@ -30226,7 +30486,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.0 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-cocoa >= 1.1.99 ${requirements_ecore_evas}" fi @@ -30281,7 +30541,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.0 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-directfb >= 1.1.99 ${requirements_ecore_evas}" fi @@ -30336,7 +30596,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.0 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-fb >= 1.1.99 ${requirements_ecore_evas}" fi @@ -30391,7 +30651,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.0 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-wince >= 1.1.99 ${requirements_ecore_evas}" fi @@ -30501,7 +30761,332 @@ $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.0 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-psl1ght >= 1.1.99 ${requirements_ecore_evas}" +fi + + + + + +### WAYLAND + +ecore_wayland_deps="no" +have_wayland="no" +if test "x${want_ecore_wayland}" = "xyes" ; then + +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 + 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` +else + pkg_failed=yes +fi + fi +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 + 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` +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 + WAYLAND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "wayland-client xkbcommon"` + else + WAYLAND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "wayland-client xkbcommon"` + 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" +elif test $pkg_failed = untried; then + have_wayland="no" +else + WAYLAND_CFLAGS=$pkg_cv_WAYLAND_CFLAGS + WAYLAND_LIBS=$pkg_cv_WAYLAND_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_wayland="yes" +fi +fi +if test "x${have_ecore_input}" = "xyes" -a "x${have_wayland}" = "xyes" ; then + ecore_wayland_deps="yes" +fi + + + +have_ecore_wayland=no +ecore_wayland_cflags= +ecore_wayland_libs= +want_module=${want_ecore_wayland} + +# Check whether --enable-ecore-wayland was given. +if test "${enable_ecore_wayland+set}" = set; then : + enableval=$enable_ecore_wayland; + 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_Wayland module is to be built" >&5 +$as_echo_n "checking whether Ecore_Wayland module is to be built... " >&6; } + +if test "x${want_module}" = "xyes" ; then + if test "x${ecore_wayland_deps}" = "x" || test "x${ecore_wayland_deps}" = "xyes" ; then + +$as_echo "#define BUILD_ECORE_WAYLAND 1" >>confdefs.h + + have_ecore_wayland="yes" + ecore_wayland_libs="-lecore_wayland" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (dependency failed)" >&5 +$as_echo "no (dependency failed)" >&6; } + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$have_ecore_wayland" = "xyes"; then + BUILD_ECORE_WAYLAND_TRUE= + BUILD_ECORE_WAYLAND_FALSE='#' +else + BUILD_ECORE_WAYLAND_TRUE='#' + BUILD_ECORE_WAYLAND_FALSE= +fi + + +if test "x$have_ecore_wayland" = "xyes"; then : + +fi + + + + + + + +if test "x${have_ecore_wayland}" = "xyes" ; then + requirements_ecore_wayland="ecore-input >= 1.1.0 wayland-client xkbcommon ${requirements_ecore_wayland}" +fi + + + +have_ecore_evas_wayland_shm="no" +want_module="${want_ecore_evas_wayland_shm}" + +# Check whether --enable-ecore-evas-wayland-shm was given. +if test "${enable_ecore_evas_wayland_shm+set}" = set; then : + enableval=$enable_ecore_evas_wayland_shm; + 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 Wayland Shm support is to be built" >&5 +$as_echo_n "checking whether ecore_evas Wayland Shm 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_wayland}" = "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-wayland-shm\""; } >&5 + ($PKG_CONFIG --exists --print-errors "evas-wayland-shm") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + + +$as_echo "#define BUILD_ECORE_EVAS_WAYLAND_SHM 1" >>confdefs.h + + have_ecore_evas_wayland_shm="yes" + +fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ecore_evas Wayland Shm support is built" >&5 +$as_echo_n "checking whether ecore_evas Wayland Shm support is built... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ecore_evas_wayland_shm" >&5 +$as_echo "$have_ecore_evas_wayland_shm" >&6; } + +if test "x$have_ecore_evas_wayland_shm" = "xyes"; then : + requirements_ecore_evas="${requirements_ecore_wayland} ${requirements_ecore_evas}" +fi + + + + + + + +have_ecore_evas_wayland_egl="no" +want_module="${want_ecore_evas_wayland_egl}" + +# Check whether --enable-ecore-evas-wayland-egl was given. +if test "${enable_ecore_evas_wayland_egl+set}" = set; then : + enableval=$enable_ecore_evas_wayland_egl; + 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 Wayland Egl support is to be built" >&5 +$as_echo_n "checking whether ecore_evas Wayland Egl 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_wayland}" = "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-wayland-egl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "evas-wayland-egl") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + + +$as_echo "#define BUILD_ECORE_EVAS_WAYLAND_EGL 1" >>confdefs.h + + have_ecore_evas_wayland_egl="yes" + +fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ecore_evas Wayland Egl support is built" >&5 +$as_echo_n "checking whether ecore_evas Wayland Egl support is built... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ecore_evas_wayland_egl" >&5 +$as_echo "$have_ecore_evas_wayland_egl" >&6; } + +if test "x$have_ecore_evas_wayland_egl" = "xyes"; then : + + +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" && \ + { { $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=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_WAYLAND_EGL_CFLAGS=`$PKG_CONFIG --cflags "wayland-egl" 2>/dev/null` +else + pkg_failed=yes +fi + fi +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" && \ + { { $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=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_WAYLAND_EGL_LIBS=`$PKG_CONFIG --libs "wayland-egl" 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 + WAYLAND_EGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "wayland-egl"` + else + WAYLAND_EGL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "wayland-egl"` + 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" +elif test $pkg_failed = untried; then + have_wayland_egl="no" +else + WAYLAND_EGL_CFLAGS=$pkg_cv_WAYLAND_EGL_CFLAGS + WAYLAND_EGL_LIBS=$pkg_cv_WAYLAND_EGL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_wayland_egl="yes" +fi + if test "x${have_wayland_egl}" = "xyes" ; then + requirements_ecore_evas="wayland-egl egl ${requirements_ecore_wayland} ${requirements_ecore_evas}" + fi + fi @@ -30607,7 +31192,9 @@ fi -ac_config_files="$ac_config_files Makefile ecore-con.pc ecore-config.pc ecore-directfb.pc ecore-evas.pc ecore-fb.pc ecore-file.pc ecore-imf.pc ecore-imf-evas.pc ecore-ipc.pc ecore-x.pc ecore-input.pc ecore-input-evas.pc ecore-win32.pc ecore-sdl.pc ecore-cocoa.pc ecore-psl1ght.pc ecore-wince.pc ecore.pc doc/ecore.dox doc/Makefile doc/Doxyfile src/Makefile src/util/Makefile src/bin/Makefile src/lib/Makefile src/lib/ecore/Makefile src/lib/ecore_con/Makefile src/lib/ecore_config/Makefile src/lib/ecore_directfb/Makefile src/lib/ecore_evas/Makefile src/lib/ecore_fb/Makefile src/lib/ecore_file/Makefile src/lib/ecore_cocoa/Makefile src/lib/ecore_sdl/Makefile src/lib/ecore_psl1ght/Makefile src/lib/ecore_imf/Makefile src/lib/ecore_imf_evas/Makefile src/lib/ecore_input/Makefile src/lib/ecore_input_evas/Makefile src/lib/ecore_ipc/Makefile src/lib/ecore_win32/Makefile src/lib/ecore_wince/Makefile src/lib/ecore_x/Makefile src/lib/ecore_x/xlib/Makefile src/lib/ecore_x/xcb/Makefile src/examples/Makefile src/tests/Makefile src/modules/Makefile src/modules/immodules/Makefile src/modules/immodules/xim/Makefile ecore.spec $po_makefile_in" + + +ac_config_files="$ac_config_files Makefile ecore-con.pc ecore-config.pc ecore-directfb.pc ecore-evas.pc ecore-fb.pc ecore-file.pc ecore-imf.pc ecore-imf-evas.pc ecore-ipc.pc ecore-x.pc ecore-input.pc ecore-input-evas.pc ecore-win32.pc ecore-sdl.pc ecore-cocoa.pc ecore-psl1ght.pc ecore-wince.pc ecore-wayland.pc ecore.pc doc/ecore.dox doc/Makefile doc/Doxyfile src/Makefile src/util/Makefile src/bin/Makefile src/lib/Makefile src/lib/ecore/Makefile src/lib/ecore_con/Makefile src/lib/ecore_config/Makefile src/lib/ecore_directfb/Makefile src/lib/ecore_evas/Makefile src/lib/ecore_fb/Makefile src/lib/ecore_file/Makefile src/lib/ecore_cocoa/Makefile src/lib/ecore_sdl/Makefile src/lib/ecore_psl1ght/Makefile src/lib/ecore_imf/Makefile src/lib/ecore_imf_evas/Makefile src/lib/ecore_input/Makefile src/lib/ecore_input_evas/Makefile src/lib/ecore_ipc/Makefile src/lib/ecore_win32/Makefile src/lib/ecore_wince/Makefile src/lib/ecore_x/Makefile src/lib/ecore_x/xlib/Makefile src/lib/ecore_x/xcb/Makefile src/lib/ecore_wayland/Makefile src/examples/Makefile src/tests/Makefile src/modules/Makefile src/modules/immodules/Makefile src/modules/immodules/xim/Makefile src/modules/immodules/scim/Makefile ecore.spec $po_makefile_in" cat >confcache <<\_ACEOF @@ -30693,7 +31280,6 @@ 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$//' @@ -30717,156 +31303,168 @@ 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. + 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 \"EFL_ENABLE_TESTS\" 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_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. +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. 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. 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 @@ -31016,19 +31614,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error 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=$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 + 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 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -31224,7 +31822,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 @@ -31277,8 +31875,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.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +This file was extended by ecore $as_me 1.1.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -31343,11 +31941,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.0 -configured by $0, generated by GNU Autoconf 2.67, +ecore config.status 1.1.99.67344 +configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -31365,16 +31963,11 @@ 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 @@ -31396,7 +31989,6 @@ 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;; @@ -31409,7 +32001,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 ;; @@ -31418,7 +32010,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" @@ -31853,6 +32445,7 @@ do "ecore-cocoa.pc") CONFIG_FILES="$CONFIG_FILES ecore-cocoa.pc" ;; "ecore-psl1ght.pc") CONFIG_FILES="$CONFIG_FILES ecore-psl1ght.pc" ;; "ecore-wince.pc") CONFIG_FILES="$CONFIG_FILES ecore-wince.pc" ;; + "ecore-wayland.pc") CONFIG_FILES="$CONFIG_FILES ecore-wayland.pc" ;; "ecore.pc") CONFIG_FILES="$CONFIG_FILES ecore.pc" ;; "doc/ecore.dox") CONFIG_FILES="$CONFIG_FILES doc/ecore.dox" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; @@ -31881,15 +32474,17 @@ do "src/lib/ecore_x/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib/ecore_x/Makefile" ;; "src/lib/ecore_x/xlib/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib/ecore_x/xlib/Makefile" ;; "src/lib/ecore_x/xcb/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib/ecore_x/xcb/Makefile" ;; + "src/lib/ecore_wayland/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib/ecore_wayland/Makefile" ;; "src/examples/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/Makefile" ;; "src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;; "src/modules/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/Makefile" ;; "src/modules/immodules/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/immodules/Makefile" ;; "src/modules/immodules/xim/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/immodules/xim/Makefile" ;; + "src/modules/immodules/scim/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/immodules/scim/Makefile" ;; "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 @@ -31927,7 +32522,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. @@ -31944,7 +32539,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 @@ -31958,18 +32553,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 @@ -32058,28 +32653,20 @@ 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 sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ 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[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// s/^[^=]*=[ ]*$// }' fi @@ -32107,7 +32694,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 @@ -32192,7 +32779,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" @@ -32205,7 +32792,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 @@ -32233,7 +32820,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error "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'" @@ -32260,7 +32847,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 @@ -32397,22 +32984,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) # @@ -32423,19 +33010,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" @@ -33506,7 +34093,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. @@ -33527,7 +34114,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 1 + $ac_cs_success || as_fn_exit $? 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 @@ -33587,6 +34174,7 @@ fi #echo " Ecore_Config.................: $have_ecore_config (deprecated)" echo " Ecore_IMF....................: $have_ecore_imf" echo " XIM........................: $have_ecore_imf_xim" +echo " SCIM.......................: $have_ecore_imf_scim" echo " Ecore_IMF_Evas...............: $have_ecore_imf_evas" echo " Ecore_Input..................: $have_ecore_input" echo " Ecore_Input_Evas.............: $have_ecore_input_evas" @@ -33642,6 +34230,7 @@ fi echo " Ecore_DirectFB...............: $have_ecore_directfb" echo " Ecore_WinCE..................: $have_ecore_wince" echo " Ecore_PSL1GHT................: $have_ecore_psl1ght" +echo " Ecore_Wayland................: $have_ecore_wayland" echo echo " Ecore Evas:" @@ -33675,6 +34264,8 @@ if test "x${have_ecore_evas}" = "xyes" ; then echo " Software 16bit DirectDraw..: $have_ecore_evas_software_16_ddraw" echo " Software 16bit WinCE.......: $have_ecore_evas_software_16_wince" 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" fi echo echo " Tests................: ${enable_tests}" diff --git a/libraries/ecore/configure.ac b/libraries/ecore/configure.ac index 78806c1..21393dd 100644 --- a/libraries/ecore/configure.ac +++ b/libraries/ecore/configure.ac @@ -2,11 +2,11 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [1]) -m4_define([v_mic], [0]) -m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) +m4_define([v_mic], [99]) +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 -m4_undefine([v_rev]) +dnl 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]) @@ -133,6 +133,7 @@ want_ecore_psl1ght="no" want_ecore_fb="no" want_ecore_directfb="no" want_ecore_wince="no" +want_ecore_wayland="no" # ecore_x options (both xlib and xcb) want_ecore_x_composite="yes" @@ -173,9 +174,12 @@ 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_wayland_shm="no" +want_ecore_evas_wayland_egl="no" # ecore_imf modules want_ecore_imf_xim="no" +want_ecore_imf_scim="no" case "$host_os" in mingw32ce* | cegcc*) @@ -224,6 +228,7 @@ case "$host_os" in want_ecore_fb="yes" want_ecore_imf="yes" want_ecore_x="yes" + want_ecore_wayland="yes" want_ecore_evas_software_x11="yes" want_ecore_evas_opengl_x11="yes" want_ecore_evas_software_16_x11="yes" @@ -234,7 +239,10 @@ case "$host_os" in want_ecore_evas_gl_cocoa="no" want_ecore_evas_directfb="yes" want_ecore_evas_fb="yes" + want_ecore_evas_wayland_shm="yes" + want_ecore_evas_wayland_egl="yes" want_ecore_imf_xim="yes" + want_ecore_imf_scim="yes" ;; esac @@ -262,6 +270,8 @@ requirements_ecore_x="" requirements_ecore_win32="" requirements_ecore_wince="" requirements_ecore_imf_xim="" +requirements_ecore_imf_scim="" +requirements_ecore_wayland="" AC_CHECK_DECL([MAXHOSTNAMELEN],[FOUND_MAXHOSTNAMELEN=yes]) @@ -418,7 +428,7 @@ AC_SUBST(pkgconfig_requires_private) have_backtrace="no" AC_CHECK_FUNCS([backtrace], [have_backtrace="yes"], []) -want_ecore_timer_dump="yes" +want_ecore_timer_dump="no" AC_ARG_ENABLE([ecore-timer-dump], [AC_HELP_STRING([--disable-ecore-timer-dump], [disable tracking of timer allocation. @<:@default=enable@:>@])], @@ -543,22 +553,22 @@ PKG_CHECK_MODULES(EINA, [eina >= 1.1.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.0 eina >= 1.1.0 ${requirements_ecore_config}" -requirements_ecore_directfb="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_directfb}" -requirements_ecore_evas="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_evas}" -requirements_ecore_fb="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_fb}" -requirements_ecore_file="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_file}" -requirements_ecore_imf="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_imf}" -requirements_ecore_imf_evas="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_imf_evas}" -requirements_ecore_input="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_input}" -requirements_ecore_input_evas="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_input_evas}" -requirements_ecore_ipc="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_ipc}" -requirements_ecore_cocoa="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_cocoa}" -requirements_ecore_sdl="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_sdl}" -requirements_ecore_psl1ght="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_sdl}" -requirements_ecore_win32="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_win32}" -requirements_ecore_wince="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_wince}" -requirements_ecore_x="ecore >= 1.1.0 eina >= 1.1.0 ${requirements_ecore_x}" +#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}" # glib support (main loop integration) @@ -1161,7 +1171,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.0], +PKG_CHECK_MODULES([EVAS], [evas >= 1.1.99], [have_evas="yes"], [have_evas="no"]) @@ -1190,7 +1200,7 @@ esac # ecore_con -AC_CHECK_HEADERS([arpa/inet.h arpa/nameser.h netinet/tcp.h netinet/in.h sys/socket.h sys/un.h ws2tcpip.h netdb.h]) +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]) if test "x${ac_cv_header_netdb_h}" = "xyes" ; then have_addrinfo="yes" @@ -1474,7 +1484,10 @@ 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.0 ${requirements_ecore_ipc}"]) + [ + requirements_ecore_ipc="ecore-con >= 1.1.99 ${requirements_ecore_ipc}" + requirements_ecore_evas="ecore-ipc >= 1.1.99 ${requirements_ecore_evas}" + ]) # ecore_file ECORE_CHECK_MODULE([file], [${want_ecore_file}], [File]) @@ -1488,7 +1501,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.0 ${requirements_ecore_file}" + requirements_ecore_file="ecore-con >= 1.1.99 ${requirements_ecore_file}" else ECORE_CHECK_CURL([${want_curl}], [ @@ -1507,7 +1520,7 @@ fi #fi #ECORE_CHECK_MODULE([config], [${want_ecore_config}], [Config], [${ecore_config_deps}], -# [requirements_ecore_config="ecore-ipc >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 ${requirements_ecore_config}"]) +# [requirements_ecore_config="ecore-ipc >= 1.1.99 evas >= 1.1.99 eet >= 1.5.0 ${requirements_ecore_config}"]) AM_CONDITIONAL(BUILD_ECORE_CONFIG, false) @@ -1523,12 +1536,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.0 evas >= 1.1.0 ${requirements_ecore_imf_evas}"]) + [requirements_ecore_imf_evas="ecore-imf >= 1.1.99 evas >= 1.1.99 ${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.0 evas >= 1.1.0 ${requirements_ecore_input}"]) + [requirements_ecore_input_evas="ecore-input >= 1.1.99 evas >= 1.1.99 ${requirements_ecore_input}"]) # ecore_imf_xim AM_CONDITIONAL(BUILD_ECORE_IMF_XIM, false) @@ -1542,7 +1555,23 @@ 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.0 ecore-x >= 1.1.0 ecore-input >= 1.1.0 ${requirements_ecore_imf_xim}"]) + [requirements_ecore_imf_xim="ecore-imf >= 1.1.99 ecore-x >= 1.1.99 ecore-input >= 1.1.99 ${requirements_ecore_imf_xim}"]) + +# ecore_imf_scim +PKG_CHECK_MODULES([SCIM], [scim], [have_scim="yes"], [have_scim="no"]) + +AM_CONDITIONAL(BUILD_ECORE_IMF_SCIM, false) +ecore_imf_scim_deps="no" +echo "have_ecore_x_xlib: ${have_ecore_x_xlib}" +if test "x${have_ecore_imf}" = "xyes" \ + -a "x${have_scim}" = "xyes" \ + -a "x${have_ecore_input}" = "xyes" ; then + ecore_imf_scim_deps="yes" + AC_DEFINE(BUILD_ECORE_IMF_SCIM, 1, [Ecore Imf SCIM Support]) +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}"]) ## Graphic systems @@ -1557,7 +1586,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.0 ${requirements_ecore_x}" + requirements_ecore_x="ecore-input >= 1.1.99 ${requirements_ecore_x}" ]) # ecore_win32 @@ -1565,7 +1594,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.0 ${requirements_ecore_win32}" + requirements_ecore_win32="ecore-input >= 1.1.99 ${requirements_ecore_win32}" ]) AC_SUBST(ecore_win32_libs) @@ -1577,7 +1606,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.0 ${requirements_ecore_cocoa}"]) + [requirements_ecore_cocoa="ecore-input >= 1.1.99 ${requirements_ecore_cocoa}"]) # ecore_sdl @@ -1587,10 +1616,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.0 ${requirements_ecore_sdl}"]) + [requirements_ecore_sdl="ecore-input >= 1.1.99 ${requirements_ecore_sdl}"]) ECORE_CHECK_MODULE([psl1ght], [${want_ecore_psl1ght}], [psl1ght], [${ecore_psl1ght_deps}], - [requirements_ecore_psl1ght="ecore-input >= 1.1.0 ${requirements_ecore_psl1ght}"]) + [requirements_ecore_psl1ght="ecore-input >= 1.1.99 ${requirements_ecore_psl1ght}"]) # ecore_fb ECORE_CHECK_MODULE([fb], [${want_ecore_fb}], [FB], [$have_fb]) @@ -1612,7 +1641,7 @@ 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.0 ${requirements_ecore_win32}"]) + [requirements_ecore_win32="ecore-input >= 1.1.99 ${requirements_ecore_win32}"]) ## Ecore Evas @@ -1624,7 +1653,7 @@ if test "x${have_evas}" = "xyes" -a "x${have_ecore_input}" = "xyes" -a "x${have_ fi ECORE_CHECK_MODULE([evas], [${want_ecore_evas}], [Evas], [${ecore_evas_deps}], - [requirements_ecore_evas="ecore-input >= 1.1.0 ecore-input-evas >= 1.1.0 evas >= 1.1.0 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-input >= 1.1.99 ecore-input-evas >= 1.1.99 evas >= 1.1.99 ${requirements_ecore_evas}"]) # ecore_evas_buffer @@ -1714,7 +1743,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.0 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-x >= 1.1.99 ${requirements_ecore_evas}" fi # ecore_evas_win32 @@ -1750,7 +1779,7 @@ 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.0 ${requirements_ecore_evas}" + requirements_ecore_evas="ecore-win32 >= 1.1.99 ${requirements_ecore_evas}" fi # ecore_evas_software_sdl @@ -1759,7 +1788,7 @@ ECORE_EVAS_CHECK_MODULE([software-sdl], [${want_ecore_evas_software_sdl}], [Software SDL], [${have_ecore_sdl}], - [requirements_ecore_evas="ecore-sdl >= 1.1.0 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}"]) # ecore_evas_gl_sdl @@ -1767,7 +1796,7 @@ ECORE_EVAS_CHECK_MODULE([opengl-sdl], [${want_ecore_evas_gl_sdl}], [OpenGL SDL], [${have_ecore_sdl}], - [requirements_ecore_evas="ecore-sdl >= 1.1.0 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}"]) # ecore_evas_cocoa @@ -1775,7 +1804,7 @@ ECORE_EVAS_CHECK_MODULE([opengl-cocoa], [${want_ecore_evas_gl_cocoa}], [OpenGL Cocoa], [${have_ecore_cocoa}], - [requirements_ecore_evas="ecore-cocoa >= 1.1.0 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-cocoa >= 1.1.99 ${requirements_ecore_evas}"]) # ecore_evas_directfb @@ -1783,7 +1812,7 @@ ECORE_EVAS_CHECK_MODULE([directfb], [${want_ecore_evas_directfb}], [DirectFB], [${have_ecore_directfb}], - [requirements_ecore_evas="ecore-directfb >= 1.1.0 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-directfb >= 1.1.99 ${requirements_ecore_evas}"]) # ecore_evas_fb @@ -1791,7 +1820,7 @@ ECORE_EVAS_CHECK_MODULE([fb], [${want_ecore_evas_fb}], [Linux Framebuffer], [${have_ecore_fb}], - [requirements_ecore_evas="ecore-fb >= 1.1.0 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-fb >= 1.1.99 ${requirements_ecore_evas}"]) # ecore_evas_wince @@ -1799,7 +1828,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.0 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-wince >= 1.1.99 ${requirements_ecore_evas}"]) # ecore_evas_ews @@ -1814,7 +1843,40 @@ ECORE_EVAS_CHECK_MODULE([psl1ght], [${want_ecore_evas_psl1ght}], [PSL1GHT], [${have_ecore_psl1ght}], - [requirements_ecore_evas="ecore-psl1ght >= 1.1.0 ${requirements_ecore_evas}"]) + [requirements_ecore_evas="ecore-psl1ght >= 1.1.99 ${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"]) +fi +if test "x${have_ecore_input}" = "xyes" -a "x${have_wayland}" = "xyes" ; then + ecore_wayland_deps="yes" +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}" +fi + +ECORE_EVAS_CHECK_MODULE_FULL([wayland-shm], [wayland-shm], + [${want_ecore_evas_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], + [${want_ecore_evas_wayland_egl}], + [Wayland Egl], + [${have_ecore_wayland}], + [ + PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl], [have_wayland_egl="yes"], [have_wayland_egl="no"]) + if test "x${have_wayland_egl}" = "xyes" ; then + requirements_ecore_evas="wayland-egl egl ${requirements_ecore_wayland} ${requirements_ecore_evas}" + fi + ]) ### install and build examples @@ -1842,6 +1904,8 @@ AC_SUBST(requirements_ecore_x) AC_SUBST(requirements_ecore_win32) AC_SUBST(requirements_ecore_wince) AC_SUBST(requirements_ecore_imf_xim) +AC_SUBST(requirements_ecore_imf_scim) +AC_SUBST(requirements_ecore_wayland) AC_CONFIG_FILES([ Makefile @@ -1862,6 +1926,7 @@ ecore-sdl.pc ecore-cocoa.pc ecore-psl1ght.pc ecore-wince.pc +ecore-wayland.pc ecore.pc doc/ecore.dox doc/Makefile @@ -1890,11 +1955,13 @@ src/lib/ecore_wince/Makefile src/lib/ecore_x/Makefile src/lib/ecore_x/xlib/Makefile src/lib/ecore_x/xcb/Makefile +src/lib/ecore_wayland/Makefile src/examples/Makefile src/tests/Makefile src/modules/Makefile src/modules/immodules/Makefile src/modules/immodules/xim/Makefile +src/modules/immodules/scim/Makefile ecore.spec $po_makefile_in ]) @@ -1953,6 +2020,7 @@ fi #echo " Ecore_Config.................: $have_ecore_config (deprecated)" echo " Ecore_IMF....................: $have_ecore_imf" echo " XIM........................: $have_ecore_imf_xim" +echo " SCIM.......................: $have_ecore_imf_scim" echo " Ecore_IMF_Evas...............: $have_ecore_imf_evas" echo " Ecore_Input..................: $have_ecore_input" echo " Ecore_Input_Evas.............: $have_ecore_input_evas" @@ -2008,6 +2076,7 @@ fi echo " Ecore_DirectFB...............: $have_ecore_directfb" echo " Ecore_WinCE..................: $have_ecore_wince" echo " Ecore_PSL1GHT................: $have_ecore_psl1ght" +echo " Ecore_Wayland................: $have_ecore_wayland" echo echo " Ecore Evas:" @@ -2041,6 +2110,8 @@ if test "x${have_ecore_evas}" = "xyes" ; then echo " Software 16bit DirectDraw..: $have_ecore_evas_software_16_ddraw" echo " Software 16bit WinCE.......: $have_ecore_evas_software_16_wince" 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" fi echo echo " Tests................: ${enable_tests}" diff --git a/libraries/ecore/doc/Makefile.in b/libraries/ecore/doc/Makefile.in index 751df91..e71c120 100644 --- a/libraries/ecore/doc/Makefile.in +++ b/libraries/ecore/doc/Makefile.in @@ -188,10 +188,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -210,6 +210,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -323,6 +327,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -335,6 +341,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -379,12 +387,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/ecore-wayland.pc.in b/libraries/ecore/ecore-wayland.pc.in new file mode 100644 index 0000000..f4f5cf3 --- /dev/null +++ b/libraries/ecore/ecore-wayland.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: ecore-wayland +Description: E core library, Wayland module +@pkgconfig_requires_private@: @requirements_ecore_wayland@ +Version: @VERSION@ +Libs: -L${libdir} -lecore_wayland +Libs.private: -lwayland-client +Cflags: -I${includedir}/ecore-@VMAJ@ diff --git a/libraries/ecore/ecore.spec b/libraries/ecore/ecore.spec index a81327f..475a2d7 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.0 +Version: 1.1.99.67344 Release: %{_rel} License: BSD Group: User Interface/X @@ -176,7 +176,6 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr(-, root, root) %doc AUTHORS COPYING* README* -%{_bindir}/ecore_test %{_libdir}/libecore*.so.* %files devel diff --git a/libraries/ecore/ecore.spec.in b/libraries/ecore/ecore.spec.in index f542bf7..bab3df5 100644 --- a/libraries/ecore/ecore.spec.in +++ b/libraries/ecore/ecore.spec.in @@ -176,7 +176,6 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr(-, root, root) %doc AUTHORS COPYING* README* -%{_bindir}/ecore_test %{_libdir}/libecore*.so.* %files devel diff --git a/libraries/ecore/ecore.supp b/libraries/ecore/ecore.supp index 31dd0e0..0b10a6c 100644 --- a/libraries/ecore/ecore.supp +++ b/libraries/ecore/ecore.supp @@ -1,4 +1,4 @@ -# $Id: ecore.supp 35497 2008-08-17 07:44:18Z raster $ +# $Id: ecore.supp 11909 2004-10-19 16:40:25Z tsauerbeck $ # valgrind suppression file for Ecore # { diff --git a/libraries/ecore/ltmain.sh b/libraries/ecore/ltmain.sh index fa4b1e1..7ed280b 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-2ubuntu3 +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,7 +73,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" +VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" TIMESTAMP="" package_revision=1.3017 diff --git a/libraries/ecore/po/cs.gmo b/libraries/ecore/po/cs.gmo index 4fae46d..44b8f00 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 0abeb48..436b1a7 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: 2011-11-16 14:38+0900\n" +"POT-Creation-Date: 2012-01-23 23:19+1000\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:90 +#: src/lib/ecore/ecore_getopt.c:91 msgid "Version:" msgstr "Verze:" -#: src/lib/ecore/ecore_getopt.c:99 +#: src/lib/ecore/ecore_getopt.c:100 msgid "Usage:" msgstr "Použití:" -#: src/lib/ecore/ecore_getopt.c:104 +#: src/lib/ecore/ecore_getopt.c:105 #, c-format msgid "%s [options]\n" msgstr "%s [volby]\n" -#: src/lib/ecore/ecore_getopt.c:259 +#: src/lib/ecore/ecore_getopt.c:260 msgid "Copyright:" msgstr "Copyright:" -#: src/lib/ecore/ecore_getopt.c:271 +#: src/lib/ecore/ecore_getopt.c:272 msgid "License:" msgstr "Licence:" -#: src/lib/ecore/ecore_getopt.c:452 +#: src/lib/ecore/ecore_getopt.c:453 msgid "Type: " msgstr "Typ: " -#: src/lib/ecore/ecore_getopt.c:528 +#: src/lib/ecore/ecore_getopt.c:529 msgid "Default: " msgstr "Výchozí: " -#: src/lib/ecore/ecore_getopt.c:555 +#: src/lib/ecore/ecore_getopt.c:556 msgid "Choices: " msgstr "Možnosti: " -#: src/lib/ecore/ecore_getopt.c:656 +#: src/lib/ecore/ecore_getopt.c:657 msgid "Options:\n" msgstr "Volby:\n" -#: src/lib/ecore/ecore_getopt.c:781 +#: src/lib/ecore/ecore_getopt.c:782 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "CHYBA: neznámá volba --%s.\n" -#: src/lib/ecore/ecore_getopt.c:783 +#: src/lib/ecore/ecore_getopt.c:784 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "CHYBA: neznámá volba -%c.\n" -#: src/lib/ecore/ecore_getopt.c:841 +#: src/lib/ecore/ecore_getopt.c:842 msgid "ERROR: " msgstr "CHYBA: " -#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061 -#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092 -#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156 -#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317 +#: 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 msgid "value has no pointer set.\n" msgstr "hodnota nemá nastaven pointer.\n" -#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176 +#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 #, c-format msgid "unknown boolean value %s.\n" msgstr "neznámá boolean hodnota %s.\n" -#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264 +#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 #, c-format msgid "invalid number format %s\n" msgstr "neznámý číselný formát %s\n" -#: src/lib/ecore/ecore_getopt.c:1122 +#: src/lib/ecore/ecore_getopt.c:1123 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "neznámá volba \"%s\". Možné hodnoty jsou: " -#: src/lib/ecore/ecore_getopt.c:1150 +#: src/lib/ecore/ecore_getopt.c:1151 msgid "missing parameter to append.\n" msgstr "chybějící parametr k připojení.\n" -#: src/lib/ecore/ecore_getopt.c:1254 +#: src/lib/ecore/ecore_getopt.c:1255 msgid "could not parse value.\n" msgstr "nemůžu parsovat hodnotu.\n" -#: src/lib/ecore/ecore_getopt.c:1311 +#: src/lib/ecore/ecore_getopt.c:1312 msgid "missing parameter.\n" msgstr "chybějící parametr.\n" -#: src/lib/ecore/ecore_getopt.c:1324 +#: src/lib/ecore/ecore_getopt.c:1325 msgid "missing callback function!\n" msgstr "chybějící callback funkce!\n" -#: src/lib/ecore/ecore_getopt.c:1353 +#: src/lib/ecore/ecore_getopt.c:1354 msgid "no version was defined.\n" msgstr "nebyla definována verze.\n" -#: src/lib/ecore/ecore_getopt.c:1370 +#: src/lib/ecore/ecore_getopt.c:1371 msgid "no copyright was defined.\n" msgstr "nebyl definován copyright.\n" -#: src/lib/ecore/ecore_getopt.c:1387 +#: src/lib/ecore/ecore_getopt.c:1388 msgid "no license was defined.\n" msgstr "nebyla definována licence.\n" -#: src/lib/ecore/ecore_getopt.c:1462 +#: src/lib/ecore/ecore_getopt.c:1463 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "CHYBA: neznámá volba --%s, ignoruji.\n" -#: src/lib/ecore/ecore_getopt.c:1495 +#: src/lib/ecore/ecore_getopt.c:1496 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "CHYBA: volba --%s vyžaduje argument!\n" -#: src/lib/ecore/ecore_getopt.c:1537 +#: src/lib/ecore/ecore_getopt.c:1538 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "CHYBA: neznámá volba -%c, ignoruji.\n" -#: src/lib/ecore/ecore_getopt.c:1575 +#: src/lib/ecore/ecore_getopt.c:1576 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "CHYBA: volba -%c vyžaduje argument!\n" -#: src/lib/ecore/ecore_getopt.c:1784 +#: src/lib/ecore/ecore_getopt.c:1785 msgid "ERROR: no parser provided.\n" msgstr "CHYBA: nebyl poskytnut parser.\n" -#: src/lib/ecore/ecore_getopt.c:1789 +#: src/lib/ecore/ecore_getopt.c:1790 msgid "ERROR: no values provided.\n" msgstr "CHYBA: nebyly poskytnuty hodnoty.\n" -#: src/lib/ecore/ecore_getopt.c:1798 +#: src/lib/ecore/ecore_getopt.c:1799 msgid "ERROR: no arguments provided.\n" msgstr "CHYBA: nebyly poskytnuty argumenty.\n" -#: src/lib/ecore/ecore_getopt.c:1824 +#: src/lib/ecore/ecore_getopt.c:1825 msgid "ERROR: invalid options found." msgstr "CHYBA: nalezeny neplatné volby." -#: src/lib/ecore/ecore_getopt.c:1830 +#: src/lib/ecore/ecore_getopt.c:1831 #, c-format msgid " See --%s.\n" msgstr " Viz --%s.\n" -#: src/lib/ecore/ecore_getopt.c:1832 +#: src/lib/ecore/ecore_getopt.c:1833 #, c-format msgid " See -%c.\n" msgstr " Viz -%c.\n" -#: src/lib/ecore/ecore_getopt.c:1873 +#: src/lib/ecore/ecore_getopt.c:1875 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "CHYBA: neplatná hodnota geometrie '%s'\n" -#: src/lib/ecore/ecore_getopt.c:1900 +#: src/lib/ecore/ecore_getopt.c:1903 #, 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 a3f0c53..b26411f 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 56c2363..c6072bc 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: 2011-11-16 14:38+0900\n" +"POT-Creation-Date: 2012-01-23 23:19+1000\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:90 +#: src/lib/ecore/ecore_getopt.c:91 msgid "Version:" msgstr "Version:" -#: src/lib/ecore/ecore_getopt.c:99 +#: src/lib/ecore/ecore_getopt.c:100 msgid "Usage:" msgstr "Aufruf:" -#: src/lib/ecore/ecore_getopt.c:104 +#: src/lib/ecore/ecore_getopt.c:105 #, c-format msgid "%s [options]\n" msgstr "%s [Optionen]\n" -#: src/lib/ecore/ecore_getopt.c:259 +#: src/lib/ecore/ecore_getopt.c:260 msgid "Copyright:" msgstr "Copyright:" -#: src/lib/ecore/ecore_getopt.c:271 +#: src/lib/ecore/ecore_getopt.c:272 msgid "License:" msgstr "Lizenz:" -#: src/lib/ecore/ecore_getopt.c:452 +#: src/lib/ecore/ecore_getopt.c:453 msgid "Type: " msgstr "Typ: " -#: src/lib/ecore/ecore_getopt.c:528 +#: src/lib/ecore/ecore_getopt.c:529 msgid "Default: " msgstr "Standard: " -#: src/lib/ecore/ecore_getopt.c:555 +#: src/lib/ecore/ecore_getopt.c:556 msgid "Choices: " msgstr "Auswahlmöglichkeiten: " -#: src/lib/ecore/ecore_getopt.c:656 +#: src/lib/ecore/ecore_getopt.c:657 msgid "Options:\n" msgstr "Optionen:\n" -#: src/lib/ecore/ecore_getopt.c:781 +#: src/lib/ecore/ecore_getopt.c:782 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "FEHLER: Unbekannte Option --%s\n" -#: src/lib/ecore/ecore_getopt.c:783 +#: src/lib/ecore/ecore_getopt.c:784 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "FEHLER: Unbekannte Option -%c\n" -#: src/lib/ecore/ecore_getopt.c:841 +#: src/lib/ecore/ecore_getopt.c:842 msgid "ERROR: " msgstr "FEHLER: " -#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061 -#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092 -#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156 -#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317 +#: 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 msgid "value has no pointer set.\n" msgstr "kein Zeiger auf Wert gesetzt\n" -#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176 +#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 #, c-format msgid "unknown boolean value %s.\n" msgstr "unbekannter boolescher Wert %s\n" -#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264 +#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 #, c-format msgid "invalid number format %s\n" msgstr "ungültiges Zahlenformat %s\n" -#: src/lib/ecore/ecore_getopt.c:1122 +#: src/lib/ecore/ecore_getopt.c:1123 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "ungültige Auswahl \"%s\". Gültige Werte sind: " -#: src/lib/ecore/ecore_getopt.c:1150 +#: src/lib/ecore/ecore_getopt.c:1151 msgid "missing parameter to append.\n" msgstr "fehlender Parameter zum Anhängen.\n" -#: src/lib/ecore/ecore_getopt.c:1254 +#: src/lib/ecore/ecore_getopt.c:1255 msgid "could not parse value.\n" msgstr "Wert kann nicht ausgewertet werden.\n" -#: src/lib/ecore/ecore_getopt.c:1311 +#: src/lib/ecore/ecore_getopt.c:1312 msgid "missing parameter.\n" msgstr "fehlender Parameter.\n" -#: src/lib/ecore/ecore_getopt.c:1324 +#: src/lib/ecore/ecore_getopt.c:1325 msgid "missing callback function!\n" msgstr "fehlende Rückruffunktion!\n" -#: src/lib/ecore/ecore_getopt.c:1353 +#: src/lib/ecore/ecore_getopt.c:1354 msgid "no version was defined.\n" msgstr "es wurde keine Version angegeben.\n" -#: src/lib/ecore/ecore_getopt.c:1370 +#: src/lib/ecore/ecore_getopt.c:1371 msgid "no copyright was defined.\n" msgstr "es wurde kein Copyright angegeben.\n" -#: src/lib/ecore/ecore_getopt.c:1387 +#: src/lib/ecore/ecore_getopt.c:1388 msgid "no license was defined.\n" msgstr "es wurde keine Lizenz angegeben.\n" -#: src/lib/ecore/ecore_getopt.c:1462 +#: src/lib/ecore/ecore_getopt.c:1463 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "FEHLER: Unbekannte Option --%s, ignoriert\n" -#: src/lib/ecore/ecore_getopt.c:1495 +#: src/lib/ecore/ecore_getopt.c:1496 #, 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:1537 +#: src/lib/ecore/ecore_getopt.c:1538 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "FEHLER: Unbekannte Option -%c, ignoriert\n" -#: src/lib/ecore/ecore_getopt.c:1575 +#: src/lib/ecore/ecore_getopt.c:1576 #, 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:1784 +#: src/lib/ecore/ecore_getopt.c:1785 msgid "ERROR: no parser provided.\n" msgstr "FEHLER: Kein Parser bereitgestellt.\n" -#: src/lib/ecore/ecore_getopt.c:1789 +#: src/lib/ecore/ecore_getopt.c:1790 msgid "ERROR: no values provided.\n" msgstr "FEHLER: Keine Werte bereitgestellt.\n" -#: src/lib/ecore/ecore_getopt.c:1798 +#: src/lib/ecore/ecore_getopt.c:1799 msgid "ERROR: no arguments provided.\n" msgstr "FEHLER: Keine Argumente bereitgestellt.\n" -#: src/lib/ecore/ecore_getopt.c:1824 +#: src/lib/ecore/ecore_getopt.c:1825 msgid "ERROR: invalid options found." msgstr "FEHLER: Ungültige Optionen gefunden." -#: src/lib/ecore/ecore_getopt.c:1830 +#: src/lib/ecore/ecore_getopt.c:1831 #, c-format msgid " See --%s.\n" msgstr " Siehe --%s\n" -#: src/lib/ecore/ecore_getopt.c:1832 +#: src/lib/ecore/ecore_getopt.c:1833 #, c-format msgid " See -%c.\n" msgstr " Siehe -%c\n" -#: src/lib/ecore/ecore_getopt.c:1873 +#: src/lib/ecore/ecore_getopt.c:1875 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "FEHLER: Falscher Geometriewert \"%s\"\n" -#: src/lib/ecore/ecore_getopt.c:1900 +#: src/lib/ecore/ecore_getopt.c:1903 #, 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 6e15f39..69cbec8 100644 --- a/libraries/ecore/po/ecore.pot +++ b/libraries/ecore/po/ecore.pot @@ -6,170 +6,169 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: ecore 1.1.0\n" +"Project-Id-Version: ecore 1.1.99.67344\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2011-11-16 14:38+0900\n" +"POT-Creation-Date: 2012-01-23 23:19+1000\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:90 +#: src/lib/ecore/ecore_getopt.c:91 msgid "Version:" msgstr "" -#: src/lib/ecore/ecore_getopt.c:99 +#: src/lib/ecore/ecore_getopt.c:100 msgid "Usage:" msgstr "" -#: src/lib/ecore/ecore_getopt.c:104 +#: src/lib/ecore/ecore_getopt.c:105 #, c-format msgid "%s [options]\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:259 +#: src/lib/ecore/ecore_getopt.c:260 msgid "Copyright:" msgstr "" -#: src/lib/ecore/ecore_getopt.c:271 +#: src/lib/ecore/ecore_getopt.c:272 msgid "License:" msgstr "" -#: src/lib/ecore/ecore_getopt.c:452 +#: src/lib/ecore/ecore_getopt.c:453 msgid "Type: " msgstr "" -#: src/lib/ecore/ecore_getopt.c:528 +#: src/lib/ecore/ecore_getopt.c:529 msgid "Default: " msgstr "" -#: src/lib/ecore/ecore_getopt.c:555 +#: src/lib/ecore/ecore_getopt.c:556 msgid "Choices: " msgstr "" -#: src/lib/ecore/ecore_getopt.c:656 +#: src/lib/ecore/ecore_getopt.c:657 msgid "Options:\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:781 +#: src/lib/ecore/ecore_getopt.c:782 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:783 +#: src/lib/ecore/ecore_getopt.c:784 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:841 +#: src/lib/ecore/ecore_getopt.c:842 msgid "ERROR: " msgstr "" -#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061 -#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092 -#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156 -#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317 +#: 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 msgid "value has no pointer set.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176 +#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 #, c-format msgid "unknown boolean value %s.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264 +#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 #, c-format msgid "invalid number format %s\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1122 +#: src/lib/ecore/ecore_getopt.c:1123 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "" -#: src/lib/ecore/ecore_getopt.c:1150 +#: src/lib/ecore/ecore_getopt.c:1151 msgid "missing parameter to append.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1254 +#: src/lib/ecore/ecore_getopt.c:1255 msgid "could not parse value.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1311 +#: src/lib/ecore/ecore_getopt.c:1312 msgid "missing parameter.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1324 +#: src/lib/ecore/ecore_getopt.c:1325 msgid "missing callback function!\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1353 +#: src/lib/ecore/ecore_getopt.c:1354 msgid "no version was defined.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1370 +#: src/lib/ecore/ecore_getopt.c:1371 msgid "no copyright was defined.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1387 +#: src/lib/ecore/ecore_getopt.c:1388 msgid "no license was defined.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1462 +#: src/lib/ecore/ecore_getopt.c:1463 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1495 +#: src/lib/ecore/ecore_getopt.c:1496 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1537 +#: src/lib/ecore/ecore_getopt.c:1538 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1575 +#: src/lib/ecore/ecore_getopt.c:1576 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1784 +#: src/lib/ecore/ecore_getopt.c:1785 msgid "ERROR: no parser provided.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1789 +#: src/lib/ecore/ecore_getopt.c:1790 msgid "ERROR: no values provided.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1798 +#: src/lib/ecore/ecore_getopt.c:1799 msgid "ERROR: no arguments provided.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1824 +#: src/lib/ecore/ecore_getopt.c:1825 msgid "ERROR: invalid options found." msgstr "" -#: src/lib/ecore/ecore_getopt.c:1830 +#: src/lib/ecore/ecore_getopt.c:1831 #, c-format msgid " See --%s.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1832 +#: src/lib/ecore/ecore_getopt.c:1833 #, c-format msgid " See -%c.\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1873 +#: src/lib/ecore/ecore_getopt.c:1875 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "" -#: src/lib/ecore/ecore_getopt.c:1900 +#: src/lib/ecore/ecore_getopt.c:1903 #, 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 222d020..0f2bac2 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 b6f719d..cdf9cf3 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: 2011-11-16 14:38+0900\n" +"POT-Creation-Date: 2012-01-23 23:19+1000\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:90 +#: src/lib/ecore/ecore_getopt.c:91 msgid "Version:" msgstr "Έκδοση:" -#: src/lib/ecore/ecore_getopt.c:99 +#: src/lib/ecore/ecore_getopt.c:100 msgid "Usage:" msgstr "Χρήση:" -#: src/lib/ecore/ecore_getopt.c:104 +#: src/lib/ecore/ecore_getopt.c:105 #, c-format msgid "%s [options]\n" msgstr "%s [επιλογές]\n" -#: src/lib/ecore/ecore_getopt.c:259 +#: src/lib/ecore/ecore_getopt.c:260 msgid "Copyright:" msgstr "Πνευματικά δικαιώματα:" -#: src/lib/ecore/ecore_getopt.c:271 +#: src/lib/ecore/ecore_getopt.c:272 msgid "License:" msgstr "Άδεια:" -#: src/lib/ecore/ecore_getopt.c:452 +#: src/lib/ecore/ecore_getopt.c:453 msgid "Type: " msgstr "Τύπος:" -#: src/lib/ecore/ecore_getopt.c:528 +#: src/lib/ecore/ecore_getopt.c:529 msgid "Default: " msgstr "Προκαθορισμένο:" -#: src/lib/ecore/ecore_getopt.c:555 +#: src/lib/ecore/ecore_getopt.c:556 msgid "Choices: " msgstr "Επιλογές:" -#: src/lib/ecore/ecore_getopt.c:656 +#: src/lib/ecore/ecore_getopt.c:657 msgid "Options:\n" msgstr "Επιλογές:\n" -#: src/lib/ecore/ecore_getopt.c:781 +#: src/lib/ecore/ecore_getopt.c:782 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "ΣΦΑΛΜΑ: άγνωστη επιλογή --%s.\n" -#: src/lib/ecore/ecore_getopt.c:783 +#: src/lib/ecore/ecore_getopt.c:784 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "ΣΦΑΛΜΑ: άγνωστη επιλογή -%c.\n" -#: src/lib/ecore/ecore_getopt.c:841 +#: src/lib/ecore/ecore_getopt.c:842 msgid "ERROR: " msgstr "ΣΦΑΛΜΑ:" -#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061 -#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092 -#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156 -#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317 +#: 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 msgid "value has no pointer set.\n" msgstr "η τιμή δεν έχει δείκτη ορισμένο.\n" -#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176 +#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 #, c-format msgid "unknown boolean value %s.\n" msgstr "άγνωστη τιμή boolean %s.\n" -#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264 +#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 #, c-format msgid "invalid number format %s\n" msgstr "άγνωστη μορφή αριθμού %s\n" -#: src/lib/ecore/ecore_getopt.c:1122 +#: src/lib/ecore/ecore_getopt.c:1123 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "μη έγκυρη επιλογή \"%s\". Οι έγκυρες τιμές είναι: " -#: src/lib/ecore/ecore_getopt.c:1150 +#: src/lib/ecore/ecore_getopt.c:1151 msgid "missing parameter to append.\n" msgstr "ελλιπής παράμετρος προς επισύναψη.\n" -#: src/lib/ecore/ecore_getopt.c:1254 +#: src/lib/ecore/ecore_getopt.c:1255 msgid "could not parse value.\n" msgstr "αδυναμία ανάλυσης τιμών.\n" -#: src/lib/ecore/ecore_getopt.c:1311 +#: src/lib/ecore/ecore_getopt.c:1312 msgid "missing parameter.\n" msgstr "ελλιπής παράμετρος.\n" -#: src/lib/ecore/ecore_getopt.c:1324 +#: src/lib/ecore/ecore_getopt.c:1325 msgid "missing callback function!\n" msgstr "λείπει η λειτουργία επανάκλησης!\n" -#: src/lib/ecore/ecore_getopt.c:1353 +#: src/lib/ecore/ecore_getopt.c:1354 msgid "no version was defined.\n" msgstr "δεν έχει οριστεί έκδοση.\n" -#: src/lib/ecore/ecore_getopt.c:1370 +#: src/lib/ecore/ecore_getopt.c:1371 msgid "no copyright was defined.\n" msgstr "δεν έχουν οριστεί πνευματικά δικαιώματα.\n" -#: src/lib/ecore/ecore_getopt.c:1387 +#: src/lib/ecore/ecore_getopt.c:1388 msgid "no license was defined.\n" msgstr "δεν έχει οριστεί άδεια.\n" -#: src/lib/ecore/ecore_getopt.c:1462 +#: src/lib/ecore/ecore_getopt.c:1463 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "ΣΦΑΛΜΑ:άγνωστη επιλογή --%s, αγνοήθηκε.\n" -#: src/lib/ecore/ecore_getopt.c:1495 +#: src/lib/ecore/ecore_getopt.c:1496 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "ΣΦΑΛΜΑ: η επιλογή --%s απαιτεί παραμέτρους!\n" -#: src/lib/ecore/ecore_getopt.c:1537 +#: src/lib/ecore/ecore_getopt.c:1538 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "ΣΦΑΛΜΑ: άγνωστη επιλογή -%c, αγνοήθηκε.\n" -#: src/lib/ecore/ecore_getopt.c:1575 +#: src/lib/ecore/ecore_getopt.c:1576 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "ΣΦAΛΜΑ: η επιλογή -%c απαιτεί μία παράμετρο!\n" -#: src/lib/ecore/ecore_getopt.c:1784 +#: src/lib/ecore/ecore_getopt.c:1785 #, fuzzy msgid "ERROR: no parser provided.\n" msgstr "ΣΦΑΛΜΑ:δεν παρέχεται αναλυτής.\n" -#: src/lib/ecore/ecore_getopt.c:1789 +#: src/lib/ecore/ecore_getopt.c:1790 msgid "ERROR: no values provided.\n" msgstr "ΣΦΑΛΜΑ:δεν έχουν δοθεί τιμές.\n" -#: src/lib/ecore/ecore_getopt.c:1798 +#: src/lib/ecore/ecore_getopt.c:1799 msgid "ERROR: no arguments provided.\n" msgstr "ΣΦΑΛΜΑ:δεν έχουν δοθεί παράμετροι.\n" -#: src/lib/ecore/ecore_getopt.c:1824 +#: src/lib/ecore/ecore_getopt.c:1825 msgid "ERROR: invalid options found." msgstr "ΣΦΑΛΜΑ: βρέθηκαν μη έγκυρες επιλογές." -#: src/lib/ecore/ecore_getopt.c:1830 +#: src/lib/ecore/ecore_getopt.c:1831 #, c-format msgid " See --%s.\n" msgstr " Δείτε --%s.\n" -#: src/lib/ecore/ecore_getopt.c:1832 +#: src/lib/ecore/ecore_getopt.c:1833 #, c-format msgid " See -%c.\n" msgstr " Δείτε -%c.\n" -#: src/lib/ecore/ecore_getopt.c:1873 +#: src/lib/ecore/ecore_getopt.c:1875 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "ΣΦΑΛΜΑ: μη έγκυρη γεωμετρική τιμή '%s'\n" -#: src/lib/ecore/ecore_getopt.c:1900 +#: src/lib/ecore/ecore_getopt.c:1903 #, 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 a7ca470..2669256 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 dc95281..6c752c1 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: 2011-11-16 14:38+0900\n" +"POT-Creation-Date: 2012-01-23 23:19+1000\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:90 +#: src/lib/ecore/ecore_getopt.c:91 msgid "Version:" msgstr "Version :" -#: src/lib/ecore/ecore_getopt.c:99 +#: src/lib/ecore/ecore_getopt.c:100 msgid "Usage:" msgstr "Usage :" -#: src/lib/ecore/ecore_getopt.c:104 +#: src/lib/ecore/ecore_getopt.c:105 #, c-format msgid "%s [options]\n" msgstr "%s [options]\n" -#: src/lib/ecore/ecore_getopt.c:259 +#: src/lib/ecore/ecore_getopt.c:260 msgid "Copyright:" msgstr "Copyright :" -#: src/lib/ecore/ecore_getopt.c:271 +#: src/lib/ecore/ecore_getopt.c:272 msgid "License:" msgstr "Licence :" -#: src/lib/ecore/ecore_getopt.c:452 +#: src/lib/ecore/ecore_getopt.c:453 msgid "Type: " msgstr "Type : " -#: src/lib/ecore/ecore_getopt.c:528 +#: src/lib/ecore/ecore_getopt.c:529 msgid "Default: " msgstr "Par défaut :" -#: src/lib/ecore/ecore_getopt.c:555 +#: src/lib/ecore/ecore_getopt.c:556 msgid "Choices: " msgstr "Choix :" -#: src/lib/ecore/ecore_getopt.c:656 +#: src/lib/ecore/ecore_getopt.c:657 msgid "Options:\n" msgstr "Options :\n" -#: src/lib/ecore/ecore_getopt.c:781 +#: src/lib/ecore/ecore_getopt.c:782 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "ERREUR : option inconnue --%s.\n" -#: src/lib/ecore/ecore_getopt.c:783 +#: src/lib/ecore/ecore_getopt.c:784 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "ERREUR : option inconnue -%c.\n" -#: src/lib/ecore/ecore_getopt.c:841 +#: src/lib/ecore/ecore_getopt.c:842 msgid "ERROR: " msgstr "ERREUR :" -#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061 -#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092 -#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156 -#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317 +#: 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 msgid "value has no pointer set.\n" msgstr "la valeur n'a aucun pointeur défini.\n" -#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176 +#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 #, c-format msgid "unknown boolean value %s.\n" msgstr "valeur booléenne inconnue %s.\n" -#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264 +#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 #, c-format msgid "invalid number format %s\n" msgstr "format du nombre non valide %s\n" -#: src/lib/ecore/ecore_getopt.c:1122 +#: src/lib/ecore/ecore_getopt.c:1123 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "choix non valide « %s ». Les valeurs valides sont : " -#: src/lib/ecore/ecore_getopt.c:1150 +#: src/lib/ecore/ecore_getopt.c:1151 msgid "missing parameter to append.\n" msgstr "paramètre manquant à ajouter.\n" -#: src/lib/ecore/ecore_getopt.c:1254 +#: src/lib/ecore/ecore_getopt.c:1255 msgid "could not parse value.\n" msgstr "analyse de la valeur impossible.\n" -#: src/lib/ecore/ecore_getopt.c:1311 +#: src/lib/ecore/ecore_getopt.c:1312 msgid "missing parameter.\n" msgstr "paramètre manquant.\n" -#: src/lib/ecore/ecore_getopt.c:1324 +#: src/lib/ecore/ecore_getopt.c:1325 msgid "missing callback function!\n" msgstr "fonction de rappel manquante !\n" -#: src/lib/ecore/ecore_getopt.c:1353 +#: src/lib/ecore/ecore_getopt.c:1354 msgid "no version was defined.\n" msgstr "aucune version n'est définie.\n" -#: src/lib/ecore/ecore_getopt.c:1370 +#: src/lib/ecore/ecore_getopt.c:1371 msgid "no copyright was defined.\n" msgstr "aucun copyright n'est défini.\n" -#: src/lib/ecore/ecore_getopt.c:1387 +#: src/lib/ecore/ecore_getopt.c:1388 msgid "no license was defined.\n" msgstr "aucune licence n'est définie.\n" -#: src/lib/ecore/ecore_getopt.c:1462 +#: src/lib/ecore/ecore_getopt.c:1463 #, 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:1495 +#: src/lib/ecore/ecore_getopt.c:1496 #, 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:1537 +#: src/lib/ecore/ecore_getopt.c:1538 #, 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:1575 +#: src/lib/ecore/ecore_getopt.c:1576 #, 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:1784 +#: src/lib/ecore/ecore_getopt.c:1785 msgid "ERROR: no parser provided.\n" msgstr "ERREUR : aucun analyseur n'est fourni.\n" -#: src/lib/ecore/ecore_getopt.c:1789 +#: src/lib/ecore/ecore_getopt.c:1790 msgid "ERROR: no values provided.\n" msgstr "ERREUR : aucune valeur n'est fournie.\n" -#: src/lib/ecore/ecore_getopt.c:1798 +#: src/lib/ecore/ecore_getopt.c:1799 msgid "ERROR: no arguments provided.\n" msgstr "ERREUR : aucun argument n'est fourni.\n" -#: src/lib/ecore/ecore_getopt.c:1824 +#: src/lib/ecore/ecore_getopt.c:1825 msgid "ERROR: invalid options found." msgstr "ERREUR : options non valides détectées." -#: src/lib/ecore/ecore_getopt.c:1830 +#: src/lib/ecore/ecore_getopt.c:1831 #, c-format msgid " See --%s.\n" msgstr " Voir --%s.\n" -#: src/lib/ecore/ecore_getopt.c:1832 +#: src/lib/ecore/ecore_getopt.c:1833 #, c-format msgid " See -%c.\n" msgstr " Voir -%c.\n" -#: src/lib/ecore/ecore_getopt.c:1873 +#: src/lib/ecore/ecore_getopt.c:1875 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "ERREUR : valeur géométrique incorrecte « %s »\n" -#: src/lib/ecore/ecore_getopt.c:1900 +#: src/lib/ecore/ecore_getopt.c:1903 #, 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 a8e6e47..3361b47 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 51458f3..b4ff61d 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: 2011-11-16 14:38+0900\n" +"POT-Creation-Date: 2012-01-23 23:19+1000\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:90 +#: src/lib/ecore/ecore_getopt.c:91 msgid "Version:" msgstr "Versione:" -#: src/lib/ecore/ecore_getopt.c:99 +#: src/lib/ecore/ecore_getopt.c:100 msgid "Usage:" msgstr "Uso:" -#: src/lib/ecore/ecore_getopt.c:104 +#: src/lib/ecore/ecore_getopt.c:105 #, c-format msgid "%s [options]\n" msgstr "%s [opzioni]\n" -#: src/lib/ecore/ecore_getopt.c:259 +#: src/lib/ecore/ecore_getopt.c:260 msgid "Copyright:" msgstr "Copyright:" -#: src/lib/ecore/ecore_getopt.c:271 +#: src/lib/ecore/ecore_getopt.c:272 msgid "License:" msgstr "Licenza:" -#: src/lib/ecore/ecore_getopt.c:452 +#: src/lib/ecore/ecore_getopt.c:453 msgid "Type: " msgstr "Tipo: " -#: src/lib/ecore/ecore_getopt.c:528 +#: src/lib/ecore/ecore_getopt.c:529 msgid "Default: " msgstr "Predefinito:" -#: src/lib/ecore/ecore_getopt.c:555 +#: src/lib/ecore/ecore_getopt.c:556 msgid "Choices: " msgstr "Scelte:" -#: src/lib/ecore/ecore_getopt.c:656 +#: src/lib/ecore/ecore_getopt.c:657 msgid "Options:\n" msgstr "Opzioni:\n" -#: src/lib/ecore/ecore_getopt.c:781 +#: src/lib/ecore/ecore_getopt.c:782 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "ERRORE: opzione sconosciuta --%s.\n" -#: src/lib/ecore/ecore_getopt.c:783 +#: src/lib/ecore/ecore_getopt.c:784 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "ERRORE: opzione sconosciuta -%c.\n" -#: src/lib/ecore/ecore_getopt.c:841 +#: src/lib/ecore/ecore_getopt.c:842 msgid "ERROR: " msgstr "ERRORE:" -#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061 -#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092 -#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156 -#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317 +#: 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 msgid "value has no pointer set.\n" msgstr "il valore non ha puntatori impostati.\n" -#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176 +#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 #, c-format msgid "unknown boolean value %s.\n" msgstr "valore booleano sconosciuto %s.\n" -#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264 +#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 #, c-format msgid "invalid number format %s\n" msgstr "formato numero non valido %s\n" -#: src/lib/ecore/ecore_getopt.c:1122 +#: src/lib/ecore/ecore_getopt.c:1123 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "scelta non valida \"%s\". I valori ammessi sono: " -#: src/lib/ecore/ecore_getopt.c:1150 +#: src/lib/ecore/ecore_getopt.c:1151 msgid "missing parameter to append.\n" msgstr "parametro da appendere mancante.\n" -#: src/lib/ecore/ecore_getopt.c:1254 +#: src/lib/ecore/ecore_getopt.c:1255 msgid "could not parse value.\n" msgstr "impossibile il parsing del valore.\n" -#: src/lib/ecore/ecore_getopt.c:1311 +#: src/lib/ecore/ecore_getopt.c:1312 msgid "missing parameter.\n" msgstr "parametro mancante.\n" -#: src/lib/ecore/ecore_getopt.c:1324 +#: src/lib/ecore/ecore_getopt.c:1325 msgid "missing callback function!\n" msgstr "funzione callback mancante!\n" -#: src/lib/ecore/ecore_getopt.c:1353 +#: src/lib/ecore/ecore_getopt.c:1354 msgid "no version was defined.\n" msgstr "nessuna versione definita.\n" -#: src/lib/ecore/ecore_getopt.c:1370 +#: src/lib/ecore/ecore_getopt.c:1371 msgid "no copyright was defined.\n" msgstr "nessun copyright definito.\n" -#: src/lib/ecore/ecore_getopt.c:1387 +#: src/lib/ecore/ecore_getopt.c:1388 msgid "no license was defined.\n" msgstr "nessuna licenza definita.\n" -#: src/lib/ecore/ecore_getopt.c:1462 +#: src/lib/ecore/ecore_getopt.c:1463 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "ERRORE: opzione sconosciuta --%s, ignorata.\n" -#: src/lib/ecore/ecore_getopt.c:1495 +#: src/lib/ecore/ecore_getopt.c:1496 #, 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:1537 +#: src/lib/ecore/ecore_getopt.c:1538 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "ERRORE: opzione sconosciuta -%c, ignorata.\n" -#: src/lib/ecore/ecore_getopt.c:1575 +#: src/lib/ecore/ecore_getopt.c:1576 #, 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:1784 +#: src/lib/ecore/ecore_getopt.c:1785 msgid "ERROR: no parser provided.\n" msgstr "ERRORE: nessun parser fornito.\n" -#: src/lib/ecore/ecore_getopt.c:1789 +#: src/lib/ecore/ecore_getopt.c:1790 msgid "ERROR: no values provided.\n" msgstr "ERRORE: nessun valore fornito.\n" -#: src/lib/ecore/ecore_getopt.c:1798 +#: src/lib/ecore/ecore_getopt.c:1799 msgid "ERROR: no arguments provided.\n" msgstr "ERRORE: nessun argomento fornito.\n" -#: src/lib/ecore/ecore_getopt.c:1824 +#: src/lib/ecore/ecore_getopt.c:1825 msgid "ERROR: invalid options found." msgstr "ERRORE: trovate opzioni non valide." -#: src/lib/ecore/ecore_getopt.c:1830 +#: src/lib/ecore/ecore_getopt.c:1831 #, c-format msgid " See --%s.\n" msgstr " Vedere --%s.\n" -#: src/lib/ecore/ecore_getopt.c:1832 +#: src/lib/ecore/ecore_getopt.c:1833 #, c-format msgid " See -%c.\n" msgstr " Vedere -%c.\n" -#: src/lib/ecore/ecore_getopt.c:1873 +#: src/lib/ecore/ecore_getopt.c:1875 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "ERRORE: valore geometrico non corretto '%s'\n" -#: src/lib/ecore/ecore_getopt.c:1900 +#: src/lib/ecore/ecore_getopt.c:1903 #, 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 5d2fef3..746f7df 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 34c04a9..04e3256 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: 2011-11-16 14:38+0900\n" +"POT-Creation-Date: 2012-01-23 23:19+1000\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:90 +#: src/lib/ecore/ecore_getopt.c:91 msgid "Version:" msgstr "Versie:" -#: src/lib/ecore/ecore_getopt.c:99 +#: src/lib/ecore/ecore_getopt.c:100 msgid "Usage:" msgstr "Gebruik:" -#: src/lib/ecore/ecore_getopt.c:104 +#: src/lib/ecore/ecore_getopt.c:105 #, c-format msgid "%s [options]\n" msgstr "%s [opties]\n" -#: src/lib/ecore/ecore_getopt.c:259 +#: src/lib/ecore/ecore_getopt.c:260 msgid "Copyright:" msgstr "Copyright:" -#: src/lib/ecore/ecore_getopt.c:271 +#: src/lib/ecore/ecore_getopt.c:272 msgid "License:" msgstr "Licentie:" -#: src/lib/ecore/ecore_getopt.c:452 +#: src/lib/ecore/ecore_getopt.c:453 msgid "Type: " msgstr "Type:" -#: src/lib/ecore/ecore_getopt.c:528 +#: src/lib/ecore/ecore_getopt.c:529 msgid "Default: " msgstr "Standaard:" -#: src/lib/ecore/ecore_getopt.c:555 +#: src/lib/ecore/ecore_getopt.c:556 msgid "Choices: " msgstr "Keuzes:" -#: src/lib/ecore/ecore_getopt.c:656 +#: src/lib/ecore/ecore_getopt.c:657 msgid "Options:\n" msgstr "Opties:\n" -#: src/lib/ecore/ecore_getopt.c:781 +#: src/lib/ecore/ecore_getopt.c:782 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "FOUT: onbekende optie --%s.\n" -#: src/lib/ecore/ecore_getopt.c:783 +#: src/lib/ecore/ecore_getopt.c:784 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "FOUT: onbekende optie -%c.\n" -#: src/lib/ecore/ecore_getopt.c:841 +#: src/lib/ecore/ecore_getopt.c:842 msgid "ERROR: " msgstr "FOUT:" -#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061 -#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092 -#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156 -#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317 +#: 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 msgid "value has no pointer set.\n" msgstr "waarde heeft geen pointer ingsteld.\n" -#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176 +#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 #, c-format msgid "unknown boolean value %s.\n" msgstr "onbekende boolean-waarde %s.\n" -#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264 +#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 #, c-format msgid "invalid number format %s\n" msgstr "ongeldig nummerformaat %s\n" -#: src/lib/ecore/ecore_getopt.c:1122 +#: src/lib/ecore/ecore_getopt.c:1123 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "ongeldige keuze \"%s\". Geldige waardes zijn:" -#: src/lib/ecore/ecore_getopt.c:1150 +#: src/lib/ecore/ecore_getopt.c:1151 msgid "missing parameter to append.\n" msgstr "parameter om toe te wijzen ontbreekt.\n" -#: src/lib/ecore/ecore_getopt.c:1254 +#: src/lib/ecore/ecore_getopt.c:1255 msgid "could not parse value.\n" msgstr "kon waarde niet doorvoeren.\n" -#: src/lib/ecore/ecore_getopt.c:1311 +#: src/lib/ecore/ecore_getopt.c:1312 msgid "missing parameter.\n" msgstr "paramater ontbreekt.\n" -#: src/lib/ecore/ecore_getopt.c:1324 +#: src/lib/ecore/ecore_getopt.c:1325 msgid "missing callback function!\n" msgstr "ontbrekende terugroep-functie!\n" -#: src/lib/ecore/ecore_getopt.c:1353 +#: src/lib/ecore/ecore_getopt.c:1354 msgid "no version was defined.\n" msgstr "geen versie was gedefinieerd.\n" -#: src/lib/ecore/ecore_getopt.c:1370 +#: src/lib/ecore/ecore_getopt.c:1371 msgid "no copyright was defined.\n" msgstr "geen copyright was gedefinieerd.\n" -#: src/lib/ecore/ecore_getopt.c:1387 +#: src/lib/ecore/ecore_getopt.c:1388 msgid "no license was defined.\n" msgstr "geen licentie was gedefinieerd.\n" -#: src/lib/ecore/ecore_getopt.c:1462 +#: src/lib/ecore/ecore_getopt.c:1463 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "FOUT: onbekende optie --%s, genegeerd.\n" -#: src/lib/ecore/ecore_getopt.c:1495 +#: src/lib/ecore/ecore_getopt.c:1496 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "FOUT: optie --%s vereist een argument!\n" -#: src/lib/ecore/ecore_getopt.c:1537 +#: src/lib/ecore/ecore_getopt.c:1538 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "FOUT: onbekende opties -%c, genegeerd.\n" -#: src/lib/ecore/ecore_getopt.c:1575 +#: src/lib/ecore/ecore_getopt.c:1576 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "FOUT: optie -%c vereist een argument!\n" -#: src/lib/ecore/ecore_getopt.c:1784 +#: src/lib/ecore/ecore_getopt.c:1785 msgid "ERROR: no parser provided.\n" msgstr "FOUT: geen doorvoerder beschikbaar gesteld.\n" -#: src/lib/ecore/ecore_getopt.c:1789 +#: src/lib/ecore/ecore_getopt.c:1790 msgid "ERROR: no values provided.\n" msgstr "FOUT: geen waarden beschikbaar gesteld.\n" -#: src/lib/ecore/ecore_getopt.c:1798 +#: src/lib/ecore/ecore_getopt.c:1799 msgid "ERROR: no arguments provided.\n" msgstr "FOUT: geen argumenten beschibaar gesteld.\n" -#: src/lib/ecore/ecore_getopt.c:1824 +#: src/lib/ecore/ecore_getopt.c:1825 msgid "ERROR: invalid options found." msgstr "FOUT: ongeldige opties gevonden." -#: src/lib/ecore/ecore_getopt.c:1830 +#: src/lib/ecore/ecore_getopt.c:1831 #, c-format msgid " See --%s.\n" msgstr "Zie --%s.\n" -#: src/lib/ecore/ecore_getopt.c:1832 +#: src/lib/ecore/ecore_getopt.c:1833 #, c-format msgid " See -%c.\n" msgstr "Zie -%c.\n" -#: src/lib/ecore/ecore_getopt.c:1873 +#: src/lib/ecore/ecore_getopt.c:1875 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "Fout: foutieve wiskundige waarde '%s'\n" -#: src/lib/ecore/ecore_getopt.c:1900 +#: src/lib/ecore/ecore_getopt.c:1903 #, 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 3c883c8..617b5cb 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 2361e8d..b192be9 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: 2011-11-16 14:38+0900\n" +"POT-Creation-Date: 2012-01-23 23:19+1000\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:90 +#: src/lib/ecore/ecore_getopt.c:91 msgid "Version:" msgstr "Versão:" -#: src/lib/ecore/ecore_getopt.c:99 +#: src/lib/ecore/ecore_getopt.c:100 msgid "Usage:" msgstr "Utilização:" -#: src/lib/ecore/ecore_getopt.c:104 +#: src/lib/ecore/ecore_getopt.c:105 #, c-format msgid "%s [options]\n" msgstr "%s [opções]\n" -#: src/lib/ecore/ecore_getopt.c:259 +#: src/lib/ecore/ecore_getopt.c:260 msgid "Copyright:" msgstr "Direitos de autor:" -#: src/lib/ecore/ecore_getopt.c:271 +#: src/lib/ecore/ecore_getopt.c:272 msgid "License:" msgstr "Licença:" -#: src/lib/ecore/ecore_getopt.c:452 +#: src/lib/ecore/ecore_getopt.c:453 msgid "Type: " msgstr "Tipo:" -#: src/lib/ecore/ecore_getopt.c:528 +#: src/lib/ecore/ecore_getopt.c:529 msgid "Default: " msgstr "Omissão:" -#: src/lib/ecore/ecore_getopt.c:555 +#: src/lib/ecore/ecore_getopt.c:556 msgid "Choices: " msgstr "Escolhas:" -#: src/lib/ecore/ecore_getopt.c:656 +#: src/lib/ecore/ecore_getopt.c:657 msgid "Options:\n" msgstr "Opções:\n" -#: src/lib/ecore/ecore_getopt.c:781 +#: src/lib/ecore/ecore_getopt.c:782 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "ERRO: opção desconhecida --%s.\n" -#: src/lib/ecore/ecore_getopt.c:783 +#: src/lib/ecore/ecore_getopt.c:784 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "ERRO: opção desconhecida -%c.\n" -#: src/lib/ecore/ecore_getopt.c:841 +#: src/lib/ecore/ecore_getopt.c:842 msgid "ERROR: " msgstr "ERRO: " -#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061 -#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092 -#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156 -#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317 +#: 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 msgid "value has no pointer set.\n" msgstr "o valor não está definido.\n" -#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176 +#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 #, c-format msgid "unknown boolean value %s.\n" msgstr "valor booleano desconhecido %s.\n" -#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264 +#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 #, c-format msgid "invalid number format %s\n" msgstr "formato do número inválido %s\n" -#: src/lib/ecore/ecore_getopt.c:1122 +#: src/lib/ecore/ecore_getopt.c:1123 #, 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:1150 +#: src/lib/ecore/ecore_getopt.c:1151 msgid "missing parameter to append.\n" msgstr "faltam os parâmetros a anexar.\n" -#: src/lib/ecore/ecore_getopt.c:1254 +#: src/lib/ecore/ecore_getopt.c:1255 msgid "could not parse value.\n" msgstr "incapaz de analisar o valor.\n" -#: src/lib/ecore/ecore_getopt.c:1311 +#: src/lib/ecore/ecore_getopt.c:1312 msgid "missing parameter.\n" msgstr "parâmetro em falta.\n" -#: src/lib/ecore/ecore_getopt.c:1324 +#: src/lib/ecore/ecore_getopt.c:1325 msgid "missing callback function!\n" msgstr "função de chamada em falta!\n" -#: src/lib/ecore/ecore_getopt.c:1353 +#: src/lib/ecore/ecore_getopt.c:1354 msgid "no version was defined.\n" msgstr "nenhuma versão definida.\n" -#: src/lib/ecore/ecore_getopt.c:1370 +#: src/lib/ecore/ecore_getopt.c:1371 msgid "no copyright was defined.\n" msgstr "direitos de autor não definidos.\n" -#: src/lib/ecore/ecore_getopt.c:1387 +#: src/lib/ecore/ecore_getopt.c:1388 msgid "no license was defined.\n" msgstr "licença não definida.\n" -#: src/lib/ecore/ecore_getopt.c:1462 +#: src/lib/ecore/ecore_getopt.c:1463 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "ERRO: opção desconhecida --%s, ignorada.\n" -#: src/lib/ecore/ecore_getopt.c:1495 +#: src/lib/ecore/ecore_getopt.c:1496 #, 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:1537 +#: src/lib/ecore/ecore_getopt.c:1538 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "ERRO: opção desconhecida --%c, ignorada.\n" -#: src/lib/ecore/ecore_getopt.c:1575 +#: src/lib/ecore/ecore_getopt.c:1576 #, 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:1784 +#: src/lib/ecore/ecore_getopt.c:1785 msgid "ERROR: no parser provided.\n" msgstr "ERRO: nenhum analisador fornecido.\n" -#: src/lib/ecore/ecore_getopt.c:1789 +#: src/lib/ecore/ecore_getopt.c:1790 msgid "ERROR: no values provided.\n" msgstr "ERRO: nenhum valor fornecido.\n" -#: src/lib/ecore/ecore_getopt.c:1798 +#: src/lib/ecore/ecore_getopt.c:1799 msgid "ERROR: no arguments provided.\n" msgstr "ERRO: nenhum argumento fornecido.\n" -#: src/lib/ecore/ecore_getopt.c:1824 +#: src/lib/ecore/ecore_getopt.c:1825 msgid "ERROR: invalid options found." msgstr "ERRO: encontradas opções inválidas." -#: src/lib/ecore/ecore_getopt.c:1830 +#: src/lib/ecore/ecore_getopt.c:1831 #, c-format msgid " See --%s.\n" msgstr " Veja --%s.\n" -#: src/lib/ecore/ecore_getopt.c:1832 +#: src/lib/ecore/ecore_getopt.c:1833 #, c-format msgid " See -%c.\n" msgstr " Veja -%c.\n" -#: src/lib/ecore/ecore_getopt.c:1873 +#: src/lib/ecore/ecore_getopt.c:1875 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "ERRO: valor geométrico incorreto \"%s\"\n" -#: src/lib/ecore/ecore_getopt.c:1900 +#: src/lib/ecore/ecore_getopt.c:1903 #, 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 335762f..b826ffc 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 a27945a..fef52ac 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: 2011-11-16 14:38+0900\n" +"POT-Creation-Date: 2012-01-23 23:19+1000\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:90 +#: src/lib/ecore/ecore_getopt.c:91 msgid "Version:" msgstr "Različica" -#: src/lib/ecore/ecore_getopt.c:99 +#: src/lib/ecore/ecore_getopt.c:100 msgid "Usage:" msgstr "Uporaba:" -#: src/lib/ecore/ecore_getopt.c:104 +#: src/lib/ecore/ecore_getopt.c:105 #, c-format msgid "%s [options]\n" msgstr "%s·[možnosti]\n" -#: src/lib/ecore/ecore_getopt.c:259 +#: src/lib/ecore/ecore_getopt.c:260 msgid "Copyright:" msgstr "Avtorstvo:" -#: src/lib/ecore/ecore_getopt.c:271 +#: src/lib/ecore/ecore_getopt.c:272 msgid "License:" msgstr "Licenca:" -#: src/lib/ecore/ecore_getopt.c:452 +#: src/lib/ecore/ecore_getopt.c:453 msgid "Type: " msgstr "Vrsta:·" -#: src/lib/ecore/ecore_getopt.c:528 +#: src/lib/ecore/ecore_getopt.c:529 msgid "Default: " msgstr "Privzeto:·" -#: src/lib/ecore/ecore_getopt.c:555 +#: src/lib/ecore/ecore_getopt.c:556 msgid "Choices: " msgstr "Izbire:·" -#: src/lib/ecore/ecore_getopt.c:656 +#: src/lib/ecore/ecore_getopt.c:657 msgid "Options:\n" msgstr "Možnosti:\n" -#: src/lib/ecore/ecore_getopt.c:781 +#: src/lib/ecore/ecore_getopt.c:782 #, c-format msgid "ERROR: unknown option --%s.\n" msgstr "NAPAKA:·Neznana možnost·--%s.\n" -#: src/lib/ecore/ecore_getopt.c:783 +#: src/lib/ecore/ecore_getopt.c:784 #, c-format msgid "ERROR: unknown option -%c.\n" msgstr "NAPAKA:·neznana možnost·-%c.\n" -#: src/lib/ecore/ecore_getopt.c:841 +#: src/lib/ecore/ecore_getopt.c:842 msgid "ERROR: " msgstr "NAPAKA:" -#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061 -#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092 -#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156 -#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317 +#: 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 msgid "value has no pointer set.\n" msgstr "vrednost nima nastavljenega kazalnika.\n" -#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176 +#: src/lib/ecore/ecore_getopt.c:957 src/lib/ecore/ecore_getopt.c:1177 #, c-format msgid "unknown boolean value %s.\n" msgstr "neznana Boolova vrednost·%s.\n" -#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264 +#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1265 #, c-format msgid "invalid number format %s\n" msgstr "napačen·format števila·%s\n" -#: src/lib/ecore/ecore_getopt.c:1122 +#: src/lib/ecore/ecore_getopt.c:1123 #, c-format msgid "invalid choice \"%s\". Valid values are: " msgstr "napačna izbira·\"%s\".·Pravilne izbire so:·" -#: src/lib/ecore/ecore_getopt.c:1150 +#: src/lib/ecore/ecore_getopt.c:1151 msgid "missing parameter to append.\n" msgstr "manjka·parameter·za dodajo.\n" -#: src/lib/ecore/ecore_getopt.c:1254 +#: src/lib/ecore/ecore_getopt.c:1255 msgid "could not parse value.\n" msgstr "vrednosti ni bilo možno razčleniti.\n" -#: src/lib/ecore/ecore_getopt.c:1311 +#: src/lib/ecore/ecore_getopt.c:1312 msgid "missing parameter.\n" msgstr "manjkajoči·parameter.\n" -#: src/lib/ecore/ecore_getopt.c:1324 +#: src/lib/ecore/ecore_getopt.c:1325 msgid "missing callback function!\n" msgstr "manjkajoča povratno-zasilna funkcija !\n" -#: src/lib/ecore/ecore_getopt.c:1353 +#: src/lib/ecore/ecore_getopt.c:1354 msgid "no version was defined.\n" msgstr "definirana ni bila nobena različica.\n" -#: src/lib/ecore/ecore_getopt.c:1370 +#: src/lib/ecore/ecore_getopt.c:1371 msgid "no copyright was defined.\n" msgstr "definirano ni bilo nobeno avtorstvo.\n" -#: src/lib/ecore/ecore_getopt.c:1387 +#: src/lib/ecore/ecore_getopt.c:1388 msgid "no license was defined.\n" msgstr "definirana ni bila nobena licenca.\n" -#: src/lib/ecore/ecore_getopt.c:1462 +#: src/lib/ecore/ecore_getopt.c:1463 #, c-format msgid "ERROR: unknown option --%s, ignored.\n" msgstr "NAPAKA:·neznana možnost·--%s,·prezrto.\n" -#: src/lib/ecore/ecore_getopt.c:1495 +#: src/lib/ecore/ecore_getopt.c:1496 #, c-format msgid "ERROR: option --%s requires an argument!\n" msgstr "NAPAKA:·možnost·--%s·zahteva argument!\n" -#: src/lib/ecore/ecore_getopt.c:1537 +#: src/lib/ecore/ecore_getopt.c:1538 #, c-format msgid "ERROR: unknown option -%c, ignored.\n" msgstr "NAPAKA:·neznana možnost·-%c,·prezrto.\n" -#: src/lib/ecore/ecore_getopt.c:1575 +#: src/lib/ecore/ecore_getopt.c:1576 #, c-format msgid "ERROR: option -%c requires an argument!\n" msgstr "NAPAKA:·možnost·-%c zahteva argument!\n" -#: src/lib/ecore/ecore_getopt.c:1784 +#: src/lib/ecore/ecore_getopt.c:1785 msgid "ERROR: no parser provided.\n" msgstr "NAPAKA:·ni podan razčlenjevalnik.\n" -#: src/lib/ecore/ecore_getopt.c:1789 +#: src/lib/ecore/ecore_getopt.c:1790 msgid "ERROR: no values provided.\n" msgstr "NAPAKA::·ni podanih vrednosti.\n" -#: src/lib/ecore/ecore_getopt.c:1798 +#: src/lib/ecore/ecore_getopt.c:1799 msgid "ERROR: no arguments provided.\n" msgstr "NAPAKA::·ni podanih argumentov.\n" -#: src/lib/ecore/ecore_getopt.c:1824 +#: src/lib/ecore/ecore_getopt.c:1825 msgid "ERROR: invalid options found." msgstr "NAPAKA::·najdene nepravilne možnosti" -#: src/lib/ecore/ecore_getopt.c:1830 +#: src/lib/ecore/ecore_getopt.c:1831 #, c-format msgid " See --%s.\n" msgstr "·Glej·--%s.\n" -#: src/lib/ecore/ecore_getopt.c:1832 +#: src/lib/ecore/ecore_getopt.c:1833 #, c-format msgid " See -%c.\n" msgstr "·Glej·-%c.\n" -#: src/lib/ecore/ecore_getopt.c:1873 +#: src/lib/ecore/ecore_getopt.c:1875 #, c-format msgid "ERROR: incorrect geometry value '%s'\n" msgstr "NAPAKA::·nepravilna geometrijska vrednost·'%s'\n" -#: src/lib/ecore/ecore_getopt.c:1900 +#: src/lib/ecore/ecore_getopt.c:1903 #, c-format msgid "ERROR: incorrect size value '%s'\n" msgstr "NAPAKA::·nepravilna vrednost velikosti·'%s'\n" diff --git a/libraries/ecore/sha1-for-source.txt b/libraries/ecore/sha1-for-source.txt deleted file mode 100644 index 90e8bea..0000000 --- a/libraries/ecore/sha1-for-source.txt +++ /dev/null @@ -1 +0,0 @@ -3761847d8c5ffc943c90a25e94a07664770a79e9 diff --git a/libraries/ecore/src/Makefile.in b/libraries/ecore/src/Makefile.in index 29b69db..bf6f05c 100644 --- a/libraries/ecore/src/Makefile.in +++ b/libraries/ecore/src/Makefile.in @@ -229,10 +229,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -251,6 +251,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -364,6 +368,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -376,6 +382,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -420,12 +428,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/bin/Makefile.in b/libraries/ecore/src/bin/Makefile.in index 387db21..72d2bfd 100644 --- a/libraries/ecore/src/bin/Makefile.in +++ b/libraries/ecore/src/bin/Makefile.in @@ -223,10 +223,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -245,6 +245,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -358,6 +362,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -370,6 +376,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -414,12 +422,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/examples/Makefile.am b/libraries/ecore/src/examples/Makefile.am index 63748a5..afb6f40 100644 --- a/libraries/ecore/src/examples/Makefile.am +++ b/libraries/ecore/src/examples/Makefile.am @@ -1,6 +1,6 @@ MAINTAINERCLEANFILES = Makefile.in -pkglibdir = $(datadir)/$(PACKAGE)/examples +examplesdir = $(datadir)/$(PACKAGE)/examples filesdir = $(datadir)/$(PACKAGE)/examples files_DATA = @@ -59,7 +59,7 @@ SRCS = \ EXTRA_DIST = $(SRCS) \ $(srcdir)/red.png -pkglib_PROGRAMS = +examples_PROGRAMS = if EFL_INSTALL_EXAMPLES files_DATA += $(SRCS) \ @@ -67,7 +67,7 @@ files_DATA += $(SRCS) \ endif if EFL_BUILD_EXAMPLES -pkglib_PROGRAMS += \ +examples_PROGRAMS += \ ecore_animator_example \ ecore_fd_handler_example \ ecore_poller_example \ diff --git a/libraries/ecore/src/examples/Makefile.in b/libraries/ecore/src/examples/Makefile.in index dc38e0d..7fac88c 100644 --- a/libraries/ecore/src/examples/Makefile.in +++ b/libraries/ecore/src/examples/Makefile.in @@ -19,6 +19,7 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 @@ -34,7 +35,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -pkglib_PROGRAMS = $(am__EXEEXT_1) +examples_PROGRAMS = $(am__EXEEXT_1) @EFL_INSTALL_EXAMPLES_TRUE@am__append_1 = $(SRCS) \ @EFL_INSTALL_EXAMPLES_TRUE@ $(srcdir)/red.png @@ -120,8 +121,8 @@ CONFIG_CLEAN_VPATH_FILES = @EFL_BUILD_EXAMPLES_TRUE@ ecore_evas_ews_example$(EXEEXT) \ @EFL_BUILD_EXAMPLES_TRUE@ ecore_client_bench$(EXEEXT) \ @EFL_BUILD_EXAMPLES_TRUE@ ecore_server_bench$(EXEEXT) -am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)" -PROGRAMS = $(pkglib_PROGRAMS) +am__installdirs = "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)" +PROGRAMS = $(examples_PROGRAMS) ecore_animator_example_SOURCES = ecore_animator_example.c ecore_animator_example_OBJECTS = ecore_animator_example.$(OBJEXT) ecore_animator_example_LDADD = $(LDADD) @@ -344,7 +345,6 @@ DATA = $(files_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -pkglibdir = $(datadir)/$(PACKAGE)/examples ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ @@ -463,10 +463,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -485,6 +485,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -598,6 +602,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -610,6 +616,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -654,12 +662,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ @@ -677,6 +687,7 @@ x_cflags = @x_cflags@ x_includes = @x_includes@ x_libs = @x_libs@ MAINTAINERCLEANFILES = Makefile.in +examplesdir = $(datadir)/$(PACKAGE)/examples filesdir = $(datadir)/$(PACKAGE)/examples files_DATA = $(am__append_1) AM_CPPFLAGS = \ @@ -778,10 +789,10 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-pkglibPROGRAMS: $(pkglib_PROGRAMS) +install-examplesPROGRAMS: $(examples_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" - @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" + @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -798,23 +809,23 @@ install-pkglibPROGRAMS: $(pkglib_PROGRAMS) while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(examplesdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(examplesdir)$$dir" || exit $$?; \ } \ ; done -uninstall-pkglibPROGRAMS: +uninstall-examplesPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files + echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(examplesdir)" && rm -f $$files -clean-pkglibPROGRAMS: - @list='$(pkglib_PROGRAMS)'; test -n "$$list" || exit 0; \ +clean-examplesPROGRAMS: + @list='$(examples_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ @@ -1069,7 +1080,7 @@ check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)"; do \ + for dir in "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -1100,7 +1111,7 @@ maintainer-clean-generic: -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am -clean-am: clean-generic clean-libtool clean-pkglibPROGRAMS \ +clean-am: clean-examplesPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am @@ -1121,13 +1132,13 @@ info: info-am info-am: -install-data-am: install-filesDATA +install-data-am: install-examplesPROGRAMS install-filesDATA install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-pkglibPROGRAMS +install-exec-am: install-html: install-html-am @@ -1167,24 +1178,25 @@ ps: ps-am ps-am: -uninstall-am: uninstall-filesDATA uninstall-pkglibPROGRAMS +uninstall-am: uninstall-examplesPROGRAMS uninstall-filesDATA .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkglibPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-filesDATA \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-pkglibPROGRAMS \ +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-examplesPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am \ + install-examplesPROGRAMS install-exec install-exec-am \ + install-filesDATA install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-filesDATA \ - uninstall-pkglibPROGRAMS + tags uninstall uninstall-am uninstall-examplesPROGRAMS \ + uninstall-filesDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/libraries/ecore/src/lib/Makefile.am b/libraries/ecore/src/lib/Makefile.am index b13bc18..d43ad75 100644 --- a/libraries/ecore/src/lib/Makefile.am +++ b/libraries/ecore/src/lib/Makefile.am @@ -46,6 +46,10 @@ if BUILD_ECORE_COCOA SUBDIRS += ecore_cocoa endif +if BUILD_ECORE_WAYLAND +SUBDIRS += ecore_wayland +endif + if BUILD_ECORE_IPC SUBDIRS += ecore_ipc endif diff --git a/libraries/ecore/src/lib/Makefile.in b/libraries/ecore/src/lib/Makefile.in index b351087..09271c2 100644 --- a/libraries/ecore/src/lib/Makefile.in +++ b/libraries/ecore/src/lib/Makefile.in @@ -44,12 +44,13 @@ host_triplet = @host@ @BUILD_ECORE_SDL_TRUE@am__append_9 = ecore_sdl @BUILD_ECORE_PSL1GHT_TRUE@am__append_10 = ecore_psl1ght @BUILD_ECORE_COCOA_TRUE@am__append_11 = ecore_cocoa -@BUILD_ECORE_IPC_TRUE@am__append_12 = ecore_ipc -@BUILD_ECORE_EVAS_TRUE@am__append_13 = ecore_evas -@BUILD_ECORE_CONFIG_TRUE@am__append_14 = ecore_config -@BUILD_ECORE_FILE_TRUE@am__append_15 = ecore_file -@BUILD_ECORE_IMF_TRUE@am__append_16 = ecore_imf -@BUILD_ECORE_IMF_EVAS_TRUE@am__append_17 = ecore_imf_evas +@BUILD_ECORE_WAYLAND_TRUE@am__append_12 = ecore_wayland +@BUILD_ECORE_IPC_TRUE@am__append_13 = ecore_ipc +@BUILD_ECORE_EVAS_TRUE@am__append_14 = ecore_evas +@BUILD_ECORE_CONFIG_TRUE@am__append_15 = ecore_config +@BUILD_ECORE_FILE_TRUE@am__append_16 = ecore_file +@BUILD_ECORE_IMF_TRUE@am__append_17 = ecore_imf +@BUILD_ECORE_IMF_EVAS_TRUE@am__append_18 = ecore_imf_evas subdir = src/lib DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -101,8 +102,8 @@ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = ecore ecore_input ecore_input_evas ecore_fb \ ecore_directfb ecore_con ecore_x ecore_win32 ecore_wince \ - ecore_sdl ecore_psl1ght ecore_cocoa ecore_ipc ecore_evas \ - ecore_config ecore_file ecore_imf ecore_imf_evas + ecore_sdl ecore_psl1ght ecore_cocoa ecore_wayland ecore_ipc \ + ecore_evas ecore_config ecore_file ecore_imf ecore_imf_evas DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -247,10 +248,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -269,6 +270,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -382,6 +387,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -394,6 +401,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -438,12 +447,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ @@ -466,7 +477,7 @@ SUBDIRS = ecore $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_7) $(am__append_8) $(am__append_9) \ $(am__append_10) $(am__append_11) $(am__append_12) \ $(am__append_13) $(am__append_14) $(am__append_15) \ - $(am__append_16) $(am__append_17) + $(am__append_16) $(am__append_17) $(am__append_18) all: all-recursive .SUFFIXES: diff --git a/libraries/ecore/src/lib/ecore/Ecore.h b/libraries/ecore/src/lib/ecore/Ecore.h index fe4e631..fbe4dda 100644 --- a/libraries/ecore/src/lib/ecore/Ecore.h +++ b/libraries/ecore/src/lib/ecore/Ecore.h @@ -95,13 +95,23 @@ @author Mike McCormack @author Sangho Park @author Jihoon Kim + @author PnB @author Daniel Juyung Seo + @author Christopher 'devilhorns' Michael + @author ChunEon Park + @author xlopez@igalia.com + @author Rafael Antognolli + @author Kim Yunhan + @author Youness Alaoui + @author Bluezery + @author Doyoun Kang + @author Haifeng Deng Please contact to get in contact with the developers and maintainers. */ -/* +/** @page Ecore_Main_Loop_Page The Ecore Main Loop @section intro What is Ecore? @@ -315,10 +325,8 @@ extern "C" { * @{ */ -EAPI int - ecore_init(void); -EAPI int - ecore_shutdown(void); +EAPI int ecore_init(void); +EAPI int ecore_shutdown(void); /** * @} @@ -390,28 +398,21 @@ EAPI extern Ecore_Version *ecore_version; typedef Eina_Bool (*Ecore_Task_Cb)(void *data); /** - * @typedef Ecore_Eselect_Function Ecore_Eselect_Function + * @typedef Ecore_Eselect_Function * A function which can be used to replace select() in the main loop */ typedef int (*Ecore_Select_Function)(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); -EAPI void -ecore_main_loop_iterate(void); +EAPI void ecore_main_loop_iterate(void); -EAPI void - ecore_main_loop_select_func_set(Ecore_Select_Function func); -EAPI Ecore_Select_Function - ecore_main_loop_select_func_get(void); +EAPI void ecore_main_loop_select_func_set(Ecore_Select_Function func); +EAPI Ecore_Select_Function ecore_main_loop_select_func_get(void); -EAPI Eina_Bool - ecore_main_loop_glib_integrate(void); -EAPI void - ecore_main_loop_glib_always_integrate_disable(void); +EAPI Eina_Bool ecore_main_loop_glib_integrate(void); +EAPI void ecore_main_loop_glib_always_integrate_disable(void); -EAPI void - ecore_main_loop_begin(void); -EAPI void - ecore_main_loop_quit(void); +EAPI void ecore_main_loop_begin(void); +EAPI void ecore_main_loop_quit(void); /** * @typedef Ecore_Cb Ecore_Cb @@ -441,9 +442,7 @@ typedef void *(*Ecore_Data_Cb)(void *data); * in the thread, it is owned by the main loop and your callback should take * care of freeing it if necessary. */ -EAPI void -ecore_main_loop_thread_safe_call_async(Ecore_Cb callback, - void *data); +EAPI void ecore_main_loop_thread_safe_call_async(Ecore_Cb callback, void *data); /** * @brief Call callback synchronously in the main loop. @@ -460,9 +459,7 @@ ecore_main_loop_thread_safe_call_async(Ecore_Cb callback, * Remember this function will block until the callback is executed in the * main loop. It can take time and you have no guaranty about the timeline. */ -EAPI void * -ecore_main_loop_thread_safe_call_sync(Ecore_Data_Cb callback, - void *data); +EAPI void *ecore_main_loop_thread_safe_call_sync(Ecore_Data_Cb callback, void *data); /** * @brief This function suspend the main loop in a know state @@ -482,8 +479,7 @@ ecore_main_loop_thread_safe_call_sync(Ecore_Data_Cb callback, * We still advise you, when possible, to use ecore_main_loop_thread_safe_call_async() * as it will not block the thread nor the main loop. */ -EAPI int -ecore_thread_main_loop_begin(void); +EAPI int ecore_thread_main_loop_begin(void); /** * @brief Unlock the main loop. @@ -496,8 +492,7 @@ ecore_thread_main_loop_begin(void); * After a call to ecore_thread_main_loop_begin(), you need to absolutly * call ecore_thread_main_loop_end(), or you application will stay frozen. */ -EAPI int -ecore_thread_main_loop_end(void); +EAPI int ecore_thread_main_loop_end(void); /** * @} @@ -631,37 +626,17 @@ struct _Ecore_Event_Signal_Realtime /** Realtime event */ #endif }; -EAPI Ecore_Event_Handler * -ecore_event_handler_add(int type, - Ecore_Event_Handler_Cb func, - const void *data); -EAPI void * - ecore_event_handler_del(Ecore_Event_Handler *event_handler); -EAPI Ecore_Event * - ecore_event_add(int type, - void *ev, - Ecore_End_Cb func_free, - void *data); -EAPI void * - ecore_event_del(Ecore_Event *event); -EAPI void * - ecore_event_handler_data_get(Ecore_Event_Handler *eh); -EAPI void * - ecore_event_handler_data_set(Ecore_Event_Handler *eh, - const void *data); -EAPI int - ecore_event_type_new(void); -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); -EAPI void * - ecore_event_filter_del(Ecore_Event_Filter *ef); -EAPI int - ecore_event_current_type_get(void); -EAPI void * - ecore_event_current_event_get(void); +EAPI Ecore_Event_Handler *ecore_event_handler_add(int type, Ecore_Event_Handler_Cb func, const void *data); +EAPI void *ecore_event_handler_del(Ecore_Event_Handler *event_handler); +EAPI Ecore_Event *ecore_event_add(int type, void *ev, Ecore_End_Cb func_free, void *data); +EAPI void *ecore_event_del(Ecore_Event *event); +EAPI void *ecore_event_handler_data_get(Ecore_Event_Handler *eh); +EAPI void *ecore_event_handler_data_set(Ecore_Event_Handler *eh, const void *data); +EAPI int ecore_event_type_new(void); +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); +EAPI void *ecore_event_filter_del(Ecore_Event_Filter *ef); +EAPI int ecore_event_current_type_get(void); +EAPI void *ecore_event_current_event_get(void); /** * @} @@ -702,11 +677,11 @@ typedef enum _Ecore_Exe_Flags Ecore_Exe_Flags; enum _Ecore_Exe_Win32_Priority { - ECORE_EXE_WIN32_PRIORITY_IDLE, /**< Idle priority, for monitoring the system */ - ECORE_EXE_WIN32_PRIORITY_BELOW_NORMAL, /**< Below default priority */ - ECORE_EXE_WIN32_PRIORITY_NORMAL, /**< Default priority */ - ECORE_EXE_WIN32_PRIORITY_ABOVE_NORMAL, /**< Above default priority */ - ECORE_EXE_WIN32_PRIORITY_HIGH, /**< High priority, use with care as other threads in the system will not get processor time */ + ECORE_EXE_WIN32_PRIORITY_IDLE, /**< Idle priority, for monitoring the system */ + ECORE_EXE_WIN32_PRIORITY_BELOW_NORMAL, /**< Below default priority */ + ECORE_EXE_WIN32_PRIORITY_NORMAL, /**< Default priority */ + ECORE_EXE_WIN32_PRIORITY_ABOVE_NORMAL, /**< Above default priority */ + ECORE_EXE_WIN32_PRIORITY_HIGH, /**< High priority, use with care as other threads in the system will not get processor time */ ECORE_EXE_WIN32_PRIORITY_REALTIME /**< Realtime priority, should be almost never used as it can interrupt system threads that manage mouse input, keyboard input, and background disk flushing */ }; typedef enum _Ecore_Exe_Win32_Priority Ecore_Exe_Win32_Priority; @@ -759,72 +734,32 @@ struct _Ecore_Exe_Event_Data /** Data from a child process event */ Ecore_Exe_Event_Data_Line *lines; /**< an array of line data if line buffered, the last one has it's line member set to NULL */ }; -EAPI void - ecore_exe_run_priority_set(int pri); -EAPI int - ecore_exe_run_priority_get(void); -EAPI Ecore_Exe * - ecore_exe_run(const char *exe_cmd, - const void *data); -EAPI Ecore_Exe * -ecore_exe_pipe_run(const char *exe_cmd, - Ecore_Exe_Flags flags, - const void *data); -EAPI void -ecore_exe_callback_pre_free_set(Ecore_Exe *exe, - Ecore_Exe_Cb func); -EAPI Eina_Bool -ecore_exe_send(Ecore_Exe *exe, - const void *data, - int size); -EAPI void - ecore_exe_close_stdin(Ecore_Exe *exe); -EAPI void - ecore_exe_auto_limits_set(Ecore_Exe *exe, - int start_bytes, - int end_bytes, - int start_lines, - int end_lines); -EAPI Ecore_Exe_Event_Data * -ecore_exe_event_data_get(Ecore_Exe *exe, - Ecore_Exe_Flags flags); -EAPI void - ecore_exe_event_data_free(Ecore_Exe_Event_Data *data); -EAPI void * - ecore_exe_free(Ecore_Exe *exe); -EAPI pid_t - ecore_exe_pid_get(const Ecore_Exe *exe); -EAPI void - ecore_exe_tag_set(Ecore_Exe *exe, - const char *tag); -EAPI const char * - ecore_exe_tag_get(const Ecore_Exe *exe); -EAPI const char * - ecore_exe_cmd_get(const Ecore_Exe *exe); -EAPI void * - ecore_exe_data_get(const Ecore_Exe *exe); -EAPI void * - ecore_exe_data_set(Ecore_Exe *exe, - void *data); -EAPI Ecore_Exe_Flags - ecore_exe_flags_get(const Ecore_Exe *exe); -EAPI void - ecore_exe_pause(Ecore_Exe *exe); -EAPI void - ecore_exe_continue(Ecore_Exe *exe); -EAPI void - ecore_exe_interrupt(Ecore_Exe *exe); -EAPI void - ecore_exe_quit(Ecore_Exe *exe); -EAPI void - ecore_exe_terminate(Ecore_Exe *exe); -EAPI void - ecore_exe_kill(Ecore_Exe *exe); -EAPI void - ecore_exe_signal(Ecore_Exe *exe, - int num); -EAPI void -ecore_exe_hup(Ecore_Exe *exe); +EAPI void ecore_exe_run_priority_set(int pri); +EAPI int ecore_exe_run_priority_get(void); +EAPI Ecore_Exe *ecore_exe_run(const char *exe_cmd, const void *data); +EAPI Ecore_Exe *ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data); +EAPI void ecore_exe_callback_pre_free_set(Ecore_Exe *exe, Ecore_Exe_Cb func); +EAPI Eina_Bool ecore_exe_send(Ecore_Exe *exe, const void *data, int size); +EAPI void ecore_exe_close_stdin(Ecore_Exe *exe); +EAPI void ecore_exe_auto_limits_set(Ecore_Exe *exe, int start_bytes, int end_bytes, int start_lines, int end_lines); +EAPI Ecore_Exe_Event_Data *ecore_exe_event_data_get(Ecore_Exe *exe, Ecore_Exe_Flags flags); +EAPI void ecore_exe_event_data_free(Ecore_Exe_Event_Data *data); +EAPI void *ecore_exe_free(Ecore_Exe *exe); +EAPI pid_t ecore_exe_pid_get(const Ecore_Exe *exe); +EAPI void ecore_exe_tag_set(Ecore_Exe *exe, const char *tag); +EAPI const char *ecore_exe_tag_get(const Ecore_Exe *exe); +EAPI const char *ecore_exe_cmd_get(const Ecore_Exe *exe); +EAPI void *ecore_exe_data_get(const Ecore_Exe *exe); +EAPI void *ecore_exe_data_set(Ecore_Exe *exe, void *data); +EAPI Ecore_Exe_Flags ecore_exe_flags_get(const Ecore_Exe *exe); +EAPI void ecore_exe_pause(Ecore_Exe *exe); +EAPI void ecore_exe_continue(Ecore_Exe *exe); +EAPI void ecore_exe_interrupt(Ecore_Exe *exe); +EAPI void ecore_exe_quit(Ecore_Exe *exe); +EAPI void ecore_exe_terminate(Ecore_Exe *exe); +EAPI void ecore_exe_kill(Ecore_Exe *exe); +EAPI void ecore_exe_signal(Ecore_Exe *exe, int num); +EAPI void ecore_exe_hup(Ecore_Exe *exe); /** * @} @@ -839,7 +774,7 @@ ecore_exe_hup(Ecore_Exe *exe); * for data available for reading, for the availability to write * without blocking, and for errors on the file descriptor. * - * ecore_main_fd_handler_add() is used to setup a handler for a + *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 @@ -888,34 +823,15 @@ 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); -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); -EAPI void -ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler, - Ecore_Fd_Prep_Cb func, - const void *data); -EAPI void * - ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler); -EAPI int - ecore_main_fd_handler_fd_get(Ecore_Fd_Handler *fd_handler); -EAPI Eina_Bool - ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler, - Ecore_Fd_Handler_Flags flags); -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); -EAPI void * -ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler); +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); +EAPI void ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Prep_Cb func, const void *data); +EAPI void *ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler); +EAPI int ecore_main_fd_handler_fd_get(Ecore_Fd_Handler *fd_handler); +EAPI Eina_Bool ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags); +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); +EAPI void *ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler); /** * @} @@ -930,7 +846,7 @@ ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler); * areound a core poll interval. For now only 1 core poller type is * supprted: ECORE_POLLER_CORE * - * Example of @ref Ecore_Poller: + * Example of @ref Ecore_Poller : * @li @ref ecore_poller_example_c * * @ingroup Ecore_Main_Loop_Group @@ -946,21 +862,11 @@ typedef enum _Ecore_Poller_Type Ecore_Poller_Type; typedef struct _Ecore_Poller Ecore_Poller; /**< A handle for pollers */ -EAPI void -ecore_poller_poll_interval_set(Ecore_Poller_Type type, - double poll_time); -EAPI double - ecore_poller_poll_interval_get(Ecore_Poller_Type type); -EAPI Eina_Bool - ecore_poller_poller_interval_set(Ecore_Poller *poller, - int interval); -EAPI int - ecore_poller_poller_interval_get(Ecore_Poller *poller); -EAPI Ecore_Poller * - ecore_poller_add(Ecore_Poller_Type type, - int interval, - Ecore_Task_Cb func, - const void *data); +EAPI void ecore_poller_poll_interval_set(Ecore_Poller_Type type, double poll_time); +EAPI double ecore_poller_poll_interval_get(Ecore_Poller_Type type); +EAPI Eina_Bool ecore_poller_poller_interval_set(Ecore_Poller *poller, int interval); +EAPI int ecore_poller_poller_interval_get(Ecore_Poller *poller); +EAPI Ecore_Poller *ecore_poller_add(Ecore_Poller_Type type, int interval, Ecore_Task_Cb func, const void *data); EAPI void *ecore_poller_del(Ecore_Poller *poller); /** @@ -984,14 +890,14 @@ EAPI void *ecore_poller_del(Ecore_Poller *poller); * ... do some more animating ... * } * ... - * ecore_animator_timeline_add(2, _do_animation, my_evas_object); + *ecore_animator_timeline_add(2, _do_animation, my_evas_object); * @endcode * In the sample above we create an animation to move * @c my_evas_object from position (0,0) to (100,100) in 2 seconds. * * If your animation will run for an unspecified amount of time you * can use ecore_animator_add(), which is like using - * ecore_timer_add() with the interval being the + *ecore_timer_add() with the interval being the * @ref ecore_animator_frametime_set "framerate". Note that this has * tangible benefits to creating a timer for each animation in terms * of performance. @@ -1057,8 +963,7 @@ typedef Eina_Bool (*Ecore_Timeline_Cb)(void *data, double pos); * @see ecore_animator_timeline_add() * @see ecore_animator_frametime_set() */ -EAPI Ecore_Animator *ecore_animator_add(Ecore_Task_Cb func, - const void *data); +EAPI Ecore_Animator *ecore_animator_add(Ecore_Task_Cb func, const void *data); /** * @brief Add a animator that runs for a limited time * @@ -1086,10 +991,7 @@ EAPI Ecore_Animator *ecore_animator_add(Ecore_Task_Cb func, * @see ecore_animator_pos_map() * @since 1.1.0 */ -EAPI Ecore_Animator * -ecore_animator_timeline_add(double runtime, - Ecore_Timeline_Cb func, - const void *data); +EAPI Ecore_Animator *ecore_animator_timeline_add(double runtime, Ecore_Timeline_Cb func, const void *data); /** * @brief Delete the specified animator from the animator list. * @@ -1103,8 +1005,7 @@ ecore_animator_timeline_add(double runtime, * is invalid and should not be used again. It will not get called again after * deletion. */ -EAPI void * -ecore_animator_del(Ecore_Animator *animator); +EAPI void *ecore_animator_del(Ecore_Animator *animator); /** * @brief Suspend the specified animator. * @@ -1115,12 +1016,11 @@ ecore_animator_del(Ecore_Animator *animator); * * @warning Freezing an animator doesn't freeze accounting of how long that * animator has been running. Therefore if the animator was created with - * ecore_animator_timeline_add() the @p pos argument given to the callback + *ecore_animator_timeline_add() the @p pos argument given to the callback * will increase as if the animator hadn't been frozen and the animator may * have it's execution halted if @p runtime elapsed. */ -EAPI void -ecore_animator_freeze(Ecore_Animator *animator); +EAPI void ecore_animator_freeze(Ecore_Animator *animator); /** * @brief Restore execution of the specified animator. * @@ -1129,8 +1029,7 @@ ecore_animator_freeze(Ecore_Animator *animator); * The specified @p animator will be put back in the set of animators that are * executed during main loop. */ -EAPI void -ecore_animator_thaw(Ecore_Animator *animator); +EAPI void ecore_animator_thaw(Ecore_Animator *animator); /** * @brief Set the animator call interval in seconds. * @@ -1144,8 +1043,7 @@ ecore_animator_thaw(Ecore_Animator *animator); * * @note The default @p frametime value is 1/30th of a second. */ -EAPI void -ecore_animator_frametime_set(double frametime); +EAPI void ecore_animator_frametime_set(double frametime); /** * @brief Get the animator call interval in seconds. * @@ -1155,8 +1053,7 @@ ecore_animator_frametime_set(double frametime); * * @see ecore_animator_frametime_set() */ -EAPI double -ecore_animator_frametime_get(void); +EAPI double ecore_animator_frametime_get(void); /** * @brief Maps an input position from 0.0 to 1.0 along a timeline to a * position in a different curve. @@ -1217,11 +1114,7 @@ ecore_animator_frametime_get(void); * * @since 1.1.0 */ -EAPI double -ecore_animator_pos_map(double pos, - Ecore_Pos_Map map, - double v1, - double v2); +EAPI double ecore_animator_pos_map(double pos, Ecore_Pos_Map map, double v1, double v2); /** * @brief Set the source of animator ticks for the mainloop * @@ -1238,14 +1131,13 @@ ecore_animator_pos_map(double pos, * ECORE_ANIMATOR_SOURCE_CUSTOM and then drive it yourself based on some input * tick source (like another application via ipc, some vertical blanking * interrupt interrupt etc.) using - * ecore_animator_custom_source_tick_begin_callback_set() and - * ecore_animator_custom_source_tick_end_callback_set() to set the functions + *ecore_animator_custom_source_tick_begin_callback_set() and + *ecore_animator_custom_source_tick_end_callback_set() to set the functions * that will be called to start and stop the ticking source, which when it * gets a "tick" should call ecore_animator_custom_tick() to make the "tick" over 1 * frame. */ -EAPI void -ecore_animator_source_set(Ecore_Animator_Source source); +EAPI void ecore_animator_source_set(Ecore_Animator_Source source); /** * @brief Get the animator source currently set. * @@ -1255,8 +1147,7 @@ ecore_animator_source_set(Ecore_Animator_Source source); * * @see ecore_animator_source_set() */ -EAPI Ecore_Animator_Source -ecore_animator_source_get(void); +EAPI Ecore_Animator_Source ecore_animator_source_get(void); /** * @brief Set the function that begins a custom animator tick source * @@ -1266,7 +1157,7 @@ ecore_animator_source_get(void); * The Ecore Animator infrastructure handles tracking if animators are needed * or not and which ones need to be called and when, but when the tick source * is custom, you have to provide a tick source by calling - * ecore_animator_custom_tick() to indicate a frame tick happened. In order + *ecore_animator_custom_tick() to indicate a frame tick happened. In order * to allow the source of ticks to be dynamically enabled or disabled as * needed, the @p func when set is called to enable the tick source to * produce tick events that call ecore_animator_custom_tick(). If @p func @@ -1276,9 +1167,7 @@ ecore_animator_source_get(void); * @see ecore_animator_custom_source_tick_end_callback_set() * @see ecore_animator_custom_tick() */ -EAPI void -ecore_animator_custom_source_tick_begin_callback_set(Ecore_Cb func, - const void *data); +EAPI void ecore_animator_custom_source_tick_begin_callback_set(Ecore_Cb func, const void *data); /** * @brief Set the function that ends a custom animator tick source * @@ -1286,18 +1175,16 @@ ecore_animator_custom_source_tick_begin_callback_set(Ecore_Cb func, * @param data The data passed to the tick end function as its parameter * * This function is a matching pair to the function set by - * ecore_animator_custom_source_tick_begin_callback_set() and is called + *ecore_animator_custom_source_tick_begin_callback_set() and is called * when ticking is to stop. If @p func is NULL then no function will be * called to stop ticking. For more information please see - * ecore_animator_custom_source_tick_begin_callback_set(). + *ecore_animator_custom_source_tick_begin_callback_set(). * * @see ecore_animator_source_set() * @see ecore_animator_custom_source_tick_begin_callback_set() * @see ecore_animator_custom_tick() */ -EAPI void -ecore_animator_custom_source_tick_end_callback_set(Ecore_Cb func, - const void *data); +EAPI void ecore_animator_custom_source_tick_end_callback_set(Ecore_Cb func, const void *data); /** * @brief Trigger a custom animator tick * @@ -1311,8 +1198,7 @@ ecore_animator_custom_source_tick_end_callback_set(Ecore_Cb func, * @see ecore_animator_custom_source_tick_begin_callback_set * @see ecore_animator_custom_source_tick_end_callback_set()() */ -EAPI void -ecore_animator_custom_tick(void); +EAPI void ecore_animator_custom_tick(void); /** * @} @@ -1338,43 +1224,23 @@ 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); -EAPI void - ecore_timer_interval_set(Ecore_Timer *timer, - double in); -EAPI double - ecore_timer_interval_get(Ecore_Timer *timer); -EAPI void - ecore_timer_freeze(Ecore_Timer *timer); -EAPI void - ecore_timer_thaw(Ecore_Timer *timer); -EAPI void - ecore_timer_delay(Ecore_Timer *timer, - double add); -EAPI double - ecore_timer_pending_get(Ecore_Timer *timer); -EAPI double - ecore_timer_precision_get(void); -EAPI void - ecore_timer_precision_set(double precision); -EAPI char * - ecore_timer_dump(void); +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); +EAPI void ecore_timer_interval_set(Ecore_Timer *timer, double in); +EAPI double ecore_timer_interval_get(Ecore_Timer *timer); +EAPI void ecore_timer_freeze(Ecore_Timer *timer); +EAPI void ecore_timer_thaw(Ecore_Timer *timer); +EAPI void ecore_timer_delay(Ecore_Timer *timer, double add); +EAPI void ecore_timer_reset(Ecore_Timer *timer); +EAPI double ecore_timer_pending_get(Ecore_Timer *timer); +EAPI double ecore_timer_precision_get(void); +EAPI void ecore_timer_precision_set(double precision); +EAPI char *ecore_timer_dump(void); /** * @} @@ -1443,9 +1309,7 @@ typedef struct _Ecore_Idle_Exiter Ecore_Idle_Exiter; /**< A handle for idle exi * * Idlers are useful for progressively prossessing data without blocking. */ -EAPI Ecore_Idler * -ecore_idler_add(Ecore_Task_Cb func, - const void *data); +EAPI Ecore_Idler *ecore_idler_add(Ecore_Task_Cb func, const void *data); /** * Delete an idler callback from the list to be executed. @@ -1453,23 +1317,14 @@ ecore_idler_add(Ecore_Task_Cb func, * @return The data pointer passed to the idler callback on success. NULL * otherwise. */ -EAPI void * -ecore_idler_del(Ecore_Idler *idler); +EAPI void *ecore_idler_del(Ecore_Idler *idler); -EAPI Ecore_Idle_Enterer * -ecore_idle_enterer_add(Ecore_Task_Cb func, - const void *data); -EAPI Ecore_Idle_Enterer * -ecore_idle_enterer_before_add(Ecore_Task_Cb func, - const void *data); -EAPI void * -ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer); +EAPI Ecore_Idle_Enterer *ecore_idle_enterer_add(Ecore_Task_Cb func, const void *data); +EAPI Ecore_Idle_Enterer *ecore_idle_enterer_before_add(Ecore_Task_Cb func, const void *data); +EAPI void *ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer); -EAPI Ecore_Idle_Exiter * -ecore_idle_exiter_add(Ecore_Task_Cb func, - const void *data); -EAPI void * -ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter); +EAPI Ecore_Idle_Exiter *ecore_idle_exiter_add(Ecore_Task_Cb func, const void *data); +EAPI void *ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter); /** * @} @@ -1525,7 +1380,7 @@ ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter); * * The worker function, that's the one running in the thread, also receives * an ::Ecore_Thread handler that can be used with ecore_thread_cancel() and - * ecore_thread_check(), sharing the flag with the main loop. But this + *ecore_thread_check(), sharing the flag with the main loop. But this * handler is also associated with the thread where the function is running. * This has strong implications when working with thread local data. * @@ -1611,7 +1466,7 @@ typedef void (*Ecore_Thread_Notify_Cb)(void *data, Ecore_Thread *thread, void *m * so here it's safe to use anything from the EFL freely. * * The thread can also be cancelled before its completion calling - * ecore_thread_cancel(), either from the main thread or @p func_blocking. + *ecore_thread_cancel(), either from the main thread or @p func_blocking. * In this case, @p func_cancel will be called, also from the main thread * to inform of this happening. If the thread could not be created, this * function will be called and it's @c thread parameter will be NULL. It's @@ -1636,11 +1491,7 @@ typedef void (*Ecore_Thread_Notify_Cb)(void *data, Ecore_Thread *thread, void *m * @see ecore_thread_reschedule() * @see ecore_thread_max_set() */ -EAPI Ecore_Thread * -ecore_thread_run(Ecore_Thread_Cb func_blocking, - Ecore_Thread_Cb func_end, - Ecore_Thread_Cb func_cancel, - const void *data); +EAPI Ecore_Thread *ecore_thread_run(Ecore_Thread_Cb func_blocking, Ecore_Thread_Cb func_end, Ecore_Thread_Cb func_cancel, const void *data); /** * Launch a thread to run a task than can talk back to the main thread * @@ -1681,13 +1532,9 @@ ecore_thread_run(Ecore_Thread_Cb func_blocking, * @see ecore_thread_reschedule() * @see ecore_thread_max_set() */ -EAPI Ecore_Thread * -ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy, - Ecore_Thread_Notify_Cb func_notify, - Ecore_Thread_Cb func_end, - Ecore_Thread_Cb func_cancel, - const void *data, - Eina_Bool try_no_queue); +EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy, Ecore_Thread_Notify_Cb func_notify, + Ecore_Thread_Cb func_end, Ecore_Thread_Cb func_cancel, + const void *data, Eina_Bool try_no_queue); /** * Cancel a running thread. * @@ -1709,9 +1556,9 @@ ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy, * @li The function ends and returns normally. If it hadn't been cancelled, * @c func_end would be called here, but instead @c func_cancel will happen. * @li The function returns after requesting to be rescheduled with - * ecore_thread_reschedule(). + *ecore_thread_reschedule(). * @li The function is prepared to leave early by checking if - * ecore_thread_check() returns EINA_TRUE. + *ecore_thread_check() returns EINA_TRUE. * * The user function can cancel itself by calling ecore_thread_cancel(), but * it should always use the ::Ecore_Thread handle passed to it and never @@ -1723,8 +1570,7 @@ ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy, * * @see ecore_thread_check() */ -EAPI Eina_Bool -ecore_thread_cancel(Ecore_Thread *thread); +EAPI Eina_Bool ecore_thread_cancel(Ecore_Thread *thread); /** * Checks if a thread is pending cancellation * @@ -1744,8 +1590,7 @@ ecore_thread_cancel(Ecore_Thread *thread); * * @see ecore_thread_cancel() */ -EAPI Eina_Bool -ecore_thread_check(Ecore_Thread *thread); +EAPI Eina_Bool ecore_thread_check(Ecore_Thread *thread); /** * Sends data from the worker thread to the main loop * @@ -1767,9 +1612,7 @@ ecore_thread_check(Ecore_Thread *thread); * * @see ecore_thread_feedback_run() */ -EAPI Eina_Bool -ecore_thread_feedback(Ecore_Thread *thread, - const void *msg_data); +EAPI Eina_Bool ecore_thread_feedback(Ecore_Thread *thread, const void *msg_data); /** * Asks for the function in the thread to be called again at a later time * @@ -1778,7 +1621,7 @@ ecore_thread_feedback(Ecore_Thread *thread, * EINA_FALSE if anything goes wrong. * * This function should be called only from the same function represented - * by @pthread. + * by @p thread. * * Calling this function will mark the thread for a reschedule, so as soon * as it returns, it will be added to the end of the list of pending tasks. @@ -1793,8 +1636,7 @@ ecore_thread_feedback(Ecore_Thread *thread, * Similarly, if the @p thread is cancelled, the reschedule will not take * effect. */ -EAPI Eina_Bool -ecore_thread_reschedule(Ecore_Thread *thread); +EAPI Eina_Bool ecore_thread_reschedule(Ecore_Thread *thread); /** * Gets the number of active threads running jobs * @@ -1808,8 +1650,7 @@ ecore_thread_reschedule(Ecore_Thread *thread); * in the return of this function unless the thread creation fails and it * falls back to using one from the pool. */ -EAPI int -ecore_thread_active_get(void); +EAPI int ecore_thread_active_get(void); /** * Gets the number of short jobs waiting for a thread to run * @@ -1818,8 +1659,7 @@ ecore_thread_active_get(void); * This returns the number of tasks started with ecore_thread_run() that are * pending, waiting for a thread to become available to run them. */ -EAPI int -ecore_thread_pending_get(void); +EAPI int ecore_thread_pending_get(void); /** * Gets the number of feedback jobs waiting for a thread to run * @@ -1828,18 +1668,16 @@ ecore_thread_pending_get(void); * This returns the number of tasks started with ecore_thread_feedback_run() * that are pending, waiting for a thread to become available to run them. */ -EAPI int -ecore_thread_pending_feedback_get(void); +EAPI int ecore_thread_pending_feedback_get(void); /** * Gets the total number of pending jobs * * @return Number of pending threads running jobs * * Same as the sum of ecore_thread_pending_get() and - * ecore_thread_pending_feedback_get(). + *ecore_thread_pending_feedback_get(). */ -EAPI int -ecore_thread_pending_total_get(void); +EAPI int ecore_thread_pending_total_get(void); /** * Gets the maximum number of threads that can run simultaneously * @@ -1847,7 +1685,7 @@ ecore_thread_pending_total_get(void); * * This returns the maximum number of Ecore_Thread's that may be running at * the same time. If this number is reached, new jobs started by either - * ecore_thread_run() or ecore_thread_feedback_run() will be added to the + *ecore_thread_run() or ecore_thread_feedback_run() will be added to the * respective pending queue until one of the running threads finishes its * task and becomes available to run a new one. * @@ -1858,8 +1696,7 @@ ecore_thread_pending_total_get(void); * @see ecore_thread_max_set() * @see ecore_thread_max_reset() */ -EAPI int -ecore_thread_max_get(void); +EAPI int ecore_thread_max_get(void); /** * Sets the maximum number of threads allowed to run simultaneously * @@ -1872,8 +1709,7 @@ ecore_thread_max_get(void); * @see ecore_thread_max_get() * @see ecore_thread_max_reset() */ -EAPI void -ecore_thread_max_set(int num); +EAPI void ecore_thread_max_set(int num); /** * Resets the maximum number of concurrently running threads to the default * @@ -1883,8 +1719,7 @@ ecore_thread_max_set(int num); * @see ecore_thread_max_get() * @see ecore_thread_max_set() */ -EAPI void -ecore_thread_max_reset(void); +EAPI void ecore_thread_max_reset(void); /** * Gets the number of threads available for running tasks * @@ -1896,8 +1731,7 @@ ecore_thread_max_reset(void); * changed the maximum number of running threads while other tasks are * running. */ -EAPI int -ecore_thread_available_get(void); +EAPI int ecore_thread_available_get(void); /** * Adds some data to a hash local to the thread * @@ -1970,7 +1804,7 @@ ecore_thread_available_get(void); * because @p thread was terminated and the hash destroyed. This parameter * may be NULL, in which case @p value needs to be manually freed after * removing it from the hash with either ecore_thread_local_data_del() or - * ecore_thread_local_data_set(), but it's very unlikely that this is what + *ecore_thread_local_data_set(), but it's very unlikely that this is what * you want. * * This function, and all of the others in the @c ecore_thread_local_data @@ -1982,12 +1816,8 @@ ecore_thread_available_get(void); * @see ecore_thread_local_data_find() * @see ecore_thread_local_data_del() */ -EAPI Eina_Bool -ecore_thread_local_data_add(Ecore_Thread *thread, - const char *key, - void *value, - Eina_Free_Cb cb, - Eina_Bool direct); +EAPI Eina_Bool ecore_thread_local_data_add(Ecore_Thread *thread, const char *key, void *value, + Eina_Free_Cb cb, Eina_Bool direct); /** * Sets some data in the hash local to the given thread * @@ -2015,11 +1845,7 @@ ecore_thread_local_data_add(Ecore_Thread *thread, * @see ecore_thread_local_data_del() * @see ecore_thread_local_data_find() */ -EAPI void * -ecore_thread_local_data_set(Ecore_Thread *thread, - const char *key, - void *value, - Eina_Free_Cb cb); +EAPI void *ecore_thread_local_data_set(Ecore_Thread *thread, const char *key, void *value, Eina_Free_Cb cb); /** * Gets data stored in the hash local to the given thread * @@ -2037,9 +1863,7 @@ ecore_thread_local_data_set(Ecore_Thread *thread, * @see ecore_thread_local_data_add() * @see ecore_thread_local_data_wait() */ -EAPI void * -ecore_thread_local_data_find(Ecore_Thread *thread, - const char *key); +EAPI void *ecore_thread_local_data_find(Ecore_Thread *thread, const char *key); /** * Deletes from the thread's hash the data corresponding to the given key * @@ -2064,9 +1888,7 @@ ecore_thread_local_data_find(Ecore_Thread *thread, * * @see ecore_thread_local_data_add() */ -EAPI Eina_Bool -ecore_thread_local_data_del(Ecore_Thread *thread, - const char *key); +EAPI Eina_Bool ecore_thread_local_data_del(Ecore_Thread *thread, const char *key); /** * Adds some data to a hash shared by all threads @@ -2096,7 +1918,7 @@ ecore_thread_local_data_del(Ecore_Thread *thread, * because Ecore Thread was shut down and the hash destroyed. This parameter * may be NULL, in which case @p value needs to be manually freed after * removing it from the hash with either ecore_thread_global_data_del() or - * ecore_thread_global_data_set(). + *ecore_thread_global_data_set(). * * Manually freeing any data that was added to the hash with a @p cb function * is likely to produce a segmentation fault, or any other strange @@ -2106,11 +1928,7 @@ ecore_thread_local_data_del(Ecore_Thread *thread, * @see ecore_thread_global_data_set() * @see ecore_thread_global_data_find() */ -EAPI Eina_Bool -ecore_thread_global_data_add(const char *key, - void *value, - Eina_Free_Cb cb, - Eina_Bool direct); +EAPI Eina_Bool ecore_thread_global_data_add(const char *key, void *value, Eina_Free_Cb cb, Eina_Bool direct); /** * Sets some data in the hash shared by all threads * @@ -2132,10 +1950,7 @@ ecore_thread_global_data_add(const char *key, * @see ecore_thread_global_data_del() * @see ecore_thread_global_data_find() */ -EAPI void * -ecore_thread_global_data_set(const char *key, - void *value, - Eina_Free_Cb cb); +EAPI void *ecore_thread_global_data_set(const char *key, void *value, Eina_Free_Cb cb); /** * Gets data stored in the hash shared by all threads * @@ -2152,8 +1967,7 @@ ecore_thread_global_data_set(const char *key, * @see ecore_thread_global_data_add() * @see ecore_thread_global_data_wait() */ -EAPI void * -ecore_thread_global_data_find(const char *key); +EAPI void *ecore_thread_global_data_find(const char *key); /** * Deletes from the shared hash the data corresponding to the given key * @@ -2176,8 +1990,7 @@ ecore_thread_global_data_find(const char *key); * * @see ecore_thread_global_data_add() */ -EAPI Eina_Bool -ecore_thread_global_data_del(const char *key); +EAPI Eina_Bool ecore_thread_global_data_del(const char *key); /** * Gets data stored in the shared hash, or wait for it if it doesn't exist * @@ -2190,7 +2003,7 @@ ecore_thread_global_data_del(const char *key); * If there's nothing in the hash under the given @p key, the function * will block and wait up to @p seconds seconds for some other thread to * add it with either ecore_thread_global_data_add() or - * ecore_thread_global_data_set(). If after waiting there's still no data + *ecore_thread_global_data_set(). If after waiting there's still no data * to get, NULL will be returned. * * If @p seconds is 0, then no waiting will happen and this function works @@ -2205,9 +2018,7 @@ ecore_thread_global_data_del(const char *key); * @see ecore_thread_global_data_add() * @see ecore_thread_global_data_find() */ -EAPI void * -ecore_thread_global_data_wait(const char *key, - double seconds); +EAPI void *ecore_thread_global_data_wait(const char *key, double seconds); /** * @} @@ -2242,27 +2053,14 @@ typedef struct _Ecore_Pipe Ecore_Pipe; /**< A handle for pipes */ */ typedef void (*Ecore_Pipe_Cb)(void *data, void *buffer, unsigned int nbyte); -EAPI Ecore_Pipe * -ecore_pipe_add(Ecore_Pipe_Cb handler, - const void *data); -EAPI void * - ecore_pipe_del(Ecore_Pipe *p); -EAPI Eina_Bool - ecore_pipe_write(Ecore_Pipe *p, - const void *buffer, - unsigned int nbytes); -EAPI void - ecore_pipe_write_close(Ecore_Pipe *p); -EAPI void - ecore_pipe_read_close(Ecore_Pipe *p); -EAPI void - ecore_pipe_thaw(Ecore_Pipe *p); -EAPI void - ecore_pipe_freeze(Ecore_Pipe *p); -EAPI int - ecore_pipe_wait(Ecore_Pipe *p, - int message_count, - double wait); +EAPI Ecore_Pipe *ecore_pipe_add(Ecore_Pipe_Cb handler, const void *data); +EAPI void *ecore_pipe_del(Ecore_Pipe *p); +EAPI Eina_Bool ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes); +EAPI void ecore_pipe_write_close(Ecore_Pipe *p); +EAPI void ecore_pipe_read_close(Ecore_Pipe *p); +EAPI void ecore_pipe_thaw(Ecore_Pipe *p); +EAPI void ecore_pipe_freeze(Ecore_Pipe *p); +EAPI int ecore_pipe_wait(Ecore_Pipe *p, int message_count, double wait); /** * @} @@ -2284,7 +2082,7 @@ EAPI int * will be processed first). This also gives the chance to other * actions in your program to cancel the job before it is started. * - * Examples of using @ref Ecore_Job: + * Examples of using @ref Ecore_Job : * @li @ref ecore_job_example_c * * @ingroup Ecore_Main_Loop_Group @@ -2294,11 +2092,8 @@ EAPI int typedef struct _Ecore_Job Ecore_Job; /**< A job handle */ -EAPI Ecore_Job * -ecore_job_add(Ecore_Cb func, - const void *data); -EAPI void * -ecore_job_del(Ecore_Job *job); +EAPI Ecore_Job *ecore_job_add(Ecore_Cb func, const void *data); +EAPI void *ecore_job_del(Ecore_Job *job); /** * @} @@ -2310,14 +2105,9 @@ ecore_job_del(Ecore_Job *job); * @{ */ -EAPI void -ecore_app_args_set(int argc, - const char **argv); -EAPI void -ecore_app_args_get(int *argc, - char ***argv); -EAPI void -ecore_app_restart(void); +EAPI void ecore_app_args_set(int argc, const char **argv); +EAPI void ecore_app_args_get(int *argc, char ***argv); +EAPI void ecore_app_restart(void); /** * @} @@ -2331,10 +2121,8 @@ ecore_app_restart(void); * @{ */ -EAPI void - ecore_throttle_adjust(double amount); -EAPI double - ecore_throttle_get(void); +EAPI void ecore_throttle_adjust(double amount); +EAPI double ecore_throttle_get(void); /** * @} diff --git a/libraries/ecore/src/lib/ecore/Makefile.am b/libraries/ecore/src/lib/ecore/Makefile.am index 2fb6a0a..ec3d99f 100644 --- a/libraries/ecore/src/lib/ecore/Makefile.am +++ b/libraries/ecore/src/lib/ecore/Makefile.am @@ -11,6 +11,7 @@ includesdir = $(includedir)/ecore-@VMAJ@ libecore_la_SOURCES = \ ecore.c \ +ecore_alloc.c \ ecore_anim.c \ ecore_app.c \ ecore_events.c \ diff --git a/libraries/ecore/src/lib/ecore/Makefile.in b/libraries/ecore/src/lib/ecore/Makefile.in index e19bfde..66a25cd 100644 --- a/libraries/ecore/src/lib/ecore/Makefile.in +++ b/libraries/ecore/src/lib/ecore/Makefile.in @@ -91,8 +91,8 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libecore_la_DEPENDENCIES = -am__libecore_la_SOURCES_DIST = ecore.c ecore_anim.c ecore_app.c \ - ecore_events.c ecore_getopt.c ecore_idle_enterer.c \ +am__libecore_la_SOURCES_DIST = ecore.c ecore_alloc.c ecore_anim.c \ + ecore_app.c ecore_events.c ecore_getopt.c ecore_idle_enterer.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 ecore_exe_win32.c \ @@ -102,13 +102,13 @@ am__libecore_la_SOURCES_DIST = ecore.c ecore_anim.c ecore_app.c \ @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_libecore_la_OBJECTS = ecore.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_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) libecore_la_OBJECTS = $(am_libecore_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) @@ -266,10 +266,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -288,6 +288,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -401,6 +405,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -413,6 +419,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -457,12 +465,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ @@ -488,12 +498,12 @@ Ecore.h \ Ecore_Getopt.h includesdir = $(includedir)/ecore-@VMAJ@ -libecore_la_SOURCES = ecore.c ecore_anim.c ecore_app.c ecore_events.c \ - ecore_getopt.c ecore_idle_enterer.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) +libecore_la_SOURCES = ecore.c ecore_alloc.c ecore_anim.c ecore_app.c \ + ecore_events.c ecore_getopt.c ecore_idle_enterer.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) 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 @@ -572,6 +582,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_alloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_anim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_app.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_events.Plo@am__quote@ diff --git a/libraries/ecore/src/lib/ecore/ecore.c b/libraries/ecore/src/lib/ecore/ecore.c index 99d79c1..7e0f973 100644 --- a/libraries/ecore/src/lib/ecore/ecore.c +++ b/libraries/ecore/src/lib/ecore/ecore.c @@ -2,6 +2,7 @@ # include #endif +#include #include #include #include @@ -159,6 +160,7 @@ ecore_init(void) } if (getenv("ECORE_FPS_DEBUG")) _ecore_fps_debug = 1; if (_ecore_fps_debug) _ecore_fps_debug_init(); + if (!ecore_mempool_init()) goto shutdown_mempool; _ecore_main_loop_init(); _ecore_signal_init(); _ecore_thread_init(); @@ -191,6 +193,8 @@ ecore_init(void) return _ecore_init_count; +shutdown_mempool: + ecore_mempool_shutdown(); shutdown_log_dom: eina_shutdown(); shutdown_evil: @@ -219,8 +223,22 @@ ecore_shutdown(void) _ecore_lock(); if (--_ecore_init_count != 0) goto unlock; - - ecore_pipe_del(_thread_call); + + /* this looks horrible - a hack for now, but something to note. as + * we delete the _thread_call pipe a thread COULD be doing + * ecore_pipe_write() or what not to it at the same time - we + * must ensure all possible users of this _thread_call are finished + * and exited before we delete it here */ + /* + * ok - this causes other valgrind complaints regarding glib aquiring + * locks internally. so fix bug a or bug b. let's leave the original + * bug in then and leave this as a note for now + Ecore_Pipe *p; + p = _thread_call; + _thread_call = NULL; + ecore_pipe_wait(p, 1, 0.1); + ecore_pipe_del(p); + */ eina_lock_free(&_thread_safety); eina_condition_free(&_thread_cond); eina_lock_free(&_thread_mutex); @@ -255,7 +273,7 @@ ecore_shutdown(void) _ecore_memory_max_free); } #endif - + ecore_mempool_shutdown(); eina_log_domain_unregister(_ecore_log_dom); _ecore_log_dom = -1; eina_shutdown(); diff --git a/libraries/ecore/src/lib/ecore/ecore_alloc.c b/libraries/ecore/src/lib/ecore/ecore_alloc.c new file mode 100644 index 0000000..412c383 --- /dev/null +++ b/libraries/ecore/src/lib/ecore/ecore_alloc.c @@ -0,0 +1,132 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include + +#include "Ecore.h" +#include "ecore_private.h" + +typedef struct _Ecore_Mempool Ecore_Mempool; +struct _Ecore_Mempool +{ + const char *name; + Eina_Mempool *mp; + size_t size; +}; + +#define GENERIC_ALLOC_FREE(TYPE, Type) \ + extern size_t _ecore_sizeof_##TYPE; \ + Ecore_Mempool Type##_mp = { #TYPE, NULL, 0 }; \ + TYPE * \ + Type##_calloc(unsigned int num) \ + { \ + return eina_mempool_calloc(Type##_mp.mp, \ + num * _ecore_sizeof_##TYPE); \ + } \ + void \ + Type##_mp_free(TYPE *e) \ + { \ + eina_mempool_free(Type##_mp.mp, e); \ + } + +GENERIC_ALLOC_FREE(Ecore_Animator, ecore_animator); +GENERIC_ALLOC_FREE(Ecore_Event_Handler, ecore_event_handler); +GENERIC_ALLOC_FREE(Ecore_Event_Filter, ecore_event_filter); +GENERIC_ALLOC_FREE(Ecore_Event, ecore_event); +GENERIC_ALLOC_FREE(Ecore_Idle_Exiter, ecore_idle_exiter); +GENERIC_ALLOC_FREE(Ecore_Idle_Enterer, ecore_idle_enterer); +GENERIC_ALLOC_FREE(Ecore_Idler, ecore_idler); +GENERIC_ALLOC_FREE(Ecore_Job, ecore_job); +GENERIC_ALLOC_FREE(Ecore_Timer, ecore_timer); +GENERIC_ALLOC_FREE(Ecore_Poller, ecore_poller); +GENERIC_ALLOC_FREE(Ecore_Pipe, ecore_pipe); +GENERIC_ALLOC_FREE(Ecore_Fd_Handler, ecore_fd_handler); +#ifdef _WIN32 +GENERIC_ALLOC_FREE(Ecore_Win32_Handler, ecore_win32_handler); +#endif + +static Ecore_Mempool *mempool_array[] = { + &ecore_animator_mp, + &ecore_event_handler_mp, + &ecore_event_filter_mp, + &ecore_event_mp, + &ecore_idle_exiter_mp, + &ecore_idle_enterer_mp, + &ecore_idler_mp, + &ecore_job_mp, + &ecore_timer_mp, + &ecore_poller_mp, + &ecore_pipe_mp, + &ecore_fd_handler_mp, +#ifdef _WIN32 + &ecore_win32_handler_mp +#endif +}; + +Eina_Bool +ecore_mempool_init(void) +{ + const char *choice; + unsigned int i; + +#define MP_SIZE_INIT(TYPE, Type) \ + Type##_mp.size = _ecore_sizeof_##TYPE + + MP_SIZE_INIT(Ecore_Animator, ecore_animator); + MP_SIZE_INIT(Ecore_Event_Handler, ecore_event_handler); + MP_SIZE_INIT(Ecore_Event_Filter, ecore_event_filter); + MP_SIZE_INIT(Ecore_Event, ecore_event); + MP_SIZE_INIT(Ecore_Idle_Exiter, ecore_idle_exiter); + MP_SIZE_INIT(Ecore_Idle_Enterer, ecore_idle_enterer); + MP_SIZE_INIT(Ecore_Idler, ecore_idler); + MP_SIZE_INIT(Ecore_Job, ecore_job); + MP_SIZE_INIT(Ecore_Timer, ecore_timer); + MP_SIZE_INIT(Ecore_Poller, ecore_poller); + MP_SIZE_INIT(Ecore_Pipe, ecore_pipe); + MP_SIZE_INIT(Ecore_Fd_Handler, ecore_fd_handler); +#ifdef _WIN32 + MP_SIZE_INIT(Ecore_Win32_Handler, ecore_win32_handler); +#endif +#undef MP_SIZE_INIT + + choice = getenv("EINA_MEMPOOL"); + if ((!choice) || (!choice[0])) + choice = "chained_mempool"; + + for (i = 0; i < sizeof (mempool_array) / sizeof (mempool_array[0]); ++i) + { + retry: + mempool_array[i]->mp = eina_mempool_add(choice, mempool_array[i]->name, NULL, mempool_array[i]->size, 64); + if (!mempool_array[i]->mp) + { + if (!strcmp(choice, "pass_through")) + { + ERR("Falling back to pass through ! Previously tried '%s' mempool.", choice); + choice = "pass_through"; + goto retry; + } + else + { + ERR("Impossible to allocate mempool '%s' !", choice); + return EINA_FALSE; + } + } + } + return EINA_TRUE; +} + +void +ecore_mempool_shutdown(void) +{ + unsigned int i; + + for (i = 0; i < sizeof (mempool_array) / sizeof (mempool_array[0]); ++i) + { + eina_mempool_del(mempool_array[i]->mp); + mempool_array[i]->mp = NULL; + } +} + diff --git a/libraries/ecore/src/lib/ecore/ecore_anim.c b/libraries/ecore/src/lib/ecore/ecore_anim.c index 9adaa77..78abad7 100644 --- a/libraries/ecore/src/lib/ecore/ecore_anim.c +++ b/libraries/ecore/src/lib/ecore/ecore_anim.c @@ -22,8 +22,11 @@ struct _Ecore_Animator Eina_Bool delete_me : 1; Eina_Bool suspended : 1; + Eina_Bool just_added : 1; }; +GENERIC_ALLOC_SIZE_DECLARE(Ecore_Animator); + static Eina_Bool _ecore_animator_run(void *data); static Eina_Bool _ecore_animator(void *data); @@ -99,7 +102,13 @@ _do_tick(void) EINA_INLIST_FOREACH(animators, animator) { - if (!animator->delete_me && !animator->suspended) + animator->just_added = EINA_FALSE; + } + EINA_INLIST_FOREACH(animators, animator) + { + if ((!animator->delete_me) && + (!animator->suspended) && + (!animator->just_added)) { if (!_ecore_call_task_cb(animator->func, animator->data)) { @@ -107,6 +116,7 @@ _do_tick(void) animators_delete_me++; } } + else animator->just_added = EINA_FALSE; } if (animators_delete_me) { @@ -121,7 +131,7 @@ _do_tick(void) eina_inlist_remove(EINA_INLIST_GET(animators), EINA_INLIST_GET(animator)); ECORE_MAGIC_SET(animator, ECORE_MAGIC_NONE); - free(animator); + ecore_animator_mp_free(animator); animators_delete_me--; if (animators_delete_me == 0) break; } @@ -142,11 +152,12 @@ _ecore_animator_add(Ecore_Task_Cb func, Ecore_Animator *animator = NULL; if (!func) return animator; - animator = calloc(1, sizeof(Ecore_Animator)); + animator = ecore_animator_calloc(1); if (!animator) return animator; ECORE_MAGIC_SET(animator, ECORE_MAGIC_ANIMATOR); animator->func = func; animator->data = (void *)data; + animator->just_added = EINA_TRUE; animators = (Ecore_Animator *)eina_inlist_append(EINA_INLIST_GET(animators), EINA_INLIST_GET(animator)); _begin_tick(); return animator; @@ -443,7 +454,7 @@ _ecore_animator_shutdown(void) animator = animators; animators = (Ecore_Animator *)eina_inlist_remove(EINA_INLIST_GET(animators), EINA_INLIST_GET(animators)); ECORE_MAGIC_SET(animator, ECORE_MAGIC_NONE); - free(animator); + ecore_animator_mp_free(animator); } } diff --git a/libraries/ecore/src/lib/ecore/ecore_events.c b/libraries/ecore/src/lib/ecore/ecore_events.c index f31baf8..0550224 100644 --- a/libraries/ecore/src/lib/ecore/ecore_events.c +++ b/libraries/ecore/src/lib/ecore/ecore_events.c @@ -19,6 +19,7 @@ struct _Ecore_Event_Handler int references; Eina_Bool delete_me : 1; }; +GENERIC_ALLOC_SIZE_DECLARE(Ecore_Event_Handler); struct _Ecore_Event_Filter { @@ -32,6 +33,7 @@ struct _Ecore_Event_Filter int references; Eina_Bool delete_me : 1; }; +GENERIC_ALLOC_SIZE_DECLARE(Ecore_Event_Filter); struct _Ecore_Event { @@ -44,6 +46,7 @@ struct _Ecore_Event int references; Eina_Bool delete_me : 1; }; +GENERIC_ALLOC_SIZE_DECLARE(Ecore_Event); static int events_num = 0; static Ecore_Event *events = NULL; @@ -109,7 +112,7 @@ ecore_event_handler_add(int type, if (!func) goto unlock; if ((type <= ECORE_EVENT_NONE) || (type >= event_id_max)) goto unlock; - eh = calloc(1, sizeof(Ecore_Event_Handler)); + eh = ecore_event_handler_calloc(1); if (!eh) goto unlock; ECORE_MAGIC_SET(eh, ECORE_MAGIC_EVENT_HANDLER); eh->type = type; @@ -130,7 +133,7 @@ ecore_event_handler_add(int type, new_handlers = realloc(event_handlers, event_handlers_alloc_num * sizeof(Ecore_Event_Handler *)); if (!new_handlers) { - free(eh); + ecore_event_handler_mp_free(eh); goto unlock; } event_handlers = new_handlers; @@ -234,7 +237,7 @@ unlock: static void _ecore_event_generic_free(void *data __UNUSED__, void *event) -{ +{ /* DO NOT MEMPOOL FREE THIS */ free (event); } @@ -358,7 +361,7 @@ ecore_event_filter_add(Ecore_Data_Cb func_start, _ecore_lock(); if (!func_filter) goto unlock; - ef = calloc(1, sizeof(Ecore_Event_Filter)); + ef = ecore_event_filter_calloc(1); if (!ef) goto unlock; ECORE_MAGIC_SET(ef, ECORE_MAGIC_EVENT_FILTER); ef->func_start = func_start; @@ -469,11 +472,11 @@ _ecore_event_shutdown(void) { event_handlers[i] = (Ecore_Event_Handler *)eina_inlist_remove(EINA_INLIST_GET(event_handlers[i]), EINA_INLIST_GET(event_handlers[i])); ECORE_MAGIC_SET(eh, ECORE_MAGIC_NONE); - if (!eh->delete_me) free(eh); + if (!eh->delete_me) ecore_event_handler_mp_free(eh); } } EINA_LIST_FREE(event_handlers_delete_list, eh) - free(eh); + ecore_event_handler_mp_free(eh); if (event_handlers) free(event_handlers); event_handlers = NULL; event_handlers_num = 0; @@ -482,7 +485,7 @@ _ecore_event_shutdown(void) { event_filters = (Ecore_Event_Filter *)eina_inlist_remove(EINA_INLIST_GET(event_filters), EINA_INLIST_GET(event_filters)); ECORE_MAGIC_SET(ef, ECORE_MAGIC_NONE); - free(ef); + ecore_event_filter_mp_free(ef); } event_filters_delete_me = 0; event_filter_current = NULL; @@ -506,7 +509,7 @@ _ecore_event_add(int type, { Ecore_Event *e; - e = calloc(1, sizeof(Ecore_Event)); + e = ecore_event_calloc(1); if (!e) return NULL; ECORE_MAGIC_SET(e, ECORE_MAGIC_EVENT); e->type = type; @@ -535,7 +538,7 @@ _ecore_event_del(Ecore_Event *event) if (event->func_free) _ecore_call_end_cb(event->func_free, event->data, event->event); events = (Ecore_Event *)eina_inlist_remove(EINA_INLIST_GET(events), EINA_INLIST_GET(event)); ECORE_MAGIC_SET(event, ECORE_MAGIC_NONE); - free(event); + ecore_event_mp_free(event); events_num--; return data; } @@ -638,7 +641,7 @@ _ecore_event_filters_apply() event_filters = (Ecore_Event_Filter *)eina_inlist_remove(EINA_INLIST_GET(event_filters), EINA_INLIST_GET(ef)); ECORE_MAGIC_SET(ef, ECORE_MAGIC_NONE); - free(ef); + ecore_event_filter_mp_free(ef); } } if (!deleted_in_use) @@ -742,7 +745,7 @@ _ecore_event_call(void) event_handlers[eh->type] = (Ecore_Event_Handler *)eina_inlist_remove(EINA_INLIST_GET(event_handlers[eh->type]), EINA_INLIST_GET(eh)); ECORE_MAGIC_SET(eh, ECORE_MAGIC_NONE); - free(eh); + ecore_event_handler_mp_free(eh); } } diff --git a/libraries/ecore/src/lib/ecore/ecore_getopt.c b/libraries/ecore/src/lib/ecore/ecore_getopt.c index 0ce8f6e..76272d3 100644 --- a/libraries/ecore/src/lib/ecore/ecore_getopt.c +++ b/libraries/ecore/src/lib/ecore/ecore_getopt.c @@ -19,6 +19,7 @@ extern "C" void *alloca(size_t); #endif +#include #include #include #include @@ -130,7 +131,7 @@ _ecore_getopt_help_line(FILE *fp, todo = len; for (i = 0; i < todo; i++) - if (isspace(text[i])) + if (isspace((unsigned char)text[i])) { space = text + i; break; @@ -1762,7 +1763,7 @@ _ecore_getopt_find_help(const Ecore_Getopt *parser) * will be applied on them if ecore was compiled with such support. * * @param parser description of how to work. - * @param value where to store values, it is assumed that this is a vector + * @param values where to store values, it is assumed that this is a vector * of the same size as @c parser->descs. Values should be previously * initialized. * @param argc how many elements in @a argv. If not provided it will be @@ -1854,7 +1855,8 @@ ecore_getopt_list_free(Eina_List *list) /** * Helper ecore_getopt callback to parse geometry (x:y:w:h). * - * Storage must be a pointer to @c Eina_Rectangle and will be used to + * @param str Geometry value + * @param storage must be a pointer to @c Eina_Rectangle and will be used to * store the four values passed in the given string. * * @c callback_data value is ignored, you can safely use @c NULL. @@ -1880,7 +1882,8 @@ ecore_getopt_callback_geometry_parse(const Ecore_Getopt *parser __UNUSED__, /** * Helper ecore_getopt callback to parse geometry size (WxH). * - * Storage must be a pointer to @c Eina_Rectangle and will be used to + * @param str size value + * @param storage must be a pointer to @c Eina_Rectangle and will be used to * store the two values passed in the given string and 0 in the x and y * fields. * diff --git a/libraries/ecore/src/lib/ecore/ecore_glib.c b/libraries/ecore/src/lib/ecore/ecore_glib.c index 6ddcd36..7cea1c9 100644 --- a/libraries/ecore/src/lib/ecore/ecore_glib.c +++ b/libraries/ecore/src/lib/ecore/ecore_glib.c @@ -2,6 +2,7 @@ # include #endif +#include #include #include "Ecore.h" @@ -189,7 +190,9 @@ _ecore_glib_select(int ecore_fds, int ret; if (g_main_context_acquire(ctx)) - g_mutex_lock(mutex); + { + if (mutex) g_mutex_lock(mutex); + } else { if (!_ecore_glib_cond) @@ -202,8 +205,9 @@ _ecore_glib_select(int ecore_fds, ret = _ecore_glib_select__locked (ctx, ecore_fds, rfds, wfds, efds, ecore_timeout); - g_mutex_unlock(mutex); + if (mutex) g_mutex_unlock(mutex); g_main_context_release(ctx); + g_static_mutex_free(&lock); return ret; } diff --git a/libraries/ecore/src/lib/ecore/ecore_idle_enterer.c b/libraries/ecore/src/lib/ecore/ecore_idle_enterer.c index 03cd1c4..8e4ae50 100644 --- a/libraries/ecore/src/lib/ecore/ecore_idle_enterer.c +++ b/libraries/ecore/src/lib/ecore/ecore_idle_enterer.c @@ -16,6 +16,7 @@ struct _Ecore_Idle_Enterer int references; Eina_Bool delete_me : 1; }; +GENERIC_ALLOC_SIZE_DECLARE(Ecore_Idle_Enterer); static Ecore_Idle_Enterer *idle_enterers = NULL; static Ecore_Idle_Enterer *idle_enterer_current = NULL; @@ -49,7 +50,7 @@ ecore_idle_enterer_add(Ecore_Task_Cb func, _ecore_lock(); if (!func) goto unlock; - ie = calloc(1, sizeof(Ecore_Idle_Enterer)); + ie = ecore_idle_enterer_calloc(1); if (!ie) goto unlock; ECORE_MAGIC_SET(ie, ECORE_MAGIC_IDLE_ENTERER); ie->func = func; @@ -79,7 +80,7 @@ ecore_idle_enterer_before_add(Ecore_Task_Cb func, _ecore_lock(); if (!func) goto unlock; - ie = calloc(1, sizeof(Ecore_Idle_Enterer)); + ie = ecore_idle_enterer_calloc(1); if (!ie) goto unlock; ECORE_MAGIC_SET(ie, ECORE_MAGIC_IDLE_ENTERER); ie->func = func; @@ -134,7 +135,7 @@ _ecore_idle_enterer_shutdown(void) { idle_enterers = (Ecore_Idle_Enterer *)eina_inlist_remove(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(idle_enterers)); ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE); - free(ie); + ecore_idle_enterer_mp_free(ie); } idle_enterers_delete_me = 0; idle_enterer_current = NULL; @@ -190,7 +191,7 @@ _ecore_idle_enterer_call(void) idle_enterers = (Ecore_Idle_Enterer *)eina_inlist_remove(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(ie)); ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE); - free(ie); + ecore_idle_enterer_mp_free(ie); } } if (!deleted_idler_enterers_in_use) diff --git a/libraries/ecore/src/lib/ecore/ecore_idle_exiter.c b/libraries/ecore/src/lib/ecore/ecore_idle_exiter.c index 70c6a7a..4e454e2 100644 --- a/libraries/ecore/src/lib/ecore/ecore_idle_exiter.c +++ b/libraries/ecore/src/lib/ecore/ecore_idle_exiter.c @@ -16,6 +16,7 @@ struct _Ecore_Idle_Exiter int references; Eina_Bool delete_me : 1; }; +GENERIC_ALLOC_SIZE_DECLARE(Ecore_Idle_Exiter); static Ecore_Idle_Exiter *idle_exiters = NULL; static Ecore_Idle_Exiter *idle_exiter_current = NULL; @@ -47,7 +48,7 @@ ecore_idle_exiter_add(Ecore_Task_Cb func, _ecore_lock(); if (!func) goto unlock; - ie = calloc(1, sizeof(Ecore_Idle_Exiter)); + ie = ecore_idle_exiter_calloc(1); if (!ie) goto unlock; ECORE_MAGIC_SET(ie, ECORE_MAGIC_IDLE_EXITER); ie->func = func; @@ -102,7 +103,7 @@ _ecore_idle_exiter_shutdown(void) { idle_exiters = (Ecore_Idle_Exiter *)eina_inlist_remove(EINA_INLIST_GET(idle_exiters), EINA_INLIST_GET(idle_exiters)); ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE); - free(ie); + ecore_idle_exiter_mp_free(ie); } idle_exiters_delete_me = 0; idle_exiter_current = NULL; @@ -159,7 +160,7 @@ _ecore_idle_exiter_call(void) idle_exiters = (Ecore_Idle_Exiter *)eina_inlist_remove(EINA_INLIST_GET(idle_exiters), EINA_INLIST_GET(ie)); ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE); - free(ie); + ecore_idle_exiter_mp_free(ie); } } if (!deleted_idler_exiters_in_use) diff --git a/libraries/ecore/src/lib/ecore/ecore_idler.c b/libraries/ecore/src/lib/ecore/ecore_idler.c index 6c0cab8..5114654 100644 --- a/libraries/ecore/src/lib/ecore/ecore_idler.c +++ b/libraries/ecore/src/lib/ecore/ecore_idler.c @@ -16,6 +16,7 @@ struct _Ecore_Idler int references; Eina_Bool delete_me : 1; }; +GENERIC_ALLOC_SIZE_DECLARE(Ecore_Idler); static Ecore_Idler *idlers = NULL; static Ecore_Idler *idler_current = NULL; @@ -32,7 +33,7 @@ ecore_idler_add(Ecore_Task_Cb func, _ecore_lock(); if (!func) goto unlock; - ie = calloc(1, sizeof(Ecore_Idler)); + ie = ecore_idler_calloc(1); if (!ie) goto unlock; ECORE_MAGIC_SET(ie, ECORE_MAGIC_IDLER); ie->func = func; @@ -86,7 +87,7 @@ _ecore_idler_shutdown(void) { idlers = (Ecore_Idler *)eina_inlist_remove(EINA_INLIST_GET(idlers), EINA_INLIST_GET(idlers)); ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE); - free(ie); + ecore_idler_mp_free(ie); } idlers_delete_me = 0; idler_current = NULL; @@ -139,7 +140,7 @@ _ecore_idler_all_call(void) idlers = (Ecore_Idler *)eina_inlist_remove(EINA_INLIST_GET(idlers), EINA_INLIST_GET(ie)); ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE); - free(ie); + ecore_idler_mp_free(ie); } } if (!deleted_idlers_in_use) diff --git a/libraries/ecore/src/lib/ecore/ecore_job.c b/libraries/ecore/src/lib/ecore/ecore_job.c index 481c3f3..ac27c7a 100644 --- a/libraries/ecore/src/lib/ecore/ecore_job.c +++ b/libraries/ecore/src/lib/ecore/ecore_job.c @@ -23,6 +23,7 @@ struct _Ecore_Job Ecore_Cb func; void *data; }; +GENERIC_ALLOC_SIZE_DECLARE(Ecore_Job); void _ecore_job_init(void) @@ -61,13 +62,13 @@ ecore_job_add(Ecore_Cb func, if (!func) return NULL; - job = calloc(1, sizeof(Ecore_Job)); + job = ecore_job_calloc(1); if (!job) return NULL; ECORE_MAGIC_SET(job, ECORE_MAGIC_JOB); job->event = ecore_event_add(ecore_event_job_type, job, _ecore_job_event_free, NULL); if (!job->event) { - free(job); + ecore_job_mp_free(job); return NULL; } job->func = func; @@ -115,8 +116,8 @@ _ecore_job_event_handler(void *data __UNUSED__, static void _ecore_job_event_free(void *data __UNUSED__, - void *ev) + void *job) { - free(ev); + ecore_job_mp_free(job); } diff --git a/libraries/ecore/src/lib/ecore/ecore_main.c b/libraries/ecore/src/lib/ecore/ecore_main.c index 152836a..76aced6 100644 --- a/libraries/ecore/src/lib/ecore/ecore_main.c +++ b/libraries/ecore/src/lib/ecore/ecore_main.c @@ -167,6 +167,7 @@ struct _Ecore_Fd_Handler GPollFD gfd; #endif }; +GENERIC_ALLOC_SIZE_DECLARE(Ecore_Fd_Handler); #ifdef _WIN32 struct _Ecore_Win32_Handler @@ -179,6 +180,7 @@ struct _Ecore_Win32_Handler int references; Eina_Bool delete_me : 1; }; +GENERIC_ALLOC_SIZE_DECLARE(Ecore_Win32_Handler); #endif #ifndef USE_G_MAIN_LOOP @@ -207,9 +209,7 @@ static void _ecore_main_win32_handlers_cleanup(void); #endif static int in_main_loop = 0; -#ifndef USE_G_MAIN_LOOP static int do_quit = 0; -#endif static Ecore_Fd_Handler *fd_handlers = NULL; static Ecore_Fd_Handler *fd_handler_current = NULL; static Eina_List *fd_handlers_with_prep = NULL; @@ -889,8 +889,13 @@ ecore_main_loop_begin(void) in_main_loop--; _ecore_unlock(); #else - ecore_main_loop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(ecore_main_loop); + if (!do_quit) + { + if (!ecore_main_loop) + ecore_main_loop = g_main_loop_new(NULL, FALSE); + g_main_loop_run(ecore_main_loop); + } + do_quit = 0; #endif } @@ -904,10 +909,10 @@ ecore_main_loop_begin(void) EAPI void ecore_main_loop_quit(void) { -#ifndef USE_G_MAIN_LOOP do_quit = 1; -#else - g_main_loop_quit(ecore_main_loop); +#ifdef USE_G_MAIN_LOOP + if (ecore_main_loop) + g_main_loop_quit(ecore_main_loop); #endif } @@ -987,7 +992,7 @@ ecore_main_fd_handler_add(int fd, if ((fd < 0) || (flags == 0) || (!func)) goto unlock; - fdh = calloc(1, sizeof(Ecore_Fd_Handler)); + fdh = ecore_fd_handler_calloc(1); if (!fdh) goto unlock; ECORE_MAGIC_SET(fdh, ECORE_MAGIC_FD_HANDLER); fdh->next_ready = NULL; @@ -997,7 +1002,7 @@ ecore_main_fd_handler_add(int fd, { int err = errno; ERR("Failed to add poll on fd %d (errno = %d: %s)!", fd, err, strerror(err)); - free(fdh); + ecore_fd_handler_mp_free(fdh); fdh = NULL; goto unlock; } @@ -1030,7 +1035,7 @@ ecore_main_win32_handler_add(void *h, if (!h || !func) return NULL; - wh = calloc(1, sizeof(Ecore_Win32_Handler)); + wh = ecore_win32_handler_calloc(1); if (!wh) return NULL; ECORE_MAGIC_SET(wh, ECORE_MAGIC_WIN32_HANDLER); wh->h = (HANDLE)h; @@ -1260,7 +1265,7 @@ _ecore_main_shutdown(void) fd_handlers = (Ecore_Fd_Handler *)eina_inlist_remove(EINA_INLIST_GET(fd_handlers), EINA_INLIST_GET(fdh)); ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE); - free(fdh); + ecore_fd_handler_mp_free(fdh); } if (fd_handlers_with_buffer) fd_handlers_with_buffer = eina_list_free(fd_handlers_with_buffer); @@ -1283,7 +1288,7 @@ _ecore_main_shutdown(void) win32_handlers = (Ecore_Win32_Handler *)eina_inlist_remove(EINA_INLIST_GET(win32_handlers), EINA_INLIST_GET(wh)); ECORE_MAGIC_SET(wh, ECORE_MAGIC_NONE); - free(wh); + ecore_win32_handler_mp_free(wh); } win32_handlers_delete_me = EINA_FALSE; win32_handler_current = NULL; @@ -1524,7 +1529,7 @@ _ecore_main_fd_handlers_cleanup(void) fd_handlers = (Ecore_Fd_Handler *) eina_inlist_remove(EINA_INLIST_GET(fd_handlers), EINA_INLIST_GET(fdh)); ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE); - free(fdh); + ecore_fd_handler_mp_free(fdh); fd_handlers_to_delete = eina_list_remove_list(fd_handlers_to_delete, l); } } @@ -1555,7 +1560,7 @@ _ecore_main_win32_handlers_cleanup(void) eina_inlist_remove(EINA_INLIST_GET(win32_handlers), EINA_INLIST_GET(wh)); ECORE_MAGIC_SET(wh, ECORE_MAGIC_NONE); - free(wh); + ecore_win32_handler_mp_free(wh); } } if (!deleted_in_use) win32_handlers_delete_me = EINA_FALSE; diff --git a/libraries/ecore/src/lib/ecore/ecore_pipe.c b/libraries/ecore/src/lib/ecore/ecore_pipe.c index 0ab7dd0..aa640cd 100644 --- a/libraries/ecore/src/lib/ecore/ecore_pipe.c +++ b/libraries/ecore/src/lib/ecore/ecore_pipe.c @@ -95,6 +95,7 @@ struct _Ecore_Pipe int message; Eina_Bool delete_me : 1; }; +GENERIC_ALLOC_SIZE_DECLARE(Ecore_Pipe); static Eina_Bool _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler); @@ -125,12 +126,12 @@ ecore_pipe_add(Ecore_Pipe_Cb handler, if (!handler) return NULL; - p = (Ecore_Pipe *)calloc(1, sizeof(Ecore_Pipe)); + p = ecore_pipe_calloc(1); if (!p) return NULL; if (pipe(fds)) { - free(p); + ecore_pipe_mp_free(p); return NULL; } @@ -171,7 +172,7 @@ ecore_pipe_del(Ecore_Pipe *p) if (p->fd_read != PIPE_FD_INVALID) pipe_close(p->fd_read); if (p->fd_write != PIPE_FD_INVALID) pipe_close(p->fd_write); data = (void *)p->data; - free(p); + ecore_pipe_mp_free(p); return data; } @@ -535,7 +536,6 @@ _ecore_pipe_read(void *data, else if ((ret == PIPE_FD_ERROR) && ((errno == EINTR) || (errno == EAGAIN))) { - _ecore_pipe_unhandle(p); return ECORE_CALLBACK_RENEW; } else @@ -543,7 +543,6 @@ _ecore_pipe_read(void *data, ERR("An unhandled error (ret: %i errno: %i [%s])" "occurred while reading from the pipe the length", (int)ret, errno, strerror(errno)); - _ecore_pipe_unhandle(p); return ECORE_CALLBACK_RENEW; } #else diff --git a/libraries/ecore/src/lib/ecore/ecore_poll.c b/libraries/ecore/src/lib/ecore/ecore_poll.c index a283cb5..732850b 100644 --- a/libraries/ecore/src/lib/ecore/ecore_poll.c +++ b/libraries/ecore/src/lib/ecore/ecore_poll.c @@ -16,6 +16,7 @@ struct _Ecore_Poller Ecore_Task_Cb func; void *data; }; +GENERIC_ALLOC_SIZE_DECLARE(Ecore_Poller); static Ecore_Timer *timer = NULL; static int min_interval = -1; @@ -109,8 +110,8 @@ _ecore_poller_cb_timer(void *data __UNUSED__) at_tick++; last_tick = ecore_time_get(); - /* we have 16 counters - each incriments every time the poller counter - * "ticks". it incriments by the minimum interval (which can be 1, 2, 4, + /* we have 16 counters - each increments every time the poller counter + * "ticks". it increments by the minimum interval (which can be 1, 2, 4, * 7, 16 etc. up to 32768) */ for (i = 0; i < 15; i++) { @@ -159,7 +160,7 @@ _ecore_poller_cb_timer(void *data __UNUSED__) if (poller->delete_me) { pollers[i] = (Ecore_Poller *)eina_inlist_remove(EINA_INLIST_GET(pollers[i]), EINA_INLIST_GET(poller)); - free(poller); + ecore_poller_mp_free(poller); poller_delete_count--; changes++; if (poller_delete_count <= 0) break; @@ -179,7 +180,7 @@ _ecore_poller_cb_timer(void *data __UNUSED__) at_tick--; /* if the timer was deleted then there is no point returning 1 - ambiguous - * if we do as it im plies "keep running me" but we have been deleted + * if we do as it implies keep running me" but we have been deleted * anyway */ if (!timer) return ECORE_CALLBACK_CANCEL; @@ -215,7 +216,7 @@ ecore_poller_poll_interval_set(Ecore_Poller_Type type __UNUSED__, * @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 specifider 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__) @@ -281,7 +282,7 @@ ecore_poller_add(Ecore_Poller_Type type __UNUSED__, if (!func) return NULL; if (interval < 1) interval = 1; - poller = calloc(1, sizeof(Ecore_Poller)); + poller = ecore_poller_calloc(1); if (!poller) return NULL; ECORE_MAGIC_SET(poller, ECORE_MAGIC_POLLER); /* interval MUST be a power of 2, so enforce it */ @@ -413,7 +414,7 @@ ecore_poller_del(Ecore_Poller *poller) /* not in loop so safe - delete immediately */ data = poller->data; pollers[poller->ibit] = (Ecore_Poller *)eina_inlist_remove(EINA_INLIST_GET(pollers[poller->ibit]), EINA_INLIST_GET(poller)); - free(poller); + ecore_poller_mp_free(poller); _ecore_poller_next_tick_eval(); return data; } @@ -433,7 +434,7 @@ _ecore_poller_shutdown(void) while ((poller = pollers[i])) { pollers[i] = (Ecore_Poller *)eina_inlist_remove(EINA_INLIST_GET(pollers[i]), EINA_INLIST_GET(pollers[i])); - free(poller); + ecore_poller_mp_free(poller); } } } diff --git a/libraries/ecore/src/lib/ecore/ecore_private.h b/libraries/ecore/src/lib/ecore/ecore_private.h index f328605..50d502c 100644 --- a/libraries/ecore/src/lib/ecore/ecore_private.h +++ b/libraries/ecore/src/lib/ecore/ecore_private.h @@ -79,6 +79,7 @@ extern int _ecore_log_dom; #define ECORE_MAGIC_WIN32_HANDLER 0xf7e8f1a3 #define ECORE_MAGIC_JOB 0x76543210 +typedef unsigned int Ecore_Magic; #define ECORE_MAGIC Ecore_Magic __magic #define ECORE_MAGIC_SET(d, m) (d)->__magic = (m) @@ -116,8 +117,6 @@ ecore_print_warning(const char *function, return; \ } -typedef unsigned int Ecore_Magic; - EAPI void _ecore_magic_fail(const void *d, Ecore_Magic m, Ecore_Magic req_m, @@ -350,4 +349,30 @@ extern double _ecore_time_loop_time; extern Eina_Bool _ecore_glib_always_integrate; extern Ecore_Select_Function main_loop_select; +Eina_Bool ecore_mempool_init(void); +void ecore_mempool_shutdown(void); +#define GENERIC_ALLOC_FREE_HEADER(TYPE, Type) \ + TYPE *Type##_calloc(unsigned int); \ + void Type##_mp_free(TYPE *e); +#define GENERIC_ALLOC_SIZE_DECLARE(TYPE) \ + size_t _ecore_sizeof_##TYPE = sizeof (TYPE); + +GENERIC_ALLOC_FREE_HEADER(Ecore_Animator, ecore_animator); +GENERIC_ALLOC_FREE_HEADER(Ecore_Event_Handler, ecore_event_handler); +GENERIC_ALLOC_FREE_HEADER(Ecore_Event_Filter, ecore_event_filter); +GENERIC_ALLOC_FREE_HEADER(Ecore_Event, ecore_event); +GENERIC_ALLOC_FREE_HEADER(Ecore_Idle_Exiter, ecore_idle_exiter); +GENERIC_ALLOC_FREE_HEADER(Ecore_Idle_Enterer, ecore_idle_enterer); +GENERIC_ALLOC_FREE_HEADER(Ecore_Idler, ecore_idler); +GENERIC_ALLOC_FREE_HEADER(Ecore_Job, ecore_job); +GENERIC_ALLOC_FREE_HEADER(Ecore_Timer, ecore_timer); +GENERIC_ALLOC_FREE_HEADER(Ecore_Poller, ecore_poller); +GENERIC_ALLOC_FREE_HEADER(Ecore_Pipe, ecore_pipe); +GENERIC_ALLOC_FREE_HEADER(Ecore_Fd_Handler, ecore_fd_handler); +#ifdef _WIN32 +GENERIC_ALLOC_FREE_HEADER(Ecore_Win32_Handler, ecore_win32_handler); +#endif + +#undef GENERIC_ALLOC_FREE_HEADER + #endif diff --git a/libraries/ecore/src/lib/ecore/ecore_thread.c b/libraries/ecore/src/lib/ecore/ecore_thread.c index 2a8ea76..4444ad4 100644 --- a/libraries/ecore/src/lib/ecore/ecore_thread.c +++ b/libraries/ecore/src/lib/ecore/ecore_thread.c @@ -2,6 +2,7 @@ # include #endif +#include #include #include #include @@ -388,7 +389,7 @@ static void _ecore_thread_handler(void *data __UNUSED__, static Ecore_Pipe * _ecore_thread_pipe_get(void) { - if (eina_array_count_get(_ecore_thread_pipe) > 0) + if (eina_array_count(_ecore_thread_pipe) > 0) return eina_array_pop(_ecore_thread_pipe); return ecore_pipe_add(_ecore_thread_handler, NULL); @@ -458,7 +459,7 @@ _ecore_thread_pipe_free(void *data __UNUSED__, { Ecore_Pipe *p = event; - if (eina_array_count_get(_ecore_thread_pipe) < 50) + if (eina_array_count(_ecore_thread_pipe) < 50) eina_array_push(_ecore_thread_pipe, p); else ecore_pipe_del(p); @@ -544,7 +545,7 @@ _ecore_thread_kill(Ecore_Pthread_Worker *work) LKD(work->mutex); if (work->hash) eina_hash_free(work->hash); - free(work); + _ecore_thread_worker_free(work); } static void @@ -594,7 +595,8 @@ _ecore_notify_handler(void *data, } static void -_ecore_short_job(Ecore_Pipe *end_pipe) +_ecore_short_job(Ecore_Pipe *end_pipe, + PH(thread)) { Ecore_Pthread_Worker *work; @@ -614,6 +616,7 @@ _ecore_short_job(Ecore_Pipe *end_pipe) LKU(_ecore_pending_job_threads_mutex); + work->self = thread; if (!work->cancel) work->u.short_run.func_blocking((void *)work->data, (Ecore_Thread *)work); @@ -737,7 +740,7 @@ _ecore_thread_worker(Ecore_Pthread_Data *pth) eina_sched_prio_drop(); restart: - if (_ecore_pending_job_threads) _ecore_short_job(pth->p); + 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); /* FIXME: Check if there is feedback running task todo, and switch to feedback run handler. */ @@ -929,6 +932,7 @@ ecore_thread_run(Ecore_Thread_Cb func_blocking, work->data = data; #ifdef EFL_HAVE_THREADS + work->self = 0; work->hash = NULL; CDI(work->cond); LKI(work->mutex); @@ -1114,6 +1118,7 @@ ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy, worker->feedback_run = EINA_TRUE; worker->kill = EINA_FALSE; worker->reschedule = EINA_FALSE; + worker->self = 0; worker->u.feedback_run.send = 0; worker->u.feedback_run.received = 0; diff --git a/libraries/ecore/src/lib/ecore/ecore_timer.c b/libraries/ecore/src/lib/ecore/ecore_timer.c index 9c66545..cc19e3f 100644 --- a/libraries/ecore/src/lib/ecore/ecore_timer.c +++ b/libraries/ecore/src/lib/ecore/ecore_timer.c @@ -35,6 +35,7 @@ struct _Ecore_Timer unsigned char just_added : 1; unsigned char frozen : 1; }; +GENERIC_ALLOC_SIZE_DECLARE(Ecore_Timer); static void _ecore_timer_set(Ecore_Timer *timer, double at, @@ -140,7 +141,7 @@ ecore_timer_add(double in, _ecore_lock(); if (!func) goto unlock; if (in < 0.0) in = 0.0; - timer = calloc(1, sizeof(Ecore_Timer)); + timer = ecore_timer_calloc(1); if (!timer) goto unlock; ECORE_MAGIC_SET(timer, ECORE_MAGIC_TIMER); now = ecore_time_get(); @@ -287,6 +288,37 @@ ecore_timer_delay(Ecore_Timer *timer, } /** + * Reset a timer to its full interval + * This doesn't affect the interval of a timer + * @param timer The timer + * @since 1.2 + * @note This is equivalent to (but faster than) + * @code + * ecore_timer_delay(timer, ecore_timer_interval_get(timer) - ecore_timer_pending_get(timer)); + * @endcode + */ +EAPI void +ecore_timer_reset(Ecore_Timer *timer) +{ + double now, add; + if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER)) + { + ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER, + __func__); + return; + } + _ecore_lock(); + now = ecore_time_get(); + + if (timer->frozen) + add = timer->pending; + else + add = timer->at - now; + _ecore_timer_delay(timer, timer->in - add); + _ecore_unlock(); +} + +/** * Get the pending time regarding a timer. * * @param timer The timer to learn from. @@ -470,7 +502,7 @@ _ecore_timer_loop_add(double in, if (!func) return timer; if (in < 0.0) in = 0.0; - timer = calloc(1, sizeof(Ecore_Timer)); + timer = ecore_timer_calloc(1); if (!timer) return timer; ECORE_MAGIC_SET(timer, ECORE_MAGIC_TIMER); now = ecore_loop_time_get(); @@ -510,7 +542,7 @@ _ecore_timer_del(Ecore_Timer *timer) if (timer->delete_me) timers_delete_me--; - free(timer); + ecore_timer_mp_free(timer); return data; } @@ -529,14 +561,14 @@ _ecore_timer_shutdown(void) { timers = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timers)); ECORE_MAGIC_SET(timer, ECORE_MAGIC_NONE); - free(timer); + ecore_timer_mp_free(timer); } while ((timer = suspended)) { suspended = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(suspended)); ECORE_MAGIC_SET(timer, ECORE_MAGIC_NONE); - free(timer); + ecore_timer_mp_free(timer); } timer_current = NULL; @@ -563,7 +595,7 @@ _ecore_timer_cleanup(void) } timers = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer)); ECORE_MAGIC_SET(timer, ECORE_MAGIC_NONE); - free(timer); + ecore_timer_mp_free(timer); timers_delete_me--; done++; if (timers_delete_me == 0) return; @@ -583,7 +615,7 @@ _ecore_timer_cleanup(void) } suspended = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer)); ECORE_MAGIC_SET(timer, ECORE_MAGIC_NONE); - free(timer); + ecore_timer_mp_free(timer); timers_delete_me--; done++; if (timers_delete_me == 0) return; diff --git a/libraries/ecore/src/lib/ecore_cocoa/Makefile.in b/libraries/ecore/src/lib/ecore_cocoa/Makefile.in index ede48a2..15ce879 100644 --- a/libraries/ecore/src/lib/ecore_cocoa/Makefile.in +++ b/libraries/ecore/src/lib/ecore_cocoa/Makefile.in @@ -247,10 +247,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -269,6 +269,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -382,6 +386,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -394,6 +400,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -438,12 +446,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_con/Ecore_Con.h b/libraries/ecore/src/lib/ecore_con/Ecore_Con.h index e3b68c4..c3af46a 100644 --- a/libraries/ecore/src/lib/ecore_con/Ecore_Con.h +++ b/libraries/ecore/src/lib/ecore_con/Ecore_Con.h @@ -234,6 +234,14 @@ typedef struct _Ecore_Con_Server Ecore_Con_Server; typedef struct _Ecore_Con_Client Ecore_Con_Client; /** + * @typedef Ecore_Con_Socks + * An object representing a SOCKS proxy + * @ingroup Ecore_Con_Socks_Group + * @since 1.2 + */ +typedef struct Ecore_Con_Socks Ecore_Con_Socks; + +/** * @typedef Ecore_Con_Url * A handle to an http upload/download object * @ingroup Ecore_Con_Url_Group @@ -325,6 +333,13 @@ typedef struct _Ecore_Con_Event_Client_Write Ecore_Con_Event_Client_Write; typedef struct _Ecore_Con_Event_Server_Write Ecore_Con_Event_Server_Write; /** + * @typedef Ecore_Con_Event_Proxy_Bind + * Used as the @p data param for the corresponding event + * @since 1.2 + */ +typedef struct _Ecore_Con_Event_Proxy_Bind Ecore_Con_Event_Proxy_Bind; + +/** * @typedef Ecore_Con_Event_Url_Data * Used as the @p data param for the corresponding event * @ingroup Ecore_Con_Url_Group @@ -464,6 +479,19 @@ struct _Ecore_Con_Event_Server_Write }; /** + * @struct _Ecore_Con_Event_Proxy_Bind + * Used as the @p data param for the @ref ECORE_CON_EVENT_PROXY_BIND event + * @ingroup Ecore_Con_Socks_Group + * @since 1.2 + */ +struct _Ecore_Con_Event_Proxy_Bind +{ + Ecore_Con_Server *server; /**< the server object connected to the proxy */ + const char *ip; /**< the proxy-bound ip address */ + int port; /**< the proxy-bound port */ +}; + +/** * @struct _Ecore_Con_Event_Url_Data * Used as the @p data param for the @ref ECORE_CON_EVENT_URL_DATA event * @ingroup Ecore_Con_Url_Group @@ -542,6 +570,10 @@ EAPI extern int ECORE_CON_EVENT_SERVER_WRITE; EAPI extern int ECORE_CON_EVENT_CLIENT_DATA; /** A server connection object has data */ EAPI extern int ECORE_CON_EVENT_SERVER_DATA; +/** A server connection has successfully negotiated an ip:port binding + * @since 1.2 + */ +EAPI extern int ECORE_CON_EVENT_PROXY_BIND; /** A URL object has data */ EAPI extern int ECORE_CON_EVENT_URL_DATA; /** A URL object has completed its transfer to and from the server and can be reused */ @@ -605,7 +637,13 @@ typedef enum _Ecore_Con_Type ECORE_CON_REMOTE_UDP = 5, /** Remote broadcast using UDP */ ECORE_CON_REMOTE_BROADCAST = 6, + /** Remote connection sending packets immediately */ ECORE_CON_REMOTE_NODELAY = 7, + /** Remote connection sending data in large chunks + * @note Only available on Linux + * @since 1.2 + */ + ECORE_CON_REMOTE_CORK = 8, /** Use SSL2: UNSUPPORTED. **/ ECORE_CON_USE_SSL2 = (1 << 4), /** Use SSL3 */ @@ -675,6 +713,8 @@ EAPI Eina_Bool ecore_con_ssl_server_crl_add(Ecore_Con_Server *svr, const EAPI Eina_Bool ecore_con_ssl_server_cafile_add(Ecore_Con_Server *svr, const char *ca_file); EAPI void ecore_con_ssl_server_verify(Ecore_Con_Server *svr); EAPI void ecore_con_ssl_server_verify_basic(Ecore_Con_Server *svr); +EAPI void ecore_con_ssl_server_verify_name_set(Ecore_Con_Server *svr, const char *name); +EAPI const char *ecore_con_ssl_server_verify_name_get(Ecore_Con_Server *svr); EAPI Eina_Bool ecore_con_ssl_server_upgrade(Ecore_Con_Server *svr, Ecore_Con_Type compl_type); EAPI Eina_Bool ecore_con_ssl_client_upgrade(Ecore_Con_Client *cl, Ecore_Con_Type compl_type); @@ -682,6 +722,18 @@ 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 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); +EAPI void ecore_con_socks_remote_del(Ecore_Con_Socks *ecs); +EAPI void ecore_con_socks_apply_once(Ecore_Con_Socks *ecs); +EAPI void ecore_con_socks_apply_always(Ecore_Con_Socks *ecs); + /** * @defgroup Ecore_Con_Server_Group Ecore Connection Server Functions * @@ -1185,6 +1237,8 @@ EAPI Eina_Bool ecore_con_client_connected_get(Ecore_Con_Client *cl); */ EAPI int ecore_con_client_port_get(Ecore_Con_Client *cl); + + /** * @} */ @@ -1583,7 +1637,7 @@ EAPI Eina_Bool ecore_con_url_post(Ecore_Con_Url *url_con, * modification time. * * @param url_con Ecore_Con_Url to act upon. - * @param condition Condition to use for HTTP requests. + * @param time_condition Condition to use for HTTP requests. * @param timestamp Time since 1 Jan 1970 to use in the condition. * * This function may set the header "If-Modified-Since" or @@ -1791,6 +1845,74 @@ EAPI int ecore_con_url_ssl_ca_set(Ecore_Con_Url *url_con, const char *ca_path); /** + * Set HTTP proxy to use. + * + * The parameter should be a char * to a zero terminated string holding + * the host name or dotted IP address. To specify port number in this string, + * append :[port] to the end of the host name. + * The proxy string may be prefixed with [protocol]:// since any such prefix + * will be ignored. + * The proxy's port number may optionally be specified with the separate option. + * If not specified, libcurl will default to using port 1080 for proxies. + * + * @param url_con Connection object that will use the proxy. + * @param proxy Porxy string or @c NULL to disable + * + * @return #EINA_TRUE on success, #EINA_FALSE on error. + * @since 1.2 + */ +EAPI Eina_Bool ecore_con_url_proxy_set(Ecore_Con_Url *url_con, const char *proxy); + +/** + * Set zero terminated username to use for proxy. + * + * if socks protocol is used for proxy, protocol should be socks5 and above. + * + * @param url_con Connection object that will use the proxy. + * @param username Username string. + * + * @return #EINA_TRUE on success, #EINA_FALSE on error. + * + * @see ecore_con_url_proxy_set() + * + * @since 1.2 + */ +EAPI Eina_Bool ecore_con_url_proxy_username_set(Ecore_Con_Url *url_con, const char *username); + +/** + * Set zero terminated password to use for proxy. + * + * if socks protocol is used for proxy, protocol should be socks5 and above. + * + * @param url_con Connection object that will use the proxy. + * @param password Password string. + * + * @return #EINA_TRUE on success, #EINA_FALSE on error. + * + * @see ecore_con_url_proxy_set() + * + * @since 1.2 + */ +EAPI Eina_Bool ecore_con_url_proxy_password_set(Ecore_Con_Url *url_con, const char *password); + +/** + * Set timeout in seconds. + * + * the maximum time in seconds that you allow the ecore con url transfer + * operation to take. Normally, name lookups can take a considerable time + * and limiting operations to less than a few minutes risk aborting perfectly + * normal operations. + * + * @param url_con Connection object that will use the timeout. + * @param timeout time in seconds. + * + * @see ecore_con_url_cookies_jar_file_set() + * + * @since 1.2 + */ +EAPI void ecore_con_url_timeout_set(Ecore_Con_Url *url_con, double timeout); + +/** * @} */ diff --git a/libraries/ecore/src/lib/ecore_con/Makefile.am b/libraries/ecore/src/lib/ecore_con/Makefile.am index 300586d..929b30e 100644 --- a/libraries/ecore/src/lib/ecore_con/Makefile.am +++ b/libraries/ecore/src/lib/ecore_con/Makefile.am @@ -19,6 +19,7 @@ includesdir = $(includedir)/ecore-@VMAJ@ libecore_con_la_SOURCES = \ ecore_con.c \ +ecore_con_socks.c \ ecore_con_ssl.c \ ecore_con_url.c \ ecore_con_alloc.c diff --git a/libraries/ecore/src/lib/ecore_con/Makefile.in b/libraries/ecore/src/lib/ecore_con/Makefile.in index 5940a83..58811da 100644 --- a/libraries/ecore/src/lib/ecore_con/Makefile.in +++ b/libraries/ecore/src/lib/ecore_con/Makefile.in @@ -92,15 +92,17 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libecore_con_la_DEPENDENCIES = \ $(top_builddir)/src/lib/ecore/libecore.la -am__libecore_con_la_SOURCES_DIST = ecore_con.c ecore_con_ssl.c \ - ecore_con_url.c ecore_con_alloc.c ecore_con_local_win32.c \ - ecore_con_local.c ecore_con_ares.c ecore_con_info.c +am__libecore_con_la_SOURCES_DIST = ecore_con.c ecore_con_socks.c \ + ecore_con_ssl.c ecore_con_url.c ecore_con_alloc.c \ + ecore_con_local_win32.c ecore_con_local.c ecore_con_ares.c \ + ecore_con_info.c @ECORE_HAVE_WIN32_TRUE@am__objects_1 = libecore_con_la-ecore_con_local_win32.lo @ECORE_HAVE_WIN32_FALSE@am__objects_2 = \ @ECORE_HAVE_WIN32_FALSE@ libecore_con_la-ecore_con_local.lo @HAVE_CARES_TRUE@am__objects_3 = libecore_con_la-ecore_con_ares.lo @HAVE_CARES_FALSE@am__objects_4 = libecore_con_la-ecore_con_info.lo am_libecore_con_la_OBJECTS = libecore_con_la-ecore_con.lo \ + libecore_con_la-ecore_con_socks.lo \ libecore_con_la-ecore_con_ssl.lo \ libecore_con_la-ecore_con_url.lo \ libecore_con_la-ecore_con_alloc.lo $(am__objects_1) \ @@ -263,10 +265,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -285,6 +287,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -398,6 +404,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -410,6 +418,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -454,12 +464,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ @@ -493,9 +505,10 @@ AM_CPPFLAGS = \ lib_LTLIBRARIES = libecore_con.la includes_HEADERS = Ecore_Con.h includesdir = $(includedir)/ecore-@VMAJ@ -libecore_con_la_SOURCES = ecore_con.c ecore_con_ssl.c ecore_con_url.c \ - ecore_con_alloc.c $(am__append_1) $(am__append_2) \ - $(am__append_3) $(am__append_4) +libecore_con_la_SOURCES = ecore_con.c ecore_con_socks.c \ + ecore_con_ssl.c ecore_con_url.c ecore_con_alloc.c \ + $(am__append_1) $(am__append_2) $(am__append_3) \ + $(am__append_4) libecore_con_la_CFLAGS = @WIN32_CFLAGS@ libecore_con_la_LIBADD = \ $(top_builddir)/src/lib/ecore/libecore.la \ @@ -583,6 +596,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libecore_con_la-ecore_con_info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libecore_con_la-ecore_con_local.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libecore_con_la-ecore_con_local_win32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libecore_con_la-ecore_con_socks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libecore_con_la-ecore_con_ssl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libecore_con_la-ecore_con_url.Plo@am__quote@ @@ -618,6 +632,14 @@ libecore_con_la-ecore_con.lo: ecore_con.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libecore_con_la_CFLAGS) $(CFLAGS) -c -o libecore_con_la-ecore_con.lo `test -f 'ecore_con.c' || echo '$(srcdir)/'`ecore_con.c +libecore_con_la-ecore_con_socks.lo: ecore_con_socks.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libecore_con_la_CFLAGS) $(CFLAGS) -MT libecore_con_la-ecore_con_socks.lo -MD -MP -MF $(DEPDIR)/libecore_con_la-ecore_con_socks.Tpo -c -o libecore_con_la-ecore_con_socks.lo `test -f 'ecore_con_socks.c' || echo '$(srcdir)/'`ecore_con_socks.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libecore_con_la-ecore_con_socks.Tpo $(DEPDIR)/libecore_con_la-ecore_con_socks.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ecore_con_socks.c' object='libecore_con_la-ecore_con_socks.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libecore_con_la_CFLAGS) $(CFLAGS) -c -o libecore_con_la-ecore_con_socks.lo `test -f 'ecore_con_socks.c' || echo '$(srcdir)/'`ecore_con_socks.c + libecore_con_la-ecore_con_ssl.lo: ecore_con_ssl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libecore_con_la_CFLAGS) $(CFLAGS) -MT libecore_con_la-ecore_con_ssl.lo -MD -MP -MF $(DEPDIR)/libecore_con_la-ecore_con_ssl.Tpo -c -o libecore_con_la-ecore_con_ssl.lo `test -f 'ecore_con_ssl.c' || echo '$(srcdir)/'`ecore_con_ssl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libecore_con_la-ecore_con_ssl.Tpo $(DEPDIR)/libecore_con_la-ecore_con_ssl.Plo diff --git a/libraries/ecore/src/lib/ecore_con/ecore_con.c b/libraries/ecore/src/lib/ecore_con/ecore_con.c index 7bd0358..de291b3 100644 --- a/libraries/ecore/src/lib/ecore_con/ecore_con.c +++ b/libraries/ecore/src/lib/ecore_con/ecore_con.c @@ -45,7 +45,6 @@ static Eina_Bool _ecore_con_client_timer(Ecore_Con_Client *cl); static void _ecore_con_cl_timer_update(Ecore_Con_Client *cl); - static Eina_Bool _ecore_con_server_timer(Ecore_Con_Server *svr); static void _ecore_con_server_timer_update(Ecore_Con_Server *svr); @@ -104,6 +103,45 @@ static void _ecore_con_lookup_done(void *data, static const char * _ecore_con_pretty_ip(struct sockaddr *client_addr); + +void +_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); + INF("Lost client %s", (cl->ip) ? cl->ip : ""); + if (cl->fd_handler) + ecore_main_fd_handler_del(cl->fd_handler); + + cl->fd_handler = NULL; +} + +void +_ecore_con_server_kill(Ecore_Con_Server *svr) +{ + if (svr->delete_me) + DBG("Multi kill request for svr %p", svr); + else + ecore_con_event_server_del(svr); + + if (svr->fd_handler) + ecore_main_fd_handler_del(svr->fd_handler); + + svr->fd_handler = NULL; +} + +#define _ecore_con_server_kill(svr) do { \ + DBG("KILL %p", (svr)); \ + _ecore_con_server_kill((svr)); \ +} while (0) + +#define _ecore_con_client_kill(cl) do { \ + DBG("KILL %p", (cl)); \ + _ecore_con_client_kill((cl)); \ +} while (0) + EAPI int ECORE_CON_EVENT_CLIENT_ADD = 0; EAPI int ECORE_CON_EVENT_CLIENT_DEL = 0; EAPI int ECORE_CON_EVENT_SERVER_ADD = 0; @@ -114,11 +152,14 @@ EAPI int ECORE_CON_EVENT_CLIENT_WRITE = 0; EAPI int ECORE_CON_EVENT_SERVER_WRITE = 0; EAPI int ECORE_CON_EVENT_CLIENT_ERROR = 0; EAPI int ECORE_CON_EVENT_SERVER_ERROR = 0; +EAPI int ECORE_CON_EVENT_PROXY_BIND = 0; static Eina_List *servers = NULL; static int _ecore_con_init_count = 0; static int _ecore_con_event_count = 0; int _ecore_con_log_dom = -1; +Ecore_Con_Socks *_ecore_con_proxy_once = NULL; +Ecore_Con_Socks *_ecore_con_proxy_global = NULL; EAPI int ecore_con_init(void) @@ -156,6 +197,7 @@ ecore_con_init(void) ECORE_CON_EVENT_SERVER_WRITE = ecore_event_type_new(); ECORE_CON_EVENT_CLIENT_ERROR = ecore_event_type_new(); ECORE_CON_EVENT_SERVER_ERROR = ecore_event_type_new(); + ECORE_CON_EVENT_PROXY_BIND = ecore_event_type_new(); eina_magic_string_set(ECORE_MAGIC_CON_SERVER, "Ecore_Con_Server"); @@ -163,6 +205,7 @@ ecore_con_init(void) eina_magic_string_set(ECORE_MAGIC_CON_URL, "Ecore_Con_Url"); /* TODO Remember return value, if it fails, use gethostbyname() */ + ecore_con_socks_init(); ecore_con_ssl_init(); ecore_con_info_init(); @@ -182,13 +225,15 @@ ecore_con_shutdown(void) { Ecore_Con_Event_Server_Add *ev; - svr->delete_me = svr->dead = EINA_TRUE; + svr->delete_me = EINA_TRUE; + INF("svr %p is dead", svr); /* some pointer hacks here to prevent double frees if people are being stupid */ EINA_LIST_FREE(svr->event_count, ev) ev->server = NULL; _ecore_con_server_free(svr); } + ecore_con_socks_shutdown(); if (!_ecore_con_event_count) ecore_con_mempool_shutdown(); ecore_con_info_shutdown(); @@ -301,8 +346,7 @@ ecore_con_server_add(Ecore_Con_Type compl_type, svr->port = port; svr->data = (void *)data; svr->created = EINA_TRUE; - if (compl_type & ECORE_CON_LOAD_CERT) - svr->use_cert = EINA_TRUE; + svr->use_cert = (compl_type & ECORE_CON_SSL & ECORE_CON_LOAD_CERT) == ECORE_CON_LOAD_CERT; svr->reject_excess_clients = EINA_FALSE; svr->client_limit = -1; svr->clients = NULL; @@ -325,7 +369,8 @@ ecore_con_server_add(Ecore_Con_Type compl_type, #endif if ((type == ECORE_CON_REMOTE_TCP) || - (type == ECORE_CON_REMOTE_NODELAY)) + (type == ECORE_CON_REMOTE_NODELAY) || + (type == ECORE_CON_REMOTE_CORK)) { /* TCP */ if (!ecore_con_info_tcp_listen(svr, _ecore_con_cb_tcp_listen, @@ -395,17 +440,36 @@ ecore_con_server_connect(Ecore_Con_Type compl_type, svr->port = port; svr->data = (void *)data; svr->created = EINA_FALSE; - svr->use_cert = (compl_type & ECORE_CON_LOAD_CERT); + svr->use_cert = (compl_type & ECORE_CON_SSL & ECORE_CON_LOAD_CERT) == ECORE_CON_LOAD_CERT; svr->reject_excess_clients = EINA_FALSE; svr->clients = NULL; svr->client_limit = -1; - if (ecore_con_ssl_server_prepare(svr, compl_type & ECORE_CON_SSL)) - goto error; type = compl_type & ECORE_CON_TYPE; + if (type > ECORE_CON_LOCAL_ABSTRACT) + { + /* never use proxies on local connections */ + if (_ecore_con_proxy_once) + svr->ecs = _ecore_con_proxy_once; + else if (_ecore_con_proxy_global) + svr->ecs = _ecore_con_proxy_global; + _ecore_con_proxy_once = NULL; + if (svr->ecs) + { + if ((!svr->ecs->lookup) && + (!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; + } + } + if (ecore_con_ssl_server_prepare(svr, compl_type & ECORE_CON_SSL)) + goto error; + if (((type == ECORE_CON_REMOTE_TCP) || (type == ECORE_CON_REMOTE_NODELAY) || + (type == ECORE_CON_REMOTE_CORK) || (type == ECORE_CON_REMOTE_UDP) || (type == ECORE_CON_REMOTE_BROADCAST)) && (port < 0)) @@ -424,7 +488,8 @@ ecore_con_server_connect(Ecore_Con_Type compl_type, #endif if ((type == ECORE_CON_REMOTE_TCP) || - (type == ECORE_CON_REMOTE_NODELAY)) + (type == ECORE_CON_REMOTE_NODELAY) || + (type == ECORE_CON_REMOTE_CORK)) { /* TCP */ if (!ecore_con_info_tcp_connect(svr, _ecore_con_cb_tcp_connect, @@ -492,8 +557,6 @@ ecore_con_server_timeout_get(Ecore_Con_Server *svr) EAPI void * ecore_con_server_del(Ecore_Con_Server *svr) { - void *data; - if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_CON_SERVER)) { ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER, "ecore_con_server_del"); @@ -503,20 +566,8 @@ ecore_con_server_del(Ecore_Con_Server *svr) if (svr->delete_me) return NULL; - data = svr->data; - svr->delete_me = EINA_TRUE; - if (svr->event_count) - { - if (svr->fd_handler) - { - ecore_main_fd_handler_del(svr->fd_handler); - svr->fd_handler = NULL; - } - } - else - _ecore_con_server_free(svr); - - return data; + _ecore_con_server_kill(svr); + return svr->data; } EAPI void * @@ -524,9 +575,7 @@ ecore_con_server_data_get(Ecore_Con_Server *svr) { if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_CON_SERVER)) { - ECORE_MAGIC_FAIL(svr, - ECORE_MAGIC_CON_SERVER, - "ecore_con_server_data_get"); + ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER, "ecore_con_server_data_get"); return NULL; } @@ -541,9 +590,7 @@ ecore_con_server_data_set(Ecore_Con_Server *svr, if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_CON_SERVER)) { - ECORE_MAGIC_FAIL(svr, - ECORE_MAGIC_CON_SERVER, - "ecore_con_server_data_get"); + ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER, "ecore_con_server_data_get"); return NULL; } @@ -557,8 +604,7 @@ ecore_con_server_connected_get(Ecore_Con_Server *svr) { if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_CON_SERVER)) { - ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER, - "ecore_con_server_connected_get"); + ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER, "ecore_con_server_connected_get"); return EINA_FALSE; } @@ -617,7 +663,7 @@ ecore_con_server_send(Ecore_Con_Server *svr, return 0; } - EINA_SAFETY_ON_TRUE_RETURN_VAL(svr->dead, 0); + EINA_SAFETY_ON_TRUE_RETURN_VAL(svr->delete_me, 0); EINA_SAFETY_ON_NULL_RETURN_VAL(data, 0); @@ -630,6 +676,15 @@ ecore_con_server_send(Ecore_Con_Server *svr, { svr->buf = eina_binbuf_new(); EINA_SAFETY_ON_NULL_RETURN_VAL(svr->buf, 0); +#ifdef TCP_CORK + if ((svr->fd >= 0) && ((svr->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_CORK)) + { + int state = 1; + if (setsockopt(svr->fd, IPPROTO_TCP, TCP_CORK, (char *)&state, sizeof(int)) < 0) + /* realistically this isn't anything serious so we can just log and continue */ + ERR("corking failed! %s", strerror(errno)); + } +#endif } eina_binbuf_append_length(svr->buf, data, size); @@ -716,7 +771,7 @@ ecore_con_client_send(Ecore_Con_Client *cl, return 0; } - EINA_SAFETY_ON_TRUE_RETURN_VAL(cl->dead, 0); + EINA_SAFETY_ON_TRUE_RETURN_VAL(cl->delete_me, 0); EINA_SAFETY_ON_NULL_RETURN_VAL(data, 0); @@ -732,6 +787,15 @@ ecore_con_client_send(Ecore_Con_Client *cl, { cl->buf = eina_binbuf_new(); EINA_SAFETY_ON_NULL_RETURN_VAL(cl->buf, 0); +#ifdef TCP_CORK + if ((cl->fd >= 0) && ((cl->host_server->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_CORK)) + { + int state = 1; + if (setsockopt(cl->fd, IPPROTO_TCP, TCP_CORK, (char *)&state, sizeof(int)) < 0) + /* realistically this isn't anything serious so we can just log and continue */ + ERR("corking failed! %s", strerror(errno)); + } +#endif } eina_binbuf_append_length(cl->buf, data, size); @@ -761,7 +825,7 @@ ecore_con_client_connected_get(Ecore_Con_Client *cl) return EINA_FALSE; } - return !cl->dead; + return !cl->delete_me; } EAPI void @@ -795,36 +859,14 @@ ecore_con_client_timeout_get(Ecore_Con_Client *cl) EAPI void * ecore_con_client_del(Ecore_Con_Client *cl) { - void *data = NULL; - if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_CON_CLIENT)) { ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_CON_CLIENT, "ecore_con_client_del"); return NULL; } - data = cl->data; - cl->delete_me = EINA_TRUE; - if (cl->event_count) - { - if (cl->fd_handler) - { - ecore_main_fd_handler_del(cl->fd_handler); - cl->fd_handler = NULL; - } - } - else - { - if (cl->host_server) - { - cl->host_server->clients = eina_list_remove(cl->host_server->clients, cl); - --cl->host_server->client_count; - } - - _ecore_con_client_free(cl); - } - - return data; + _ecore_con_client_kill(cl); + return cl->data; } EAPI void @@ -833,9 +875,7 @@ ecore_con_client_data_set(Ecore_Con_Client *cl, { if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_CON_CLIENT)) { - ECORE_MAGIC_FAIL(cl, - ECORE_MAGIC_CON_CLIENT, - "ecore_con_client_data_set"); + ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_CON_CLIENT, "ecore_con_client_data_set"); return; } @@ -847,9 +887,7 @@ ecore_con_client_data_get(Ecore_Con_Client *cl) { if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_CON_CLIENT)) { - ECORE_MAGIC_FAIL(cl, - ECORE_MAGIC_CON_CLIENT, - "ecore_con_client_data_get"); + ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_CON_CLIENT, "ecore_con_client_data_get"); return NULL; } @@ -939,6 +977,25 @@ ecore_con_client_fd_get(Ecore_Con_Client *cl) */ void +ecore_con_event_proxy_bind(Ecore_Con_Server *svr) +{ + Ecore_Con_Event_Proxy_Bind *e; + int ev = ECORE_CON_EVENT_PROXY_BIND; + + e = ecore_con_event_proxy_bind_alloc(); + EINA_SAFETY_ON_NULL_RETURN(e); + + svr->event_count = eina_list_append(svr->event_count, e); + _ecore_con_server_timer_update(svr); + e->server = svr; + e->ip = svr->proxyip; + e->port = svr->proxyport; + ecore_event_add(ev, e, + _ecore_con_event_server_add_free, NULL); + _ecore_con_event_count++; +} + +void ecore_con_event_server_add(Ecore_Con_Server *svr) { /* we got our server! */ @@ -948,6 +1005,8 @@ ecore_con_event_server_add(Ecore_Con_Server *svr) e = ecore_con_event_server_add_alloc(); EINA_SAFETY_ON_NULL_RETURN(e); + svr->connecting = EINA_FALSE; + svr->start_time = ecore_time_get(); svr->event_count = eina_list_append(svr->event_count, e); _ecore_con_server_timer_update(svr); e->server = svr; @@ -962,12 +1021,20 @@ ecore_con_event_server_del(Ecore_Con_Server *svr) { Ecore_Con_Event_Server_Del *e; + svr->delete_me = EINA_TRUE; + INF("svr %p is dead", svr); e = ecore_con_event_server_del_alloc(); EINA_SAFETY_ON_NULL_RETURN(e); svr->event_count = eina_list_append(svr->event_count, e); _ecore_con_server_timer_update(svr); e->server = svr; + if (svr->ecs) + { + svr->ecs_state = svr->ecs->lookup ? ECORE_CON_SOCKS_STATE_RESOLVED : ECORE_CON_SOCKS_STATE_DONE; + eina_stringshare_replace(&svr->proxyip, NULL); + svr->proxyport = 0; + } ecore_event_add(ECORE_CON_EVENT_SERVER_DEL, e, _ecore_con_event_server_del_free, NULL); _ecore_con_event_count++; @@ -981,6 +1048,7 @@ ecore_con_event_server_write(Ecore_Con_Server *svr, int num) e = ecore_con_event_server_write_alloc(); EINA_SAFETY_ON_NULL_RETURN(e); + INF("Wrote %d bytes", num); svr->event_count = eina_list_append(svr->event_count, e); e->server = svr; e->size = num; @@ -1044,6 +1112,8 @@ ecore_con_event_client_del(Ecore_Con_Client *cl) Ecore_Con_Event_Client_Del *e; if (!cl) return; + cl->delete_me = EINA_TRUE; + INF("cl %p is dead", cl); e = ecore_con_event_client_del_alloc(); EINA_SAFETY_ON_NULL_RETURN(e); cl->event_count = eina_list_append(cl->event_count, e); @@ -1112,7 +1182,7 @@ ecore_con_server_infos_del(Ecore_Con_Server *svr, void *info) } void -ecore_con_event_server_error(Ecore_Con_Server *svr, const char *error) +_ecore_con_event_server_error(Ecore_Con_Server *svr, char *error, Eina_Bool duplicate) { Ecore_Con_Event_Server_Error *e; @@ -1120,7 +1190,7 @@ ecore_con_event_server_error(Ecore_Con_Server *svr, const char *error) EINA_SAFETY_ON_NULL_RETURN(e); e->server = svr; - e->error = strdup(error); + e->error = duplicate ? strdup(error) : error; ERR("%s", error); svr->event_count = eina_list_append(svr->event_count, e); ecore_event_add(ECORE_CON_EVENT_SERVER_ERROR, e, (Ecore_End_Cb)_ecore_con_event_server_error_free, NULL); @@ -1157,16 +1227,9 @@ _ecore_con_server_free(Ecore_Con_Server *svr) ecore_con_info_data_clear(svr->infos->data); svr->infos = eina_list_remove_list(svr->infos, svr->infos); } - if ((!svr->buf) && svr->delete_me && (!svr->dead) && (!svr->event_count)) - { - /* this is a catch-all for cases when a server is not properly killed. */ - svr->dead = EINA_TRUE; - ecore_con_event_server_del(svr); - return; - } t_start = ecore_time_get(); - while (svr->buf && (!svr->dead)) + while (svr->buf && (!svr->delete_me)) { _ecore_con_server_flush(svr); t = ecore_time_get(); @@ -1196,7 +1259,8 @@ _ecore_con_server_free(Ecore_Con_Server *svr) /* some pointer hacks here to prevent double frees if people are being stupid */ EINA_LIST_FREE(cl->event_count, ev) ev->server = NULL; - cl->delete_me = cl->dead = EINA_TRUE; + cl->delete_me = EINA_TRUE; + INF("cl %p is dead", cl); _ecore_con_client_free(cl); } if ((svr->created) && (svr->path) && (svr->ppid == getpid())) @@ -1208,6 +1272,10 @@ _ecore_con_server_free(Ecore_Con_Server *svr) free(svr->path); eina_stringshare_del(svr->ip); + eina_stringshare_del(svr->verify_name); + + if (svr->ecs_buf) eina_binbuf_free(svr->ecs_buf); + if (svr->ecs_recvbuf) eina_binbuf_free(svr->ecs_recvbuf); if (svr->fd_handler) ecore_main_fd_handler_del(svr->fd_handler); @@ -1230,17 +1298,8 @@ _ecore_con_client_free(Ecore_Con_Client *cl) if (cl->event_count) return; - if (cl->delete_me && (!cl->dead) && (!cl->event_count)) - { - /* this is a catch-all for cases when a client is not properly killed. */ - cl->dead = EINA_TRUE; - ecore_con_event_client_del(cl); - return; - } - - t_start = ecore_time_get(); - while ((cl->buf) && (!cl->dead)) + while ((cl->buf) && (!cl->delete_me)) { _ecore_con_client_flush(cl); t = ecore_time_get(); @@ -1284,19 +1343,6 @@ _ecore_con_client_free(Ecore_Con_Client *cl) return; } -static void -_ecore_con_server_kill(Ecore_Con_Server *svr) -{ - if (!svr->delete_me) - ecore_con_event_server_del(svr); - - svr->dead = EINA_TRUE; - if (svr->fd_handler) - ecore_main_fd_handler_del(svr->fd_handler); - - svr->fd_handler = NULL; -} - static Eina_Bool _ecore_con_server_timer(Ecore_Con_Server *svr) { @@ -1384,40 +1430,25 @@ _ecore_con_cb_tcp_listen(void *data, { Ecore_Con_Server *svr; struct linger lin; + const char *memerr = NULL; svr = data; + errno = 0; if (!net_info) /* error message has already been handled */ goto error; svr->fd = socket(net_info->info.ai_family, net_info->info.ai_socktype, net_info->info.ai_protocol); - if (svr->fd < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } - - if (fcntl(svr->fd, F_SETFL, O_NONBLOCK) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } - - if (fcntl(svr->fd, F_SETFD, FD_CLOEXEC) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + if (svr->fd < 0) goto error; + if (fcntl(svr->fd, F_SETFL, O_NONBLOCK) < 0) goto error; + if (fcntl(svr->fd, F_SETFD, FD_CLOEXEC) < 0) goto error; lin.l_onoff = 1; lin.l_linger = 0; if (setsockopt(svr->fd, SOL_SOCKET, SO_LINGER, (const void *)&lin, sizeof(struct linger)) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + goto error; if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_NODELAY) { @@ -1428,34 +1459,27 @@ _ecore_con_cb_tcp_listen(void *data, sizeof(int)) < 0) #endif { - ecore_con_event_server_error(svr, strerror(errno)); goto error; } } - if (bind(svr->fd, net_info->info.ai_addr, - net_info->info.ai_addrlen) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } - if (listen(svr->fd, 4096) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + if (bind(svr->fd, net_info->info.ai_addr, net_info->info.ai_addrlen) < 0) + goto error; + + if (listen(svr->fd, 4096) < 0) goto error; svr->fd_handler = ecore_main_fd_handler_add(svr->fd, ECORE_FD_READ, _ecore_con_svr_tcp_handler, svr, NULL, NULL); if (!svr->fd_handler) { - ecore_con_event_server_error(svr, "Memory allocation failure"); + memerr = "Memory allocation failure"; goto error; } return; error: + if (errno || memerr) ecore_con_event_server_error(svr, memerr ?: strerror(errno)); ecore_con_ssl_server_shutdown(svr); _ecore_con_server_kill(svr); } @@ -1471,21 +1495,19 @@ _ecore_con_cb_udp_listen(void *data, struct ipv6_mreq mreq6; #endif const int on = 1; + const char *memerr = NULL; svr = data; type = svr->type; type &= ECORE_CON_TYPE; + errno = 0; if (!net_info) /* error message has already been handled */ goto error; svr->fd = socket(net_info->info.ai_family, net_info->info.ai_socktype, net_info->info.ai_protocol); - if (svr->fd < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + if (svr->fd < 0) goto error; if (type == ECORE_CON_REMOTE_MCAST) { @@ -1493,69 +1515,41 @@ _ecore_con_cb_udp_listen(void *data, { if (!inet_pton(net_info->info.ai_family, net_info->ip, &mreq.imr_multiaddr)) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + goto error; mreq.imr_interface.s_addr = htonl(INADDR_ANY); if (setsockopt(svr->fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, (const void *)&mreq, sizeof(mreq)) != 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + goto error; } #ifdef HAVE_IPV6 else if (net_info->info.ai_family == AF_INET6) { if (!inet_pton(net_info->info.ai_family, net_info->ip, &mreq6.ipv6mr_multiaddr)) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + goto error; mreq6.ipv6mr_interface = htonl(INADDR_ANY); if (setsockopt(svr->fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, (const void *)&mreq6, sizeof(mreq6)) != 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + goto error; } #endif } if (setsockopt(svr->fd, SOL_SOCKET, SO_REUSEADDR, (const void *)&on, sizeof(on)) != 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } - - if (fcntl(svr->fd, F_SETFL, O_NONBLOCK) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } - - if (fcntl(svr->fd, F_SETFD, FD_CLOEXEC) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + goto error; + if (fcntl(svr->fd, F_SETFL, O_NONBLOCK) < 0) goto error; + if (fcntl(svr->fd, F_SETFD, FD_CLOEXEC) < 0) goto error; if (bind(svr->fd, net_info->info.ai_addr, net_info->info.ai_addrlen) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + goto error; svr->fd_handler = ecore_main_fd_handler_add(svr->fd, ECORE_FD_READ, _ecore_con_svr_udp_handler, svr, NULL, NULL); if (!svr->fd_handler) { - ecore_con_event_server_error(svr, "Memory allocation failure"); + memerr = "Memory allocation failure"; goto error; } @@ -1564,6 +1558,7 @@ _ecore_con_cb_udp_listen(void *data, return; error: + if (errno || memerr) ecore_con_event_server_error(svr, memerr ?: strerror(errno)); ecore_con_ssl_server_shutdown(svr); _ecore_con_server_kill(svr); } @@ -1575,37 +1570,23 @@ _ecore_con_cb_tcp_connect(void *data, Ecore_Con_Server *svr; int res; int curstate = 0; + const char *memerr = NULL; svr = data; + errno = 0; if (!net_info) /* error message has already been handled */ goto error; svr->fd = socket(net_info->info.ai_family, net_info->info.ai_socktype, net_info->info.ai_protocol); - if (svr->fd < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + if (svr->fd < 0) goto error; - if (fcntl(svr->fd, F_SETFL, O_NONBLOCK) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } - - if (fcntl(svr->fd, F_SETFD, FD_CLOEXEC) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + if (fcntl(svr->fd, F_SETFL, O_NONBLOCK) < 0) goto error; + if (fcntl(svr->fd, F_SETFD, FD_CLOEXEC) < 0) goto error; if (setsockopt(svr->fd, SOL_SOCKET, SO_REUSEADDR, (const void *)&curstate, sizeof(curstate)) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + goto error; if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_NODELAY) { @@ -1615,7 +1596,6 @@ _ecore_con_cb_tcp_connect(void *data, if (setsockopt(svr->fd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int)) < 0) #endif { - ecore_con_event_server_error(svr, strerror(errno)); goto error; } } @@ -1625,17 +1605,19 @@ _ecore_con_cb_tcp_connect(void *data, if (res == SOCKET_ERROR) { if (WSAGetLastError() != WSAEINPROGRESS) - goto error; /* FIXME: strerror on windows? */ + { + char *err; + err = evil_format_message(WSAGetLastError()); + _ecore_con_event_server_error(svr, err, EINA_FALSE); + ecore_con_ssl_server_shutdown(svr); + _ecore_con_server_kill(svr); + return; + } #else if (res < 0) { - if (errno != EINPROGRESS) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } - + if (errno != EINPROGRESS) goto error; #endif svr->connecting = EINA_TRUE; svr->fd_handler = @@ -1650,22 +1632,24 @@ _ecore_con_cb_tcp_connect(void *data, { svr->handshaking = EINA_TRUE; svr->ssl_state = ECORE_CON_SSL_STATE_INIT; - DBG("beginning ssl handshake"); - if (ecore_con_ssl_server_init(svr)) + DBG("%s ssl handshake", svr->ecs_state ? "Queuing" : "Beginning"); + if ((!svr->ecs_state) && ecore_con_ssl_server_init(svr)) goto error; } if (!svr->fd_handler) { - ecore_con_event_server_error(svr, "Memory allocation failure"); + memerr = "Memory allocation failure"; goto error; } - svr->ip = eina_stringshare_add(net_info->ip); + if ((!svr->ecs) || (svr->ecs->lookup)) + svr->ip = eina_stringshare_add(net_info->ip); return; error: + if (errno || memerr) ecore_con_event_server_error(svr, memerr ?: strerror(errno)); ecore_con_ssl_server_shutdown(svr); _ecore_con_server_kill(svr); } @@ -1677,68 +1661,50 @@ _ecore_con_cb_udp_connect(void *data, Ecore_Con_Server *svr; int curstate = 0; int broadcast = 1; + const char *memerr = NULL; svr = data; + errno = 0; if (!net_info) /* error message has already been handled */ goto error; svr->fd = socket(net_info->info.ai_family, net_info->info.ai_socktype, net_info->info.ai_protocol); - if (svr->fd < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } - - if (fcntl(svr->fd, F_SETFL, O_NONBLOCK) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } - - if (fcntl(svr->fd, F_SETFD, FD_CLOEXEC) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } - + if (svr->fd < 0) goto error; + if (fcntl(svr->fd, F_SETFL, O_NONBLOCK) < 0) goto error; + if (fcntl(svr->fd, F_SETFD, FD_CLOEXEC) < 0) goto error; if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_BROADCAST) { if (setsockopt(svr->fd, SOL_SOCKET, SO_BROADCAST, (const void *)&broadcast, sizeof(broadcast)) < 0) { - ecore_con_event_server_error(svr, strerror(errno)); goto error; } } - else if (setsockopt(svr->fd, SOL_SOCKET, SO_REUSEADDR, - (const void *)&curstate, sizeof(curstate)) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + if (setsockopt(svr->fd, SOL_SOCKET, SO_REUSEADDR, + (const void *)&curstate, sizeof(curstate)) < 0) + goto error; if (connect(svr->fd, net_info->info.ai_addr, net_info->info.ai_addrlen) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto error; - } + goto error; svr->fd_handler = ecore_main_fd_handler_add(svr->fd, ECORE_FD_READ | ECORE_FD_WRITE, _ecore_con_cl_udp_handler, svr, NULL, NULL); if (!svr->fd_handler) { - ecore_con_event_server_error(svr, "Memory allocation failure"); + memerr = "Memory allocation failure"; goto error; } - svr->ip = eina_stringshare_add(net_info->ip); + if ((!svr->ecs) || (svr->ecs->lookup)) + svr->ip = eina_stringshare_add(net_info->ip); return; error: + if (errno || memerr) ecore_con_event_server_error(svr, memerr ?: strerror(errno)); ecore_con_ssl_server_shutdown(svr); _ecore_con_server_kill(svr); } @@ -1755,14 +1721,14 @@ svr_try_connect_plain(Ecore_Con_Server *svr) if (res == SOCKET_ERROR) so_err = WSAGetLastError(); - if ((so_err == WSAEINPROGRESS) && !svr->dead) + if ((so_err == WSAEINPROGRESS) && !svr->delete_me) return ECORE_CON_INPROGRESS; #else if (res < 0) so_err = errno; - if ((so_err == EINPROGRESS) && !svr->dead) + if ((so_err == EINPROGRESS) && !svr->delete_me) return ECORE_CON_INPROGRESS; #endif @@ -1778,15 +1744,19 @@ svr_try_connect_plain(Ecore_Con_Server *svr) if ((!svr->delete_me) && (!svr->handshaking) && svr->connecting) { - svr->connecting = EINA_FALSE; - svr->start_time = ecore_time_get(); - ecore_con_event_server_add(svr); + if (svr->ecs) + { + if (ecore_con_socks_svr_init(svr)) + return ECORE_CON_INPROGRESS; + } + else + ecore_con_event_server_add(svr); } if (svr->fd_handler && (!svr->buf)) ecore_main_fd_handler_active_set(svr->fd_handler, ECORE_FD_READ); - if (!svr->dead) + if (!svr->delete_me) return ECORE_CON_CONNECTED; else return ECORE_CON_DISCONNECTED; @@ -1838,9 +1808,10 @@ _ecore_con_svr_tcp_handler(void *data, Ecore_Con_Client *cl = NULL; unsigned char client_addr[256]; unsigned int client_addr_len; + const char *clerr = NULL; svr = data; - if (svr->dead) + if (svr->delete_me) return ECORE_CALLBACK_RENEW; if (svr->delete_me) @@ -1863,34 +1834,19 @@ _ecore_con_svr_tcp_handler(void *data, client_addr_len = sizeof(client_addr); memset(&client_addr, 0, client_addr_len); cl->fd = accept(svr->fd, (struct sockaddr *)&client_addr, (socklen_t *)&client_addr_len); - if (cl->fd < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto free_cl; - } - + if (cl->fd < 0) goto error; if ((svr->client_limit >= 0) && (svr->reject_excess_clients) && (svr->client_count >= (unsigned int)svr->client_limit)) { - ecore_con_event_server_error(svr, "Maximum client limit reached"); - goto close_fd; + clerr = "Maximum client limit reached"; + goto error; } - if (fcntl(cl->fd, F_SETFL, O_NONBLOCK) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto close_fd; - } - if (fcntl(cl->fd, F_SETFD, FD_CLOEXEC) < 0) - { - ecore_con_event_server_error(svr, strerror(errno)); - goto close_fd; - } + if (fcntl(cl->fd, F_SETFL, O_NONBLOCK) < 0) goto error; + if (fcntl(cl->fd, F_SETFD, FD_CLOEXEC) < 0) goto error; cl->fd_handler = ecore_main_fd_handler_add(cl->fd, ECORE_FD_READ, _ecore_con_svr_cl_handler, cl, NULL, NULL); - if (!cl->fd_handler) - goto close_fd; - + if (!cl->fd_handler) goto error; ECORE_MAGIC_SET(cl, ECORE_MAGIC_CON_CLIENT); if ((!svr->upgrade) && (svr->type & ECORE_CON_SSL)) @@ -1898,14 +1854,14 @@ _ecore_con_svr_tcp_handler(void *data, cl->handshaking = EINA_TRUE; cl->ssl_state = ECORE_CON_SSL_STATE_INIT; if (ecore_con_ssl_client_init(cl)) - goto del_handler; + goto error; } cl->client_addr = malloc(client_addr_len); if (!cl->client_addr) { - ecore_con_event_server_error(svr, "Memory allocation failure when attempting to add a new client"); - goto del_handler; + clerr = "Memory allocation failure when attempting to add a new client"; + goto error; } cl->client_addr_len = client_addr_len; memcpy(cl->client_addr, &client_addr, client_addr_len); @@ -1918,29 +1874,28 @@ _ecore_con_svr_tcp_handler(void *data, return ECORE_CALLBACK_RENEW; - del_handler: - ecore_main_fd_handler_del(cl->fd_handler); - close_fd: - close(cl->fd); - free_cl: +error: + if (cl->fd_handler) ecore_main_fd_handler_del(cl->fd_handler); + if (cl->fd >= 0) close(cl->fd); free(cl); - + if (clerr || errno) ecore_con_event_server_error(svr, clerr ?: strerror(errno)); return ECORE_CALLBACK_RENEW; } static void _ecore_con_cl_read(Ecore_Con_Server *svr) { - DBG("svr=%p", svr); int num = 0; Eina_Bool lost_server = EINA_TRUE; unsigned char buf[READBUFSIZ]; + DBG("svr=%p", svr); + /* only possible with non-ssl connections */ if (svr->connecting && (svr_try_connect_plain(svr) != ECORE_CON_CONNECTED)) return; - if (svr->handshaking) + if (svr->handshaking && (!svr->ecs_state)) { DBG("Continuing ssl handshake"); if (!ecore_con_ssl_server_init(svr)) @@ -1948,8 +1903,9 @@ _ecore_con_cl_read(Ecore_Con_Server *svr) _ecore_con_server_timer_update(svr); } - if (!(svr->type & ECORE_CON_SSL)) + if (svr->ecs_state || !(svr->type & ECORE_CON_SSL)) { + errno = 0; num = read(svr->fd, buf, sizeof(buf)); /* 0 is not a valid return value for a tcp socket */ if ((num > 0) || ((num < 0) && (errno == EAGAIN))) @@ -1966,7 +1922,12 @@ _ecore_con_cl_read(Ecore_Con_Server *svr) } if ((!svr->delete_me) && (num > 0)) - ecore_con_event_server_data(svr, buf, num, EINA_TRUE); + { + if (svr->ecs_state) + ecore_con_socks_read(svr, buf, num); + else + ecore_con_event_server_data(svr, buf, num, EINA_TRUE); + } if (lost_server) _ecore_con_server_kill(svr); @@ -1980,7 +1941,7 @@ _ecore_con_cl_handler(void *data, Eina_Bool want_read, want_write; svr = data; - if (svr->dead) + if (svr->delete_me) return ECORE_CALLBACK_RENEW; if (svr->delete_me) @@ -1989,7 +1950,7 @@ _ecore_con_cl_handler(void *data, want_read = ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_READ); want_write = ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_WRITE); - if (svr->handshaking && (want_read || want_write)) + if ((!svr->ecs_state) && svr->handshaking && (want_read || want_write)) { DBG("Continuing ssl handshake: preparing to %s...", want_read ? "read" : "write"); #ifdef ISCOMFITOR @@ -2005,20 +1966,25 @@ _ecore_con_cl_handler(void *data, { ERR("ssl handshaking failed!"); svr->handshaking = EINA_FALSE; - } else if (!svr->ssl_state) + 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_state < ECORE_CON_SOCKS_STATE_INIT) { - svr->connecting = EINA_FALSE; - svr->start_time = ecore_time_get(); - ecore_con_event_server_add(svr); + INF("PROXY STATE++"); + svr->ecs_state++; } + if (ecore_con_socks_svr_init(svr)) return ECORE_CALLBACK_RENEW; } - else if (want_read) + if (want_read) _ecore_con_cl_read(svr); else if (want_write) /* only possible with non-ssl connections */ { - if (svr->connecting && (!svr_try_connect_plain(svr))) + if (svr->connecting && (!svr_try_connect_plain(svr)) && (!svr->ecs_state)) return ECORE_CALLBACK_RENEW; _ecore_con_server_flush(svr); @@ -2040,7 +2006,7 @@ _ecore_con_cl_udp_handler(void *data, want_write = ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_WRITE); svr = data; - if (svr->dead || svr->delete_me || ((!want_read) && (!want_write))) + if (svr->delete_me || svr->delete_me || ((!want_read) && (!want_write))) return ECORE_CALLBACK_RENEW; if (want_write) @@ -2076,7 +2042,7 @@ _ecore_con_svr_udp_handler(void *data, svr = data; - if (svr->delete_me || svr->dead) + if (svr->delete_me) return ECORE_CALLBACK_RENEW; if (ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_WRITE)) @@ -2106,9 +2072,7 @@ _ecore_con_svr_udp_handler(void *data, ecore_con_event_server_error(svr, strerror(errno)); if (!svr->delete_me) ecore_con_event_client_del(NULL); - - svr->dead = EINA_TRUE; - svr->fd_handler = NULL; + _ecore_con_server_kill(svr); return ECORE_CALLBACK_CANCEL; } @@ -2177,18 +2141,7 @@ _ecore_con_svr_cl_read(Ecore_Con_Client *cl) if ((!cl->delete_me) && (num > 0)) ecore_con_event_client_data(cl, buf, num, EINA_TRUE); - if (lost_client) - { - if (!cl->delete_me) - ecore_con_event_client_del(cl); - INF("Lost client %s", (cl->ip) ? cl->ip : ""); - cl->dead = EINA_TRUE; - if (cl->fd_handler) - ecore_main_fd_handler_del(cl->fd_handler); - - cl->fd_handler = NULL; - return; - } + if (lost_client) _ecore_con_client_kill(cl); } static Eina_Bool @@ -2198,9 +2151,6 @@ _ecore_con_svr_cl_handler(void *data, Ecore_Con_Client *cl; cl = data; - if (cl->dead) - return ECORE_CALLBACK_RENEW; - if (cl->delete_me) return ECORE_CALLBACK_RENEW; @@ -2209,10 +2159,8 @@ _ecore_con_svr_cl_handler(void *data, if (ecore_con_ssl_client_init(cl)) { ERR("ssl handshaking failed!"); - cl->handshaking = EINA_FALSE; - cl->dead = EINA_TRUE; - INF("Lost client %s", (cl->ip) ? cl->ip : ""); - ecore_con_event_client_del(cl); + _ecore_con_client_kill(cl); + return ECORE_CALLBACK_RENEW; } else if (!cl->ssl_state) ecore_con_event_client_add(cl); @@ -2230,19 +2178,25 @@ static void _ecore_con_server_flush(Ecore_Con_Server *svr) { int count, num; + size_t buf_len, buf_offset; + const void *buf; + DBG("(svr=%p,buf=%p)", svr, svr->buf); #ifdef _WIN32 if (ecore_con_local_win32_server_flush(svr)) return; #endif - if ((!svr->buf) && svr->fd_handler) + if ((!svr->buf) && (!svr->ecs_buf) && svr->fd_handler) { ecore_main_fd_handler_active_set(svr->fd_handler, ECORE_FD_READ); return; } - num = eina_binbuf_length_get(svr->buf) - svr->write_buf_offset; + buf = svr->buf ? eina_binbuf_string_get(svr->buf) : eina_binbuf_string_get(svr->ecs_buf); + buf_len = svr->buf ? eina_binbuf_length_get(svr->buf) : eina_binbuf_length_get(svr->ecs_buf); + buf_offset = svr->buf ? svr->write_buf_offset : svr->ecs_buf_offset; + num = buf_len - buf_offset; /* check whether we need to write anything at all. * we must not write zero bytes with SSL_write() since it @@ -2253,7 +2207,7 @@ _ecore_con_server_flush(Ecore_Con_Server *svr) */ if (num <= 0) return; - if (svr->handshaking) + if ((!svr->ecs_state) && svr->handshaking) { DBG("Continuing ssl handshake"); if (ecore_con_ssl_server_init(svr)) @@ -2262,10 +2216,10 @@ _ecore_con_server_flush(Ecore_Con_Server *svr) return; } - if (!(svr->type & ECORE_CON_SSL)) - count = write(svr->fd, eina_binbuf_string_get(svr->buf) + svr->write_buf_offset, num); + if (svr->ecs_state || (!(svr->type & ECORE_CON_SSL))) + count = write(svr->fd, buf + buf_offset, num); else - count = ecore_con_ssl_server_write(svr, eina_binbuf_string_get(svr->buf) + svr->write_buf_offset, num); + count = ecore_con_ssl_server_write(svr, buf + buf_offset, num); if (count < 0) { @@ -2277,13 +2231,36 @@ _ecore_con_server_flush(Ecore_Con_Server *svr) return; } - if (count) ecore_con_event_server_write(svr, count); - svr->write_buf_offset += count; - if (svr->write_buf_offset >= eina_binbuf_length_get(svr->buf)) + if (count && (!svr->ecs_state)) ecore_con_event_server_write(svr, count); + if (svr->ecs_buf) + buf_offset = svr->ecs_buf_offset += count; + else + buf_offset = svr->write_buf_offset += count; + if (buf_offset >= buf_len) { - svr->write_buf_offset = 0; - eina_binbuf_free(svr->buf); - svr->buf = NULL; + if (svr->ecs_buf) + { + svr->ecs_buf_offset = 0; + eina_binbuf_free(svr->ecs_buf); + svr->ecs_buf = NULL; + INF("PROXY STATE++"); + svr->ecs_state++; + } + else + { + svr->write_buf_offset = 0; + eina_binbuf_free(svr->buf); + svr->buf = NULL; +#ifdef TCP_CORK + if ((svr->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_CORK) + { + int state = 0; + if (setsockopt(svr->fd, IPPROTO_TCP, TCP_CORK, (char *)&state, sizeof(int)) < 0) + /* realistically this isn't anything serious so we can just log and continue */ + ERR("uncorking failed! %s", strerror(errno)); + } +#endif + } if (svr->fd_handler) ecore_main_fd_handler_active_set(svr->fd_handler, ECORE_FD_READ); } @@ -2330,13 +2307,7 @@ _ecore_con_client_flush(Ecore_Con_Client *cl) if ((errno != EAGAIN) && (errno != EINTR) && (!cl->delete_me)) { ecore_con_event_client_error(cl, strerror(errno)); - ecore_con_event_client_del(cl); - cl->dead = EINA_TRUE; - INF("Lost client %s", (cl->ip) ? cl->ip : ""); - if (cl->fd_handler) - ecore_main_fd_handler_del(cl->fd_handler); - - cl->fd_handler = NULL; + _ecore_con_client_kill(cl); } return; @@ -2349,6 +2320,15 @@ _ecore_con_client_flush(Ecore_Con_Client *cl) cl->buf_offset = 0; eina_binbuf_free(cl->buf); cl->buf = NULL; +#ifdef TCP_CORK + if ((cl->host_server->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_CORK) + { + int state = 0; + if (setsockopt(cl->fd, IPPROTO_TCP, TCP_CORK, (char *)&state, sizeof(int)) < 0) + /* realistically this isn't anything serious so we can just log and continue */ + ERR("uncorking failed! %s", strerror(errno)); + } +#endif if (cl->fd_handler) ecore_main_fd_handler_active_set(cl->fd_handler, ECORE_FD_READ); } @@ -2398,7 +2378,7 @@ _ecore_con_event_client_del_free(Ecore_Con_Server *svr, if ((!svr->event_count) && (svr->delete_me)) _ecore_con_server_free(svr); } - if ((!e->client->event_count) && (e->client->delete_me)) + if (!e->client->event_count) ecore_con_client_del(e->client); } ecore_con_event_client_del_free(e); @@ -2490,7 +2470,7 @@ _ecore_con_event_server_del_free(void *data __UNUSED__, if (e->server) { e->server->event_count = eina_list_remove(e->server->event_count, ev); - if ((!e->server->event_count) && (e->server->delete_me)) + if (!e->server->event_count) _ecore_con_server_free(e->server); } ecore_con_event_server_del_free(e); diff --git a/libraries/ecore/src/lib/ecore_con/ecore_con_alloc.c b/libraries/ecore/src/lib/ecore_con/ecore_con_alloc.c index 206948b..d922f20 100644 --- a/libraries/ecore/src/lib/ecore_con/ecore_con_alloc.c +++ b/libraries/ecore/src/lib/ecore_con/ecore_con_alloc.c @@ -40,6 +40,7 @@ GENERIC_ALLOC_FREE(Ecore_Con_Event_Server_Add, ecore_con_event_server_add); GENERIC_ALLOC_FREE(Ecore_Con_Event_Server_Del, ecore_con_event_server_del); GENERIC_ALLOC_FREE(Ecore_Con_Event_Server_Write, ecore_con_event_server_write); GENERIC_ALLOC_FREE(Ecore_Con_Event_Server_Data, ecore_con_event_server_data); +GENERIC_ALLOC_FREE(Ecore_Con_Event_Proxy_Bind, ecore_con_event_proxy_bind); static Ecore_Con_Mempool *mempool_array[] = { &ecore_con_event_client_add_mp, @@ -51,7 +52,8 @@ static Ecore_Con_Mempool *mempool_array[] = { &ecore_con_event_server_add_mp, &ecore_con_event_server_del_mp, &ecore_con_event_server_write_mp, - &ecore_con_event_server_data_mp + &ecore_con_event_server_data_mp, + &ecore_con_event_proxy_bind_mp }; void diff --git a/libraries/ecore/src/lib/ecore_con/ecore_con_ares.c b/libraries/ecore/src/lib/ecore_con/ecore_con_ares.c index dd5a212..5dfe70b 100644 --- a/libraries/ecore/src/lib/ecore_con/ecore_con_ares.c +++ b/libraries/ecore/src/lib/ecore_con/ecore_con_ares.c @@ -309,7 +309,7 @@ ecore_con_info_get(Ecore_Con_Server *svr, memcpy(&cares->hints, hints, sizeof(struct addrinfo)); } - if (inet_pton(AF_INET, svr->name, &cares->addr.v4) == 1) + if (inet_pton(AF_INET, svr->ecs ? svr->ecs->ip : svr->name, &cares->addr.v4) == 1) { cares->byaddr = EINA_TRUE; cares->isv6 = EINA_FALSE; @@ -320,7 +320,7 @@ ecore_con_info_get(Ecore_Con_Server *svr, cares); } #ifdef HAVE_IPV6 - else if (inet_pton(AF_INET6, svr->name, &cares->addr.v6) == 1) + else if (inet_pton(AF_INET6, svr->ecs ? svr->ecs->ip : svr->name, &cares->addr.v6) == 1) { cares->byaddr = EINA_TRUE; cares->isv6 = EINA_TRUE; @@ -334,7 +334,7 @@ ecore_con_info_get(Ecore_Con_Server *svr, else { cares->byaddr = EINA_FALSE; - ares_gethostbyname(info_channel, svr->name, ai_family, + ares_gethostbyname(info_channel, svr->ecs ? svr->ecs->ip : svr->name, ai_family, (ares_host_callback)_ecore_con_info_ares_host_cb, cares); } @@ -457,7 +457,7 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg, goto on_mem_error; addri->sin_family = AF_INET; - addri->sin_port = htons(arg->svr->port); + addri->sin_port = htons(arg->svr->ecs ? arg->svr->ecs->port : arg->svr->port); memcpy(&addri->sin_addr.s_addr, hostent->h_addr_list[0], sizeof(struct in_addr)); @@ -477,7 +477,7 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg, goto on_mem_error; addri6->sin6_family = AF_INET6; - addri6->sin6_port = htons(arg->svr->port); + addri6->sin6_port = htons(arg->svr->ecs ? arg->svr->ecs->port : arg->svr->port); addri6->sin6_flowinfo = 0; addri6->sin6_scope_id = 0; @@ -516,7 +516,7 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg, goto on_mem_error; addri6->sin6_family = AF_INET6; - addri6->sin6_port = htons(arg->svr->port); + addri6->sin6_port = htons(arg->svr->ecs ? arg->svr->ecs->port : arg->svr->port); addri6->sin6_flowinfo = 0; addri6->sin6_scope_id = 0; @@ -537,7 +537,7 @@ _ecore_con_info_ares_host_cb(Ecore_Con_CAres *arg, goto on_mem_error; addri->sin_family = AF_INET; - addri->sin_port = htons(arg->svr->port); + addri->sin_port = htons(arg->svr->ecs ? arg->svr->ecs->port : arg->svr->port); memcpy(&addri->sin_addr.s_addr, &arg->addr.v4, sizeof(struct in_addr)); diff --git a/libraries/ecore/src/lib/ecore_con/ecore_con_info.c b/libraries/ecore/src/lib/ecore_con/ecore_con_info.c index 4ece6b0..fdcf0b9 100644 --- a/libraries/ecore/src/lib/ecore_con/ecore_con_info.c +++ b/libraries/ecore/src/lib/ecore_con/ecore_con_info.c @@ -244,11 +244,10 @@ ecore_con_info_get(Ecore_Con_Server *svr, unsigned char *tosend = NULL; int tosend_len; int canonname_len = 0; - int err; - eina_convert_itoa(svr->port, service); + eina_convert_itoa(svr->ecs ? svr->ecs->port : svr->port, service); /* CHILD */ - if (!getaddrinfo(svr->name, service, hints, &result) && result) + if (!getaddrinfo(svr->ecs ? svr->ecs->ip : svr->name, service, hints, &result) && result) { if (result->ai_canonname) canonname_len = strlen(result->ai_canonname) + 1; @@ -281,13 +280,13 @@ ecore_con_info_get(Ecore_Con_Server *svr, memcpy(container->service, sbuf, sizeof(container->service)); } - err = write(fd[1], tosend, tosend_len); + if (write(fd[1], tosend, tosend_len) < 0) perror("write"); } if (result) freeaddrinfo(result); - err = write(fd[1], "", 1); + if (write(fd[1], "", 1) < 0) perror("write"); close(fd[1]); #if defined(__USE_ISOC99) && !defined(__UCLIBC__) _Exit(0); diff --git a/libraries/ecore/src/lib/ecore_con/ecore_con_local_win32.c b/libraries/ecore/src/lib/ecore_con/ecore_con_local_win32.c index 858daa5..2b7e5c5 100644 --- a/libraries/ecore/src/lib/ecore_con/ecore_con_local_win32.c +++ b/libraries/ecore/src/lib/ecore_con/ecore_con_local_win32.c @@ -75,9 +75,7 @@ _ecore_con_local_win32_server_read_client_handler(void *data, Ecore_Win32_Handle free(msg); } #endif - if (!cl->delete_me) - ecore_con_event_client_del(cl); - cl->dead = EINA_TRUE; + _ecore_con_client_kill(cl); return ECORE_CALLBACK_CANCEL; } @@ -110,9 +108,7 @@ _ecore_con_local_win32_server_peek_client_handler(void *data, Ecore_Win32_Handle free(msg); } #endif - if (!cl->host_server->delete_me) - ecore_con_event_server_del(cl->host_server); - cl->host_server->dead = EINA_TRUE; + _ecore_con_server_kill(cl->host_server); return ECORE_CALLBACK_CANCEL; ecore_main_win32_handler_del(wh); @@ -140,9 +136,7 @@ _ecore_con_local_win32_client_peek_server_handler(void *data, Ecore_Win32_Handle free(msg); } #endif - if (!svr->delete_me) - ecore_con_event_server_del(svr); - svr->dead = EINA_TRUE; + _ecore_con_server_kill(svr); return ECORE_CALLBACK_CANCEL; ecore_main_win32_handler_del(wh); @@ -191,9 +185,7 @@ _ecore_con_local_win32_client_read_server_handler(void *data, Ecore_Win32_Handle free(msg); } #endif - if (!svr->delete_me) - ecore_con_event_server_del(svr); - svr->dead = EINA_TRUE; + _ecore_con_server_kill(svr); return ECORE_CALLBACK_CANCEL; } @@ -296,9 +288,6 @@ _ecore_con_local_win32_client_add(void *data, Ecore_Win32_Handler *wh) if (!svr->pipe) return ECORE_CALLBACK_CANCEL; - if (svr->dead) - return ECORE_CALLBACK_CANCEL; - if (svr->delete_me) return ECORE_CALLBACK_CANCEL; @@ -698,16 +687,14 @@ ecore_con_local_win32_server_flush(Ecore_Con_Server *svr) ecore_con_event_server_error(svr, msg); free(msg); } - if (!svr->delete_me) - ecore_con_event_server_del(svr); - svr->dead = EINA_TRUE; + _ecore_con_server_kill(svr); } svr->write_buf_offset += written; if (svr->write_buf_offset >= eina_binbuf_length_get(svr->buf)) { svr->write_buf_offset = 0; - eina_binbuf_free(svr->buf); + eina_binbuf_free(svr->buf); svr->buf = NULL; svr->want_write = 0; } @@ -749,9 +736,7 @@ ecore_con_local_win32_client_flush(Ecore_Con_Client *cl) ecore_con_event_client_error(cl, msg); free(msg); } - if (!cl->delete_me) - ecore_con_event_client_del(cl); - cl->dead = EINA_TRUE; + _ecore_con_client_kill(cl); } cl->buf_offset += written; 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 f601465..35f2310 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,8 @@ 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_v5 Ecore_Con_Socks_v5; typedef void (*Ecore_Con_Info_Cb)(void *data, Ecore_Con_Info *infos); typedef enum _Ecore_Con_State @@ -82,6 +83,14 @@ 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; + struct _Ecore_Con_Client { ECORE_MAGIC; @@ -107,9 +116,8 @@ struct _Ecore_Con_Client #endif Ecore_Con_Ssl_State ssl_state; Eina_Bool handshaking : 1; - Eina_Bool upgrade : 1; - Eina_Bool dead : 1; - Eina_Bool delete_me : 1; + Eina_Bool upgrade : 1; /* STARTTLS queued */ + Eina_Bool delete_me : 1; /* del event has been queued */ }; struct _Ecore_Con_Server @@ -130,6 +138,18 @@ struct _Ecore_Con_Server Eina_List *event_count; int client_limit; pid_t ppid; + /* socks */ + Ecore_Con_Socks *ecs; + Ecore_Con_Socks_State ecs_state; + int ecs_addrlen; + unsigned char ecs_addr[16]; + unsigned int ecs_buf_offset; + Eina_Binbuf *ecs_buf; + Eina_Binbuf *ecs_recvbuf; + const char *proxyip; + int proxyport; + /* endsocks */ + const char *verify_name; #if USE_GNUTLS gnutls_session_t session; gnutls_anon_client_credentials_t anoncred_c; @@ -149,18 +169,17 @@ struct _Ecore_Con_Server double disconnect_time; double client_disconnect_time; const char *ip; - Eina_Bool dead : 1; Eina_Bool created : 1; /* EINA_TRUE if server is our listening server */ Eina_Bool connecting : 1; /* EINA_FALSE if just initialized or connected */ Eina_Bool handshaking : 1; /* EINA_TRUE if server is ssl handshaking */ - Eina_Bool upgrade : 1; + Eina_Bool upgrade : 1; /* STARTTLS queued */ Eina_Bool ssl_prepared : 1; Eina_Bool use_cert : 1; /* EINA_TRUE if using certificate auth */ Ecore_Con_Ssl_State ssl_state; /* current state of ssl handshake on the server */ Eina_Bool verify : 1; /* EINA_TRUE if certificates will be verified */ Eina_Bool verify_basic : 1; /* EINA_TRUE if certificates will be verified only against the hostname */ Eina_Bool reject_excess_clients : 1; - Eina_Bool delete_me : 1; + Eina_Bool delete_me : 1; /* del event has been queued */ #ifdef _WIN32 Eina_Bool want_write : 1; Eina_Bool read_stop : 1; @@ -182,19 +201,18 @@ struct _Ecore_Con_Url Eina_List *additional_headers; Eina_List *response_headers; const char *url; + long proxy_type; + + Ecore_Timer *timer; Ecore_Con_Url_Time time_condition; double timestamp; void *data; - - Ecore_Fd_Handler *fd_handler; - int fd; - int flags; + + void *post_data; int received; int write_fd; - - Eina_Bool active : 1; }; #endif @@ -212,16 +230,68 @@ struct _Ecore_Con_Lookup const void *data; }; +#define ECORE_CON_SOCKS_CAST_ELSE(X) \ + Ecore_Con_Socks_v4 *v4 = NULL; \ + Ecore_Con_Socks_v5 *v5 = NULL; \ + if ((X) && ((X)->version == 4)) \ + v4 = (Ecore_Con_Socks_v4*)(X); \ + else if ((X) && ((X)->version == 5)) \ + 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 +{ + unsigned char version; + + const char *ip; + int port; + const char *username; + Eina_Bool lookup : 1; + Eina_Bool bind : 1; +}; + +struct Ecore_Con_Socks_v5 +{ + unsigned char version; + + const char *ip; + int port; + const char *username; + Eina_Bool lookup : 1; + Eina_Bool bind : 1; +}; + +extern Ecore_Con_Socks *_ecore_con_proxy_once; +extern Ecore_Con_Socks *_ecore_con_proxy_global; +void ecore_con_socks_init(void); +void ecore_con_socks_shutdown(void); +Eina_Bool ecore_con_socks_svr_init(Ecore_Con_Server *svr); +void ecore_con_socks_read(Ecore_Con_Server *svr, unsigned char *buf, int num); +void ecore_con_socks_dns_cb(const char *canonname, const char *ip, struct sockaddr *addr, int addrlen, Ecore_Con_Server *svr); /* from ecore_con.c */ void ecore_con_server_infos_del(Ecore_Con_Server *svr, void *info); +void ecore_con_event_proxy_bind(Ecore_Con_Server *svr); void ecore_con_event_server_data(Ecore_Con_Server *svr, unsigned char *buf, int num, Eina_Bool duplicate); void ecore_con_event_server_del(Ecore_Con_Server *svr); -void ecore_con_event_server_error(Ecore_Con_Server *svr, const char *error); +#define ecore_con_event_server_error(svr, error) _ecore_con_event_server_error((svr), (char*)(error), EINA_TRUE) +void _ecore_con_event_server_error(Ecore_Con_Server *svr, char *error, Eina_Bool duplicate); void ecore_con_event_client_add(Ecore_Con_Client *cl); void ecore_con_event_client_data(Ecore_Con_Client *cl, unsigned char *buf, int num, Eina_Bool duplicate); void ecore_con_event_client_del(Ecore_Con_Client *cl); void ecore_con_event_client_error(Ecore_Con_Client *cl, const char *error); - +void _ecore_con_server_kill(Ecore_Con_Server *svr); +void _ecore_con_client_kill(Ecore_Con_Client *cl); /* from ecore_local_win32.c */ #ifdef _WIN32 Eina_Bool ecore_con_local_listen(Ecore_Con_Server *svr); @@ -312,6 +382,7 @@ GENERIC_ALLOC_FREE_HEADER(Ecore_Con_Event_Server_Add, ecore_con_event_server_add GENERIC_ALLOC_FREE_HEADER(Ecore_Con_Event_Server_Del, ecore_con_event_server_del); GENERIC_ALLOC_FREE_HEADER(Ecore_Con_Event_Server_Write, ecore_con_event_server_write); GENERIC_ALLOC_FREE_HEADER(Ecore_Con_Event_Server_Data, ecore_con_event_server_data); +GENERIC_ALLOC_FREE_HEADER(Ecore_Con_Event_Proxy_Bind, ecore_con_event_proxy_bind); void ecore_con_mempool_init(void); void ecore_con_mempool_shutdown(void); diff --git a/libraries/ecore/src/lib/ecore_con/ecore_con_socks.c b/libraries/ecore/src/lib/ecore_con/ecore_con_socks.c new file mode 100644 index 0000000..aecaff0 --- /dev/null +++ b/libraries/ecore/src/lib/ecore_con/ecore_con_socks.c @@ -0,0 +1,496 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_NETINET_TCP_H +# include +#endif + +#ifdef HAVE_NET_IF_H +# include +#endif + +/* if net/if.h is not found or if an older versions of net/if.h is provided + which does not define IF_NAMESIZE. We must define it ourselves */ +#ifndef IF_NAMESIZE +# ifdef IFNAMSIZ +# define IF_NAMESIZE IFNAMSIZ +# else +# define IF_NAMESIZE 16 +# endif +#endif + +#ifdef HAVE_NETINET_IN_H +# include +#endif + +#ifdef HAVE_ARPA_INET_H +# include +#endif + +#ifdef HAVE_SYS_SOCKET_H +# include +#endif + +#ifdef HAVE_SYS_UN_H +# include +#endif + +#ifdef HAVE_WS2TCPIP_H +# include +#endif + +#ifdef HAVE_EVIL +# include +#endif + +#include "Ecore.h" +#include "ecore_private.h" +#include "Ecore_Con.h" +#include "ecore_con_private.h" + +#define _ecore_con_server_kill(svr) do { \ + DBG("KILL %p", (svr)); \ + _ecore_con_server_kill((svr)); \ +} while (0) + +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) +{ + Eina_List *l; + Ecore_Con_Socks *ecs; + + if (!ecore_con_socks_proxies) return NULL; + + EINA_LIST_FOREACH(ecore_con_socks_proxies, l, ecs) + { + if (ecs->version != version) continue; + if (strcmp(ecs->ip, ip)) continue; + if ((port != -1) && (port != ecs->port)) continue; + if (username && strcmp(ecs->username, username)) continue; + return ecs; + } + return NULL; +} + +static void +_ecore_con_socks_free(Ecore_Con_Socks *ecs) +{ + ECORE_CON_SOCKS_CAST_ELSE(ecs) return; + + if (_ecore_con_proxy_once == ecs) _ecore_con_proxy_once = NULL; + if (_ecore_con_proxy_global == ecs) _ecore_con_proxy_global = NULL; + eina_stringshare_del(ecs->ip); + eina_stringshare_del(ecs->username); + free(ecs); +} +///////////////////////////////////////////////////////////////////////////////////// +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) +{ + const unsigned char *data; + ECORE_CON_SOCKS_CAST_ELSE(svr->ecs) return; + + if (svr->ecs_state != ECORE_CON_SOCKS_STATE_READ) return; + + if (v4) + { + 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 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]; + + 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_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); + } + return; +error: + _ecore_con_server_kill(svr); +} + +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; + 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; +} + +void +ecore_con_socks_dns_cb(const char *canonname __UNUSED__, const char *ip, struct sockaddr *addr, int addrlen, 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); +#ifdef HAVE_IPV6 + else + memcpy(svr->ecs_addr, &((struct sockaddr_in6 *)addr)->sin6_addr.s6_addr, addrlen); +#endif + ecore_con_socks_svr_init(svr); +} + +void +ecore_con_socks_init(void) +{ + const char *socks; + char *u, *h, *p, *l; + char buf[64]; + int port, lookup = 0; + Ecore_Con_Socks *ecs; + unsigned char addr[sizeof(struct in_addr)]; + + /* ECORE_CON_SOCKS_V4=user@host:port:[1|0] */ + socks = getenv("ECORE_CON_SOCKS_V4"); + if ((!socks) || (!socks[0]) || (strlen(socks) > 64)) 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, ':'); + if (!p) return; + *p++ = 0; + if (!inet_pton(AF_INET, h, addr)) return; + + 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 (!ecs) return; + ecore_con_socks4_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"); +} + +///////////////////////////////////////////////////////////////////////////////////// + +/** + * @defgroup Ecore_Con_Socks_Group Ecore Connection SOCKS functions + * @{ + */ + +/** + * Add a SOCKS v4 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) + * @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_socks4_remote_add(const char *ip, int port, const char *username) +{ + Ecore_Con_Socks *ecs; + + if ((!ip) || (!ip[0]) || (port < 0) || (port > 65535)) return NULL; + + ecs = _ecore_con_socks_find(4, ip, port, username); + if (ecs) return ecs; + + ecs = calloc(1, sizeof(Ecore_Con_Socks_v4)); + if (!ecs) return NULL; + + ecs->version = 4; + ecs->ip = eina_stringshare_add(ip); + ecs->port = port; + ecs->username = eina_stringshare_add(username); + ecore_con_socks_proxies = eina_list_append(ecore_con_socks_proxies, ecs); + return ecs; +} + +/** + * Set DNS lookup mode on an existing SOCKS v4 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. 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_socks4_lookup_set(Ecore_Con_Socks *ecs, Eina_Bool enable) +{ + ECORE_CON_SOCKS_CAST_ELSE(ecs) return; + if (v4) v4->lookup = !!enable; +} + +/** + * Get DNS lookup mode on an existing SOCKS v4 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. 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_socks4_lookup_get(Ecore_Con_Socks *ecs) +{ + ECORE_CON_SOCKS_CAST_ELSE(ecs) return EINA_FALSE; + return v4 ? v4->lookup : EINA_FALSE; +} + +/** + * Find a SOCKS v4 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) + * @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 Eina_Bool +ecore_con_socks4_remote_exists(const char *ip, int port, const char *username) +{ + if ((!ip) || (!ip[0]) || (port < -1) || (port > 65535) || (username && (!username[0]))) + return EINA_FALSE; + return !!_ecore_con_socks_find(4, ip, port, username); +} + +/** + * Remove a SOCKS v4 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) + * @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_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); + if (!v4) return; + ecore_con_socks_proxies = eina_list_remove(ecore_con_socks_proxies, v4); + _ecore_con_socks_free((Ecore_Con_Socks*)v4); +} + +/** + * Enable bind mode on a SOCKS proxy + * + * Use this function to enable binding a remote port for use with a remote server. + * For more information, see http://ufasoft.com/doc/socks4_protocol.htm + * @param ecs The proxy object + * @param is_bind If true, the connection established will be a port binding + * @warning Be aware that changing the operation mode of an active proxy may result in undefined behavior + * @since 1.2 + */ +EAPI void +ecore_con_socks_bind_set(Ecore_Con_Socks *ecs, Eina_Bool is_bind) +{ + EINA_SAFETY_ON_NULL_RETURN(ecs); + ecs->bind = !!is_bind; +} + +/** + * Return bind mode of a SOCKS proxy + * + * Use this function to return bind mode of a proxy (binding a remote port for use with a remote server). + * For more information, see http://ufasoft.com/doc/socks4_protocol.htm + * @param ecs The proxy object + * @return If true, the connection established will be a port binding + * @since 1.2 + */ +EAPI Eina_Bool +ecore_con_socks_bind_get(Ecore_Con_Socks *ecs) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(ecs, EINA_FALSE); + return ecs->bind; +} + +EAPI unsigned int +ecore_con_socks_version_get(Ecore_Con_Socks *ecs) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(ecs, 0); + return ecs->version; +} + +/** + * Remove a SOCKS v4 proxy from the proxy list and delete it + * + * Use this to remove a SOCKS proxy from the proxy list by directly deleting the object given. + * @param ecs The proxy object to delete + * @warning Be aware that deleting a proxy which is being used WILL ruin your life. + * @since 1.2 + */ +EAPI void +ecore_con_socks_remote_del(Ecore_Con_Socks *ecs) +{ + EINA_SAFETY_ON_NULL_RETURN(ecs); + if (!ecore_con_socks_proxies) return; + + ecore_con_socks_proxies = eina_list_remove(ecore_con_socks_proxies, ecs); + _ecore_con_socks_free(ecs); +} + +/** + * Set a proxy object to be used with the next server created with ecore_con_server_connect() + * + * This function sets a proxy for the next ecore_con connection. After the next server is created, + * the proxy will NEVER be applied again unless explicitly enabled. + * @param ecs The proxy object + * @see ecore_con_socks_apply_always() + * @since 1.2 + */ +EAPI void +ecore_con_socks_apply_once(Ecore_Con_Socks *ecs) +{ + _ecore_con_proxy_once = ecs; +} + +/** + * Set a proxy object to be used with all servers created with ecore_con_server_connect() + * + * This function sets a proxy for all ecore_con connections. It will always be used. + * @param ecs The proxy object + * @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 + * 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 + * lookup is 1 if the proxy should perform all DNS lookups, otherwise 0 or omitted + */ +EAPI void +ecore_con_socks_apply_always(Ecore_Con_Socks *ecs) +{ + _ecore_con_proxy_global = ecs; +} +/** @} */ 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 c352e94..6104632 100644 --- a/libraries/ecore/src/lib/ecore_con/ecore_con_ssl.c +++ b/libraries/ecore/src/lib/ecore_con/ecore_con_ssl.c @@ -16,6 +16,7 @@ # include #endif +#include #include "Ecore.h" #include "ecore_con_private.h" @@ -60,12 +61,34 @@ _gnutls_print_errors(void *conn, int type, int ret) ecore_con_event_server_error(conn, buf); } +static void +_gnutls_print_session(const gnutls_datum_t *cert_list, unsigned int cert_list_size) +{ + char *c = NULL; + gnutls_x509_crt_t crt; + unsigned int x; + + if (!eina_log_domain_level_check(_ecore_con_log_dom, EINA_LOG_LEVEL_DBG)) return; + for (x = 0; x < cert_list_size; x++) + { + gnutls_x509_crt_init(&crt); + gnutls_x509_crt_import(crt, &cert_list[x], GNUTLS_X509_FMT_DER); + gnutls_x509_crt_print(crt, GNUTLS_CRT_PRINT_FULL, (gnutls_datum_t*)&c); + INF("CERTIFICATE:\n%s", c); + gnutls_free(c); + gnutls_x509_crt_deinit(crt); + crt = NULL; + } +} + #ifdef ISCOMFITOR static void _gnutls_log_func(int level, const char *str) { - DBG("|<%d>| %s", level, str); + char buf[128]; + strncat(buf, str, strlen(str) - 1); + DBG("|<%d>| %s", level, buf); } #endif @@ -116,6 +139,185 @@ SSL_GNUTLS_PRINT_HANDSHAKE_STATUS(gnutls_handshake_description_t status) #elif USE_OPENSSL static void +_openssl_print_verify_error(int error) +{ + switch (error) + { +#define ERROR(X) \ + case (X): \ + ERR("%s", #X); \ + break +#ifdef X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT + ERROR(X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT); +#endif +#ifdef X509_V_ERR_UNABLE_TO_GET_CRL + ERROR(X509_V_ERR_UNABLE_TO_GET_CRL); +#endif +#ifdef X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE + ERROR(X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE); +#endif +#ifdef X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE + ERROR(X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE); +#endif +#ifdef X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY + ERROR(X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY); +#endif +#ifdef X509_V_ERR_CERT_SIGNATURE_FAILURE + ERROR(X509_V_ERR_CERT_SIGNATURE_FAILURE); +#endif +#ifdef X509_V_ERR_CRL_SIGNATURE_FAILURE + ERROR(X509_V_ERR_CRL_SIGNATURE_FAILURE); +#endif +#ifdef X509_V_ERR_CERT_NOT_YET_VALID + ERROR(X509_V_ERR_CERT_NOT_YET_VALID); +#endif +#ifdef X509_V_ERR_CERT_HAS_EXPIRED + ERROR(X509_V_ERR_CERT_HAS_EXPIRED); +#endif +#ifdef X509_V_ERR_CRL_NOT_YET_VALID + ERROR(X509_V_ERR_CRL_NOT_YET_VALID); +#endif +#ifdef X509_V_ERR_CRL_HAS_EXPIRED + ERROR(X509_V_ERR_CRL_HAS_EXPIRED); +#endif +#ifdef X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD + ERROR(X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD); +#endif +#ifdef X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD + ERROR(X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD); +#endif +#ifdef X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD + ERROR(X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD); +#endif +#ifdef X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD + ERROR(X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD); +#endif +#ifdef X509_V_ERR_OUT_OF_MEM + ERROR(X509_V_ERR_OUT_OF_MEM); +#endif +#ifdef X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT + ERROR(X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT); +#endif +#ifdef X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN + ERROR(X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN); +#endif +#ifdef X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY + ERROR(X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY); +#endif +#ifdef X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE + ERROR(X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE); +#endif +#ifdef X509_V_ERR_CERT_CHAIN_TOO_LONG + ERROR(X509_V_ERR_CERT_CHAIN_TOO_LONG); +#endif +#ifdef X509_V_ERR_CERT_REVOKED + ERROR(X509_V_ERR_CERT_REVOKED); +#endif +#ifdef X509_V_ERR_INVALID_CA + ERROR(X509_V_ERR_INVALID_CA); +#endif +#ifdef X509_V_ERR_PATH_LENGTH_EXCEEDED + ERROR(X509_V_ERR_PATH_LENGTH_EXCEEDED); +#endif +#ifdef X509_V_ERR_INVALID_PURPOSE + ERROR(X509_V_ERR_INVALID_PURPOSE); +#endif +#ifdef X509_V_ERR_CERT_UNTRUSTED + ERROR(X509_V_ERR_CERT_UNTRUSTED); +#endif +#ifdef X509_V_ERR_CERT_REJECTED + ERROR(X509_V_ERR_CERT_REJECTED); +#endif + /* These are 'informational' when looking for issuer cert */ +#ifdef X509_V_ERR_SUBJECT_ISSUER_MISMATCH + ERROR(X509_V_ERR_SUBJECT_ISSUER_MISMATCH); +#endif +#ifdef X509_V_ERR_AKID_SKID_MISMATCH + ERROR(X509_V_ERR_AKID_SKID_MISMATCH); +#endif +#ifdef X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH + ERROR(X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH); +#endif +#ifdef X509_V_ERR_KEYUSAGE_NO_CERTSIGN + ERROR(X509_V_ERR_KEYUSAGE_NO_CERTSIGN); +#endif + +#ifdef X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER + ERROR(X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER); +#endif +#ifdef X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION + ERROR(X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION); +#endif +#ifdef X509_V_ERR_KEYUSAGE_NO_CRL_SIGN + ERROR(X509_V_ERR_KEYUSAGE_NO_CRL_SIGN); +#endif +#ifdef X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION + ERROR(X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION); +#endif +#ifdef X509_V_ERR_INVALID_NON_CA + ERROR(X509_V_ERR_INVALID_NON_CA); +#endif +#ifdef X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED + ERROR(X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED); +#endif +#ifdef X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE + ERROR(X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE); +#endif +#ifdef X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED + ERROR(X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED); +#endif + +#ifdef X509_V_ERR_INVALID_EXTENSION + ERROR(X509_V_ERR_INVALID_EXTENSION); +#endif +#ifdef X509_V_ERR_INVALID_POLICY_EXTENSION + ERROR(X509_V_ERR_INVALID_POLICY_EXTENSION); +#endif +#ifdef X509_V_ERR_NO_EXPLICIT_POLICY + ERROR(X509_V_ERR_NO_EXPLICIT_POLICY); +#endif +#ifdef X509_V_ERR_DIFFERENT_CRL_SCOPE + ERROR(X509_V_ERR_DIFFERENT_CRL_SCOPE); +#endif +#ifdef X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE + ERROR(X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE); +#endif + +#ifdef X509_V_ERR_UNNESTED_RESOURCE + ERROR(X509_V_ERR_UNNESTED_RESOURCE); +#endif + +#ifdef X509_V_ERR_PERMITTED_VIOLATION + ERROR(X509_V_ERR_PERMITTED_VIOLATION); +#endif +#ifdef X509_V_ERR_EXCLUDED_VIOLATION + ERROR(X509_V_ERR_EXCLUDED_VIOLATION); +#endif +#ifdef X509_V_ERR_SUBTREE_MINMAX + ERROR(X509_V_ERR_SUBTREE_MINMAX); +#endif +#ifdef X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE + ERROR(X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE); +#endif +#ifdef X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX + ERROR(X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX); +#endif +#ifdef X509_V_ERR_UNSUPPORTED_NAME_SYNTAX + ERROR(X509_V_ERR_UNSUPPORTED_NAME_SYNTAX); +#endif +#ifdef X509_V_ERR_CRL_PATH_VALIDATION_ERROR + ERROR(X509_V_ERR_CRL_PATH_VALIDATION_ERROR); +#endif + + /* The application is not happy */ +#ifdef X509_V_ERR_APPLICATION_VERIFICATION + ERROR(X509_V_ERR_APPLICATION_VERIFICATION); +#endif + } +#undef ERROR +} + +static void _openssl_print_errors(void *conn, int type) { char buf[1024]; @@ -152,13 +354,57 @@ _openssl_name_verify(const char *name, const char *svrname) EINA_SAFETY_ON_TRUE_RETURN_VAL(!s, EINA_FALSE); /* same as above for the stored name */ EINA_SAFETY_ON_TRUE_RETURN_VAL(!strchr(s + 1, '.'), EINA_FALSE); - EINA_SAFETY_ON_TRUE_RETURN_VAL(strcasecmp(s, name + 1), EINA_FALSE); + if (strcasecmp(s, name + 1)) + { + ERR("%s != %s", s, name + 1); + return EINA_FALSE; + } } else - EINA_SAFETY_ON_TRUE_RETURN_VAL(strcasecmp(name, svrname), EINA_FALSE); + if (strcasecmp(name, svrname)) + { + ERR("%s != %s", name, svrname); + return EINA_FALSE; + } return EINA_TRUE; } +static void +_openssl_print_session(SSL *ssl) +{ + /* print session info into DBG */ + SSL_SESSION *s; + STACK_OF(X509) *sk; + BIO *b; + char log[4096], *p; + int x; + + if (!eina_log_domain_level_check(_ecore_con_log_dom, EINA_LOG_LEVEL_DBG)) return; + + memset(log, 0, sizeof(log)); + b = BIO_new(BIO_s_mem()); + sk = SSL_get_peer_cert_chain(ssl); + if (sk) + { + DBG("CERTIFICATES:"); + for (x = 0; x < sk_X509_num(sk); x++) + { + p = X509_NAME_oneline(X509_get_subject_name(sk_X509_value(sk, x)), log, sizeof(log)); + DBG("%2d s:%s", x, p); + p = X509_NAME_oneline(X509_get_issuer_name(sk_X509_value(sk, x)), log, sizeof(log)); + DBG(" i:%s", p); + PEM_write_X509(stderr, sk_X509_value(sk, x)); + } + } + s = SSL_get_session(ssl); + SSL_SESSION_print(b, s); + fprintf(stderr, "\n"); + while (BIO_read(b, log, sizeof(log)) > 0) + fprintf(stderr, "%s", log); + + BIO_free(b); +} + #endif #define SSL_ERROR_CHECK_GOTO_ERROR(X) \ @@ -356,6 +602,51 @@ ecore_con_ssl_server_verify_basic(Ecore_Con_Server *svr) } /** + * @brief Set the hostname to verify against in certificate verification + * + * Sometimes the certificate hostname will not match the hostname that you are + * connecting to, and will instead match a different name. An example of this is + * that if you connect to talk.google.com to use Google Talk, you receive Google's + * certificate for gmail.com. This certificate should be trusted, and so you must call + * this function with "gmail.com" as @p name. + * See RFC2818 for more details. + * @param svr The server object + * @param name The hostname to verify against + * @since 1.2 + */ +EAPI void +ecore_con_ssl_server_verify_name_set(Ecore_Con_Server *svr, const char *name) +{ + if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_CON_SERVER)) + { + ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER, __func__); + return; + } + eina_stringshare_replace(&svr->verify_name, name); +} + +/** + * @brief Get the hostname to verify against in certificate verification + * + * This function returns the name which will be used to validate the SSL certificate + * common name (CN) or alt name (subjectAltName). It will default to the @p name + * param in ecore_con_server_connect(), but can be changed with ecore_con_ssl_server_verify_name_set(). + * @param svr The server object + * @return The hostname which will be used + * @since 1.2 + */ +EAPI const char * +ecore_con_ssl_server_verify_name_get(Ecore_Con_Server *svr) +{ + if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_CON_SERVER)) + { + ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER, __func__); + return NULL; + } + return svr->verify_name ?: svr->name; +} + +/** * @brief Add an ssl certificate for use in ecore_con functions. * * Use this function to add a SSL PEM certificate. @@ -375,6 +666,14 @@ ecore_con_ssl_server_cert_add(Ecore_Con_Server *svr, return EINA_FALSE; } + if (!svr->ssl_prepared) + { + svr->use_cert = EINA_TRUE; + svr->type |= ECORE_CON_USE_MIXED | ECORE_CON_LOAD_CERT; + if (ecore_con_ssl_server_prepare(svr, svr->type & ECORE_CON_SSL)) + return EINA_FALSE; + } + return SSL_SUFFIX(_ecore_con_ssl_server_cert_add) (svr, cert); } @@ -386,6 +685,7 @@ ecore_con_ssl_server_cert_add(Ecore_Con_Server *svr, * If there is an error loading the CAs, an error will automatically be logged. * @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 */ EAPI Eina_Bool @@ -398,6 +698,14 @@ ecore_con_ssl_server_cafile_add(Ecore_Con_Server *svr, return EINA_FALSE; } + if (!svr->ssl_prepared) + { + svr->use_cert = EINA_TRUE; + svr->type |= ECORE_CON_USE_MIXED | ECORE_CON_LOAD_CERT; + if (ecore_con_ssl_server_prepare(svr, svr->type & ECORE_CON_SSL)) + return EINA_FALSE; + } + return SSL_SUFFIX(_ecore_con_ssl_server_cafile_add) (svr, ca_file); } @@ -422,6 +730,14 @@ ecore_con_ssl_server_privkey_add(Ecore_Con_Server *svr, return EINA_FALSE; } + if (!svr->ssl_prepared) + { + svr->use_cert = EINA_TRUE; + svr->type |= ECORE_CON_USE_MIXED | ECORE_CON_LOAD_CERT; + if (ecore_con_ssl_server_prepare(svr, svr->type & ECORE_CON_SSL)) + return EINA_FALSE; + } + return SSL_SUFFIX(_ecore_con_ssl_server_privkey_add) (svr, key_file); } @@ -446,6 +762,14 @@ ecore_con_ssl_server_crl_add(Ecore_Con_Server *svr, return EINA_FALSE; } + if (!svr->ssl_prepared) + { + svr->use_cert = EINA_TRUE; + svr->type |= ECORE_CON_USE_MIXED | ECORE_CON_LOAD_CERT; + if (ecore_con_ssl_server_prepare(svr, svr->type & ECORE_CON_SSL)) + return EINA_FALSE; + } + return SSL_SUFFIX(_ecore_con_ssl_server_crl_add) (svr, crl_file); } @@ -480,7 +804,8 @@ ecore_con_ssl_server_upgrade(Ecore_Con_Server *svr, Ecore_Con_Type ssl_type) if (ecore_con_ssl_server_prepare(svr, ssl_type)) return EINA_FALSE; } - svr->type |= ssl_type; + if (!svr->use_cert) + svr->type |= ssl_type; svr->upgrade = EINA_TRUE; svr->handshaking = EINA_TRUE; svr->ssl_state = ECORE_CON_SSL_STATE_INIT; @@ -494,7 +819,7 @@ ecore_con_ssl_server_upgrade(Ecore_Con_Server *svr, Ecore_Con_Type ssl_type) * Once the upgrade has been completed, an ECORE_CON_EVENT_CLIENT_UPGRADE event will be emitted. * The connection should be treated as disconnected until the next event. * @param cl The client object - * @param compl_type The SSL connection type (ONLY). + * @param ssl_type The SSL connection type (ONLY). * @return EINA_FALSE if the connection cannot be upgraded, otherwise EINA_TRUE. * @warning Setting a wrong value for @p compl_type WILL mess up your program. * @since 1.1 @@ -517,7 +842,8 @@ ecore_con_ssl_client_upgrade(Ecore_Con_Client *cl, Ecore_Con_Type ssl_type) if (ecore_con_ssl_server_prepare(cl->host_server, ssl_type)) return EINA_FALSE; } - cl->host_server->type |= ssl_type; + if (!cl->host_server->use_cert) + cl->host_server->type |= ssl_type; cl->upgrade = EINA_TRUE; cl->host_server->upgrade = EINA_TRUE; cl->handshaking = EINA_TRUE; @@ -546,8 +872,11 @@ _ecore_con_ssl_init_gnutls(void) return ECORE_CON_SSL_ERROR_INIT_FAILED; #ifdef ISCOMFITOR - gnutls_global_set_log_level(9); - gnutls_global_set_log_function(_gnutls_log_func); + if (eina_log_domain_level_check(_ecore_con_log_dom, EINA_LOG_LEVEL_DBG)) + { + gnutls_global_set_log_level(9); + gnutls_global_set_log_function(_gnutls_log_func); + } #endif return ECORE_CON_SSL_ERROR_NONE; } @@ -728,10 +1057,12 @@ _ecore_con_ssl_server_init_gnutls(Ecore_Con_Server *svr) SSL_ERROR_CHECK_GOTO_ERROR(!(cert_list = gnutls_certificate_get_peers(svr->session, &cert_list_size))); SSL_ERROR_CHECK_GOTO_ERROR(!cert_list_size); + _gnutls_print_session(cert_list, cert_list_size); + SSL_ERROR_CHECK_GOTO_ERROR(gnutls_x509_crt_init(&cert)); SSL_ERROR_CHECK_GOTO_ERROR(gnutls_x509_crt_import(cert, &cert_list[0], GNUTLS_X509_FMT_DER)); - SSL_ERROR_CHECK_GOTO_ERROR(!gnutls_x509_crt_check_hostname(cert, svr->name)); + SSL_ERROR_CHECK_GOTO_ERROR(!gnutls_x509_crt_check_hostname(cert, svr->verify_name ?: svr->name)); gnutls_x509_crt_deinit(cert); DBG("SSL certificate verification succeeded!"); return ECORE_CON_SSL_ERROR_NONE; @@ -755,10 +1086,32 @@ static Eina_Bool _ecore_con_ssl_server_cafile_add_gnutls(Ecore_Con_Server *svr, const char *ca_file) { - SSL_ERROR_CHECK_GOTO_ERROR(gnutls_certificate_set_x509_trust_file(svr->cert, ca_file, - GNUTLS_X509_FMT_PEM) < 1); + struct stat st; + Eina_Iterator *it; + const char *file; + Eina_Bool error = EINA_FALSE; - return EINA_TRUE; + if (stat(ca_file, &st)) return EINA_FALSE; + if (S_ISDIR(st.st_mode)) + { + it = eina_file_ls(ca_file); + SSL_ERROR_CHECK_GOTO_ERROR(!it); + EINA_ITERATOR_FOREACH(it, file) + { + if (!error) + { + if (gnutls_certificate_set_x509_trust_file(svr->cert, file, GNUTLS_X509_FMT_PEM) < 1) + error++; + } + eina_stringshare_del(file); + } + eina_iterator_free(it); + } + else + SSL_ERROR_CHECK_GOTO_ERROR(gnutls_certificate_set_x509_trust_file(svr->cert, ca_file, + GNUTLS_X509_FMT_PEM) < 1); + + return !error; error: ERR("Could not load CA file!"); return EINA_FALSE; @@ -1026,6 +1379,7 @@ _ecore_con_ssl_client_init_gnutls(Ecore_Con_Client *cl) SSL_ERROR_CHECK_GOTO_ERROR(!(cert_list = gnutls_certificate_get_peers(cl->session, &cert_list_size))); SSL_ERROR_CHECK_GOTO_ERROR(!cert_list_size); + _gnutls_print_session(cert_list, cert_list_size); /* gnutls_x509_crt_t cert = NULL; SSL_ERROR_CHECK_GOTO_ERROR(gnutls_x509_crt_init(&cert)); @@ -1282,23 +1636,7 @@ _ecore_con_ssl_server_init_openssl(Ecore_Con_Server *svr) break; } -#ifdef ISCOMFITOR - { - /* print session info into DBG */ - SSL_SESSION *s; - BIO *b; - char log[4096]; - - memset(log, 0, sizeof(log)); - s = SSL_get_session(svr->ssl); - b = BIO_new(BIO_s_mem()); - SSL_SESSION_print(b, s); - while (BIO_read(b, log, sizeof(log)) > 0) - DBG("%s", log); - - BIO_free(b); - } -#endif + _openssl_print_session(svr->ssl); if ((!svr->verify) && (!svr->verify_basic)) /* not verifying certificates, so we're done! */ return ECORE_CON_SSL_ERROR_NONE; @@ -1310,17 +1648,29 @@ _ecore_con_ssl_server_init_openssl(Ecore_Con_Server *svr) cert = SSL_get_peer_certificate(svr->ssl); if (cert) { - char buf[256] = {0}; + char *c; + int clen; + int name = 0; + if (svr->verify) - SSL_ERROR_CHECK_GOTO_ERROR(SSL_get_verify_result(svr->ssl)); - X509_NAME_get_text_by_NID(X509_get_subject_name(cert), NID_subject_alt_name, buf, sizeof(buf)); - if (buf[0]) - SSL_ERROR_CHECK_GOTO_ERROR(!_openssl_name_verify(buf, svr->name)); - else { - X509_NAME_get_text_by_NID(X509_get_subject_name(cert), NID_commonName, buf, sizeof(buf)); - SSL_ERROR_CHECK_GOTO_ERROR(!_openssl_name_verify(buf, svr->name)); + int err; + + err = SSL_get_verify_result(svr->ssl); + _openssl_print_verify_error(err); + SSL_ERROR_CHECK_GOTO_ERROR(err); } + clen = X509_NAME_get_text_by_NID(X509_get_subject_name(cert), NID_subject_alt_name, NULL, 0); + if (clen > 0) + name = NID_subject_alt_name; + else + clen = X509_NAME_get_text_by_NID(X509_get_subject_name(cert), NID_commonName, NULL, 0); + SSL_ERROR_CHECK_GOTO_ERROR(clen < 1); + if (!name) name = NID_commonName; + c = alloca(++clen); + X509_NAME_get_text_by_NID(X509_get_subject_name(cert), name, c, clen); + INF("CERT NAME: %s\n", c); + SSL_ERROR_CHECK_GOTO_ERROR(!_openssl_name_verify(c, svr->verify_name ?: svr->name)); } } @@ -1338,7 +1688,13 @@ static Eina_Bool _ecore_con_ssl_server_cafile_add_openssl(Ecore_Con_Server *svr, const char *ca_file) { - SSL_ERROR_CHECK_GOTO_ERROR(!SSL_CTX_load_verify_locations(svr->ssl_ctx, ca_file, NULL)); + struct stat st; + + if (stat(ca_file, &st)) return EINA_FALSE; + if (S_ISDIR(st.st_mode)) + SSL_ERROR_CHECK_GOTO_ERROR(!SSL_CTX_load_verify_locations(svr->ssl_ctx, NULL, ca_file)); + else + SSL_ERROR_CHECK_GOTO_ERROR(!SSL_CTX_load_verify_locations(svr->ssl_ctx, ca_file, NULL)); return EINA_TRUE; error: @@ -1543,31 +1899,20 @@ _ecore_con_ssl_client_init_openssl(Ecore_Con_Client *cl) break; } -#ifdef ISCOMFITOR - { - /* print session info into DBG */ - SSL_SESSION *s; - BIO *b; - char log[4096]; - - memset(log, 0, sizeof(log)); - s = SSL_get_session(cl->ssl); - b = BIO_new(BIO_s_mem()); - SSL_SESSION_print(b, s); - while (BIO_read(b, log, sizeof(log)) > 0) - DBG("%s", log); - - BIO_free(b); - } -#endif - + _openssl_print_session(cl->ssl); if (!cl->host_server->verify) /* not verifying certificates, so we're done! */ return ECORE_CON_SSL_ERROR_NONE; SSL_set_verify(cl->ssl, SSL_VERIFY_PEER, NULL); /* use CRL/CA lists to verify */ if (SSL_get_peer_certificate(cl->ssl)) - SSL_ERROR_CHECK_GOTO_ERROR(SSL_get_verify_result(cl->ssl)); + { + int err; + + err = SSL_get_verify_result(cl->ssl); + _openssl_print_verify_error(err); + SSL_ERROR_CHECK_GOTO_ERROR(err); + } return ECORE_CON_SSL_ERROR_NONE; @@ -1679,12 +2024,6 @@ _ecore_con_ssl_server_prepare_none(Ecore_Con_Server *svr __UNUSED__, } static Ecore_Con_Ssl_Error -_ecore_con_ssl_server_upgrade_none(Ecore_Con_Server *svr __UNUSED__) -{ - return ECORE_CON_SSL_ERROR_NOT_SUPPORTED; -} - -static Ecore_Con_Ssl_Error _ecore_con_ssl_server_init_none(Ecore_Con_Server *svr __UNUSED__) { return ECORE_CON_SSL_ERROR_NOT_SUPPORTED; @@ -1741,12 +2080,6 @@ _ecore_con_ssl_server_write_none(Ecore_Con_Server *svr __UNUSED__, } static Ecore_Con_Ssl_Error -_ecore_con_ssl_client_upgrade_none(Ecore_Con_Client *cl __UNUSED__) -{ - return ECORE_CON_SSL_ERROR_NOT_SUPPORTED; -} - -static Ecore_Con_Ssl_Error _ecore_con_ssl_client_init_none(Ecore_Con_Client *cl __UNUSED__) { return ECORE_CON_SSL_ERROR_NOT_SUPPORTED; 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 cfcf095..709b554 100644 --- a/libraries/ecore/src/lib/ecore_con/ecore_con_url.c +++ b/libraries/ecore/src/lib/ecore_con/ecore_con_url.c @@ -35,8 +35,6 @@ int ECORE_CON_EVENT_URL_COMPLETE = 0; int ECORE_CON_EVENT_URL_PROGRESS = 0; #ifdef HAVE_CURL -static Eina_Bool _ecore_con_url_fd_handler(void *data, - Ecore_Fd_Handler *fd_handler); 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, @@ -57,50 +55,18 @@ static size_t _ecore_con_url_read_cb(void *ptr, void *stream); static void _ecore_con_event_url_free(void *data __UNUSED__, void *ev); -static int _ecore_con_url_process_completed_jobs( - Ecore_Con_Url *url_con_to_match); 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 Eina_Bool _ecore_con_url_timeout_cb(void *data); -static Ecore_Idler *_fd_idler_handler = NULL; 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 Eina_Bool pipelining = EINA_FALSE; -typedef struct _Ecore_Con_Url_Event Ecore_Con_Url_Event; -struct _Ecore_Con_Url_Event -{ - int type; - void *ev; -}; - -static Eina_Bool -_url_complete_idler_cb(void *data) -{ - Ecore_Con_Url_Event *lev; - - lev = data; - ecore_event_add(lev->type, lev->ev, _ecore_con_event_url_free, NULL); - free(lev); - - return ECORE_CALLBACK_CANCEL; -} - -static void -_url_complete_push_event(int type, - void *ev) -{ - Ecore_Con_Url_Event *lev; - - lev = malloc(sizeof(Ecore_Con_Url_Event)); - lev->type = type; - lev->ev = ev; - - ecore_idler_add(_url_complete_idler_cb, lev); -} - #endif /** @@ -113,51 +79,30 @@ EAPI int ecore_con_url_init(void) { #ifdef HAVE_CURL - _init_count++; - - if (_init_count > 1) - return _init_count; + if (++_init_count > 1) return _init_count; - if (!ECORE_CON_EVENT_URL_DATA) - { - 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(); - } + 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(); if (!_curlm) { long ms; - FD_ZERO(&_current_fd_set); - if (curl_global_init(CURL_GLOBAL_ALL)) - { - while (_url_con_list) - ecore_con_url_free(eina_list_data_get(_url_con_list)); - return 0; - } + // curl_global_init() is not thread safe! + if (curl_global_init(CURL_GLOBAL_ALL)) return --_init_count; _curlm = curl_multi_init(); - if (!_curlm) - { - while (_url_con_list) - ecore_con_url_free(eina_list_data_get(_url_con_list)); - - _init_count--; - return 0; - } + if (!_curlm) return --_init_count; curl_multi_timeout(_curlm, &ms); - if (ms <= 0) - ms = 1000; + if (ms <= 0) ms = 100; - _curl_timeout = - ecore_timer_add((double)ms / 1000, _ecore_con_url_idler_handler, - (void *)0xACE); + _curl_timeout = ecore_timer_add((double)ms / 1000, _ecore_con_url_idler_handler, (void *)0xACE); ecore_timer_freeze(_curl_timeout); } - return 1; + return _init_count; #else return 0; #endif @@ -167,34 +112,31 @@ EAPI int ecore_con_url_shutdown(void) { #ifdef HAVE_CURL - if (!_init_count) - return 0; - - _init_count--; + if (_init_count == 0) return 0; - if (_init_count != 0) - return _init_count; - - if (_fd_idler_handler) - ecore_idler_del(_fd_idler_handler); - - _fd_idler_handler = NULL; - - if (_curl_timeout) - ecore_timer_del(_curl_timeout); - - _curl_timeout = NULL; + if (--_init_count == 0) + { + Ecore_Con_Url *con_url; + Ecore_Fd_Handler *fd_handler; - while (_url_con_list) - ecore_con_url_free(eina_list_data_get(_url_con_list)); + if (_curl_timeout) + { + ecore_timer_del(_curl_timeout); + _curl_timeout = NULL; + } - if (_curlm) - { - curl_multi_cleanup(_curlm); - _curlm = 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); - curl_global_cleanup(); + if (_curlm) + { + curl_multi_cleanup(_curlm); + _curlm = NULL; + } + curl_global_cleanup(); + } + return _init_count; #endif return 1; } @@ -237,7 +179,6 @@ ecore_con_url_new(const char *url) if (!url_con) return NULL; - url_con->fd = -1; url_con->write_fd = -1; url_con->curl_easy = curl_easy_init(); @@ -255,6 +196,24 @@ ecore_con_url_new(const char *url) return NULL; } + url_con->proxy_type = -1; + if (_ecore_con_proxy_global) + { + if (_ecore_con_proxy_global->ip) + { + 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", + _ecore_con_proxy_global->ip); + ecore_con_url_proxy_set(url_con, host); + } + } + ret = curl_easy_setopt(url_con->curl_easy, CURLOPT_ENCODING, "gzip,deflate"); if (ret != CURLE_OK) { @@ -344,43 +303,30 @@ ecore_con_url_free(Ecore_Con_Url *url_con) } ECORE_MAGIC_SET(url_con, ECORE_MAGIC_NONE); - if(url_con->fd != -1) - { - FD_CLR(url_con->fd, &_current_fd_set); - if (url_con->fd_handler) - ecore_main_fd_handler_del(url_con->fd_handler); - - url_con->fd = -1; - url_con->fd_handler = NULL; - } if (url_con->curl_easy) { - // FIXME: For an unknown reason, progress continue to arrive after destruction - // this prevent any further call to the callback. curl_easy_setopt(url_con->curl_easy, CURLOPT_PROGRESSFUNCTION, NULL); curl_easy_setopt(url_con->curl_easy, CURLOPT_NOPROGRESS, EINA_TRUE); - if (url_con->active) + if (eina_list_data_find(_url_con_list, url_con)) { - url_con->active = EINA_FALSE; - 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)); + 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); } curl_easy_cleanup(url_con->curl_easy); } + if (url_con->timer) ecore_timer_del(url_con->timer); - _url_con_list = eina_list_remove(_url_con_list, url_con); curl_slist_free_all(url_con->headers); EINA_LIST_FREE(url_con->additional_headers, s) free(s); EINA_LIST_FREE(url_con->response_headers, s) free(s); eina_stringshare_del(url_con->url); + if (url_con->post_data) free(url_con->post_data); free(url_con); #else return; @@ -415,8 +361,7 @@ ecore_con_url_url_set(Ecore_Con_Url *url_con, return EINA_FALSE; } - if (url_con->active) - return EINA_FALSE; + if (eina_list_data_find(_url_con_list, url_con)) return EINA_FALSE; eina_stringshare_replace(&url_con->url, url); @@ -660,7 +605,7 @@ _ecore_con_url_send(Ecore_Con_Url *url_con, #ifdef HAVE_CURL Eina_List *l; const char *s; - char tmp[256]; + char tmp[512]; if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) { @@ -668,8 +613,7 @@ _ecore_con_url_send(Ecore_Con_Url *url_con, return EINA_FALSE; } - if (url_con->active) - return EINA_FALSE; + if (eina_list_data_find(_url_con_list, url_con)) return EINA_FALSE; if (!url_con->url) return EINA_FALSE; @@ -684,16 +628,24 @@ _ecore_con_url_send(Ecore_Con_Url *url_con, if ((mode == MODE_POST) || (mode == MODE_AUTO)) { - if (data) + if (url_con->post_data) free(url_con->post_data); + url_con->post_data = NULL; + if ((data) && (length > 0)) { - if ((content_type) && (strlen(content_type) < 200)) + url_con->post_data = malloc(length); + if (url_con->post_data) { - snprintf(tmp, sizeof(tmp), "Content-Type: %s", content_type); - url_con->headers = curl_slist_append(url_con->headers, tmp); + memcpy(url_con->post_data, data, length); + if ((content_type) && (strlen(content_type) < 450)) + { + snprintf(tmp, sizeof(tmp), "Content-Type: %s", content_type); + url_con->headers = curl_slist_append(url_con->headers, tmp); + } + curl_easy_setopt(url_con->curl_easy, CURLOPT_POSTFIELDS, url_con->post_data); + curl_easy_setopt(url_con->curl_easy, CURLOPT_POSTFIELDSIZE, length); } - - curl_easy_setopt(url_con->curl_easy, CURLOPT_POSTFIELDS, data); - curl_easy_setopt(url_con->curl_easy, CURLOPT_POSTFIELDSIZE, length); + else + return EINA_FALSE; } else curl_easy_setopt(url_con->curl_easy, CURLOPT_POSTFIELDSIZE, 0); if (mode == MODE_POST) @@ -787,8 +739,7 @@ ecore_con_url_ftp_upload(Ecore_Con_Url *url_con, return EINA_FALSE; } - if (url_con->active) - return EINA_FALSE; + if (eina_list_data_find(_url_con_list, url_con)) return EINA_FALSE; if (!url_con->url) return EINA_FALSE; @@ -1021,8 +972,7 @@ ecore_con_url_verbose_set(Ecore_Con_Url *url_con, return; } - if (url_con->active) - return; + if (eina_list_data_find(_url_con_list, url_con)) return; if (!url_con->url) return; @@ -1047,8 +997,7 @@ ecore_con_url_ftp_use_epsv_set(Ecore_Con_Url *url_con, return; } - if (url_con->active) - return; + if (eina_list_data_find(_url_con_list, url_con)) return; if (!url_con->url) return; @@ -1085,8 +1034,7 @@ ecore_con_url_ssl_verify_peer_set(Ecore_Con_Url *url_con, return; } - if (url_con->active) - return; + if (eina_list_data_find(_url_con_list, url_con)) return; if (!url_con->url) return; @@ -1129,7 +1077,7 @@ ecore_con_url_ssl_ca_set(Ecore_Con_Url *url_con, const char *ca_path) return -1; } - if (url_con->active) return -1; + if (eina_list_data_find(_url_con_list, url_con)) return -1; if (!url_con->url) return -1; if (ca_path == NULL) res = curl_easy_setopt(url_con->curl_easy, CURLOPT_SSL_VERIFYPEER, 0); @@ -1148,58 +1096,180 @@ ecore_con_url_ssl_ca_set(Ecore_Con_Url *url_con, const char *ca_path) return res; } - -/** - * @} - */ - -#ifdef HAVE_CURL -static int -_ecore_con_url_suspend_fd_handler(void) +EAPI Eina_Bool +ecore_con_url_proxy_set(Ecore_Con_Url *url_con, const char *proxy) { - Eina_List *l; - Ecore_Con_Url *url_con; - int deleted = 0; +#ifdef HAVE_CURL + int res = -1; + curl_version_info_data *vers = NULL; - if (!_url_con_list) - return 0; + if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL)) + { + ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, "ecore_con_url_proxy_set"); + return EINA_FALSE; + } - EINA_LIST_FOREACH(_url_con_list, l, url_con) + if (eina_list_data_find(_url_con_list, url_con)) return EINA_FALSE; + if (!url_con->url) return EINA_FALSE; + + if (!proxy) res = curl_easy_setopt(url_con->curl_easy, CURLOPT_PROXY, ""); + else { - if (url_con->active && url_con->fd_handler) + // before curl version 7.21.7, socks protocol:// prefix is not supported + // (e.g. socks4://, socks4a://, socks5:// or socks5h://, etc.) + vers = curl_version_info(CURLVERSION_NOW); + if (vers->version_num < 0x71507) { - ecore_main_fd_handler_del(url_con->fd_handler); - url_con->fd_handler = NULL; - deleted++; + 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 (res != CURLE_OK) + { + ERR("curl proxy type setting failed: %s", curl_easy_strerror(res)); + url_con->proxy_type = -1; + return EINA_FALSE; + } } + res = curl_easy_setopt(url_con->curl_easy, CURLOPT_PROXY, proxy); + } + if (res != CURLE_OK) + { + ERR("curl proxy setting failed: %s", curl_easy_strerror(res)); + url_con->proxy_type = -1; + return EINA_FALSE; + } + return EINA_TRUE; +#else + return EINA_FALSE; + (void)url_con; + (void)proxy; +#endif +} + +EAPI void +ecore_con_url_timeout_set(Ecore_Con_Url *url_con, double timeout) +{ +#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_timeout_set"); + return; } - return deleted; + if (eina_list_data_find(_url_con_list, url_con)) 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); +#else + return; + (void)url_con; + (void)timeout; +#endif } -static int -_ecore_con_url_restart_fd_handler(void) +EAPI Eina_Bool +ecore_con_url_proxy_username_set(Ecore_Con_Url *url_con, const char *username) { - Eina_List *l; - Ecore_Con_Url *url_con; - int activated = 0; +#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_proxy_username_set"); + return EINA_FALSE; + } - if (!_url_con_list) - return 0; + if (eina_list_data_find(_url_con_list, url_con)) return EINA_FALSE; + if (!url_con->url) return EINA_FALSE; + if (!username) return EINA_FALSE; + if (url_con->proxy_type == CURLPROXY_SOCKS4 || url_con->proxy_type == CURLPROXY_SOCKS4A) + { + ERR("Proxy type should be socks5 and above"); + return EINA_FALSE; + } - EINA_LIST_FOREACH(_url_con_list, l, url_con) + res = curl_easy_setopt(url_con->curl_easy, CURLOPT_USERNAME, username); + if (res != CURLE_OK) { - if (!url_con->fd_handler && url_con->fd != -1) - { - url_con->fd_handler = - ecore_main_fd_handler_add(url_con->fd, url_con->flags, - _ecore_con_url_fd_handler, - NULL, NULL, NULL); - activated++; - } + ERR("curl_easy_setopt() failed: %s", curl_easy_strerror(res)); + return EINA_FALSE; + } + return EINA_TRUE; +#else + return EINA_FALSE; + (void)url_con; + (void)username; +#endif +} + +EAPI Eina_Bool +ecore_con_url_proxy_password_set(Ecore_Con_Url *url_con, const char *password) +{ +#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_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 (!password) return EINA_FALSE; + if (url_con->proxy_type == CURLPROXY_SOCKS4 || url_con->proxy_type == CURLPROXY_SOCKS4A) + { + ERR("Proxy type should be socks5 and above"); + return EINA_FALSE; + } + + res = curl_easy_setopt(url_con->curl_easy, CURLOPT_PASSWORD, password); + if (res != CURLE_OK) + { + ERR("curl_easy_setopt() failed: %s", curl_easy_strerror(res)); + return EINA_FALSE; } + return EINA_TRUE; +#else + return EINA_FALSE; + (void)url_con; + (void)password; +#endif +} + +/** + * @} + */ - return activated; +#ifdef HAVE_CURL +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)); + _url_con_list = eina_list_remove(_url_con_list, url_con); + + curl_slist_free_all(url_con->headers); + url_con->headers = NULL; + + 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); + } + return ECORE_CALLBACK_CANCEL; } static size_t @@ -1235,8 +1305,7 @@ _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); + ecore_event_add(ECORE_CON_EVENT_URL_DATA, e, _ecore_con_event_url_free, NULL); } } else @@ -1266,22 +1335,6 @@ _ecore_con_url_data_cb(void *buffer, return real_size; } -#define ECORE_CON_URL_TRANSMISSION(Transmit, Event, Url_con, Total, Now) \ - { \ - Ecore_Con_Event_Url_Progress *e; \ - if ((Total != 0) || (Now != 0)) \ - { \ - e = calloc(1, sizeof(Ecore_Con_Event_Url_Progress)); \ - if (e) \ - { \ - e->url_con = url_con; \ - e->total = Total; \ - e->now = Now; \ - ecore_event_add(Event, e, _ecore_con_event_url_free, NULL); \ - } \ - } \ - } - static size_t _ecore_con_url_header_cb(void *ptr, size_t size, @@ -1324,8 +1377,7 @@ _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); + ecore_event_add(ECORE_CON_EVENT_URL_PROGRESS, e, _ecore_con_event_url_free, NULL); } return 0; @@ -1358,208 +1410,196 @@ _ecore_con_url_read_cb(void *ptr, return retcode; } -static Eina_Bool -_ecore_con_url_perform(Ecore_Con_Url *url_con) +static void +_ecore_con_url_info_read(void) { - fd_set read_set, write_set, exc_set; - int fd_max, fd; - int flags, still_running; - int completed_immediately = 0; - CURLMcode ret; - - _url_con_list = eina_list_append(_url_con_list, url_con); - - url_con->active = EINA_TRUE; - curl_multi_add_handle(_curlm, url_con->curl_easy); - curl_multi_perform(_curlm, &still_running); - - completed_immediately = _ecore_con_url_process_completed_jobs(url_con); + CURLMsg *curlmsg; + int n_remaining; - if (!completed_immediately) + while ((curlmsg = curl_multi_info_read(_curlm, &n_remaining))) { - if (url_con->fd_handler) - ecore_main_fd_handler_del(url_con->fd_handler); - - url_con->fd_handler = NULL; - - /* url_con still active -- set up an fd_handler */ - FD_ZERO(&read_set); - FD_ZERO(&write_set); - FD_ZERO(&exc_set); - - /* Stupid curl, why can't I get the fd to the current added job? */ - ret = curl_multi_fdset(_curlm, &read_set, &write_set, &exc_set, - &fd_max); - if (ret != CURLM_OK) + if (curlmsg->msg == CURLMSG_DONE) { - ERR("curl_multi_fdset failed: %s", curl_multi_strerror(ret)); - return EINA_FALSE; - } + Eina_List *l, *ll; + Ecore_Con_Url *url_con; - for (fd = 0; fd <= fd_max; fd++) - { - if (!FD_ISSET(fd, &_current_fd_set)) + EINA_LIST_FOREACH_SAFE(_url_con_list, l, ll, url_con) { - flags = 0; - if (FD_ISSET(fd, &read_set)) - flags |= ECORE_FD_READ; - - if (FD_ISSET(fd, &write_set)) - flags |= ECORE_FD_WRITE; + if (curlmsg->easy_handle == url_con->curl_easy) + { + CURLMcode ret; + Ecore_Con_Event_Url_Complete *e; - if (FD_ISSET(fd, &exc_set)) - flags |= ECORE_FD_ERROR; + 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); + } - if (flags) - { - long ms = 0; - - ret = curl_multi_timeout(_curlm, &ms); - if (ret != CURLM_OK) - ERR("curl_multi_timeout failed: %s", - curl_multi_strerror(ret)); - - if (ms == 0) - ms = 1000; - - FD_SET(fd, &_current_fd_set); - url_con->fd = fd; - url_con->flags = flags; - url_con->fd_handler = - ecore_main_fd_handler_add(fd, flags, - _ecore_con_url_fd_handler, - NULL, NULL, 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; } } } - if (!url_con->fd_handler) - { - /* Failed to set up an fd_handler */ - ecore_timer_freeze(_curl_timeout); - - 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->active = EINA_FALSE; - url_con->fd = -1; - return EINA_FALSE; - } - - ecore_timer_thaw(_curl_timeout); } - - return EINA_TRUE; } -static Eina_Bool -_ecore_con_url_idler_handler(void *data) +static void +_ecore_con_url_curl_clear(void) { - int done, still_running; - - done = (curl_multi_perform(_curlm, &still_running) != CURLM_CALL_MULTI_PERFORM); - - _ecore_con_url_process_completed_jobs(NULL); + Ecore_Con_Url *url_con; - if (done) + FD_ZERO(&_current_fd_set); + if (_fd_hd_list) { - _ecore_con_url_restart_fd_handler(); - _fd_idler_handler = NULL; + 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); + } + } - if (!_url_con_list) - ecore_timer_freeze(_curl_timeout); + EINA_LIST_FREE(_url_con_list, url_con) + { + CURLMcode ret; + Ecore_Con_Event_Url_Complete *e; - return data == - (void *)0xACE ? ECORE_CALLBACK_RENEW : ECORE_CALLBACK_CANCEL; + 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)); } - - return ECORE_CALLBACK_RENEW; } static Eina_Bool -_ecore_con_url_fd_handler(void *data __UNUSED__, - Ecore_Fd_Handler *fd_handler __UNUSED__) +_ecore_con_url_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UNUSED__) { - _ecore_con_url_suspend_fd_handler(); - - if (!_fd_idler_handler) - _fd_idler_handler = ecore_idler_add( - _ecore_con_url_idler_handler, NULL); - + 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; } -static int -_ecore_con_url_process_completed_jobs(Ecore_Con_Url *url_con_to_match) +static void +_ecore_con_url_fdset(void) { - Eina_List *l; - Ecore_Con_Url *url_con; - Ecore_Con_Event_Url_Complete *e; - CURLMsg *curlmsg; CURLMcode ret; - int n_remaining; - int job_matched = 0; + fd_set read_set, write_set, exc_set; + int fd, fd_max; + Ecore_Fd_Handler *fd_handler; - /* Loop jobs and check if any are done */ - while ((curlmsg = curl_multi_info_read(_curlm, &n_remaining))) + FD_ZERO(&read_set); + FD_ZERO(&write_set); + FD_ZERO(&exc_set); + + ret = curl_multi_fdset(_curlm, &read_set, &write_set, &exc_set, &fd_max); + if (ret != CURLM_OK) { - if (curlmsg->msg != CURLMSG_DONE) - continue; + ERR("curl_multi_fdset failed: %s", curl_multi_strerror(ret)); + return; + } - /* find the job which is done */ - EINA_LIST_FOREACH(_url_con_list, l, url_con) + for (fd = 0; fd <= fd_max; fd++) + { + int flags = 0; + 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 (flags) { - if (curlmsg->easy_handle == url_con->curl_easy) + if (!FD_ISSET(fd, &_current_fd_set)) { - if (url_con_to_match && - (url_con == url_con_to_match)) - job_matched = 1; - - if(url_con->fd != -1) - { - FD_CLR(url_con->fd, &_current_fd_set); - if (url_con->fd_handler) - ecore_main_fd_handler_del( - url_con->fd_handler); + 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); + } + } + } +} - url_con->fd = -1; - url_con->fd_handler = NULL; - } +static Eina_Bool +_ecore_con_url_idler_handler(void *data __UNUSED__) +{ + int still_running; + CURLMcode ret; - _url_con_list = eina_list_remove(_url_con_list, url_con); - url_con->active = EINA_FALSE; - 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 */ + ret = curl_multi_perform(_curlm, &still_running); + if (ret == CURLM_CALL_MULTI_PERFORM) + { + DBG("Call multiperform again"); + 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; + } - status = 0; - curl_easy_getinfo(curlmsg->easy_handle, - CURLINFO_RESPONSE_CODE, - &status); - e->status = status; - } + _ecore_con_url_info_read(); + if (still_running) + { + DBG("multiperform is still_running"); + _ecore_con_url_fdset(); + } + else + { + DBG("multiperform ended"); + _ecore_con_url_curl_clear(); + ecore_timer_freeze(_curl_timeout); + } - _url_complete_push_event(ECORE_CON_EVENT_URL_COMPLETE, e); - } + return ECORE_CALLBACK_RENEW; +} - 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)); +static Eina_Bool +_ecore_con_url_perform(Ecore_Con_Url *url_con) +{ + CURLMcode ret; - break; - } - } + ret = curl_multi_add_handle(_curlm, url_con->curl_easy); + if (ret != CURLM_OK) + { + ERR("curl_multi_add_handle() failed: %s", curl_multi_strerror(ret)); + return EINA_FALSE; } - return job_matched; + _url_con_list = eina_list_append(_url_con_list, url_con); + ecore_timer_thaw(_curl_timeout); + + return EINA_TRUE; } static void diff --git a/libraries/ecore/src/lib/ecore_config/Makefile.in b/libraries/ecore/src/lib/ecore_config/Makefile.in index 1732a34..6870d44 100644 --- a/libraries/ecore/src/lib/ecore_config/Makefile.in +++ b/libraries/ecore/src/lib/ecore_config/Makefile.in @@ -260,10 +260,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -282,6 +282,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -395,6 +399,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -407,6 +413,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -451,12 +459,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_directfb/Makefile.in b/libraries/ecore/src/lib/ecore_directfb/Makefile.in index 51d113f..b7e1d29 100644 --- a/libraries/ecore/src/lib/ecore_directfb/Makefile.in +++ b/libraries/ecore/src/lib/ecore_directfb/Makefile.in @@ -245,10 +245,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -267,6 +267,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -380,6 +384,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -392,6 +398,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -436,12 +444,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_directfb/ecore_directfb.c b/libraries/ecore/src/lib/ecore_directfb/ecore_directfb.c index f45b3c3..7c56b5d 100644 --- a/libraries/ecore/src/lib/ecore_directfb/ecore_directfb.c +++ b/libraries/ecore/src/lib/ecore_directfb/ecore_directfb.c @@ -80,7 +80,7 @@ _ecore_directfb_event_free_key_down(void *data __UNUSED__, void *ev) free(e->key_compose); free(e); -} /* _ecore_directfb_event_free_key_down */ +} static void _ecore_directfb_event_free_key_up(void *data __UNUSED__, void *ev) @@ -98,7 +98,7 @@ _ecore_directfb_event_free_key_up(void *data __UNUSED__, void *ev) free(e->key_compose); free(e); -} /* _ecore_directfb_event_free_key_up */ +} /* directfb window input events handler */ /****************************************/ @@ -131,7 +131,7 @@ _ecore_directfb_event_handle_motion(DFBEvent *evt) default: return; - } /* switch */ + } e->win = _ecore_directfb_fullscreen_window_id; e->time = 0; break; @@ -146,9 +146,9 @@ _ecore_directfb_event_handle_motion(DFBEvent *evt) default: break; - } /* switch */ + } ecore_event_add(ECORE_DIRECTFB_EVENT_MOTION, e, NULL, NULL); -} /* _ecore_directfb_event_handle_motion */ +} static void _ecore_directfb_event_handle_key_down(DFBEvent *evt) @@ -197,10 +197,10 @@ _ecore_directfb_event_handle_key_down(DFBEvent *evt) default: break; - } /* switch */ + } ecore_event_add(ECORE_DIRECTFB_EVENT_KEY_DOWN, e, _ecore_directfb_event_free_key_down, NULL); -} /* _ecore_directfb_event_handle_key_down */ +} static void _ecore_directfb_event_handle_key_up(DFBEvent *evt) @@ -249,9 +249,9 @@ _ecore_directfb_event_handle_key_up(DFBEvent *evt) default: break; - } /* switch */ + } ecore_event_add(ECORE_DIRECTFB_EVENT_KEY_UP, e, _ecore_directfb_event_free_key_up, NULL); -} /* _ecore_directfb_event_handle_key_up */ +} static void _ecore_directfb_event_handle_button_down(DFBEvent *evt) @@ -283,10 +283,10 @@ _ecore_directfb_event_handle_button_down(DFBEvent *evt) default: break; - } /* switch */ + } ecore_event_add(ECORE_DIRECTFB_EVENT_BUTTON_DOWN, e, NULL, NULL); -} /* _ecore_directfb_event_handle_button_down */ +} static void _ecore_directfb_event_handle_button_up(DFBEvent *evt) @@ -317,9 +317,9 @@ _ecore_directfb_event_handle_button_up(DFBEvent *evt) default: break; - } /* switch */ + } ecore_event_add(ECORE_DIRECTFB_EVENT_BUTTON_UP, e, NULL, NULL); -} /* _ecore_directfb_event_handle_button_up */ +} static void _ecore_directfb_event_handle_enter(DFBWindowEvent *evt) @@ -334,7 +334,7 @@ _ecore_directfb_event_handle_enter(DFBWindowEvent *evt) e->time = 0; ecore_event_add(ECORE_DIRECTFB_EVENT_ENTER, e, NULL, NULL); -} /* _ecore_directfb_event_handle_enter */ +} static void _ecore_directfb_event_handle_leave(DFBWindowEvent *evt) @@ -349,7 +349,7 @@ _ecore_directfb_event_handle_leave(DFBWindowEvent *evt) e->time = 0; ecore_event_add(ECORE_DIRECTFB_EVENT_LEAVE, e, NULL, NULL); -} /* _ecore_directfb_event_handle_leave */ +} static void _ecore_directfb_event_handle_wheel(DFBWindowEvent *evt) @@ -365,7 +365,7 @@ _ecore_directfb_event_handle_wheel(DFBWindowEvent *evt) e->time = 0; ecore_event_add(ECORE_DIRECTFB_EVENT_WHEEL, e, NULL, NULL); -} /* _ecore_directfb_event_handle_wheel */ +} static void _ecore_directfb_event_handle_got_focus(DFBWindowEvent *evt) @@ -377,7 +377,7 @@ _ecore_directfb_event_handle_got_focus(DFBWindowEvent *evt) e->time = 0; ecore_event_add(ECORE_DIRECTFB_EVENT_GOT_FOCUS, e, NULL, NULL); -} /* _ecore_directfb_event_handle_got_focus */ +} static void _ecore_directfb_event_handle_lost_focus(DFBWindowEvent *evt) @@ -389,7 +389,7 @@ _ecore_directfb_event_handle_lost_focus(DFBWindowEvent *evt) e->time = 0; ecore_event_add(ECORE_DIRECTFB_EVENT_LOST_FOCUS, e, NULL, NULL); -} /* _ecore_directfb_event_handle_lost_focus */ +} /* inputs and windows fds handlers */ /***********************************/ @@ -428,7 +428,7 @@ _ecore_directfb_input_event_fd_handler(void *data __UNUSED__,Ecore_Fd_Handler *f _ecore_directfb_event_handle_motion(&evt); return EINA_TRUE; -} /* _ecore_directfb_input_event_fd_handler */ +} static Eina_Bool _ecore_directfb_window_event_fd_handler(void *data __UNUSED__,Ecore_Fd_Handler *fd_handler __UNUSED__) @@ -486,7 +486,7 @@ _ecore_directfb_window_event_fd_handler(void *data __UNUSED__,Ecore_Fd_Handler * _ecore_directfb_event_handle_wheel(&evt.window); return EINA_TRUE; -} /* _ecore_directfb_window_event_fd_handler */ +} /* api functions */ /*****************/ @@ -495,7 +495,7 @@ EAPI IDirectFB * ecore_directfb_interface_get(void) { return _dfb; -} /* ecore_directfb_interface_get */ +} EAPI Ecore_DirectFB_Window * ecore_directfb_window_new(int x, int y, int w, int h) @@ -530,7 +530,7 @@ ecore_directfb_window_new(int x, int y, int w, int h) window->cursor = NULL; return window; -} /* ecore_directfb_window_new */ +} EAPI void ecore_directfb_window_free(Ecore_DirectFB_Window *ecore_window) @@ -538,37 +538,37 @@ ecore_directfb_window_free(Ecore_DirectFB_Window *ecore_window) DFBCHECK(ecore_window->surface->Release(ecore_window->surface)); DFBCHECK(ecore_window->window->Release(ecore_window->window)); free(ecore_window); -} /* ecore_directfb_window_free */ +} EAPI void ecore_directfb_window_move(Ecore_DirectFB_Window *ecore_window, int x, int y) { DFBCHECK(ecore_window->window->MoveTo(ecore_window->window, x, y)); -} /* ecore_directfb_window_move */ +} EAPI void ecore_directfb_window_resize(Ecore_DirectFB_Window *ecore_window, int w, int h) { DFBCHECK(ecore_window->window->Resize(ecore_window->window, w, h)); -} /* ecore_directfb_window_resize */ +} EAPI void ecore_directfb_window_focus(Ecore_DirectFB_Window *ecore_window) { DFBCHECK(ecore_window->window->RequestFocus(ecore_window->window)); -} /* ecore_directfb_window_focus */ +} EAPI void ecore_directfb_window_hide(Ecore_DirectFB_Window *ecore_window) { DFBCHECK(ecore_window->window->SetOpacity(ecore_window->window, 0)); -} /* ecore_directfb_window_hide */ +} EAPI void ecore_directfb_window_show(Ecore_DirectFB_Window *ecore_window) { DFBCHECK(ecore_window->window->SetOpacity(ecore_window->window, 0xFF)); -} /* ecore_directfb_window_show */ +} EAPI void ecore_directfb_window_shaped_set(Ecore_DirectFB_Window *ecore_window, Eina_Bool set) @@ -588,7 +588,7 @@ ecore_directfb_window_shaped_set(Ecore_DirectFB_Window *ecore_window, Eina_Bool opts &= ~DWOP_ALPHACHANNEL; DFBCHECK(ecore_window->window->SetOptions(ecore_window->window, opts)); } -} /* ecore_directfb_window_shaped_set */ +} EAPI void ecore_directfb_window_cursor_show(Ecore_DirectFB_Window *ecore_window, Eina_Bool show) @@ -622,7 +622,7 @@ ecore_directfb_window_cursor_show(Ecore_DirectFB_Window *ecore_window, Eina_Bool DFBCHECK(ecore_window->window->SetCursorShape(ecore_window->window, NULL, 0, 0)); } } -} /* ecore_directfb_window_cursor_show */ +} EAPI void ecore_directfb_window_cursor_set(Ecore_DirectFB_Window *ecore_window, Ecore_DirectFB_Cursor *cursor) @@ -639,7 +639,7 @@ ecore_directfb_window_cursor_set(Ecore_DirectFB_Window *ecore_window, Ecore_Dire ecore_window->cursor = cursor; DFBCHECK(ecore_window->window->SetCursorShape(ecore_window->window, cursor->surface, cursor->hot_x, cursor->hot_y)); } -} /* ecore_directfb_window_cursor_set */ +} EAPI void ecore_directfb_window_fullscreen_set(Ecore_DirectFB_Window *ecore_window, Eina_Bool on) @@ -666,14 +666,14 @@ ecore_directfb_window_fullscreen_set(Ecore_DirectFB_Window *ecore_window, Eina_B DFBCHECK(ecore_window->window->GetSurface(ecore_window->window, &ecore_window->surface)); _ecore_directfb_fullscreen_window_id = 0; } -} /* ecore_directfb_window_fullscreen_set */ +} EAPI void ecore_directfb_window_size_get(Ecore_DirectFB_Window *ecore_window, int *w, int *h) { DFBCHECK(ecore_window->surface->GetSize(ecore_window->surface,w,h)); return; -} /* ecore_directfb_window_size_get */ +} EAPI int ecore_directfb_init(const char *name __UNUSED__) @@ -730,7 +730,7 @@ ecore_directfb_init(const char *name __UNUSED__) } /* create the hash for the windows(key = windowid, val = Ecore_DirectFB_Window struct) */ return _ecore_directfb_init_count; -} /* ecore_directfb_init */ +} EAPI int ecore_directfb_shutdown(void) @@ -753,5 +753,5 @@ ecore_directfb_shutdown(void) eina_log_domain_unregister(_ecore_directfb_log_dom); _ecore_directfb_log_dom = -1; return _ecore_directfb_init_count; -} /* ecore_directfb_shutdown */ +} diff --git a/libraries/ecore/src/lib/ecore_evas/Ecore_Evas.h b/libraries/ecore/src/lib/ecore_evas/Ecore_Evas.h index 256e57c..8d9abc4 100644 --- a/libraries/ecore/src/lib/ecore_evas/Ecore_Evas.h +++ b/libraries/ecore/src/lib/ecore_evas/Ecore_Evas.h @@ -81,6 +81,8 @@ extern "C" { #define HAVE_ECORE_EVAS_WINCE 1 #define HAVE_ECORE_EVAS_EWS 1 #define HAVE_ECORE_EVAS_PSL1GHT 1 +#define HAVE_ECORE_EVAS_WAYLAND_SHM 1 +#define HAVE_ECORE_EVAS_WAYLAND_EGL 1 typedef enum _Ecore_Evas_Engine_Type { @@ -104,7 +106,9 @@ typedef enum _Ecore_Evas_Engine_Type ECORE_EVAS_ENGINE_SOFTWARE_16_WINCE, ECORE_EVAS_ENGINE_OPENGL_SDL, ECORE_EVAS_ENGINE_EWS, - ECORE_EVAS_ENGINE_PSL1GHT + ECORE_EVAS_ENGINE_PSL1GHT, + ECORE_EVAS_ENGINE_WAYLAND_SHM, + ECORE_EVAS_ENGINE_WAYLAND_EGL } Ecore_Evas_Engine_Type; typedef enum _Ecore_Evas_Avoid_Damage_Type @@ -689,6 +693,11 @@ 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 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); + /** * @brief Create a new @c Ecore_Evas canvas bound to the Evas * @b buffer engine @@ -818,7 +827,7 @@ EAPI void ecore_evas_ews_delete_request(Ecore_Evas *ee); /** * @brief Create an Evas image object with image data bound to an - * own, internal @c Ecore_Evas canvas wrapper + * own, internal @c Ecore_Evas canvas wrapper * * @param ee_target @c Ecore_Evas to have the canvas receiving the new * image object @@ -1320,7 +1329,7 @@ EAPI void ecore_evas_size_base_get(const Ecore_Evas *ee, int *w, int *h); * @param h The step height * * This function sets the size steps of @p ee to be @p w x @p h. This - * limits the size of this @cEcore_Evas window to be @b always an + * limits the size of this @c Ecore_Evas window to be @b always an * integer multiple of the step size, for each axis. */ EAPI void ecore_evas_size_step_set(Ecore_Evas *ee, int w, int h); @@ -1450,6 +1459,9 @@ EAPI Eina_Bool ecore_evas_comp_sync_get(const Ecore_Evas *ee); */ EAPI void ecore_evas_screen_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h); +EAPI void ecore_evas_draw_frame_set(Ecore_Evas *ee, Eina_Bool draw_frame); +EAPI Eina_Bool ecore_evas_draw_frame_get(const Ecore_Evas *ee); + /** * @brief Associate the given object to this ecore evas. * @@ -1625,29 +1637,238 @@ EAPI void ecore_evas_ews_manager_set(const void *manager); */ EAPI const void *ecore_evas_ews_manager_get(void); -EAPI extern int ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE; /**< manager was changed */ -EAPI extern int ECORE_EVAS_EWS_EVENT_ADD; /**< window was created */ -EAPI extern int ECORE_EVAS_EWS_EVENT_DEL; /**< window was deleted, pointer is already invalid but may be used as reference for further cleanup work. */ -EAPI extern int ECORE_EVAS_EWS_EVENT_RESIZE; /**< window was resized */ -EAPI extern int ECORE_EVAS_EWS_EVENT_MOVE; /**< window was moved */ -EAPI extern int ECORE_EVAS_EWS_EVENT_SHOW; /**< window become visible */ -EAPI extern int ECORE_EVAS_EWS_EVENT_HIDE; /**< window become hidden */ -EAPI extern int ECORE_EVAS_EWS_EVENT_FOCUS; /**< window was focused */ -EAPI extern int ECORE_EVAS_EWS_EVENT_UNFOCUS; /**< window lost focus */ -EAPI extern int ECORE_EVAS_EWS_EVENT_RAISE; /**< window was raised */ -EAPI extern int ECORE_EVAS_EWS_EVENT_LOWER; /**< window was lowered */ -EAPI extern int ECORE_EVAS_EWS_EVENT_ACTIVATE; /**< window was activated */ - -EAPI extern int ECORE_EVAS_EWS_EVENT_ICONIFIED_CHANGE; /**< window minimized/iconified changed */ -EAPI extern int ECORE_EVAS_EWS_EVENT_MAXIMIZED_CHANGE; /**< window maximized changed */ -EAPI extern int ECORE_EVAS_EWS_EVENT_LAYER_CHANGE; /**< window layer changed */ -EAPI extern int ECORE_EVAS_EWS_EVENT_FULLSCREEN_CHANGE; /**< window fullscreen changed */ -EAPI extern int ECORE_EVAS_EWS_EVENT_CONFIG_CHANGE; /**< some other window property changed (title, name, class, alpha, transparent, shaped...) */ +EAPI extern int ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE; /**< manager was changed @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_ADD; /**< window was created @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_DEL; /**< window was deleted, pointer is already invalid but may be used as reference for further cleanup work. @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_RESIZE; /**< window was resized @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_MOVE; /**< window was moved @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_SHOW; /**< window become visible @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_HIDE; /**< window become hidden @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_FOCUS; /**< window was focused @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_UNFOCUS; /**< window lost focus @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_RAISE; /**< window was raised @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_LOWER; /**< window was lowered @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_ACTIVATE; /**< window was activated @since 1.1 */ + +EAPI extern int ECORE_EVAS_EWS_EVENT_ICONIFIED_CHANGE; /**< window minimized/iconified changed @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_MAXIMIZED_CHANGE; /**< window maximized changed @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_LAYER_CHANGE; /**< window layer changed @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_FULLSCREEN_CHANGE; /**< window fullscreen changed @since 1.1 */ +EAPI extern int ECORE_EVAS_EWS_EVENT_CONFIG_CHANGE; /**< some other window property changed (title, name, class, alpha, transparent, shaped...) @since 1.1 */ /** * @} */ +/** + * @defgroup Ecore_Evas_Extn External plug/socket infrastructure to remote canvases + * + * These functions allow 1 process to create a "socket" was pluged into which another + * process can create a "plug" remotely to plug into. + * Socket can provides content for several plugs. + * This is best for small sized objects (about the size range + * of a small icon up to a few large icons). Sine the plug is actually an + * image object, you can fetch the pixel data + * + * @since 1.2 + * @{ + */ + +EAPI extern int ECORE_EVAS_EXTN_CLIENT_ADD; /**< this event is received when a plug has connected to an extn socket @since 1.2 */ +EAPI extern int ECORE_EVAS_EXTN_CLIENT_DEL; /**< this event is received when a plug has disconnected from an extn socket @since 1.2 */ + +/** + * @brief Create a new Ecore_Evas canvas for the new external ecore evas socket + * + * @param w The width of the canvas, in pixels + * @param h The height of the canvas, in pixels + * @return A new @c Ecore_Evas instance or @c NULL, on failure + * + * This creates a new extn_socket canvas wrapper, with image data array + * @b bound to the ARGB format, 8 bits per pixel. + * + * If creation is successful, an Ecore_Evas handle is returned or NULL if creation + * fails. Also focus, show, hide etc. callbacks + * will also be called if the plug object is shown, or already visible on + * connect, or if it is hidden later, focused or unfocused. + * + * This function has to be flowed by ecore_evas_extn_socket_listen(), + * for starting ecore ipc service. + * + * @code + * Eina_Bool res = EINA_FALSE; + * Ecore_Evas *ee = ecore_evas_extn_socket_new(1, 1); + * + * res = ecore_evas_extn_socket_listen("svcname", 1, EINA_FALSE); + * if (!res) return; + * ecore_evas_resize(ee, 240, 400); + * @endcode + * + * or + * + * @code + * Eina_Bool res = EINA_FALSE; + * Ecore_Evas *ee = ecore_evas_extn_socket_new(240, 400); + * + * res = ecore_evas_extn_socket_listen("svcname", 1, EINA_FALSE); + * if (!res) return; + * @endcode + * + * When a client(plug) connects, you will get the ECORE_EVAS_EXTN_CLIENT_ADD event + * in the ecore event queue, with event_info being the image object pointer + * passed as a void pointer. When a client disconnects you will get the + * ECORE_EVAS_EXTN_CLIENT_DEL event. + * + * You can set up event handles for these events as follows: + * + * @code + * static void client_add_cb(void *data, int event, void *event_info) + * { + * Evas_Object *obj = event_info; + * printf("client added to image object %p\n", obj); + * evas_object_show(obj); + * } + * + * static void client_del_cb(void *data, int event, void *event_info) + * { + * Evas_Object *obj = event_info; + * printf("client deleted from image object %p\n", obj); + * evas_object_hide(obj); + * } + * + * void setup(void) + * { + * ecore_event_handler_add(ECORE_EVAS_EXTN_CLIENT_ADD, + * client_add_cb, NULL); + * ecore_event_handler_add(ECORE_EVAS_EXTN_CLIENT_DEL, + * client_del_cb, NULL); + * } + * @endcode + * + * Note that events come in later after the event happened. You may want to be + * careful as data structures you had associated with the image object + * may have been freed after deleting, but the object may still be around + * awating cleanup and thus still be valid.You can change the size with something like: + * + * @see ecore_evas_extn_socket_listen() + * @see ecore_evas_extn_plug_new() + * @see ecore_evas_extn_plug_object_data_lock() + * @see ecore_evas_extn_plug_object_data_unlock() + * + * @since 1.2 + */ +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 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. + * @return EINA_TRUE if creation is successful, EINA_FALSE if it does not. + * + * This creates socket specified by @p svcname, @p svcnum and @p svcsys. If creation + * is successful, EINA_TRUE is returned or EINA_FALSE if creation + * fails. + * + * @see ecore_evas_extn_socket_new() + * @see ecore_evas_extn_plug_new() + * @see ecore_evas_extn_plug_object_data_lock() + * @see ecore_evas_extn_plug_object_data_unlock() + * + * @since 1.2 + */ +EAPI Eina_Bool ecore_evas_extn_socket_listen(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys); + +/** + * @brief Lock the pixel data so the socket cannot change it + * + * @param obj The image object returned by ecore_evas_extn_plug_new() to lock + * + * You may need to get the image pixel data with evas_object_image_data_get() + * from the image object, but need to ensure that it does not change while + * you are using the data. This function lets you set an advisory lock on the + * 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 + * 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 + * odd behavior. + * + * @see ecore_evas_extn_plug_new() + * @see ecore_evas_extn_plug_object_data_unlock() + * + * @since 1.2 + */ +EAPI void ecore_evas_extn_plug_object_data_lock(Evas_Object *obj); + +/** + * @brief Unlock the pixel data so the socket can change it again. + * + * @param obj The image object returned by ecore_evas_extn_plug_new() to unlock + * + * This unlocks after an advisor lock has been taken by + * ecore_evas_extn_plug_object_data_lock(). + * + * @see ecore_evas_extn_plug_new() + * @see ecore_evas_extn_plug_object_data_lock() + * + * @since 1.2 + */ +EAPI void ecore_evas_extn_plug_object_data_unlock(Evas_Object *obj); + +/** + * @brief Create a new external ecore evas plug + * + * @param ee_target The Ecore_Evas containing the canvas in which the new image object will live. + * @return An evas image object that will contain the image output of a socket. + * + * This creates an image object that will contain the output of another + * processes socket canvas when it connects. All input will be sent back to + * this process as well, effectively swallowing or placing the socket process + * 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 + * of the plug is the master size and determines size in pixels of the + * plug canvas. You can change the size with something like: + * + * @code + * Eina_Bool res = EINA_FALSE; + * Evas_Object *obj = ecore_evas_extn_plug_new(ee); + * + * res = ecore_evas_extn_plug_connect("svcname", 1, EINA_FALSE); + * if (!res) return; + * ecore_evas_resize(ee, 240, 400); + * @endcode + * + * @see ecore_evas_extn_socket_new() + * @see ecore_evas_extn_plug_connect() + * @since 1.2 + */ +EAPI Evas_Object *ecore_evas_extn_plug_new(Ecore_Evas *ee_target); + +/** + * @brief Connect a external ecore evas plug to service provided by external ecore evas socket + * + * @param obj The Ecore_Evas containing the canvas in which the new image object will live. + * @param svcname The service name to connect to set up by the socket. + * @param svcnum The service number to connect to (set up by socket). + * @param svcsys Booleain to set if the service is a system one or not (set up by socket). + * @return EINA_TRUE if creation is successful, EINA_FALSE if it does not. + * + * + * @see ecore_evas_extn_plug_new() + * + * @since 1.2 + */ +EAPI Eina_Bool ecore_evas_extn_plug_connect(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys); + +/** + * @} + */ /** * @} diff --git a/libraries/ecore/src/lib/ecore_evas/Makefile.am b/libraries/ecore/src/lib/ecore_evas/Makefile.am index fbb7190..a1d9215 100644 --- a/libraries/ecore/src/lib/ecore_evas/Makefile.am +++ b/libraries/ecore/src/lib/ecore_evas/Makefile.am @@ -1,8 +1,8 @@ MAINTAINERCLEANFILES = Makefile.in if BUILD_ECORE_X -ECORE_X_INC = -I$(top_srcdir)/src/lib/ecore_x @x_cflags@ @ECORE_XCB_CFLAGS@ -ECORE_X_LIB = $(top_builddir)/src/lib/ecore_x/libecore_x.la @x_libs@ @ECORE_XCB_LIBS@ +ECORE_X_INC = -I$(top_srcdir)/src/lib/ecore_x @x_cflags@ +ECORE_X_LIB = $(top_builddir)/src/lib/ecore_x/libecore_x.la @x_libs@ else ECORE_X_INC = ECORE_X_LIB = @@ -66,6 +66,24 @@ ECORE_PSL1GHT_INC = ECORE_PSL1GHT_LIB = endif +if BUILD_ECORE_WAYLAND +ECORE_WAYLAND_INC = -I$(top_srcdir)/src/lib/ecore_wayland @WAYLAND_CFLAGS@ +ECORE_WAYLAND_LIB = $(top_builddir)/src/lib/ecore_wayland/libecore_wayland.la +ECORE_WAYLAND_LIBADD = @WAYLAND_LIBS@ $(ECORE_WAYLAND_LIB) +else +ECORE_WAYLAND_INC = +ECORE_WAYLAND_LIB = +ECORE_WAYLAND_LIBADD = +endif + +if BUILD_ECORE_IPC +ECORE_IPC_INC= \ +-I$(top_srcdir)/src/lib/ecore_ipc \ +-I$(top_builddir)/src/lib/ecore_ipc + +ECORE_IPC_LIB=$(top_builddir)/src/lib/ecore_ipc/libecore_ipc.la +endif + AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib/ecore \ -I$(top_srcdir)/src/lib/ecore_evas \ @@ -84,9 +102,12 @@ $(ECORE_SDL_INC) \ $(ECORE_COCOA_INC) \ $(ECORE_WINCE_INC) \ $(ECORE_PSL1GHT_INC) \ +$(ECORE_WAYLAND_INC) \ +$(ECORE_IPC_INC) \ @EVAS_CFLAGS@ \ @EINA_CFLAGS@ \ -@EVIL_CFLAGS@ +@EVIL_CFLAGS@ \ +@WAYLAND_EGL_CFLAGS@ AM_CFLAGS = @WIN32_CFLAGS@ @@ -106,7 +127,10 @@ ecore_evas_sdl.c \ ecore_evas_cocoa.c \ ecore_evas_wince.c \ ecore_evas_ews.c \ -ecore_evas_psl1ght.c +ecore_evas_psl1ght.c \ +ecore_evas_wayland_shm.c \ +ecore_evas_wayland_egl.c \ +ecore_evas_extn.c libecore_evas_la_LIBADD = \ $(ECORE_X_LIB) \ @@ -117,13 +141,17 @@ $(ECORE_SDL_LIB) \ $(ECORE_SDL_LIBADD) \ $(ECORE_COCOA_LIB) \ $(ECORE_WINCE_LIB) \ +$(ECORE_IPC_LIB) \ $(ECORE_PSL1GHT_LIB) \ +$(ECORE_WAYLAND_LIB) \ +$(ECORE_WAYLAND_LIBADD) \ $(top_builddir)/src/lib/ecore_input/libecore_input.la \ $(top_builddir)/src/lib/ecore_input_evas/libecore_input_evas.la \ $(top_builddir)/src/lib/ecore/libecore.la \ @EVAS_LIBS@ \ @EINA_LIBS@ \ -@EVIL_LIBS@ +@EVIL_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 793e59d..a269b75 100644 --- a/libraries/ecore/src/lib/ecore_evas/Makefile.in +++ b/libraries/ecore/src/lib/ecore_evas/Makefile.in @@ -95,11 +95,15 @@ LTLIBRARIES = $(lib_LTLIBRARIES) @BUILD_ECORE_COCOA_TRUE@am__DEPENDENCIES_7 = $(top_builddir)/src/lib/ecore_cocoa/libecore_cocoa.la @BUILD_ECORE_WINCE_TRUE@am__DEPENDENCIES_8 = $(top_builddir)/src/lib/ecore_wince/libecore_wince.la @BUILD_ECORE_PSL1GHT_TRUE@am__DEPENDENCIES_9 = $(top_builddir)/src/lib/ecore_psl1ght/libecore_psl1ght.la +@BUILD_ECORE_WAYLAND_TRUE@am__DEPENDENCIES_10 = $(top_builddir)/src/lib/ecore_wayland/libecore_wayland.la +@BUILD_ECORE_WAYLAND_TRUE@am__DEPENDENCIES_11 = \ +@BUILD_ECORE_WAYLAND_TRUE@ $(am__DEPENDENCIES_10) libecore_evas_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \ $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_5) \ $(am__DEPENDENCIES_6) $(am__DEPENDENCIES_7) \ - $(am__DEPENDENCIES_8) $(am__DEPENDENCIES_9) \ + $(am__DEPENDENCIES_8) $(ECORE_IPC_LIB) $(am__DEPENDENCIES_9) \ + $(am__DEPENDENCIES_10) $(am__DEPENDENCIES_11) \ $(top_builddir)/src/lib/ecore_input/libecore_input.la \ $(top_builddir)/src/lib/ecore_input_evas/libecore_input_evas.la \ $(top_builddir)/src/lib/ecore/libecore.la @@ -107,7 +111,8 @@ am_libecore_evas_la_OBJECTS = ecore_evas.lo ecore_evas_util.lo \ ecore_evas_x.lo ecore_evas_fb.lo ecore_evas_buffer.lo \ ecore_evas_directfb.lo ecore_evas_win32.lo ecore_evas_sdl.lo \ ecore_evas_cocoa.lo ecore_evas_wince.lo ecore_evas_ews.lo \ - ecore_evas_psl1ght.lo + ecore_evas_psl1ght.lo ecore_evas_wayland_shm.lo \ + ecore_evas_wayland_egl.lo ecore_evas_extn.lo libecore_evas_la_OBJECTS = $(am_libecore_evas_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) @@ -266,10 +271,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -288,6 +293,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -401,6 +410,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -413,6 +424,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -457,12 +470,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ @@ -481,9 +496,9 @@ x_includes = @x_includes@ x_libs = @x_libs@ MAINTAINERCLEANFILES = Makefile.in @BUILD_ECORE_X_FALSE@ECORE_X_INC = -@BUILD_ECORE_X_TRUE@ECORE_X_INC = -I$(top_srcdir)/src/lib/ecore_x @x_cflags@ @ECORE_XCB_CFLAGS@ +@BUILD_ECORE_X_TRUE@ECORE_X_INC = -I$(top_srcdir)/src/lib/ecore_x @x_cflags@ @BUILD_ECORE_X_FALSE@ECORE_X_LIB = -@BUILD_ECORE_X_TRUE@ECORE_X_LIB = $(top_builddir)/src/lib/ecore_x/libecore_x.la @x_libs@ @ECORE_XCB_LIBS@ +@BUILD_ECORE_X_TRUE@ECORE_X_LIB = $(top_builddir)/src/lib/ecore_x/libecore_x.la @x_libs@ @BUILD_ECORE_FB_FALSE@ECORE_FB_INC = @BUILD_ECORE_FB_TRUE@ECORE_FB_INC = -I$(top_srcdir)/src/lib/ecore_fb @BUILD_ECORE_FB_FALSE@ECORE_FB_LIB = @@ -514,6 +529,17 @@ MAINTAINERCLEANFILES = Makefile.in @BUILD_ECORE_PSL1GHT_TRUE@ECORE_PSL1GHT_INC = -I$(top_srcdir)/src/lib/ecore_psl1ght @BUILD_ECORE_PSL1GHT_FALSE@ECORE_PSL1GHT_LIB = @BUILD_ECORE_PSL1GHT_TRUE@ECORE_PSL1GHT_LIB = $(top_builddir)/src/lib/ecore_psl1ght/libecore_psl1ght.la +@BUILD_ECORE_WAYLAND_FALSE@ECORE_WAYLAND_INC = +@BUILD_ECORE_WAYLAND_TRUE@ECORE_WAYLAND_INC = -I$(top_srcdir)/src/lib/ecore_wayland @WAYLAND_CFLAGS@ +@BUILD_ECORE_WAYLAND_FALSE@ECORE_WAYLAND_LIB = +@BUILD_ECORE_WAYLAND_TRUE@ECORE_WAYLAND_LIB = $(top_builddir)/src/lib/ecore_wayland/libecore_wayland.la +@BUILD_ECORE_WAYLAND_FALSE@ECORE_WAYLAND_LIBADD = +@BUILD_ECORE_WAYLAND_TRUE@ECORE_WAYLAND_LIBADD = @WAYLAND_LIBS@ $(ECORE_WAYLAND_LIB) +@BUILD_ECORE_IPC_TRUE@ECORE_IPC_INC = \ +@BUILD_ECORE_IPC_TRUE@-I$(top_srcdir)/src/lib/ecore_ipc \ +@BUILD_ECORE_IPC_TRUE@-I$(top_builddir)/src/lib/ecore_ipc + +@BUILD_ECORE_IPC_TRUE@ECORE_IPC_LIB = $(top_builddir)/src/lib/ecore_ipc/libecore_ipc.la AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib/ecore \ -I$(top_srcdir)/src/lib/ecore_evas \ @@ -532,9 +558,12 @@ $(ECORE_SDL_INC) \ $(ECORE_COCOA_INC) \ $(ECORE_WINCE_INC) \ $(ECORE_PSL1GHT_INC) \ +$(ECORE_WAYLAND_INC) \ +$(ECORE_IPC_INC) \ @EVAS_CFLAGS@ \ @EINA_CFLAGS@ \ -@EVIL_CFLAGS@ +@EVIL_CFLAGS@ \ +@WAYLAND_EGL_CFLAGS@ AM_CFLAGS = @WIN32_CFLAGS@ lib_LTLIBRARIES = libecore_evas.la @@ -552,7 +581,10 @@ ecore_evas_sdl.c \ ecore_evas_cocoa.c \ ecore_evas_wince.c \ ecore_evas_ews.c \ -ecore_evas_psl1ght.c +ecore_evas_psl1ght.c \ +ecore_evas_wayland_shm.c \ +ecore_evas_wayland_egl.c \ +ecore_evas_extn.c libecore_evas_la_LIBADD = \ $(ECORE_X_LIB) \ @@ -563,13 +595,17 @@ $(ECORE_SDL_LIB) \ $(ECORE_SDL_LIBADD) \ $(ECORE_COCOA_LIB) \ $(ECORE_WINCE_LIB) \ +$(ECORE_IPC_LIB) \ $(ECORE_PSL1GHT_LIB) \ +$(ECORE_WAYLAND_LIB) \ +$(ECORE_WAYLAND_LIBADD) \ $(top_builddir)/src/lib/ecore_input/libecore_input.la \ $(top_builddir)/src/lib/ecore_input_evas/libecore_input_evas.la \ $(top_builddir)/src/lib/ecore/libecore.la \ @EVAS_LIBS@ \ @EINA_LIBS@ \ -@EVIL_LIBS@ +@EVIL_LIBS@ \ +@WAYLAND_EGL_LIBS@ libecore_evas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ EXTRA_DIST = \ @@ -654,10 +690,13 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_evas_cocoa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_evas_directfb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_evas_ews.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_evas_extn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_evas_fb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_evas_psl1ght.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_evas_sdl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_evas_util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_evas_wayland_egl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_evas_wayland_shm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_evas_win32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_evas_wince.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_evas_x.Plo@am__quote@ diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas.c index dc42f92..2b04488 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas.c @@ -2,14 +2,21 @@ # include #endif +#include #include #include #include +#include +#include #ifndef _MSC_VER # include #endif +#ifdef HAVE_SYS_MMAN_H +# include +#endif + #ifdef HAVE_EVIL # include #endif @@ -194,6 +201,18 @@ ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine) #else return EINA_FALSE; #endif + case ECORE_EVAS_ENGINE_WAYLAND_SHM: +#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM + return EINA_TRUE; +#else + return EINA_FALSE; +#endif + case ECORE_EVAS_ENGINE_WAYLAND_EGL: +#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL + return EINA_TRUE; +#else + return EINA_FALSE; +#endif default: return EINA_FALSE; }; @@ -237,6 +256,8 @@ ecore_evas_init(void) _ecore_evas_ews_events_init(); #endif + _ecore_evas_extn_init(); + if (getenv("ECORE_EVAS_COMP_NOSYNC")) _ecore_evas_app_comp_sync = 0; return _ecore_evas_init_count; @@ -257,6 +278,8 @@ ecore_evas_shutdown(void) while (ecore_evases) _ecore_evas_free(ecore_evases); + _ecore_evas_extn_shutdown(); + if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_shutdown(); ecore_idle_enterer_del(ecore_evas_idle_enterer); ecore_evas_idle_enterer = NULL; @@ -282,6 +305,7 @@ ecore_evas_shutdown(void) #ifdef BUILD_ECORE_EVAS_SOFTWARE_16_WINCE while (_ecore_evas_wince_shutdown()); #endif + if (_ecore_evas_async_events_fd) ecore_main_fd_handler_del(_ecore_evas_async_events_fd); @@ -577,6 +601,40 @@ _ecore_evas_constructor_psl1ght(int x __UNUSED__, int y __UNUSED__, int w, int h } #endif +#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM +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; + 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); + free(disp_name); + + return ee; +} +#endif + +#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL +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; + 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); + free(disp_name); + + return ee; +} +#endif + #ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI static Ecore_Evas * _ecore_evas_constructor_software_gdi(int x, int y, int w, int h, const char *extra_options) @@ -714,7 +772,16 @@ static const struct ecore_evas_engine _engines[] = { {"psl1ght", _ecore_evas_constructor_psl1ght}, #endif - /* Last chance to have a window */ + /* Wayland */ +#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM + {"wayland_shm", _ecore_evas_constructor_wayland_shm}, +#endif + +#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL + {"wayland_egl", _ecore_evas_constructor_wayland_egl}, +#endif + + /* Last chance to have a window */ #ifdef BUILD_ECORE_EVAS_OPENGL_SDL {"opengl_sdl", _ecore_evas_constructor_opengl_sdl}, #endif @@ -1938,7 +2005,7 @@ ecore_evas_fullscreen_get(const Ecore_Evas *ee) * Set whether or not an Ecore_Evas' window should avoid damage * * @param ee The Ecore_Evas - * @param The type of the damage management + * @param on The type of the damage management * * This function causes @p ee to be drawn to a pixmap to avoid recalculations. * On expose events it will copy from the pixmap to the window. @@ -2008,8 +2075,8 @@ ecore_evas_withdrawn_get(const Ecore_Evas *ee) ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, "ecore_evas_withdrawn_get"); return EINA_FALSE; - } else - return ee->prop.withdrawn ? EINA_TRUE : EINA_FALSE; + } + return ee->prop.withdrawn ? EINA_TRUE : EINA_FALSE; } /** @@ -2048,8 +2115,8 @@ ecore_evas_sticky_get(const Ecore_Evas *ee) ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, "ecore_evas_sticky_get"); return EINA_FALSE; - } else - return ee->prop.sticky ? EINA_TRUE : EINA_FALSE; + } + return ee->prop.sticky ? EINA_TRUE : EINA_FALSE; } EAPI void @@ -2170,6 +2237,28 @@ ecore_evas_screen_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int IFE; } +EAPI void +ecore_evas_draw_frame_set(Ecore_Evas *ee, Eina_Bool draw_frame) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, "ecore_evas_draw_frame_set"); + return; + } + ee->prop.draw_frame = draw_frame; +} + +EAPI Eina_Bool +ecore_evas_draw_frame_get(const Ecore_Evas *ee) +{ + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) + { + ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, "ecore_evas_draw_frame_get"); + return EINA_FALSE; + } + return ee->prop.draw_frame; +} + /* fps debug calls - for debugging how much time your app actually spends */ /* rendering graphics... :) */ @@ -2586,3 +2675,55 @@ ecore_evas_input_event_unregister(Ecore_Evas *ee) { ecore_event_window_unregister((Ecore_Window)ee); } + +#if defined(BUILD_ECORE_EVAS_WAYLAND_SHM) || defined (BUILD_ECORE_EVAS_WAYLAND_EGL) +EAPI void +ecore_evas_wayland_resize(Ecore_Evas *ee, int location) +{ + if (!ee) return; + if (!strcmp(ee->driver, "wayland_shm")) + { +#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM + _ecore_evas_wayland_shm_resize(ee, location); +#endif + } + else if (!strcmp(ee->driver, "wayland_egl")) + { +#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL + _ecore_evas_wayland_egl_resize(ee, location); +#endif + } +} + +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 a3e49d6..3f82efb 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_buffer.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_buffer.c @@ -3,6 +3,7 @@ #endif // NOTE: if you fix this, consider fixing ecore_evas_ews.c as it is similar! +#include #include #include "ecore_private.h" @@ -93,6 +94,12 @@ _ecore_evas_resize(Ecore_Evas *ee, int w, int h) if (ee->func.fn_resize) ee->func.fn_resize(ee); } +static void +_ecore_evas_move_resize(Ecore_Evas *ee, int x __UNUSED__, int y __UNUSED__, int w, int h) +{ + _ecore_evas_resize(ee, w, h); +} + int _ecore_evas_buffer_shutdown(void) { @@ -168,6 +175,14 @@ _ecore_evas_buffer_coord_translate(Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y) if (fw < 1) fw = 1; if (fh < 1) fh = 1; + if (evas_object_map_get(ee->engine.buffer.image) && + evas_object_map_enable_get(ee->engine.buffer.image)) + { + fx = 0; fy = 0; + fw = ee->w; fh = ee->h; + ww = ee->w; hh = ee->h; + } + if ((fx == 0) && (fy == 0) && (fw == ww) && (fh == hh)) { *x = (ee->w * (*x - xx)) / fw; @@ -188,51 +203,80 @@ _ecore_evas_buffer_coord_translate(Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y) } static void -_ecore_evas_buffer_cb_mouse_in(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_ecore_evas_buffer_transfer_modifiers_locks(Evas *e, Evas *e2) +{ + const char *mods[] = + { "Shift", "Control", "Alt", "Meta", "Hyper", "Super", NULL }; + const char *locks[] = + { "Scroll_Lock", "Num_Lock", "Caps_Lock", NULL }; + int i; + + for (i = 0; mods[i]; i++) + { + if (evas_key_modifier_is_set(evas_key_modifier_get(e), mods[i])) + evas_key_modifier_on(e2, mods[i]); + else + evas_key_modifier_off(e2, mods[i]); + } + for (i = 0; locks[i]; i++) + { + if (evas_key_lock_is_set(evas_key_lock_get(e), locks[i])) + evas_key_lock_on(e2, locks[i]); + else + evas_key_lock_off(e2, locks[i]); + } +} + +static void +_ecore_evas_buffer_cb_mouse_in(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { Ecore_Evas *ee; Evas_Event_Mouse_In *ev; ee = data; ev = event_info; + _ecore_evas_buffer_transfer_modifiers_locks(e, ee->evas); evas_event_feed_mouse_in(ee->evas, ev->timestamp, NULL); } static void -_ecore_evas_buffer_cb_mouse_out(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +_ecore_evas_buffer_cb_mouse_out(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { Ecore_Evas *ee; Evas_Event_Mouse_Out *ev; ee = data; ev = event_info; + _ecore_evas_buffer_transfer_modifiers_locks(e, ee->evas); evas_event_feed_mouse_out(ee->evas, ev->timestamp, NULL); } static void -_ecore_evas_buffer_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +_ecore_evas_buffer_cb_mouse_down(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *event_info) { Ecore_Evas *ee; Evas_Event_Mouse_Down *ev; ee = data; ev = event_info; + _ecore_evas_buffer_transfer_modifiers_locks(e, ee->evas); evas_event_feed_mouse_down(ee->evas, ev->button, ev->flags, ev->timestamp, NULL); } static void -_ecore_evas_buffer_cb_mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +_ecore_evas_buffer_cb_mouse_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *event_info) { Ecore_Evas *ee; Evas_Event_Mouse_Up *ev; ee = data; ev = event_info; + _ecore_evas_buffer_transfer_modifiers_locks(e, ee->evas); evas_event_feed_mouse_up(ee->evas, ev->button, ev->flags, ev->timestamp, NULL); } static void -_ecore_evas_buffer_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +_ecore_evas_buffer_cb_mouse_move(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *event_info) { Ecore_Evas *ee; Evas_Event_Mouse_Move *ev; @@ -243,22 +287,24 @@ _ecore_evas_buffer_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *ob x = ev->cur.canvas.x; y = ev->cur.canvas.y; _ecore_evas_buffer_coord_translate(ee, &x, &y); + _ecore_evas_buffer_transfer_modifiers_locks(e, ee->evas); _ecore_evas_mouse_move_process(ee, x, y, ev->timestamp); } static void -_ecore_evas_buffer_cb_mouse_wheel(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +_ecore_evas_buffer_cb_mouse_wheel(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *event_info) { Ecore_Evas *ee; Evas_Event_Mouse_Wheel *ev; ee = data; ev = event_info; + _ecore_evas_buffer_transfer_modifiers_locks(e, ee->evas); evas_event_feed_mouse_wheel(ee->evas, ev->direction, ev->z, ev->timestamp, NULL); } static void -_ecore_evas_buffer_cb_multi_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +_ecore_evas_buffer_cb_multi_down(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *event_info) { Ecore_Evas *ee; Evas_Event_Multi_Down *ev; @@ -274,11 +320,12 @@ _ecore_evas_buffer_cb_multi_down(void *data, Evas *e __UNUSED__, Evas_Object *ob _ecore_evas_buffer_coord_translate(ee, &x, &y); xf = (ev->canvas.xsub - (double)xx) + (double)x; yf = (ev->canvas.ysub - (double)yy) + (double)y; + _ecore_evas_buffer_transfer_modifiers_locks(e, ee->evas); evas_event_feed_multi_down(ee->evas, ev->device, x, y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, xf, yf, ev->flags, ev->timestamp, NULL); } static void -_ecore_evas_buffer_cb_multi_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +_ecore_evas_buffer_cb_multi_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *event_info) { Ecore_Evas *ee; Evas_Event_Multi_Up *ev; @@ -294,11 +341,12 @@ _ecore_evas_buffer_cb_multi_up(void *data, Evas *e __UNUSED__, Evas_Object *obj _ecore_evas_buffer_coord_translate(ee, &x, &y); xf = (ev->canvas.xsub - (double)xx) + (double)x; yf = (ev->canvas.ysub - (double)yy) + (double)y; + _ecore_evas_buffer_transfer_modifiers_locks(e, ee->evas); evas_event_feed_multi_up(ee->evas, ev->device, x, y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, xf, yf, ev->flags, ev->timestamp, NULL); } static void -_ecore_evas_buffer_cb_multi_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +_ecore_evas_buffer_cb_multi_move(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *event_info) { Ecore_Evas *ee; Evas_Event_Multi_Move *ev; @@ -314,6 +362,7 @@ _ecore_evas_buffer_cb_multi_move(void *data, Evas *e __UNUSED__, Evas_Object *ob _ecore_evas_buffer_coord_translate(ee, &x, &y); xf = (ev->cur.canvas.xsub - (double)xx) + (double)x; yf = (ev->cur.canvas.ysub - (double)yy) + (double)y; + _ecore_evas_buffer_transfer_modifiers_locks(e, ee->evas); evas_event_feed_multi_move(ee->evas, ev->device, x, y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, xf, yf, ev->timestamp, NULL); } @@ -334,42 +383,7 @@ _ecore_evas_buffer_cb_key_down(void *data, Evas *e, Evas_Object *obj __UNUSED__, ee = data; ev = event_info; - if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Shift")) - evas_key_modifier_on(ee->evas, "Shift"); - else - evas_key_modifier_off(ee->evas, "Shift"); - if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Control")) - evas_key_modifier_on(ee->evas, "Control"); - else - evas_key_modifier_off(ee->evas, "Control"); - if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Alt")) - evas_key_modifier_on(ee->evas, "Alt"); - else - evas_key_modifier_off(ee->evas, "Alt"); - if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Meta")) - evas_key_modifier_on(ee->evas, "Meta"); - else - evas_key_modifier_off(ee->evas, "Meta"); - if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Hyper")) - evas_key_modifier_on(ee->evas, "Hyper"); - else - evas_key_modifier_off(ee->evas, "Hyper"); - if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Super")) - evas_key_modifier_on(ee->evas, "Super"); - else - evas_key_modifier_off(ee->evas, "Super"); - if (evas_key_lock_is_set(evas_key_lock_get(e), "Scroll_Lock")) - evas_key_lock_on(ee->evas, "Scroll_Lock"); - else - evas_key_lock_off(ee->evas, "Scroll_Lock"); - if (evas_key_lock_is_set(evas_key_lock_get(e), "Num_Lock")) - evas_key_lock_on(ee->evas, "Num_Lock"); - else - evas_key_lock_off(ee->evas, "Num_Lock"); - if (evas_key_lock_is_set(evas_key_lock_get(e), "Caps_Lock")) - evas_key_lock_on(ee->evas, "Caps_Lock"); - else - evas_key_lock_off(ee->evas, "Caps_Lock"); + _ecore_evas_buffer_transfer_modifiers_locks(e, ee->evas); evas_event_feed_key_down(ee->evas, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, NULL); } @@ -381,42 +395,7 @@ _ecore_evas_buffer_cb_key_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, v ee = data; ev = event_info; - if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Shift")) - evas_key_modifier_on(ee->evas, "Shift"); - else - evas_key_modifier_off(ee->evas, "Shift"); - if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Control")) - evas_key_modifier_on(ee->evas, "Control"); - else - evas_key_modifier_off(ee->evas, "Control"); - if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Alt")) - evas_key_modifier_on(ee->evas, "Alt"); - else - evas_key_modifier_off(ee->evas, "Alt"); - if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Meta")) - evas_key_modifier_on(ee->evas, "Meta"); - else - evas_key_modifier_off(ee->evas, "Meta"); - if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Hyper")) - evas_key_modifier_on(ee->evas, "Hyper"); - else - evas_key_modifier_off(ee->evas, "Hyper"); - if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Super")) - evas_key_modifier_on(ee->evas, "Super"); - else - evas_key_modifier_off(ee->evas, "Super"); - if (evas_key_lock_is_set(evas_key_lock_get(e), "Scroll_Lock")) - evas_key_lock_on(ee->evas, "Scroll_Lock"); - else - evas_key_lock_off(ee->evas, "Scroll_Lock"); - if (evas_key_lock_is_set(evas_key_lock_get(e), "Num_Lock")) - evas_key_lock_on(ee->evas, "Num_Lock"); - else - evas_key_lock_off(ee->evas, "Num_Lock"); - if (evas_key_lock_is_set(evas_key_lock_get(e), "Caps_Lock")) - evas_key_lock_on(ee->evas, "Caps_Lock"); - else - evas_key_lock_off(ee->evas, "Caps_Lock"); + _ecore_evas_buffer_transfer_modifiers_locks(e, ee->evas); evas_event_feed_key_up(ee->evas, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, NULL); } @@ -469,6 +448,20 @@ _ecore_evas_buffer_alpha_set(Ecore_Evas *ee, int alpha) ee->alpha = alpha; if (ee->engine.buffer.image) evas_object_image_alpha_set(ee->engine.buffer.image, ee->alpha); + else + { + Evas_Engine_Info_Buffer *einfo; + + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ee->evas); + if (einfo) + { + if (ee->alpha) + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32; + else + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_RGB32; + evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); + } + } } static Ecore_Evas_Engine_Func _ecore_buffer_engine_func = @@ -491,7 +484,7 @@ static Ecore_Evas_Engine_Func _ecore_buffer_engine_func = NULL, NULL, _ecore_evas_resize, - NULL, + _ecore_evas_move_resize, NULL, NULL, _ecore_evas_show, @@ -520,7 +513,7 @@ static Ecore_Evas_Engine_Func _ecore_buffer_engine_func = _ecore_evas_buffer_alpha_set, NULL, //transparent - NULL, // render + _ecore_evas_buffer_render, NULL // screen_geometry_get }; #endif @@ -604,7 +597,7 @@ ecore_evas_buffer_allocfunc_new(int w, int h, void *(*alloc_func) (void *data, i einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ee->evas); if (einfo) { - einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32; + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_RGB32; einfo->info.dest_buffer = ee->engine.buffer.pixels; einfo->info.dest_buffer_row_bytes = ee->w * sizeof(int); einfo->info.use_color_key = 0; @@ -636,7 +629,6 @@ ecore_evas_buffer_allocfunc_new(int w, int h, void *(*alloc_func) (void *data, i evas_event_feed_mouse_in(ee->evas, 0, NULL); - ee->engine.func->fn_render = _ecore_evas_buffer_render; _ecore_evas_register(ee); evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL); @@ -818,8 +810,6 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target) ee_target->sub_ecore_evas = eina_list_append(ee_target->sub_ecore_evas, ee); - ee->engine.func->fn_render = _ecore_evas_buffer_render; - return o; #else return NULL; 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 1f946d5..36d41f8 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_cocoa.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_cocoa.c @@ -568,7 +568,7 @@ ecore_evas_cocoa_new(Ecore_Cocoa_Window *parent, int x, int y, int w, int h) #else ERR("Cocoa support in ecore-evas not enabled"); return NULL; - parent = NULL; - x = y = w = h = 0; + (void) parent; + (void) x; (void) y; (void) w; (void) h; #endif } 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 e19fb05..eccf98b 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_ews.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_ews.c @@ -2,6 +2,11 @@ # include #endif +#include +#include +#include + +#include #include #include "ecore_private.h" #include diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_extn.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_extn.c new file mode 100644 index 0000000..e46ab4a --- /dev/null +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_extn.c @@ -0,0 +1,2152 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include +#include "ecore_private.h" +#include + +#ifdef BUILD_ECORE_IPC +# ifdef BUILD_ECORE_EVAS_SOFTWARE_BUFFER +# define EXTN_ENABLED 1 +# endif +#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 + +typedef struct _Shmfile Shmfile; + +struct _Shmfile +{ + int fd; + int size; + void *addr; + const char *file; +}; + +static int blank = 0x00000000; + +static Shmfile * +shmfile_new(const char *base, int id, int size, Eina_Bool sys) +{ + Shmfile *sf; + char file[PATH_MAX]; + + sf = calloc(1, sizeof(Shmfile)); + do + { + mode_t mode; + + snprintf(file, sizeof(file), "/%s-%i-%i.%i.%i", + base, id, (int)time(NULL), (int)getpid(), (int)rand()); + mode = S_IRUSR | S_IWUSR; + if (sys) mode |= S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; + sf->fd = shm_open(file, O_RDWR | O_CREAT | O_EXCL, mode); + } + while (sf->fd < 0); + + sf->file = eina_stringshare_add(file); + if (!sf->file) + { + close(sf->fd); + shm_unlink(sf->file); + eina_stringshare_del(sf->file); + free(sf); + return NULL; + } + sf->size = size; + if (ftruncate(sf->fd, size) < 0) + { + close(sf->fd); + shm_unlink(sf->file); + eina_stringshare_del(sf->file); + free(sf); + return NULL; + } + sf->addr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, sf->fd, 0); + if (sf->addr == MAP_FAILED) + { + close(sf->fd); + shm_unlink(sf->file); + eina_stringshare_del(sf->file); + free(sf); + return NULL; + } + return sf; +} + +void +shmfile_free(Shmfile *sf) +{ + munmap(sf->addr, sf->size); + close(sf->fd); + shm_unlink(sf->file); + eina_stringshare_del(sf->file); + free(sf); +} + +static Shmfile * +shmfile_open(const char *ref, int size, Eina_Bool sys) +{ + Shmfile *sf; + mode_t mode; + + sf = calloc(1, sizeof(Shmfile)); + mode = S_IRUSR | S_IWUSR; + if (sys) mode |= S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; + sf->fd = shm_open(ref, O_RDWR, mode); + if (sf->fd < 0) + { + free(sf); + return NULL; + } + sf->file = eina_stringshare_add(ref); + if (!sf->file) + { + close(sf->fd); + eina_stringshare_del(sf->file); + free(sf); + return NULL; + } + sf->size = size; + sf->addr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, sf->fd, 0); + if (sf->addr == MAP_FAILED) + { + close(sf->fd); + eina_stringshare_del(sf->file); + free(sf); + return NULL; + } + return sf; +} + +void +shmfile_close(Shmfile *sf) +{ + munmap(sf->addr, sf->size); + close(sf->fd); + eina_stringshare_del(sf->file); + free(sf); +} + +// procotol version - change this as needed +#define MAJOR 0x1011 + +enum // opcodes +{ + OP_RESIZE, + OP_SHOW, + OP_HIDE, + OP_FOCUS, + OP_UNFOCUS, + OP_UPDATE, + OP_UPDATE_DONE, + OP_LOCK_FILE, + OP_SHM_REF, + OP_EV_MOUSE_IN, + OP_EV_MOUSE_OUT, + OP_EV_MOUSE_UP, + OP_EV_MOUSE_DOWN, + OP_EV_MOUSE_MOVE, + OP_EV_MOUSE_WHEEL, + OP_EV_MULTI_UP, + OP_EV_MULTI_DOWN, + OP_EV_MULTI_MOVE, + OP_EV_KEY_UP, + OP_EV_KEY_DOWN, + OP_EV_HOLD +}; + +enum +{ + MOD_SHIFT = (1 << 0), + MOD_CTRL = (1 << 1), + MOD_ALT = (1 << 2), + MOD_META = (1 << 3), + MOD_HYPER = (1 << 4), + MOD_SUPER = (1 << 5), + MOD_CAPS = (1 << 6), + MOD_NUM = (1 << 7), + MOD_SCROLL = (1 << 8), +}; + +typedef struct _Ipc_Data_Resize Ipc_Data_Resize; +typedef struct _Ipc_Data_Update Ipc_Data_Update; +typedef struct _Ipc_Data_Ev_Mouse_In Ipc_Data_Ev_Mouse_In; +typedef struct _Ipc_Data_Ev_Mouse_Out Ipc_Data_Ev_Mouse_Out; +typedef struct _Ipc_Data_Ev_Mouse_Up Ipc_Data_Ev_Mouse_Up; +typedef struct _Ipc_Data_Ev_Mouse_Down Ipc_Data_Ev_Mouse_Down; +typedef struct _Ipc_Data_Ev_Mouse_Move Ipc_Data_Ev_Mouse_Move; +typedef struct _Ipc_Data_Ev_Mouse_Wheel Ipc_Data_Ev_Mouse_Wheel; +typedef struct _Ipc_Data_Ev_Hold Ipc_Data_Ev_Hold; +typedef struct _Ipc_Data_Ev_Multi_Up Ipc_Data_Ev_Multi_Up; +typedef struct _Ipc_Data_Ev_Multi_Down Ipc_Data_Ev_Multi_Down; +typedef struct _Ipc_Data_Ev_Multi_Move Ipc_Data_Ev_Multi_Move; +typedef struct _Ipc_Data_Ev_Key_Up Ipc_Data_Ev_Key_Up; +typedef struct _Ipc_Data_Ev_Key_Down Ipc_Data_Ev_Key_Down; + +struct _Ipc_Data_Resize +{ + int w, h; +}; + +struct _Ipc_Data_Update +{ + int x, w, y, h; +}; + +struct _Ipc_Data_Ev_Mouse_In +{ + unsigned int timestamp; + int mask; + Evas_Event_Flags event_flags; +}; + +struct _Ipc_Data_Ev_Mouse_Out +{ + unsigned int timestamp; + int mask; + Evas_Event_Flags event_flags; +}; + +struct _Ipc_Data_Ev_Mouse_Up +{ + int b; + Evas_Button_Flags flags; + int mask; + unsigned int timestamp; + Evas_Event_Flags event_flags; +}; + +struct _Ipc_Data_Ev_Mouse_Down +{ + int b; + Evas_Button_Flags flags; + int mask; + unsigned int timestamp; + Evas_Event_Flags event_flags; +}; + +struct _Ipc_Data_Ev_Mouse_Move +{ + int x, y; + Evas_Button_Flags flags; + int mask; + unsigned int timestamp; + Evas_Event_Flags event_flags; +}; + +struct _Ipc_Data_Ev_Mouse_Wheel +{ + int direction, z; + Evas_Button_Flags flags; + int mask; + unsigned int timestamp; + Evas_Event_Flags event_flags; +}; + +struct _Ipc_Data_Ev_Hold +{ + int hold; + unsigned int timestamp; + Evas_Event_Flags event_flags; +}; + +struct _Ipc_Data_Ev_Multi_Up +{ + Evas_Button_Flags flags; + int d, x, y; + double rad, radx, rady, pres, ang, fx, fy; + int mask; + unsigned int timestamp; + Evas_Event_Flags event_flags; +}; + +struct _Ipc_Data_Ev_Multi_Down +{ + Evas_Button_Flags flags; + int d, x, y; + double rad, radx, rady, pres, ang, fx, fy; + int mask; + unsigned int timestamp; + Evas_Event_Flags event_flags; +}; + +struct _Ipc_Data_Ev_Multi_Move +{ + int d, x, y; + double rad, radx, rady, pres, ang, fx, fy; + int mask; + unsigned int timestamp; + Evas_Event_Flags event_flags; +}; + +struct _Ipc_Data_Ev_Key_Up +{ + const char *keyname, *key, *string, *compose; + int mask; + unsigned int timestamp; + Evas_Event_Flags event_flags; +}; + +struct _Ipc_Data_Ev_Key_Down +{ + const char *keyname, *key, *string, *compose; + int mask; + unsigned int timestamp; + Evas_Event_Flags event_flags; +}; + +typedef struct _Extn Extn; + +struct _Extn +{ + struct { + Ecore_Ipc_Server *server; + Eina_List *clients; + Eina_List *handlers; + Eina_Bool am_server : 1; + } ipc; + struct { + const char *name; + int num; + Eina_Bool sys : 1; + } svc; + struct { + const char *lock; + int lockfd; + const char *shm; + int w, h; + Shmfile *shmfile; + Eina_List *updates; + Eina_Bool have_lock : 1; + } file; +}; + +static Eina_List *extn_ee_list = NULL; + +EAPI int ECORE_EVAS_EXTN_CLIENT_ADD = 0; +EAPI int ECORE_EVAS_EXTN_CLIENT_DEL = 0; + +void +_ecore_evas_extn_init(void) +{ + if (ECORE_EVAS_EXTN_CLIENT_ADD) return; + ECORE_EVAS_EXTN_CLIENT_ADD = ecore_event_type_new(); + ECORE_EVAS_EXTN_CLIENT_DEL = ecore_event_type_new(); +} + +void +_ecore_evas_extn_shutdown(void) +{ +} + +static void +_ecore_evas_extn_event_free(void *data, void *ev __UNUSED__) +{ + Ecore_Evas *ee = data; + if (ee->engine.buffer.image) + evas_object_unref(ee->engine.buffer.image); + _ecore_evas_unref(ee); +} + +static void +_ecore_evas_extn_event(Ecore_Evas *ee, int event) +{ + _ecore_evas_ref(ee); + if (ee->engine.buffer.image) + evas_object_ref(ee->engine.buffer.image); + ecore_event_add(event, ee->engine.buffer.image, + _ecore_evas_extn_event_free, ee); +} + +static void +_ecore_evas_socket_lock(Ecore_Evas *ee) +{ + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->file.lockfd < 0) return; + if (extn->file.have_lock) return; + flock(extn->file.lockfd, LOCK_EX); + extn->file.have_lock = EINA_TRUE; +} + +static void +_ecore_evas_socket_unlock(Ecore_Evas *ee) +{ + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->file.lockfd < 0) return; + if (!extn->file.have_lock) return; + flock(extn->file.lockfd, LOCK_UN); + extn->file.have_lock = EINA_FALSE; +} + +static void +_ecore_evas_extn_plug_targer_render_pre(void *data, Evas *e __UNUSED__, void *event_info __UNUSED__) +{ + Ecore_Evas *ee = data; + if (ee) _ecore_evas_socket_lock(ee); +} + +static void +_ecore_evas_extn_plug_targer_render_post(void *data, Evas *e __UNUSED__, void *event_info __UNUSED__) +{ + Ecore_Evas *ee = data; + if (ee) _ecore_evas_socket_unlock(ee); +} + +static void +_ecore_evas_extn_plug_image_obj_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +{ + Ecore_Evas *ee = data; + if (ee) ecore_evas_free(ee); +} + +static void +_ecore_evas_extn_coord_translate(Ecore_Evas *ee, Evas_Coord *x, Evas_Coord *y) +{ + Evas_Coord xx, yy, ww, hh, fx, fy, fw, fh; + + evas_object_geometry_get(ee->engine.buffer.image, &xx, &yy, &ww, &hh); + evas_object_image_fill_get(ee->engine.buffer.image, &fx, &fy, &fw, &fh); + + if (fw < 1) fw = 1; + if (fh < 1) fh = 1; + + if (evas_object_map_get(ee->engine.buffer.image) && + evas_object_map_enable_get(ee->engine.buffer.image)) + { + fx = 0; fy = 0; + fw = ee->w; fh = ee->h; + ww = ee->w; hh = ee->h; + } + + if ((fx == 0) && (fy == 0) && (fw == ww) && (fh == hh)) + { + *x = (ee->w * (*x - xx)) / fw; + *y = (ee->h * (*y - yy)) / fh; + } + else + { + xx = (*x - xx) - fx; + while (xx < 0) xx += fw; + while (xx > fw) xx -= fw; + *x = (ee->w * xx) / fw; + + yy = (*y - yy) - fy; + while (yy < 0) yy += fh; + while (yy > fh) yy -= fh; + *y = (ee->h * yy) / fh; + } +} + +static void +_ecore_evas_extn_free(Ecore_Evas *ee) +{ + Extn *extn; + Ecore_Ipc_Client *client; + + extn = ee->engine.buffer.data; + if (extn) + { + Ecore_Event_Handler *hdl; + + if (extn->file.have_lock) + _ecore_evas_socket_unlock(ee); + if (extn->file.lockfd) + { + close(extn->file.lockfd); + if (extn->ipc.am_server) + { + if (extn->file.lock) unlink(extn->file.lock); + } + } + if (extn->svc.name) eina_stringshare_del(extn->svc.name); + if (extn->ipc.clients) + { + EINA_LIST_FREE(extn->ipc.clients, client) + ecore_ipc_client_del(client); + } + if (extn->ipc.server) ecore_ipc_server_del(extn->ipc.server); + if (extn->file.lock) eina_stringshare_del(extn->file.lock); + if (extn->file.shm) eina_stringshare_del(extn->file.shm); + if (extn->file.shmfile) + { + if (extn->ipc.am_server) + shmfile_free(extn->file.shmfile); + else + shmfile_close(extn->file.shmfile); + } + + EINA_LIST_FREE(extn->ipc.handlers, hdl) + ecore_event_handler_del(hdl); + free(extn); + ecore_ipc_shutdown(); + ee->engine.buffer.data = NULL; + } + if (ee->engine.buffer.image) + { + Ecore_Evas *ee2; + + evas_object_event_callback_del_full(ee->engine.buffer.image, + EVAS_CALLBACK_DEL, + _ecore_evas_extn_plug_image_obj_del, + ee); + evas_event_callback_del_full(evas_object_evas_get(ee->engine.buffer.image), + EVAS_CALLBACK_RENDER_PRE, + _ecore_evas_extn_plug_targer_render_pre, + ee); + evas_event_callback_del_full(evas_object_evas_get(ee->engine.buffer.image), + EVAS_CALLBACK_RENDER_POST, + _ecore_evas_extn_plug_targer_render_post, + ee); + evas_object_del(ee->engine.buffer.image); + ee2 = evas_object_data_get(ee->engine.buffer.image, "Ecore_Evas_Parent"); + if (ee2) + { + ee2->sub_ecore_evas = eina_list_remove(ee2->sub_ecore_evas, ee); + } + } + extn_ee_list = eina_list_remove(extn_ee_list, ee); +} + +static void +_ecore_evas_resize(Ecore_Evas *ee, int w, int h) +{ + if (w < 1) w = 1; + if (h < 1) h = 1; + ee->req.w = w; + ee->req.h = h; + if ((w == ee->w) && (h == ee->h)) return; + ee->w = w; + ee->h = h; + + /* + * No need for it if not used later. + Extn *extn; + + extn = ee->engine.buffer.data; + */ + if (ee->engine.buffer.image) + evas_object_image_size_set(ee->engine.buffer.image, ee->w, ee->h); + /* Server can have many plugs, so I block resize comand from client to server * + if ((extn) && (extn->ipc.server)) + { + Ipc_Data_Resize ipc; + + ipc.w = ee->w; + ipc.h = ee->h; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_RESIZE, 0, 0, 0, &ipc, sizeof(ipc)); + }*/ + if (ee->func.fn_resize) ee->func.fn_resize(ee); +} + +static void +_ecore_evas_move_resize(Ecore_Evas *ee, int x __UNUSED__, int y __UNUSED__, int w, int h) +{ + _ecore_evas_resize(ee, w, h); +} + +static int +_ecore_evas_modifiers_locks_mask_get(Evas *e) +{ + int mask = 0; + + if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Shift")) + mask |= MOD_SHIFT; + if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Control")) + mask |= MOD_CTRL; + if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Alt")) + mask |= MOD_ALT; + if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Meta")) + mask |= MOD_META; + if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Hyper")) + mask |= MOD_HYPER; + if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Super")) + mask |= MOD_SUPER; + if (evas_key_lock_is_set(evas_key_lock_get(e), "Scroll_Lock")) + mask |= MOD_SCROLL; + if (evas_key_lock_is_set(evas_key_lock_get(e), "Num_Lock")) + mask |= MOD_NUM; + if (evas_key_lock_is_set(evas_key_lock_get(e), "Caps_Lock")) + mask |= MOD_CAPS; + return mask; +} + +static void +_ecore_evas_modifiers_locks_mask_set(Evas *e, int mask) +{ + if (mask & MOD_SHIFT) evas_key_modifier_on (e, "Shift"); + else evas_key_modifier_off(e, "Shift"); + if (mask & MOD_CTRL) evas_key_modifier_on (e, "Control"); + else evas_key_modifier_off(e, "Control"); + if (mask & MOD_ALT) evas_key_modifier_on (e, "Alt"); + else evas_key_modifier_off(e, "Alt"); + if (mask & MOD_META) evas_key_modifier_on (e, "Meta"); + else evas_key_modifier_off(e, "Meta"); + if (mask & MOD_HYPER) evas_key_modifier_on (e, "Hyper"); + else evas_key_modifier_off(e, "Hyper"); + if (mask & MOD_SUPER) evas_key_modifier_on (e, "Super"); + else evas_key_modifier_off(e, "Super"); + if (mask & MOD_SCROLL) evas_key_lock_on (e, "Scroll_Lock"); + else evas_key_lock_off(e, "Scroll_Lock"); + if (mask & MOD_NUM) evas_key_lock_on (e, "Num_Lock"); + else evas_key_lock_off(e, "Num_Lock"); + if (mask & MOD_CAPS) evas_key_lock_on (e, "Caps_Lock"); + else evas_key_lock_off(e, "Caps_Lock"); +} + +static void +_ecore_evas_extn_cb_mouse_in(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +{ + Ecore_Evas *ee = data; + Evas_Event_Mouse_In *ev = event_info; + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->ipc.server) + { + Ipc_Data_Ev_Mouse_In ipc; + + ipc.timestamp = ev->timestamp; + ipc.mask = _ecore_evas_modifiers_locks_mask_get(ee->evas); + ipc.event_flags = ev->event_flags; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_EV_MOUSE_IN, 0, 0, 0, &ipc, sizeof(ipc)); + } +} + +static void +_ecore_evas_extn_cb_mouse_out(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +{ + Ecore_Evas *ee = data; + Evas_Event_Mouse_Out *ev = event_info; + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->ipc.server) + { + Ipc_Data_Ev_Mouse_Out ipc; + + ipc.timestamp = ev->timestamp; + ipc.mask = _ecore_evas_modifiers_locks_mask_get(ee->evas); + ipc.event_flags = ev->event_flags; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_EV_MOUSE_OUT, 0, 0, 0, &ipc, sizeof(ipc)); + } +} + +static void +_ecore_evas_extn_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +{ + Ecore_Evas *ee = data; + Evas_Event_Mouse_Down *ev = event_info; + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->ipc.server) + { + Ipc_Data_Ev_Mouse_Down ipc; + + ipc.b = ev->button; + ipc.flags = ev->flags; + ipc.timestamp = ev->timestamp; + ipc.mask = _ecore_evas_modifiers_locks_mask_get(ee->evas); + ipc.event_flags = ev->event_flags; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_EV_MOUSE_DOWN, 0, 0, 0, &ipc, sizeof(ipc)); + } +} + +static void +_ecore_evas_extn_cb_mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +{ + Ecore_Evas *ee = data; + Evas_Event_Mouse_Up *ev = event_info; + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->ipc.server) + { + Ipc_Data_Ev_Mouse_Up ipc; + + ipc.b = ev->button; + ipc.flags = ev->flags; + ipc.timestamp = ev->timestamp; + ipc.mask = _ecore_evas_modifiers_locks_mask_get(ee->evas); + ipc.event_flags = ev->event_flags; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_EV_MOUSE_UP, 0, 0, 0, &ipc, sizeof(ipc)); + } +} + +static void +_ecore_evas_extn_cb_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +{ + Ecore_Evas *ee = data; + Evas_Event_Mouse_Move *ev = event_info; + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->ipc.server) + { + Ipc_Data_Ev_Mouse_Move ipc; + Evas_Coord x, y; + + x = ev->cur.canvas.x; + y = ev->cur.canvas.y; + _ecore_evas_extn_coord_translate(ee, &x, &y); + ipc.x = x; + ipc.y = y; + ipc.timestamp = ev->timestamp; + ipc.mask = _ecore_evas_modifiers_locks_mask_get(ee->evas); + ipc.event_flags = ev->event_flags; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_EV_MOUSE_MOVE, 0, 0, 0, &ipc, sizeof(ipc)); + } +} + +static void +_ecore_evas_extn_cb_mouse_wheel(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +{ + Ecore_Evas *ee = data; + Evas_Event_Mouse_Wheel *ev = event_info; + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->ipc.server) + { + Ipc_Data_Ev_Mouse_Wheel ipc; + + ipc.direction = ev->direction; + ipc.z = ev->z; + ipc.timestamp = ev->timestamp; + ipc.mask = _ecore_evas_modifiers_locks_mask_get(ee->evas); + ipc.event_flags = ev->event_flags; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_EV_MOUSE_WHEEL, 0, 0, 0, &ipc, sizeof(ipc)); + } +} + +static void +_ecore_evas_extn_cb_multi_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +{ + Ecore_Evas *ee = data; + Evas_Event_Multi_Down *ev = event_info; + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->ipc.server) + { + Ipc_Data_Ev_Multi_Down ipc; + Evas_Coord x, y; + + ipc.d = ev->device; + x = ev->canvas.x; + y = ev->canvas.y; + _ecore_evas_extn_coord_translate(ee, &x, &y); + ipc.x = x; + ipc.y = y; + ipc.rad = ev->radius; + ipc.radx = ev->radius_x; + ipc.rady = ev->radius_y; + ipc.pres = ev->pressure; + ipc.ang = ev->angle; + ipc.fx = ev->canvas.xsub; + ipc.fy = ev->canvas.ysub; + ipc.flags = ev->flags; + ipc.timestamp = ev->timestamp; + ipc.mask = _ecore_evas_modifiers_locks_mask_get(ee->evas); + ipc.event_flags = ev->event_flags; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_EV_MULTI_DOWN, 0, 0, 0, &ipc, sizeof(ipc)); + } +} + + +static void +_ecore_evas_extn_cb_multi_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +{ + Ecore_Evas *ee = data; + Evas_Event_Multi_Up *ev = event_info; + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->ipc.server) + { + Ipc_Data_Ev_Multi_Up ipc; + Evas_Coord x, y; + + ipc.d = ev->device; + x = ev->canvas.x; + y = ev->canvas.y; + _ecore_evas_extn_coord_translate(ee, &x, &y); + ipc.x = x; + ipc.y = y; + ipc.rad = ev->radius; + ipc.radx = ev->radius_x; + ipc.rady = ev->radius_y; + ipc.pres = ev->pressure; + ipc.ang = ev->angle; + ipc.fx = ev->canvas.xsub; + ipc.fy = ev->canvas.ysub; + ipc.flags = ev->flags; + ipc.timestamp = ev->timestamp; + ipc.mask = _ecore_evas_modifiers_locks_mask_get(ee->evas); + ipc.event_flags = ev->event_flags; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_EV_MULTI_UP, 0, 0, 0, &ipc, sizeof(ipc)); + } +} + +static void +_ecore_evas_extn_cb_multi_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +{ + Ecore_Evas *ee = data; + Evas_Event_Multi_Move *ev = event_info; + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->ipc.server) + { + Ipc_Data_Ev_Multi_Move ipc; + Evas_Coord x, y; + + ipc.d = ev->device; + x = ev->cur.canvas.x; + y = ev->cur.canvas.y; + _ecore_evas_extn_coord_translate(ee, &x, &y); + ipc.x = x; + ipc.y = y; + ipc.rad = ev->radius; + ipc.radx = ev->radius_x; + ipc.rady = ev->radius_y; + ipc.pres = ev->pressure; + ipc.ang = ev->angle; + ipc.fx = ev->cur.canvas.xsub; + ipc.fy = ev->cur.canvas.ysub; + ipc.timestamp = ev->timestamp; + ipc.mask = _ecore_evas_modifiers_locks_mask_get(ee->evas); + ipc.event_flags = ev->event_flags; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_EV_MULTI_MOVE, 0, 0, 0, &ipc, sizeof(ipc)); + } +} + +static void +_ecore_evas_extn_cb_free(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +{ + Ecore_Evas *ee; + + ee = data; + if (ee->driver) _ecore_evas_free(ee); +} + +static void +_ecore_evas_extn_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +{ + Ecore_Evas *ee = data; + Evas_Event_Key_Down *ev = event_info; + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->ipc.server) + { + Ipc_Data_Ev_Key_Down *ipc; + char *st, *p; + int len = 0; + + len = sizeof(Ipc_Data_Ev_Key_Down); + if (ev->key) len += strlen(ev->key) + 1; + if (ev->keyname) len += strlen(ev->keyname) + 1; + if (ev->string) len += strlen(ev->string) + 1; + if (ev->compose) len += strlen(ev->compose) + 1; + len += 1; + st = alloca(len); + ipc = (Ipc_Data_Ev_Key_Down *)st; + memset(st, 0, len); + p = st + sizeof(Ipc_Data_Ev_Key_Down); + if (ev->key) + { + strcpy(p, ev->key); + ipc->key = p - (long)st; + p += strlen(p) + 1; + } + if (ev->keyname) + { + strcpy(p, ev->keyname); + ipc->keyname = p - (long)st; + p += strlen(p) + 1; + } + if (ev->string) + { + strcpy(p, ev->string); + ipc->string = p - (long)st; + p += strlen(p) + 1; + } + if (ev->compose) + { + strcpy(p, ev->compose); + ipc->compose = p - (long)st; + p += strlen(p) + 1; + } + ipc->timestamp = ev->timestamp; + ipc->mask = _ecore_evas_modifiers_locks_mask_get(ee->evas); + ipc->event_flags = ev->event_flags; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_EV_KEY_DOWN, 0, 0, 0, ipc, len); + } +} + +static void +_ecore_evas_extn_cb_key_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +{ + Ecore_Evas *ee = data; + Evas_Event_Key_Up *ev = event_info; + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->ipc.server) + { + Ipc_Data_Ev_Key_Up *ipc; + char *st, *p; + int len = 0; + + len = sizeof(Ipc_Data_Ev_Key_Up); + if (ev->key) len += strlen(ev->key) + 1; + if (ev->keyname) len += strlen(ev->keyname) + 1; + if (ev->string) len += strlen(ev->string) + 1; + if (ev->compose) len += strlen(ev->compose) + 1; + len += 1; + st = alloca(len); + ipc = (Ipc_Data_Ev_Key_Up *)st; + memset(st, 0, len); + p = st + sizeof(Ipc_Data_Ev_Key_Down); + if (ev->key) + { + strcpy(p, ev->key); + ipc->key = p - (long)st; + p += strlen(p) + 1; + } + if (ev->keyname) + { + strcpy(p, ev->keyname); + ipc->keyname = p - (long)st; + p += strlen(p) + 1; + } + if (ev->string) + { + strcpy(p, ev->string); + ipc->string = p - (long)st; + p += strlen(p) + 1; + } + if (ev->compose) + { + strcpy(p, ev->compose); + ipc->compose = p - (long)st; + p += strlen(p) + 1; + } + ipc->timestamp = ev->timestamp; + ipc->mask = _ecore_evas_modifiers_locks_mask_get(ee->evas); + ipc->event_flags = ev->event_flags; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_EV_KEY_UP, 0, 0, 0, ipc, len); + } +} + +static void +_ecore_evas_extn_cb_hold(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +{ + Ecore_Evas *ee = data; + Evas_Event_Hold *ev = event_info; + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return; + if (extn->ipc.server) + { + Ipc_Data_Ev_Hold ipc; + + ipc.hold = ev->hold; + ipc.timestamp = ev->timestamp; + ipc.event_flags = ev->event_flags; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_EV_HOLD, 0, 0, 0, &ipc, sizeof(ipc)); + } +} + +static void +_ecore_evas_extn_cb_focus_in(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +{ + Ecore_Evas *ee; + Extn *extn; + + ee = data; + ee->prop.focused = 1; + extn = ee->engine.buffer.data; + if (!extn) return; + if (!extn->ipc.server) return; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_FOCUS, 0, 0, 0, NULL, 0); +} + +static void +_ecore_evas_extn_cb_focus_out(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +{ + Ecore_Evas *ee; + Extn *extn; + + ee = data; + ee->prop.focused = 0; + extn = ee->engine.buffer.data; + if (!extn) return; + if (!extn->ipc.server) return; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_UNFOCUS, 0, 0, 0, NULL, 0); +} + +static void +_ecore_evas_extn_cb_show(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +{ + Ecore_Evas *ee; + Extn *extn; + + ee = data; + ee->visible = 1; + extn = ee->engine.buffer.data; + if (!extn) return; + if (!extn->ipc.server) return; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_SHOW, 0, 0, 0, NULL, 0); +} + +static void +_ecore_evas_extn_cb_hide(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +{ + Ecore_Evas *ee; + Extn *extn; + + ee = data; + ee->visible = 0; + extn = ee->engine.buffer.data; + if (!extn) return; + if (!extn->ipc.server) return; + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_HIDE, 0, 0, 0, NULL, 0); +} + +static const Ecore_Evas_Engine_Func _ecore_extn_plug_engine_func = +{ + _ecore_evas_extn_free, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + _ecore_evas_resize, + _ecore_evas_move_resize, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, //transparent + + NULL, // render + NULL // screen_geometry_get +}; + +static Eina_Bool +_ipc_server_add(void *data, int type __UNUSED__, void *event) +{ + Ecore_Ipc_Event_Server_Add *e = event; + Ecore_Evas *ee = data; + Extn *extn; + + if (ee != ecore_ipc_server_data_get(e->server)) + return ECORE_CALLBACK_PASS_ON; + if (!eina_list_data_find(extn_ee_list, ee)) + return ECORE_CALLBACK_PASS_ON; + extn = ee->engine.buffer.data; + if (!extn) return ECORE_CALLBACK_PASS_ON; + //FIXME: find a way to let app know server there + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_ipc_server_del(void *data, int type __UNUSED__, void *event) +{ + Ecore_Ipc_Event_Server_Del *e = event; + Ecore_Evas *ee = data; + Extn *extn; + + extn = ee->engine.buffer.data; + if (!extn) return ECORE_CALLBACK_PASS_ON; + if (extn->ipc.server != e->server) return ECORE_CALLBACK_PASS_ON; + evas_object_image_data_set(ee->engine.buffer.image, NULL); + ee->engine.buffer.pixels = NULL; + if (extn->file.shmfile) + { + shmfile_close(extn->file.shmfile); + extn->file.shmfile = NULL; + } + if (extn->file.shm) + { + eina_stringshare_del(extn->file.shm); + extn->file.shm = NULL; + } + extn->ipc.server = NULL; + if (ee->func.fn_delete_request) ee->func.fn_delete_request(ee); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_ipc_server_data(void *data, int type __UNUSED__, void *event) +{ + Ecore_Ipc_Event_Server_Data *e = event; + Ecore_Evas *ee = data; + Extn *extn; + + if (ee != ecore_ipc_server_data_get(e->server)) + return ECORE_CALLBACK_PASS_ON; + if (!eina_list_data_find(extn_ee_list, ee)) + return ECORE_CALLBACK_PASS_ON; + extn = ee->engine.buffer.data; + if (!extn) return ECORE_CALLBACK_PASS_ON; + if (e->major != MAJOR) + return ECORE_CALLBACK_PASS_ON; + switch (e->minor) + { + case OP_UPDATE: + // add rect to update list + if (e->size >= (int)sizeof(Ipc_Data_Update)) + { + Ipc_Data_Update *ipc = malloc(sizeof(Ipc_Data_Update)); + if (ipc) + { + memcpy(ipc, e->data, sizeof(Ipc_Data_Update)); + extn->file.updates = eina_list_append(extn->file.updates, ipc); + } + } + break; + case OP_UPDATE_DONE: + // updates finished being sent - done now. frame ready + { + Ipc_Data_Update *ipc; + + EINA_LIST_FREE(extn->file.updates, ipc) + { + if (ee->engine.buffer.image) + evas_object_image_data_update_add(ee->engine.buffer.image, + ipc->x, ipc->y, + ipc->w, ipc->h); + } + } + break; + case OP_LOCK_FILE: + if ((e->data) && (e->size > 0) && + (((unsigned char *)e->data)[e->size - 1] == 0)) + { + if (extn->file.lockfd) close(extn->file.lockfd); + if (extn->file.lock) eina_stringshare_del(extn->file.lock); + extn->file.lock = eina_stringshare_add(e->data); + extn->file.lockfd = open(extn->file.lock, O_RDONLY); + } + break; + case OP_SHM_REF: + // e->ref == w + // e->ref_to == h + // e->response == alpha + // e->data = shm ref string + nul byte + if ((e->data) && ((unsigned char *)e->data)[e->size - 1] == 0) + { + ee->engine.buffer.pixels = NULL; + if (extn->file.shmfile) + { + shmfile_close(extn->file.shmfile); + extn->file.shmfile = NULL; + } + if (extn->file.shm) + { + eina_stringshare_del(extn->file.shm); + extn->file.shm = NULL; + } + if ((e->ref > 0) && (e->ref_to > 0)) + { + extn->file.w = e->ref; + extn->file.h = e->ref_to; + extn->file.shm = eina_stringshare_add(e->data); + extn->file.shmfile = shmfile_open(extn->file.shm, + extn->file.w * + extn->file.h * 4, + EINA_TRUE); + if (extn->file.shmfile) + { + ee->engine.buffer.pixels = extn->file.shmfile->addr; + if (ee->engine.buffer.image) + { + if (e->response) + evas_object_image_alpha_set(ee->engine.buffer.image, + EINA_TRUE); + else + evas_object_image_alpha_set(ee->engine.buffer.image, + EINA_FALSE); + evas_object_image_size_set(ee->engine.buffer.image, + extn->file.w, + extn->file.h); + evas_object_image_data_set(ee->engine.buffer.image, + ee->engine.buffer.pixels); + evas_object_image_data_update_add(ee->engine.buffer.image, + 0, 0, + extn->file.w, + extn->file.h); + _ecore_evas_resize(ee, + extn->file.w, + extn->file.h); + } + else + evas_object_image_data_set(ee->engine.buffer.image, NULL); + } + else + evas_object_image_data_set(ee->engine.buffer.image, NULL); + } + else + evas_object_image_data_set(ee->engine.buffer.image, NULL); + } + break; + case OP_RESIZE: + if ((e->data) && (e->size >= (int)sizeof(Ipc_Data_Resize))) + { + Ipc_Data_Resize *ipc = e->data; + _ecore_evas_resize(ee, ipc->w, ipc->h); + } + break; + default: + break; + } + return ECORE_CALLBACK_PASS_ON; +} +#else +void +_ecore_evas_extn_init(void) +{ +} + +void +_ecore_evas_extn_shutdown(void) +{ +} +#endif + +EAPI Evas_Object * +ecore_evas_extn_plug_new(Ecore_Evas *ee_target) +{ +#ifdef EXTN_ENABLED + Evas_Object *o; + Ecore_Evas *ee; + int w = 1, h = 1; + + if (!ee_target) return NULL; + + ee = calloc(1, sizeof(Ecore_Evas)); + if (!ee) return NULL; + + o = evas_object_image_filled_add(ee_target->evas); + evas_object_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC); + evas_object_image_colorspace_set(o, EVAS_COLORSPACE_ARGB8888); + evas_object_image_alpha_set(o, 1); + evas_object_image_size_set(o, 1, 1); + evas_object_image_data_set(o, &blank); + + ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS); + + ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_extn_plug_engine_func; + + ee->driver = "extn_plug"; + + ee->rotation = 0; + ee->visible = 0; + ee->w = w; + ee->h = h; + ee->req.w = ee->w; + ee->req.h = ee->h; + + ee->prop.max.w = 0; + ee->prop.max.h = 0; + ee->prop.layer = 0; + ee->prop.focused = 0; + ee->prop.borderless = 1; + ee->prop.override = 1; + ee->prop.maximized = 0; + ee->prop.fullscreen = 0; + ee->prop.withdrawn = 0; + ee->prop.sticky = 0; + + ee->engine.buffer.image = o; + evas_object_data_set(ee->engine.buffer.image, "Ecore_Evas", ee); + evas_object_data_set(ee->engine.buffer.image, "Ecore_Evas_Parent", ee_target); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_MOUSE_IN, + _ecore_evas_extn_cb_mouse_in, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_MOUSE_OUT, + _ecore_evas_extn_cb_mouse_out, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_MOUSE_DOWN, + _ecore_evas_extn_cb_mouse_down, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_MOUSE_UP, + _ecore_evas_extn_cb_mouse_up, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_MOUSE_MOVE, + _ecore_evas_extn_cb_mouse_move, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_MOUSE_WHEEL, + _ecore_evas_extn_cb_mouse_wheel, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_MULTI_DOWN, + _ecore_evas_extn_cb_multi_down, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_MULTI_UP, + _ecore_evas_extn_cb_multi_up, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_MULTI_MOVE, + _ecore_evas_extn_cb_multi_move, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_FREE, + _ecore_evas_extn_cb_free, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_KEY_DOWN, + _ecore_evas_extn_cb_key_down, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_KEY_UP, + _ecore_evas_extn_cb_key_up, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_HOLD, + _ecore_evas_extn_cb_hold, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_FOCUS_IN, + _ecore_evas_extn_cb_focus_in, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_FOCUS_OUT, + _ecore_evas_extn_cb_focus_out, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_SHOW, + _ecore_evas_extn_cb_show, ee); + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_HIDE, + _ecore_evas_extn_cb_hide, ee); + + evas_object_event_callback_add(ee->engine.buffer.image, + EVAS_CALLBACK_DEL, + _ecore_evas_extn_plug_image_obj_del, ee); + + + extn_ee_list = eina_list_append(extn_ee_list, ee); + ee_target->sub_ecore_evas = eina_list_append(ee_target->sub_ecore_evas, ee); + + evas_event_callback_add(ee_target->evas, EVAS_CALLBACK_RENDER_PRE, + _ecore_evas_extn_plug_targer_render_pre, ee); + evas_event_callback_add(ee_target->evas, EVAS_CALLBACK_RENDER_POST, + _ecore_evas_extn_plug_targer_render_post, ee); + return o; +#else + return NULL; +#endif +} + +EAPI Eina_Bool +ecore_evas_extn_plug_connect(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys) +{ +#ifdef EXTN_ENABLED + Extn *extn; + Ecore_Evas *ee = NULL; + + if (!obj) return EINA_FALSE; + + ee = evas_object_data_get(obj, "Ecore_Evas"); + if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) return EINA_FALSE; + + extn = calloc(1, sizeof(Extn)); + if (!extn) return EINA_FALSE; + + Ecore_Ipc_Type ipctype = ECORE_IPC_LOCAL_USER; + + ecore_ipc_init(); + extn->svc.name = eina_stringshare_add(svcname); + extn->svc.num = svcnum; + extn->svc.sys = svcsys; + + if (extn->svc.sys) ipctype = ECORE_IPC_LOCAL_SYSTEM; + extn->ipc.server = ecore_ipc_server_connect(ipctype, (char *)extn->svc.name, + extn->svc.num, ee); + if (!extn->ipc.server) + { + eina_stringshare_del(extn->svc.name); + free(extn); + ecore_ipc_shutdown(); + return EINA_FALSE; + } + ee->engine.buffer.data = extn; + extn->ipc.handlers = eina_list_append + (extn->ipc.handlers, + ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_ADD, + _ipc_server_add, ee)); + extn->ipc.handlers = eina_list_append + (extn->ipc.handlers, + ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_DEL, + _ipc_server_del, ee)); + extn->ipc.handlers = eina_list_append + (extn->ipc.handlers, + ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_DATA, + _ipc_server_data, ee)); + return EINA_TRUE; +#else + return EINA_FALSE; +#endif +} + +EAPI void +ecore_evas_extn_plug_object_data_lock(Evas_Object *obj) +{ +#ifdef EXTN_ENABLED + Ecore_Evas *ee; + + ee = ecore_evas_object_ecore_evas_get(obj); + if (!ee) return; + _ecore_evas_socket_lock(ee); +#endif +} + +EAPI void +ecore_evas_extn_plug_object_data_unlock(Evas_Object *obj) +{ +#ifdef EXTN_ENABLED + Ecore_Evas *ee; + + ee = ecore_evas_object_ecore_evas_get(obj); + if (!ee) return; + _ecore_evas_socket_unlock(ee); +#endif +} + +#ifdef EXTN_ENABLED +static void +_ecore_evas_socket_resize(Ecore_Evas *ee, int w, int h) +{ + Extn *extn; + Evas_Engine_Info_Buffer *einfo; + int stride = 0; + + if (w < 1) w = 1; + if (h < 1) h = 1; + ee->req.w = w; + ee->req.h = h; + if ((w == ee->w) && (h == ee->h)) return; + ee->w = w; + ee->h = h; + 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); + extn = ee->engine.buffer.data; + if (extn) + { + if (extn->file.shmfile) + shmfile_free(extn->file.shmfile); + ee->engine.buffer.pixels = NULL; + extn->file.shmfile = shmfile_new(extn->svc.name, extn->svc.num, + ee->w * ee->h * 4, extn->svc.sys); + if (extn->file.shmfile) + ee->engine.buffer.pixels = extn->file.shmfile->addr; + + stride = ee->w * 4; + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ee->evas); + if (einfo) + { + if (ee->alpha) + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32; + else + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_RGB32; + einfo->info.dest_buffer = ee->engine.buffer.pixels; + einfo->info.dest_buffer_row_bytes = stride; + 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; + if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) + { + ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + } + } + + if (extn->ipc.clients && extn->file.shmfile) + { + Ipc_Data_Resize ipc; + Eina_List *l; + Ecore_Ipc_Client *client; + + EINA_LIST_FOREACH(extn->ipc.clients, l, client) + ecore_ipc_client_send(client, MAJOR, OP_SHM_REF, + ee->w, ee->h, ee->alpha, + extn->file.shmfile->file, + strlen(extn->file.shmfile->file) + 1); + ipc.w = ee->w; + ipc.h = ee->h; + EINA_LIST_FOREACH(extn->ipc.clients, l, client) + ecore_ipc_client_send(client, MAJOR, OP_RESIZE, + 0, 0, 0, &ipc, sizeof(ipc)); + } + } + if (ee->func.fn_resize) ee->func.fn_resize(ee); +} + +static void +_ecore_evas_socket_move_resize(Ecore_Evas *ee, int x __UNUSED__, int y __UNUSED__, int w, int h) +{ + _ecore_evas_socket_resize(ee, w, h); +} + +int +_ecore_evas_extn_socket_render(Ecore_Evas *ee) +{ + Eina_List *updates = NULL, *l, *ll; + Ecore_Evas *ee2; + int rend = 0; + Eina_Rectangle *r; + Extn *extn; + Ecore_Ipc_Client *client; + + extn = ee->engine.buffer.data; + EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2) + { + if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2); + if (ee2->engine.func->fn_render) + rend |= ee2->engine.func->fn_render(ee2); + if (ee2->func.fn_post_render) ee2->func.fn_post_render(ee2); + } + if (ee->engine.buffer.pixels) + { + _ecore_evas_socket_lock(ee); + updates = evas_render_updates(ee->evas); + _ecore_evas_socket_unlock(ee); + } + EINA_LIST_FOREACH(updates, l, r) + { + Ipc_Data_Update ipc; + + + ipc.x = r->x; + ipc.y = r->y; + ipc.w = r->w; + ipc.h = r->h; + EINA_LIST_FOREACH(extn->ipc.clients, ll, client) + ecore_ipc_client_send(client, MAJOR, OP_UPDATE, 0, 0, 0, &ipc, sizeof(ipc)); + } + if (updates) + { + evas_render_updates_free(updates); + _ecore_evas_idle_timeout_update(ee); + EINA_LIST_FOREACH(extn->ipc.clients, ll, client) + ecore_ipc_client_send(client, MAJOR, OP_UPDATE_DONE, 0, 0, 0, NULL, 0); + } + + return updates ? 1 : rend; +} + +static Eina_Bool +_ipc_client_add(void *data, int type __UNUSED__, void *event) +{ + Ecore_Ipc_Event_Client_Add *e = event; + Ecore_Evas *ee = data; + Extn *extn; + + if (ee != ecore_ipc_server_data_get(ecore_ipc_client_server_get(e->client))) + return ECORE_CALLBACK_PASS_ON; + if (!eina_list_data_find(extn_ee_list, ee)) + return ECORE_CALLBACK_PASS_ON; + extn = ee->engine.buffer.data; + if (!extn) return ECORE_CALLBACK_PASS_ON; + + extn->ipc.clients = eina_list_append(extn->ipc.clients, e->client); + ecore_ipc_client_send(e->client, MAJOR, OP_LOCK_FILE, 0, 0, 0, extn->file.lock, strlen(extn->file.lock) + 1); + + if (extn->file.shmfile) + { + Ipc_Data_Resize ipc; + + ecore_ipc_client_send(e->client, MAJOR, OP_SHM_REF, + ee->w, ee->h, ee->alpha, + extn->file.shmfile->file, + strlen(extn->file.shmfile->file) + 1); + ipc.w = ee->w; + ipc.h = ee->h; + + ecore_ipc_client_send(e->client, MAJOR, OP_RESIZE, + 0, 0, 0, &ipc, sizeof(ipc)); + } + _ecore_evas_extn_event(ee, ECORE_EVAS_EXTN_CLIENT_ADD); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_ipc_client_del(void *data, int type __UNUSED__, void *event) +{ + Ecore_Ipc_Event_Client_Del *e = event; + Ecore_Evas *ee = data; + Extn *extn; + extn = ee->engine.buffer.data; + if (!extn) return ECORE_CALLBACK_PASS_ON; + if (!eina_list_data_find(extn->ipc.clients, e->client)) return ECORE_CALLBACK_PASS_ON; + + extn->ipc.clients = eina_list_remove(extn->ipc.clients, e->client); + + _ecore_evas_extn_event(ee, ECORE_EVAS_EXTN_CLIENT_DEL); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_ipc_client_data(void *data, int type __UNUSED__, void *event) +{ + Ecore_Ipc_Event_Client_Data *e = event; + Ecore_Evas *ee = data; + Extn *extn; + + if (ee != ecore_ipc_server_data_get(ecore_ipc_client_server_get(e->client))) + return ECORE_CALLBACK_PASS_ON; + if (!eina_list_data_find(extn_ee_list, ee)) + return ECORE_CALLBACK_PASS_ON; + extn = ee->engine.buffer.data; + if (!extn) return ECORE_CALLBACK_PASS_ON; + if (e->major != MAJOR) + return ECORE_CALLBACK_PASS_ON; + switch (e->minor) + { + case OP_RESIZE: + if ((e->data) && (e->size >= (int)sizeof(Ipc_Data_Resize))) + { + + Ipc_Data_Resize *ipc = e->data; + /* create callbacke data size changed */ + _ecore_evas_socket_resize(ee, ipc->w, ipc->h); + } + break; + case OP_SHOW: + if (!ee->visible) + { + ee->visible = 1; + if (ee->func.fn_show) ee->func.fn_show(ee); + } + break; + case OP_HIDE: + if (ee->visible) + { + ee->visible = 0; + if (ee->func.fn_hide) ee->func.fn_hide(ee); + } + break; + case OP_FOCUS: + if (!ee->prop.focused) + { + ee->prop.focused = 1; + evas_focus_in(ee->evas); + if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee); + } + break; + case OP_UNFOCUS: + if (ee->prop.focused) + { + ee->prop.focused = 0; + evas_focus_out(ee->evas); + if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee); + } + break; + case OP_EV_MOUSE_IN: + if (e->size >= (int)sizeof(Ipc_Data_Ev_Mouse_In)) + { + Ipc_Data_Ev_Mouse_In *ipc = e->data; + Evas_Event_Flags flags; + + flags = evas_event_default_flags_get(ee->evas); + evas_event_default_flags_set(ee->evas, ipc->event_flags); + _ecore_evas_modifiers_locks_mask_set(ee->evas, ipc->mask); + evas_event_feed_mouse_in(ee->evas, ipc->timestamp, NULL); + evas_event_default_flags_set(ee->evas, flags); + } + break; + case OP_EV_MOUSE_OUT: + if (e->size >= (int)sizeof(Ipc_Data_Ev_Mouse_Out)) + { + Ipc_Data_Ev_Mouse_Out *ipc = e->data; + Evas_Event_Flags flags; + + flags = evas_event_default_flags_get(ee->evas); + evas_event_default_flags_set(ee->evas, ipc->event_flags); + _ecore_evas_modifiers_locks_mask_set(ee->evas, ipc->mask); + evas_event_feed_mouse_out(ee->evas, ipc->timestamp, NULL); + evas_event_default_flags_set(ee->evas, flags); + } + break; + case OP_EV_MOUSE_UP: + if (e->size >= (int)sizeof(Ipc_Data_Ev_Mouse_Up)) + { + Ipc_Data_Ev_Mouse_Up *ipc = e->data; + Evas_Event_Flags flags; + + flags = evas_event_default_flags_get(ee->evas); + evas_event_default_flags_set(ee->evas, ipc->event_flags); + _ecore_evas_modifiers_locks_mask_set(ee->evas, ipc->mask); + evas_event_feed_mouse_up(ee->evas, ipc->b, ipc->flags, ipc->timestamp, NULL); + evas_event_default_flags_set(ee->evas, flags); + } + break; + case OP_EV_MOUSE_DOWN: + if (e->size >= (int)sizeof(Ipc_Data_Ev_Mouse_Down)) + { + Ipc_Data_Ev_Mouse_Up *ipc = e->data; + Evas_Event_Flags flags; + + flags = evas_event_default_flags_get(ee->evas); + evas_event_default_flags_set(ee->evas, ipc->event_flags); + _ecore_evas_modifiers_locks_mask_set(ee->evas, ipc->mask); + evas_event_feed_mouse_down(ee->evas, ipc->b, ipc->flags, ipc->timestamp, NULL); + evas_event_default_flags_set(ee->evas, flags); + } + break; + case OP_EV_MOUSE_MOVE: + if (e->size >= (int)sizeof(Ipc_Data_Ev_Mouse_Move)) + { + Ipc_Data_Ev_Mouse_Move *ipc = e->data; + Evas_Event_Flags flags; + + flags = evas_event_default_flags_get(ee->evas); + evas_event_default_flags_set(ee->evas, ipc->event_flags); + _ecore_evas_modifiers_locks_mask_set(ee->evas, ipc->mask); + evas_event_feed_mouse_move(ee->evas, ipc->x, ipc->y, ipc->timestamp, NULL); + evas_event_default_flags_set(ee->evas, flags); + } + break; + case OP_EV_MOUSE_WHEEL: + if (e->size >= (int)sizeof(Ipc_Data_Ev_Mouse_Wheel)) + { + Ipc_Data_Ev_Mouse_Wheel *ipc = e->data; + Evas_Event_Flags flags; + + flags = evas_event_default_flags_get(ee->evas); + evas_event_default_flags_set(ee->evas, ipc->event_flags); + _ecore_evas_modifiers_locks_mask_set(ee->evas, ipc->mask); + evas_event_feed_mouse_wheel(ee->evas, ipc->direction, ipc->z, ipc->timestamp, NULL); + evas_event_default_flags_set(ee->evas, flags); + } + break; + case OP_EV_MULTI_UP: + if (e->size >= (int)sizeof(Ipc_Data_Ev_Multi_Up)) + { + Ipc_Data_Ev_Multi_Up *ipc = e->data; + Evas_Event_Flags flags; + + flags = evas_event_default_flags_get(ee->evas); + evas_event_default_flags_set(ee->evas, ipc->event_flags); + _ecore_evas_modifiers_locks_mask_set(ee->evas, ipc->mask); + evas_event_feed_multi_up(ee->evas, ipc->d, ipc->x, ipc->y, ipc->rad, ipc->radx, ipc->rady, ipc->pres, ipc->ang, ipc->fx, ipc->fy, ipc->flags, ipc->timestamp, NULL); + evas_event_default_flags_set(ee->evas, flags); + } + break; + case OP_EV_MULTI_DOWN: + if (e->size >= (int)sizeof(Ipc_Data_Ev_Multi_Down)) + { + Ipc_Data_Ev_Multi_Down *ipc = e->data; + Evas_Event_Flags flags; + + flags = evas_event_default_flags_get(ee->evas); + evas_event_default_flags_set(ee->evas, ipc->event_flags); + _ecore_evas_modifiers_locks_mask_set(ee->evas, ipc->mask); + evas_event_feed_multi_down(ee->evas, ipc->d, ipc->x, ipc->y, ipc->rad, ipc->radx, ipc->rady, ipc->pres, ipc->ang, ipc->fx, ipc->fy, ipc->flags, ipc->timestamp, NULL); + evas_event_default_flags_set(ee->evas, flags); + } + break; + case OP_EV_MULTI_MOVE: + if (e->size >= (int)sizeof(Ipc_Data_Ev_Multi_Move)) + { + Ipc_Data_Ev_Multi_Move *ipc = e->data; + Evas_Event_Flags flags; + + flags = evas_event_default_flags_get(ee->evas); + evas_event_default_flags_set(ee->evas, ipc->event_flags); + _ecore_evas_modifiers_locks_mask_set(ee->evas, ipc->mask); + evas_event_feed_multi_move(ee->evas, ipc->d, ipc->x, ipc->y, ipc->rad, ipc->radx, ipc->rady, ipc->pres, ipc->ang, ipc->fx, ipc->fy, ipc->timestamp, NULL); + evas_event_default_flags_set(ee->evas, flags); + } + break; + +#define STRGET(val) \ + do { \ + if ((ipc->val) && (ipc->val < (char *)(e->size - 1))) \ + ipc->val = ((char *)ipc) + (long)ipc->val; \ + else \ + ipc->val = NULL; \ + } while (0) + + case OP_EV_KEY_UP: + if (e->size >= (int)sizeof(Ipc_Data_Ev_Key_Up)) + { + if ((e->data) && (e->size > 0) && + (((unsigned char *)e->data)[e->size - 1] == 0)) + { + Ipc_Data_Ev_Key_Up *ipc = e->data; + Evas_Event_Flags flags; + + STRGET(keyname); + STRGET(key); + STRGET(string); + STRGET(compose); + flags = evas_event_default_flags_get(ee->evas); + evas_event_default_flags_set(ee->evas, ipc->event_flags); + _ecore_evas_modifiers_locks_mask_set(ee->evas, ipc->mask); + evas_event_feed_key_up(ee->evas, ipc->keyname, ipc->key, ipc->string, ipc->compose, ipc->timestamp, NULL); + evas_event_default_flags_set(ee->evas, flags); + } + } + break; + case OP_EV_KEY_DOWN: + if (e->size >= (int)sizeof(Ipc_Data_Ev_Key_Down)) + { + if ((e->data) && (e->size > 0) && + (((unsigned char *)e->data)[e->size - 1] == 0)) + { + Ipc_Data_Ev_Key_Down *ipc = e->data; + Evas_Event_Flags flags; + + STRGET(keyname); + STRGET(key); + STRGET(string); + STRGET(compose); + flags = evas_event_default_flags_get(ee->evas); + evas_event_default_flags_set(ee->evas, ipc->event_flags); + _ecore_evas_modifiers_locks_mask_set(ee->evas, ipc->mask); + evas_event_feed_key_down(ee->evas, ipc->keyname, ipc->key, ipc->string, ipc->compose, ipc->timestamp, NULL); + evas_event_default_flags_set(ee->evas, flags); + } + } + break; + case OP_EV_HOLD: + if (e->size >= (int)sizeof(Ipc_Data_Ev_Hold)) + { + Ipc_Data_Ev_Hold *ipc = e->data; + Evas_Event_Flags flags; + + flags = evas_event_default_flags_get(ee->evas); + evas_event_default_flags_set(ee->evas, ipc->event_flags); + evas_event_feed_hold(ee->evas, ipc->hold, ipc->timestamp, NULL); + evas_event_default_flags_set(ee->evas, flags); + } + break; + default: + break; + } + return ECORE_CALLBACK_PASS_ON; +} + +static void +_ecore_evas_extn_socket_alpha_set(Ecore_Evas *ee, int alpha) +{ + Extn *extn; + Eina_List *l; + Ecore_Ipc_Client *client; + + if (((ee->alpha) && (alpha)) || ((!ee->alpha) && (!alpha))) return; + ee->alpha = alpha; + + extn = ee->engine.buffer.data; + if (extn) + { + Evas_Engine_Info_Buffer *einfo; + + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ee->evas); + if (einfo) + { + if (ee->alpha) + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32; + else + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_RGB32; + evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); + evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); + } + EINA_LIST_FOREACH(extn->ipc.clients, l, client) + ecore_ipc_client_send(client, MAJOR, OP_SHM_REF, + ee->w, ee->h, ee->alpha, + extn->file.shmfile->file, + strlen(extn->file.shmfile->file) + 1); + } +} + +static const Ecore_Evas_Engine_Func _ecore_extn_socket_engine_func = +{ + _ecore_evas_extn_free, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + _ecore_evas_socket_resize, + _ecore_evas_socket_move_resize, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + _ecore_evas_extn_socket_alpha_set, + NULL, //transparent + + _ecore_evas_extn_socket_render, // render + NULL // screen_geometry_get +}; + +#endif + +EAPI Ecore_Evas * +ecore_evas_extn_socket_new(int w, int h) +{ +#ifdef EXTN_ENABLED + Evas_Engine_Info_Buffer *einfo; + Ecore_Evas *ee; + int rmethod; + + rmethod = evas_render_method_lookup("buffer"); + if (!rmethod) return NULL; + ee = calloc(1, sizeof(Ecore_Evas)); + if (!ee) return NULL; + + ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS); + + ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_extn_socket_engine_func; + + ee->driver = "extn_socket"; + + ee->rotation = 0; + ee->visible = 0; + ee->w = w; + ee->h = h; + ee->req.w = ee->w; + ee->req.h = ee->h; + + ee->prop.max.w = 0; + ee->prop.max.h = 0; + ee->prop.layer = 0; + ee->prop.focused = 0; + ee->prop.borderless = 1; + ee->prop.override = 1; + ee->prop.maximized = 0; + ee->prop.fullscreen = 0; + ee->prop.withdrawn = 0; + ee->prop.sticky = 0; + + /* init evas here */ + ee->evas = evas_new(); + evas_data_attach_set(ee->evas, ee); + evas_output_method_set(ee->evas, rmethod); + evas_output_size_set(ee->evas, w, h); + evas_output_viewport_set(ee->evas, 0, 0, w, h); + + einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ee->evas); + if (einfo) + { + if (ee->alpha) + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32; + else + einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_RGB32; + einfo->info.dest_buffer = NULL; + einfo->info.dest_buffer_row_bytes = 0; + 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; + 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); + return NULL; + } + } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; + } + evas_key_modifier_add(ee->evas, "Shift"); + evas_key_modifier_add(ee->evas, "Control"); + evas_key_modifier_add(ee->evas, "Alt"); + evas_key_modifier_add(ee->evas, "Meta"); + evas_key_modifier_add(ee->evas, "Hyper"); + evas_key_modifier_add(ee->evas, "Super"); + evas_key_lock_add(ee->evas, "Caps_Lock"); + evas_key_lock_add(ee->evas, "Num_Lock"); + evas_key_lock_add(ee->evas, "Scroll_Lock"); + + extn_ee_list = eina_list_append(extn_ee_list, ee); + + _ecore_evas_register(ee); + + return ee; +#else + return NULL; +#endif +} + +EAPI Eina_Bool +ecore_evas_extn_socket_listen(Ecore_Evas *ee, const char *svcname, int svcnum, Eina_Bool svcsys) +{ +#ifdef EXTN_ENABLED + Extn *extn; + + extn = calloc(1, sizeof(Extn)); + if (!extn) + { + return EINA_FALSE; + } + else + { + Ecore_Ipc_Type ipctype = ECORE_IPC_LOCAL_USER; + char buf[PATH_MAX]; + + ecore_ipc_init(); + extn->svc.name = eina_stringshare_add(svcname); + extn->svc.num = svcnum; + extn->svc.sys = svcsys; + + snprintf(buf, sizeof(buf), "/tmp/ee-lock-XXXXXX"); + extn->file.lockfd = mkstemp(buf); + if (extn->file.lockfd >= 0) + extn->file.lock = eina_stringshare_add(buf); + if ((extn->file.lockfd < 0) || (!extn->file.lock)) + { + if (extn->file.lockfd) + { + close(extn->file.lockfd); + unlink(buf); + } + eina_stringshare_del(extn->svc.name); + if (extn->file.lock) eina_stringshare_del(extn->file.lock); + free(extn); + ecore_ipc_shutdown(); + return EINA_FALSE; + } + + if (extn->svc.sys) ipctype = ECORE_IPC_LOCAL_SYSTEM; + extn->ipc.am_server = EINA_TRUE; + extn->ipc.server = ecore_ipc_server_add(ipctype, + (char *)extn->svc.name, + extn->svc.num, ee); + if (!extn->ipc.server) + { + if (extn->file.lockfd) + { + close(extn->file.lockfd); + if (extn->file.lock) unlink(extn->file.lock); + } + eina_stringshare_del(extn->svc.name); + eina_stringshare_del(extn->file.lock); + free(extn); + ecore_ipc_shutdown(); + return EINA_FALSE; + } + ee->engine.buffer.data = extn; + extn->ipc.handlers = eina_list_append + (extn->ipc.handlers, + ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_ADD, + _ipc_client_add, ee)); + extn->ipc.handlers = eina_list_append + (extn->ipc.handlers, + ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_DEL, + _ipc_client_del, ee)); + extn->ipc.handlers = eina_list_append + (extn->ipc.handlers, + ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_DATA, + _ipc_client_data, ee)); + } + return EINA_TRUE; +#else + return EINA_FALSE; +#endif +} 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 3ee913e..74caada 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_fb.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_fb.c @@ -2,6 +2,7 @@ # include #endif +#include #include #include @@ -154,9 +155,9 @@ _ecore_evas_fb_render(Ecore_Evas *ee) if (ee->visible) { Eina_List *updates; - Eina_List *ll; Ecore_Evas *ee2; + if (ee->func.fn_pre_render) ee->func.fn_pre_render(ee); EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2) @@ -184,31 +185,26 @@ _ecore_evas_fb_render(Ecore_Evas *ee) static int _ecore_evas_fb_init(Ecore_Evas *ee, int w, int h) { + Eina_File_Direct_Info *info; + Eina_Iterator *ls; Ecore_Fb_Input_Device *device; Ecore_Fb_Input_Device_Cap caps; int mouse_handled = 0; - DIR *input_dir; - struct dirent *input_entry; - _ecore_evas_init_count++; if (_ecore_evas_init_count > 1) return _ecore_evas_init_count; ecore_event_evas_init(); /* register all input devices */ - input_dir = opendir("/dev/input/"); - if (!input_dir) return _ecore_evas_init_count; + ls = eina_file_direct_ls("/dev/input/"); - while ((input_entry = readdir(input_dir))) + EINA_ITERATOR_FOREACH(ls, info) { - char device_path[256]; - - if (strncmp(input_entry->d_name, "event", 5) != 0) + if (strncmp(info->path + info->name_start, "event", 5) != 0) continue; - snprintf(device_path, 256, "/dev/input/%s", input_entry->d_name); - if (!(device = ecore_fb_input_device_open(device_path))) + if (!(device = ecore_fb_input_device_open(info->path))) continue; ecore_fb_input_device_window_set(device, ee); @@ -240,7 +236,7 @@ _ecore_evas_fb_init(Ecore_Evas *ee, int w, int h) ecore_evas_input_devices = eina_list_append(ecore_evas_input_devices, device); } } - closedir(input_dir); + eina_iterator_free(ls); if (!mouse_handled) { 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 2c20761..9a88a7a 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_private.h +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_private.h @@ -1,18 +1,6 @@ #ifndef _ECORE_EVAS_PRIVATE_H #define _ECORE_EVAS_PRIVATE_H -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include - -#ifdef HAVE_SYS_MMAN_H -# include -#endif - #include #include #include @@ -91,9 +79,17 @@ # include #endif -/** - Log domain macros and variable - **/ +#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM +# include "Ecore_Wayland.h" +# include +#endif + +#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL +# include "Ecore_Wayland.h" +# include +#endif + +/** Log domain macros and variables **/ extern int _ecore_evas_log_dom; @@ -272,6 +268,17 @@ struct _Ecore_Evas_Engine } ews; #endif +#if defined(BUILD_ECORE_EVAS_WAYLAND_SHM) || defined(BUILD_ECORE_EVAS_WAYLAND_EGL) + struct + { + Evas_Object *frame; + + struct wl_shell_surface *shell_surface; + struct wl_surface *surface; + struct wl_buffer *buffer; + } wl; +#endif + Ecore_Timer *idle_flush_timer; }; @@ -290,6 +297,7 @@ struct _Ecore_Evas Eina_Bool should_be_visible : 1; Eina_Bool alpha : 1; Eina_Bool transparent : 1; + Eina_Bool in : 1; Eina_Hash *data; @@ -334,6 +342,7 @@ struct _Ecore_Evas char withdrawn : 1; char sticky : 1; char request_pos : 1; + char draw_frame : 1; } prop; struct { @@ -394,6 +403,16 @@ void _ecore_evas_ews_events_init(void); int _ecore_evas_ews_shutdown(void); #endif +#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); +#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); +#endif + void _ecore_evas_fps_debug_init(void); void _ecore_evas_fps_debug_shutdown(void); void _ecore_evas_fps_debug_rendertime_add(double t); @@ -430,4 +449,7 @@ void _ecore_evas_mouse_multi_up_process(Ecore_Evas *ee, int device, extern Eina_Bool _ecore_evas_app_comp_sync; +void _ecore_evas_extn_init(void); +void _ecore_evas_extn_shutdown(void); + #endif 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 0849c79..be130ad 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_psl1ght.c @@ -16,7 +16,7 @@ static int _ecore_evas_init_count = 0; static Ecore_Evas *psl1ght_ee = NULL; -static Ecore_Event_Handler *ecore_evas_event_handlers[4] = { +static Ecore_Event_Handler *ecore_evas_event_handlers[5] = { NULL, NULL, NULL, NULL }; @@ -48,7 +48,7 @@ _ecore_evas_psl1ght_event_got_focus(void *data __UNUSED__, int type __UNUSED__, ee->prop.focused = 1; evas_focus_in(ee->evas); if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee); - + return ECORE_CALLBACK_PASS_ON; } @@ -64,7 +64,7 @@ _ecore_evas_psl1ght_event_lost_focus(void *data __UNUSED__, int type __UNUSED__, 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; } @@ -98,6 +98,19 @@ _ecore_evas_psl1ght_event_key_modifiers(void *data __UNUSED__, int type __UNUSED return ECORE_CALLBACK_PASS_ON; } +static Eina_Bool +_ecore_evas_psl1ght_event_quit (void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__) +{ + Ecore_Evas *ee; + + ee = _ecore_evas_psl1ght_match(); + + if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */ + if (ee->func.fn_delete_request) + ee->func.fn_delete_request(ee); + return ECORE_CALLBACK_PASS_ON; +} + static int _ecore_evas_render(Ecore_Evas *ee) { @@ -170,10 +183,21 @@ _ecore_evas_psl1ght_init(int w __UNUSED__, int h __UNUSED__) ecore_event_evas_init(); - ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_PSL1GHT_EVENT_GOT_FOCUS, _ecore_evas_psl1ght_event_got_focus, NULL); - ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_PSL1GHT_EVENT_LOST_FOCUS, _ecore_evas_psl1ght_event_lost_focus, NULL); - ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_PSL1GHT_EVENT_EXPOSE, _ecore_evas_psl1ght_event_video_expose, NULL); - ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_PSL1GHT_EVENT_KEY_MODIFIERS, _ecore_evas_psl1ght_event_key_modifiers, NULL); + ecore_evas_event_handlers[0] = + ecore_event_handler_add(ECORE_PSL1GHT_EVENT_GOT_FOCUS, + _ecore_evas_psl1ght_event_got_focus, NULL); + ecore_evas_event_handlers[1] = + ecore_event_handler_add(ECORE_PSL1GHT_EVENT_LOST_FOCUS, + _ecore_evas_psl1ght_event_lost_focus, NULL); + ecore_evas_event_handlers[2] = + ecore_event_handler_add(ECORE_PSL1GHT_EVENT_EXPOSE, + _ecore_evas_psl1ght_event_video_expose, NULL); + ecore_evas_event_handlers[3] = + ecore_event_handler_add(ECORE_PSL1GHT_EVENT_KEY_MODIFIERS, + _ecore_evas_psl1ght_event_key_modifiers, NULL); + ecore_evas_event_handlers[4] = + ecore_event_handler_add(ECORE_PSL1GHT_EVENT_QUIT, + _ecore_evas_psl1ght_event_quit, NULL); return _ecore_evas_init_count; } @@ -209,6 +233,12 @@ _ecore_evas_psl1ght_free(Ecore_Evas *ee) } static void +_ecore_evas_psl1ght_callback_delete_request_set(Ecore_Evas *ee, void (*func) (Ecore_Evas *ee)) +{ + ee->func.fn_delete_request = func; +} + +static void _ecore_evas_screen_resized(Ecore_Evas *ee) { int w, h; @@ -324,7 +354,7 @@ static Ecore_Evas_Engine_Func _ecore_psl1ght_engine_func = NULL, NULL, NULL, - NULL, + _ecore_evas_psl1ght_callback_delete_request_set, NULL, NULL, NULL, 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 b333d96..a3be2c7 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_sdl.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_sdl.c @@ -15,6 +15,9 @@ # endif #endif +#include +#include + #include "ecore_evas_private.h" #include "Ecore_Evas.h" diff --git a/libraries/ecore/src/lib/ecore_evas/ecore_evas_util.c b/libraries/ecore/src/lib/ecore_evas/ecore_evas_util.c index 95b6d22..839f0c8 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_util.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_util.c @@ -2,6 +2,7 @@ # include #endif +#include #include #include @@ -115,15 +116,16 @@ _ecore_evas_obj_callback_hide(void *data, Evas *e __UNUSED__, Evas_Object *obj _ } static void -_ecore_evas_obj_callback_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) +_ecore_evas_obj_callback_resize(void *data, Evas *e, Evas_Object *obj, void *event_info __UNUSED__) { Ecore_Evas *ee = data; - Evas_Coord ow, oh, w, h; + Evas_Coord ow, oh, fw, fh; evas_object_geometry_get(obj, NULL, NULL, &ow, &oh); - ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); - /*if ((w != ow) || (h != oh))*/ /* avoid recursion on ecore_evas_resize side */ - ecore_evas_resize(ee, ow, oh); + evas_output_framespace_get(e, NULL, NULL, &fw, &fh); + ow += fw; + oh += fh; + ecore_evas_resize(ee, ow, oh); } static void 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 new file mode 100644 index 0000000..72e8555 --- /dev/null +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_egl.c @@ -0,0 +1,1131 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#define LOGFNS 1 + +#ifdef LOGFNS +# include +# define LOGFN(fl, ln, fn) \ + printf("-ECORE_EVAS-WL: %25s: %5i - %s\n", fl, ln, fn); +#else +# define LOGFN(fl, ln, fn) +#endif + +#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL +# include +# include +# include +# include +# include +#endif + +#include +#include +#include + +#include "ecore_evas_private.h" +#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 +{ + Evas_Object *frame, *text; + Evas_Coord x, y, w, h; +}; + +/* local function prototypes */ +static int _ecore_evas_wl_init(void); +static int _ecore_evas_wl_shutdown(void); +static void _ecore_evas_wl_pre_free(Ecore_Evas *ee); +static void _ecore_evas_wl_free(Ecore_Evas *ee); +static void _ecore_evas_wl_callback_resize_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); +static void _ecore_evas_wl_callback_move_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); +static void _ecore_evas_wl_callback_delete_request_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); +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_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_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 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__); + +/* SMART stuff for frame */ +static Evas_Smart *_ecore_evas_wl_smart = NULL; + +static void _ecore_evas_wl_smart_init(void); +static void _ecore_evas_wl_smart_add(Evas_Object *obj); +static void _ecore_evas_wl_smart_del(Evas_Object *obj); +static void _ecore_evas_wl_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h); +static void _ecore_evas_wl_smart_show(Evas_Object *obj); +static void _ecore_evas_wl_smart_hide(Evas_Object *obj); + +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_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_fullscreen_set, + NULL, // _ecore_evas_wl_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_render, + _ecore_evas_wl_screen_geometry_get +}; + +#endif + +#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL +EAPI Ecore_Evas * +ecore_evas_wayland_egl_new(const char *disp_name, int x, int y, int w, int h, int frame) +{ + 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"))) + { + printf("Render method lookup failed for Wayland Egl"); + return NULL; + } + + if (!ecore_wl_init(disp_name)) + { + printf("Failed to initialize Ecore Wayland"); + return NULL; + } + + if (!(ee = calloc(1, sizeof(Ecore_Evas)))) + { + printf("Failed to allocate Ecore_Evas."); + ecore_wl_shutdown(); + return NULL; + } + + ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS); + + _ecore_evas_wl_init(); + + ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_wl_engine_func; + + ee->driver = "wayland_egl"; + if (disp_name) ee->name = strdup(disp_name); + + 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->rotation = 0; + ee->prop.max.w = 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); + evas_output_method_set(ee->evas, method); + 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) + evas_output_framespace_set(ee->evas, 4, 18, 8, 22); + + if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas))) + { + einfo->info.display = ecore_wl_display_get(); + einfo->info.rotation = ee->rotation; + if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) + { + printf("Failed to set Evas Engine Info for '%s'.", ee->driver); + ecore_evas_free(ee); + return NULL; + } + } + else + { + printf("Failed to get Evas Engine Info for '%s'.", ee->driver); + ecore_evas_free(ee); + 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) + { + ee->engine.wl.frame = _ecore_evas_wl_frame_add(ee->evas); + evas_object_is_frame_object_set(ee->engine.wl.frame, EINA_TRUE); + evas_object_move(ee->engine.wl.frame, 0, 0); + } + + ecore_evas_input_event_register(ee); + _ecore_evas_register(ee); + + ecore_event_window_register(ee->prop.window, ee, ee->evas, + (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process, + (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process, + (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process, + (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process); + + evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL); + + return ee; +} + +/* local functions */ +static int +_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_event_handler_add(ECORE_WL_EVENT_MOUSE_IN, + _ecore_evas_wl_event_mouse_in, NULL); + _ecore_evas_wl_event_handlers[5] = + ecore_event_handler_add(ECORE_WL_EVENT_MOUSE_OUT, + _ecore_evas_wl_event_mouse_out, NULL); + _ecore_evas_wl_event_handlers[6] = + ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_IN, + _ecore_evas_wl_event_focus_in, NULL); + _ecore_evas_wl_event_handlers[7] = + ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_OUT, + _ecore_evas_wl_event_focus_out, NULL); + + ecore_event_evas_init(); + + return _ecore_evas_wl_init_count; +} + +static int +_ecore_evas_wl_shutdown(void) +{ + unsigned int i = 0; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + 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++) + { + if (_ecore_evas_wl_event_handlers[i]) + ecore_event_handler_del(_ecore_evas_wl_event_handlers[i]); + } + + ecore_event_evas_shutdown(); + + return _ecore_evas_wl_init_count; +} + +static void +_ecore_evas_wl_pre_free(Ecore_Evas *ee) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (ee->engine.wl.frame) evas_object_del(ee->engine.wl.frame); +} + +static void +_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; + + /* 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_evas_wl_shutdown(); + ecore_wl_shutdown(); +} + +static void +_ecore_evas_wl_callback_resize_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_resize = func; +} + +static void +_ecore_evas_wl_callback_move_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_move = func; +} + +static void +_ecore_evas_wl_callback_delete_request_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_delete_request = func; +} + +static void +_ecore_evas_wl_callback_focus_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_focus_in = func; +} + +static void +_ecore_evas_wl_callback_focus_out_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_focus_out = func; +} + +static void +_ecore_evas_wl_callback_mouse_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_mouse_in = 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->func.fn_move) ee->func.fn_move(ee); +} + +static void +_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; + + 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); */ + /* } */ + + ee->w = w; + ee->h = h; + +// ecore_wl_flush(); + + 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); */ + + if (ee->func.fn_resize) ee->func.fn_resize(ee); +} + +static void +_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); + + /* 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); + + /* create new shell surface */ + ee->engine.wl.shell_surface = + wl_shell_get_shell_surface(ecore_wl_shell_get(), ee->engine.wl.surface); + + /* set the engine surface here. This should trigger an egl window create */ + einfo->info.surface = ee->engine.wl.surface; + 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(); + + ee->visible = 1; + if (ee->func.fn_show) ee->func.fn_show(ee); +} + +static void +_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); + + /* 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; + + ee->visible = 0; + ee->should_be_visible = 0; + if (ee->func.fn_hide) ee->func.fn_hide(ee); +} + +static void +_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); +} + +static void +_ecore_evas_wl_title_set(Ecore_Evas *ee, const char *t) +{ + 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 ((ee->prop.draw_frame) && (ee->engine.wl.frame)) + { + EE_Wl_Smart_Data *sd; + + if (!(sd = evas_object_smart_data_get(ee->engine.wl.frame))) return; + evas_object_text_text_set(sd->text, ee->prop.title); + } +} + +static void +_ecore_evas_wl_name_class_set(Ecore_Evas *ee, const char *n, const char *c) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (ee->prop.name) free(ee->prop.name); + if (ee->prop.clas) free(ee->prop.clas); + ee->prop.name = NULL; + ee->prop.clas = NULL; + if (n) ee->prop.name = strdup(n); + if (c) ee->prop.clas = strdup(c); + /* FIXME: Forward these changes to Wayland somehow */ +} + +static void +_ecore_evas_wl_size_min_set(Ecore_Evas *ee, int w, int h) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (w < 0) w = 0; + if (h < 0) h = 0; + if ((ee->prop.min.w == w) && (ee->prop.min.h == h)) return; + ee->prop.min.w = w; + ee->prop.min.h = h; +} + +static void +_ecore_evas_wl_size_max_set(Ecore_Evas *ee, int w, int h) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (w < 0) w = 0; + if (h < 0) h = 0; + if ((ee->prop.max.w == w) && (ee->prop.max.h == h)) return; + ee->prop.max.w = w; + ee->prop.max.h = h; +} + +static void +_ecore_evas_wl_size_base_set(Ecore_Evas *ee, int w, int h) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (w < 0) w = 0; + if (h < 0) h = 0; + if ((ee->prop.base.w == w) && (ee->prop.base.h == h)) return; + ee->prop.base.w = w; + ee->prop.base.h = h; +} + +static void +_ecore_evas_wl_size_step_set(Ecore_Evas *ee, int w, int h) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (w < 0) w = 0; + if (h < 0) h = 0; + if ((ee->prop.step.w == w) && (ee->prop.step.h == h)) return; + ee->prop.step.w = w; + ee->prop.step.h = h; +} + +static void +_ecore_evas_wl_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y) +{ + 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); +} + +static void +_ecore_evas_wl_object_cursor_del(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +{ + Ecore_Evas *ee; + + if (!(ee = data)) return; + ee->prop.cursor.object = NULL; +} + +static void +_ecore_evas_wl_layer_set(Ecore_Evas *ee, int layer) +{ + 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; +} + +static void +_ecore_evas_wl_focus_set(Ecore_Evas *ee, int focus __UNUSED__) +{ + 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_iconified_set(Ecore_Evas *ee, int iconify) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (ee->prop.iconified == iconify) return; + ee->prop.iconified = iconify; + /* FIXME: Implement this in Wayland someshow */ +} + +static void +_ecore_evas_wl_maximized_set(Ecore_Evas *ee, int max) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (ee->prop.maximized == max) return; + ee->prop.maximized = max; + /* FIXME: Implement this in Wayland someshow */ +} + +static void +_ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full __UNUSED__) +{ + 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); +} + +static int +_ecore_evas_wl_render(Ecore_Evas *ee) +{ + int rend = 0; + + if (!ee) return 0; + if (!ee->visible) + evas_norender(ee->evas); + else + { + Eina_List *ll = NULL, *updates = NULL; + Ecore_Evas *ee2 = NULL; + + if (ee->func.fn_pre_render) ee->func.fn_pre_render(ee); + + EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2) + { + if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2); + if (ee2->engine.func->fn_render) + rend |= ee2->engine.func->fn_render(ee2); + if (ee2->func.fn_post_render) ee2->func.fn_post_render(ee2); + } + + if ((updates = evas_render_updates(ee->evas))) + { + /* if (ee->engine.wl.surface) */ + /* { */ + /* Eina_List *l = NULL; */ + /* Eina_Rectangle *r; */ + + /* EINA_LIST_FOREACH(updates, l, r) */ + /* wl_surface_damage(ee->engine.wl.surface, */ + /* r->x, r->y, r->w, r->h); */ + /* } */ + + 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; +} + +static void +_ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (x) *x = 0; + if (y) *y = 0; + 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) +{ + 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; +} + +static Eina_Bool +_ecore_evas_wl_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_Evas *ee; + Ecore_Wl_Event_Mouse_In *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; + 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); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_ecore_evas_wl_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_Evas *ee; + Ecore_Wl_Event_Mouse_Out *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; + 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); + 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 *ee; + Ecore_Wl_Event_Focus_In *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; + ee->prop.focused = 1; + evas_focus_in(ee->evas); + if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_ecore_evas_wl_event_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_Evas *ee; + Ecore_Wl_Event_Focus_Out *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_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) +{ + Ecore_Evas *ee; + + /* NB: Trap to prevent compositor from crashing */ + if ((width <= 0) || (height <= 0)) return; + + if (!(ee = data)) return; + + printf("EGL Handle Configure Message\n"); + 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_smart_init(void) +{ + if (_ecore_evas_wl_smart) return; + { + static const Evas_Smart_Class sc = + { + "ecore_evas_wl_frame", EVAS_SMART_CLASS_VERSION, + _ecore_evas_wl_smart_add, + _ecore_evas_wl_smart_del, + NULL, + _ecore_evas_wl_smart_resize, + _ecore_evas_wl_smart_show, + _ecore_evas_wl_smart_hide, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + }; + _ecore_evas_wl_smart = evas_smart_class_new(&sc); + } +} + +static void +_ecore_evas_wl_smart_add(Evas_Object *obj) +{ + EE_Wl_Smart_Data *sd; + Evas *evas; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(sd = calloc(1, sizeof(EE_Wl_Smart_Data)))) return; + + evas = evas_object_evas_get(obj); + + sd->x = 0; + sd->y = 0; + sd->w = 1; + sd->h = 1; + + sd->frame = evas_object_rectangle_add(evas); + evas_object_is_frame_object_set(sd->frame, EINA_TRUE); + evas_object_color_set(sd->frame, 249, 249, 249, 255); + evas_object_smart_member_add(sd->frame, obj); + + sd->text = evas_object_text_add(evas); + evas_object_color_set(sd->text, 0, 0, 0, 255); + evas_object_text_style_set(sd->text, EVAS_TEXT_STYLE_PLAIN); + evas_object_text_font_set(sd->text, "Sans", 10); + evas_object_text_text_set(sd->text, "Smart Test"); + + evas_object_smart_data_set(obj, sd); +} + +static void +_ecore_evas_wl_smart_del(Evas_Object *obj) +{ + EE_Wl_Smart_Data *sd; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(sd = evas_object_smart_data_get(obj))) return; + evas_object_del(sd->text); + evas_object_del(sd->frame); + free(sd); +} + +static void +_ecore_evas_wl_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) +{ + EE_Wl_Smart_Data *sd; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(sd = evas_object_smart_data_get(obj))) return; + if ((sd->w == w) && (sd->h == h)) return; + sd->w = w; + sd->h = h; + evas_object_resize(sd->frame, w, h); +} + +static void +_ecore_evas_wl_smart_show(Evas_Object *obj) +{ + EE_Wl_Smart_Data *sd; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(sd = evas_object_smart_data_get(obj))) return; + evas_object_show(sd->frame); + evas_object_show(sd->text); +} + +static void +_ecore_evas_wl_smart_hide(Evas_Object *obj) +{ + EE_Wl_Smart_Data *sd; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(sd = evas_object_smart_data_get(obj))) return; + evas_object_hide(sd->text); + evas_object_hide(sd->frame); +} + +static Evas_Object * +_ecore_evas_wl_frame_add(Evas *evas) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + _ecore_evas_wl_smart_init(); + 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__) +{ + return NULL; +} +#endif 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 new file mode 100644 index 0000000..e3b15c8 --- /dev/null +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_wayland_shm.c @@ -0,0 +1,1257 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +//#define LOGFNS 1 + +#ifdef LOGFNS +# include +# define LOGFN(fl, ln, fn) \ + printf("-ECORE_EVAS-WL: %25s: %5i - %s\n", fl, ln, fn); +#else +# define LOGFN(fl, ln, fn) +#endif + +#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM +# include +# include +# include +# include +# include +#endif + +# include +# include +# include + +# include "ecore_evas_private.h" +# include "Ecore_Evas.h" + +#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM +# include +# include + +/* local structures */ +typedef struct _EE_Wl_Smart_Data EE_Wl_Smart_Data; +struct _EE_Wl_Smart_Data +{ + Evas_Object *frame; + Evas_Object *text; + Evas_Coord x, y, w, h; +}; + +/* local function prototypes */ +static int _ecore_evas_wl_init(void); +static int _ecore_evas_wl_shutdown(void); +static void _ecore_evas_wl_pre_free(Ecore_Evas *ee); +static void _ecore_evas_wl_free(Ecore_Evas *ee); +static void _ecore_evas_wl_callback_resize_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); +static void _ecore_evas_wl_callback_move_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); +static void _ecore_evas_wl_callback_delete_request_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)); +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_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_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 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__); + +/* SMART stuff for frame */ +static Evas_Smart *_ecore_evas_wl_smart = NULL; + +static void _ecore_evas_wl_smart_init(void); +static void _ecore_evas_wl_smart_add(Evas_Object *obj); +static void _ecore_evas_wl_smart_del(Evas_Object *obj); +static void _ecore_evas_wl_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h); +static void _ecore_evas_wl_smart_show(Evas_Object *obj); +static void _ecore_evas_wl_smart_hide(Evas_Object *obj); + +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_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, + 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_render, + _ecore_evas_wl_screen_geometry_get +}; + +/* external variables */ +#endif + +#ifdef BUILD_ECORE_EVAS_WAYLAND_SHM +EAPI Ecore_Evas * +ecore_evas_wayland_shm_new(const char *disp_name, int x, int y, int w, int h, int frame) +{ + 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"))) + { + ERR("Render method lookup failed."); + return NULL; + } + + if (!(ecore_wl_init(disp_name))) + { + ERR("Failed to initialize Ecore Wayland."); + return NULL; + } + + if (!(ee = calloc(1, sizeof(Ecore_Evas)))) + { + ERR("Failed to allocate Ecore_Evas."); + ecore_wl_shutdown(); + return NULL; + } + + ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS); + + _ecore_evas_wl_init(); + + ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_wl_engine_func; + + ee->driver = "wayland_shm"; + if (disp_name) ee->name = strdup(disp_name); + + 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->rotation = 0; + ee->prop.max.w = 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); + evas_output_method_set(ee->evas, method); + 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) + evas_output_framespace_set(ee->evas, 4, 18, 8, 22); + + 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)) + { + ERR("Failed to set Evas Engine Info for '%s'.", ee->driver); + ecore_evas_free(ee); + return NULL; + } + } + else + { + ERR("Failed to get Evas Engine Info for '%s'.", ee->driver); + ecore_evas_free(ee); + 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) + { + ee->engine.wl.frame = _ecore_evas_wl_frame_add(ee->evas); + evas_object_is_frame_object_set(ee->engine.wl.frame, EINA_TRUE); + evas_object_move(ee->engine.wl.frame, 0, 0); + } + + ecore_evas_input_event_register(ee); + _ecore_evas_register(ee); + + ecore_event_window_register(ee->prop.window, ee, ee->evas, + (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process, + (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process, + (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process, + (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process); + + evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL); + + return ee; +} + +/* local functions */ +static int +_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_event_handler_add(ECORE_WL_EVENT_MOUSE_IN, + _ecore_evas_wl_event_mouse_in, NULL); + _ecore_evas_wl_event_handlers[5] = + ecore_event_handler_add(ECORE_WL_EVENT_MOUSE_OUT, + _ecore_evas_wl_event_mouse_out, NULL); + _ecore_evas_wl_event_handlers[6] = + ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_IN, + _ecore_evas_wl_event_focus_in, NULL); + _ecore_evas_wl_event_handlers[7] = + ecore_event_handler_add(ECORE_WL_EVENT_FOCUS_OUT, + _ecore_evas_wl_event_focus_out, NULL); + + ecore_event_evas_init(); + + return _ecore_evas_wl_init_count; +} + +static int +_ecore_evas_wl_shutdown(void) +{ + unsigned int i = 0; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + 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++) + { + if (_ecore_evas_wl_event_handlers[i]) + ecore_event_handler_del(_ecore_evas_wl_event_handlers[i]); + } + + ecore_event_evas_shutdown(); + + return _ecore_evas_wl_init_count; +} + +static void +_ecore_evas_wl_pre_free(Ecore_Evas *ee) +{ + Evas_Engine_Info_Wayland_Shm *einfo; + + 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)); + } +} + +static void +_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; + + ecore_event_window_unregister(ee->prop.window); + ecore_evas_input_event_unregister(ee); + + _ecore_evas_wl_shutdown(); + ecore_wl_shutdown(); +} + +static void +_ecore_evas_wl_callback_resize_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_resize = func; +} + +static void +_ecore_evas_wl_callback_move_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_move = func; +} + +static void +_ecore_evas_wl_callback_delete_request_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_delete_request = func; +} + +static void +_ecore_evas_wl_callback_focus_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_focus_in = func; +} + +static void +_ecore_evas_wl_callback_focus_out_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_focus_out = func; +} + +static void +_ecore_evas_wl_callback_mouse_in_set(Ecore_Evas *ee, void (*func)(Ecore_Evas *ee)) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + ee->func.fn_mouse_in = 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->func.fn_move) ee->func.fn_move(ee); +} + +static void +_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; + + 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); + } + + /* get engine info */ + einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas); + if (einfo->info.dest) + { + int ret = 0; + + /* munmap previous engine destination */ + ret = munmap(einfo->info.dest, ((ee->w * sizeof(int)) * ee->h)); + } + + /* 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 */ + 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); + + /* set new engine destination */ + 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); + + if (ee->visible) + { + /* damage surface */ + wl_surface_damage(ee->engine.wl.surface, 0, 0, ee->w, ee->h); + + /* if visible, attach to surface */ + wl_surface_attach(ee->engine.wl.surface, ee->engine.wl.buffer, 0, 0); + } + + if (ee->func.fn_resize) ee->func.fn_resize(ee); +} + +static void +_ecore_evas_wl_show(Ecore_Evas *ee) +{ + Evas_Engine_Info_Wayland_Shm *einfo; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (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); + + /* 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); + + /* create buffer @ new size (also mmaps the new destination) */ + _ecore_evas_wl_buffer_new(ee, &einfo->info.dest); + + 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); */ + + ee->visible = 1; + if (ee->func.fn_show) ee->func.fn_show(ee); +} + +static void +_ecore_evas_wl_hide(Ecore_Evas *ee) +{ + Evas_Engine_Info_Wayland_Shm *einfo; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (!ee->visible) return; + + /* get engine info */ + einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas); + if (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; + } + + /* 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; + + ee->visible = 0; + ee->should_be_visible = 0; + if (ee->func.fn_hide) ee->func.fn_hide(ee); +} + +static void +_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); +} + +static void +_ecore_evas_wl_title_set(Ecore_Evas *ee, const char *t) +{ + 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 ((ee->prop.draw_frame) && (ee->engine.wl.frame)) + { + EE_Wl_Smart_Data *sd; + + if (!(sd = evas_object_smart_data_get(ee->engine.wl.frame))) return; + evas_object_text_text_set(sd->text, ee->prop.title); + } +} + +static void +_ecore_evas_wl_name_class_set(Ecore_Evas *ee, const char *n, const char *c) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (ee->prop.name) free(ee->prop.name); + if (ee->prop.clas) free(ee->prop.clas); + ee->prop.name = NULL; + ee->prop.clas = NULL; + if (n) ee->prop.name = strdup(n); + if (c) ee->prop.clas = strdup(c); + /* FIXME: Forward these changes to Wayland somehow */ +} + +static void +_ecore_evas_wl_size_min_set(Ecore_Evas *ee, int w, int h) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (w < 0) w = 0; + if (h < 0) h = 0; + if ((ee->prop.min.w == w) && (ee->prop.min.h == h)) return; + ee->prop.min.w = w; + ee->prop.min.h = h; +} + +static void +_ecore_evas_wl_size_max_set(Ecore_Evas *ee, int w, int h) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (w < 0) w = 0; + if (h < 0) h = 0; + if ((ee->prop.max.w == w) && (ee->prop.max.h == h)) return; + ee->prop.max.w = w; + ee->prop.max.h = h; +} + +static void +_ecore_evas_wl_size_base_set(Ecore_Evas *ee, int w, int h) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (w < 0) w = 0; + if (h < 0) h = 0; + if ((ee->prop.base.w == w) && (ee->prop.base.h == h)) return; + ee->prop.base.w = w; + ee->prop.base.h = h; +} + +static void +_ecore_evas_wl_size_step_set(Ecore_Evas *ee, int w, int h) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (w < 0) w = 0; + if (h < 0) h = 0; + if ((ee->prop.step.w == w) && (ee->prop.step.h == h)) return; + ee->prop.step.w = w; + ee->prop.step.h = h; +} + +static void +_ecore_evas_wl_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y) +{ + 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); +} + +static void +_ecore_evas_wl_object_cursor_del(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__) +{ + Ecore_Evas *ee; + + if (!(ee = data)) return; + ee->prop.cursor.object = NULL; +} + +static void +_ecore_evas_wl_layer_set(Ecore_Evas *ee, int layer) +{ + 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; +} + +static void +_ecore_evas_wl_focus_set(Ecore_Evas *ee, int focus __UNUSED__) +{ + 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_iconified_set(Ecore_Evas *ee, int iconify) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (ee->prop.iconified == iconify) return; + ee->prop.iconified = iconify; + /* FIXME: Implement this in Wayland someshow */ +} + +static void +_ecore_evas_wl_maximized_set(Ecore_Evas *ee, int max) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!ee) return; + if (ee->prop.maximized == max) return; + ee->prop.maximized = max; + /* FIXME: Implement this in Wayland someshow */ +} + +static void +_ecore_evas_wl_fullscreen_set(Ecore_Evas *ee, int full __UNUSED__) +{ + 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); +} + +static int +_ecore_evas_wl_render(Ecore_Evas *ee) +{ + int rend = 0; + + if (!ee) return 0; + if (!ee->visible) + evas_norender(ee->evas); + else + { + Eina_List *ll = NULL, *updates = NULL; + Ecore_Evas *ee2 = NULL; + + if (ee->func.fn_pre_render) ee->func.fn_pre_render(ee); + + EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2) + { + if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2); + if (ee2->engine.func->fn_render) + rend |= ee2->engine.func->fn_render(ee2); + if (ee2->func.fn_post_render) ee2->func.fn_post_render(ee2); + } + + if ((updates = evas_render_updates(ee->evas))) + { + Eina_List *l = NULL; + Eina_Rectangle *r; + + 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); + } + + 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; +} + +static void +_ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (x) *x = 0; + if (y) *y = 0; + 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) +{ + 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; +} + +static Eina_Bool +_ecore_evas_wl_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_Evas *ee; + Ecore_Wl_Event_Mouse_In *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; + 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); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_ecore_evas_wl_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_Evas *ee; + Ecore_Wl_Event_Mouse_Out *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; + 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); + 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 *ee; + Ecore_Wl_Event_Focus_In *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; + ee->prop.focused = 1; + evas_focus_in(ee->evas); + if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee); + return ECORE_CALLBACK_PASS_ON; +} + +static Eina_Bool +_ecore_evas_wl_event_focus_out(void *data __UNUSED__, int type __UNUSED__, void *event) +{ + Ecore_Evas *ee; + Ecore_Wl_Event_Focus_Out *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_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) +{ + 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; + + 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) + { + ERR("Could not truncate temporary file."); + close(fd); + return; + } + + ret = mmap(NULL, size, (PROT_READ | PROT_WRITE), MAP_SHARED, fd, 0); + unlink(tmp); + + if (ret == MAP_FAILED) + { + ERR("mmap of temporary file failed."); + close(fd); + return; + } + + 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 void +_ecore_evas_wl_smart_init(void) +{ + if (_ecore_evas_wl_smart) return; + { + static const Evas_Smart_Class sc = + { + "ecore_evas_wl_frame", EVAS_SMART_CLASS_VERSION, + _ecore_evas_wl_smart_add, + _ecore_evas_wl_smart_del, + NULL, + _ecore_evas_wl_smart_resize, + _ecore_evas_wl_smart_show, + _ecore_evas_wl_smart_hide, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL + }; + _ecore_evas_wl_smart = evas_smart_class_new(&sc); + } +} + +static void +_ecore_evas_wl_smart_add(Evas_Object *obj) +{ + EE_Wl_Smart_Data *sd; + Evas *evas; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(sd = calloc(1, sizeof(EE_Wl_Smart_Data)))) return; + + evas = evas_object_evas_get(obj); + + sd->x = 0; + sd->y = 0; + sd->w = 1; + sd->h = 1; + + sd->frame = evas_object_rectangle_add(evas); + evas_object_is_frame_object_set(sd->frame, EINA_TRUE); + evas_object_color_set(sd->frame, 249, 249, 249, 255); + evas_object_smart_member_add(sd->frame, obj); + + sd->text = evas_object_text_add(evas); + evas_object_color_set(sd->text, 0, 0, 0, 255); + evas_object_text_style_set(sd->text, EVAS_TEXT_STYLE_PLAIN); + evas_object_text_font_set(sd->text, "Sans", 10); + evas_object_text_text_set(sd->text, "Smart Test"); + + evas_object_smart_data_set(obj, sd); +} + +static void +_ecore_evas_wl_smart_del(Evas_Object *obj) +{ + EE_Wl_Smart_Data *sd; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(sd = evas_object_smart_data_get(obj))) return; + evas_object_del(sd->text); + evas_object_del(sd->frame); + free(sd); +} + +static void +_ecore_evas_wl_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) +{ + EE_Wl_Smart_Data *sd; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(sd = evas_object_smart_data_get(obj))) return; + if ((sd->w == w) && (sd->h == h)) return; + sd->w = w; + sd->h = h; + evas_object_resize(sd->frame, w, h); +} + +static void +_ecore_evas_wl_smart_show(Evas_Object *obj) +{ + EE_Wl_Smart_Data *sd; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(sd = evas_object_smart_data_get(obj))) return; + evas_object_show(sd->frame); + evas_object_show(sd->text); +} + +static void +_ecore_evas_wl_smart_hide(Evas_Object *obj) +{ + EE_Wl_Smart_Data *sd; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(sd = evas_object_smart_data_get(obj))) return; + evas_object_hide(sd->text); + evas_object_hide(sd->frame); +} + +static Evas_Object * +_ecore_evas_wl_frame_add(Evas *evas) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + _ecore_evas_wl_smart_init(); + 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__) +{ + return NULL; +} +#endif 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 2ca7cb0..cfec528 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_win32.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_win32.c @@ -147,9 +147,9 @@ _ecore_evas_win32_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, voi if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee); /* FIXME to do */ /* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */ - evas_event_feed_mouse_in(ee->evas, e->time, NULL); + evas_event_feed_mouse_in(ee->evas, e->timestamp, NULL); evas_focus_in(ee->evas); - _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time); + _ecore_evas_mouse_move_process(ee, e->x, e->y, e->timestamp); return 1; } @@ -169,9 +169,9 @@ _ecore_evas_win32_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, vo /* FIXME to do */ /* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */ - _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time); + _ecore_evas_mouse_move_process(ee, e->x, e->y, e->timestamp); - evas_event_feed_mouse_out(ee->evas, e->time, NULL); + evas_event_feed_mouse_out(ee->evas, e->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); 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 d9ccd6e..7d3af12 100644 --- a/libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c +++ b/libraries/ecore/src/lib/ecore_evas/ecore_evas_x.c @@ -1,4 +1,13 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include #include + +#include +#include + #include "ecore_evas_private.h" #include "Ecore_Evas.h" @@ -731,10 +740,14 @@ _ecore_evas_x_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *e // (e->mode == ECORE_X_EVENT_MODE_UNGRAB)) // return 0; /* if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0; */ - if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee); - ecore_event_evas_modifier_lock_update(ee->evas, e->modifiers); - evas_event_feed_mouse_in(ee->evas, e->time, NULL); - _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time); + if (!ee->in) + { + if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee); + ecore_event_evas_modifier_lock_update(ee->evas, e->modifiers); + evas_event_feed_mouse_in(ee->evas, e->time, NULL); + _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time); + ee->in = EINA_TRUE; + } return ECORE_CALLBACK_PASS_ON; } @@ -783,13 +796,23 @@ _ecore_evas_x_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void * // (e->mode == ECORE_X_EVENT_MODE_UNGRAB)) // return 0; /* if (e->mode != ECORE_X_EVENT_MODE_NORMAL) return 0; */ - ecore_event_evas_modifier_lock_update(ee->evas, e->modifiers); - _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time); - if (e->mode == ECORE_X_EVENT_MODE_GRAB) - evas_event_feed_mouse_cancel(ee->evas, e->time, NULL); - evas_event_feed_mouse_out(ee->evas, e->time, 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); +// printf("OUT: ee->in=%i, e->mode=%i, e->detail=%i, dount_count=%i\n", +// ee->in, e->mode, e->detail, evas_event_down_count_get(ee->evas)); + if (ee->in) + { + if ((evas_event_down_count_get(ee->evas) > 0) && + (!((e->mode == ECORE_X_EVENT_MODE_GRAB) && + (e->detail == ECORE_X_EVENT_DETAIL_NON_LINEAR)))) + return ECORE_CALLBACK_PASS_ON; + ecore_event_evas_modifier_lock_update(ee->evas, e->modifiers); + _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time); + if (e->mode == ECORE_X_EVENT_MODE_GRAB) + evas_event_feed_mouse_cancel(ee->evas, e->time, NULL); + evas_event_feed_mouse_out(ee->evas, e->time, 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); + ee->in = EINA_FALSE; + } return ECORE_CALLBACK_PASS_ON; } @@ -1023,6 +1046,14 @@ _ecore_evas_x_event_window_hide(void *data __UNUSED__, int type __UNUSED__, void ee = ecore_event_window_match(e->win); if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */ if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON; + if (ee->in) + { + evas_event_feed_mouse_cancel(ee->evas, e->time, NULL); + evas_event_feed_mouse_out(ee->evas, e->time, 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); + ee->in = EINA_FALSE; + } if (!ee->visible) return ECORE_CALLBACK_PASS_ON; // if (!ee->visible) return ECORE_CALLBACK_DONE; // printf("HIDE EVENT %p\n", ee); diff --git a/libraries/ecore/src/lib/ecore_fb/Makefile.in b/libraries/ecore/src/lib/ecore_fb/Makefile.in index b37120f..c0c30a5 100644 --- a/libraries/ecore/src/lib/ecore_fb/Makefile.in +++ b/libraries/ecore/src/lib/ecore_fb/Makefile.in @@ -249,10 +249,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -271,6 +271,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -384,6 +388,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -396,6 +402,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -440,12 +448,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_fb/ecore_fb_li.c b/libraries/ecore/src/lib/ecore_fb/ecore_fb_li.c index 4a196dd..3850792 100644 --- a/libraries/ecore/src/lib/ecore_fb/ecore_fb_li.c +++ b/libraries/ecore/src/lib/ecore_fb/ecore_fb_li.c @@ -2,6 +2,8 @@ # include #endif +#include + #include "Ecore_Fb.h" #include "ecore_fb_private.h" @@ -452,9 +454,9 @@ ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen) #endif /** - * @brief Associates an input device with the given @ref Ecore_Evas. + * @brief Associates an input device with the given @ref Ecore_Evas_Group. * - * @param dev The input being associated with an @ref Ecore_Evas (not @c NULL). + * @param dev The input being associated with an @ref Ecore_Evas_Group (not @c NULL). * @param window The window which this input is being associated to. * @c NULL will remove any previous association. * @@ -475,7 +477,7 @@ ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen) * @endcode * * On the previous code, all input captured on the mentioned device will be - * delivered to the @Ecore_Evas @c ee. + * delivered to the @c Ecore_Evas @c ee. * * @since 1.1 */ diff --git a/libraries/ecore/src/lib/ecore_fb/ecore_fb_private.h b/libraries/ecore/src/lib/ecore_fb/ecore_fb_private.h index 3e908a0..797f863 100644 --- a/libraries/ecore/src/lib/ecore_fb/ecore_fb_private.h +++ b/libraries/ecore/src/lib/ecore_fb/ecore_fb_private.h @@ -6,6 +6,7 @@ #include "Ecore_Input.h" #include +#include #include #include #include @@ -30,6 +31,8 @@ #include #include +#include + /* ecore_fb_li.c */ struct _Ecore_Fb_Input_Device { diff --git a/libraries/ecore/src/lib/ecore_file/Makefile.in b/libraries/ecore/src/lib/ecore_file/Makefile.in index 34945b3..04e0bf1 100644 --- a/libraries/ecore/src/lib/ecore_file/Makefile.in +++ b/libraries/ecore/src/lib/ecore_file/Makefile.in @@ -250,10 +250,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -272,6 +272,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -385,6 +389,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -397,6 +403,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -441,12 +449,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_file/ecore_file.c b/libraries/ecore/src/lib/ecore_file/ecore_file.c index 2546f2f..cfbf2b5 100644 --- a/libraries/ecore/src/lib/ecore_file/ecore_file.c +++ b/libraries/ecore/src/lib/ecore_file/ecore_file.c @@ -2,6 +2,7 @@ # include #endif +#include #include #include @@ -597,11 +598,7 @@ ecore_file_mv(const char *src, const char *dst) dir, ecore_file_file_get(dst)); free(dir); fd = mkstemp(buf); - if (fd < 0) - { - perror("mkstemp"); - goto FAIL; - } + if (fd < 0) goto FAIL; close(fd); // Copy to temp file @@ -761,7 +758,7 @@ ecore_file_can_write(const char *file) } /** - * @bbrief Check if the given file can be executed. + * @brief Check if the given file can be executed. * * @param file The name of the file. * @return EINA_TRUE if the file can be executed, EINA_FALSE otherwise. @@ -859,7 +856,7 @@ ecore_file_app_exe_get(const char *app) p = (char *)app; restart: - while ((*p) && (isspace(*p))) p++; + while ((*p) && (isspace((unsigned char)*p))) p++; exe1 = p; while (*p) { @@ -879,7 +876,7 @@ restart: in_quot_sing = 1; else if (*p == '\"') in_quot_dbl = 1; - if ((isspace(*p)) && (!((p > app) && (p[-1] != '\\')))) + if ((isspace((unsigned char)*p)) && ((p <= app) || (p[-1] == '\\'))) break; } p++; @@ -974,7 +971,7 @@ restart: in_quot_sing = 1; else if (*p == '\"') in_quot_dbl = 1; - else if (isspace(*p)) + else if (isspace((unsigned char)*p)) { if (restart) goto restart; @@ -1040,7 +1037,7 @@ ecore_file_escape_name(const char *filename) } /** - * @bried Remove the extension from the given file name. + * @brief Remove the extension from the given file name. * * @param path The name of the file. * @return A newly allocated string with the extension stripped out or 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 c7efc4d..c5e56bd 100644 --- a/libraries/ecore/src/lib/ecore_file/ecore_file_download.c +++ b/libraries/ecore/src/lib/ecore_file/ecore_file_download.c @@ -2,6 +2,7 @@ # include #endif +#include #include #include @@ -14,6 +15,7 @@ #ifdef BUILD_ECORE_CON #define ECORE_MAGIC_FILE_DOWNLOAD_JOB 0xf7427cb8 +#define ECORE_FILE_DOWNLOAD_TIMEOUT 30 struct _Ecore_File_Download_Job { @@ -360,6 +362,7 @@ _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_file/ecore_file_monitor_inotify.c b/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c index c3533ad..efdd8c2 100644 --- a/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c +++ b/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c @@ -2,6 +2,7 @@ # include #endif +#include #include #include #include diff --git a/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c b/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c index 1f71b55..49bfcb6 100644 --- a/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c +++ b/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c @@ -2,6 +2,7 @@ # include #endif +#include #include #include diff --git a/libraries/ecore/src/lib/ecore_file/ecore_file_path.c b/libraries/ecore/src/lib/ecore_file/ecore_file_path.c index ade3bc6..f5294b7 100644 --- a/libraries/ecore/src/lib/ecore_file/ecore_file_path.c +++ b/libraries/ecore/src/lib/ecore_file/ecore_file_path.c @@ -20,6 +20,7 @@ extern "C" void *alloca (size_t); #endif +#include #include #include @@ -85,7 +86,7 @@ _ecore_file_path_from_env(const char *env) /** * @brief Check if the given directory is in PATH. * - * @param The name of the directory to search in PATH. + * @param in_dir The name of the directory to search in PATH. * @return EINA_TRUE if the directory exist in PATH, EINA_FALSE otherwise. * * This function checks if @p in_dir is in the environment variable diff --git a/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h b/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h index 21df2a0..adea35d 100644 --- a/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h +++ b/libraries/ecore/src/lib/ecore_imf/Ecore_IMF.h @@ -64,6 +64,17 @@ EAPI extern int ECORE_IMF_EVENT_PREEDIT_CHANGED; EAPI extern int ECORE_IMF_EVENT_COMMIT; EAPI extern int ECORE_IMF_EVENT_DELETE_SURROUNDING; +typedef void (*Ecore_IMF_Event_Cb) (void *data, Ecore_IMF_Context *ctx, void *event_info); + +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_Type; + typedef enum { ECORE_IMF_EVENT_MOUSE_DOWN, @@ -138,7 +149,10 @@ typedef enum ECORE_IMF_INPUT_PANEL_LAYOUT_IP, /**< IP layout */ ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */ ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */ - ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID + ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */ + ECORE_IMF_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout @since 1.2 */ + ECORE_IMF_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout @since 1.2 */ + ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */ } Ecore_IMF_Input_Panel_Layout; typedef enum @@ -385,6 +399,9 @@ EAPI void ecore_imf_context_preedit_end_event_add(Ecore EAPI void ecore_imf_context_preedit_changed_event_add(Ecore_IMF_Context *ctx); EAPI void ecore_imf_context_commit_event_add(Ecore_IMF_Context *ctx, const char *str); EAPI void ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars); +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); +EAPI void *ecore_imf_context_event_callback_del(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func); +EAPI void ecore_imf_context_event_callback_call(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, void *event_info); EAPI void ecore_imf_context_prediction_allow_set(Ecore_IMF_Context *ctx, Eina_Bool prediction); EAPI Eina_Bool ecore_imf_context_prediction_allow_get(Ecore_IMF_Context *ctx); EAPI void ecore_imf_context_autocapital_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Autocapital_Type autocapital_type); diff --git a/libraries/ecore/src/lib/ecore_imf/Makefile.in b/libraries/ecore/src/lib/ecore_imf/Makefile.in index adf8dea..9f91360 100644 --- a/libraries/ecore/src/lib/ecore_imf/Makefile.in +++ b/libraries/ecore/src/lib/ecore_imf/Makefile.in @@ -248,10 +248,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -270,6 +270,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -383,6 +387,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -395,6 +401,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -439,12 +447,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ 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 417fad3..b65ee26 100644 --- a/libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c +++ b/libraries/ecore/src/lib/ecore_imf/ecore_imf_context.c @@ -223,6 +223,8 @@ ecore_imf_context_info_get(Ecore_IMF_Context *ctx) EAPI void ecore_imf_context_del(Ecore_IMF_Context *ctx) { + Ecore_IMF_Func_Node *fn; + if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) { ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, @@ -230,6 +232,13 @@ ecore_imf_context_del(Ecore_IMF_Context *ctx) return; } if (ctx->klass->del) ctx->klass->del(ctx); + + if (ctx->callbacks) + { + EINA_LIST_FREE(ctx->callbacks, fn) + free(fn); + } + ECORE_MAGIC_SET(ctx, ECORE_MAGIC_NONE); free(ctx); } @@ -529,7 +538,7 @@ ecore_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int x, int y, int /** * Set whether the IM context should use the preedit string - * to display feedback. If @use_preedit is EINA_FALSE (default + * to display feedback. If @c use_preedit is EINA_FALSE (default * is EINA_TRUE), then the IM context may use some other method to display * feedback, such as displaying it in a child of the root window. * @@ -551,7 +560,7 @@ ecore_imf_context_use_preedit_set(Ecore_IMF_Context *ctx, Eina_Bool use_preedit) /** * Set whether the IM context should allow to use the text prediction. - * If @prediction is EINA_FALSE (default is EINA_TRUE), then the IM context will not display the text prediction window. + * If @c prediction is EINA_FALSE (default is EINA_TRUE), then the IM context will not display the text prediction window. * * @param ctx An #Ecore_IMF_Context. * @param prediction Whether the IM context should allow to use the text prediction. @@ -1016,6 +1025,134 @@ ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offse } /** + * Add (register) a callback function to a given context event. + * + * This function adds a function callback to the context @p ctx when the + * event of type @p type occurs on it. The function pointer is @p + * func. + * + * The event type @p type to trigger the function may be one of + * #ECORE_IMF_CALLBACK_PREEDIT_START, #ECORE_IMF_CALLBACK_PREEDIT_END, + * #ECORE_IMF_CALLBACK_PREEDIT_CHANGED, #ECORE_IMF_CALLBACK_COMMIT and + * #ECORE_IMF_CALLBACK_DELETE_SURROUNDING. + * + * @param ctx Ecore_IMF_Context to attach a callback to. + * @param type The type of event that will trigger the callback + * @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 + * @since 1.2.0 + */ +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) +{ + Ecore_IMF_Func_Node *fn = NULL; + + if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) + { + ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, + "ecore_imf_context_event_callback_add"); + return; + } + + if (!func) return; + + fn = calloc(1, sizeof (Ecore_IMF_Func_Node)); + if (!fn) return; + + fn->func = func; + fn->data = data; + fn->type = type; + + ctx->callbacks = eina_list_append(ctx->callbacks, fn); +} + +/** + * Delete (unregister) a callback function registered to a given + * context event. + * + * This function removes a function callback from the context @p ctx when the + * event of type @p type occurs on it. The function pointer is @p + * func. + * + * @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 func The (callback) function that was to be called when the event was triggered + * @return the data pointer + * @ingroup Ecore_IMF_Context_Module_Group + * @since 1.2.0 + */ +EAPI void * +ecore_imf_context_event_callback_del(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, Ecore_IMF_Event_Cb func) +{ + Eina_List *l = NULL; + Eina_List *l_next = NULL; + Ecore_IMF_Func_Node *fn = NULL; + + if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) + { + ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, + "ecore_imf_context_event_callback_del"); + return; + } + + if (!func) return NULL; + if (!ctx->callbacks) return NULL; + + EINA_LIST_FOREACH_SAFE(ctx->callbacks, l, l_next, fn) + { + if ((fn) && (fn->func == func) && (fn->type == type)) + { + void *tmp = fn->data; + free(fn); + ctx->callbacks = eina_list_remove_list(ctx->callbacks, l); + return tmp; + } + } + return NULL; +} + +/** + * Call a given callback on the context @p ctx. + * + * ecore_imf_context_preedit_start_event_add, ecore_imf_context_preedit_end_event_add, + * ecore_imf_context_preedit_changed_event_add, ecore_imf_context_commit_event_add and + * ecore_imf_context_delete_surrounding_event_add APIs are asynchronous + * because those API adds each event to the event queue. + * + * This API provides the way to call each callback function immediately. + * + * @param ctx Ecore_IMF_Context. + * @param type The type of event that will trigger the callback + * @param event_info The pointer to event specific struct or information to + * pass to the callback functions registered on this event + * @ingroup Ecore_IMF_Context_Module_Group + * @since 1.2.0 + */ +EAPI void +ecore_imf_context_event_callback_call(Ecore_IMF_Context *ctx, Ecore_IMF_Callback_Type type, void *event_info) +{ + Ecore_IMF_Func_Node *fn = NULL; + Eina_List *l = NULL; + + if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) + { + ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT, + "ecore_imf_context_event_callback_call"); + return; + } + + EINA_LIST_FOREACH(ctx->callbacks, l, fn) + { + if ((fn) && (fn->type == type) && (fn->func)) + fn->func(fn->data, ctx, event_info); + } +} + +/** * Ask the Input Method Context to show the control panel of using Input Method. * * @param ctx An #Ecore_IMF_Context. 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 07a5b09..d9dae80 100644 --- a/libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h +++ b/libraries/ecore/src/lib/ecore_imf/ecore_imf_private.h @@ -35,6 +35,7 @@ extern int _ecore_imf_log_dom; #define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_imf_log_dom, __VA_ARGS__) typedef struct _Ecore_IMF_Module Ecore_IMF_Module; +typedef struct _Ecore_IMF_Func_Node Ecore_IMF_Func_Node; struct _Ecore_IMF_Context { @@ -47,6 +48,7 @@ struct _Ecore_IMF_Context void *client_canvas; Eina_Bool (*retrieve_surrounding_func)(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos); void *retrieve_surrounding_data; + Eina_List *callbacks; Ecore_IMF_Autocapital_Type autocapital_type; Ecore_IMF_Input_Panel_Layout input_panel_layout; Ecore_IMF_Input_Panel_Lang input_panel_lang; @@ -61,6 +63,13 @@ struct _Ecore_IMF_Module Ecore_IMF_Context *(*exit)(void); }; +struct _Ecore_IMF_Func_Node +{ + void (*func) (); + const void *data; + Ecore_IMF_Callback_Type type; +}; + void ecore_imf_module_init(void); void ecore_imf_module_shutdown(void); Eina_List *ecore_imf_module_available_get(void); diff --git a/libraries/ecore/src/lib/ecore_imf_evas/Makefile.in b/libraries/ecore/src/lib/ecore_imf_evas/Makefile.in index 9b26915..ab6503b 100644 --- a/libraries/ecore/src/lib/ecore_imf_evas/Makefile.in +++ b/libraries/ecore/src/lib/ecore_imf_evas/Makefile.in @@ -247,10 +247,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -269,6 +269,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -382,6 +386,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -394,6 +400,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -438,12 +446,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_input/Makefile.in b/libraries/ecore/src/lib/ecore_input/Makefile.in index dd4d663..f9fc99a 100644 --- a/libraries/ecore/src/lib/ecore_input/Makefile.in +++ b/libraries/ecore/src/lib/ecore_input/Makefile.in @@ -247,10 +247,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -269,6 +269,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -382,6 +386,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -394,6 +400,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -438,12 +446,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_input_evas/Makefile.in b/libraries/ecore/src/lib/ecore_input_evas/Makefile.in index 9097992..d0ac95e 100644 --- a/libraries/ecore/src/lib/ecore_input_evas/Makefile.in +++ b/libraries/ecore/src/lib/ecore_input_evas/Makefile.in @@ -248,10 +248,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -270,6 +270,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -383,6 +387,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -395,6 +401,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -439,12 +447,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_input_evas/ecore_input_evas.c b/libraries/ecore/src/lib/ecore_input_evas/ecore_input_evas.c index 0cfe20a..53d206e 100644 --- a/libraries/ecore/src/lib/ecore_input_evas/ecore_input_evas.c +++ b/libraries/ecore/src/lib/ecore_input_evas/ecore_input_evas.c @@ -3,6 +3,7 @@ #endif #include +#include #include "Ecore.h" #include "Ecore_Input.h" diff --git a/libraries/ecore/src/lib/ecore_ipc/Makefile.in b/libraries/ecore/src/lib/ecore_ipc/Makefile.in index 189e069..ac2cf6f 100644 --- a/libraries/ecore/src/lib/ecore_ipc/Makefile.in +++ b/libraries/ecore/src/lib/ecore_ipc/Makefile.in @@ -248,10 +248,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -270,6 +270,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -383,6 +387,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -395,6 +401,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -439,12 +447,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c b/libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c index c17cadd..e27134d 100644 --- a/libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c +++ b/libraries/ecore/src/lib/ecore_ipc/ecore_ipc.c @@ -926,7 +926,7 @@ ecore_ipc_client_data_get(Ecore_Ipc_Client *cl) /** * Sets the max data payload size for an Ipc message in bytes * - * @param client The given client. + * @param cl The given client. * @param size The maximum data payload size in bytes. * @ingroup Ecore_Ipc_Client_Group */ @@ -946,7 +946,6 @@ ecore_ipc_client_data_size_max_set(Ecore_Ipc_Client *cl, int size) * Sets the max data payload size for an Ipc message in bytes * * @param cl The given client. - * @param size The maximum data payload size in bytes. * @ingroup Ecore_Ipc_Client_Group */ EAPI int diff --git a/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h b/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h index 39331f7..c6300fd 100644 --- a/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h +++ b/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h @@ -28,6 +28,7 @@ EAPI extern int ECORE_PSL1GHT_EVENT_KEY_MODIFIERS; EAPI extern int ECORE_PSL1GHT_EVENT_GOT_FOCUS; EAPI extern int ECORE_PSL1GHT_EVENT_LOST_FOCUS; EAPI extern int ECORE_PSL1GHT_EVENT_EXPOSE; +EAPI extern int ECORE_PSL1GHT_EVENT_QUIT; typedef struct _Ecore_Psl1ght_Event_Key_Modifiers Ecore_Psl1ght_Event_Key_Modifiers; struct _Ecore_Psl1ght_Event_Key_Modifiers /** PSL1GHT Key Modifier event */ @@ -105,14 +106,10 @@ struct _Ecore_Psl1ght_Event_Mouse_Wheel /** PSL1GHT Mouse Wheel event */ unsigned int time; }; -EAPI int - ecore_psl1ght_init(const char *name); -EAPI int - ecore_psl1ght_shutdown(void); -EAPI void - ecore_psl1ght_resolution_set(int width, int height); -EAPI void - ecore_psl1ght_poll_events(void); +EAPI int ecore_psl1ght_init(const char *name); +EAPI int ecore_psl1ght_shutdown(void); +EAPI void ecore_psl1ght_resolution_set(int width, int height); +EAPI void ecore_psl1ght_poll_events(void); EAPI void ecore_psl1ght_screen_resolution_get(int *w, int *h); EAPI void ecore_psl1ght_optimal_screen_resolution_get(int *w, int *h); diff --git a/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in b/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in index 9b75b74..487231b 100644 --- a/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in +++ b/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in @@ -249,10 +249,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -271,6 +271,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -384,6 +388,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -396,6 +402,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -440,12 +448,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c b/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c index 64cef9f..16487ad 100644 --- a/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c +++ b/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c @@ -31,6 +31,7 @@ EAPI int ECORE_PSL1GHT_EVENT_KEY_MODIFIERS = 0; EAPI int ECORE_PSL1GHT_EVENT_GOT_FOCUS = 0; EAPI int ECORE_PSL1GHT_EVENT_LOST_FOCUS = 0; EAPI int ECORE_PSL1GHT_EVENT_EXPOSE = 0; +EAPI int ECORE_PSL1GHT_EVENT_QUIT = 0; static int _ecore_psl1ght_init_count = 0; static int window_width = 0; @@ -47,6 +48,7 @@ static KbMkey keyboard_mods = {{0}}; static u16 keyboard_old_key = 0; /* Pad support */ static padData pad_data; +static padData old_pad_data = {0}; static int pad_old_x = 0; static int pad_old_o = 0; /* Move support */ @@ -148,6 +150,7 @@ ecore_psl1ght_init(const char *name __UNUSED__) ECORE_PSL1GHT_EVENT_LOST_FOCUS = ecore_event_type_new(); ECORE_PSL1GHT_EVENT_EXPOSE = ecore_event_type_new(); ECORE_PSL1GHT_EVENT_KEY_MODIFIERS = ecore_event_type_new(); + ECORE_PSL1GHT_EVENT_QUIT = ecore_event_type_new(); mouse_x = 0; mouse_y = 0; @@ -175,6 +178,7 @@ ecore_psl1ght_shutdown(void) ECORE_PSL1GHT_EVENT_LOST_FOCUS = 0; ECORE_PSL1GHT_EVENT_EXPOSE = 0; ECORE_PSL1GHT_EVENT_KEY_MODIFIERS = 0; + ECORE_PSL1GHT_EVENT_QUIT = 0; ioPadEnd(); ioMouseEnd(); @@ -354,7 +358,6 @@ _ecore_psl1ght_event_key(u16 key) ev->event_window = 0; ev->modifiers = _ecore_psl1ght_get_modifiers(); - printf ("Key is %X\n", key); key &= ~KB_KEYPAD; for (i = 0; i < sizeof(keystable) / sizeof(struct _ecore_psl1ght_keys_s); ++i) if (keystable[i].code == key) @@ -364,13 +367,11 @@ _ecore_psl1ght_event_key(u16 key) ev->string = keystable[i].compose; ev->compose = keystable[i].compose; - printf ("Found key '%s' in the table\n", ev->keyname); return ev; } utf16 = ioKbCnvRawCode (KB_MAPPING_101, keyboard_mods, keyboard_leds, key); unicodeToUtf8(utf16, utf8); - printf ("Converting to utf16 : %X - utf8 : %s\n", utf16, utf8); ev->keyname = ev->key = ev->string = ev->compose = strdup (utf8); return ev; @@ -460,6 +461,30 @@ _ecore_psl1ght_mouse_wheel(s8 wheel, s8 tilt) ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL); } +static void +_ecore_psl1ght_pad_button (const char *name, int pressed) +{ + Ecore_Event_Key *ev = NULL; + + ev = malloc(sizeof(Ecore_Event_Key)); + if (!ev) return; + + ev->timestamp = _ecore_psl1ght_get_time (); + ev->window = 0; + ev->event_window = 0; + ev->modifiers = 0; + + ev->keyname = name; + ev->key = name; + ev->string = ""; + ev->compose = ""; + + if (pressed) + ecore_event_add(ECORE_EVENT_KEY_DOWN, ev, NULL, NULL); + else + ecore_event_add(ECORE_EVENT_KEY_UP, ev, NULL, NULL); +} + #define PAD_STICK_DEADZONE 0x20 static void @@ -502,15 +527,44 @@ _ecore_psl1ght_poll_joypad(void) if (analog_h != 0 || analog_v != 0) _ecore_psl1ght_mouse_move (analog_h, analog_v); - if (pad_old_x != pad_data.BTN_CROSS) + if (old_pad_data.BTN_CROSS ^ pad_data.BTN_CROSS) { + _ecore_psl1ght_pad_button ("Cross", pad_data.BTN_CROSS); _ecore_psl1ght_mouse_button (1, pad_data.BTN_CROSS); - if (pad_old_o != pad_data.BTN_CIRCLE) + } + if (old_pad_data.BTN_CIRCLE ^ pad_data.BTN_CIRCLE) { + _ecore_psl1ght_pad_button ("Circle", pad_data.BTN_CIRCLE); _ecore_psl1ght_mouse_button (3, pad_data.BTN_CIRCLE); - - pad_old_x = pad_data.BTN_CROSS; - pad_old_o = pad_data.BTN_CIRCLE; - - //pad_buttons = paddata.buttons; + } + if (old_pad_data.BTN_SQUARE ^ pad_data.BTN_SQUARE) + _ecore_psl1ght_pad_button ("Square", pad_data.BTN_SQUARE); + if (old_pad_data.BTN_TRIANGLE ^ pad_data.BTN_TRIANGLE) + _ecore_psl1ght_pad_button ("Triangle", pad_data.BTN_TRIANGLE); + if (old_pad_data.BTN_UP ^ pad_data.BTN_UP) + _ecore_psl1ght_pad_button ("Up", pad_data.BTN_UP); + if (old_pad_data.BTN_DOWN ^ pad_data.BTN_DOWN) + _ecore_psl1ght_pad_button ("Down", pad_data.BTN_DOWN); + if (old_pad_data.BTN_LEFT ^ pad_data.BTN_LEFT) + _ecore_psl1ght_pad_button ("Left", pad_data.BTN_LEFT); + if (old_pad_data.BTN_RIGHT ^ pad_data.BTN_RIGHT) + _ecore_psl1ght_pad_button ("Right", pad_data.BTN_RIGHT); + if (old_pad_data.BTN_L1 ^ pad_data.BTN_L1) + _ecore_psl1ght_pad_button ("L1", pad_data.BTN_L1); + if (old_pad_data.BTN_L2 ^ pad_data.BTN_L2) + _ecore_psl1ght_pad_button ("L2", pad_data.BTN_L2); + if (old_pad_data.BTN_L3 ^ pad_data.BTN_L3) + _ecore_psl1ght_pad_button ("L3", pad_data.BTN_L3); + if (old_pad_data.BTN_R1 ^ pad_data.BTN_R1) + _ecore_psl1ght_pad_button ("R1", pad_data.BTN_R1); + if (old_pad_data.BTN_R2 ^ pad_data.BTN_R2) + _ecore_psl1ght_pad_button ("R2", pad_data.BTN_R2); + if (old_pad_data.BTN_R3 ^ pad_data.BTN_R3) + _ecore_psl1ght_pad_button ("R3", pad_data.BTN_R3); + if (old_pad_data.BTN_START ^ pad_data.BTN_START) + _ecore_psl1ght_pad_button ("Start", pad_data.BTN_START); + if (old_pad_data.BTN_SELECT ^ pad_data.BTN_SELECT) + _ecore_psl1ght_pad_button ("Select", pad_data.BTN_SELECT); + + old_pad_data = pad_data; } } } @@ -602,7 +656,7 @@ _ecore_psl1ght_poll_move(void) case 4: // Move button - printf ("Calibrating\n"); + //printf ("Calibrating\n"); gemCalibrate (0); calibrated = 1; break; @@ -717,23 +771,24 @@ _ecore_psl1ght_poll_keyboard(void) static void xmb_event_handler(u64 status, u64 param, void *user_data) { - printf ("Received event %lX\n", status); - if (status == SYSUTIL_EXIT_GAME) - { - ecore_main_loop_quit(); - } - else if (status == SYSUTIL_MENU_OPEN) - { - } - else if (status == SYSUTIL_MENU_CLOSE) - { - } - else if (status == SYSUTIL_DRAW_BEGIN) - { - } - else if (status == SYSUTIL_DRAW_END) - { - } + //printf ("Received event %lX\n", status); + switch (status) { + case SYSUTIL_EXIT_GAME: + ecore_event_add(ECORE_PSL1GHT_EVENT_QUIT, NULL, NULL, NULL); + break; + case SYSUTIL_DRAW_BEGIN: + ecore_event_add(ECORE_PSL1GHT_EVENT_EXPOSE, NULL, NULL, NULL); + case SYSUTIL_MENU_OPEN: + ecore_event_add(ECORE_PSL1GHT_EVENT_LOST_FOCUS, NULL, NULL, NULL); + break; + case SYSUTIL_DRAW_END: + ecore_event_add(ECORE_PSL1GHT_EVENT_EXPOSE, NULL, NULL, NULL); + case SYSUTIL_MENU_CLOSE: + ecore_event_add(ECORE_PSL1GHT_EVENT_GOT_FOCUS, NULL, NULL, NULL); + break; + default: + break; + } } EAPI void diff --git a/libraries/ecore/src/lib/ecore_sdl/Makefile.in b/libraries/ecore/src/lib/ecore_sdl/Makefile.in index 0141ebe..c0312b0 100644 --- a/libraries/ecore/src/lib/ecore_sdl/Makefile.in +++ b/libraries/ecore/src/lib/ecore_sdl/Makefile.in @@ -248,10 +248,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -270,6 +270,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -383,6 +387,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -395,6 +401,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -439,12 +447,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h b/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h new file mode 100644 index 0000000..fdf6314 --- /dev/null +++ b/libraries/ecore/src/lib/ecore_wayland/Ecore_Wayland.h @@ -0,0 +1,123 @@ +#ifndef _ECORE_WAYLAND_H_ +# define _ECORE_WAYLAND_H_ + +# include +# include + +# ifdef EAPI +# undef EAPI +# endif + +# ifdef __GNUC__ +# if __GNUC__ >= 4 +# define EAPI __attribute__ ((visibility("default"))) +# else +# define EAPI +# endif +# else +# define EAPI +# endif + +typedef struct _Ecore_Wl_Event_Mouse_In Ecore_Wl_Event_Mouse_In; +typedef struct _Ecore_Wl_Event_Mouse_Out Ecore_Wl_Event_Mouse_Out; +typedef struct _Ecore_Wl_Event_Focus_In Ecore_Wl_Event_Focus_In; +typedef struct _Ecore_Wl_Event_Focus_Out Ecore_Wl_Event_Focus_Out; + +typedef struct _Ecore_Wl_Drag_Source Ecore_Wl_Drag_Source; + +typedef struct _Ecore_Wl_Event_Drag_Start Ecore_Wl_Event_Drag_Start; +typedef struct _Ecore_Wl_Event_Drag_Stop Ecore_Wl_Event_Drag_Stop; + +struct _Ecore_Wl_Event_Mouse_In +{ + int modifiers; + int x, y; + + struct + { + int x, y; + } root; + + unsigned int window; + + unsigned int time; +}; + +struct _Ecore_Wl_Event_Mouse_Out +{ + int modifiers; + int x, y; + + struct + { + int x, y; + } root; + + unsigned int window; + + unsigned int time; +}; + +struct _Ecore_Wl_Event_Focus_In +{ + unsigned int window; + /* TODO: mode & detail */ + unsigned int time; +}; + +struct _Ecore_Wl_Event_Focus_Out +{ + unsigned int window; + /* TODO: mode & detail */ + unsigned int time; +}; + +struct _Ecore_Wl_Event_Drag_Start +{ + struct wl_data_device *device; + struct wl_surface *surface; + const char *mime_type; + uint32_t timestamp; +}; + +struct _Ecore_Wl_Event_Drag_Stop +{ + +}; + +/** + * @file + * @brief Ecore functions for dealing with the Wayland window system + * + * Ecore_Wl provides a wrapper and convenience functions for using the + * Wayland window system. Function groups for this part of the library + * include the following: + * @li @ref Ecore_Wl_Init_Group + */ + +EAPI int ecore_wl_init(const char *name); +EAPI int ecore_wl_shutdown(void); + +EAPI struct wl_display *ecore_wl_display_get(void); +EAPI struct wl_shm *ecore_wl_shm_get(void); +EAPI struct wl_compositor *ecore_wl_compositor_get(void); +EAPI struct wl_shell *ecore_wl_shell_get(void); +EAPI struct wl_input_device *ecore_wl_input_device_get(void); +EAPI void ecore_wl_screen_size_get(int *w, int *h); +EAPI unsigned int ecore_wl_format_get(void); +EAPI void ecore_wl_flush(void); +EAPI void ecore_wl_sync(void); +EAPI void ecore_wl_pointer_xy_get(int *x, int *y); + +EAPI Ecore_Wl_Drag_Source *ecore_wl_drag_source_create(int hotspot_x, int hotspot_y, int offset_x, int offset_y, const char *mimetype, unsigned int timestamp, void *data); +EAPI void ecore_wl_drag_start(Ecore_Wl_Drag_Source *source, struct wl_surface *surface, struct wl_buffer *buffer); +EAPI void ecore_wl_drag_stop(void); + +EAPI extern int ECORE_WL_EVENT_MOUSE_IN; +EAPI extern int ECORE_WL_EVENT_MOUSE_OUT; +EAPI extern int ECORE_WL_EVENT_FOCUS_IN; +EAPI extern int ECORE_WL_EVENT_FOCUS_OUT; +EAPI extern int ECORE_WL_EVENT_DRAG_START; +EAPI extern int ECORE_WL_EVENT_DRAG_STOP; + +#endif diff --git a/libraries/ecore/src/lib/ecore_wayland/Makefile.am b/libraries/ecore/src/lib/ecore_wayland/Makefile.am new file mode 100644 index 0000000..ea005b2 --- /dev/null +++ b/libraries/ecore/src/lib/ecore_wayland/Makefile.am @@ -0,0 +1,31 @@ +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I$(top_srcdir)/src/lib/ecore \ +-I$(top_srcdir)/src/lib/ecore_input \ +-I$(top_builddir)/src/lib/ecore \ +-I$(top_builddir)/src/lib/ecore_input \ +@WAYLAND_CFLAGS@ \ +@EVAS_CFLAGS@ \ +@EINA_CFLAGS@ + +lib_LTLIBRARIES = libecore_wayland.la +includes_HEADERS = Ecore_Wayland.h +includesdir = $(includedir)/ecore-@VMAJ@ + +libecore_wayland_la_SOURCES = \ +ecore_wl.c + +## ecore_wl_window.c + +libecore_wayland_la_LIBADD = \ +$(top_builddir)/src/lib/ecore/libecore.la \ +$(top_builddir)/src/lib/ecore_input/libecore_input.la \ +@WAYLAND_LIBS@ \ +@EVAS_LIBS@ \ +@EINA_LIBS@ + +libecore_wayland_la_LDFLAGS = -version-info @version_info@ @release_info@ +libecore_wayland_la_DEPENDENCIES = $(top_builddir)/src/lib/ecore/libecore.la + +EXTRA_DIST = ecore_wl_private.h diff --git a/libraries/ecore/src/lib/ecore_wayland/Makefile.in b/libraries/ecore/src/lib/ecore_wayland/Makefile.in new file mode 100644 index 0000000..411da19 --- /dev/null +++ b/libraries/ecore/src/lib/ecore_wayland/Makefile.in @@ -0,0 +1,829 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/lib/ecore_wayland +DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ + $(top_srcdir)/m4/ac_path_generic.m4 \ + $(top_srcdir)/m4/check_x_extension.m4 \ + $(top_srcdir)/m4/ecore_check_module.m4 \ + $(top_srcdir)/m4/ecore_check_options.m4 \ + $(top_srcdir)/m4/efl_compiler_flag.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_examples.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +am_libecore_wayland_la_OBJECTS = ecore_wl.lo +libecore_wayland_la_OBJECTS = $(am_libecore_wayland_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +libecore_wayland_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libecore_wayland_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libecore_wayland_la_SOURCES) +DIST_SOURCES = $(libecore_wayland_la_SOURCES) +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CARES_CFLAGS = @CARES_CFLAGS@ +CARES_LIBS = @CARES_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_XCB_CFLAGS = @ECORE_XCB_CFLAGS@ +ECORE_XCB_LIBS = @ECORE_XCB_LIBS@ +EFL_ECORE_BUILD = @EFL_ECORE_BUILD@ +EFL_ECORE_CON_BUILD = @EFL_ECORE_CON_BUILD@ +EFL_ECORE_EVAS_BUILD = @EFL_ECORE_EVAS_BUILD@ +EFL_ECORE_FILE_BUILD = @EFL_ECORE_FILE_BUILD@ +EFL_ECORE_IMF_BUILD = @EFL_ECORE_IMF_BUILD@ +EFL_ECORE_IMF_EVAS_BUILD = @EFL_ECORE_IMF_EVAS_BUILD@ +EFL_ECORE_INPUT_BUILD = @EFL_ECORE_INPUT_BUILD@ +EFL_ECORE_INPUT_EVAS_BUILD = @EFL_ECORE_INPUT_EVAS_BUILD@ +EFL_ECORE_IPC_BUILD = @EFL_ECORE_IPC_BUILD@ +EFL_ECORE_PSL1GHT_BUILD = @EFL_ECORE_PSL1GHT_BUILD@ +EFL_ECORE_SDL_BUILD = @EFL_ECORE_SDL_BUILD@ +EFL_ECORE_WIN32_BUILD = @EFL_ECORE_WIN32_BUILD@ +EFL_ECORE_WINCE_BUILD = @EFL_ECORE_WINCE_BUILD@ +EFL_PTHREAD_CFLAGS = @EFL_PTHREAD_CFLAGS@ +EFL_PTHREAD_LIBS = @EFL_PTHREAD_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +ESCAPE_CFLAGS = @ESCAPE_CFLAGS@ +ESCAPE_LIBS = @ESCAPE_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +KEYSYMDEFS = @KEYSYMDEFS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ +LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ +LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SSL_CFLAGS = @SSL_CFLAGS@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +TLS2_CFLAGS = @TLS2_CFLAGS@ +TLS2_LIBS = @TLS2_LIBS@ +TLS_CFLAGS = @TLS_CFLAGS@ +TLS_LIBS = @TLS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +WIN32_LIBS = @WIN32_LIBS@ +XCB_COMPOSITE_CFLAGS = @XCB_COMPOSITE_CFLAGS@ +XCB_COMPOSITE_LIBS = @XCB_COMPOSITE_LIBS@ +XCB_CURSOR_CFLAGS = @XCB_CURSOR_CFLAGS@ +XCB_CURSOR_LIBS = @XCB_CURSOR_LIBS@ +XCB_DAMAGE_CFLAGS = @XCB_DAMAGE_CFLAGS@ +XCB_DAMAGE_LIBS = @XCB_DAMAGE_LIBS@ +XCB_DPMS_CFLAGS = @XCB_DPMS_CFLAGS@ +XCB_DPMS_LIBS = @XCB_DPMS_LIBS@ +XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@ +XCB_RANDR_LIBS = @XCB_RANDR_LIBS@ +XCB_RENDER_CFLAGS = @XCB_RENDER_CFLAGS@ +XCB_RENDER_LIBS = @XCB_RENDER_LIBS@ +XCB_SCREENSAVER_CFLAGS = @XCB_SCREENSAVER_CFLAGS@ +XCB_SCREENSAVER_LIBS = @XCB_SCREENSAVER_LIBS@ +XCB_SHAPE_CFLAGS = @XCB_SHAPE_CFLAGS@ +XCB_SHAPE_LIBS = @XCB_SHAPE_LIBS@ +XCB_SYNC_CFLAGS = @XCB_SYNC_CFLAGS@ +XCB_SYNC_LIBS = @XCB_SYNC_LIBS@ +XCB_X11_CFLAGS = @XCB_X11_CFLAGS@ +XCB_X11_LIBS = @XCB_X11_LIBS@ +XCB_XFIXES_CFLAGS = @XCB_XFIXES_CFLAGS@ +XCB_XFIXES_LIBS = @XCB_XFIXES_LIBS@ +XCB_XGESTURE_CFLAGS = @XCB_XGESTURE_CFLAGS@ +XCB_XGESTURE_LIBS = @XCB_XGESTURE_LIBS@ +XCB_XINERAMA_CFLAGS = @XCB_XINERAMA_CFLAGS@ +XCB_XINERAMA_LIBS = @XCB_XINERAMA_LIBS@ +XCB_XINPUT_CFLAGS = @XCB_XINPUT_CFLAGS@ +XCB_XINPUT_LIBS = @XCB_XINPUT_LIBS@ +XCB_XPRINT_CFLAGS = @XCB_XPRINT_CFLAGS@ +XCB_XPRINT_LIBS = @XCB_XPRINT_LIBS@ +XCB_XTEST_CFLAGS = @XCB_XTEST_CFLAGS@ +XCB_XTEST_LIBS = @XCB_XTEST_LIBS@ +XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ +XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ +XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ +XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XDPMS_CFLAGS = @XDPMS_CFLAGS@ +XDPMS_LIBS = @XDPMS_LIBS@ +XFIXES_CFLAGS = @XFIXES_CFLAGS@ +XFIXES_LIBS = @XFIXES_LIBS@ +XGESTURE_CFLAGS = @XGESTURE_CFLAGS@ +XGESTURE_LIBS = @XGESTURE_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XI2_CFLAGS = @XI2_CFLAGS@ +XI2_LIBS = @XI2_LIBS@ +XINERAMA_CFLAGS = @XINERAMA_CFLAGS@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XKB_CFLAGS = @XKB_CFLAGS@ +XKB_LIBS = @XKB_LIBS@ +XMKMF = @XMKMF@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRANDR_CFLAGS = @XRANDR_CFLAGS@ +XRANDR_LIBS = @XRANDR_LIBS@ +XRENDER_CFLAGS = @XRENDER_CFLAGS@ +XRENDER_LIBS = @XRENDER_LIBS@ +XSS_CFLAGS = @XSS_CFLAGS@ +XSS_LIBS = @XSS_LIBS@ +XTEST_CFLAGS = @XTEST_CFLAGS@ +XTEST_LIBS = @XTEST_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +Xcursor_cflags = @Xcursor_cflags@ +Xcursor_libs = @Xcursor_libs@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cocoa_ldflags = @cocoa_ldflags@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +ecore_cocoa_cflags = @ecore_cocoa_cflags@ +ecore_cocoa_libs = @ecore_cocoa_libs@ +ecore_con_cflags = @ecore_con_cflags@ +ecore_con_libs = @ecore_con_libs@ +ecore_directfb_cflags = @ecore_directfb_cflags@ +ecore_directfb_libs = @ecore_directfb_libs@ +ecore_evas_cflags = @ecore_evas_cflags@ +ecore_evas_libs = @ecore_evas_libs@ +ecore_fb_cflags = @ecore_fb_cflags@ +ecore_fb_libs = @ecore_fb_libs@ +ecore_file_cflags = @ecore_file_cflags@ +ecore_file_libs = @ecore_file_libs@ +ecore_imf_cflags = @ecore_imf_cflags@ +ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ +ecore_imf_evas_libs = @ecore_imf_evas_libs@ +ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ +ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ +ecore_imf_xim_libs = @ecore_imf_xim_libs@ +ecore_input_cflags = @ecore_input_cflags@ +ecore_input_evas_cflags = @ecore_input_evas_cflags@ +ecore_input_evas_libs = @ecore_input_evas_libs@ +ecore_input_libs = @ecore_input_libs@ +ecore_ipc_cflags = @ecore_ipc_cflags@ +ecore_ipc_libs = @ecore_ipc_libs@ +ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ +ecore_psl1ght_libs = @ecore_psl1ght_libs@ +ecore_sdl_cflags = @ecore_sdl_cflags@ +ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ +ecore_win32_cflags = @ecore_win32_cflags@ +ecore_win32_libs = @ecore_win32_libs@ +ecore_wince_cflags = @ecore_wince_cflags@ +ecore_wince_libs = @ecore_wince_libs@ +ecore_x_cflags = @ecore_x_cflags@ +ecore_x_libs = @ecore_x_libs@ +ecore_x_libs_private = @ecore_x_libs_private@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +exec_prefix = @exec_prefix@ +have_ecore_x_xcb_define = @have_ecore_x_xcb_define@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +release_info = @release_info@ +requirements_ecore = @requirements_ecore@ +requirements_ecore_cocoa = @requirements_ecore_cocoa@ +requirements_ecore_con = @requirements_ecore_con@ +requirements_ecore_directfb = @requirements_ecore_directfb@ +requirements_ecore_evas = @requirements_ecore_evas@ +requirements_ecore_fb = @requirements_ecore_fb@ +requirements_ecore_file = @requirements_ecore_file@ +requirements_ecore_imf = @requirements_ecore_imf@ +requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ +requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ +requirements_ecore_input = @requirements_ecore_input@ +requirements_ecore_input_evas = @requirements_ecore_input_evas@ +requirements_ecore_ipc = @requirements_ecore_ipc@ +requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ +requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ +requirements_ecore_win32 = @requirements_ecore_win32@ +requirements_ecore_wince = @requirements_ecore_wince@ +requirements_ecore_x = @requirements_ecore_x@ +rt_libs = @rt_libs@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +x_cflags = @x_cflags@ +x_includes = @x_includes@ +x_libs = @x_libs@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I$(top_srcdir)/src/lib/ecore \ +-I$(top_srcdir)/src/lib/ecore_input \ +-I$(top_builddir)/src/lib/ecore \ +-I$(top_builddir)/src/lib/ecore_input \ +@WAYLAND_CFLAGS@ \ +@EVAS_CFLAGS@ \ +@EINA_CFLAGS@ + +lib_LTLIBRARIES = libecore_wayland.la +includes_HEADERS = Ecore_Wayland.h +includesdir = $(includedir)/ecore-@VMAJ@ +libecore_wayland_la_SOURCES = \ +ecore_wl.c + +libecore_wayland_la_LIBADD = \ +$(top_builddir)/src/lib/ecore/libecore.la \ +$(top_builddir)/src/lib/ecore_input/libecore_input.la \ +@WAYLAND_LIBS@ \ +@EVAS_LIBS@ \ +@EINA_LIBS@ + +libecore_wayland_la_LDFLAGS = -version-info @version_info@ @release_info@ +libecore_wayland_la_DEPENDENCIES = $(top_builddir)/src/lib/ecore/libecore.la +EXTRA_DIST = ecore_wl_private.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/ecore_wayland/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/lib/ecore_wayland/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libecore_wayland.la: $(libecore_wayland_la_OBJECTS) $(libecore_wayland_la_DEPENDENCIES) + $(AM_V_CCLD)$(libecore_wayland_la_LINK) -rpath $(libdir) $(libecore_wayland_la_OBJECTS) $(libecore_wayland_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wl.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-includesHEADERS install-info \ + install-info-am install-libLTLIBRARIES install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-libLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c b/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c new file mode 100644 index 0000000..f62503b --- /dev/null +++ b/libraries/ecore/src/lib/ecore_wayland/ecore_wl.c @@ -0,0 +1,1213 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "Ecore.h" +#include "ecore_private.h" +#include "Ecore_Input.h" +#include "ecore_wl_private.h" +#include "Ecore_Wayland.h" + +/* FIXME: This gives BTN_LEFT/RIGHT/MIDDLE for linux systems ... + * What about other OSs ?? */ +#include +#ifdef __linux__ +# include +#else +# define BTN_LEFT 0x110 +# define BTN_RIGHT 0x111 +# define BTN_MIDDLE 0x112 +# define BTN_SIDE 0x113 +# define BTN_EXTRA 0x114 +# define BTN_FORWARD 0x115 +# define BTN_BACK 0x116 +#endif + +#include + +/* local function prototypes */ +static Eina_Bool _ecore_wl_shutdown(Eina_Bool close_display); +static void _ecore_wl_cb_disp_handle_global(struct wl_display *disp, uint32_t id, const char *interface, uint32_t version __UNUSED__, void *data __UNUSED__); +static int _ecore_wl_cb_disp_event_mask_update(uint32_t mask, void *data __UNUSED__); +static void _ecore_wl_cb_disp_handle_geometry(void *data __UNUSED__, struct wl_output *output __UNUSED__, int x, int y, int pw __UNUSED__, int ph __UNUSED__, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__); +static void _ecore_wl_cb_disp_handle_mode(void *data __UNUSED__, struct wl_output *output __UNUSED__, uint32_t flags, int w, int h, int refresh __UNUSED__); +static Eina_Bool _ecore_wl_cb_fd_handle(void *data, Ecore_Fd_Handler *hdl __UNUSED__); +static void _ecore_wl_cb_handle_motion(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, int32_t x, int32_t y, int32_t sx, int32_t sy); +static void _ecore_wl_cb_handle_button(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, uint32_t btn, uint32_t state); +static void _ecore_wl_cb_handle_key(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t __UNUSED__, uint32_t key, uint32_t state); +static void _ecore_wl_cb_handle_pointer_focus(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, struct wl_surface *surface, int32_t x, int32_t y, int32_t sx, int32_t sy); +static void _ecore_wl_cb_handle_keyboard_focus(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t __UNUSED__, struct wl_surface *surface, struct wl_array *keys); +static void _ecore_wl_cb_handle_touch_down(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, struct wl_surface *surface, int32_t id, int32_t x, int32_t y); +static void _ecore_wl_cb_handle_touch_up(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id); +static void _ecore_wl_cb_handle_touch_motion(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id, int32_t x, int32_t y); +static void _ecore_wl_cb_handle_touch_frame(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__); +static void _ecore_wl_cb_handle_touch_cancel(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__); +static void _ecore_wl_cb_source_target(void *data, struct wl_data_source *source __UNUSED__, const char *mime_type __UNUSED__); +static void _ecore_wl_cb_source_send(void *data, struct wl_data_source *source, const char *mime_type, int32_t fd); +static void _ecore_wl_cb_source_cancelled(void *data, struct wl_data_source *source __UNUSED__); +static void _ecore_wl_cb_source_offer(void *data, struct wl_data_offer *offer __UNUSED__, const char *type); +static void _ecore_wl_cb_data_offer(void *data, struct wl_data_device *data_dev, uint32_t id); +static void _ecore_wl_cb_data_enter(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, struct wl_surface *surface, int32_t x, int32_t y, struct wl_data_offer *offer); +static void _ecore_wl_cb_data_leave(void *data __UNUSED__, struct wl_data_device *data_dev); +static void _ecore_wl_cb_data_motion(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, int32_t x, int32_t y); +static void _ecore_wl_cb_data_drop(void *data __UNUSED__, struct wl_data_device *data_dev); +static void _ecore_wl_cb_data_selection(void *data, struct wl_data_device *data_dev, struct wl_data_offer *offer); + +static void _ecore_wl_mouse_move_send(uint32_t timestamp); +static void _ecore_wl_mouse_out_send(struct wl_surface *surface, uint32_t timestamp); +static void _ecore_wl_mouse_in_send(struct wl_surface *surface, uint32_t timestamp); +static void _ecore_wl_mouse_up_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp); +static void _ecore_wl_mouse_down_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp); +static void _ecore_wl_focus_out_send(struct wl_surface *surface, uint32_t timestamp); +static void _ecore_wl_focus_in_send(struct wl_surface *surface, uint32_t timestamp); + +/* local variables */ +static int _ecore_wl_init_count = 0; +static struct wl_display *_ecore_wl_disp = NULL; +static uint32_t _ecore_wl_disp_mask = 0; +static uint32_t _ecore_wl_disp_format = WL_SHM_FORMAT_ARGB8888; +static Eina_Rectangle _ecore_wl_screen; +static Ecore_Fd_Handler *_ecore_wl_fd_hdl = NULL; +static int _ecore_wl_screen_x = 0; +static int _ecore_wl_screen_y = 0; +static int _ecore_wl_surface_x = 0; +static int _ecore_wl_surface_y = 0; +static int _ecore_wl_touch_x = 0; +static int _ecore_wl_touch_y = 0; +static int _ecore_wl_input_modifiers = 0; +static struct xkb_desc *_ecore_wl_xkb; +static uint32_t _ecore_wl_input_button = 0; + +static struct wl_compositor *_ecore_wl_comp; +static struct wl_shm *_ecore_wl_shm; +static struct wl_shell *_ecore_wl_shell; +static struct wl_output *_ecore_wl_output; +static struct wl_input_device *_ecore_wl_input_dev; +static struct wl_surface *_ecore_wl_input_surface; +static struct wl_surface *_ecore_wl_touch_surface; +static struct wl_data_device_manager *_ecore_wl_data_manager; +static struct wl_data_device *_ecore_wl_data_dev; + +static const struct wl_output_listener _ecore_wl_output_listener = +{ + _ecore_wl_cb_disp_handle_geometry, + _ecore_wl_cb_disp_handle_mode +}; +static const struct wl_input_device_listener _ecore_wl_input_listener = +{ + _ecore_wl_cb_handle_motion, + _ecore_wl_cb_handle_button, + _ecore_wl_cb_handle_key, + _ecore_wl_cb_handle_pointer_focus, + _ecore_wl_cb_handle_keyboard_focus, + _ecore_wl_cb_handle_touch_down, + _ecore_wl_cb_handle_touch_up, + _ecore_wl_cb_handle_touch_motion, + _ecore_wl_cb_handle_touch_frame, + _ecore_wl_cb_handle_touch_cancel, +}; +static const struct wl_data_source_listener _ecore_wl_source_listener = +{ + _ecore_wl_cb_source_target, + _ecore_wl_cb_source_send, + _ecore_wl_cb_source_cancelled +}; +static const struct wl_data_device_listener _ecore_wl_data_listener = +{ + _ecore_wl_cb_data_offer, + _ecore_wl_cb_data_enter, + _ecore_wl_cb_data_leave, + _ecore_wl_cb_data_motion, + _ecore_wl_cb_data_drop, + _ecore_wl_cb_data_selection +}; +static const struct wl_data_offer_listener _ecore_wl_offer_listener = +{ + _ecore_wl_cb_source_offer, +}; + +/* external variables */ +int _ecore_wl_log_dom = -1; +EAPI int ECORE_WL_EVENT_MOUSE_IN = 0; +EAPI int ECORE_WL_EVENT_MOUSE_OUT = 0; +EAPI int ECORE_WL_EVENT_FOCUS_IN = 0; +EAPI int ECORE_WL_EVENT_FOCUS_OUT = 0; +EAPI int ECORE_WL_EVENT_DRAG_START = 0; +EAPI int ECORE_WL_EVENT_DRAG_STOP = 0; + +EAPI int +ecore_wl_init(const char *name) +{ + struct xkb_rule_names xkb_names; + int fd = 0; + + if (++_ecore_wl_init_count != 1) + return _ecore_wl_init_count; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!eina_init()) return --_ecore_wl_init_count; + + _ecore_wl_log_dom = + eina_log_domain_register("ecore_wl", ECORE_WL_DEFAULT_LOG_COLOR); + if (_ecore_wl_log_dom < 0) + { + EINA_LOG_ERR("Cannot create a log domain for Ecore Wayland."); + eina_shutdown(); + return --_ecore_wl_init_count; + } + + if (!ecore_init()) + { + eina_log_domain_unregister(_ecore_wl_log_dom); + _ecore_wl_log_dom = -1; + eina_shutdown(); + return --_ecore_wl_init_count; + } + + if (!ecore_event_init()) + { + eina_log_domain_unregister(_ecore_wl_log_dom); + _ecore_wl_log_dom = -1; + ecore_shutdown(); + eina_shutdown(); + return --_ecore_wl_init_count; + } + + if (!ECORE_WL_EVENT_MOUSE_IN) + { + ECORE_WL_EVENT_MOUSE_IN = ecore_event_type_new(); + ECORE_WL_EVENT_MOUSE_OUT = ecore_event_type_new(); + ECORE_WL_EVENT_FOCUS_IN = ecore_event_type_new(); + ECORE_WL_EVENT_FOCUS_OUT = ecore_event_type_new(); + ECORE_WL_EVENT_DRAG_START = ecore_event_type_new(); + ECORE_WL_EVENT_DRAG_STOP = ecore_event_type_new(); + } + + /* init xkb */ + /* FIXME: Somehow make this portable to other languages/countries */ + xkb_names.rules = "evdev"; + xkb_names.model = "evdev"; + xkb_names.layout = "us"; + xkb_names.variant = ""; + xkb_names.options = ""; + if (!(_ecore_wl_xkb = xkb_compile_keymap_from_rules(&xkb_names))) + { + ERR("Could not compile keymap"); + eina_log_domain_unregister(_ecore_wl_log_dom); + _ecore_wl_log_dom = -1; + ecore_event_shutdown(); + ecore_shutdown(); + eina_shutdown(); + return --_ecore_wl_init_count; + } + + /* connect to the wayland display */ + if (!(_ecore_wl_disp = wl_display_connect(name))) + { + eina_log_domain_unregister(_ecore_wl_log_dom); + _ecore_wl_log_dom = -1; + ecore_event_shutdown(); + ecore_shutdown(); + eina_shutdown(); + return --_ecore_wl_init_count; + } + + /* setup handler for wayland interfaces */ + wl_display_add_global_listener(_ecore_wl_disp, + _ecore_wl_cb_disp_handle_global, NULL); + + /* process connection events */ + wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_READABLE); + + fd = wl_display_get_fd(_ecore_wl_disp, + _ecore_wl_cb_disp_event_mask_update, NULL); + + _ecore_wl_fd_hdl = + ecore_main_fd_handler_add(fd, ECORE_FD_READ, _ecore_wl_cb_fd_handle, + _ecore_wl_disp, NULL, NULL); + if (!_ecore_wl_fd_hdl) + { + wl_display_destroy(_ecore_wl_disp); + _ecore_wl_disp = NULL; + eina_log_domain_unregister(_ecore_wl_log_dom); + _ecore_wl_log_dom = -1; + ecore_event_shutdown(); + ecore_shutdown(); + eina_shutdown(); + return --_ecore_wl_init_count; + } + + return _ecore_wl_init_count; +} + +EAPI int +ecore_wl_shutdown(void) +{ + return _ecore_wl_shutdown(EINA_TRUE); +} + +EAPI struct wl_display * +ecore_wl_display_get(void) +{ + return _ecore_wl_disp; +} + +EAPI struct wl_shm * +ecore_wl_shm_get(void) +{ + return _ecore_wl_shm; +} + +EAPI struct wl_compositor * +ecore_wl_compositor_get(void) +{ + return _ecore_wl_comp; +} + +EAPI struct wl_shell * +ecore_wl_shell_get(void) +{ + return _ecore_wl_shell; +} + +EAPI struct wl_input_device * +ecore_wl_input_device_get(void) +{ + return _ecore_wl_input_dev; +} + +EAPI void +ecore_wl_screen_size_get(int *w, int *h) +{ + if (w) *w = _ecore_wl_screen.w; + if (h) *h = _ecore_wl_screen.h; +} + +EAPI unsigned int +ecore_wl_format_get(void) +{ + return _ecore_wl_disp_format; +} + +EAPI void +ecore_wl_flush(void) +{ + wl_display_flush(_ecore_wl_disp); +} + +EAPI void +ecore_wl_sync(void) +{ + wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_READABLE); +} + +EAPI void +ecore_wl_pointer_xy_get(int *x, int *y) +{ + if (x) *x = _ecore_wl_screen_x; + if (y) *y = _ecore_wl_screen_y; +} + +EAPI Ecore_Wl_Drag_Source * +ecore_wl_drag_source_create(int hotspot_x, int hotspot_y, int offset_x, int offset_y, const char *mimetype, unsigned int timestamp, void *data) +{ + Ecore_Wl_Drag_Source *source; + + if (!(source = calloc(1, sizeof(Ecore_Wl_Drag_Source)))) return NULL; + + source->data_dev = _ecore_wl_data_dev; + source->hotspot_x = hotspot_x; + source->hotspot_y = hotspot_y; + source->offset_x = offset_x; + source->offset_y = offset_y; + source->mimetype = mimetype; + source->timestamp = timestamp; + source->data = data; + + source->data_source = + wl_data_device_manager_create_data_source(_ecore_wl_data_manager); + + wl_data_source_add_listener(source->data_source, + &_ecore_wl_source_listener, source); + + wl_data_source_offer(source->data_source, source->mimetype); + + /* NB: Do we add some default mimetypes here ?? */ + /* text/plain, etc */ + + return source; +} + +EAPI void +ecore_wl_drag_start(Ecore_Wl_Drag_Source *source, struct wl_surface *surface, struct wl_buffer *buffer) +{ + source->buffer = buffer; + + wl_data_device_start_drag(source->data_dev, source->data_source, + surface, source->timestamp); +} + +EAPI void +ecore_wl_drag_stop(void) +{ + +} + +/* local functions */ +static Eina_Bool +_ecore_wl_shutdown(Eina_Bool close_display) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (--_ecore_wl_init_count != 0) + return _ecore_wl_init_count; + + if (!_ecore_wl_disp) return _ecore_wl_init_count; + + if (_ecore_wl_xkb) free(_ecore_wl_xkb); + + if (_ecore_wl_fd_hdl) ecore_main_fd_handler_del(_ecore_wl_fd_hdl); + _ecore_wl_fd_hdl = NULL; + + if (close_display) + { + if (_ecore_wl_data_dev) wl_data_device_destroy(_ecore_wl_data_dev); + if (_ecore_wl_input_dev) wl_input_device_destroy(_ecore_wl_input_dev); + if (_ecore_wl_data_manager) + wl_data_device_manager_destroy(_ecore_wl_data_manager); + if (_ecore_wl_shell) wl_shell_destroy(_ecore_wl_shell); + if (_ecore_wl_shm) wl_shm_destroy(_ecore_wl_shm); + if (_ecore_wl_comp) wl_compositor_destroy(_ecore_wl_comp); + if (_ecore_wl_disp) + { + wl_display_flush(_ecore_wl_disp); + wl_display_destroy(_ecore_wl_disp); + } + _ecore_wl_disp = NULL; + } + + eina_log_domain_unregister(_ecore_wl_log_dom); + _ecore_wl_log_dom = -1; + + ecore_event_shutdown(); + ecore_shutdown(); + eina_shutdown(); + + return _ecore_wl_init_count; +} + +static void +_ecore_wl_cb_disp_handle_global(struct wl_display *disp, uint32_t id, const char *interface, uint32_t version __UNUSED__, void *data __UNUSED__) +{ +// LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (disp != _ecore_wl_disp) return; + if (!strcmp(interface, "wl_compositor")) + { + _ecore_wl_comp = + wl_display_bind(_ecore_wl_disp, id, &wl_compositor_interface); + } + else if (!strcmp(interface, "wl_shm")) + { + _ecore_wl_shm = + wl_display_bind(_ecore_wl_disp, id, &wl_shm_interface); + } + else if (!strcmp(interface, "wl_output")) + { + _ecore_wl_output = + wl_display_bind(_ecore_wl_disp, id, &wl_output_interface); + wl_output_add_listener(_ecore_wl_output, + &_ecore_wl_output_listener, NULL); + } + else if (!strcmp(interface, "wl_shell")) + { + _ecore_wl_shell = + wl_display_bind(_ecore_wl_disp, id, &wl_shell_interface); + } + else if (!strcmp(interface, "wl_input_device")) + { + _ecore_wl_input_dev = + wl_display_bind(_ecore_wl_disp, id, &wl_input_device_interface); + wl_input_device_add_listener(_ecore_wl_input_dev, + &_ecore_wl_input_listener, NULL); + } + else if (!strcmp(interface, "wl_data_device_manager")) + { + _ecore_wl_data_manager = + wl_display_bind(_ecore_wl_disp, id, + &wl_data_device_manager_interface); + } + + if ((_ecore_wl_input_dev) && (_ecore_wl_data_manager) && (!_ecore_wl_data_dev)) + { + _ecore_wl_data_dev = + wl_data_device_manager_get_data_device(_ecore_wl_data_manager, + _ecore_wl_input_dev); + wl_data_device_add_listener(_ecore_wl_data_dev, + &_ecore_wl_data_listener, NULL); + } +} + +static int +_ecore_wl_cb_disp_event_mask_update(uint32_t mask, void *data __UNUSED__) +{ +// LOGFN(__FILE__, __LINE__, __FUNCTION__); + + _ecore_wl_disp_mask = mask; + + return 0; +} + +static void +_ecore_wl_cb_disp_handle_geometry(void *data __UNUSED__, struct wl_output *output __UNUSED__, int x, int y, int pw __UNUSED__, int ph __UNUSED__, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__) +{ + _ecore_wl_screen.x = x; + _ecore_wl_screen.y = y; +} + +static void +_ecore_wl_cb_disp_handle_mode(void *data __UNUSED__, struct wl_output *output __UNUSED__, uint32_t flags, int w, int h, int refresh __UNUSED__) +{ + if (flags & WL_OUTPUT_MODE_CURRENT) + { + _ecore_wl_screen.w = w; + _ecore_wl_screen.h = h; + } +} + +static Eina_Bool +_ecore_wl_cb_fd_handle(void *data, Ecore_Fd_Handler *hdl __UNUSED__) +{ + struct wl_display *disp; + +// LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(disp = data)) return ECORE_CALLBACK_RENEW; + if (disp != _ecore_wl_disp) return ECORE_CALLBACK_RENEW; + + if (_ecore_wl_disp_mask & WL_DISPLAY_WRITABLE) + wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_WRITABLE); + + if (_ecore_wl_disp_mask & WL_DISPLAY_READABLE) + wl_display_iterate(_ecore_wl_disp, WL_DISPLAY_READABLE); + + return ECORE_CALLBACK_RENEW; +} + +static void +_ecore_wl_cb_handle_motion(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, int32_t x, int32_t y, int32_t sx, int32_t sy) +{ + if (dev != _ecore_wl_input_dev) return; + + _ecore_wl_screen_x = x; + _ecore_wl_screen_y = y; + _ecore_wl_surface_x = sx; + _ecore_wl_surface_y = sy; + + _ecore_wl_mouse_move_send(t); +} + +static void +_ecore_wl_cb_handle_button(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, uint32_t btn, uint32_t state) +{ + if (dev != _ecore_wl_input_dev) return; + + if ((btn >= BTN_SIDE) && (btn <= BTN_BACK)) + { + Ecore_Event_Mouse_Wheel *ev; + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Wheel)))) return; + + ev->timestamp = t; + ev->x = _ecore_wl_surface_x; + ev->y = _ecore_wl_surface_y; + ev->root.x = _ecore_wl_screen_x; + ev->root.y = _ecore_wl_screen_y; + ev->modifiers = _ecore_wl_input_modifiers; + ev->direction = 0; + + if (_ecore_wl_input_surface) + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_input_surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + /* NB: (FIXME) Currently Wayland provides no measure of how much the + * wheel has scrolled (read: delta of movement). So for now, we will + * just assume that the amount scrolled is 1 */ + if ((btn == BTN_EXTRA) || (btn == BTN_FORWARD)) // down + ev->z = 1; + else if ((btn == BTN_SIDE) || (btn == BTN_BACK)) // up + ev->z = -1; + + ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL); + } + else + { + if (state) + { + _ecore_wl_input_button = btn; + _ecore_wl_mouse_down_send(_ecore_wl_input_surface, btn, t); + /* NB: Ideally, this is not the place to check for drags. + * IMO, drags should be handled by the client. EG: we raise the + * mouse_down to the client, and the client can 'request' a + * drag_start from ecore_wl */ + if ((_ecore_wl_input_surface) || (_ecore_wl_touch_surface)) + { + /* record item which was grabbed. + * create drag source. start drag */ + } + } + else + { + if ((_ecore_wl_input_surface) || (_ecore_wl_touch_surface)) + { + /* release grabbed button and finish drag */ + if ((_ecore_wl_input_button) && + (_ecore_wl_input_button == btn)) + { + + } + } + _ecore_wl_input_button = 0; + _ecore_wl_mouse_up_send(_ecore_wl_input_surface, btn, t); + } + } +} + +static void +_ecore_wl_cb_handle_key(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t __UNUSED__, uint32_t key, uint32_t state) +{ + unsigned int keycode = 0; + + if (dev != _ecore_wl_input_dev) return; + + keycode = key + _ecore_wl_xkb->min_key_code; + + if (state) + _ecore_wl_input_modifiers |= _ecore_wl_xkb->map->modmap[keycode]; + else + _ecore_wl_input_modifiers &= ~_ecore_wl_xkb->map->modmap[keycode]; +} + +static void +_ecore_wl_cb_handle_pointer_focus(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, struct wl_surface *surface, int32_t x, int32_t y, int32_t sx, int32_t sy) +{ + if (dev != _ecore_wl_input_dev) return; + + /* NB: Wayland pointer focus is weird. It's not pointer focus in the normal + * sense...Wayland 'moving/resizing' (and maybe other stuff) has a habit + * of stealing the pointer focus and thus this cannot be used to control + * normal pointer focus. On mouse down, the 'active' surface is stolen + * by Wayland for the grab, so 'surface' here ends up being NULL. When a + * move or resize is finished, we get this event again, but this time + * with an active surface */ + _ecore_wl_screen_x = x; + _ecore_wl_screen_y = y; + _ecore_wl_surface_x = sx; + _ecore_wl_surface_y = sy; + + if ((_ecore_wl_input_surface) && (_ecore_wl_input_surface != surface)) + { + if (!_ecore_wl_input_button) + _ecore_wl_mouse_out_send(_ecore_wl_input_surface, t); + } + + if (surface) + { + if (_ecore_wl_input_button) + { + _ecore_wl_mouse_up_send(surface, _ecore_wl_input_button, t); + _ecore_wl_input_button = 0; + } + else + _ecore_wl_mouse_in_send(surface, t); + } +} + +static void +_ecore_wl_cb_handle_keyboard_focus(void *data __UNUSED__, struct wl_input_device *dev, uint32_t t, struct wl_surface *surface, struct wl_array *keys) +{ + unsigned int *keyend = 0, *i = 0; + + if (dev != _ecore_wl_input_dev) return; + + /* NB: Remove old keyboard focus */ + if ((_ecore_wl_input_surface) && (_ecore_wl_input_surface != surface)) + _ecore_wl_focus_out_send(_ecore_wl_input_surface, t); + + _ecore_wl_input_surface = NULL; + + keyend = keys->data + keys->size; + _ecore_wl_input_modifiers = 0; + for (i = keys->data; i < keyend; i++) + _ecore_wl_input_modifiers |= _ecore_wl_xkb->map->modmap[*i]; + + if (surface) + { + /* set new input surface */ + _ecore_wl_input_surface = surface; + + /* send mouse in to new surface */ + /* _ecore_wl_mouse_in_send(surface, t); */ + + /* send focus to new surface */ + _ecore_wl_focus_in_send(surface, t); + } +} + +static void +_ecore_wl_cb_handle_touch_down(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, struct wl_surface *surface, int32_t id, int32_t x, int32_t y) +{ + Ecore_Event_Mouse_Button *ev; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + _ecore_wl_touch_surface = surface; + _ecore_wl_touch_x = x; + _ecore_wl_touch_y = y; + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; + + ev->timestamp = timestamp; + + /* NB: Need to verify using x,y for these */ + ev->x = x; + ev->y = y; + ev->root.x = x; + ev->root.y = y; + ev->modifiers = 0; + ev->buttons = 0; + ev->same_screen = 1; + + /* FIXME: Need to get these from Wayland somehow */ + ev->double_click = 0; + ev->triple_click = 0; + + ev->multi.device = id; + ev->multi.radius = 1; + ev->multi.radius_x = 1; + ev->multi.radius_y = 1; + ev->multi.pressure = 1.0; + ev->multi.angle = 0.0; + /* NB: Need to verify using x,y for these */ + ev->multi.x = x; + ev->multi.y = y; + ev->multi.root.x = x; + ev->multi.root.y = y; + + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL); +} + +static void +_ecore_wl_cb_handle_touch_up(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id) +{ + Ecore_Event_Mouse_Button *ev; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; + + ev->timestamp = timestamp; + + /* TODO: Need to verify using x,y for these */ + ev->x = _ecore_wl_touch_x; + ev->y = _ecore_wl_touch_y; + ev->root.x = _ecore_wl_touch_x; + ev->root.y = _ecore_wl_touch_y; + ev->modifiers = 0; + ev->buttons = 0; + ev->same_screen = 1; + + /* FIXME: Need to get these from Wayland somehow */ + ev->double_click = 0; + ev->triple_click = 0; + + ev->multi.device = id; + ev->multi.radius = 1; + ev->multi.radius_x = 1; + ev->multi.radius_y = 1; + ev->multi.pressure = 1.0; + ev->multi.angle = 0.0; + + /* TODO: Need to verify using x,y for these */ + ev->multi.x = _ecore_wl_touch_x; + ev->multi.y = _ecore_wl_touch_y; + ev->multi.root.x = _ecore_wl_touch_x; + ev->multi.root.y = _ecore_wl_touch_y; + + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_touch_surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + _ecore_wl_touch_surface = NULL; + + ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL); +} + +static void +_ecore_wl_cb_handle_touch_motion(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__, uint32_t timestamp, int32_t id, int32_t x, int32_t y) +{ + Ecore_Event_Mouse_Move *ev; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!_ecore_wl_touch_surface) return; + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Move)))) return; + + ev->timestamp = timestamp; + /* TODO: Need to verify using x,y for these */ + ev->x = x; + ev->y = y; + ev->root.x = x; + ev->root.y = y; + ev->modifiers = 0; //_ecore_wl_input_modifiers; + ev->same_screen = 1; + + ev->multi.device = id; + ev->multi.radius = 1; + ev->multi.radius_x = 1; + ev->multi.radius_y = 1; + ev->multi.pressure = 1.0; + ev->multi.angle = 0.0; + + /* TODO: Need to verify using x,y for these */ + ev->multi.x = x; + ev->multi.y = y; + ev->multi.root.x = x; + ev->multi.root.y = y; + + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_touch_surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL); +} + +static void +_ecore_wl_cb_handle_touch_frame(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + /* FIXME: Need to get a device and actually test what happens here */ +} + +static void +_ecore_wl_cb_handle_touch_cancel(void *data __UNUSED__, struct wl_input_device *dev __UNUSED__) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + /* FIXME: Need to get a device and actually test what happens here */ + _ecore_wl_touch_surface = NULL; +} + +static void +_ecore_wl_cb_source_target(void *data, struct wl_data_source *source __UNUSED__, const char *mime_type __UNUSED__) +{ + Ecore_Wl_Drag_Source *s; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + printf("Ecore_Wl Source Target\n"); + if (!(s = data)) return; + printf("\tHave Drag Source\n"); + + /* FIXME: buffer here should really be the mouse cursor buffer */ + wl_data_device_attach(s->data_dev, s->timestamp, s->buffer, + s->hotspot_x, s->hotspot_y); +} + +static void +_ecore_wl_cb_source_send(void *data, struct wl_data_source *source, const char *mime_type, int32_t fd) +{ + Ecore_Wl_Drag_Source *s; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + printf("Ecore_Wl Source Send\n"); + if (!(s = data)) return; + printf("\tHave Drag Source\n"); + + /* FIXME: write message to fd */ + + /* NB: Wayland really sucks in this regard. Why should selection stuff + * require an 'fd' ?? */ +} + +static void +_ecore_wl_cb_source_cancelled(void *data, struct wl_data_source *source __UNUSED__) +{ + Ecore_Wl_Drag_Source *s; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + /* The cancelled event usually means source is no longer in use by + * the drag (or selection). */ + + printf("Ecore_Wl Source Cancel\n"); + if (!(s = data)) return; + printf("\tHave Drag Source\n"); + + /* FIXME: raise this to ecore_evas so the surface/buffer + * of the drag can be destroyed */ + + if (s->data_source) wl_data_source_destroy(s->data_source); + s->data_source = NULL; + + free(s); +} + +static void +_ecore_wl_cb_source_offer(void *data, struct wl_data_offer *offer __UNUSED__, const char *type) +{ + Ecore_Wl_Dnd_Source *s; + + if (!(s = data)) return; + eina_array_push(s->types, strdup(type)); +} + +static void +_ecore_wl_cb_data_offer(void *data, struct wl_data_device *data_dev, uint32_t id) +{ + Ecore_Wl_Dnd_Source *source; + + /* create a new 'data offer' structure and setup a listener for it */ + if (!(source = calloc(1, sizeof(Ecore_Wl_Dnd_Source)))) return; + + source->types = eina_array_new(1); + source->data = data; + source->refs = 1; + + /* FIXME: This will need to change when Wayland has typesafe wrappers for this */ + source->offer = (struct wl_data_offer *) + wl_proxy_create_for_id((struct wl_proxy *)data_dev, + id, &wl_data_offer_interface); + + wl_data_device_set_user_data(data_dev, source); + wl_data_offer_add_listener(source->offer, &_ecore_wl_offer_listener, source); +} + +static void +_ecore_wl_cb_data_enter(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, struct wl_surface *surface, int32_t x, int32_t y, struct wl_data_offer *offer) +{ + Ecore_Wl_Dnd_Source *source; + + if (!(source = wl_data_device_get_user_data(data_dev))) return; + + /* TODO: maybe set pointer focus here ?? */ + + source->timestamp = timestamp; +} + +static void +_ecore_wl_cb_data_leave(void *data __UNUSED__, struct wl_data_device *data_dev) +{ + Ecore_Wl_Dnd_Source *source; + + if (!(source = wl_data_device_get_user_data(data_dev))) return; + + /* destroy drag offer */ + wl_data_offer_destroy(source->offer); + + while (eina_array_count(source->types)) + free(eina_array_pop(source->types)); + + eina_array_free(source->types); + free(source); + + wl_data_device_set_user_data(data_dev, NULL); +} + +static void +_ecore_wl_cb_data_motion(void *data __UNUSED__, struct wl_data_device *data_dev, uint32_t timestamp, int32_t x, int32_t y) +{ + Ecore_Wl_Dnd_Source *source; + + if (!(source = wl_data_device_get_user_data(data_dev))) return; + /* TODO: Here we should raise motion events for dragging */ +} + +static void +_ecore_wl_cb_data_drop(void *data __UNUSED__, struct wl_data_device *data_dev) +{ + Ecore_Wl_Dnd_Source *source; + + if (!(source = wl_data_device_get_user_data(data_dev))) return; + + /* TODO: Raise event for drop */ + + wl_data_offer_accept(source->offer, source->timestamp, NULL); +// eina_array_data_get(source->types, 0)); +} + +static void +_ecore_wl_cb_data_selection(void *data, struct wl_data_device *data_dev, struct wl_data_offer *offer) +{ + Ecore_Wl_Dnd_Source *source; + + printf("Ecore_Wl Data Selection\n"); + if ((source = wl_data_device_get_user_data(data_dev))) + { + /* destroy old source */ + wl_data_offer_destroy(source->offer); + + while (eina_array_count(source->types)) + free(eina_array_pop(source->types)); + + eina_array_free(source->types); + free(source); + + wl_data_device_set_user_data(data_dev, NULL); + } +} + +static void +_ecore_wl_mouse_move_send(uint32_t timestamp) +{ + Ecore_Event_Mouse_Move *ev; + +// if (!_ecore_wl_input_surface) return; + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Move)))) return; + + ev->timestamp = timestamp; + ev->x = _ecore_wl_surface_x; + ev->y = _ecore_wl_surface_y; + ev->root.x = _ecore_wl_screen_x; + ev->root.y = _ecore_wl_screen_y; + ev->modifiers = _ecore_wl_input_modifiers; + + ev->multi.device = 0; + ev->multi.radius = 1; + ev->multi.radius_x = 1; + ev->multi.radius_y = 1; + ev->multi.pressure = 1.0; + ev->multi.angle = 0.0; + ev->multi.x = _ecore_wl_surface_x; + ev->multi.y = _ecore_wl_surface_y; + ev->multi.root.x = _ecore_wl_screen_x; + ev->multi.root.y = _ecore_wl_screen_y; + + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(_ecore_wl_input_surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL); +} + +static void +_ecore_wl_mouse_out_send(struct wl_surface *surface, uint32_t timestamp) +{ + Ecore_Wl_Event_Mouse_Out *ev; + + if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Mouse_Out)))) return; + + ev->x = _ecore_wl_surface_x; + ev->y = _ecore_wl_surface_y; + ev->root.x = _ecore_wl_screen_x; + ev->root.y = _ecore_wl_screen_y; + ev->modifiers = _ecore_wl_input_modifiers; + ev->time = timestamp; + + if (surface) + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + ev->window = id; + } + + ecore_event_add(ECORE_WL_EVENT_MOUSE_OUT, ev, NULL, NULL); +} + +static void +_ecore_wl_mouse_in_send(struct wl_surface *surface, uint32_t timestamp) +{ + Ecore_Wl_Event_Mouse_In *ev; + + if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Mouse_In)))) return; + + ev->x = _ecore_wl_surface_x; + ev->y = _ecore_wl_surface_y; + ev->root.x = _ecore_wl_screen_x; + ev->root.y = _ecore_wl_screen_y; + ev->modifiers = _ecore_wl_input_modifiers; + ev->time = timestamp; + + if (surface) + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + ev->window = id; + } + + ecore_event_add(ECORE_WL_EVENT_MOUSE_IN, ev, NULL, NULL); +} + +static void +_ecore_wl_mouse_up_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp) +{ + Ecore_Event_Mouse_Button *ev; + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; + + if (button == BTN_LEFT) + ev->buttons = 1; + else if (button == BTN_MIDDLE) + ev->buttons = 2; + else if (button == BTN_RIGHT) + ev->buttons = 3; + + ev->timestamp = timestamp; + ev->x = _ecore_wl_surface_x; + ev->y = _ecore_wl_surface_y; + ev->root.x = _ecore_wl_screen_x; + ev->root.y = _ecore_wl_screen_y; + ev->modifiers = _ecore_wl_input_modifiers; + + /* FIXME: Need to get these from Wayland somehow */ + ev->double_click = 0; + ev->triple_click = 0; + + ev->multi.device = 0; + ev->multi.radius = 1; + ev->multi.radius_x = 1; + ev->multi.radius_y = 1; + ev->multi.pressure = 1.0; + ev->multi.angle = 0.0; + ev->multi.x = _ecore_wl_surface_x; + ev->multi.y = _ecore_wl_surface_y; + ev->multi.root.x = _ecore_wl_screen_x; + ev->multi.root.y = _ecore_wl_screen_y; + + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL); +} + +static void +_ecore_wl_mouse_down_send(struct wl_surface *surface, uint32_t button, uint32_t timestamp) +{ + Ecore_Event_Mouse_Button *ev; + + if (!(ev = malloc(sizeof(Ecore_Event_Mouse_Button)))) return; + + if (button == BTN_LEFT) + ev->buttons = 1; + else if (button == BTN_MIDDLE) + ev->buttons = 2; + else if (button == BTN_RIGHT) + ev->buttons = 3; + + ev->timestamp = timestamp; + ev->x = _ecore_wl_surface_x; + ev->y = _ecore_wl_surface_y; + ev->root.x = _ecore_wl_screen_x; + ev->root.y = _ecore_wl_screen_y; + ev->modifiers = _ecore_wl_input_modifiers; + + /* FIXME: Need to get these from Wayland somehow */ + ev->double_click = 0; + ev->triple_click = 0; + + ev->multi.device = 0; + ev->multi.radius = 1; + ev->multi.radius_x = 1; + ev->multi.radius_y = 1; + ev->multi.pressure = 1.0; + ev->multi.angle = 0.0; + ev->multi.x = _ecore_wl_surface_x; + ev->multi.y = _ecore_wl_surface_y; + ev->multi.root.x = _ecore_wl_screen_x; + ev->multi.root.y = _ecore_wl_screen_y; + + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + { + ev->window = id; + ev->event_window = id; + } + } + + ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL); +} + +static void +_ecore_wl_focus_out_send(struct wl_surface *surface, uint32_t timestamp) +{ + Ecore_Wl_Event_Focus_Out *ev; + + if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Focus_Out)))) return; + ev->time = timestamp; + if (surface) + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + ev->window = id; + } + ecore_event_add(ECORE_WL_EVENT_FOCUS_OUT, ev, NULL, NULL); +} + +static void +_ecore_wl_focus_in_send(struct wl_surface *surface, uint32_t timestamp) +{ + Ecore_Wl_Event_Focus_In *ev; + + if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Focus_In)))) return; + ev->time = timestamp; + if (surface) + { + unsigned int id = 0; + + if ((id = (unsigned int)wl_surface_get_user_data(surface))) + ev->window = id; + } + ecore_event_add(ECORE_WL_EVENT_FOCUS_IN, ev, NULL, NULL); +} diff --git a/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h new file mode 100644 index 0000000..eec5ffe --- /dev/null +++ b/libraries/ecore/src/lib/ecore_wayland/ecore_wl_private.h @@ -0,0 +1,85 @@ +#ifndef _ECORE_WAYLAND_PRIVATE_H +# define _ECORE_WAYLAND_PRIVATE_H + +# include + +//# define LOGFNS 1 + +# ifdef LOGFNS +# include +# define LOGFN(fl, ln, fn) printf("-ECORE-WL: %25s: %5i - %s\n", fl, ln, fn); +# else +# define LOGFN(fl, ln, fn) +# endif + +extern int _ecore_wl_log_dom; + +# ifdef ECORE_WL_DEFAULT_LOG_COLOR +# undef ECORE_WL_DEFAULT_LOG_COLOR +# endif +# define ECORE_WL_DEFAULT_LOG_COLOR EINA_COLOR_BLUE + +# ifdef ERR +# undef ERR +# endif +# define ERR(...) EINA_LOG_DOM_ERR(_ecore_wl_log_dom, __VA_ARGS__) + +# ifdef DBG +# undef DBG +# endif +# define DBG(...) EINA_LOG_DOM_DBG(_ecore_wl_log_dom, __VA_ARGS__) + +# ifdef INF +# undef INF +# endif +# define INF(...) EINA_LOG_DOM_INFO(_ecore_wl_log_dom, __VA_ARGS__) + +# ifdef WRN +# undef WRN +# endif +# define WRN(...) EINA_LOG_DOM_WARN(_ecore_wl_log_dom, __VA_ARGS__) + +# ifdef CRIT +# undef CRIT +# endif +# define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_wl_log_dom, __VA_ARGS__) + +typedef struct _Ecore_Wl_Dnd_Source +{ + struct wl_data_offer *offer; + int refs; + + Eina_Array *types; + + uint32_t timestamp; + void *data; +} Ecore_Wl_Dnd_Source; + +typedef struct _Ecore_Wl_Dnd_Target +{ + /* NB: These are not the real fields for this structure, + * and it is Bound to change....soon */ + struct wl_data_offer *offer; + int refs; + + Eina_Array *types; + + uint32_t timestamp; + void *data; +} Ecore_Wl_Dnd_Target; + +struct _Ecore_Wl_Drag_Source +{ + struct wl_data_device *data_dev; + struct wl_buffer *buffer; + + int32_t hotspot_x, hotspot_y; + int32_t offset_x, offset_y; + const char *mimetype; + uint32_t timestamp; + void *data; + + struct wl_data_source *data_source; +}; + +#endif diff --git a/libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h b/libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h index bdfb1c8..95e3749 100644 --- a/libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h +++ b/libraries/ecore/src/lib/ecore_win32/Ecore_Win32.h @@ -221,7 +221,7 @@ struct _Ecore_Win32_Event_Mouse_In Ecore_Win32_Window *window; /**< The window that received the event */ int x; /**< The x coordinate where the mouse leaved */ int y; /**< The y coordinate where the mouse entered */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -233,7 +233,7 @@ struct _Ecore_Win32_Event_Mouse_Out Ecore_Win32_Window *window; /**< The window that received the event */ int x; /**< The x coordinate where the mouse leaved */ int y; /**< The y coordinate where the mouse leaved */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -243,7 +243,7 @@ struct _Ecore_Win32_Event_Mouse_Out struct _Ecore_Win32_Event_Window_Focus_In { Ecore_Win32_Window *window; /**< The window that received the event */ - long long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -253,7 +253,7 @@ struct _Ecore_Win32_Event_Window_Focus_In struct _Ecore_Win32_Event_Window_Focus_Out { Ecore_Win32_Window *window; /**< The window that received the event */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -267,7 +267,7 @@ struct _Ecore_Win32_Event_Window_Damage int y; /**< The y coordinate of the top left corner of the damaged region */ int width; /**< The width of the damaged region */ int height; /**< The time the event occurred */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -277,7 +277,7 @@ struct _Ecore_Win32_Event_Window_Damage struct _Ecore_Win32_Event_Window_Create { Ecore_Win32_Window *window; /**< The window that received the event */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -287,7 +287,7 @@ struct _Ecore_Win32_Event_Window_Create struct _Ecore_Win32_Event_Window_Destroy { Ecore_Win32_Window *window; /**< The window that received the event */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -297,7 +297,7 @@ struct _Ecore_Win32_Event_Window_Destroy struct _Ecore_Win32_Event_Window_Hide { Ecore_Win32_Window *window; /**< The window that received the event */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -307,7 +307,7 @@ struct _Ecore_Win32_Event_Window_Hide struct _Ecore_Win32_Event_Window_Show { Ecore_Win32_Window *window; /**< The window that received the event */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -322,7 +322,7 @@ struct _Ecore_Win32_Event_Window_Configure int y; /**< The new y coordinate of the top left corner */ int width; /**< The new width */ int height; /**< The new height */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -334,7 +334,7 @@ struct _Ecore_Win32_Event_Window_Resize Ecore_Win32_Window *window; /**< The window that received the event */ int width; /**< The new width */ int height; /**< The new height */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -344,7 +344,7 @@ struct _Ecore_Win32_Event_Window_Resize struct _Ecore_Win32_Event_Window_Delete_Request { Ecore_Win32_Window *window; /**< The window that received the event */ - long time; /**< The time the event occurred */ + unsigned long timestamp; /**< The time the event occurred */ }; /** @@ -369,12 +369,12 @@ EAPI extern int ECORE_WIN32_EVENT_WINDOW_DELETE_REQUEST; /**< Ecore_Event for th /* Core */ -EAPI int ecore_win32_init(); -EAPI int ecore_win32_shutdown(); -EAPI int ecore_win32_screen_depth_get(); -EAPI void ecore_win32_double_click_time_set(double t); -EAPI double ecore_win32_double_click_time_get(void); -EAPI long ecore_win32_current_time_get(void); +EAPI int ecore_win32_init(); +EAPI int ecore_win32_shutdown(); +EAPI int ecore_win32_screen_depth_get(); +EAPI void ecore_win32_double_click_time_set(double t); +EAPI double ecore_win32_double_click_time_get(void); +EAPI unsigned long ecore_win32_current_time_get(void); /* Window */ diff --git a/libraries/ecore/src/lib/ecore_win32/Makefile.in b/libraries/ecore/src/lib/ecore_win32/Makefile.in index 4e4f363..9994ee7 100644 --- a/libraries/ecore/src/lib/ecore_win32/Makefile.in +++ b/libraries/ecore/src/lib/ecore_win32/Makefile.in @@ -268,10 +268,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -290,6 +290,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -403,6 +407,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -415,6 +421,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -459,12 +467,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_win32/ecore_win32.c b/libraries/ecore/src/lib/ecore_win32/ecore_win32.c index 19ca3ed..b571d74 100644 --- a/libraries/ecore/src/lib/ecore_win32/ecore_win32.c +++ b/libraries/ecore/src/lib/ecore_win32/ecore_win32.c @@ -73,18 +73,44 @@ _ecore_win32_window_procedure(HWND window, data->message = message; data->window_param = window_param; data->data_param = data_param; - data->time = GetMessageTime(); + data->timestamp = GetMessageTime(); coord = GetMessagePos(); point = MAKEPOINTS(coord); data->x = point.x; data->y = point.y; + data->discard_ctrl = EINA_FALSE; switch (data->message) { /* Keyboard input notifications */ case WM_KEYDOWN: case WM_SYSKEYDOWN: - INF("keydown message"); + if ((data->message == WM_KEYDOWN) && + (data->window_param == VK_CONTROL) && + ((HIWORD(data->data_param) & KF_EXTENDED) == 0)) + { + /* Ctrl left key is pressed */ + BOOL res; + MSG next_msg; + + /* + * we check if the next message + * - is a WM_KEYDOWN + * - has the same timestamp than the Ctrl one + * - is the key press of the right Alt key + */ + res = PeekMessage(&next_msg, data->window, + WM_KEYDOWN, WM_KEYDOWN, + PM_NOREMOVE); + if (res && + (next_msg.wParam == VK_MENU) && + (next_msg.time == data->timestamp) && + (HIWORD(next_msg.lParam) & KF_EXTENDED)) + { + INF("discard left Ctrl key press (sent by AltGr key press)"); + data->discard_ctrl = EINA_TRUE; + } + } _ecore_win32_event_handle_key_press(data, 1); return 0; case WM_CHAR: @@ -95,6 +121,33 @@ _ecore_win32_window_procedure(HWND window, case WM_KEYUP: case WM_SYSKEYUP: INF("keyup message"); + if ((data->window_param == VK_CONTROL) && + ((HIWORD(data->data_param) & KF_EXTENDED) == 0)) + { + /* Ctrl left key is pressed */ + BOOL res; + MSG next_msg; + + /* + * we check if the next message + * - is a WM_KEYUP or WM_SYSKEYUP + * - has the same timestamp than the Ctrl one + * - is the key release of the right Alt key + */ + res = PeekMessage(&next_msg, data->window, + WM_KEYUP, WM_SYSKEYUP, + PM_NOREMOVE); + if (res && + ((next_msg.message == WM_KEYUP) || + (next_msg.message == WM_SYSKEYUP)) && + (next_msg.wParam == VK_MENU) && + (next_msg.time == data->timestamp) && + (HIWORD(next_msg.lParam) & KF_EXTENDED)) + { + INF("discard left Ctrl key release (sent by AltGr key release)"); + data->discard_ctrl = EINA_TRUE; + } + } _ecore_win32_event_handle_key_release(data); return 0; case WM_SETFOCUS: @@ -492,7 +545,7 @@ _ecore_win32_window_procedure(HWND window, HINSTANCE _ecore_win32_instance = NULL; double _ecore_win32_double_click_time = 0.25; -long _ecore_win32_event_last_time = 0; +unsigned long _ecore_win32_event_last_time = 0; Ecore_Win32_Window *_ecore_win32_event_last_window = NULL; int _ecore_win32_log_dom_global = -1; @@ -777,7 +830,7 @@ ecore_win32_double_click_time_get(void) * * This function returns the last event time. */ -EAPI long +EAPI unsigned long ecore_win32_current_time_get(void) { return _ecore_win32_event_last_time; diff --git a/libraries/ecore/src/lib/ecore_win32/ecore_win32_event.c b/libraries/ecore/src/lib/ecore_win32/ecore_win32_event.c index 63356d3..388776c 100644 --- a/libraries/ecore/src/lib/ecore_win32/ecore_win32_event.c +++ b/libraries/ecore/src/lib/ecore_win32/ecore_win32_event.c @@ -45,18 +45,18 @@ static void _ecore_win32_event_free_key_down(void *data, static void _ecore_win32_event_free_key_up(void *data, void *ev); -static int _ecore_win32_event_keystroke_get(int key, - int is_extended, - Eina_Bool is_down, - char **keyname, - char **keysymbol, - char **keycompose, - unsigned int *modifiers); +static int _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg, + Eina_Bool is_down, + char **keyname, + char **keysymbol, + char **keycompose, + unsigned int *modifiers); -static int _ecore_win32_event_char_get(int key, - char **keyname, - char **keysymbol, - char **keycompose); +static int _ecore_win32_event_char_get(int key, + char **keyname, + char **keysymbol, + char **keycompose, + unsigned int *modifiers); /***** Global functions definitions *****/ @@ -74,8 +74,7 @@ _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg, if (is_keystroke) { - if (!_ecore_win32_event_keystroke_get(msg->window_param, - msg->data_param & 0x01000000, + if (!_ecore_win32_event_keystroke_get(msg, EINA_TRUE, (char **)&e->keyname, (char **)&e->key, @@ -91,7 +90,8 @@ _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg, if (!_ecore_win32_event_char_get(LOWORD(msg->window_param), (char **)&e->keyname, (char **)&e->key, - (char **)&e->string)) + (char **)&e->string, + &e->modifiers)) { free(e); return; @@ -105,7 +105,7 @@ _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg, return; } e->event_window = e->window; - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; @@ -122,18 +122,19 @@ _ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg) e = (Ecore_Event_Key *)calloc(1, sizeof(Ecore_Event_Key)); if (!e) return; - if (!_ecore_win32_event_keystroke_get(LOWORD(msg->window_param), - msg->data_param & 0x01000000, + if (!_ecore_win32_event_keystroke_get(msg, EINA_FALSE, (char **)&e->keyname, (char **)&e->key, (char **)&e->string, &e->modifiers)) { - if (!_ecore_win32_event_char_get(LOWORD(msg->window_param), + if (msg->discard_ctrl || + !_ecore_win32_event_char_get(LOWORD(msg->window_param), (char **)&e->keyname, (char **)&e->key, - (char **)&e->string)) + (char **)&e->string, + &e->modifiers)) { free(e); return; @@ -147,7 +148,7 @@ _ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg) return; } e->event_window = e->window; - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; @@ -178,7 +179,7 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg, e->z = GET_WHEEL_DELTA_WPARAM(msg->window_param) > 0 ? -1 : 1; e->x = GET_X_LPARAM(msg->data_param); e->y = GET_Y_LPARAM(msg->data_param); - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; _ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window; @@ -197,7 +198,7 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg, e->event_window = e->window; e->x = GET_X_LPARAM(msg->data_param); e->y = GET_Y_LPARAM(msg->data_param); - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; _ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window; @@ -224,7 +225,7 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg, e->buttons = button; e->x = GET_X_LPARAM(msg->data_param); e->y = GET_Y_LPARAM(msg->data_param); - e->timestamp = msg->time; + e->timestamp = msg->timestamp; if (((e->timestamp - _ecore_win32_mouse_down_last_time) <= (unsigned long)(1000 * _ecore_win32_double_click_time)) && (e->window == (Ecore_Window)_ecore_win32_mouse_down_last_window)) @@ -279,7 +280,7 @@ _ecore_win32_event_handle_button_release(Ecore_Win32_Callback_Data *msg, e->event_window = e->window; e->x = GET_X_LPARAM(msg->data_param); e->y = GET_Y_LPARAM(msg->data_param); - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; _ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window; @@ -298,7 +299,7 @@ _ecore_win32_event_handle_button_release(Ecore_Win32_Callback_Data *msg, e->buttons = button; e->x = GET_X_LPARAM(msg->data_param); e->y = GET_Y_LPARAM(msg->data_param); - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_mouse_up_count++; @@ -334,7 +335,7 @@ _ecore_win32_event_handle_motion_notify(Ecore_Win32_Callback_Data *msg) e->event_window = e->window; e->x = GET_X_LPARAM(msg->data_param); e->y = GET_Y_LPARAM(msg->data_param); - e->timestamp = msg->time; + e->timestamp = msg->timestamp; ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL); } @@ -354,7 +355,7 @@ _ecore_win32_event_handle_enter_notify(Ecore_Win32_Callback_Data *msg) e->event_window = e->window; e->x = msg->x; e->y = msg->y; - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; _ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window; @@ -371,9 +372,9 @@ _ecore_win32_event_handle_enter_notify(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); e->x = msg->x; e->y = msg->y; - e->time = msg->time ; + e->timestamp = msg->timestamp ; - _ecore_win32_event_last_time = e->time; + _ecore_win32_event_last_time = e->timestamp; ecore_event_add(ECORE_WIN32_EVENT_MOUSE_IN, e, NULL, NULL); } @@ -394,7 +395,7 @@ _ecore_win32_event_handle_leave_notify(Ecore_Win32_Callback_Data *msg) e->event_window = e->window; e->x = msg->x; e->y = msg->y; - e->timestamp = msg->time; + e->timestamp = msg->timestamp; _ecore_win32_event_last_time = e->timestamp; _ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window; @@ -411,9 +412,9 @@ _ecore_win32_event_handle_leave_notify(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); e->x = msg->x; e->y = msg->y; - e->time = msg->time; + e->timestamp = msg->timestamp; - _ecore_win32_event_last_time = e->time; + _ecore_win32_event_last_time = e->timestamp; ecore_event_add(ECORE_WIN32_EVENT_MOUSE_OUT, e, NULL, NULL); } @@ -431,8 +432,8 @@ _ecore_win32_event_handle_focus_in(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; - _ecore_win32_event_last_time = e->time; + e->timestamp = _ecore_win32_event_last_time; + _ecore_win32_event_last_time = e->timestamp; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_FOCUS_IN, e, NULL, NULL); } @@ -449,8 +450,8 @@ _ecore_win32_event_handle_focus_out(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; - _ecore_win32_event_last_time = e->time; + e->timestamp = _ecore_win32_event_last_time; + _ecore_win32_event_last_time = e->timestamp; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_FOCUS_OUT, e, NULL, NULL); } @@ -472,7 +473,7 @@ _ecore_win32_event_handle_expose(Ecore_Win32_Callback_Data *msg) e->width = msg->update.right - msg->update.left; e->height = msg->update.bottom - msg->update.top; - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_DAMAGE, e, NULL, NULL); } @@ -489,7 +490,7 @@ _ecore_win32_event_handle_create_notify(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_CREATE, e, NULL, NULL); } @@ -506,7 +507,7 @@ _ecore_win32_event_handle_destroy_notify(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; if (e->window == _ecore_win32_event_last_window) _ecore_win32_event_last_window = NULL; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_DESTROY, e, NULL, NULL); @@ -524,7 +525,7 @@ _ecore_win32_event_handle_map_notify(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_SHOW, e, NULL, NULL); } @@ -541,7 +542,7 @@ _ecore_win32_event_handle_unmap_notify(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_HIDE, e, NULL, NULL); } @@ -572,7 +573,7 @@ _ecore_win32_event_handle_configure_notify(Ecore_Win32_Callback_Data *msg) e->y = wi.rcClient.top; e->width = wi.rcClient.right - wi.rcClient.left; e->height = wi.rcClient.bottom - wi.rcClient.top; - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_CONFIGURE, e, NULL, NULL); } @@ -594,7 +595,7 @@ _ecore_win32_event_handle_resize(Ecore_Win32_Callback_Data *msg) e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); e->width = rect.right - rect.left; e->height = rect.bottom - rect.top; - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_RESIZE, e, NULL, NULL); } @@ -610,7 +611,7 @@ _ecore_win32_event_handle_delete_request(Ecore_Win32_Callback_Data *msg) if (!e) return; e->window = (void *)GetWindowLongPtr(msg->window, GWLP_USERDATA); - e->time = _ecore_win32_event_last_time; + e->timestamp = _ecore_win32_event_last_time; ecore_event_add(ECORE_WIN32_EVENT_WINDOW_DELETE_REQUEST, e, NULL, NULL); } @@ -645,24 +646,28 @@ _ecore_win32_event_free_key_up(void *data __UNUSED__, } static int -_ecore_win32_event_keystroke_get(int key, - int is_extended, +_ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg, Eina_Bool is_down, char **keyname, char **keysymbol, char **keycompose, unsigned int *modifiers) { + WCHAR buf[3]; + char delete_string[2] = { 0x7f, 0 }; char *kn = NULL; char *ks = NULL; char *kc = NULL; + int key; + int is_extended; + + key = msg->window_param; + is_extended = msg->data_param & 0x01000000; *keyname = NULL; *keysymbol = NULL; *keycompose = NULL; - - printf("vk key 0x%x\n", key); switch (key) { /* Keystroke */ @@ -751,7 +756,6 @@ _ecore_win32_event_keystroke_get(int key, } break; case VK_RIGHT: - printf("vk val 0x%x (right)\n", VK_RIGHT); if (is_extended) { kn = "Right"; @@ -798,8 +802,7 @@ _ecore_win32_event_keystroke_get(int key, { kn = "Delete"; ks = "Delete"; - /* FIXME: kc is wrong, here */ - kc = "Delete"; + kc = delete_string; } else { @@ -830,7 +833,7 @@ _ecore_win32_event_keystroke_get(int key, ks = "Shift_R"; kc = ""; } - *modifiers |= ECORE_EVENT_MODIFIER_SHIFT; + *modifiers &= ~ECORE_EVENT_MODIFIER_SHIFT; } else /* is_up */ { @@ -852,7 +855,7 @@ _ecore_win32_event_keystroke_get(int key, kc = ""; _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_RSHIFT; } - *modifiers &= ~ECORE_EVENT_MODIFIER_SHIFT; + *modifiers |= ECORE_EVENT_MODIFIER_SHIFT; } break; } @@ -860,6 +863,9 @@ _ecore_win32_event_keystroke_get(int key, { SHORT res; + if (msg->discard_ctrl) + return 0; + if (is_down) { res = GetKeyState(VK_LCONTROL); @@ -1113,11 +1119,53 @@ _ecore_win32_event_keystroke_get(int key, kc = ""; break; default: - /* other non keystroke characters */ - return 0; + { + /* other non keystroke characters */ + BYTE kbd_state[256]; + int res; + + if (is_down) + return 0; + + if (!GetKeyboardState(kbd_state)) + return 0; + + res = ToUnicode(msg->window_param, + MapVirtualKey(msg->window_param, 2), + kbd_state, buf, 3, 0); + if (res == 1) + { + /* FIXME: might be troublesome for non european languages */ + /* in that case, UNICODE should be used, I guess */ + buf[1] = '\0'; + kn = (char *)buf; + ks = (char *)buf; + kc = (char *)buf; + + res = GetAsyncKeyState(VK_SHIFT); + if (res & 0x8000) + *modifiers |= ECORE_EVENT_MODIFIER_SHIFT; + else + *modifiers &= ~ECORE_EVENT_MODIFIER_SHIFT; + + res = GetKeyState(VK_CONTROL); + if (res & 0x8000) + *modifiers |= ECORE_EVENT_MODIFIER_CTRL; + else + *modifiers &= ~ECORE_EVENT_MODIFIER_CTRL; + + res = GetKeyState(VK_MENU); + if (res & 0x8000) + *modifiers |= ECORE_EVENT_MODIFIER_ALT; + else + *modifiers &= ~ECORE_EVENT_MODIFIER_ALT; + + break; + } + return 0; + } } - printf("sortie...\n"); *keyname = strdup(kn); if (!*keyname) return 0; *keysymbol = strdup(ks); @@ -1141,28 +1189,27 @@ _ecore_win32_event_keystroke_get(int key, return 0; } } - printf("sortie 2 ...\n"); return 1; } static int -_ecore_win32_event_char_get(int key, - char **keyname, - char **keysymbol, - char **keycompose) +_ecore_win32_event_char_get(int key, + char **keyname, + char **keysymbol, + char **keycompose, + unsigned int *modifiers) { char *kn = NULL; char *ks = NULL; char *kc = NULL; char buf[2]; + SHORT res; *keyname = NULL; *keysymbol = NULL; *keycompose = NULL; - printf("char key 0x%x\n", key); - switch (key) { case VK_PROCESSKEY: @@ -1200,7 +1247,6 @@ _ecore_win32_event_char_get(int key, break; default: /* displayable characters */ - printf (" * key : %d\n", key); buf[0] = key; buf[1] = '\0'; kn = buf; @@ -1227,5 +1273,23 @@ _ecore_win32_event_char_get(int key, return 0; } + res = GetAsyncKeyState(VK_SHIFT); + if (res & 0x8000) + *modifiers |= ECORE_EVENT_MODIFIER_SHIFT; + else + *modifiers &= ~ECORE_EVENT_MODIFIER_SHIFT; + + res = GetKeyState(VK_CONTROL); + if (res & 0x8000) + *modifiers |= ECORE_EVENT_MODIFIER_CTRL; + else + *modifiers &= ~ECORE_EVENT_MODIFIER_CTRL; + + res = GetKeyState(VK_MENU); + if (res & 0x8000) + *modifiers |= ECORE_EVENT_MODIFIER_ALT; + else + *modifiers &= ~ECORE_EVENT_MODIFIER_ALT; + return 1; } 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 4533169..ab54763 100644 --- a/libraries/ecore/src/lib/ecore_win32/ecore_win32_private.h +++ b/libraries/ecore/src/lib/ecore_win32/ecore_win32_private.h @@ -49,14 +49,15 @@ typedef struct _Ecore_Win32_Callback_Data Ecore_Win32_Callback_Data; struct _Ecore_Win32_Callback_Data { - RECT update; - HWND window; - unsigned int message; - WPARAM window_param; - LPARAM data_param; - long time; - int x; - int y; + RECT update; + HWND window; + unsigned int message; + WPARAM window_param; + LPARAM data_param; + unsigned long timestamp; + int x; + int y; + Eina_Bool discard_ctrl; }; struct _Ecore_Win32_Window @@ -130,7 +131,7 @@ struct _Ecore_Win32_Window extern HINSTANCE _ecore_win32_instance; extern double _ecore_win32_double_click_time; -extern long _ecore_win32_event_last_time; +extern unsigned long _ecore_win32_event_last_time; extern Ecore_Win32_Window *_ecore_win32_event_last_window; diff --git a/libraries/ecore/src/lib/ecore_wince/Makefile.in b/libraries/ecore/src/lib/ecore_wince/Makefile.in index 0610122..d23bf51 100644 --- a/libraries/ecore/src/lib/ecore_wince/Makefile.in +++ b/libraries/ecore/src/lib/ecore_wince/Makefile.in @@ -249,10 +249,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -271,6 +271,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -384,6 +388,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -396,6 +402,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -440,12 +448,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_x/Ecore_X.h b/libraries/ecore/src/lib/ecore_x/Ecore_X.h index 6588a75..b5d2c3f 100644 --- a/libraries/ecore/src/lib/ecore_x/Ecore_X.h +++ b/libraries/ecore/src/lib/ecore_x/Ecore_X.h @@ -1181,6 +1181,8 @@ EAPI int ecore_x_error_request_get(void); EAPI int ecore_x_error_code_get(void); +EAPI Ecore_X_ID +ecore_x_error_resource_id_get(void); EAPI void ecore_x_event_mask_set(Ecore_X_Window w, @@ -3114,7 +3116,10 @@ EAPI Ecore_X_Randr_Edid_Display_Interface_Type ecore_x_randr_edid_display_interface_type_get(unsigned char *edid, unsigned long edid_length); -/* ecore_x_randr_13.c */ +/* ecore_x_randr_12.c */ + +EAPI Eina_Bool +ecore_x_randr_output_backlight_available(void); EAPI void ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, double level); diff --git a/libraries/ecore/src/lib/ecore_x/Makefile.in b/libraries/ecore/src/lib/ecore_x/Makefile.in index d5f4247..3b53cfe 100644 --- a/libraries/ecore/src/lib/ecore_x/Makefile.in +++ b/libraries/ecore/src/lib/ecore_x/Makefile.in @@ -279,10 +279,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -301,6 +301,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -414,6 +418,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -426,6 +432,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -470,12 +478,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in b/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in index 0213aea..9108f23 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in +++ b/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in @@ -261,10 +261,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -283,6 +283,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -396,6 +400,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -408,6 +414,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -452,12 +460,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_damage.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_damage.c index d0ffde1..bbab308 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_damage.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_damage.c @@ -99,7 +99,7 @@ ecore_x_damage_new(Ecore_X_Drawable drawable, /** * Destroy a damage object * - * @param The damage object to destroy + * @param damage The damage object to destroy * * Destroys the damage object @p damage * diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dnd.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dnd.c index 677de38..177e61d 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dnd.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dnd.c @@ -422,9 +422,8 @@ ecore_x_dnd_actions_set(Ecore_X_Window win, * @param data User data. */ EAPI void -ecore_x_dnd_callback_pos_update_set(void (*cb)(void *, - Ecore_X_Xdnd_Position *data), - const void *data) +ecore_x_dnd_callback_pos_update_set(void (*cb)(void *, Ecore_X_Xdnd_Position *data), + const void *data) { _posupdatecb = cb; _posupdatedata = (void *)data; diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dpms.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dpms.c index 63b7f1e..324717c 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dpms.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dpms.c @@ -270,7 +270,7 @@ ecore_x_dpms_timeout_off_get(void) /** * Sets the standby timeout (in unit of seconds). - * @param new_standby Amount of time of inactivity before standby mode will be invoked. + * @param new_timeout Amount of time of inactivity before standby mode will be invoked. * @ingroup Ecore_X_DPMS_Group */ EAPI void @@ -286,7 +286,7 @@ ecore_x_dpms_timeout_standby_set(unsigned int new_timeout) /** * Sets the suspend timeout (in unit of seconds). - * @param suspend Amount of time of inactivity before the screen is placed into suspend mode. + * @param new_timeout Amount of time of inactivity before the screen is placed into suspend mode. * @ingroup Ecore_X_DPMS_Group */ EAPI void @@ -302,7 +302,7 @@ ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout) /** * Sets the off timeout (in unit of seconds). - * @param off Amount of time of inactivity before the monitor is shut off. + * @param new_timeout Amount of time of inactivity before the monitor is shut off. * @ingroup Ecore_X_DPMS_Group */ EAPI void diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c index bbd9c2a..fc32926 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c @@ -8,6 +8,7 @@ static void (*_io_error_func)(void *data) = NULL; static void *_io_error_data = NULL; static int _error_request_code = 0; static int _error_code = 0; +static Ecore_X_ID _error_resource_id = 0; /** * Set the error handler. @@ -63,6 +64,18 @@ ecore_x_error_code_get(void) return _error_code; } +/** + * Get the resource id that caused the error. + * @return The resource id causing the X error + * + * Return the X resource id that caused the last X error + */ +EAPI Ecore_X_ID +ecore_x_error_resource_id_get(void) +{ + return _error_resource_id; +} + int _ecore_xcb_error_handle(xcb_generic_error_t *err) { @@ -84,6 +97,7 @@ _ecore_xcb_error_handle(xcb_generic_error_t *err) _error_request_code = err->sequence; _error_code = err->error_code; + _error_resource_id = err->resource_id; if (_error_func) _error_func(_error_data); diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c index 6459db7..8dea861 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c @@ -396,7 +396,7 @@ ecore_x_icccm_transient_for_set(Ecore_X_Window win, /** * Remove the transient_for setting from a window. - * @param The window + * @param win The window */ EAPI void ecore_x_icccm_transient_for_unset(Ecore_X_Window win) @@ -1452,6 +1452,7 @@ ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time t) { LOGFN(__FILE__, __LINE__, __FUNCTION__); + CHECK_XCB_CONN; ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, XCB_EVENT_MASK_NO_EVENT, 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 510da49..62f7618 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 @@ -1528,9 +1528,9 @@ ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, /** * @brief sets a CRTC relative to another one. - * @param crtc_r1 the CRTC to be positioned. - * @param crtc_r2 the CRTC the position should be relative to - * @param position the relation between the crtcs + * @param crtc1 the CRTC to be positioned. + * @param crtc2 the CRTC the position should be relative to + * @param policy the relation between the crtcs * @param alignment in case CRTCs size differ, aligns CRTC1 accordingly at CRTC2's * borders * @return EINA_TRUE if crtc could be successfully positioned. EINA_FALSE if @@ -2449,6 +2449,45 @@ ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, return EINA_FALSE; } +/* + * @brief check if a backlight is available + * @return whether a blacklight is available + */ +EAPI Eina_Bool +ecore_x_randr_output_backlight_available(void) +{ +#ifdef ECORE_XCB_RANDR + Ecore_X_Atom _backlight; + xcb_intern_atom_cookie_t acookie; + xcb_intern_atom_reply_t *areply; +#endif + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + CHECK_XCB_CONN; + +#ifdef ECORE_XCB_RANDR + RANDR_CHECK_1_2_RET(EINA_FALSE); + + acookie = + xcb_intern_atom_unchecked(_ecore_xcb_conn, 1, + strlen("Backlight"), "Backlight"); + areply = xcb_intern_atom_reply(_ecore_xcb_conn, acookie, NULL); + + if (!areply) + { + ERR("Backlight property is not suppported on this server or driver"); + return EINA_FALSE; + } + else + { + _backlight = areply->atom; + free(areply); + return EINA_TRUE; + } +#endif + return EINA_FALSE; +} + EAPI int ecore_x_randr_edid_version_get(unsigned char *edid, unsigned long edid_length) { 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 2616c93..27bceaf 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 @@ -783,13 +783,14 @@ ecore_x_window_focus(Ecore_X_Window win) */ EAPI void ecore_x_window_focus_at_time(Ecore_X_Window win, - Ecore_X_Time time) + Ecore_X_Time time __UNUSED__) { LOGFN(__FILE__, __LINE__, __FUNCTION__); CHECK_XCB_CONN; if (!win) win = ((xcb_screen_t *)_ecore_xcb_screen)->root; - xcb_set_input_focus(_ecore_xcb_conn, XCB_INPUT_FOCUS_PARENT, win, time); + xcb_set_input_focus(_ecore_xcb_conn, + XCB_INPUT_FOCUS_PARENT, win, XCB_CURRENT_TIME); // ecore_x_flush(); } diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_xfixes.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_xfixes.c index bf9d5ee..bbca2a5 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_xfixes.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_xfixes.c @@ -178,7 +178,7 @@ ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap) /** * Create a region from a window. - * @param window The window used to initialize the region. + * @param win The window used to initialize the region. * @param type The type of the region. * @return The newly created region. * @@ -609,8 +609,8 @@ ecore_x_region_expand(Ecore_X_Region dest, * Change clip-mask in a graphic context to the specified region. * @param region The region to change. * @param gc The clip-mask graphic context. - * @param x_origin The horizontal translation. - * @param y_origin The vertical translation. + * @param x The horizontal translation. + * @param y The vertical translation. * * Changes clip-mask in @p gc to the specified @p region and * sets the clip origin with the values of @p x_origin and @p y_origin. @@ -643,8 +643,8 @@ ecore_x_region_gc_clip_set(Ecore_X_Region region, * @param region The region. * @param dest The window whose shape is changed. * @param type The kind of shape. - * @param x_offset The horizontal offset. - * @param y_offset The vertical offset. + * @param x The horizontal offset. + * @param y The vertical offset. * * Set the specified Shape extension region of @p window to @p region, * offset by @p x_offset and @p y_offset. Future changes to region @@ -673,8 +673,8 @@ ecore_x_region_window_shape_set(Ecore_X_Region region, * Change clip-mask in picture to the specified region. * @param region The region. * @param picture The picture. - * @param x_origin The X coordinate of the origin. - * @param y_origin The Y coordinate of the origin. + * @param x The X coordinate of the origin. + * @param y The Y coordinate of the origin. * * Changes clip-mask in picture to the specified @p region * and sets the clip origin. Input and output will be clipped to diff --git a/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in b/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in index e1026e5..27a2841 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in +++ b/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in @@ -252,10 +252,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -274,6 +274,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -387,6 +391,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -399,6 +405,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -443,12 +451,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x.c index 844ab04..6d275bc 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x.c @@ -19,9 +19,9 @@ #include "Ecore_X_Atoms.h" #include "Ecore_Input.h" -static Eina_Bool _ecore_x_fd_handler(void *data, +static Eina_Bool _ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler); -static Eina_Bool _ecore_x_fd_handler_buf(void *data, +static Eina_Bool _ecore_x_fd_handler_buf(void *data, Ecore_Fd_Handler *fd_handler); static int _ecore_x_key_mask_get(KeySym sym); static int _ecore_x_event_modifier(unsigned int state); @@ -139,9 +139,9 @@ EAPI int ECORE_X_LOCK_SHIFT = 0; #ifdef LOGRT static double t0 = 0.0; static Status (*_logrt_real_reply)(Display *disp, - void *rep, - int extra, - Bool discard) = NULL; + void *rep, + int extra, + Bool discard) = NULL; static void _logrt_init(void) { @@ -159,13 +159,13 @@ _logrt_init(void) _logrt_real_reply = dlsym(lib, "_XReply"); t0 = ecore_time_get(); -} /* _logrt_init */ +} Status _XReply(Display *disp, - void *rep, - int extra, - Bool discard) + void *rep, + int extra, + Bool discard) { void *bt[128]; int i, n; @@ -207,7 +207,7 @@ _XReply(Display *disp, // fixme: logme return _logrt_real_reply(disp, rep, extra, discard); -} /* _XReply */ +} #endif /* ifdef LOGRT */ @@ -215,35 +215,35 @@ void _ecore_x_modifiers_get(void) { /* everything has these... unless its like a pda... :) */ - ECORE_X_MODIFIER_SHIFT = _ecore_x_key_mask_get(XK_Shift_L); - ECORE_X_MODIFIER_CTRL = _ecore_x_key_mask_get(XK_Control_L); + ECORE_X_MODIFIER_SHIFT = _ecore_x_key_mask_get(XK_Shift_L); + ECORE_X_MODIFIER_CTRL = _ecore_x_key_mask_get(XK_Control_L); - /* apple's xdarwin has no alt!!!! */ - ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Alt_L); - if (!ECORE_X_MODIFIER_ALT) - ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Meta_L); + /* apple's xdarwin has no alt!!!! */ + ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Alt_L); + if (!ECORE_X_MODIFIER_ALT) + ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Meta_L); - if (!ECORE_X_MODIFIER_ALT) - ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Super_L); + if (!ECORE_X_MODIFIER_ALT) + ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Super_L); - /* the windows key... a valid modifier :) */ - ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L); - if (!ECORE_X_MODIFIER_WIN) - ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Mode_switch); + /* the windows key... a valid modifier :) */ + ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L); + if (!ECORE_X_MODIFIER_WIN) + ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Mode_switch); - if (!ECORE_X_MODIFIER_WIN) - ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L); + if (!ECORE_X_MODIFIER_WIN) + ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L); - if (ECORE_X_MODIFIER_WIN == ECORE_X_MODIFIER_ALT) - ECORE_X_MODIFIER_WIN = 0; + if (ECORE_X_MODIFIER_WIN == ECORE_X_MODIFIER_ALT) + ECORE_X_MODIFIER_WIN = 0; - if (ECORE_X_MODIFIER_ALT == ECORE_X_MODIFIER_CTRL) - ECORE_X_MODIFIER_ALT = 0; + if (ECORE_X_MODIFIER_ALT == ECORE_X_MODIFIER_CTRL) + ECORE_X_MODIFIER_ALT = 0; - ECORE_X_LOCK_SCROLL = _ecore_x_key_mask_get(XK_Scroll_Lock); - ECORE_X_LOCK_NUM = _ecore_x_key_mask_get(XK_Num_Lock); - ECORE_X_LOCK_CAPS = _ecore_x_key_mask_get(XK_Caps_Lock); - ECORE_X_LOCK_SHIFT = _ecore_x_key_mask_get(XK_Shift_Lock); + ECORE_X_LOCK_SCROLL = _ecore_x_key_mask_get(XK_Scroll_Lock); + ECORE_X_LOCK_NUM = _ecore_x_key_mask_get(XK_Num_Lock); + ECORE_X_LOCK_CAPS = _ecore_x_key_mask_get(XK_Caps_Lock); + ECORE_X_LOCK_SHIFT = _ecore_x_key_mask_get(XK_Shift_Lock); } /** @@ -300,7 +300,7 @@ ecore_x_init(const char *name) eina_init(); _ecore_xlib_log_dom = eina_log_domain_register ("ecore_x", ECORE_XLIB_DEFAULT_LOG_COLOR); - if(_ecore_xlib_log_dom < 0) + if (_ecore_xlib_log_dom < 0) { EINA_LOG_ERR( "Impossible to create a log domain for the Ecore Xlib module."); @@ -375,7 +375,7 @@ ecore_x_init(const char *name) #ifdef ECORE_XGESTURE if (XGestureQueryExtension(_ecore_x_disp, &gesture_base, &gesture_err_base)) - _ecore_x_event_gesture_id = gesture_base; + _ecore_x_event_gesture_id = gesture_base; ECORE_X_EVENT_HANDLERS_GROW(gesture_base, GestureNumberEvents); #endif /* ifdef ECORE_XGESTURE */ @@ -497,20 +497,20 @@ ecore_x_init(const char *name) #ifdef ECORE_XGESTURE if (_ecore_x_event_gesture_id) { - _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyFlick] = - _ecore_x_event_handle_gesture_notify_flick; - _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyPan] = - _ecore_x_event_handle_gesture_notify_pan; - _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyPinchRotation] = - _ecore_x_event_handle_gesture_notify_pinchrotation; - _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyTap] = - _ecore_x_event_handle_gesture_notify_tap; - _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyTapNHold] = - _ecore_x_event_handle_gesture_notify_tapnhold; - _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyHold] = - _ecore_x_event_handle_gesture_notify_hold; - _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyGroup] = - _ecore_x_event_handle_gesture_notify_group; + _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyFlick] = + _ecore_x_event_handle_gesture_notify_flick; + _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyPan] = + _ecore_x_event_handle_gesture_notify_pan; + _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyPinchRotation] = + _ecore_x_event_handle_gesture_notify_pinchrotation; + _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyTap] = + _ecore_x_event_handle_gesture_notify_tap; + _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyTapNHold] = + _ecore_x_event_handle_gesture_notify_tapnhold; + _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyHold] = + _ecore_x_event_handle_gesture_notify_hold; + _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyGroup] = + _ecore_x_event_handle_gesture_notify_group; } #endif /* ifdef ECORE_XGESTURE */ @@ -641,7 +641,7 @@ shutdown_eina: eina_shutdown(); return --_ecore_x_init_count; -} /* ecore_x_init */ +} static int _ecore_x_shutdown(int close_display) @@ -683,7 +683,7 @@ _ecore_x_shutdown(int close_display) eina_shutdown(); return _ecore_x_init_count; -} /* _ecore_x_shutdown */ +} /** * Shuts down the Ecore X library. @@ -699,7 +699,7 @@ EAPI int ecore_x_shutdown(void) { return _ecore_x_shutdown(1); -} /* ecore_x_shutdown */ +} /** * Shuts down the Ecore X library. @@ -712,7 +712,7 @@ EAPI int ecore_x_disconnect(void) { return _ecore_x_shutdown(0); -} /* ecore_x_disconnect */ +} /** * @defgroup Ecore_X_Display_Attr_Group X Display Attributes @@ -729,7 +729,7 @@ EAPI Ecore_X_Display * ecore_x_display_get(void) { return (Ecore_X_Display *)_ecore_x_disp; -} /* ecore_x_display_get */ +} /** * Retrieves the X display file descriptor. @@ -741,7 +741,7 @@ ecore_x_fd_get(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return ConnectionNumber(_ecore_x_disp); -} /* ecore_x_fd_get */ +} /** * Retrieves the Ecore_X_Screen handle used for the current X connection. @@ -753,7 +753,7 @@ ecore_x_default_screen_get(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return (Ecore_X_Screen *)DefaultScreenOfDisplay(_ecore_x_disp); -} /* ecore_x_default_screen_get */ +} /** * Retrieves the size of an Ecore_X_Screen. @@ -767,8 +767,8 @@ ecore_x_default_screen_get(void) */ EAPI void ecore_x_screen_size_get(const Ecore_X_Screen *screen, - int *w, - int *h) + int *w, + int *h) { Screen *s = (Screen *)screen; LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -840,7 +840,7 @@ ecore_x_double_click_time_set(double t) t = 0.0; _ecore_x_double_click_time = t; -} /* ecore_x_double_click_time_set */ +} /** * Retrieves the double and triple click flag timeout. @@ -854,7 +854,7 @@ EAPI double ecore_x_double_click_time_get(void) { return _ecore_x_double_click_time; -} /* ecore_x_double_click_time_get */ +} /** * @defgroup Ecore_X_Flush_Group X Synchronization Functions @@ -872,7 +872,7 @@ ecore_x_flush(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XFlush(_ecore_x_disp); -} /* ecore_x_flush */ +} /** * Flushes the command buffer and waits until all requests have been @@ -884,7 +884,7 @@ ecore_x_sync(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XSync(_ecore_x_disp, False); -} /* ecore_x_sync */ +} /** * Kill all clients with subwindows under a given window. @@ -920,7 +920,7 @@ ecore_x_killall(Ecore_X_Window root) } XUngrabServer(_ecore_x_disp); XSync(_ecore_x_disp, False); -} /* ecore_x_killall */ +} /** * Kill a specific client @@ -934,7 +934,7 @@ ecore_x_kill(Ecore_X_Window win) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XKillClient(_ecore_x_disp, win); -} /* ecore_x_kill */ +} /** * Return the last event time @@ -943,7 +943,7 @@ EAPI Ecore_X_Time ecore_x_current_time_get(void) { return _ecore_x_event_last_time; -} /* ecore_x_current_time_get */ +} /** * Return the screen DPI @@ -965,7 +965,7 @@ ecore_x_dpi_get(void) return 75; return (((s->width * 254) / s->mwidth) + 5) / 10; -} /* ecore_x_dpi_get */ +} /** * Invoke the standard system beep to alert users @@ -989,10 +989,10 @@ ecore_x_bell(int percent) return EINA_FALSE; return EINA_TRUE; -} /* ecore_x_bell */ +} static Eina_Bool -_ecore_x_fd_handler(void *data, +_ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__) { Display *d; @@ -1021,10 +1021,10 @@ _ecore_x_fd_handler(void *data, } } return ECORE_CALLBACK_RENEW; -} /* _ecore_x_fd_handler */ +} static Eina_Bool -_ecore_x_fd_handler_buf(void *data, +_ecore_x_fd_handler_buf(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__) { Display *d; @@ -1034,7 +1034,7 @@ _ecore_x_fd_handler_buf(void *data, return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_CANCEL; -} /* _ecore_x_fd_handler_buf */ +} static int _ecore_x_key_mask_get(KeySym sym) @@ -1080,7 +1080,7 @@ _ecore_x_key_mask_get(KeySym sym) } return 0; -} /* _ecore_x_key_mask_get */ +} /*****************************************************************************/ /*****************************************************************************/ @@ -1132,7 +1132,7 @@ ecore_x_window_root_list(int *num_ret) overlap++; } } - roots = malloc((num - overlap) * sizeof(Window)); + roots = malloc(MAX((num - overlap) * sizeof(Window), 1)); if (roots) { int k; @@ -1195,7 +1195,7 @@ ecore_x_window_root_list(int *num_ret) roots[i] = RootWindow(_ecore_x_disp, i); #endif /* ifdef ECORE_XPRINT */ return roots; -} /* ecore_x_window_root_list */ +} EAPI Ecore_X_Window ecore_x_window_root_first_get(void) @@ -1217,7 +1217,7 @@ ecore_x_window_root_first_get(void) free(roots); return root; */ -} /* ecore_x_window_root_first_get */ +} static void _ecore_x_window_manage_error(void *data); @@ -1228,7 +1228,7 @@ _ecore_x_window_manage_error(void *data __UNUSED__) if ((ecore_x_error_request_get() == X_ChangeWindowAttributes) && (ecore_x_error_code_get() == BadAccess)) _ecore_x_window_manage_failed = 1; -} /* _ecore_x_window_manage_error */ +} EAPI Eina_Bool ecore_x_window_manage(Ecore_X_Window win) @@ -1262,7 +1262,7 @@ ecore_x_window_manage(Ecore_X_Window win) } return EINA_TRUE; -} /* ecore_x_window_manage */ +} EAPI void ecore_x_window_container_manage(Ecore_X_Window win) @@ -1271,7 +1271,7 @@ ecore_x_window_container_manage(Ecore_X_Window win) XSelectInput(_ecore_x_disp, win, SubstructureRedirectMask | SubstructureNotifyMask); -} /* ecore_x_window_container_manage */ +} EAPI void ecore_x_window_client_manage(Ecore_X_Window win) @@ -1287,7 +1287,7 @@ ecore_x_window_client_manage(Ecore_X_Window win) SubstructureNotifyMask ); XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask); -} /* ecore_x_window_client_manage */ +} EAPI void ecore_x_window_sniff(Ecore_X_Window win) @@ -1296,7 +1296,7 @@ ecore_x_window_sniff(Ecore_X_Window win) XSelectInput(_ecore_x_disp, win, PropertyChangeMask | SubstructureNotifyMask); -} /* ecore_x_window_sniff */ +} EAPI void ecore_x_window_client_sniff(Ecore_X_Window win) @@ -1310,10 +1310,10 @@ ecore_x_window_client_sniff(Ecore_X_Window win) StructureNotifyMask | SubstructureNotifyMask); XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask); -} /* ecore_x_window_client_sniff */ +} EAPI Eina_Bool -ecore_x_window_attributes_get(Ecore_X_Window win, +ecore_x_window_attributes_get(Ecore_X_Window win, Ecore_X_Window_Attributes *att_ret) { XWindowAttributes att; @@ -1353,25 +1353,25 @@ ecore_x_window_attributes_get(Ecore_X_Window win, att_ret->colormap = att.colormap; att_ret->visual = att.visual; return EINA_TRUE; -} /* ecore_x_window_attributes_get */ +} EAPI void ecore_x_window_save_set_add(Ecore_X_Window win) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XAddToSaveSet(_ecore_x_disp, win); -} /* ecore_x_window_save_set_add */ +} EAPI void ecore_x_window_save_set_del(Ecore_X_Window win) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XRemoveFromSaveSet(_ecore_x_disp, win); -} /* ecore_x_window_save_set_del */ +} EAPI Ecore_X_Window * ecore_x_window_children_get(Ecore_X_Window win, - int *num) + int *num) { Ecore_X_Window *windows = NULL; Window root_ret = 0, parent_ret = 0, *children_ret = NULL; @@ -1398,7 +1398,7 @@ ecore_x_window_children_get(Ecore_X_Window win, } return windows; -} /* ecore_x_window_children_get */ +} EAPI Eina_Bool ecore_x_pointer_control_set(int accel_num, @@ -1408,7 +1408,7 @@ ecore_x_pointer_control_set(int accel_num, LOGFN(__FILE__, __LINE__, __FUNCTION__); return XChangePointerControl(_ecore_x_disp, 1, 1, accel_num, accel_denom, threshold) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_pointer_control_set */ +} EAPI Eina_Bool ecore_x_pointer_control_get(int *accel_num, @@ -1418,23 +1418,23 @@ ecore_x_pointer_control_get(int *accel_num, LOGFN(__FILE__, __LINE__, __FUNCTION__); return XGetPointerControl(_ecore_x_disp, accel_num, accel_denom, threshold) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_pointer_control_get */ +} EAPI Eina_Bool ecore_x_pointer_mapping_set(unsigned char *map, - int nmap) + int nmap) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return XSetPointerMapping(_ecore_x_disp, map, nmap) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_pointer_mapping_set */ +} EAPI Eina_Bool ecore_x_pointer_mapping_get(unsigned char *map, - int nmap) + int nmap) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return XGetPointerMapping(_ecore_x_disp, map, nmap) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_pointer_mapping_get */ +} EAPI Eina_Bool ecore_x_pointer_grab(Ecore_X_Window win) @@ -1448,7 +1448,7 @@ ecore_x_pointer_grab(Ecore_X_Window win) return EINA_TRUE; return EINA_FALSE; -} /* ecore_x_pointer_grab */ +} EAPI Eina_Bool ecore_x_pointer_confine_grab(Ecore_X_Window win) @@ -1462,23 +1462,23 @@ ecore_x_pointer_confine_grab(Ecore_X_Window win) return EINA_TRUE; return EINA_FALSE; -} /* ecore_x_pointer_confine_grab */ +} EAPI void ecore_x_pointer_ungrab(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XUngrabPointer(_ecore_x_disp, CurrentTime); -} /* ecore_x_pointer_ungrab */ +} EAPI Eina_Bool ecore_x_pointer_warp(Ecore_X_Window win, - int x, - int y) + int x, + int y) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return XWarpPointer(_ecore_x_disp, None, win, 0, 0, 0, 0, x, y) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_pointer_warp */ +} EAPI Eina_Bool ecore_x_keyboard_grab(Ecore_X_Window win) @@ -1490,14 +1490,14 @@ ecore_x_keyboard_grab(Ecore_X_Window win) return EINA_TRUE; return EINA_FALSE; -} /* ecore_x_keyboard_grab */ +} EAPI void ecore_x_keyboard_ungrab(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XUngrabKeyboard(_ecore_x_disp, CurrentTime); -} /* ecore_x_keyboard_ungrab */ +} EAPI void ecore_x_grab(void) @@ -1506,7 +1506,7 @@ ecore_x_grab(void) _ecore_x_grab_count++; if (_ecore_x_grab_count == 1) XGrabServer(_ecore_x_disp); -} /* ecore_x_grab */ +} EAPI void ecore_x_ungrab(void) @@ -1518,32 +1518,32 @@ ecore_x_ungrab(void) if (_ecore_x_grab_count == 0) XUngrabServer(_ecore_x_disp); -} /* ecore_x_ungrab */ +} int _ecore_window_grabs_num = 0; Window *_ecore_window_grabs = NULL; Eina_Bool (*_ecore_window_grab_replay_func)(void *data, - int event_type, + int event_type, void *event); void *_ecore_window_grab_replay_data; EAPI void -ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data, - int event_type, - void *event), - void *data) +ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data, + int event_type, + void *event), + void *data) { LOGFN(__FILE__, __LINE__, __FUNCTION__); _ecore_window_grab_replay_func = func; _ecore_window_grab_replay_data = data; -} /* ecore_x_passive_grab_replay_func_set */ +} EAPI void -ecore_x_window_button_grab(Ecore_X_Window win, - int button, +ecore_x_window_button_grab(Ecore_X_Window win, + int button, Ecore_X_Event_Mask event_mask, - int mod, - int any_mod) + int mod, + int any_mod) { unsigned int b; unsigned int m; @@ -1578,10 +1578,10 @@ ecore_x_window_button_grab(Ecore_X_Window win, if (!t) return; _ecore_window_grabs = t; _ecore_window_grabs[_ecore_window_grabs_num - 1] = win; -} /* ecore_x_window_button_grab */ +} void -_ecore_x_sync_magic_send(int val, +_ecore_x_sync_magic_send(int val, Ecore_X_Window swin) { XEvent xev; @@ -1597,7 +1597,7 @@ _ecore_x_sync_magic_send(int val, xev.xclient.data.l[1] = 0x10000000 + val; xev.xclient.data.l[2] = swin; XSendEvent(_ecore_x_disp, _ecore_x_private_win, False, NoEventMask, &xev); -} /* _ecore_x_sync_magic_send */ +} void _ecore_x_window_grab_remove(Ecore_X_Window win) @@ -1631,13 +1631,13 @@ _ecore_x_window_grab_remove(Ecore_X_Window win) _ecore_window_grabs = t; } } -} /* _ecore_x_window_grab_remove */ +} EAPI void ecore_x_window_button_ungrab(Ecore_X_Window win, - int button, - int mod, - int any_mod) + int button, + int mod, + int any_mod) { unsigned int b; unsigned int m; @@ -1664,16 +1664,16 @@ ecore_x_window_button_ungrab(Ecore_X_Window win, for (i = 0; i < 8; i++) XUngrabButton(_ecore_x_disp, b, m | locks[i], win); _ecore_x_sync_magic_send(1, win); -} /* ecore_x_window_button_ungrab */ +} int _ecore_key_grabs_num = 0; Window *_ecore_key_grabs = NULL; EAPI void ecore_x_window_key_grab(Ecore_X_Window win, - const char *key, - int mod, - int any_mod) + const char *key, + int mod, + int any_mod) { KeyCode keycode = 0; KeySym keysym; @@ -1718,7 +1718,7 @@ ecore_x_window_key_grab(Ecore_X_Window win, if (!t) return; _ecore_key_grabs = t; _ecore_key_grabs[_ecore_key_grabs_num - 1] = win; -} /* ecore_x_window_key_grab */ +} void _ecore_x_key_grab_remove(Ecore_X_Window win) @@ -1751,13 +1751,13 @@ _ecore_x_key_grab_remove(Ecore_X_Window win) _ecore_key_grabs = t; } } -} /* _ecore_x_key_grab_remove */ +} EAPI void ecore_x_window_key_ungrab(Ecore_X_Window win, - const char *key, - int mod, - int any_mod) + const char *key, + int mod, + int any_mod) { KeyCode keycode = 0; KeySym keysym; @@ -1795,7 +1795,7 @@ ecore_x_window_key_ungrab(Ecore_X_Window win, for (i = 0; i < 8; i++) XUngrabKey(_ecore_x_disp, keycode, m | locks[i], win); _ecore_x_sync_magic_send(2, win); -} /* ecore_x_window_key_ungrab */ +} /** * Send client message with given type and format 32. @@ -1811,14 +1811,14 @@ ecore_x_window_key_ungrab(Ecore_X_Window win, * @return EINA_TRUE on success EINA_FALSE otherwise. */ EAPI Eina_Bool -ecore_x_client_message32_send(Ecore_X_Window win, - Ecore_X_Atom type, +ecore_x_client_message32_send(Ecore_X_Window win, + Ecore_X_Atom type, Ecore_X_Event_Mask mask, - long d0, - long d1, - long d2, - long d3, - long d4) + long d0, + long d1, + long d2, + long d3, + long d4) { XEvent xev; @@ -1834,7 +1834,7 @@ ecore_x_client_message32_send(Ecore_X_Window win, xev.xclient.data.l[4] = d4; return XSendEvent(_ecore_x_disp, win, False, mask, &xev) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_client_message32_send */ +} /** * Send client message with given type and format 8. @@ -1848,9 +1848,9 @@ ecore_x_client_message32_send(Ecore_X_Window win, */ EAPI Eina_Bool ecore_x_client_message8_send(Ecore_X_Window win, - Ecore_X_Atom type, - const void *data, - int len) + Ecore_X_Atom type, + const void *data, + int len) { XEvent xev; @@ -1866,12 +1866,12 @@ ecore_x_client_message8_send(Ecore_X_Window win, memset(xev.xclient.data.b + len, 0, 20 - len); return XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_client_message8_send */ +} EAPI Eina_Bool ecore_x_mouse_move_send(Ecore_X_Window win, - int x, - int y) + int x, + int y) { XEvent xev; XWindowAttributes att; @@ -1894,13 +1894,13 @@ ecore_x_mouse_move_send(Ecore_X_Window win, xev.xmotion.is_hint = 0; xev.xmotion.same_screen = 1; return XSendEvent(_ecore_x_disp, win, True, PointerMotionMask, &xev) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_mouse_move_send */ +} EAPI Eina_Bool ecore_x_mouse_down_send(Ecore_X_Window win, - int x, - int y, - int b) + int x, + int y, + int b) { XEvent xev; XWindowAttributes att; @@ -1923,13 +1923,13 @@ ecore_x_mouse_down_send(Ecore_X_Window win, xev.xbutton.button = b; xev.xbutton.same_screen = 1; return XSendEvent(_ecore_x_disp, win, True, ButtonPressMask, &xev) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_mouse_down_send */ +} EAPI Eina_Bool ecore_x_mouse_up_send(Ecore_X_Window win, - int x, - int y, - int b) + int x, + int y, + int b) { XEvent xev; XWindowAttributes att; @@ -1952,21 +1952,21 @@ ecore_x_mouse_up_send(Ecore_X_Window win, xev.xbutton.button = b; xev.xbutton.same_screen = 1; return XSendEvent(_ecore_x_disp, win, True, ButtonReleaseMask, &xev) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_mouse_up_send */ +} EAPI void ecore_x_focus_reset(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XSetInputFocus(_ecore_x_disp, PointerRoot, RevertToPointerRoot, CurrentTime); -} /* ecore_x_focus_reset */ +} EAPI void ecore_x_events_allow_all(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XAllowEvents(_ecore_x_disp, AsyncBoth, CurrentTime); -} /* ecore_x_events_allow_all */ +} EAPI void ecore_x_pointer_last_xy_get(int *x, @@ -1977,12 +1977,12 @@ ecore_x_pointer_last_xy_get(int *x, if (y) *y = _ecore_x_event_last_root_y; -} /* ecore_x_pointer_last_xy_get */ +} EAPI void ecore_x_pointer_xy_get(Ecore_X_Window win, - int *x, - int *y) + int *x, + int *y) { Window rwin, cwin; int rx, ry, wx, wy, ret; @@ -1996,7 +1996,7 @@ ecore_x_pointer_xy_get(Ecore_X_Window win, if (x) *x = wx; if (y) *y = wy; -} /* ecore_x_pointer_xy_get */ +} /** * Retrieve the Visual ID from a given Visual. @@ -2023,7 +2023,7 @@ ecore_x_visual_id_get(Ecore_X_Visual visual) */ EAPI Ecore_X_Visual ecore_x_default_visual_get(Ecore_X_Display *disp, - Ecore_X_Screen *screen) + Ecore_X_Screen *screen) { return DefaultVisual(disp, ecore_x_screen_index_get(screen)); } @@ -2039,7 +2039,7 @@ ecore_x_default_visual_get(Ecore_X_Display *disp, */ EAPI Ecore_X_Colormap ecore_x_default_colormap_get(Ecore_X_Display *disp, - Ecore_X_Screen *screen) + Ecore_X_Screen *screen) { return DefaultColormap(disp, ecore_x_screen_index_get(screen)); } @@ -2055,7 +2055,7 @@ ecore_x_default_colormap_get(Ecore_X_Display *disp, */ EAPI int ecore_x_default_depth_get(Ecore_X_Display *disp, - Ecore_X_Screen *screen) + Ecore_X_Screen *screen) { return DefaultDepth(disp, ecore_x_screen_index_get(screen)); } @@ -2094,5 +2094,5 @@ _ecore_x_event_modifier(unsigned int state) xmodifiers |= ECORE_X_LOCK_SHIFT; return xmodifiers; -} /* _ecore_x_event_modifier */ +} 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 fd96d5c..ee981fe 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 @@ -291,10 +291,12 @@ _ecore_x_atoms_init(void) num = sizeof(items) / sizeof(Atom_Item); atoms = alloca(num * sizeof(Atom)); names = alloca(num * sizeof(char *)); - for (i = 0; i < num; i++) names[i] = (char *)items[i].name; + for (i = 0; i < num; i++) + names[i] = (char *)items[i].name; XInternAtoms(_ecore_x_disp, names, num, False, atoms); - for (i = 0; i < num; i++) *(items[i].atom) = atoms[i]; -} /* _ecore_x_atoms_init */ + for (i = 0; i < num; i++) + *(items[i].atom) = atoms[i]; +} /** * Retrieves the atom value associated with the given name. @@ -309,11 +311,11 @@ ecore_x_atom_get(const char *name) LOGFN(__FILE__, __LINE__, __FUNCTION__); return XInternAtom(_ecore_x_disp, name, False); -} /* ecore_x_atom_get */ +} EAPI void -ecore_x_atoms_get(const char **names, - int num, +ecore_x_atoms_get(const char **names, + int num, Ecore_X_Atom *atoms) { Atom *atoms_int; @@ -327,7 +329,7 @@ ecore_x_atoms_get(const char **names, XInternAtoms(_ecore_x_disp, (char **)names, num, False, atoms_int); for (i = 0; i < num; i++) atoms[i] = atoms_int[i]; -} /* ecore_x_atoms_get */ +} EAPI char * ecore_x_atom_name_get(Ecore_X_Atom atom) @@ -348,5 +350,5 @@ ecore_x_atom_name_get(Ecore_X_Atom atom) XFree(xname); return name; -} /* ecore_x_atom_name_get */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_composite.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_composite.c index 43153ff..b919db9 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_composite.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_composite.c @@ -30,24 +30,24 @@ _ecore_x_composite_init(void) # endif } #endif -} /* _ecore_x_composite_init */ +} EAPI Eina_Bool ecore_x_composite_query(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return _composite_available; -} /* ecore_x_composite_query */ +} EAPI void -ecore_x_composite_redirect_window(Ecore_X_Window win, +ecore_x_composite_redirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type) { #ifdef ECORE_XCOMPOSITE int update = CompositeRedirectAutomatic; LOGFN(__FILE__, __LINE__, __FUNCTION__); - switch(type) + switch (type) { case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC: update = CompositeRedirectAutomatic; @@ -56,20 +56,20 @@ ecore_x_composite_redirect_window(Ecore_X_Window win, case ECORE_X_COMPOSITE_UPDATE_MANUAL: update = CompositeRedirectManual; break; - } /* switch */ + } XCompositeRedirectWindow(_ecore_x_disp, win, update); #endif /* ifdef ECORE_XCOMPOSITE */ -} /* ecore_x_composite_redirect_window */ +} EAPI void -ecore_x_composite_redirect_subwindows(Ecore_X_Window win, +ecore_x_composite_redirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type) { #ifdef ECORE_XCOMPOSITE int update = CompositeRedirectAutomatic; LOGFN(__FILE__, __LINE__, __FUNCTION__); - switch(type) + switch (type) { case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC: update = CompositeRedirectAutomatic; @@ -78,20 +78,20 @@ ecore_x_composite_redirect_subwindows(Ecore_X_Window win, case ECORE_X_COMPOSITE_UPDATE_MANUAL: update = CompositeRedirectManual; break; - } /* switch */ + } XCompositeRedirectSubwindows(_ecore_x_disp, win, update); #endif /* ifdef ECORE_XCOMPOSITE */ -} /* ecore_x_composite_redirect_subwindows */ +} EAPI void -ecore_x_composite_unredirect_window(Ecore_X_Window win, +ecore_x_composite_unredirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type) { #ifdef ECORE_XCOMPOSITE int update = CompositeRedirectAutomatic; LOGFN(__FILE__, __LINE__, __FUNCTION__); - switch(type) + switch (type) { case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC: update = CompositeRedirectAutomatic; @@ -100,20 +100,20 @@ ecore_x_composite_unredirect_window(Ecore_X_Window win, case ECORE_X_COMPOSITE_UPDATE_MANUAL: update = CompositeRedirectManual; break; - } /* switch */ + } XCompositeUnredirectWindow(_ecore_x_disp, win, update); #endif /* ifdef ECORE_XCOMPOSITE */ -} /* ecore_x_composite_unredirect_window */ +} EAPI void -ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, +ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type) { #ifdef ECORE_XCOMPOSITE int update = CompositeRedirectAutomatic; LOGFN(__FILE__, __LINE__, __FUNCTION__); - switch(type) + switch (type) { case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC: update = CompositeRedirectAutomatic; @@ -122,10 +122,10 @@ ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, case ECORE_X_COMPOSITE_UPDATE_MANUAL: update = CompositeRedirectManual; break; - } /* switch */ + } XCompositeUnredirectSubwindows(_ecore_x_disp, win, update); #endif /* ifdef ECORE_XCOMPOSITE */ -} /* ecore_x_composite_unredirect_subwindows */ +} EAPI Ecore_X_Pixmap ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win) @@ -136,7 +136,7 @@ ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win) pixmap = XCompositeNameWindowPixmap(_ecore_x_disp, win); #endif /* ifdef ECORE_XCOMPOSITE */ return pixmap; -} /* ecore_x_composite_name_window_pixmap_get */ +} EAPI void ecore_x_composite_window_events_disable(Ecore_X_Window win) @@ -163,7 +163,7 @@ ecore_x_composite_render_window_enable(Ecore_X_Window root) ecore_x_composite_window_events_disable(win); #endif /* ifdef ECORE_XCOMPOSITE */ return win; -} /* ecore_x_composite_render_window_enable */ +} EAPI void ecore_x_composite_render_window_disable(Ecore_X_Window root) @@ -172,5 +172,5 @@ ecore_x_composite_render_window_disable(Ecore_X_Window root) LOGFN(__FILE__, __LINE__, __FUNCTION__); XCompositeReleaseOverlayWindow(_ecore_x_disp, root); #endif /* ifdef ECORE_XCOMPOSITE */ -} /* ecore_x_composite_render_window_disable */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_cursor.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_cursor.c index 434505c..a968c56 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_cursor.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_cursor.c @@ -10,15 +10,15 @@ EAPI Eina_Bool ecore_x_cursor_color_supported_get(void) { return _ecore_x_xcursor; -} /* ecore_x_cursor_color_supported_get */ +} EAPI Ecore_X_Cursor ecore_x_cursor_new(Ecore_X_Window win, - int *pixels, - int w, - int h, - int hot_x, - int hot_y) + int *pixels, + int w, + int h, + int hot_x, + int hot_y) { #ifdef ECORE_XCURSOR LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -43,7 +43,7 @@ ecore_x_cursor_new(Ecore_X_Window win, // r = (((pixels[i] >> 16) & 0xff) * a) / 0xff; // g = (((pixels[i] >> 8 ) & 0xff) * a) / 0xff; // b = (((pixels[i] ) & 0xff) * a) / 0xff; - xci->pixels[i] = pixels[i]; + xci->pixels[i] = pixels[i]; // (a << 24) | (r << 16) | (g << 8) | (b); } c = XcursorImageLoadCursor(_ecore_x_disp, xci); @@ -200,14 +200,14 @@ ecore_x_cursor_new(Ecore_X_Window win, } return 0; -} /* ecore_x_cursor_new */ +} EAPI void ecore_x_cursor_free(Ecore_X_Cursor c) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XFreeCursor(_ecore_x_disp, c); -} /* ecore_x_cursor_free */ +} /* * Returns the cursor for the given shape. @@ -220,7 +220,7 @@ ecore_x_cursor_shape_get(int shape) LOGFN(__FILE__, __LINE__, __FUNCTION__); /* Shapes are defined in Ecore_X_Cursor.h */ return XCreateFontCursor(_ecore_x_disp, shape); -} /* ecore_x_cursor_shape_get */ +} EAPI void ecore_x_cursor_size_set(int size) @@ -231,7 +231,7 @@ ecore_x_cursor_size_set(int size) #else /* ifdef ECORE_XCURSOR */ size = 0; #endif /* ifdef ECORE_XCURSOR */ -} /* ecore_x_cursor_size_set */ +} EAPI int ecore_x_cursor_size_get(void) @@ -242,5 +242,5 @@ ecore_x_cursor_size_get(void) #else /* ifdef ECORE_XCURSOR */ return 0; #endif /* ifdef ECORE_XCURSOR */ -} /* ecore_x_cursor_size_get */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_damage.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_damage.c index 5e44d07..b094f85 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_damage.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_damage.c @@ -26,16 +26,16 @@ _ecore_x_damage_init(void) #else /* ifdef ECORE_XDAMAGE */ _damage_available = EINA_FALSE; #endif /* ifdef ECORE_XDAMAGE */ -} /* _ecore_x_damage_init */ +} EAPI Eina_Bool ecore_x_damage_query(void) { return _damage_available; -} /* ecore_x_damage_query */ +} EAPI Ecore_X_Damage -ecore_x_damage_new(Ecore_X_Drawable d, +ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level) { #ifdef ECORE_XDAMAGE @@ -47,7 +47,7 @@ ecore_x_damage_new(Ecore_X_Drawable d, #else /* ifdef ECORE_XDAMAGE */ return 0; #endif /* ifdef ECORE_XDAMAGE */ -} /* ecore_x_damage_new */ +} EAPI void ecore_x_damage_free(Ecore_X_Damage damage) @@ -56,7 +56,7 @@ ecore_x_damage_free(Ecore_X_Damage damage) LOGFN(__FILE__, __LINE__, __FUNCTION__); XDamageDestroy(_ecore_x_disp, damage); #endif /* ifdef ECORE_XDAMAGE */ -} /* ecore_x_damage_free */ +} EAPI void ecore_x_damage_subtract(Ecore_X_Damage damage, @@ -67,5 +67,5 @@ ecore_x_damage_subtract(Ecore_X_Damage damage, LOGFN(__FILE__, __LINE__, __FUNCTION__); XDamageSubtract(_ecore_x_disp, damage, repair, parts); #endif /* ifdef ECORE_XDAMAGE */ -} /* ecore_x_damage_subtract */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dnd.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dnd.c index 7908584..372470a 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dnd.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dnd.c @@ -65,7 +65,7 @@ _ecore_x_dnd_init(void) } _ecore_x_dnd_init_count++; -} /* _ecore_x_dnd_init */ +} void _ecore_x_dnd_shutdown(void) @@ -85,16 +85,16 @@ _ecore_x_dnd_shutdown(void) _target = NULL; _ecore_x_dnd_init_count = 0; -} /* _ecore_x_dnd_shutdown */ +} static Eina_Bool -_ecore_x_dnd_converter_copy(char *target __UNUSED__, - void *data, - int size, - void **data_ret, - int *size_ret, +_ecore_x_dnd_converter_copy(char *target __UNUSED__, + void *data, + int size, + void **data_ret, + int *size_ret, Ecore_X_Atom *tprop __UNUSED__, - int *count __UNUSED__) + int *count __UNUSED__) { XTextProperty text_prop; char *mystr; @@ -130,11 +130,11 @@ _ecore_x_dnd_converter_copy(char *target __UNUSED__, free(mystr); return EINA_FALSE; } -} /* _ecore_x_dnd_converter_copy */ +} EAPI void ecore_x_dnd_aware_set(Ecore_X_Window win, - Eina_Bool on) + Eina_Bool on) { Ecore_X_Atom prop_data = ECORE_X_DND_VERSION; @@ -144,7 +144,7 @@ ecore_x_dnd_aware_set(Ecore_X_Window win, XA_ATOM, 32, &prop_data, 1); else ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_AWARE); -} /* ecore_x_dnd_aware_set */ +} EAPI int ecore_x_dnd_version_get(Ecore_X_Window win) @@ -208,11 +208,11 @@ ecore_x_dnd_version_get(Ecore_X_Window win) } return 0; -} /* ecore_x_dnd_version_get */ +} EAPI Eina_Bool ecore_x_dnd_type_isset(Ecore_X_Window win, - const char *type) + const char *type) { int num, i, ret = EINA_FALSE; unsigned char *data; @@ -237,12 +237,12 @@ ecore_x_dnd_type_isset(Ecore_X_Window win, XFree(data); return ret; -} /* ecore_x_dnd_type_isset */ +} EAPI void ecore_x_dnd_type_set(Ecore_X_Window win, - const char *type, - Eina_Bool on) + const char *type, + Eina_Bool on) { Ecore_X_Atom atom; Ecore_X_Atom *oldset = NULL, *newset = NULL; @@ -305,12 +305,12 @@ ecore_x_dnd_type_set(Ecore_X_Window win, XFree(oldset); free(newset); -} /* ecore_x_dnd_type_set */ +} EAPI void ecore_x_dnd_types_set(Ecore_X_Window win, - const char **types, - unsigned int num_types) + const char **types, + unsigned int num_types) { Ecore_X_Atom *newset = NULL; unsigned int i; @@ -336,12 +336,12 @@ ecore_x_dnd_types_set(Ecore_X_Window win, XA_ATOM, 32, data, num_types); free(newset); } -} /* ecore_x_dnd_types_set */ +} EAPI void ecore_x_dnd_actions_set(Ecore_X_Window win, - Ecore_X_Atom *actions, - unsigned int num_actions) + Ecore_X_Atom *actions, + unsigned int num_actions) { unsigned int i; unsigned char *data = NULL; @@ -360,7 +360,7 @@ ecore_x_dnd_actions_set(Ecore_X_Window win, ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_ACTION_LIST, XA_ATOM, 32, data, num_actions); } -} /* ecore_x_dnd_actions_set */ +} /** * The DND position update cb is called Ecore_X sends a DND position to a @@ -378,9 +378,9 @@ ecore_x_dnd_actions_set(Ecore_X_Window win, */ EAPI void ecore_x_dnd_callback_pos_update_set( - void (*cb)(void *, - Ecore_X_Xdnd_Position *data), - const void *data) + void (*cb)(void *, + Ecore_X_Xdnd_Position *data), + const void *data) { _posupdatecb = cb; _posupdatedata = (void *)data; /* Discard the const early */ @@ -390,18 +390,18 @@ Ecore_X_DND_Source * _ecore_x_dnd_source_get(void) { return _source; -} /* _ecore_x_dnd_source_get */ +} Ecore_X_DND_Target * _ecore_x_dnd_target_get(void) { return _target; -} /* _ecore_x_dnd_target_get */ +} EAPI Eina_Bool ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, - int size) + int size) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ecore_x_dnd_version_get(source)) @@ -433,7 +433,7 @@ ecore_x_dnd_begin(Ecore_X_Window source, _source->dest = None; return EINA_TRUE; -} /* ecore_x_dnd_begin */ +} EAPI Eina_Bool ecore_x_dnd_drop(void) @@ -471,8 +471,8 @@ ecore_x_dnd_drop(void) else { /* Dropping on nothing */ - ecore_x_selection_xdnd_clear(); - _source->state = ECORE_X_DND_SOURCE_IDLE; + ecore_x_selection_xdnd_clear(); + _source->state = ECORE_X_DND_SOURCE_IDLE; } ecore_x_window_ignore_set(_source->win, 0); @@ -480,13 +480,13 @@ ecore_x_dnd_drop(void) _source->prev.window = 0; return status; -} /* ecore_x_dnd_drop */ +} EAPI void -ecore_x_dnd_send_status(Eina_Bool will_accept, - Eina_Bool suppress, +ecore_x_dnd_send_status(Eina_Bool will_accept, + Eina_Bool suppress, Ecore_X_Rectangle rectangle, - Ecore_X_Atom action) + Ecore_X_Atom action) { XEvent xev; @@ -532,7 +532,7 @@ ecore_x_dnd_send_status(Eina_Bool will_accept, } XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev); -} /* ecore_x_dnd_send_status */ +} EAPI void ecore_x_dnd_send_finished(void) @@ -561,7 +561,7 @@ ecore_x_dnd_send_finished(void) XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev); _target->state = ECORE_X_DND_TARGET_IDLE; -} /* ecore_x_dnd_send_finished */ +} EAPI void ecore_x_dnd_source_action_set(Ecore_X_Atom action) @@ -569,18 +569,18 @@ ecore_x_dnd_source_action_set(Ecore_X_Atom action) _source->action = action; if (_source->prev.window) _ecore_x_dnd_drag(_source->prev.window, _source->prev.x, _source->prev.y); -} /* ecore_x_dnd_source_action_set */ +} EAPI Ecore_X_Atom ecore_x_dnd_source_action_get(void) { return _source->action; -} /* ecore_x_dnd_source_action_get */ +} void _ecore_x_dnd_drag(Ecore_X_Window root, - int x, - int y) + int x, + int y) { XEvent xev; Ecore_X_Window win; @@ -701,6 +701,6 @@ _ecore_x_dnd_drag(Ecore_X_Window root, _source->prev.y = y; _source->prev.window = root; _source->dest = win; -} /* _ecore_x_dnd_drag */ +} /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dpms.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dpms.c index 74d5344..23349f4 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dpms.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dpms.c @@ -23,7 +23,7 @@ _ecore_x_dpms_init(void) #else /* ifdef ECORE_XDPMS */ _dpms_available = EINA_FALSE; #endif /* ifdef ECORE_XDPMS */ -} /* _ecore_x_dpms_init */ +} /** * @defgroup Ecore_X_DPMS_Group X DPMS Extension Functions @@ -40,7 +40,7 @@ EAPI Eina_Bool ecore_x_dpms_query(void) { return _dpms_available; -} /* ecore_x_dpms_query */ +} /** * Checks if the X server is capable of DPMS. @@ -56,7 +56,7 @@ ecore_x_dpms_capable_get(void) #else /* ifdef ECORE_XDPMS */ return EINA_FALSE; #endif /* ifdef ECORE_XDPMS */ -} /* ecore_x_dpms_capable_get */ +} /** * Checks the DPMS state of the display. @@ -76,7 +76,7 @@ ecore_x_dpms_enabled_get(void) #else /* ifdef ECORE_XDPMS */ return EINA_FALSE; #endif /* ifdef ECORE_XDPMS */ -} /* ecore_x_dpms_enabled_get */ +} /** * Sets the DPMS state of the display. @@ -94,7 +94,7 @@ ecore_x_dpms_enabled_set(int enabled) DPMSDisable(_ecore_x_disp); #endif /* ifdef ECORE_XDPMS */ -} /* ecore_x_dpms_enabled_set */ +} /** * Gets the timeouts. The values are in unit of seconds. @@ -113,7 +113,7 @@ ecore_x_dpms_timeouts_get(unsigned int *standby, DPMSGetTimeouts(_ecore_x_disp, (unsigned short *)standby, (unsigned short *)suspend, (unsigned short *)off); #endif /* ifdef ECORE_XDPMS */ -} /* ecore_x_dpms_timeouts_get */ +} /** * Sets the timeouts. The values are in unit of seconds. @@ -133,7 +133,7 @@ ecore_x_dpms_timeouts_set(unsigned int standby, #else /* ifdef ECORE_XDPMS */ return EINA_FALSE; #endif /* ifdef ECORE_XDPMS */ -} /* ecore_x_dpms_timeouts_set */ +} /** * Returns the amount of time of inactivity before standby mode is invoked. @@ -152,7 +152,7 @@ ecore_x_dpms_timeout_standby_get(void) #else /* ifdef ECORE_XDPMS */ return 0; #endif /* ifdef ECORE_XDPMS */ -} /* ecore_x_dpms_timeout_standby_get */ +} /** * Returns the amount of time of inactivity before the second level of @@ -172,7 +172,7 @@ ecore_x_dpms_timeout_suspend_get(void) #else /* ifdef ECORE_XDPMS */ return 0; #endif /* ifdef ECORE_XDPMS */ -} /* ecore_x_dpms_timeout_suspend_get */ +} /** * Returns the amount of time of inactivity before the third and final @@ -192,11 +192,11 @@ ecore_x_dpms_timeout_off_get(void) #else /* ifdef ECORE_XDPMS */ return 0; #endif /* ifdef ECORE_XDPMS */ -} /* ecore_x_dpms_timeout_off_get */ +} /** * Sets the standby timeout (in unit of seconds). - * @param new_standby Amount of time of inactivity before standby mode will be invoked. + * @param new_timeout Amount of time of inactivity before standby mode will be invoked. * @ingroup Ecore_X_DPMS_Group */ EAPI void @@ -209,11 +209,11 @@ ecore_x_dpms_timeout_standby_set(unsigned int new_timeout) DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); DPMSSetTimeouts(_ecore_x_disp, new_timeout, suspend, off); #endif /* ifdef ECORE_XDPMS */ -} /* ecore_x_dpms_timeout_standby_set */ +} /** * Sets the suspend timeout (in unit of seconds). - * @param suspend Amount of time of inactivity before the screen is placed into suspend mode. + * @param new_timeout Amount of time of inactivity before the screen is placed into suspend mode. * @ingroup Ecore_X_DPMS_Group */ EAPI void @@ -226,11 +226,11 @@ ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout) DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); DPMSSetTimeouts(_ecore_x_disp, standby, new_timeout, off); #endif /* ifdef ECORE_XDPMS */ -} /* ecore_x_dpms_timeout_suspend_set */ +} /** * Sets the off timeout (in unit of seconds). - * @param off Amount of time of inactivity before the monitor is shut off. + * @param new_timeout Amount of time of inactivity before the monitor is shut off. * @ingroup Ecore_X_DPMS_Group */ EAPI void @@ -243,5 +243,5 @@ ecore_x_dpms_timeout_off_set(unsigned int new_timeout) DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); DPMSSetTimeouts(_ecore_x_disp, standby, suspend, new_timeout); #endif /* ifdef ECORE_XDPMS */ -} /* ecore_x_dpms_timeout_off_set */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_drawable.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_drawable.c index a64060b..d1b4111 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_drawable.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_drawable.c @@ -21,10 +21,10 @@ */ EAPI void ecore_x_drawable_geometry_get(Ecore_X_Drawable d, - int *x, - int *y, - int *w, - int *h) + int *x, + int *y, + int *w, + int *h) { Window dummy_win; int ret_x, ret_y; @@ -51,7 +51,7 @@ ecore_x_drawable_geometry_get(Ecore_X_Drawable d, if (h) *h = (int)ret_h; -} /* ecore_x_drawable_geometry_get */ +} /** * Retrieves the width of the border of the given drawable. @@ -72,7 +72,7 @@ ecore_x_drawable_border_width_get(Ecore_X_Drawable d) border_ret = 0; return (int)border_ret; -} /* ecore_x_drawable_border_width_get */ +} /** * Retrieves the depth of the given drawable. @@ -93,7 +93,7 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d) depth_ret = 0; return (int)depth_ret; -} /* ecore_x_drawable_depth_get */ +} /** * Fill the specified rectangle on a drawable. @@ -106,13 +106,13 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d) */ EAPI void ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, - Ecore_X_GC gc, - int x, - int y, - int width, - int height) + Ecore_X_GC gc, + int x, + int y, + int width, + int height) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XFillRectangle(_ecore_x_disp, d, gc, x, y, width, height); -} /* ecore_x_drawable_rectangle_fill */ +} 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 d357c9b..5966bbd 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 @@ -14,14 +14,14 @@ EAPI void ecore_x_e_init(void) { -} /* ecore_x_e_init */ +} EAPI void ecore_x_e_frame_size_set(Ecore_X_Window win, - int fl, - int fr, - int ft, - int fb) + int fl, + int fr, + int ft, + int fb) { unsigned int frames[4]; @@ -31,16 +31,16 @@ ecore_x_e_frame_size_set(Ecore_X_Window win, frames[2] = ft; frames[3] = fb; ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_FRAME_SIZE, frames, 4); -} /* ecore_x_e_frame_size_set */ +} EAPI void ecore_x_e_virtual_keyboard_set(Ecore_X_Window win, - unsigned int is_keyboard) + unsigned int is_keyboard) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD, &is_keyboard, 1); -} /* ecore_x_e_virtual_keyboard_set */ +} EAPI Eina_Bool ecore_x_e_virtual_keyboard_get(Ecore_X_Window win) @@ -53,7 +53,7 @@ ecore_x_e_virtual_keyboard_get(Ecore_X_Window win) return EINA_FALSE; return val ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_e_virtual_keyboard_get */ +} static Ecore_X_Virtual_Keyboard_State _ecore_x_e_vkbd_state_get(Ecore_X_Atom atom) @@ -104,7 +104,7 @@ _ecore_x_e_vkbd_state_get(Ecore_X_Atom atom) return ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME; return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN; -} /* _ecore_x_e_vkbd_state_get */ +} static Ecore_X_Atom _ecore_x_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state) @@ -157,12 +157,12 @@ _ecore_x_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state) return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME; default: break; - } /* switch */ + } return 0; -} /* _ecore_x_e_vkbd_atom_get */ +} EAPI void -ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win, +ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win, Ecore_X_Virtual_Keyboard_State state) { Ecore_X_Atom atom = 0; @@ -171,7 +171,7 @@ ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win, atom = _ecore_x_e_vkbd_atom_get(state); ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE, &atom, 1); -} /* ecore_x_e_virtual_keyboard_state_set */ +} EAPI Ecore_X_Virtual_Keyboard_State ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win) @@ -184,10 +184,10 @@ ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win) return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN; return _ecore_x_e_vkbd_state_get(atom); -} /* ecore_x_e_virtual_keyboard_state_get */ +} EAPI void -ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win, +ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win, Ecore_X_Virtual_Keyboard_State state) { LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -195,7 +195,7 @@ ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, _ecore_x_e_vkbd_atom_get(state), 0, 0, 0, 0); -} /* ecore_x_e_virtual_keyboard_state_send */ +} static Ecore_X_Atom _ecore_x_e_illume_atom_get(Ecore_X_Illume_Mode mode) @@ -213,9 +213,9 @@ _ecore_x_e_illume_atom_get(Ecore_X_Illume_Mode mode) default: break; - } /* switch */ + } return ECORE_X_ILLUME_MODE_UNKNOWN; -} /* _ecore_x_e_illume_atom_get */ +} static Ecore_X_Illume_Mode _ecore_x_e_illume_mode_get(Ecore_X_Atom atom) @@ -230,7 +230,7 @@ _ecore_x_e_illume_mode_get(Ecore_X_Atom atom) return ECORE_X_ILLUME_MODE_DUAL_LEFT; return ECORE_X_ILLUME_MODE_UNKNOWN; -} /* _ecore_x_e_illume_mode_get */ +} EAPI void ecore_x_e_illume_zone_set(Ecore_X_Window win, @@ -239,7 +239,7 @@ ecore_x_e_illume_zone_set(Ecore_X_Window win, LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE, &zone, 1); -} /* ecore_x_e_illume_zone_set */ +} EAPI Ecore_X_Window ecore_x_e_illume_zone_get(Ecore_X_Window win) @@ -252,26 +252,26 @@ ecore_x_e_illume_zone_get(Ecore_X_Window win) return 0; return zone; -} /* ecore_x_e_illume_zone_get */ +} EAPI void -ecore_x_e_illume_zone_list_set(Ecore_X_Window win, +ecore_x_e_illume_zone_list_set(Ecore_X_Window win, Ecore_X_Window *zones, - unsigned int n_zones) + unsigned int n_zones) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE_LIST, zones, n_zones); -} /* ecore_x_e_illume_zone_list_set */ +} EAPI void ecore_x_e_illume_conformant_set(Ecore_X_Window win, - unsigned int is_conformant) + unsigned int is_conformant) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT, &is_conformant, 1); -} /* ecore_x_e_illume_conformant_set */ +} EAPI Eina_Bool ecore_x_e_illume_conformant_get(Ecore_X_Window win) @@ -284,10 +284,10 @@ ecore_x_e_illume_conformant_get(Ecore_X_Window win) return EINA_FALSE; return val ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_e_illume_conformant_get */ +} EAPI void -ecore_x_e_illume_mode_set(Ecore_X_Window win, +ecore_x_e_illume_mode_set(Ecore_X_Window win, Ecore_X_Illume_Mode mode) { Ecore_X_Atom atom = 0; @@ -296,7 +296,7 @@ ecore_x_e_illume_mode_set(Ecore_X_Window win, atom = _ecore_x_e_illume_atom_get(mode); ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_MODE, &atom, 1); -} /* ecore_x_e_illume_mode_set */ +} EAPI Ecore_X_Illume_Mode ecore_x_e_illume_mode_get(Ecore_X_Window win) @@ -308,10 +308,10 @@ ecore_x_e_illume_mode_get(Ecore_X_Window win) return ECORE_X_ILLUME_MODE_UNKNOWN; return _ecore_x_e_illume_mode_get(atom); -} /* ecore_x_e_illume_mode_get */ +} EAPI void -ecore_x_e_illume_mode_send(Ecore_X_Window win, +ecore_x_e_illume_mode_send(Ecore_X_Window win, Ecore_X_Illume_Mode mode) { LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -319,7 +319,7 @@ ecore_x_e_illume_mode_send(Ecore_X_Window win, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, _ecore_x_e_illume_atom_get(mode), 0, 0, 0, 0); -} /* ecore_x_e_illume_mode_send */ +} EAPI void ecore_x_e_illume_focus_back_send(Ecore_X_Window win) @@ -328,7 +328,7 @@ ecore_x_e_illume_focus_back_send(Ecore_X_Window win) ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_BACK, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 1, 0, 0, 0, 0); -} /* ecore_x_e_illume_focus_back_send */ +} EAPI void ecore_x_e_illume_focus_forward_send(Ecore_X_Window win) @@ -337,7 +337,7 @@ ecore_x_e_illume_focus_forward_send(Ecore_X_Window win) ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 1, 0, 0, 0, 0); -} /* ecore_x_e_illume_focus_forward_send */ +} EAPI void ecore_x_e_illume_focus_home_send(Ecore_X_Window win) @@ -346,7 +346,7 @@ ecore_x_e_illume_focus_home_send(Ecore_X_Window win) ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_HOME, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 1, 0, 0, 0, 0); -} /* ecore_x_e_illume_focus_home_send */ +} EAPI void ecore_x_e_illume_close_send(Ecore_X_Window win) @@ -355,7 +355,7 @@ ecore_x_e_illume_close_send(Ecore_X_Window win) ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_CLOSE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 1, 0, 0, 0, 0); -} /* ecore_x_e_illume_close_send */ +} EAPI void ecore_x_e_illume_home_new_send(Ecore_X_Window win) @@ -364,7 +364,7 @@ ecore_x_e_illume_home_new_send(Ecore_X_Window win) ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_NEW, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 1, 0, 0, 0, 0); -} /* ecore_x_e_illume_home_new_send */ +} EAPI void ecore_x_e_illume_home_del_send(Ecore_X_Window win) @@ -373,15 +373,15 @@ ecore_x_e_illume_home_del_send(Ecore_X_Window win) ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_DEL, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 1, 0, 0, 0, 0); -} /* ecore_x_e_illume_home_del_send */ +} EAPI void ecore_x_e_illume_drag_set(Ecore_X_Window win, - unsigned int drag) + unsigned int drag) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG, &drag, 1); -} /* ecore_x_e_illume_drag_set */ +} EAPI Eina_Bool ecore_x_e_illume_drag_get(Ecore_X_Window win) @@ -393,16 +393,16 @@ ecore_x_e_illume_drag_get(Ecore_X_Window win) return EINA_FALSE; return val ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_e_illume_drag_get */ +} EAPI void ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, - unsigned int is_locked) + unsigned int is_locked) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED, &is_locked, 1); -} /* ecore_x_e_illume_drag_locked_set */ +} EAPI Eina_Bool ecore_x_e_illume_drag_locked_get(Ecore_X_Window win) @@ -415,7 +415,7 @@ ecore_x_e_illume_drag_locked_get(Ecore_X_Window win) return EINA_FALSE; return val ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_e_illume_drag_locked_get */ +} EAPI void ecore_x_e_illume_drag_start_send(Ecore_X_Window win) @@ -424,7 +424,7 @@ ecore_x_e_illume_drag_start_send(Ecore_X_Window win) ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_START, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 1, 0, 0, 0, 0); -} /* ecore_x_e_illume_drag_start_send */ +} EAPI void ecore_x_e_illume_drag_end_send(Ecore_X_Window win) @@ -433,14 +433,14 @@ ecore_x_e_illume_drag_end_send(Ecore_X_Window win) ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_END, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 1, 0, 0, 0, 0); -} /* ecore_x_e_illume_drag_end_send */ +} EAPI void ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { unsigned int geom[4]; @@ -451,14 +451,14 @@ ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win, geom[3] = h; ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY, geom, 4); -} /* ecore_x_e_illume_indicator_geometry_set */ +} EAPI Eina_Bool ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win, - int *x, - int *y, - int *w, - int *h) + int *x, + int *y, + int *w, + int *h) { int ret = 0; unsigned int geom[4]; @@ -484,14 +484,14 @@ ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win, *h = geom[3]; return EINA_TRUE; -} /* ecore_x_e_illume_indicator_geometry_get */ +} EAPI void ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { unsigned int geom[4]; @@ -502,14 +502,14 @@ ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win, geom[3] = h; ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY, geom, 4); -} /* ecore_x_e_illume_softkey_geometry_set */ +} EAPI Eina_Bool ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, - int *x, - int *y, - int *w, - int *h) + int *x, + int *y, + int *w, + int *h) { int ret = 0; unsigned int geom[4]; @@ -535,14 +535,14 @@ ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, *h = geom[3]; return EINA_TRUE; -} /* ecore_x_e_illume_softkey_geometry_get */ +} EAPI void ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { unsigned int geom[4]; @@ -553,14 +553,14 @@ ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, geom[3] = h; ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY, geom, 4); -} /* ecore_x_e_illume_keyboard_geometry_set */ +} EAPI Eina_Bool ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, - int *x, - int *y, - int *w, - int *h) + int *x, + int *y, + int *w, + int *h) { int ret = 0; unsigned int geom[4]; @@ -586,7 +586,7 @@ ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, *h = geom[3]; return EINA_TRUE; -} /* ecore_x_e_illume_keyboard_geometry_get */ +} static Ecore_X_Atom _ecore_x_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state) @@ -601,9 +601,9 @@ _ecore_x_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state) default: break; - } /* switch */ + } return 0; -} /* _ecore_x_e_quickpanel_atom_get */ +} static Ecore_X_Illume_Quickpanel_State _ecore_x_e_quickpanel_state_get(Ecore_X_Atom atom) @@ -615,16 +615,16 @@ _ecore_x_e_quickpanel_state_get(Ecore_X_Atom atom) return ECORE_X_ILLUME_QUICKPANEL_STATE_OFF; return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN; -} /* _ecore_x_e_quickpanel_state_get */ +} EAPI void ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, - unsigned int is_quickpanel) + unsigned int is_quickpanel) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL, &is_quickpanel, 1); -} /* ecore_x_e_illume_quickpanel_set */ +} EAPI Eina_Bool ecore_x_e_illume_quickpanel_get(Ecore_X_Window win) @@ -637,10 +637,10 @@ ecore_x_e_illume_quickpanel_get(Ecore_X_Window win) return EINA_FALSE; return val ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_e_illume_quickpanel_get */ +} EAPI void -ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win, +ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state) { Ecore_X_Atom atom = 0; @@ -649,7 +649,7 @@ ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win, atom = _ecore_x_e_quickpanel_atom_get(state); ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE, &atom, 1); -} /* ecore_x_e_illume_quickpanel_state_set */ +} EAPI Ecore_X_Illume_Quickpanel_State ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win) @@ -663,10 +663,10 @@ ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win) return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN; return _ecore_x_e_quickpanel_state_get(atom); -} /* ecore_x_e_illume_quickpanel_state_get */ +} EAPI void -ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win, +ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state) { LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -674,7 +674,7 @@ ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, _ecore_x_e_quickpanel_atom_get(state), 0, 0, 0, 0); -} /* ecore_x_e_illume_quickpanel_state_send */ +} EAPI void ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win) @@ -684,17 +684,17 @@ ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win) ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 0, 0, 0, 0, 0); -} /* ecore_x_e_illume_quickpanel_state_toggle */ +} EAPI void ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win, - unsigned int priority) + unsigned int priority) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR, &priority, 1); -} /* ecore_x_e_illume_quickpanel_priority_major_set */ +} EAPI int ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win) @@ -708,17 +708,17 @@ ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win) return 0; return val; -} /* ecore_x_e_illume_quickpanel_priority_major_get */ +} EAPI void ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win, - unsigned int priority) + unsigned int priority) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR, &priority, 1); -} /* ecore_x_e_illume_quickpanel_priority_minor_set */ +} EAPI int ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win) @@ -732,17 +732,17 @@ ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win) return 0; return val; -} /* ecore_x_e_illume_quickpanel_priority_minor_get */ +} EAPI void ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win, - unsigned int zone) + unsigned int zone) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE, &zone, 1); -} /* ecore_x_e_illume_quickpanel_zone_set */ +} EAPI int ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win) @@ -756,7 +756,7 @@ ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win) return 0; return val; -} /* ecore_x_e_illume_quickpanel_zone_get */ +} EAPI void ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win) @@ -766,10 +766,10 @@ ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win) ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 1, 0, 0, 0, 0); -} /* ecore_x_e_illume_quickpanel_position_update_send */ +} EAPI void -ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, +ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, Ecore_X_Sync_Counter counter) { LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -778,7 +778,7 @@ ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, ECORE_X_ATOM_CARDINAL, &counter, 1); else ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER); -} /* ecore_x_e_comp_sync_counter_set */ +} EAPI Ecore_X_Sync_Counter ecore_x_e_comp_sync_counter_get(Ecore_X_Window win) @@ -796,7 +796,7 @@ ecore_x_e_comp_sync_counter_get(Ecore_X_Window win) return 0; return counter; -} /* ecore_x_e_comp_sync_counter_get */ +} EAPI void ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, @@ -822,13 +822,13 @@ ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, XSendEvent(_ecore_x_disp, root, False, SubstructureRedirectMask | SubstructureNotifyMask, &xev); -} /* ecore_x_e_comp_sync_draw_done_send */ +} EAPI void ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root, Ecore_X_Window win, - int w, - int h) + int w, + int h) { XEvent xev; @@ -850,11 +850,11 @@ ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root, XSendEvent(_ecore_x_disp, root, False, SubstructureRedirectMask | SubstructureNotifyMask, &xev); -} /* ecore_x_e_comp_sync_draw_done_send */ +} EAPI void ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, - Eina_Bool enabled) + Eina_Bool enabled) { Ecore_X_Window win; @@ -887,7 +887,7 @@ ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, ecore_x_window_free(win); } } -} /* ecore_x_e_comp_sync_supported_set */ +} EAPI Eina_Bool ecore_x_e_comp_sync_supported_get(Ecore_X_Window root) @@ -916,7 +916,7 @@ ecore_x_e_comp_sync_supported_get(Ecore_X_Window root) } return EINA_FALSE; -} /* ecore_x_e_comp_sync_supported_get */ +} EAPI void ecore_x_e_comp_sync_begin_send(Ecore_X_Window win) @@ -938,7 +938,7 @@ ecore_x_e_comp_sync_begin_send(Ecore_X_Window win) XSendEvent(_ecore_x_disp, win, False, NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, &xev); -} /* ecore_x_e_comp_sync_begin_send */ +} EAPI void ecore_x_e_comp_sync_end_send(Ecore_X_Window win) @@ -960,7 +960,7 @@ ecore_x_e_comp_sync_end_send(Ecore_X_Window win) XSendEvent(_ecore_x_disp, win, False, NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, &xev); -} /* ecore_x_e_comp_sync_end_send */ +} EAPI void ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win) @@ -982,7 +982,7 @@ ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win) XSendEvent(_ecore_x_disp, win, False, NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, &xev); -} /* ecore_x_e_comp_sync_cancel_send */ +} EAPI void ecore_x_e_comp_flush_send(Ecore_X_Window win) @@ -1004,7 +1004,7 @@ ecore_x_e_comp_flush_send(Ecore_X_Window win) XSendEvent(_ecore_x_disp, win, False, NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, &xev); -} /* ecore_x_e_comp_flush_send */ +} EAPI void ecore_x_e_comp_dump_send(Ecore_X_Window win) @@ -1026,7 +1026,7 @@ ecore_x_e_comp_dump_send(Ecore_X_Window win) XSendEvent(_ecore_x_disp, win, False, NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, &xev); -} /* ecore_x_e_comp_dump_send */ +} EAPI void ecore_x_e_comp_pixmap_set(Ecore_X_Window win, @@ -1038,7 +1038,7 @@ ecore_x_e_comp_pixmap_set(Ecore_X_Window win, ECORE_X_ATOM_PIXMAP, &pixmap, 1); else ecore_x_window_prop_property_del(win, pixmap); -} /* ecore_x_e_comp_pixmap_set */ +} EAPI Ecore_X_Pixmap ecore_x_e_comp_pixmap_get(Ecore_X_Window win) @@ -1056,5 +1056,5 @@ ecore_x_e_comp_pixmap_get(Ecore_X_Window win) return 0; return pixmap; -} /* ecore_x_e_comp_pixmap_get */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_error.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_error.c index 837ff53..11e9f20 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_error.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_error.c @@ -9,7 +9,7 @@ #include "ecore_x_private.h" #include "Ecore_X.h" -static int _ecore_x_error_handle(Display *d, +static int _ecore_x_error_handle(Display *d, XErrorEvent *ev); static int _ecore_x_io_error_handle(Display *d); @@ -19,6 +19,7 @@ static void (*_io_error_func)(void *data) = NULL; static void *_io_error_data = NULL; static int _error_request_code = 0; static int _error_code = 0; +static Ecore_X_ID _error_resource_id = 0; /** * Set the error handler. @@ -28,12 +29,12 @@ static int _error_code = 0; * Set the X error handler function */ EAPI void -ecore_x_error_handler_set(void (*func)(void *data), +ecore_x_error_handler_set(void (*func)(void *data), const void *data) { _error_func = func; _error_data = (void *)data; -} /* ecore_x_error_handler_set */ +} /** * Set the I/O error handler. @@ -43,12 +44,12 @@ ecore_x_error_handler_set(void (*func)(void *data), * Set the X I/O error handler function */ EAPI void -ecore_x_io_error_handler_set(void (*func)(void *data), +ecore_x_io_error_handler_set(void (*func)(void *data), const void *data) { _io_error_func = func; _io_error_data = (void *)data; -} /* ecore_x_io_error_handler_set */ +} /** * Get the request code that caused the error. @@ -60,7 +61,7 @@ EAPI int ecore_x_error_request_get(void) { return _error_request_code; -} /* ecore_x_error_request_get */ +} /** * Get the error code from the error. @@ -72,28 +73,41 @@ EAPI int ecore_x_error_code_get(void) { return _error_code; -} /* ecore_x_error_code_get */ +} + +/** + * Get the resource id that caused the error. + * @return The resource id causing the X error + * + * Return the X resource id that caused the last X error + */ +EAPI Ecore_X_ID +ecore_x_error_resource_id_get(void) +{ + return _error_resource_id; +} void _ecore_x_error_handler_init(void) { XSetErrorHandler((XErrorHandler)_ecore_x_error_handle); XSetIOErrorHandler((XIOErrorHandler)_ecore_x_io_error_handle); -} /* _ecore_x_error_handler_init */ +} static int -_ecore_x_error_handle(Display *d, +_ecore_x_error_handle(Display *d, XErrorEvent *ev) { if (d == _ecore_x_disp) { _error_request_code = ev->request_code; _error_code = ev->error_code; + _error_resource_id = ev->resourceid; if (_error_func) _error_func(_error_data); } return 0; -} /* _ecore_x_error_handle */ +} static int _ecore_x_io_error_handle(Display *d) @@ -107,5 +121,5 @@ _ecore_x_io_error_handle(Display *d) } return 0; -} /* _ecore_x_io_error_handle */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_events.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_events.c index 136cd63..0b06a79 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_events.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_events.c @@ -100,10 +100,10 @@ _ecore_x_event_free_mouse_move(void *data __UNUSED__, } free(e); -} /* _ecore_x_event_free_mouse_move */ +} EAPI void -ecore_x_event_mask_set(Ecore_X_Window w, +ecore_x_event_mask_set(Ecore_X_Window w, Ecore_X_Event_Mask mask) { XWindowAttributes attr; @@ -117,10 +117,10 @@ ecore_x_event_mask_set(Ecore_X_Window w, XGetWindowAttributes(_ecore_x_disp, w, &attr); s_attr.event_mask = mask | attr.your_event_mask; XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr); -} /* ecore_x_event_mask_set */ +} EAPI void -ecore_x_event_mask_unset(Ecore_X_Window w, +ecore_x_event_mask_unset(Ecore_X_Window w, Ecore_X_Event_Mask mask) { XWindowAttributes attr; @@ -134,7 +134,7 @@ ecore_x_event_mask_unset(Ecore_X_Window w, XGetWindowAttributes(_ecore_x_disp, w, &attr); s_attr.event_mask = attr.your_event_mask & ~mask; XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr); -} /* ecore_x_event_mask_unset */ +} static void _ecore_x_event_free_xdnd_enter(void *data __UNUSED__, @@ -148,7 +148,7 @@ _ecore_x_event_free_xdnd_enter(void *data __UNUSED__, XFree(e->types[i]); free(e->types); free(e); -} /* _ecore_x_event_free_xdnd_enter */ +} static void _ecore_x_event_free_selection_notify(void *data __UNUSED__, @@ -164,7 +164,7 @@ _ecore_x_event_free_selection_notify(void *data __UNUSED__, free(e->target); free(e); -} /* _ecore_x_event_free_selection_notify */ +} static unsigned int _ecore_x_event_modifiers(unsigned int state) @@ -196,28 +196,28 @@ _ecore_x_event_modifiers(unsigned int state) modifiers |= ECORE_EVENT_LOCK_SHIFT; return modifiers; -} /* _ecore_x_event_modifiers */ +} void _ecore_mouse_move(unsigned int timestamp, unsigned int xmodifiers, - int x, - int y, - int x_root, - int y_root, + int x, + int y, + int x_root, + int y_root, unsigned int event_window, unsigned int window, unsigned int root_win, - int same_screen, - int dev, - double radx, - double rady, - double pressure, - double angle, - double mx, - double my, - double mrx, - double mry) + int same_screen, + int dev, + double radx, + double rady, + double pressure, + double angle, + double mx, + double my, + double mrx, + double mry) { Ecore_Event_Mouse_Move *e; Ecore_Event *event; @@ -260,10 +260,10 @@ _ecore_mouse_move(unsigned int timestamp, _ecore_x_event_last_root_y = y_root; _ecore_x_last_event_mouse_move_event = event; -} /* _ecore_mouse_move */ +} static void -_ecore_key_press(int event, +_ecore_key_press(int event, XKeyEvent *xevent) { Ecore_Event_Key *e; @@ -343,30 +343,30 @@ _ecore_key_press(int event, on_error: if (tmp) free(tmp); -} /* _ecore_key_press */ +} Ecore_Event_Mouse_Button * -_ecore_mouse_button(int event, +_ecore_mouse_button(int event, unsigned int timestamp, unsigned int xmodifiers, unsigned int buttons, - int x, - int y, - int x_root, - int y_root, + int x, + int y, + int x_root, + int y_root, unsigned int event_window, unsigned int window, unsigned int root_win, - int same_screen, - int dev, - double radx, - double rady, - double pressure, - double angle, - double mx, - double my, - double mrx, - double mry) + int same_screen, + int dev, + double radx, + double rady, + double pressure, + double angle, + double mx, + double my, + double mrx, + double mry) { Ecore_Event_Mouse_Button *e; @@ -407,37 +407,37 @@ _ecore_mouse_button(int event, { if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN) { - //Check Double Clicked - if (((int)(timestamp - down_info->last_time) <= - (int)(1000 * _ecore_x_double_click_time)) && - (window == down_info->last_win) && - (event_window == down_info->last_event_win)) - { - e->double_click = 1; - down_info->did_double = EINA_TRUE; - } - else - { - down_info->did_double = EINA_FALSE; - down_info->did_triple = EINA_FALSE; - } - - //Check Triple Clicked - if (((int)(timestamp - down_info->last_last_time) <= - (int)(2 * 1000 * _ecore_x_double_click_time)) && - (window == down_info->last_win) && - (window == down_info->last_last_win) && - (event_window == down_info->last_event_win) && - (event_window == down_info->last_last_event_win) - ) - { - e->triple_click = 1; - down_info->did_triple = EINA_TRUE; - } - else - { - down_info->did_triple = EINA_FALSE; - } + //Check Double Clicked + if (((int)(timestamp - down_info->last_time) <= + (int)(1000 * _ecore_x_double_click_time)) && + (window == down_info->last_win) && + (event_window == down_info->last_event_win)) + { + e->double_click = 1; + down_info->did_double = EINA_TRUE; + } + else + { + down_info->did_double = EINA_FALSE; + down_info->did_triple = EINA_FALSE; + } + + //Check Triple Clicked + if (((int)(timestamp - down_info->last_last_time) <= + (int)(2 * 1000 * _ecore_x_double_click_time)) && + (window == down_info->last_win) && + (window == down_info->last_last_win) && + (event_window == down_info->last_event_win) && + (event_window == down_info->last_last_event_win) + ) + { + e->triple_click = 1; + down_info->did_triple = EINA_TRUE; + } + else + { + down_info->did_triple = EINA_FALSE; + } } else { @@ -491,7 +491,7 @@ _ecore_mouse_button(int event, } return e; -} /* _ecore_mouse_button */ +} void _ecore_x_event_handle_any_event(XEvent *xevent) @@ -500,19 +500,19 @@ _ecore_x_event_handle_any_event(XEvent *xevent) if (!ev) return; memcpy(ev, xevent, sizeof(XEvent)); ecore_event_add(ECORE_X_EVENT_ANY, ev, NULL, NULL); -} /* _ecore_x_event_handle_any_event */ +} void _ecore_x_event_handle_key_press(XEvent *xevent) { _ecore_key_press(ECORE_EVENT_KEY_DOWN, (XKeyEvent *)xevent); -} /* _ecore_x_event_handle_key_press */ +} void _ecore_x_event_handle_key_release(XEvent *xevent) { _ecore_key_press(ECORE_EVENT_KEY_UP, (XKeyEvent *)xevent); -} /* _ecore_x_event_handle_key_release */ +} void _ecore_x_event_handle_button_press(XEvent *xevent) @@ -541,7 +541,7 @@ _ecore_x_event_handle_button_press(XEvent *xevent) case 7: e->direction = 1; e->z = 1; break; default: e->direction = 0; e->z = 0; break; - } /* switch */ + } e->x = xevent->xbutton.x; e->y = xevent->xbutton.y; @@ -663,7 +663,7 @@ _ecore_x_event_handle_button_press(XEvent *xevent) } } } -} /* _ecore_x_event_handle_button_press */ +} void _ecore_x_event_handle_button_release(XEvent *xevent) @@ -702,7 +702,7 @@ _ecore_x_event_handle_button_release(XEvent *xevent) xevent->xbutton.x, xevent->xbutton.y, xevent->xbutton.x_root, xevent->xbutton.y_root); } -} /* _ecore_x_event_handle_button_release */ +} void _ecore_x_event_handle_motion_notify(XEvent *xevent) @@ -715,27 +715,27 @@ _ecore_x_event_handle_motion_notify(XEvent *xevent) _ecore_x_last_event_mouse_move_event = NULL; } */ - _ecore_mouse_move(xevent->xmotion.time, xevent->xmotion.state, - xevent->xmotion.x, xevent->xmotion.y, - xevent->xmotion.x_root, xevent->xmotion.y_root, - xevent->xmotion.window, - (xevent->xmotion.subwindow ? xevent->xmotion.subwindow : - xevent->xmotion.window), - xevent->xmotion.root, - xevent->xmotion.same_screen, - 0, 1, 1, - 1.0, // pressure - 0.0, // angle - xevent->xmotion.x, xevent->xmotion.y, - xevent->xmotion.x_root, xevent->xmotion.y_root); - - _ecore_x_last_event_mouse_move = 1; - - /* Xdnd handling */ - _ecore_x_dnd_drag(xevent->xmotion.root, - xevent->xmotion.x_root, - xevent->xmotion.y_root); -} /* _ecore_x_event_handle_motion_notify */ + _ecore_mouse_move(xevent->xmotion.time, xevent->xmotion.state, + xevent->xmotion.x, xevent->xmotion.y, + xevent->xmotion.x_root, xevent->xmotion.y_root, + xevent->xmotion.window, + (xevent->xmotion.subwindow ? xevent->xmotion.subwindow : + xevent->xmotion.window), + xevent->xmotion.root, + xevent->xmotion.same_screen, + 0, 1, 1, + 1.0, // pressure + 0.0, // angle + xevent->xmotion.x, xevent->xmotion.y, + xevent->xmotion.x_root, xevent->xmotion.y_root); + + _ecore_x_last_event_mouse_move = 1; + + /* Xdnd handling */ + _ecore_x_dnd_drag(xevent->xmotion.root, + xevent->xmotion.x_root, + xevent->xmotion.y_root); +} void _ecore_x_event_handle_enter_notify(XEvent *xevent) @@ -799,7 +799,7 @@ _ecore_x_event_handle_enter_notify(XEvent *xevent) _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_X_EVENT_MOUSE_IN, e, NULL, NULL); } -} /* _ecore_x_event_handle_enter_notify */ +} void _ecore_x_event_handle_leave_notify(XEvent *xevent) @@ -866,7 +866,7 @@ _ecore_x_event_handle_leave_notify(XEvent *xevent) _ecore_x_event_last_root_y = e->root.y; ecore_event_add(ECORE_X_EVENT_MOUSE_OUT, e, NULL, NULL); } -} /* _ecore_x_event_handle_leave_notify */ +} void _ecore_x_event_handle_focus_in(XEvent *xevent) @@ -910,7 +910,7 @@ _ecore_x_event_handle_focus_in(XEvent *xevent) e->time = _ecore_x_event_last_time; _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, e, NULL, NULL); -} /* _ecore_x_event_handle_focus_in */ +} void _ecore_x_event_handle_focus_out(XEvent *xevent) @@ -954,14 +954,14 @@ _ecore_x_event_handle_focus_out(XEvent *xevent) e->time = _ecore_x_event_last_time; _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, e, NULL, NULL); -} /* _ecore_x_event_handle_focus_out */ +} void _ecore_x_event_handle_keymap_notify(XEvent *xevent __UNUSED__) { _ecore_x_last_event_mouse_move = 0; /* FIXME: handle this event type */ -} /* _ecore_x_event_handle_keymap_notify */ +} void _ecore_x_event_handle_expose(XEvent *xevent) @@ -981,7 +981,7 @@ _ecore_x_event_handle_expose(XEvent *xevent) e->h = xevent->xexpose.height; e->count = xevent->xexpose.count; ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL); -} /* _ecore_x_event_handle_expose */ +} void _ecore_x_event_handle_graphics_expose(XEvent *xevent) @@ -1001,7 +1001,7 @@ _ecore_x_event_handle_graphics_expose(XEvent *xevent) e->h = xevent->xgraphicsexpose.height; e->count = xevent->xgraphicsexpose.count; ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL); -} /* _ecore_x_event_handle_graphics_expose */ +} void _ecore_x_event_handle_visibility_notify(XEvent *xevent) @@ -1024,7 +1024,7 @@ _ecore_x_event_handle_visibility_notify(XEvent *xevent) ecore_event_add(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, e, NULL, NULL); } -} /* _ecore_x_event_handle_visibility_notify */ +} void _ecore_x_event_handle_create_notify(XEvent *xevent) @@ -1050,7 +1050,7 @@ _ecore_x_event_handle_create_notify(XEvent *xevent) e->border = xevent->xcreatewindow.border_width; e->time = _ecore_x_event_last_time; ecore_event_add(ECORE_X_EVENT_WINDOW_CREATE, e, NULL, NULL); -} /* _ecore_x_event_handle_create_notify */ +} void _ecore_x_event_handle_destroy_notify(XEvent *xevent) @@ -1069,7 +1069,7 @@ _ecore_x_event_handle_destroy_notify(XEvent *xevent) _ecore_x_event_last_win = 0; ecore_event_add(ECORE_X_EVENT_WINDOW_DESTROY, e, NULL, NULL); -} /* _ecore_x_event_handle_destroy_notify */ +} void _ecore_x_event_handle_unmap_notify(XEvent *xevent) @@ -1085,7 +1085,7 @@ _ecore_x_event_handle_unmap_notify(XEvent *xevent) e->event_win = xevent->xunmap.event; e->time = _ecore_x_event_last_time; ecore_event_add(ECORE_X_EVENT_WINDOW_HIDE, e, NULL, NULL); -} /* _ecore_x_event_handle_unmap_notify */ +} void _ecore_x_event_handle_map_notify(XEvent *xevent) @@ -1101,7 +1101,7 @@ _ecore_x_event_handle_map_notify(XEvent *xevent) e->event_win = xevent->xmap.event; e->time = _ecore_x_event_last_time; ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW, e, NULL, NULL); -} /* _ecore_x_event_handle_map_notify */ +} void _ecore_x_event_handle_map_request(XEvent *xevent) @@ -1117,7 +1117,7 @@ _ecore_x_event_handle_map_request(XEvent *xevent) e->time = _ecore_x_event_last_time; e->parent = xevent->xmaprequest.parent; ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW_REQUEST, e, NULL, NULL); -} /* _ecore_x_event_handle_map_request */ +} void _ecore_x_event_handle_reparent_notify(XEvent *xevent) @@ -1134,7 +1134,7 @@ _ecore_x_event_handle_reparent_notify(XEvent *xevent) e->parent = xevent->xreparent.parent; e->time = _ecore_x_event_last_time; ecore_event_add(ECORE_X_EVENT_WINDOW_REPARENT, e, NULL, NULL); -} /* _ecore_x_event_handle_reparent_notify */ +} void _ecore_x_event_handle_configure_notify(XEvent *xevent) @@ -1158,7 +1158,7 @@ _ecore_x_event_handle_configure_notify(XEvent *xevent) e->from_wm = xevent->xconfigure.send_event; e->time = _ecore_x_event_last_time; ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE, e, NULL, NULL); -} /* _ecore_x_event_handle_configure_notify */ +} void _ecore_x_event_handle_configure_request(XEvent *xevent) @@ -1193,14 +1193,14 @@ _ecore_x_event_handle_configure_request(XEvent *xevent) e->detail = ECORE_X_WINDOW_STACK_OPPOSITE; ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST, e, NULL, NULL); -} /* _ecore_x_event_handle_configure_request */ +} void _ecore_x_event_handle_gravity_notify(XEvent *xevent __UNUSED__) { _ecore_x_last_event_mouse_move = 0; /* FIXME: handle this event type */ -} /* _ecore_x_event_handle_gravity_notify */ +} void _ecore_x_event_handle_resize_request(XEvent *xevent) @@ -1217,7 +1217,7 @@ _ecore_x_event_handle_resize_request(XEvent *xevent) e->h = xevent->xresizerequest.height; e->time = _ecore_x_event_last_time; ecore_event_add(ECORE_X_EVENT_WINDOW_RESIZE_REQUEST, e, NULL, NULL); -} /* _ecore_x_event_handle_resize_request */ +} void _ecore_x_event_handle_circulate_notify(XEvent *xevent) @@ -1238,7 +1238,7 @@ _ecore_x_event_handle_circulate_notify(XEvent *xevent) e->time = _ecore_x_event_last_time; ecore_event_add(ECORE_X_EVENT_WINDOW_STACK, e, NULL, NULL); -} /* _ecore_x_event_handle_circulate_notify */ +} void _ecore_x_event_handle_circulate_request(XEvent *xevent) @@ -1259,7 +1259,7 @@ _ecore_x_event_handle_circulate_request(XEvent *xevent) e->time = _ecore_x_event_last_time; ecore_event_add(ECORE_X_EVENT_WINDOW_STACK_REQUEST, e, NULL, NULL); -} /* _ecore_x_event_handle_circulate_request */ +} void _ecore_x_event_handle_property_notify(XEvent *xevent) @@ -1278,17 +1278,17 @@ _ecore_x_event_handle_property_notify(XEvent *xevent) _ecore_x_event_last_time = e->time; ecore_event_add(ECORE_X_EVENT_WINDOW_PROPERTY, e, NULL, NULL); } -} /* _ecore_x_event_handle_property_notify */ +} void _ecore_x_event_handle_selection_clear(XEvent *xevent) { // Ecore_X_Selection_Intern *d; - Ecore_X_Event_Selection_Clear *e; - Ecore_X_Atom sel; + Ecore_X_Event_Selection_Clear *e; + Ecore_X_Atom sel; - LOGFN(__FILE__, __LINE__, __FUNCTION__); - _ecore_x_last_event_mouse_move = 0; + LOGFN(__FILE__, __LINE__, __FUNCTION__); + _ecore_x_last_event_mouse_move = 0; /* errr..... why? paranoia. d = _ecore_x_selection_get(xevent->xselectionclear.selection); if (d && (xevent->xselectionclear.time > d->time)) @@ -1298,21 +1298,21 @@ _ecore_x_event_handle_selection_clear(XEvent *xevent) } */ /* Generate event for app cleanup */ - e = malloc(sizeof(Ecore_X_Event_Selection_Clear)); - e->win = xevent->xselectionclear.window; - e->time = xevent->xselectionclear.time; - e->atom = sel = xevent->xselectionclear.selection; - if (sel == ECORE_X_ATOM_SELECTION_PRIMARY) - e->selection = ECORE_X_SELECTION_PRIMARY; - else if (sel == ECORE_X_ATOM_SELECTION_SECONDARY) - e->selection = ECORE_X_SELECTION_SECONDARY; - else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD) - e->selection = ECORE_X_SELECTION_CLIPBOARD; - else - e->selection = ECORE_X_SELECTION_OTHER; - - ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL); -} /* _ecore_x_event_handle_selection_clear */ + e = malloc(sizeof(Ecore_X_Event_Selection_Clear)); + e->win = xevent->xselectionclear.window; + e->time = xevent->xselectionclear.time; + e->atom = sel = xevent->xselectionclear.selection; + if (sel == ECORE_X_ATOM_SELECTION_PRIMARY) + e->selection = ECORE_X_SELECTION_PRIMARY; + else if (sel == ECORE_X_ATOM_SELECTION_SECONDARY) + e->selection = ECORE_X_SELECTION_SECONDARY; + else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD) + e->selection = ECORE_X_SELECTION_CLIPBOARD; + else + e->selection = ECORE_X_SELECTION_OTHER; + + ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL); +} void _ecore_x_event_handle_selection_request(XEvent *xevent) @@ -1360,17 +1360,17 @@ _ecore_x_event_handle_selection_request(XEvent *xevent) property = None; else if (data) { - /* FIXME: This does not properly handle large data transfers */ - ecore_x_window_prop_property_set( - xevent->xselectionrequest.requestor, - xevent->xselectionrequest. - property, - type, - typesize, - data, - len); - property = xevent->xselectionrequest.property; - free(data); + /* FIXME: This does not properly handle large data transfers */ + ecore_x_window_prop_property_set( + xevent->xselectionrequest.requestor, + xevent->xselectionrequest. + property, + type, + typesize, + data, + len); + property = xevent->xselectionrequest.property; + free(data); } ecore_x_selection_notify_send(xevent->xselectionrequest.requestor, @@ -1380,7 +1380,7 @@ _ecore_x_event_handle_selection_request(XEvent *xevent) xevent->xselectionrequest.time); } } -} /* _ecore_x_event_handle_selection_request */ +} void _ecore_x_event_handle_selection_notify(XEvent *xevent) @@ -1436,7 +1436,7 @@ _ecore_x_event_handle_selection_notify(XEvent *xevent) ecore_event_add(ECORE_X_EVENT_SELECTION_NOTIFY, e, _ecore_x_event_free_selection_notify, NULL); -} /* _ecore_x_event_handle_selection_notify */ +} void _ecore_x_event_handle_colormap_notify(XEvent *xevent) @@ -1457,7 +1457,7 @@ _ecore_x_event_handle_colormap_notify(XEvent *xevent) e->installed = EINA_FALSE; ecore_event_add(ECORE_X_EVENT_WINDOW_COLORMAP, e, NULL, NULL); -} /* _ecore_x_event_handle_colormap_notify */ +} void _ecore_x_event_handle_client_message(XEvent *xevent) @@ -1528,32 +1528,32 @@ _ecore_x_event_handle_client_message(XEvent *xevent) if (xevent->xclient.data.l[1] & 0x1UL) { /* source supports more than 3 types, fetch property */ - unsigned char *data; - Ecore_X_Atom *types; - int i, num_ret; - - LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (!(ecore_x_window_prop_property_get(target->source, - ECORE_X_ATOM_XDND_TYPE_LIST, - XA_ATOM, - 32, &data, &num_ret))) - { - WRN( - "DND: Could not fetch data type list from source window, aborting."); - free(e); - return; - } - - types = (Ecore_X_Atom *)data; - e->types = calloc(num_ret, sizeof(char *)); - if (e->types) - { - LOGFN(__FILE__, __LINE__, __FUNCTION__); - for (i = 0; i < num_ret; i++) - e->types[i] = XGetAtomName(_ecore_x_disp, types[i]); - } - - e->num_types = num_ret; + unsigned char *data; + Ecore_X_Atom *types; + int i, num_ret; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + if (!(ecore_x_window_prop_property_get(target->source, + ECORE_X_ATOM_XDND_TYPE_LIST, + XA_ATOM, + 32, &data, &num_ret))) + { + WRN( + "DND: Could not fetch data type list from source window, aborting."); + free(e); + return; + } + + types = (Ecore_X_Atom *)data; + e->types = calloc(num_ret, sizeof(char *)); + if (e->types) + { + LOGFN(__FILE__, __LINE__, __FUNCTION__); + for (i = 0; i < num_ret; i++) + e->types[i] = XGetAtomName(_ecore_x_disp, types[i]); + } + + e->num_types = num_ret; } else { @@ -1774,7 +1774,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent) if (e->state[0] == ECORE_X_WINDOW_STATE_UNKNOWN) { // char *name; - LOGFN(__FILE__, __LINE__, __FUNCTION__); + LOGFN(__FILE__, __LINE__, __FUNCTION__); // name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[1]); // if (name) ERR("Unknown state: %s", name); @@ -1784,7 +1784,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent) if (e->state[1] == ECORE_X_WINDOW_STATE_UNKNOWN) { // char *name; - LOGFN(__FILE__, __LINE__, __FUNCTION__); + LOGFN(__FILE__, __LINE__, __FUNCTION__); // name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[2]); // if (name) ERR("Unknown state: %s", name); @@ -1888,10 +1888,10 @@ _ecore_x_event_handle_client_message(XEvent *xevent) && (xevent->xclient.window == _ecore_x_private_win)) { /* a grab sync marker */ - if (xevent->xclient.data.l[1] == 0x10000001) - _ecore_x_window_grab_remove(xevent->xclient.data.l[2]); - else if (xevent->xclient.data.l[1] == 0x10000002) - _ecore_x_key_grab_remove(xevent->xclient.data.l[2]); + if (xevent->xclient.data.l[1] == 0x10000001) + _ecore_x_window_grab_remove(xevent->xclient.data.l[2]); + else if (xevent->xclient.data.l[1] == 0x10000002) + _ecore_x_key_grab_remove(xevent->xclient.data.l[2]); } else { @@ -1910,7 +1910,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent) ecore_event_add(ECORE_X_EVENT_CLIENT_MESSAGE, e, NULL, NULL); } -} /* _ecore_x_event_handle_client_message */ +} void _ecore_x_event_handle_mapping_notify(XEvent *xevent) @@ -1940,7 +1940,7 @@ _ecore_x_event_handle_mapping_notify(XEvent *xevent) e->keycode = xevent->xmapping.first_keycode; e->num = xevent->xmapping.count; ecore_event_add(ECORE_X_EVENT_MAPPING_CHANGE, e, NULL, NULL); -} /* _ecore_x_event_handle_mapping_notify */ +} void _ecore_x_event_handle_shape_change(XEvent *xevent) @@ -1979,7 +1979,7 @@ _ecore_x_event_handle_shape_change(XEvent *xevent) e->h = shape_event->height; e->shaped = shape_event->shaped; ecore_event_add(ECORE_X_EVENT_WINDOW_SHAPE, e, NULL, NULL); -} /* _ecore_x_event_handle_shape_change */ +} void _ecore_x_event_handle_screensaver_notify(XEvent *xevent) @@ -2005,7 +2005,7 @@ _ecore_x_event_handle_screensaver_notify(XEvent *xevent) #else /* ifdef ECORE_XSS */ xevent = NULL; #endif /* ifdef ECORE_XSS */ -} /* _ecore_x_event_handle_screensaver_notify */ +} void _ecore_x_event_handle_sync_counter(XEvent *xevent) @@ -2021,7 +2021,7 @@ _ecore_x_event_handle_sync_counter(XEvent *xevent) e->time = sync_counter_event->time; ecore_event_add(ECORE_X_EVENT_SYNC_COUNTER, e, NULL, NULL); -} /* _ecore_x_event_handle_sync_counter */ +} void _ecore_x_event_handle_sync_alarm(XEvent *xevent) @@ -2039,7 +2039,7 @@ _ecore_x_event_handle_sync_alarm(XEvent *xevent) e->time = sync_alarm_event->time; e->alarm = sync_alarm_event->alarm; ecore_event_add(ECORE_X_EVENT_SYNC_ALARM, e, NULL, NULL); -} /* _ecore_x_event_handle_sync_alarm */ +} #ifdef ECORE_XRANDR void @@ -2068,7 +2068,7 @@ _ecore_x_event_handle_randr_change(XEvent *xevent) e->orientation = randr_event->rotation; e->subpixel_order = randr_event->subpixel_order; ecore_event_add(ECORE_X_EVENT_SCREEN_CHANGE, e, NULL, NULL); -} /* _ecore_x_event_handle_randr_change */ +} static void _ecore_x_event_handle_randr_notify_crtc_change(const XRRNotifyEvent *xevent) @@ -2091,7 +2091,7 @@ _ecore_x_event_handle_randr_notify_crtc_change(const XRRNotifyEvent *xevent) e->geo.w = randr_event->width; e->geo.h = randr_event->height; ecore_event_add(ECORE_X_EVENT_RANDR_CRTC_CHANGE, e, NULL, NULL); -} /* _ecore_x_event_handle_randr_notify_crtc_change */ +} static void _ecore_x_event_handle_randr_notify_output_change(const XRRNotifyEvent *xevent) @@ -2113,7 +2113,7 @@ _ecore_x_event_handle_randr_notify_output_change(const XRRNotifyEvent *xevent) e->connection = randr_event->connection; e->subpixel_order = randr_event->subpixel_order; ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_CHANGE, e, NULL, NULL); -} /* _ecore_x_event_handle_randr_notify_output_change */ +} static void _ecore_x_event_handle_randr_notify_output_property(const XRRNotifyEvent *xevent) @@ -2136,7 +2136,7 @@ _ecore_x_event_handle_randr_notify_output_property(const XRRNotifyEvent *xevent) else e->state = ECORE_X_RANDR_PROPERTY_CHANGE_DEL; ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY, e, NULL, NULL); -} /* _ecore_x_event_handle_randr_notify_output_property */ +} void _ecore_x_event_handle_randr_notify(XEvent *xevent) @@ -2164,8 +2164,8 @@ _ecore_x_event_handle_randr_notify(XEvent *xevent) ERR("Unknown XRandR RRNotify subtype: %d.", randr_event->subtype); break; - } /* switch */ -} /* _ecore_x_event_handle_randr_notify */ + } +} #endif /* ifdef ECORE_XRANDR */ @@ -2201,7 +2201,7 @@ _ecore_x_event_handle_fixes_selection_notify(XEvent *event) e->reason = notify_event->subtype; ecore_event_add(ECORE_X_EVENT_FIXES_SELECTION_NOTIFY, e, NULL, NULL); -} /* _ecore_x_event_handle_fixes_selection_notify */ +} #endif /* ifdef ECORE_XFIXES */ @@ -2234,7 +2234,7 @@ _ecore_x_event_handle_damage_notify(XEvent *event) e->geometry.height = damage_event->geometry.height; ecore_event_add(ECORE_X_EVENT_DAMAGE_NOTIFY, e, NULL, NULL); -} /* _ecore_x_event_handle_damage_notify */ +} #endif /* ifdef ECORE_XDAMAGE */ @@ -2256,7 +2256,7 @@ _ecore_x_event_free_generic_event(void *data, return; data = NULL; ev = NULL; #endif /* ifdef ECORE_XI2 */ -} /* _ecore_x_event_free_generic_event */ +} void _ecore_x_event_handle_generic_event(XEvent *event) @@ -2300,7 +2300,7 @@ _ecore_x_event_handle_generic_event(XEvent *event) return; event = NULL; #endif /* ifdef ECORE_XI2 */ -} /* _ecore_x_event_handle_generic_event */ +} #ifdef ECORE_XGESTURE void @@ -2315,7 +2315,7 @@ _ecore_x_event_handle_gesture_notify_flick(XEvent *xevent) xfe = (XGestureNotifyFlickEvent *)xevent; e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Flick)); if (!e) - return; + return; e->win = xfe->window; e->time = xfe->time; @@ -2341,7 +2341,7 @@ _ecore_x_event_handle_gesture_notify_pan(XEvent *xevent) xpe = (XGestureNotifyPanEvent *)xevent; e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Pan)); if (!e) - return; + return; e->win = xpe->window; e->time = xpe->time; @@ -2368,7 +2368,7 @@ _ecore_x_event_handle_gesture_notify_pinchrotation(XEvent *xevent) xpre = (XGestureNotifyPinchRotationEvent *)xevent; e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_PinchRotation)); if (!e) - return; + return; e->win = xpre->window; e->time = xpre->time; @@ -2395,7 +2395,7 @@ _ecore_x_event_handle_gesture_notify_tap(XEvent *xevent) xte = (XGestureNotifyTapEvent *)xevent; e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Tap)); if (!e) - return; + return; e->win = xte->window; e->time = xte->time; @@ -2421,7 +2421,7 @@ _ecore_x_event_handle_gesture_notify_tapnhold(XEvent *xevent) xthe = (XGestureNotifyTapNHoldEvent *)xevent; e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_TapNHold)); if (!e) - return; + return; e->win = xthe->window; e->time = xthe->time; @@ -2436,7 +2436,7 @@ _ecore_x_event_handle_gesture_notify_tapnhold(XEvent *xevent) } void - _ecore_x_event_handle_gesture_notify_hold(XEvent *xevent) +_ecore_x_event_handle_gesture_notify_hold(XEvent *xevent) { XGestureNotifyHoldEvent *xhe; Ecore_X_Event_Gesture_Notify_Hold *e; @@ -2447,7 +2447,7 @@ void xhe = (XGestureNotifyHoldEvent *)xevent; e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Hold)); if (!e) - return; + return; e->win = xhe->window; e->time = xhe->time; @@ -2461,7 +2461,7 @@ void } void - _ecore_x_event_handle_gesture_notify_group(XEvent *xevent) +_ecore_x_event_handle_gesture_notify_group(XEvent *xevent) { XGestureNotifyGroupEvent *xge; Ecore_X_Event_Gesture_Notify_Group *e; @@ -2472,7 +2472,7 @@ void xge = (XGestureNotifyGroupEvent *)xevent; e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Group)); if (!e) - return; + return; e->win = xge->window; e->time = xge->time; @@ -2482,5 +2482,6 @@ void ecore_event_add(ECORE_X_EVENT_GESTURE_NOTIFY_GROUP, e, NULL, NULL); } + #endif /* ifdef ECORE_XGESTURE */ diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c index e81af13..da0a6c3 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c @@ -32,13 +32,13 @@ _ecore_x_fixes_init(void) #else /* ifdef ECORE_XFIXES */ _fixes_available = 0; #endif /* ifdef ECORE_XFIXES */ -} /* _ecore_x_fixes_init */ +} #ifdef ECORE_XFIXES /* I don't know what to call this function. */ static XRectangle * _ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects, - int num) + int num) { XRectangle *xrect; int i; @@ -58,11 +58,11 @@ _ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects, xrect[i].height = rects[i].height; } return xrect; -} /* _ecore_x_rectangle_ecore_to_x */ +} static Ecore_X_Rectangle * _ecore_x_rectangle_x_to_ecore(XRectangle *xrect, - int num) + int num) { Ecore_X_Rectangle *rects; int i; @@ -82,7 +82,7 @@ _ecore_x_rectangle_x_to_ecore(XRectangle *xrect, rects[i].height = xrect[i].height; } return rects; -} /* _ecore_x_rectangle_x_to_ecore */ +} #endif /* ifdef ECORE_XFIXES */ @@ -106,7 +106,7 @@ ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection) EAPI Ecore_X_Region ecore_x_region_new(Ecore_X_Rectangle *rects, - int num) + int num) { #ifdef ECORE_XFIXES Ecore_X_Region region; @@ -120,7 +120,7 @@ ecore_x_region_new(Ecore_X_Rectangle *rects, #else /* ifdef ECORE_XFIXES */ return 0; #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_new */ +} EAPI Ecore_X_Region ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap) @@ -134,10 +134,10 @@ ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap) #else /* ifdef ECORE_XFIXES */ return 0; #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_new_from_bitmap */ +} EAPI Ecore_X_Region -ecore_x_region_new_from_window(Ecore_X_Window win, +ecore_x_region_new_from_window(Ecore_X_Window win, Ecore_X_Region_Type type) { #ifdef ECORE_XFIXES @@ -149,7 +149,7 @@ ecore_x_region_new_from_window(Ecore_X_Window win, #else /* ifdef ECORE_XFIXES */ return 0; #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_new_from_window */ +} EAPI Ecore_X_Region ecore_x_region_new_from_gc(Ecore_X_GC gc) @@ -163,7 +163,7 @@ ecore_x_region_new_from_gc(Ecore_X_GC gc) #else /* ifdef ECORE_XFIXES */ return 0; #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_new_from_gc */ +} EAPI Ecore_X_Region ecore_x_region_new_from_picture(Ecore_X_Picture picture) @@ -177,7 +177,7 @@ ecore_x_region_new_from_picture(Ecore_X_Picture picture) #else /* ifdef ECORE_XFIXES */ return 0; #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_new_from_picture */ +} EAPI void ecore_x_region_free(Ecore_X_Region region) @@ -186,19 +186,19 @@ ecore_x_region_free(Ecore_X_Region region) LOGFN(__FILE__, __LINE__, __FUNCTION__); XFixesDestroyRegion(_ecore_x_disp, region); #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_free */ +} EAPI void -ecore_x_region_set(Ecore_X_Region region, +ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, - int num) + int num) { #ifdef ECORE_XFIXES XRectangle *xrect = _ecore_x_rectangle_ecore_to_x(rects, num); LOGFN(__FILE__, __LINE__, __FUNCTION__); XFixesSetRegion(_ecore_x_disp, region, xrect, num); #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_set */ +} EAPI void ecore_x_region_copy(Ecore_X_Region dest, @@ -208,7 +208,7 @@ ecore_x_region_copy(Ecore_X_Region dest, LOGFN(__FILE__, __LINE__, __FUNCTION__); XFixesCopyRegion(_ecore_x_disp, dest, source); #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_copy */ +} EAPI void ecore_x_region_combine(Ecore_X_Region dest, @@ -219,7 +219,7 @@ ecore_x_region_combine(Ecore_X_Region dest, LOGFN(__FILE__, __LINE__, __FUNCTION__); XFixesUnionRegion(_ecore_x_disp, dest, source1, source2); #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_combine */ +} EAPI void ecore_x_region_intersect(Ecore_X_Region dest, @@ -230,7 +230,7 @@ ecore_x_region_intersect(Ecore_X_Region dest, LOGFN(__FILE__, __LINE__, __FUNCTION__); XFixesIntersectRegion(_ecore_x_disp, dest, source1, source2); #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_intersect */ +} EAPI void ecore_x_region_subtract(Ecore_X_Region dest, @@ -241,35 +241,36 @@ ecore_x_region_subtract(Ecore_X_Region dest, LOGFN(__FILE__, __LINE__, __FUNCTION__); XFixesSubtractRegion(_ecore_x_disp, dest, source1, source2); #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_subtract */ +} EAPI void -ecore_x_region_invert(Ecore_X_Region dest, +ecore_x_region_invert(Ecore_X_Region dest, Ecore_X_Rectangle *bounds, - Ecore_X_Region source) + Ecore_X_Region source) { #ifdef ECORE_XFIXES XRectangle *xbound; int num = 0; LOGFN(__FILE__, __LINE__, __FUNCTION__); - while (bounds + num) num++; + while (bounds + num) + num++; xbound = _ecore_x_rectangle_ecore_to_x(bounds, num); XFixesInvertRegion(_ecore_x_disp, dest, xbound, source); #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_invert */ +} EAPI void ecore_x_region_translate(Ecore_X_Region region, - int dx, - int dy) + int dx, + int dy) { #ifdef ECORE_XFIXES LOGFN(__FILE__, __LINE__, __FUNCTION__); XFixesTranslateRegion(_ecore_x_disp, region, dx, dy); #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_translate */ +} EAPI void ecore_x_region_extents(Ecore_X_Region dest, @@ -279,11 +280,11 @@ ecore_x_region_extents(Ecore_X_Region dest, LOGFN(__FILE__, __LINE__, __FUNCTION__); XFixesRegionExtents(_ecore_x_disp, dest, source); #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_extents */ +} EAPI Ecore_X_Rectangle * -ecore_x_region_fetch(Ecore_X_Region region, - int *num, +ecore_x_region_fetch(Ecore_X_Region region, + int *num, Ecore_X_Rectangle *bounds){ #ifdef ECORE_XFIXES Ecore_X_Rectangle *rects; @@ -300,40 +301,40 @@ ecore_x_region_fetch(Ecore_X_Region region, #else /* ifdef ECORE_XFIXES */ return NULL; #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_fetch */ +} EAPI void ecore_x_region_expand(Ecore_X_Region dest, Ecore_X_Region source, - unsigned int left, - unsigned int right, - unsigned int top, - unsigned int bottom) + unsigned int left, + unsigned int right, + unsigned int top, + unsigned int bottom) { #ifdef ECORE_XFIXES LOGFN(__FILE__, __LINE__, __FUNCTION__); XFixesExpandRegion(_ecore_x_disp, dest, source, left, right, top, bottom); #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_expand */ +} EAPI void ecore_x_region_gc_clip_set(Ecore_X_Region region, - Ecore_X_GC gc, - int x_origin, - int y_origin) + Ecore_X_GC gc, + int x_origin, + int y_origin) { #ifdef ECORE_XFIXES LOGFN(__FILE__, __LINE__, __FUNCTION__); XFixesSetGCClipRegion(_ecore_x_disp, gc, x_origin, y_origin, region); #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_gc_clip_set */ +} EAPI void -ecore_x_region_window_shape_set(Ecore_X_Region region, - Ecore_X_Window win, +ecore_x_region_window_shape_set(Ecore_X_Region region, + Ecore_X_Window win, Ecore_X_Shape_Type type, - int x_offset, - int y_offset) + int x_offset, + int y_offset) { #ifdef ECORE_XFIXES LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -344,13 +345,13 @@ ecore_x_region_window_shape_set(Ecore_X_Region region, y_offset, region); #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_window_shape_set */ +} EAPI void -ecore_x_region_picture_clip_set(Ecore_X_Region region, +ecore_x_region_picture_clip_set(Ecore_X_Region region, Ecore_X_Picture picture, - int x_origin, - int y_origin) + int x_origin, + int y_origin) { #ifdef ECORE_XFIXES LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -360,5 +361,5 @@ ecore_x_region_picture_clip_set(Ecore_X_Region region, y_origin, region); #endif /* ifdef ECORE_XFIXES */ -} /* ecore_x_region_picture_clip_set */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gc.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gc.c index 10b807b..5396366 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gc.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gc.c @@ -19,9 +19,9 @@ * @return The new default graphics context. */ EAPI Ecore_X_GC -ecore_x_gc_new(Ecore_X_Drawable draw, +ecore_x_gc_new(Ecore_X_Drawable draw, Ecore_X_GC_Value_Mask value_mask, - const unsigned int *value_list) + const unsigned int *value_list) { XGCValues gcv; int mask; @@ -152,11 +152,11 @@ ecore_x_gc_new(Ecore_X_Drawable draw, gcv.arc_mode = value_list[idx]; idx++; break; - } /* switch */ + } } return XCreateGC(_ecore_x_disp, draw, value_mask, &gcv); -} /* ecore_x_gc_new */ +} /** * Deletes and frees the given graphics context. @@ -167,5 +167,5 @@ ecore_x_gc_free(Ecore_X_GC gc) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XFreeGC(_ecore_x_disp, gc); -} /* ecore_x_gc_free */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gesture.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gesture.c index e1dc75c..e89421b 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gesture.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gesture.c @@ -26,7 +26,7 @@ _ecore_x_gesture_init(void) _gesture_available = EINA_TRUE; } else - _gesture_available = EINA_FALSE; + _gesture_available = EINA_FALSE; #else /* ifdef ECORE_XGESTURE */ _gesture_available = EINA_FALSE; #endif /* ifdef ECORE_XGESTURE */ @@ -48,11 +48,11 @@ ecore_x_gesture_events_select(Ecore_X_Window win, { #ifdef ECORE_XGESTURE if (!_gesture_available) - return EINA_FALSE; + return EINA_FALSE; LOGFN(__FILE__, __LINE__, __FUNCTION__); XGestureSelectEvents(_ecore_x_disp, win, mask); - + return EINA_TRUE; #else /* ifdef ECORE_XGESTURE */ return EINA_FALSE; @@ -68,7 +68,7 @@ ecore_x_gesture_events_selected_get(Ecore_X_Window win) Ecore_X_Gesture_Event_Mask mask; if (!_gesture_available) - return ECORE_X_GESTURE_EVENT_MASK_NONE; + return ECORE_X_GESTURE_EVENT_MASK_NONE; LOGFN(__FILE__, __LINE__, __FUNCTION__); if (GestureSuccess != XGestureGetSelectedEvents(_ecore_x_disp, win, &mask)) @@ -76,7 +76,7 @@ ecore_x_gesture_events_selected_get(Ecore_X_Window win) mask = ECORE_X_GESTURE_EVENT_MASK_NONE; return mask; } - + return mask; #else /* ifdef ECORE_XGESTURE */ return ECORE_X_GESTURE_EVENT_MASK_NONE; @@ -91,14 +91,14 @@ ecore_x_gesture_event_grab(Ecore_X_Window win, { #ifdef ECORE_XGESTURE if (!_gesture_available) - return EINA_FALSE; + return EINA_FALSE; LOGFN(__FILE__, __LINE__, __FUNCTION__); if (GestureGrabSuccess != XGestureGrabEvent(_ecore_x_disp, win, type, num_fingers, CurrentTime)) { return EINA_FALSE; } - + return EINA_TRUE; #else /* ifdef ECORE_XGESTURE */ return EINA_FALSE; @@ -117,14 +117,14 @@ ecore_x_gesture_event_ungrab(Ecore_X_Window win, Ecore_X_Gesture_Event_Mask mask; if (!_gesture_available) - return EINA_FALSE; + return EINA_FALSE; LOGFN(__FILE__, __LINE__, __FUNCTION__); if (GestureUngrabSuccess != XGestureUngrabEvent(_ecore_x_disp, win, type, num_fingers, CurrentTime)) { return EINA_FALSE; } - + return EINA_TRUE; #else /* ifdef ECORE_XGESTURE */ return EINA_FALSE; diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_icccm.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_icccm.c index 3899651..8d6ea1f 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_icccm.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_icccm.c @@ -21,10 +21,10 @@ EAPI void ecore_x_icccm_init(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); -} /* ecore_x_icccm_init */ +} EAPI void -ecore_x_icccm_state_set(Ecore_X_Window win, +ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state) { unsigned long c[2]; @@ -41,7 +41,7 @@ ecore_x_icccm_state_set(Ecore_X_Window win, XChangeProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_STATE, ECORE_X_ATOM_WM_STATE, 32, PropModeReplace, (unsigned char *)c, 2); -} /* ecore_x_icccm_state_set */ +} EAPI Ecore_X_Window_State_Hint ecore_x_icccm_state_get(Ecore_X_Window win) @@ -72,47 +72,47 @@ ecore_x_icccm_state_get(Ecore_X_Window win) XFree(prop_ret); return hint; -} /* ecore_x_icccm_state_get */ +} EAPI void ecore_x_icccm_delete_window_send(Ecore_X_Window win, - Ecore_X_Time t) + Ecore_X_Time t) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, ECORE_X_EVENT_MASK_NONE, ECORE_X_ATOM_WM_DELETE_WINDOW, t, 0, 0, 0); -} /* ecore_x_icccm_delete_window_send */ +} EAPI void ecore_x_icccm_take_focus_send(Ecore_X_Window win, - Ecore_X_Time t) + Ecore_X_Time t) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, ECORE_X_EVENT_MASK_NONE, ECORE_X_ATOM_WM_TAKE_FOCUS, t, 0, 0, 0); -} /* ecore_x_icccm_take_focus_send */ +} EAPI void ecore_x_icccm_save_yourself_send(Ecore_X_Window win, - Ecore_X_Time t) + Ecore_X_Time t) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, ECORE_X_EVENT_MASK_NONE, ECORE_X_ATOM_WM_SAVE_YOURSELF, t, 0, 0, 0); -} /* ecore_x_icccm_save_yourself_send */ +} EAPI void ecore_x_icccm_move_resize_send(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { XEvent ev; @@ -129,17 +129,17 @@ ecore_x_icccm_move_resize_send(Ecore_X_Window win, ev.xconfigure.above = None; ev.xconfigure.override_redirect = False; XSendEvent(_ecore_x_disp, win, False, StructureNotifyMask, &ev); -} /* ecore_x_icccm_move_resize_send */ +} EAPI void -ecore_x_icccm_hints_set(Ecore_X_Window win, - Eina_Bool accepts_focus, +ecore_x_icccm_hints_set(Ecore_X_Window win, + Eina_Bool accepts_focus, Ecore_X_Window_State_Hint initial_state, - Ecore_X_Pixmap icon_pixmap, - Ecore_X_Pixmap icon_mask, - Ecore_X_Window icon_window, - Ecore_X_Window window_group, - Eina_Bool is_urgent) + Ecore_X_Pixmap icon_pixmap, + Ecore_X_Pixmap icon_mask, + Ecore_X_Window icon_window, + Ecore_X_Window window_group, + Eina_Bool is_urgent) { XWMHints *hints; @@ -186,17 +186,17 @@ ecore_x_icccm_hints_set(Ecore_X_Window win, XSetWMHints(_ecore_x_disp, win, hints); XFree(hints); -} /* ecore_x_icccm_hints_set */ +} EAPI Eina_Bool -ecore_x_icccm_hints_get(Ecore_X_Window win, - Eina_Bool *accepts_focus, +ecore_x_icccm_hints_get(Ecore_X_Window win, + Eina_Bool *accepts_focus, Ecore_X_Window_State_Hint *initial_state, - Ecore_X_Pixmap *icon_pixmap, - Ecore_X_Pixmap *icon_mask, - Ecore_X_Window *icon_window, - Ecore_X_Window *window_group, - Eina_Bool *is_urgent) + Ecore_X_Pixmap *icon_pixmap, + Ecore_X_Pixmap *icon_mask, + Ecore_X_Window *icon_window, + Ecore_X_Window *window_group, + Eina_Bool *is_urgent) { XWMHints *hints; @@ -263,22 +263,22 @@ ecore_x_icccm_hints_get(Ecore_X_Window win, } return EINA_FALSE; -} /* ecore_x_icccm_hints_get */ +} EAPI void -ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, - Eina_Bool request_pos, +ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, + Eina_Bool request_pos, Ecore_X_Gravity gravity, - int min_w, - int min_h, - int max_w, - int max_h, - int base_w, - int base_h, - int step_x, - int step_y, - double min_aspect, - double max_aspect) + int min_w, + int min_h, + int max_w, + int max_h, + int base_w, + int base_h, + int step_x, + int step_y, + double min_aspect, + double max_aspect) { XSizeHints hint; long mask; @@ -335,22 +335,22 @@ ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, } XSetWMNormalHints(_ecore_x_disp, win, &hint); -} /* ecore_x_icccm_size_pos_hints_set */ +} EAPI Eina_Bool -ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, - Eina_Bool *request_pos, +ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, + Eina_Bool *request_pos, Ecore_X_Gravity *gravity, - int *min_w, - int *min_h, - int *max_w, - int *max_h, - int *base_w, - int *base_h, - int *step_x, - int *step_y, - double *min_aspect, - double *max_aspect) + int *min_w, + int *min_h, + int *max_w, + int *max_h, + int *base_w, + int *base_h, + int *step_x, + int *step_y, + double *min_aspect, + double *max_aspect) { XSizeHints hint; long mask; @@ -460,11 +460,11 @@ ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, *max_aspect = maxa; return EINA_TRUE; -} /* ecore_x_icccm_size_pos_hints_get */ +} EAPI void ecore_x_icccm_title_set(Ecore_X_Window win, - const char *t) + const char *t) { char *list[1]; XTextProperty xprop; @@ -500,7 +500,7 @@ ecore_x_icccm_title_set(Ecore_X_Window win, } free(list[0]); -} /* ecore_x_icccm_title_set */ +} EAPI char * ecore_x_icccm_title_get(Ecore_X_Window win) @@ -522,23 +522,23 @@ ecore_x_icccm_title_get(Ecore_X_Window win) t = strdup((char *)xprop.value); else { - /* convert to utf8 */ + /* convert to utf8 */ #ifdef X_HAVE_UTF8_STRING - ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop, - &list, &num); + ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop, + &list, &num); #else /* ifdef X_HAVE_UTF8_STRING */ - ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop, - &list, &num); + ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop, + &list, &num); #endif /* ifdef X_HAVE_UTF8_STRING */ - if ((ret == XLocaleNotSupported) || - (ret == XNoMemory) || (ret == XConverterNotFound)) - t = strdup((char *)xprop.value); - else if ((ret >= Success) && (num > 0)) - t = strdup(list[0]); + if ((ret == XLocaleNotSupported) || + (ret == XNoMemory) || (ret == XConverterNotFound)) + t = strdup((char *)xprop.value); + else if ((ret >= Success) && (num > 0)) + t = strdup(list[0]); - if (list) - XFreeStringList(list); + if (list) + XFreeStringList(list); } if (xprop.value) @@ -549,7 +549,7 @@ ecore_x_icccm_title_get(Ecore_X_Window win) } return NULL; -} /* ecore_x_icccm_title_get */ +} /** * Set protocol atoms explicitly @@ -559,15 +559,15 @@ ecore_x_icccm_title_get(Ecore_X_Window win) */ EAPI void ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win, - Ecore_X_Atom *protos, - int num) + Ecore_X_Atom *protos, + int num) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (num > 0) XSetWMProtocols(_ecore_x_disp, win, (Atom *)(protos), num); else XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_PROTOCOLS); -} /* ecore_x_icccm_protocol_atoms_set */ +} /** * Set or unset a wm protocol property. @@ -576,9 +576,9 @@ ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win, * @param on On/Off */ EAPI void -ecore_x_icccm_protocol_set(Ecore_X_Window win, +ecore_x_icccm_protocol_set(Ecore_X_Window win, Ecore_X_WM_Protocol protocol, - Eina_Bool on) + Eina_Bool on) { Atom *protos = NULL; Atom proto; @@ -653,7 +653,7 @@ ecore_x_icccm_protocol_set(Ecore_X_Window win, leave: if (protos) XFree(protos); -} /* ecore_x_icccm_protocol_set */ +} /** * Determines whether a protocol is set for a window. @@ -662,7 +662,7 @@ leave: * @return 1 if the protocol is set, else 0. */ EAPI Eina_Bool -ecore_x_icccm_protocol_isset(Ecore_X_Window win, +ecore_x_icccm_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol) { Atom proto, *protos = NULL; @@ -690,7 +690,7 @@ ecore_x_icccm_protocol_isset(Ecore_X_Window win, XFree(protos); return ret; -} /* ecore_x_icccm_protocol_isset */ +} /** * Set a window name & class. @@ -702,8 +702,8 @@ ecore_x_icccm_protocol_isset(Ecore_X_Window win, */ EAPI void ecore_x_icccm_name_class_set(Ecore_X_Window win, - const char *n, - const char *c) + const char *n, + const char *c) { XClassHint *xch; @@ -716,7 +716,7 @@ ecore_x_icccm_name_class_set(Ecore_X_Window win, xch->res_class = (char *)c; XSetClassHint(_ecore_x_disp, win, xch); XFree(xch); -} /* ecore_x_icccm_name_class_set */ +} /** * Get a window name & class. @@ -728,8 +728,8 @@ ecore_x_icccm_name_class_set(Ecore_X_Window win, */ EAPI void ecore_x_icccm_name_class_get(Ecore_X_Window win, - char **n, - char **c) + char **n, + char **c) { XClassHint xch; @@ -755,7 +755,7 @@ ecore_x_icccm_name_class_get(Ecore_X_Window win, XFree(xch.res_name); XFree(xch.res_class); } -} /* ecore_x_icccm_name_class_get */ +} /** * Get a window client machine string. @@ -772,7 +772,7 @@ ecore_x_icccm_client_machine_get(Ecore_X_Window win) LOGFN(__FILE__, __LINE__, __FUNCTION__); name = ecore_x_window_prop_string_get(win, ECORE_X_ATOM_WM_CLIENT_MACHINE); return name; -} /* ecore_x_icccm_client_machine_get */ +} /** * Sets the WM_COMMAND property for @a win. @@ -783,12 +783,12 @@ ecore_x_icccm_client_machine_get(Ecore_X_Window win) */ EAPI void ecore_x_icccm_command_set(Ecore_X_Window win, - int argc, - char **argv) + int argc, + char **argv) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XSetCommand(_ecore_x_disp, win, argv, argc); -} /* ecore_x_icccm_command_set */ +} /** * Get the WM_COMMAND property for @a win. @@ -801,8 +801,8 @@ ecore_x_icccm_command_set(Ecore_X_Window win, */ EAPI void ecore_x_icccm_command_get(Ecore_X_Window win, - int *argc, - char ***argv) + int *argc, + char ***argv) { int i, c; char **v; @@ -850,7 +850,7 @@ ecore_x_icccm_command_get(Ecore_X_Window win, } XFreeStringList(v); -} /* ecore_x_icccm_command_get */ +} /** * Set a window icon name. @@ -861,7 +861,7 @@ ecore_x_icccm_command_get(Ecore_X_Window win, */ EAPI void ecore_x_icccm_icon_name_set(Ecore_X_Window win, - const char *t) + const char *t) { char *list[1]; XTextProperty xprop; @@ -892,7 +892,7 @@ ecore_x_icccm_icon_name_set(Ecore_X_Window win, } free(list[0]); -} /* ecore_x_icccm_icon_name_set */ +} /** * Get a window icon name. @@ -921,26 +921,26 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win) t = strdup((char *)xprop.value); else { - /* convert to utf8 */ + /* convert to utf8 */ #ifdef X_HAVE_UTF8_STRING - ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop, - &list, &num); + ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop, + &list, &num); #else /* ifdef X_HAVE_UTF8_STRING */ - ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop, - &list, &num); + ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop, + &list, &num); #endif /* ifdef X_HAVE_UTF8_STRING */ - if ((ret == XLocaleNotSupported) || - (ret == XNoMemory) || (ret == XConverterNotFound)) - t = strdup((char *)xprop.value); - else if (ret >= Success) - { - if ((num >= 1) && (list)) - t = strdup(list[0]); - - if (list) - XFreeStringList(list); - } + if ((ret == XLocaleNotSupported) || + (ret == XNoMemory) || (ret == XConverterNotFound)) + t = strdup((char *)xprop.value); + else if (ret >= Success) + { + if ((num >= 1) && (list)) + t = strdup(list[0]); + + if (list) + XFreeStringList(list); + } } if (xprop.value) @@ -951,7 +951,7 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win) } return NULL; -} /* ecore_x_icccm_icon_name_get */ +} /** * Add a subwindow to the list of windows that need a different colormap installed. @@ -1014,7 +1014,7 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS, XA_WINDOW, 32, data, num); free(newset); -} /* ecore_x_icccm_colormap_window_set */ +} /** * Remove a window from the list of colormap windows. @@ -1079,7 +1079,7 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, if (old_data) XFree(old_data); -} /* ecore_x_icccm_colormap_window_unset */ +} /** * Specify that a window is transient for another top-level window and should be handled accordingly. @@ -1092,18 +1092,18 @@ ecore_x_icccm_transient_for_set(Ecore_X_Window win, { LOGFN(__FILE__, __LINE__, __FUNCTION__); XSetTransientForHint(_ecore_x_disp, win, forwin); -} /* ecore_x_icccm_transient_for_set */ +} /** * Remove the transient_for setting from a window. - * @param The window + * @param win The window */ EAPI void ecore_x_icccm_transient_for_unset(Ecore_X_Window win) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_TRANSIENT_FOR); -} /* ecore_x_icccm_transient_for_unset */ +} /** * Get the window this window is transient for, if any. @@ -1120,7 +1120,7 @@ ecore_x_icccm_transient_for_get(Ecore_X_Window win) return (Ecore_X_Window)forwin; else return 0; -} /* ecore_x_icccm_transient_for_get */ +} /** * Set the window role hint. @@ -1129,12 +1129,12 @@ ecore_x_icccm_transient_for_get(Ecore_X_Window win) */ EAPI void ecore_x_icccm_window_role_set(Ecore_X_Window win, - const char *role) + const char *role) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_string_set(win, ECORE_X_ATOM_WM_WINDOW_ROLE, (char *)role); -} /* ecore_x_icccm_window_role_set */ +} /** * Get the window role. @@ -1146,7 +1146,7 @@ ecore_x_icccm_window_role_get(Ecore_X_Window win) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return ecore_x_window_prop_string_get(win, ECORE_X_ATOM_WM_WINDOW_ROLE); -} /* ecore_x_icccm_window_role_get */ +} /** * Set the window's client leader. @@ -1163,7 +1163,7 @@ ecore_x_icccm_client_leader_set(Ecore_X_Window win, LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_window_set(win, ECORE_X_ATOM_WM_CLIENT_LEADER, &l, 1); -} /* ecore_x_icccm_client_leader_set */ +} /** * Get the window's client leader. @@ -1180,7 +1180,7 @@ ecore_x_icccm_client_leader_get(Ecore_X_Window win) return l; return 0; -} /* ecore_x_icccm_client_leader_get */ +} EAPI void ecore_x_icccm_iconic_request_send(Ecore_X_Window win, @@ -1206,7 +1206,7 @@ ecore_x_icccm_iconic_request_send(Ecore_X_Window win, XSendEvent(_ecore_x_disp, root, False, SubstructureNotifyMask | SubstructureRedirectMask, &xev); -} /* ecore_x_icccm_iconic_request_send */ +} /* FIXME: there are older E hints, gnome hints and mwm hints and new netwm */ /* hints. each should go in their own file/section so we know which */ diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_image.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_image.c index 2de5319..b8e720c 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_image.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_image.c @@ -1,26 +1,28 @@ #ifdef HAVE_CONFIG_H # include -#endif /* ifdef HAVE_CONFIG_H */ +#endif + +#include +#include +#include +#include #include "ecore_x_private.h" #include "Ecore_X.h" #include #include -#include -#include -#include static int _ecore_x_image_shm_can = -1; static int _ecore_x_image_err = 0; static int -_ecore_x_image_error_handler(Display *d __UNUSED__, +_ecore_x_image_error_handler(Display *d __UNUSED__, XErrorEvent *ev __UNUSED__) { _ecore_x_image_err = 1; return 0; -} /* _ecore_x_image_error_handler */ +} static void _ecore_x_image_shm_check(void) @@ -90,7 +92,7 @@ _ecore_x_image_shm_check(void) shmctl(shminfo.shmid, IPC_RMID, 0); _ecore_x_image_shm_can = 1; -} /* _ecore_x_image_shm_check */ +} struct _Ecore_X_Image { @@ -105,10 +107,10 @@ struct _Ecore_X_Image }; EAPI Ecore_X_Image * -ecore_x_image_new(int w, - int h, +ecore_x_image_new(int w, + int h, Ecore_X_Visual vis, - int depth) + int depth) { Ecore_X_Image *im; @@ -124,7 +126,7 @@ ecore_x_image_new(int w, _ecore_x_image_shm_check(); im->shm = _ecore_x_image_shm_can; return im; -} /* ecore_x_image_new */ +} EAPI void ecore_x_image_free(Ecore_X_Image *im) @@ -148,7 +150,7 @@ ecore_x_image_free(Ecore_X_Image *im) } free(im); -} /* ecore_x_image_free */ +} static void _ecore_x_image_shm_create(Ecore_X_Image *im) @@ -192,17 +194,17 @@ _ecore_x_image_shm_create(Ecore_X_Image *im) im->bpp = 2; else im->bpp = 4; -} /* _ecore_x_image_shm_create */ +} EAPI Eina_Bool -ecore_x_image_get(Ecore_X_Image *im, +ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw, - int x, - int y, - int sx, - int sy, - int w, - int h) + int x, + int y, + int sx, + int sy, + int w, + int h) { Eina_Bool ret = EINA_TRUE; XErrorHandler ph; @@ -278,18 +280,18 @@ ecore_x_image_get(Ecore_X_Image *im, } return ret; -} /* ecore_x_image_get */ +} EAPI void -ecore_x_image_put(Ecore_X_Image *im, +ecore_x_image_put(Ecore_X_Image *im, Ecore_X_Drawable draw, - Ecore_X_GC gc, - int x, - int y, - int sx, - int sy, - int w, - int h) + Ecore_X_GC gc, + int x, + int y, + int sx, + int sy, + int w, + int h) { Ecore_X_GC tgc = 0; @@ -306,13 +308,13 @@ ecore_x_image_put(Ecore_X_Image *im, if (im->xim) XShmPutImage(_ecore_x_disp, draw, gc, im->xim, sx, sy, x, y, w, h, False); if (tgc) ecore_x_gc_free(tgc); -} /* ecore_x_image_put */ +} EAPI void * ecore_x_image_data_get(Ecore_X_Image *im, - int *bpl, - int *rows, - int *bpp) + int *bpl, + int *rows, + int *bpp) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!im->xim) _ecore_x_image_shm_create(im); @@ -321,7 +323,7 @@ ecore_x_image_data_get(Ecore_X_Image *im, if (rows) *rows = im->rows; if (bpp) *bpp = im->bpp; return im->data; -} /* ecore_x_image_data_get */ +} EAPI Eina_Bool ecore_x_image_is_argb32_get(Ecore_X_Image *im) @@ -345,19 +347,19 @@ ecore_x_image_is_argb32_get(Ecore_X_Image *im) } EAPI Eina_Bool -ecore_x_image_to_argb_convert(void *src, - int sbpp, - int sbpl, +ecore_x_image_to_argb_convert(void *src, + int sbpp, + int sbpl, Ecore_X_Colormap c, - Ecore_X_Visual v, - int x, - int y, - int w, - int h, - unsigned int *dst, - int dbpl, - int dx, - int dy) + Ecore_X_Visual v, + int x, + int y, + int w, + int h, + unsigned int *dst, + int dbpl, + int dx, + int dy) { Visual *vis = v; XColor *cols = NULL; @@ -411,9 +413,9 @@ ecore_x_image_to_argb_convert(void *src, else if ((vis->class == TrueColor) || (vis->class == DirectColor)) { - if ((vis->red_mask == 0x00ff0000) && - (vis->green_mask == 0x0000ff00) && - (vis->blue_mask == 0x000000ff)) + if ((vis->red_mask == 0x00ff0000) && + (vis->green_mask == 0x0000ff00) && + (vis->blue_mask == 0x000000ff)) mode = argbx888; else if ((vis->red_mask == 0x000000ff) && (vis->green_mask == 0x0000ff00) && diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_mwm.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_mwm.c index 7459a8b..7812cc2 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_mwm.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_mwm.c @@ -32,8 +32,8 @@ typedef struct _mwmhints MWMHints; EAPI Eina_Bool -ecore_x_mwm_hints_get(Ecore_X_Window win, - Ecore_X_MWM_Hint_Func *fhint, +ecore_x_mwm_hints_get(Ecore_X_Window win, + Ecore_X_MWM_Hint_Func *fhint, Ecore_X_MWM_Hint_Decor *dhint, Ecore_X_MWM_Hint_Input *ihint) { @@ -86,11 +86,11 @@ ecore_x_mwm_hints_get(Ecore_X_Window win, } return ret; -} /* ecore_x_mwm_hints_get */ +} EAPI void ecore_x_mwm_borderless_set(Ecore_X_Window win, - Eina_Bool borderless) + Eina_Bool borderless) { unsigned int data[5] = {0, 0, 0, 0, 0}; @@ -102,5 +102,5 @@ ecore_x_mwm_borderless_set(Ecore_X_Window win, ECORE_X_ATOM_MOTIF_WM_HINTS, ECORE_X_ATOM_MOTIF_WM_HINTS, 32, (void *)data, 5); -} /* ecore_x_mwm_borderless_set */ +} 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 1a6fc9a..9fc428a 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 @@ -4,8 +4,9 @@ #ifdef HAVE_CONFIG_H # include -#endif /* ifdef HAVE_CONFIG_H */ +#endif +#include #include #include @@ -39,17 +40,17 @@ struct _Ecore_X_Startup_Info int silent; }; -static void _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win, - Ecore_X_Atom atom, - const char *str); +static void _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win, + Ecore_X_Atom atom, + const char *str); static char *_ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, - Ecore_X_Atom atom); + Ecore_X_Atom atom); #if 0 /* Unused */ -static int _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info); -static int _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, - char *data); +static int _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info); +static int _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, + char *data); #endif /* if 0 */ -static void _ecore_x_netwm_startup_info_free(void *data); +static void _ecore_x_netwm_startup_info_free(void *data); /* * Convenience macros @@ -76,7 +77,7 @@ ecore_x_netwm_init(void) LOGFN(__FILE__, __LINE__, __FUNCTION__); startup_info = eina_hash_string_superfast_new( _ecore_x_netwm_startup_info_free); -} /* ecore_x_netwm_init */ +} EAPI void ecore_x_netwm_shutdown(void) @@ -86,7 +87,7 @@ ecore_x_netwm_shutdown(void) eina_hash_free(startup_info); startup_info = NULL; -} /* ecore_x_netwm_shutdown */ +} /* * WM identification @@ -94,7 +95,7 @@ ecore_x_netwm_shutdown(void) EAPI void ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window check, - const char *wm_name) + const char *wm_name) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_window_set(root, @@ -112,27 +113,27 @@ ecore_x_netwm_wm_identify(Ecore_X_Window root, _ecore_x_window_prop_string_utf8_set(root, ECORE_X_ATOM_NET_WM_NAME, wm_name); -} /* ecore_x_netwm_wm_identify */ +} /* * Set supported atoms */ EAPI void ecore_x_netwm_supported_set(Ecore_X_Window root, - Ecore_X_Atom *supported, - int num) + Ecore_X_Atom *supported, + int num) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_atom_set(root, ECORE_X_ATOM_NET_SUPPORTED, supported, num); -} /* ecore_x_netwm_supported_set */ +} EAPI Eina_Bool ecore_x_netwm_supported_get(Ecore_X_Window root, Ecore_X_Atom **supported, - int *num) + int *num) { int num_ret; @@ -152,36 +153,36 @@ ecore_x_netwm_supported_get(Ecore_X_Window root, *num = num_ret; return EINA_TRUE; -} /* ecore_x_netwm_supported_get */ +} /* * Desktop configuration and status */ EAPI void ecore_x_netwm_desk_count_set(Ecore_X_Window root, - unsigned int n_desks) + unsigned int n_desks) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS, &n_desks, 1); -} /* ecore_x_netwm_desk_count_set */ +} EAPI void -ecore_x_netwm_desk_roots_set(Ecore_X_Window root, +ecore_x_netwm_desk_roots_set(Ecore_X_Window root, Ecore_X_Window *vroots, - unsigned int n_desks) + unsigned int n_desks) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_VIRTUAL_ROOTS, vroots, n_desks); -} /* ecore_x_netwm_desk_roots_set */ +} EAPI void ecore_x_netwm_desk_names_set(Ecore_X_Window root, - const char **names, - unsigned int n_desks) + const char **names, + unsigned int n_desks) { char ss[32], *buf, *t; const char *s; @@ -198,8 +199,8 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root, if (!s) { /* Default to "Desk-" */ - sprintf(ss, "Desk-%d", i); - s = ss; + sprintf(ss, "Desk-%d", i); + s = ss; } l = strlen(s) + 1; @@ -215,12 +216,12 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root, _ATOM_SET_UTF8_STRING_LIST(root, ECORE_X_ATOM_NET_DESKTOP_NAMES, buf, len); free(buf); -} /* ecore_x_netwm_desk_names_set */ +} EAPI void ecore_x_netwm_desk_size_set(Ecore_X_Window root, - unsigned int width, - unsigned int height) + unsigned int width, + unsigned int height) { unsigned int size[2]; @@ -229,24 +230,24 @@ ecore_x_netwm_desk_size_set(Ecore_X_Window root, size[1] = height; ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_GEOMETRY, size, 2); -} /* ecore_x_netwm_desk_size_set */ +} EAPI void ecore_x_netwm_desk_viewports_set(Ecore_X_Window root, - unsigned int *origins, - unsigned int n_desks) + unsigned int *origins, + unsigned int n_desks) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_VIEWPORT, origins, 2 * n_desks); -} /* ecore_x_netwm_desk_viewports_set */ +} EAPI void ecore_x_netwm_desk_layout_set(Ecore_X_Window root, - int orientation, - int columns, - int rows, - int starting_corner) + int orientation, + int columns, + int rows, + int starting_corner) { unsigned int layout[4]; @@ -257,26 +258,26 @@ ecore_x_netwm_desk_layout_set(Ecore_X_Window root, layout[3] = starting_corner; ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_LAYOUT, layout, 4); -} /* ecore_x_netwm_desk_layout_set */ +} EAPI void ecore_x_netwm_desk_workareas_set(Ecore_X_Window root, - unsigned int *areas, - unsigned int n_desks) + unsigned int *areas, + unsigned int n_desks) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_WORKAREA, areas, 4 * n_desks); -} /* ecore_x_netwm_desk_workareas_set */ +} EAPI unsigned int * ecore_x_netwm_desk_workareas_get(Ecore_X_Window root, unsigned int *n_desks) { int ret; unsigned int *areas = NULL; - + if (!root) root = DefaultRootWindow(_ecore_x_disp); - + ret = ecore_x_window_prop_card32_list_get(root, ECORE_X_ATOM_NET_WORKAREA, &areas); if (!areas) @@ -290,16 +291,16 @@ ecore_x_netwm_desk_workareas_get(Ecore_X_Window root, unsigned int *n_desks) EAPI void ecore_x_netwm_desk_current_set(Ecore_X_Window root, - unsigned int desk) + unsigned int desk) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_CURRENT_DESKTOP, &desk, 1); -} /* ecore_x_netwm_desk_current_set */ +} EAPI void ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, - Eina_Bool on) + Eina_Bool on) { unsigned int val; @@ -307,7 +308,7 @@ ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, val = (on) ? 1 : 0; ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_SHOWING_DESKTOP, &val, 1); -} /* ecore_x_netwm_showing_desktop_set */ +} /* * Client status @@ -315,25 +316,25 @@ ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, /* Mapping order */ EAPI void -ecore_x_netwm_client_list_set(Ecore_X_Window root, +ecore_x_netwm_client_list_set(Ecore_X_Window root, Ecore_X_Window *p_clients, - unsigned int n_clients) + unsigned int n_clients) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST, p_clients, n_clients); -} /* ecore_x_netwm_client_list_set */ +} /* Stacking order */ EAPI void -ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root, +ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root, Ecore_X_Window *p_clients, - unsigned int n_clients) + unsigned int n_clients) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST_STACKING, p_clients, n_clients); -} /* ecore_x_netwm_client_list_stacking_set */ +} EAPI void ecore_x_netwm_client_active_set(Ecore_X_Window root, @@ -342,12 +343,12 @@ ecore_x_netwm_client_active_set(Ecore_X_Window root, LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_ACTIVE_WINDOW, &win, 1); -} /* ecore_x_netwm_client_active_set */ +} EAPI void ecore_x_netwm_client_active_request(Ecore_X_Window root, Ecore_X_Window win, - int type, + int type, Ecore_X_Window current_win) { XEvent xev; @@ -369,19 +370,19 @@ ecore_x_netwm_client_active_request(Ecore_X_Window root, XSendEvent(_ecore_x_disp, root, False, SubstructureRedirectMask | SubstructureNotifyMask, &xev); -} /* ecore_x_netwm_client_active_request */ +} EAPI void ecore_x_netwm_name_set(Ecore_X_Window win, - const char *name) + const char *name) { LOGFN(__FILE__, __LINE__, __FUNCTION__); _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_NAME, name); -} /* ecore_x_netwm_name_set */ +} EAPI int ecore_x_netwm_name_get(Ecore_X_Window win, - char **name) + char **name) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (name) @@ -389,19 +390,19 @@ ecore_x_netwm_name_get(Ecore_X_Window win, ECORE_X_ATOM_NET_WM_NAME); return 1; -} /* ecore_x_netwm_name_get */ +} EAPI void ecore_x_netwm_startup_id_set(Ecore_X_Window win, - const char *id) + const char *id) { LOGFN(__FILE__, __LINE__, __FUNCTION__); _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_STARTUP_ID, id); -} /* ecore_x_netwm_startup_id_set */ +} EAPI int ecore_x_netwm_startup_id_get(Ecore_X_Window win, - char **id) + char **id) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (id) @@ -409,20 +410,20 @@ ecore_x_netwm_startup_id_get(Ecore_X_Window win, ECORE_X_ATOM_NET_STARTUP_ID); return 1; -} /* ecore_x_netwm_startup_id_get */ +} EAPI void ecore_x_netwm_visible_name_set(Ecore_X_Window win, - const char *name) + const char *name) { LOGFN(__FILE__, __LINE__, __FUNCTION__); _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_NAME, name); -} /* ecore_x_netwm_visible_name_set */ +} EAPI int ecore_x_netwm_visible_name_get(Ecore_X_Window win, - char **name) + char **name) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (name) @@ -431,20 +432,20 @@ ecore_x_netwm_visible_name_get(Ecore_X_Window win, ECORE_X_ATOM_NET_WM_VISIBLE_NAME); return 1; -} /* ecore_x_netwm_visible_name_get */ +} EAPI void ecore_x_netwm_icon_name_set(Ecore_X_Window win, - const char *name) + const char *name) { LOGFN(__FILE__, __LINE__, __FUNCTION__); _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME, name); -} /* ecore_x_netwm_icon_name_set */ +} EAPI int ecore_x_netwm_icon_name_get(Ecore_X_Window win, - char **name) + char **name) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (name) @@ -453,21 +454,21 @@ ecore_x_netwm_icon_name_get(Ecore_X_Window win, ECORE_X_ATOM_NET_WM_ICON_NAME); return 1; -} /* ecore_x_netwm_icon_name_get */ +} EAPI void ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, - const char *name) + const char *name) { LOGFN(__FILE__, __LINE__, __FUNCTION__); _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME, name); -} /* ecore_x_netwm_visible_icon_name_set */ +} EAPI int ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, - char **name) + char **name) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (name) @@ -476,19 +477,19 @@ ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME); return 1; -} /* ecore_x_netwm_visible_icon_name_get */ +} EAPI void ecore_x_netwm_desktop_set(Ecore_X_Window win, - unsigned int desk) + unsigned int desk) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_DESKTOP, &desk, 1); -} /* ecore_x_netwm_desktop_set */ +} EAPI Eina_Bool ecore_x_netwm_desktop_get(Ecore_X_Window win, - unsigned int *desk) + unsigned int *desk) { int ret; unsigned int tmp; @@ -501,17 +502,17 @@ ecore_x_netwm_desktop_get(Ecore_X_Window win, *desk = tmp; return ret == 1 ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_netwm_desktop_get */ +} /* * _NET_WM_STRUT is deprecated */ EAPI void ecore_x_netwm_strut_set(Ecore_X_Window win, - int left, - int right, - int top, - int bottom) + int left, + int right, + int top, + int bottom) { unsigned int strut[4]; @@ -521,17 +522,17 @@ ecore_x_netwm_strut_set(Ecore_X_Window win, strut[2] = top; strut[3] = bottom; ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_STRUT, strut, 4); -} /* ecore_x_netwm_strut_set */ +} /* * _NET_WM_STRUT is deprecated */ EAPI Eina_Bool ecore_x_netwm_strut_get(Ecore_X_Window win, - int *left, - int *right, - int *top, - int *bottom) + int *left, + int *right, + int *top, + int *bottom) { int ret = 0; unsigned int strut[4]; @@ -557,22 +558,22 @@ ecore_x_netwm_strut_get(Ecore_X_Window win, *bottom = strut[3]; return EINA_TRUE; -} /* ecore_x_netwm_strut_get */ +} EAPI void ecore_x_netwm_strut_partial_set(Ecore_X_Window win, - int left, - int right, - int top, - int bottom, - int left_start_y, - int left_end_y, - int right_start_y, - int right_end_y, - int top_start_x, - int top_end_x, - int bottom_start_x, - int bottom_end_x) + int left, + int right, + int top, + int bottom, + int left_start_y, + int left_end_y, + int right_start_y, + int right_end_y, + int top_start_x, + int top_end_x, + int bottom_start_x, + int bottom_end_x) { unsigned int strut[12]; @@ -593,22 +594,22 @@ ecore_x_netwm_strut_partial_set(Ecore_X_Window win, ECORE_X_ATOM_NET_WM_STRUT_PARTIAL, strut, 12); -} /* ecore_x_netwm_strut_partial_set */ +} EAPI Eina_Bool ecore_x_netwm_strut_partial_get(Ecore_X_Window win, - int *left, - int *right, - int *top, - int *bottom, - int *left_start_y, - int *left_end_y, - int *right_start_y, - int *right_end_y, - int *top_start_x, - int *top_end_x, - int *bottom_start_x, - int *bottom_end_x) + int *left, + int *right, + int *top, + int *bottom, + int *left_start_y, + int *left_end_y, + int *right_start_y, + int *right_end_y, + int *top_start_x, + int *top_end_x, + int *bottom_start_x, + int *bottom_end_x) { int ret = 0; unsigned int strut[12]; @@ -658,12 +659,12 @@ ecore_x_netwm_strut_partial_get(Ecore_X_Window win, *bottom_end_x = strut[11]; return EINA_TRUE; -} /* ecore_x_netwm_strut_partial_get */ +} EAPI Eina_Bool ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, - int *num) + int *num) { unsigned int *data, *p; unsigned int *src; @@ -767,14 +768,14 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, free(data); return EINA_TRUE; -} /* ecore_x_netwm_icons_get */ +} EAPI void ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, - int x, - int y, - int width, - int height) + int x, + int y, + int width, + int height) { unsigned int geometry[4]; @@ -787,14 +788,14 @@ ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, ECORE_X_ATOM_NET_WM_ICON_GEOMETRY, geometry, 4); -} /* ecore_x_netwm_icon_geometry_set */ +} EAPI Eina_Bool ecore_x_netwm_icon_geometry_get(Ecore_X_Window win, - int *x, - int *y, - int *width, - int *height) + int *x, + int *y, + int *width, + int *height) { int ret; unsigned int geometry[4]; @@ -820,11 +821,11 @@ ecore_x_netwm_icon_geometry_get(Ecore_X_Window win, *height = geometry[3]; return EINA_TRUE; -} /* ecore_x_netwm_icon_geometry_get */ +} EAPI void ecore_x_netwm_pid_set(Ecore_X_Window win, - int pid) + int pid) { unsigned int tmp; @@ -832,11 +833,11 @@ ecore_x_netwm_pid_set(Ecore_X_Window win, tmp = pid; ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_PID, &tmp, 1); -} /* ecore_x_netwm_pid_set */ +} EAPI Eina_Bool ecore_x_netwm_pid_get(Ecore_X_Window win, - int *pid) + int *pid) { int ret; unsigned int tmp; @@ -848,7 +849,7 @@ ecore_x_netwm_pid_get(Ecore_X_Window win, *pid = tmp; return ret == 1 ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_netwm_pid_get */ +} EAPI void ecore_x_netwm_handled_icons_set(Ecore_X_Window win) @@ -856,7 +857,7 @@ ecore_x_netwm_handled_icons_set(Ecore_X_Window win) LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS, NULL, 0); -} /* ecore_x_netwm_handled_icons_set */ +} EAPI Eina_Bool ecore_x_netwm_handled_icons_get(Ecore_X_Window win) @@ -866,20 +867,20 @@ ecore_x_netwm_handled_icons_get(Ecore_X_Window win) ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS, NULL, 0); return ret == 0 ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_netwm_handled_icons_get */ +} EAPI void ecore_x_netwm_user_time_set(Ecore_X_Window win, - unsigned int tim) + unsigned int tim) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_USER_TIME, &tim, 1); -} /* ecore_x_netwm_user_time_set */ +} EAPI Eina_Bool ecore_x_netwm_user_time_get(Ecore_X_Window win, - unsigned int *tim) + unsigned int *tim) { int ret; unsigned int tmp; @@ -891,7 +892,7 @@ ecore_x_netwm_user_time_get(Ecore_X_Window win, *tim = tmp; return ret == 1 ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_netwm_user_time_get */ +} Ecore_X_Window_State _ecore_x_netwm_state_get(Ecore_X_Atom a) @@ -922,12 +923,12 @@ _ecore_x_netwm_state_get(Ecore_X_Atom a) return ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION; else return ECORE_X_WINDOW_STATE_UNKNOWN; -} /* _ecore_x_netwm_state_get */ +} static Ecore_X_Atom _ecore_x_netwm_state_atom_get(Ecore_X_Window_State s) { - switch(s) + switch (s) { case ECORE_X_WINDOW_STATE_MODAL: return ECORE_X_ATOM_NET_WM_STATE_MODAL; @@ -967,13 +968,13 @@ _ecore_x_netwm_state_atom_get(Ecore_X_Window_State s) default: return 0; - } /* switch */ -} /* _ecore_x_netwm_state_atom_get */ + } +} EAPI void -ecore_x_netwm_window_state_set(Ecore_X_Window win, +ecore_x_netwm_window_state_set(Ecore_X_Window win, Ecore_X_Window_State *state, - unsigned int num) + unsigned int num) { Ecore_X_Atom *set; unsigned int i; @@ -995,12 +996,12 @@ ecore_x_netwm_window_state_set(Ecore_X_Window win, ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_STATE, set, num); free(set); -} /* ecore_x_netwm_window_state_set */ +} EAPI Eina_Bool -ecore_x_netwm_window_state_get(Ecore_X_Window win, +ecore_x_netwm_window_state_get(Ecore_X_Window win, Ecore_X_Window_State **state, - unsigned int *num) + unsigned int *num) { int num_ret, i; Ecore_X_Atom *atoms; @@ -1030,7 +1031,7 @@ ecore_x_netwm_window_state_get(Ecore_X_Window win, free(atoms); return EINA_TRUE; -} /* ecore_x_netwm_window_state_get */ +} static Ecore_X_Window_Type _ecore_x_netwm_window_type_type_get(Ecore_X_Atom atom) @@ -1065,7 +1066,7 @@ _ecore_x_netwm_window_type_type_get(Ecore_X_Atom atom) return ECORE_X_WINDOW_TYPE_DND; else return ECORE_X_WINDOW_TYPE_UNKNOWN; -} /* _ecore_x_netwm_window_type_type_get */ +} static Ecore_X_Atom _ecore_x_netwm_window_type_atom_get(Ecore_X_Window_Type type) @@ -1116,15 +1117,15 @@ _ecore_x_netwm_window_type_atom_get(Ecore_X_Window_Type type) default: return 0; - } /* switch */ -} /* _ecore_x_netwm_window_type_atom_get */ + } +} /* * FIXME: We should set WM_TRANSIENT_FOR if type is ECORE_X_WINDOW_TYPE_TOOLBAR * , ECORE_X_WINDOW_TYPE_MENU or ECORE_X_WINDOW_TYPE_DIALOG */ EAPI void -ecore_x_netwm_window_type_set(Ecore_X_Window win, +ecore_x_netwm_window_type_set(Ecore_X_Window win, Ecore_X_Window_Type type) { Ecore_X_Atom atom; @@ -1133,11 +1134,11 @@ ecore_x_netwm_window_type_set(Ecore_X_Window win, atom = _ecore_x_netwm_window_type_atom_get(type); ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE, &atom, 1); -} /* ecore_x_netwm_window_type_set */ +} /* FIXME: Maybe return 0 on some conditions? */ EAPI Eina_Bool -ecore_x_netwm_window_type_get(Ecore_X_Window win, +ecore_x_netwm_window_type_get(Ecore_X_Window win, Ecore_X_Window_Type *type) { int num; @@ -1158,10 +1159,10 @@ ecore_x_netwm_window_type_get(Ecore_X_Window win, return EINA_TRUE; return EINA_FALSE; -} /* ecore_x_netwm_window_type_get */ +} EAPI int -ecore_x_netwm_window_types_get(Ecore_X_Window win, +ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types) { int num, i; @@ -1196,7 +1197,7 @@ ecore_x_netwm_window_types_get(Ecore_X_Window win, free(atoms2); return num; -} /* ecore_x_netwm_window_types_get */ +} static Ecore_X_Atom _ecore_x_netwm_action_atom_get(Ecore_X_Action action) @@ -1241,8 +1242,8 @@ _ecore_x_netwm_action_atom_get(Ecore_X_Action action) default: return 0; - } /* switch */ -} /* _ecore_x_netwm_action_atom_get */ + } +} /* FIXME: Get complete list */ EAPI Eina_Bool @@ -1272,13 +1273,13 @@ ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, free(atoms); return ret; -} /* ecore_x_netwm_allowed_action_isset */ +} /* FIXME: Set complete list */ EAPI void -ecore_x_netwm_allowed_action_set(Ecore_X_Window win, +ecore_x_netwm_allowed_action_set(Ecore_X_Window win, Ecore_X_Action *action, - unsigned int num) + unsigned int num) { Ecore_X_Atom *set; unsigned int i; @@ -1304,12 +1305,12 @@ ecore_x_netwm_allowed_action_set(Ecore_X_Window win, num); free(set); -} /* ecore_x_netwm_allowed_action_set */ +} EAPI Eina_Bool -ecore_x_netwm_allowed_action_get(Ecore_X_Window win, +ecore_x_netwm_allowed_action_get(Ecore_X_Window win, Ecore_X_Action **action, - unsigned int *num) + unsigned int *num) { int num_ret, i; Ecore_X_Atom *atoms; @@ -1341,20 +1342,20 @@ ecore_x_netwm_allowed_action_get(Ecore_X_Window win, free(atoms); return EINA_TRUE; -} /* ecore_x_netwm_allowed_action_get */ +} EAPI void ecore_x_netwm_opacity_set(Ecore_X_Window win, - unsigned int opacity) + unsigned int opacity) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, &opacity, 1); -} /* ecore_x_netwm_opacity_set */ +} EAPI Eina_Bool ecore_x_netwm_opacity_get(Ecore_X_Window win, - unsigned int *opacity) + unsigned int *opacity) { int ret; unsigned int tmp; @@ -1366,14 +1367,14 @@ ecore_x_netwm_opacity_get(Ecore_X_Window win, *opacity = tmp; return ret == 1 ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_netwm_opacity_get */ +} EAPI void ecore_x_netwm_frame_size_set(Ecore_X_Window win, - int fl, - int fr, - int ft, - int fb) + int fl, + int fr, + int ft, + int fb) { unsigned int frames[4]; @@ -1386,14 +1387,14 @@ ecore_x_netwm_frame_size_set(Ecore_X_Window win, ECORE_X_ATOM_NET_FRAME_EXTENTS, frames, 4); -} /* ecore_x_netwm_frame_size_set */ +} EAPI Eina_Bool ecore_x_netwm_frame_size_get(Ecore_X_Window win, - int *fl, - int *fr, - int *ft, - int *fb) + int *fl, + int *fr, + int *ft, + int *fb) { int ret = 0; unsigned int frames[4]; @@ -1419,10 +1420,10 @@ ecore_x_netwm_frame_size_get(Ecore_X_Window win, *fb = frames[3]; return EINA_TRUE; -} /* ecore_x_netwm_frame_size_get */ +} EAPI Eina_Bool -ecore_x_netwm_sync_counter_get(Ecore_X_Window win, +ecore_x_netwm_sync_counter_get(Ecore_X_Window win, Ecore_X_Sync_Counter *counter) { int ret; @@ -1439,7 +1440,7 @@ ecore_x_netwm_sync_counter_get(Ecore_X_Window win, *counter = tmp; return ret == 1 ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_netwm_sync_counter_get */ +} EAPI void ecore_x_netwm_ping_send(Ecore_X_Window win) @@ -1462,11 +1463,11 @@ ecore_x_netwm_ping_send(Ecore_X_Window win) xev.xclient.data.l[4] = 0; XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev); -} /* ecore_x_netwm_ping_send */ +} EAPI void ecore_x_netwm_sync_request_send(Ecore_X_Window win, - unsigned int serial) + unsigned int serial) { XSyncValue value; XEvent xev; @@ -1489,14 +1490,14 @@ ecore_x_netwm_sync_request_send(Ecore_X_Window win, xev.xclient.data.l[4] = 0; XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev); -} /* ecore_x_netwm_sync_request_send */ +} EAPI void -ecore_x_netwm_state_request_send(Ecore_X_Window win, - Ecore_X_Window root, +ecore_x_netwm_state_request_send(Ecore_X_Window win, + Ecore_X_Window root, Ecore_X_Window_State s1, Ecore_X_Window_State s2, - Eina_Bool set) + Eina_Bool set) { XEvent xev; @@ -1524,12 +1525,12 @@ ecore_x_netwm_state_request_send(Ecore_X_Window win, XSendEvent(_ecore_x_disp, root, False, SubstructureNotifyMask | SubstructureRedirectMask, &xev); -} /* ecore_x_netwm_state_request_send */ +} EAPI void ecore_x_netwm_desktop_request_send(Ecore_X_Window win, Ecore_X_Window root, - unsigned int desktop) + unsigned int desktop) { XEvent xev; @@ -1551,11 +1552,11 @@ ecore_x_netwm_desktop_request_send(Ecore_X_Window win, XSendEvent(_ecore_x_disp, root, False, SubstructureNotifyMask | SubstructureRedirectMask, &xev); -} /* ecore_x_netwm_desktop_request_send */ +} int _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__, - char *data __UNUSED__) + char *data __UNUSED__) { #if 0 Ecore_X_Startup_Info *info; @@ -1600,11 +1601,11 @@ _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__, #endif /* if 0 */ return 1; -} /* _ecore_x_netwm_startup_info_begin */ +} int _ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__, - char *data __UNUSED__) + char *data __UNUSED__) { #if 0 Ecore_X_Startup_Info *info; @@ -1639,26 +1640,26 @@ _ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__, #endif /* if 0 */ return 1; -} /* _ecore_x_netwm_startup_info */ +} /* * Set UTF-8 string property */ static void _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win, - Ecore_X_Atom atom, - const char *str) + Ecore_X_Atom atom, + const char *str) { XChangeProperty(_ecore_x_disp, win, atom, ECORE_X_ATOM_UTF8_STRING, 8, PropModeReplace, (unsigned char *)str, strlen(str)); -} /* _ecore_x_window_prop_string_utf8_set */ +} /* * Get UTF-8 string property */ static char * _ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, - Ecore_X_Atom atom) + Ecore_X_Atom atom) { char *str; unsigned char *prop_ret; @@ -1685,7 +1686,7 @@ _ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, XFree(prop_ret); return str; -} /* _ecore_x_window_prop_string_utf8_get */ +} #if 0 /* Unused */ /* @@ -1758,19 +1759,19 @@ _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info) else { /* Discard buffer */ - info->length = 0; - info->buffer[0] = 0; + info->length = 0; + info->buffer[0] = 0; } return 1; -} /* _ecore_x_netwm_startup_info_process */ +} /* * Parse startup info */ static int _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, - char *data) + char *data) { while (*data) { @@ -1780,7 +1781,8 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char value[1024]; /* Skip space */ - while (*data == ' ') data++; + while (*data == ' ') + data++; /* Get key */ key = data; data = strchr(key, '='); @@ -1920,7 +1922,7 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, return 0; return 1; -} /* _ecore_x_netwm_startup_info_parse */ +} #endif /* if 0 */ @@ -1958,7 +1960,7 @@ _ecore_x_netwm_startup_info_free(void *data) free(info->wmclass); free(info); -} /* _ecore_x_netwm_startup_info_free */ +} /* * Is screen composited? @@ -1981,10 +1983,10 @@ ecore_x_screen_is_composited(int screen) win = XGetSelectionOwner(_ecore_x_disp, atom); return (win != None) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_screen_is_composited */ +} EAPI void -ecore_x_screen_is_composited_set(int screen, +ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win) { static Ecore_X_Atom atom = None; @@ -1999,5 +2001,5 @@ ecore_x_screen_is_composited_set(int screen, return; XSetSelectionOwner(_ecore_x_disp, atom, win, _ecore_x_event_last_time); -} /* ecore_x_screen_is_composited_set */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_pixmap.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_pixmap.c index b81d06c..7b13615 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_pixmap.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_pixmap.c @@ -26,9 +26,9 @@ */ EAPI Ecore_X_Pixmap ecore_x_pixmap_new(Ecore_X_Window win, - int w, - int h, - int dep) + int w, + int h, + int dep) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (win == 0) @@ -38,7 +38,7 @@ ecore_x_pixmap_new(Ecore_X_Window win, dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp)); return XCreatePixmap(_ecore_x_disp, win, w, h, dep); -} /* ecore_x_pixmap_new */ +} /** * Deletes the reference to the given pixmap. @@ -54,7 +54,7 @@ ecore_x_pixmap_free(Ecore_X_Pixmap pmap) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XFreePixmap(_ecore_x_disp, pmap); -} /* ecore_x_pixmap_free */ +} /** * Pastes a rectangular area of the given pixmap onto the given drawable. @@ -71,19 +71,19 @@ ecore_x_pixmap_free(Ecore_X_Pixmap pmap) * @ingroup Ecore_X_Pixmap_Group */ EAPI void -ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, +ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest, - Ecore_X_GC gc, - int sx, - int sy, - int w, - int h, - int dx, - int dy) + Ecore_X_GC gc, + int sx, + int sy, + int w, + int h, + int dx, + int dy) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy); -} /* ecore_x_pixmap_paste */ +} /** * Retrieves the size of the given pixmap. @@ -96,15 +96,15 @@ ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, */ EAPI void ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, - int *x, - int *y, - int *w, - int *h) + int *x, + int *y, + int *w, + int *h) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (pmap) ecore_x_drawable_geometry_get(pmap, x, y, w, h); -} /* ecore_x_pixmap_geometry_get */ +} /** * Retrieves the depth of the given pixmap. @@ -117,5 +117,5 @@ ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return ecore_x_drawable_depth_get(pmap); -} /* ecore_x_pixmap_depth_get */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_11.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_11.c index a6bafb6..816f8d5 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_11.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_11.c @@ -8,6 +8,10 @@ #include "ecore_x_private.h" #include "ecore_x_randr.h" +#include +#include +#include +#include #define Ecore_X_Randr_None 0 #ifdef ECORE_XRANDR @@ -18,7 +22,8 @@ root) ((screen = \ XRRRootToScreen(_ecore_x_disp, \ root)) != -1) -#define RANDR_CHECK_1_1_RET(ret) if(_randr_version < RANDR_1_1) return ret +#define RANDR_CHECK_1_1_RET(ret) if (_randr_version < RANDR_1_1) \ + return ret extern XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display * dpy, @@ -44,7 +49,7 @@ ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root) #else /* ifdef ECORE_XRANDR */ return Ecore_X_Randr_None; #endif /* ifdef ECORE_XRANDR */ -} /* ecore_x_randr_screen_primary_output_orientations_get */ +} /* * @param root window which's primary output will be queried @@ -61,7 +66,7 @@ ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root) #else /* ifdef ECORE_XRANDR */ return Ecore_X_Randr_None; #endif /* ifdef ECORE_XRANDR */ -} /* ecore_x_randr_screen_primary_output_orientation_get */ +} /* * @brief sets a given screen's primary output's orientation @@ -95,7 +100,7 @@ ecore_x_randr_screen_primary_output_orientation_set( #else /* ifdef ECORE_XRANDR */ return EINA_FALSE; #endif /* ifdef ECORE_XRANDR */ -} /* ecore_x_randr_screen_primary_output_orientation_set */ +} /* * @brief gets a screen's primary output's possible sizes @@ -105,7 +110,7 @@ ecore_x_randr_screen_primary_output_orientation_set( */ EAPI Ecore_X_Randr_Screen_Size_MM * ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, - int *num) + int *num) { #ifdef ECORE_XRANDR Ecore_X_Randr_Screen_Size_MM *ret = NULL; @@ -135,7 +140,7 @@ ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, #else /* ifdef ECORE_XRANDR */ return NULL; #endif /* ifdef ECORE_XRANDR */ -} /* ecore_x_randr_screen_primary_output_sizes_get */ +} /* * @brief get the current set size of a given screen's primary output @@ -148,11 +153,11 @@ ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, */ EAPI void ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, - int *w, - int *h, - int *w_mm, - int *h_mm, - int *size_index) + int *w, + int *h, + int *w_mm, + int *h_mm, + int *size_index) { #ifdef ECORE_XRANDR XRRScreenSize *sizes; @@ -192,7 +197,7 @@ ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, XRRFreeScreenConfigInfo(sc); #endif /* ifdef ECORE_XRANDR */ -} /* ecore_x_randr_screen_primary_output_current_size_get */ +} /* * @brief sets a given screen's primary output size, but disables all other outputs at the same time @@ -202,18 +207,16 @@ ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, */ EAPI Eina_Bool ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root, - int size_index) + int size_index) { #ifdef ECORE_XRANDR XRRScreenConfiguration *sc = NULL; - XRRScreenSize *sizes; Eina_Bool ret = EINA_FALSE; int nsizes = 0; if (size_index >= 0 && _ecore_x_randr_root_validate(root)) { - sizes = - XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, + XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, root), &nsizes); if (size_index < nsizes) @@ -235,7 +238,7 @@ ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root, #else /* ifdef ECORE_XRANDR */ return EINA_FALSE; #endif /* ifdef ECORE_XRANDR */ -} /* ecore_x_randr_screen_primary_output_size_set */ +} /* * @param root window which's primary output will be queried @@ -261,7 +264,7 @@ ecore_x_randr_screen_primary_output_current_refresh_rate_get( #else /* ifdef ECORE_XRANDR */ return 0.0; #endif /* ifdef ECORE_XRANDR */ -} /* ecore_x_randr_screen_primary_output_current_refresh_rate_get */ +} /* * @param root window which's primary output will be queried @@ -270,8 +273,8 @@ ecore_x_randr_screen_primary_output_current_refresh_rate_get( */ EAPI Ecore_X_Randr_Refresh_Rate * ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, - int size_index, - int *num) + int size_index, + int *num) { #ifdef ECORE_XRANDR Ecore_X_Randr_Refresh_Rate *ret = NULL, *rates = NULL; @@ -293,7 +296,7 @@ ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, #else /* ifdef ECORE_XRANDR */ return NULL; #endif /* ifdef ECORE_XRANDR */ -} /* ecore_x_randr_screen_primary_output_refresh_rates_get */ +} //>= 1.1 /* @@ -306,7 +309,7 @@ ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, EAPI Eina_Bool ecore_x_randr_screen_primary_output_refresh_rate_set( Ecore_X_Window root, - int size_index, + int size_index, Ecore_X_Randr_Refresh_Rate rate) { @@ -328,5 +331,5 @@ ecore_x_randr_screen_primary_output_refresh_rate_set( #else /* ifdef ECORE_XRANDR */ return EINA_FALSE; #endif /* ifdef ECORE_XRANDR */ -} /* ecore_x_randr_screen_primary_output_refresh_rate_set */ +} 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 fb607d1..38218a5 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 @@ -8,6 +8,10 @@ #include "ecore_x_private.h" #include "ecore_x_randr.h" +#include +#include +#include +#include #define Ecore_X_Randr_None (Ecore_X_Randr_Crtc)0 #define Ecore_X_Randr_Unset (Ecore_X_Randr_Crtc) - 1 @@ -19,7 +23,8 @@ #define RANDR_VALIDATE_ROOT(screen, root) \ ((screen = XRRRootToScreen(_ecore_x_disp, root)) != -1) -#define RANDR_CHECK_1_2_RET(ret) if(_randr_version < RANDR_1_2) return ret +#define RANDR_CHECK_1_2_RET(ret) if (_randr_version < RANDR_1_2) \ + return ret #define RANDR_PROPERTY_EDID "EDID" #define RANDR_PROPERTY_BACKLIGHT "Backlight" @@ -45,7 +50,7 @@ extern int _randr_version; */ EAPI void ecore_x_randr_events_select(Ecore_X_Window win, - Eina_Bool on) + Eina_Bool on) { #ifdef ECORE_XRANDR int mask; @@ -73,7 +78,7 @@ ecore_x_randr_events_select(Ecore_X_Window win, * @return in case it is found EINA_TRUE will be returned. Else EINA_FALSE is returned. */ static inline Eina_Bool -_ecore_x_randr_crtc_validate(Ecore_X_Window root, +_ecore_x_randr_crtc_validate(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc) { #ifdef ECORE_XRANDR @@ -108,7 +113,7 @@ _ecore_x_randr_crtc_validate(Ecore_X_Window root, } Eina_Bool -_ecore_x_randr_output_validate(Ecore_X_Window root, +_ecore_x_randr_output_validate(Ecore_X_Window root, Ecore_X_Randr_Output output) { #ifdef ECORE_XRANDR @@ -139,7 +144,7 @@ _ecore_x_randr_output_validate(Ecore_X_Window root, } static inline Eina_Bool -_ecore_x_randr_mode_validate(Ecore_X_Window root, +_ecore_x_randr_mode_validate(Ecore_X_Window root, Ecore_X_Randr_Mode mode) { #ifdef ECORE_XRANDR @@ -175,10 +180,10 @@ _ecore_x_randr_mode_validate(Ecore_X_Window root, */ EAPI void ecore_x_randr_screen_current_size_get(Ecore_X_Window root, - int *w, - int *h, - int *w_mm, - int *h_mm) + int *w, + int *h, + int *w_mm, + int *h_mm) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(); @@ -211,10 +216,10 @@ ecore_x_randr_screen_current_size_get(Ecore_X_Window root, */ EAPI void ecore_x_randr_screen_size_range_get(Ecore_X_Window root, - int *wmin, - int *hmin, - int *wmax, - int *hmax) + int *wmin, + int *hmin, + int *wmax, + int *hmax) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(); @@ -249,10 +254,10 @@ ecore_x_randr_screen_size_range_get(Ecore_X_Window root, */ EAPI Eina_Bool ecore_x_randr_screen_current_size_set(Ecore_X_Window root, - int w, - int h, - int w_mm, - int h_mm) + int w, + int h, + int w_mm, + int h_mm) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(EINA_FALSE); @@ -281,14 +286,14 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root, if (h <= 0) h = DisplayHeight(_ecore_x_disp, scr); - if(w_mm <= 0) + if (w_mm <= 0) w_mm = (int)(((double)(DisplayWidthMM(_ecore_x_disp, scr) / (double)DisplayWidth(_ecore_x_disp, scr))) * (double)w); - if(h_mm <= 0) + if (h_mm <= 0) h_mm = (int)(((double)(DisplayHeightMM(_ecore_x_disp, scr) / @@ -310,7 +315,7 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root, */ EAPI Ecore_X_Randr_Mode_Info ** ecore_x_randr_modes_info_get(Ecore_X_Window root, - int *num) + int *num) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(NULL); @@ -353,7 +358,7 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, } else { - while(i > 0) + while (i > 0) free(ret[--i]); free(ret); ret = NULL; @@ -381,7 +386,7 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, * @return mode's detailed information */ EAPI Ecore_X_Randr_Mode_Info * -ecore_x_randr_mode_info_get(Ecore_X_Window root, +ecore_x_randr_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode) { #ifdef ECORE_XRANDR @@ -461,7 +466,7 @@ ecore_x_randr_mode_info_free(Ecore_X_Randr_Mode_Info *mode_info) */ EAPI Ecore_X_Randr_Crtc * ecore_x_randr_crtcs_get(Ecore_X_Window root, - int *num) + int *num) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(NULL); @@ -488,7 +493,7 @@ ecore_x_randr_crtcs_get(Ecore_X_Window root, EAPI Ecore_X_Randr_Output * ecore_x_randr_outputs_get(Ecore_X_Window root, - int *num) + int *num) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(NULL); @@ -523,9 +528,9 @@ ecore_x_randr_outputs_get(Ecore_X_Window root, * @param num number of outputs referenced by given CRTC */ EAPI Ecore_X_Randr_Output * -ecore_x_randr_crtc_outputs_get(Ecore_X_Window root, +ecore_x_randr_crtc_outputs_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, - int *num) + int *num) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(NULL); @@ -567,9 +572,9 @@ ecore_x_randr_crtc_outputs_get(Ecore_X_Window root, * @param num number of possible outputs referenced by given CRTC */ EAPI Ecore_X_Randr_Output * -ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root, +ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, - int *num) + int *num) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(NULL); @@ -581,7 +586,7 @@ ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root, crtc) && (res = _ecore_x_randr_get_screen_resources (_ecore_x_disp, root))) { - if((crtc_info = XRRGetCrtcInfo(_ecore_x_disp, res, crtc))) + if ((crtc_info = XRRGetCrtcInfo(_ecore_x_disp, res, crtc))) { if ((ret = malloc(sizeof(Ecore_X_Randr_Output) * crtc_info->npossible))) @@ -605,12 +610,12 @@ ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root, } EAPI void -ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, +ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, - int *x, - int *y, - int *w, - int *h) + int *x, + int *y, + int *w, + int *h) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(); @@ -652,10 +657,10 @@ ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, * @return EINA_TRUE if position could be successfully be altered. */ EAPI Eina_Bool -ecore_x_randr_crtc_pos_set(Ecore_X_Window root, +ecore_x_randr_crtc_pos_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, - int x, - int y) + int x, + int y) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(EINA_FALSE); @@ -706,7 +711,7 @@ ecore_x_randr_crtc_pos_set(Ecore_X_Window root, * Ecore_X_Randr_Unset */ EAPI Ecore_X_Randr_Mode -ecore_x_randr_crtc_mode_get(Ecore_X_Window root, +ecore_x_randr_crtc_mode_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc) { #ifdef ECORE_XRANDR @@ -746,11 +751,11 @@ ecore_x_randr_crtc_mode_get(Ecore_X_Window root, * @return EINA_TRUE if mode setting was successful. Else EINA_FALSE */ EAPI Eina_Bool -ecore_x_randr_crtc_mode_set(Ecore_X_Window root, - Ecore_X_Randr_Crtc crtc, +ecore_x_randr_crtc_mode_set(Ecore_X_Window root, + Ecore_X_Randr_Crtc crtc, Ecore_X_Randr_Output *outputs, - int noutputs, - Ecore_X_Randr_Mode mode) + int noutputs, + Ecore_X_Randr_Mode mode) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(EINA_FALSE); @@ -772,10 +777,10 @@ ecore_x_randr_crtc_mode_set(Ecore_X_Window root, } EAPI void -ecore_x_randr_crtc_size_get(Ecore_X_Window root, +ecore_x_randr_crtc_size_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, - int *w, - int *h) + int *w, + int *h) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(); @@ -784,7 +789,7 @@ ecore_x_randr_crtc_size_get(Ecore_X_Window root, } EAPI Ecore_X_Randr_Refresh_Rate -ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root, +ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ecore_X_Randr_Mode mode) { @@ -824,7 +829,7 @@ ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root, } EAPI Ecore_X_Randr_Orientation -ecore_x_randr_crtc_orientations_get(Ecore_X_Window root, +ecore_x_randr_crtc_orientations_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc) { #ifdef ECORE_XRANDR @@ -855,7 +860,7 @@ ecore_x_randr_crtc_orientations_get(Ecore_X_Window root, } EAPI Ecore_X_Randr_Orientation -ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, +ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc) { #ifdef ECORE_XRANDR @@ -886,8 +891,8 @@ ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, } EAPI Eina_Bool -ecore_x_randr_crtc_orientation_set(Ecore_X_Window root, - Ecore_X_Randr_Crtc crtc, +ecore_x_randr_crtc_orientation_set(Ecore_X_Window root, + Ecore_X_Randr_Crtc crtc, Ecore_X_Randr_Orientation orientation) { #ifdef ECORE_XRANDR @@ -913,10 +918,10 @@ ecore_x_randr_crtc_orientation_set(Ecore_X_Window root, } EAPI void -ecore_x_randr_crtc_pos_get(Ecore_X_Window root, +ecore_x_randr_crtc_pos_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, - int *x, - int *y) + int *x, + int *y) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(); @@ -926,7 +931,7 @@ ecore_x_randr_crtc_pos_get(Ecore_X_Window root, } EAPI Eina_Bool -ecore_x_randr_crtc_clone_set(Ecore_X_Window root, +ecore_x_randr_crtc_clone_set(Ecore_X_Window root, Ecore_X_Randr_Crtc original, Ecore_X_Randr_Crtc clon) { @@ -993,13 +998,13 @@ ecore_x_randr_crtc_clone_set(Ecore_X_Window root, * EINA_FALSE */ EAPI Eina_Bool -ecore_x_randr_crtc_settings_set(Ecore_X_Window root, - Ecore_X_Randr_Crtc crtc, - Ecore_X_Randr_Output *outputs, - int noutputs, - int x, - int y, - Ecore_X_Randr_Mode mode, +ecore_x_randr_crtc_settings_set(Ecore_X_Window root, + Ecore_X_Randr_Crtc crtc, + Ecore_X_Randr_Output *outputs, + int noutputs, + int x, + int y, + Ecore_X_Randr_Mode mode, Ecore_X_Randr_Orientation orientation) { #ifdef ECORE_XRANDR @@ -1059,17 +1064,17 @@ ecore_x_randr_crtc_settings_set(Ecore_X_Window root, * @brief sets a CRTC relative to another one. * @param crtc_r1 the CRTC to be positioned. * @param crtc_r2 the CRTC the position should be relative to - * @param position the relation between the crtcs + * @param policy the relation between the crtcs * @param alignment in case CRTCs size differ, aligns CRTC1 accordingly at CRTC2's * borders * @return EINA_TRUE if crtc could be successfully positioned. EINA_FALSE if * repositioning failed or if position of new crtc would be out of given screen's min/max bounds. */ EAPI Eina_Bool -ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, - Ecore_X_Randr_Crtc crtc_r1, - Ecore_X_Randr_Crtc crtc_r2, - Ecore_X_Randr_Output_Policy policy, +ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, + Ecore_X_Randr_Crtc crtc_r1, + Ecore_X_Randr_Crtc crtc_r2, + Ecore_X_Randr_Output_Policy policy, Ecore_X_Randr_Relative_Alignment alignment) { #ifdef ECORE_XRANDR @@ -1360,10 +1365,10 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, } EAPI Ecore_X_Randr_Mode * -ecore_x_randr_output_modes_get(Ecore_X_Window root, +ecore_x_randr_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output output, - int *num, - int *npreferred) + int *num, + int *npreferred) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(NULL); @@ -1401,9 +1406,9 @@ ecore_x_randr_output_modes_get(Ecore_X_Window root, } EAPI Ecore_X_Randr_Crtc * -ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, +ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Output output, - int *num) + int *num) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(NULL); @@ -1441,9 +1446,9 @@ ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, * @param num number of possible clones */ EAPI Ecore_X_Randr_Output * -ecore_x_randr_output_clones_get(Ecore_X_Window root, +ecore_x_randr_output_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output output, - int *num) + int *num) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(NULL); @@ -1474,7 +1479,7 @@ ecore_x_randr_output_clones_get(Ecore_X_Window root, } EAPI Ecore_X_Randr_Crtc -ecore_x_randr_output_crtc_get(Ecore_X_Window root, +ecore_x_randr_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output output) { #ifdef ECORE_XRANDR @@ -1509,9 +1514,9 @@ ecore_x_randr_output_crtc_get(Ecore_X_Window root, * @return name of the output as reported by X */ EAPI char * -ecore_x_randr_output_name_get(Ecore_X_Window root, +ecore_x_randr_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output, - int *len) + int *len) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(NULL); @@ -1532,10 +1537,10 @@ ecore_x_randr_output_name_get(Ecore_X_Window root, * *len = output_info->nameLen; * */ - if ((ret = strdup(output_info->name)) && len) - *len = strlen(ret); + if ((ret = strdup(output_info->name)) && len) + *len = strlen(ret); - XRRFreeOutputInfo(output_info); + XRRFreeOutputInfo(output_info); } if (res) @@ -1554,10 +1559,10 @@ ecore_x_randr_output_name_get(Ecore_X_Window root, * @param h height of given mode in px */ EAPI void -ecore_x_randr_mode_size_get(Ecore_X_Window root, +ecore_x_randr_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, - int *w, - int *h) + int *w, + int *h) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(); @@ -1598,9 +1603,9 @@ ecore_x_randr_mode_size_get(Ecore_X_Window root, * @param length length of the byte-array. If NULL, request will fail. */ EAPI unsigned char * -ecore_x_randr_output_edid_get(Ecore_X_Window root, +ecore_x_randr_output_edid_get(Ecore_X_Window root, Ecore_X_Randr_Output output, - unsigned long *length) + unsigned long *length) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(NULL); @@ -1613,18 +1618,18 @@ ecore_x_randr_output_edid_get(Ecore_X_Window root, if (!length || !_ecore_x_randr_output_validate(root, output)) return NULL; - if(XRRGetOutputProperty (_ecore_x_disp, output, name, - 0, 100, False, False, - AnyPropertyType, - &actual_type, &actual_format, - &nitems, &bytes_after, &prop_data) == Success) + if (XRRGetOutputProperty (_ecore_x_disp, output, name, + 0, 100, False, False, + AnyPropertyType, + &actual_type, &actual_format, + &nitems, &bytes_after, &prop_data) == Success) { if (actual_type == XA_INTEGER && actual_format == 8) { if ((ret = malloc(nitems * sizeof(unsigned char)))) { - if(length && - (memcpy(ret, prop_data, (nitems * sizeof(unsigned char))))) + if (length && + (memcpy(ret, prop_data, (nitems * sizeof(unsigned char))))) *length = nitems; return ret; @@ -1639,7 +1644,7 @@ ecore_x_randr_output_edid_get(Ecore_X_Window root, } EAPI Ecore_X_Randr_Connection_Status -ecore_x_randr_output_connection_status_get(Ecore_X_Window root, +ecore_x_randr_output_connection_status_get(Ecore_X_Window root, Ecore_X_Randr_Output output) { #ifdef ECORE_XRANDR @@ -1669,10 +1674,10 @@ ecore_x_randr_output_connection_status_get(Ecore_X_Window root, } EAPI void -ecore_x_randr_output_size_mm_get(Ecore_X_Window root, +ecore_x_randr_output_size_mm_get(Ecore_X_Window root, Ecore_X_Randr_Output output, - int *w_mm, - int *h_mm) + int *w_mm, + int *h_mm) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(); @@ -1701,11 +1706,11 @@ ecore_x_randr_output_size_mm_get(Ecore_X_Window root, } EAPI Eina_Bool -ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root, +ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root, const Ecore_X_Randr_Crtc *not_moved, - int nnot_moved, - int dx, - int dy) + int nnot_moved, + int dx, + int dy) { #ifdef ECORE_XRANDR Ecore_X_Randr_Crtc *crtcs_to_be_moved = NULL; @@ -1754,11 +1759,11 @@ ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root, * @return EINA_TRUE if all crtcs could be moved successfully. */ EAPI Eina_Bool -ecore_x_randr_move_crtcs(Ecore_X_Window root, +ecore_x_randr_move_crtcs(Ecore_X_Window root, const Ecore_X_Randr_Crtc *crtcs, - int ncrtc, - int dx, - int dy) + int ncrtc, + int dx, + int dy) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(EINA_FALSE); @@ -1821,18 +1826,18 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root, { //something went wrong, let's try to move the already moved crtcs //back. - while ((i--) >= 0) - { - if (crtc_info[i]) - ecore_x_randr_crtc_settings_set(root, - crtcs[i], - NULL, - Ecore_X_Randr_Unset, - (crtc_info[i]->x - dx), - (crtc_info[i]->y - dy), - crtc_info[i]->mode, - crtc_info[i]->rotation); - } + while ((i--) >= 0) + { + if (crtc_info[i]) + ecore_x_randr_crtc_settings_set(root, + crtcs[i], + NULL, + Ecore_X_Randr_Unset, + (crtc_info[i]->x - dx), + (crtc_info[i]->y - dy), + crtc_info[i]->mode, + crtc_info[i]->rotation); + } } for (i = 0; i < ncrtc; i++) @@ -1923,7 +1928,7 @@ ecore_x_randr_screen_reset(Ecore_X_Window root) EAPI void ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, - double level) + double level) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(); @@ -1965,6 +1970,26 @@ ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, } /* + * @brief check if a backlight is available + * @return whether a blacklight is available + */ + +EAPI Eina_Bool +ecore_x_randr_output_backlight_available(void) +{ +#ifdef ECORE_XRANDR + RANDR_CHECK_1_2_RET(-1); + Atom _backlight; + + _backlight = XInternAtom(_ecore_x_disp, RANDR_PROPERTY_BACKLIGHT, True); + + return (_backlight == None) ? EINA_FALSE : EINA_TRUE; + +#endif + return EINA_FALSE; +} + +/* * @brief get the backlight level of the given output * @param root window which's screen should be queried * @param output from which the backlight level should be retrieved @@ -1972,7 +1997,7 @@ ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, */ EAPI double -ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, +ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, Ecore_X_Randr_Output output) { #ifdef ECORE_XRANDR @@ -2025,9 +2050,9 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, if ((info->range) && (info->num_values == 2)) { /* finally convert the current value in the interval [0..1] */ - min = info->values[0]; - max = info->values[1]; - dvalue = ((double)(value - min)) / ((double)(max - min)); + min = info->values[0]; + max = info->values[1]; + dvalue = ((double)(value - min)) / ((double)(max - min)); } free(info); return dvalue; @@ -2045,9 +2070,9 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, */ EAPI Eina_Bool -ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, +ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, Ecore_X_Randr_Output output, - double level) + double level) { #ifdef ECORE_XRANDR RANDR_CHECK_1_2_RET(EINA_FALSE); @@ -2107,7 +2132,7 @@ ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, EAPI Ecore_X_Randr_Output * ecore_x_randr_window_outputs_get(Ecore_X_Window window, - int *num) + int *num) { #ifdef ECORE_XRANDR Ecore_X_Window root; @@ -2136,39 +2161,39 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window, for (i = 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); - } + 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); + } } free(crtcs); @@ -2192,7 +2217,7 @@ _ecore_x_randr_current_output_get_fail: EINA_DEPRECATED EAPI Ecore_X_Randr_Output * ecore_x_randr_current_output_get(Ecore_X_Window window, - int *num) + int *num) { return ecore_x_randr_window_outputs_get(window, num); } diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12_edid.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12_edid.c index d434f2f..5bda332 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12_edid.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12_edid.c @@ -23,6 +23,10 @@ /* Heavily modified by: Leif Middelschulte */ #include "Ecore_X.h" +#include +#include +#include +#include /* TODO: * - see other TODO's within this file. @@ -100,7 +104,7 @@ typedef enum _Ecore_X_Randr_Edid_Aspect_Ratio_Preferred { EAPI Eina_Bool ecore_x_randr_edid_has_valid_header(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { const unsigned char header[] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 }; @@ -112,7 +116,7 @@ ecore_x_randr_edid_has_valid_header(unsigned char *edid, EAPI int ecore_x_randr_edid_version_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { if ((edid_length > _ECORE_X_RANDR_EDID_OFFSET_VERSION_MINOR) && (ecore_x_randr_edid_has_valid_header(edid, edid_length))) @@ -123,7 +127,7 @@ ecore_x_randr_edid_version_get(unsigned char *edid, EAPI int ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { if ((edid_length > 0x0b) && (ecore_x_randr_edid_has_valid_header(edid, edid_length))) @@ -133,7 +137,7 @@ ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid, EAPI int ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { if ((edid_length > 0x0f) && (ecore_x_randr_edid_has_valid_header(edid, edid_length))) @@ -144,7 +148,7 @@ ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid, EAPI char * ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { if ((edid_length > (_ECORE_X_RANDR_EDID_OFFSET_MANUFACTURER + 1)) && (ecore_x_randr_edid_has_valid_header(edid, edid_length))) @@ -166,7 +170,7 @@ ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid, EAPI char * ecore_x_randr_edid_display_name_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { unsigned char *block = NULL; int version = ecore_x_randr_edid_version_get(edid, edid_length); @@ -196,7 +200,7 @@ ecore_x_randr_edid_display_name_get(unsigned char *edid, EAPI Ecore_X_Randr_Edid_Aspect_Ratio ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { unsigned char *block = NULL; int version = ecore_x_randr_edid_version_get(edid, edid_length); @@ -238,7 +242,7 @@ ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid, EAPI Ecore_X_Randr_Edid_Aspect_Ratio ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { Ecore_X_Randr_Edid_Aspect_Ratio ret = ECORE_X_RANDR_EDID_UNKNOWN_VALUE; unsigned char *block = NULL; @@ -267,7 +271,7 @@ ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid, EAPI char * ecore_x_randr_edid_display_ascii_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { unsigned char *block = NULL; int version = ecore_x_randr_edid_version_get(edid, edid_length); @@ -300,7 +304,7 @@ ecore_x_randr_edid_display_ascii_get(unsigned char *edid, EAPI char * ecore_x_randr_edid_display_serial_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { unsigned char *block = NULL; int version = ecore_x_randr_edid_version_get(edid, edid_length); @@ -333,7 +337,7 @@ ecore_x_randr_edid_display_serial_get(unsigned char *edid, EAPI Eina_Bool ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { unsigned char *cea_block_iter = NULL; char sum = 0; @@ -344,13 +348,15 @@ ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid, if (edid_length < 128) return EINA_FALSE; /* Check the EDID block itself */ - for (i = 0; i < 128; i++) sum += edid[i]; + for (i = 0; i < 128; i++) + sum += edid[i]; if (sum) return EINA_FALSE; /* Check the cea extension blocks */ _ECORE_X_RANDR_EDID_FOR_EACH_CEA_BLOCK(edid, edid_length, cea_block_iter) { - for (i = 0, sum = 0; i < 128; i++) sum += cea_block_iter[i]; + for (i = 0, sum = 0; i < 128; i++) + sum += cea_block_iter[i]; } if (sum) return EINA_FALSE; return EINA_TRUE; @@ -358,7 +364,7 @@ ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid, EAPI Eina_Bool ecore_x_randr_edid_dpms_available_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { int version = ecore_x_randr_edid_version_get(edid, edid_length); @@ -369,7 +375,7 @@ ecore_x_randr_edid_dpms_available_get(unsigned char *edid, EAPI Eina_Bool ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { int version = ecore_x_randr_edid_version_get(edid, edid_length); @@ -382,7 +388,7 @@ ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid, EAPI Eina_Bool ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { int version = ecore_x_randr_edid_version_get(edid, edid_length); @@ -395,7 +401,7 @@ ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid, EAPI Eina_Bool ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { int version = ecore_x_randr_edid_version_get(edid, edid_length); @@ -408,7 +414,7 @@ ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid, EAPI Eina_Bool ecore_x_randr_edid_display_type_digital_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { int version = ecore_x_randr_edid_version_get(edid, edid_length); @@ -419,7 +425,7 @@ ecore_x_randr_edid_display_type_digital_get(unsigned char *edid, EAPI Ecore_X_Randr_Edid_Display_Colorscheme ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { Ecore_X_Randr_Edid_Display_Colorscheme colorscheme = ECORE_X_RANDR_EDID_UNKNOWN_VALUE; int version = ecore_x_randr_edid_version_get(edid, edid_length); @@ -442,7 +448,7 @@ ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid, EAPI Ecore_X_Randr_Edid_Display_Interface_Type ecore_x_randr_edid_display_interface_type_get(unsigned char *edid, - unsigned long edid_length) + unsigned long edid_length) { Ecore_X_Randr_Edid_Display_Interface_Type type = ECORE_X_RANDR_EDID_UNKNOWN_VALUE; int version = ecore_x_randr_edid_version_get(edid, edid_length); diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c index ab242f7..5d1c8e9 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c @@ -8,6 +8,10 @@ #include "ecore_x_private.h" #include "ecore_x_randr.h" +#include +#include +#include +#include #define Ecore_X_Randr_None 0 #define Ecore_X_Randr_Unset -1 @@ -15,7 +19,8 @@ #ifdef ECORE_XRANDR #define RANDR_1_3 ((1 << 16) | 3) -#define RANDR_CHECK_1_3_RET(ret) if(_randr_version < RANDR_1_3) return ret +#define RANDR_CHECK_1_3_RET(ret) if (_randr_version < RANDR_1_3) \ + return ret extern XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display * dpy, @@ -47,7 +52,7 @@ ecore_x_randr_primary_output_get(Ecore_X_Window root) * @param output that should be set as given root window's screen primary output */ EAPI void -ecore_x_randr_primary_output_set(Ecore_X_Window root, +ecore_x_randr_primary_output_set(Ecore_X_Window root, Ecore_X_Randr_Output output) { #ifdef ECORE_XRANDR diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_region.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_region.c index 7cc66e3..81d7eea 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_region.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_region.c @@ -32,7 +32,7 @@ ecore_x_xregion_new() { LOGFN(__FILE__, __LINE__, __FUNCTION__); return (Ecore_X_XRegion *)XCreateRegion(); -} /* ecore_x_xregion_new */ +} EAPI void ecore_x_xregion_free(Ecore_X_XRegion *region) @@ -42,20 +42,20 @@ ecore_x_xregion_free(Ecore_X_XRegion *region) return; XDestroyRegion((Region)region); -} /* ecore_x_xregion_free */ +} EAPI Eina_Bool ecore_x_xregion_set(Ecore_X_XRegion *region, - Ecore_X_GC gc) + Ecore_X_GC gc) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return XSetRegion(_ecore_x_disp, gc, (Region)region) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_xregion_set */ +} EAPI void ecore_x_xregion_translate(Ecore_X_XRegion *region, - int x, - int y) + int x, + int y) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!region) @@ -63,7 +63,7 @@ ecore_x_xregion_translate(Ecore_X_XRegion *region, /* return value not used */ XOffsetRegion((Region)region, x, y); -} /* ecore_x_xregion_translate */ +} EAPI Eina_Bool ecore_x_xregion_intersect(Ecore_X_XRegion *dst, @@ -72,7 +72,7 @@ ecore_x_xregion_intersect(Ecore_X_XRegion *dst, { LOGFN(__FILE__, __LINE__, __FUNCTION__); return XIntersectRegion((Region)r1, (Region)r2, (Region)dst) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_xregion_intersect */ +} EAPI Eina_Bool ecore_x_xregion_union(Ecore_X_XRegion *dst, @@ -81,11 +81,11 @@ ecore_x_xregion_union(Ecore_X_XRegion *dst, { LOGFN(__FILE__, __LINE__, __FUNCTION__); return XUnionRegion((Region)r1, (Region)r2, (Region)dst) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_xregion_union */ +} EAPI Eina_Bool -ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, - Ecore_X_XRegion *src, +ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, + Ecore_X_XRegion *src, Ecore_X_Rectangle *rect) { XRectangle xr; @@ -97,7 +97,7 @@ ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, xr.height = rect->height; return XUnionRectWithRegion(&xr, (Region)src, (Region)dst) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_xregion_union_rect */ +} EAPI Eina_Bool ecore_x_xregion_subtract(Ecore_X_XRegion *dst, @@ -106,7 +106,7 @@ ecore_x_xregion_subtract(Ecore_X_XRegion *dst, { LOGFN(__FILE__, __LINE__, __FUNCTION__); return XSubtractRegion((Region)rm, (Region)rs, (Region)dst) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_xregion_subtract */ +} EAPI Eina_Bool ecore_x_xregion_is_empty(Ecore_X_XRegion *region) @@ -116,7 +116,7 @@ ecore_x_xregion_is_empty(Ecore_X_XRegion *region) LOGFN(__FILE__, __LINE__, __FUNCTION__); return XEmptyRegion((Region)region) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_xregion_is_empty */ +} EAPI Eina_Bool ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, @@ -127,22 +127,22 @@ ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, LOGFN(__FILE__, __LINE__, __FUNCTION__); return XEqualRegion((Region)r1, (Region)r1) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_xregion_is_equal */ +} EAPI Eina_Bool ecore_x_xregion_point_contain(Ecore_X_XRegion *region, - int x, - int y) + int x, + int y) { if (!region) return EINA_FALSE; LOGFN(__FILE__, __LINE__, __FUNCTION__); return XPointInRegion((Region)region, x, y) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_xregion_point_contain */ +} EAPI Eina_Bool -ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, +ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect) { if (!region || !rect) @@ -154,5 +154,5 @@ ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, rect->y, rect->width, rect->height) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_xregion_rect_contain */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_screensaver.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_screensaver.c index a3bca67..40dd738 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_screensaver.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_screensaver.c @@ -36,7 +36,7 @@ ecore_x_screensaver_event_available_get(void) _screensaver_available = 0; #endif /* ifdef ECORE_XSS */ return _screensaver_available; -} /* ecore_x_screensaver_event_available_get */ +} EAPI int ecore_x_screensaver_idle_time_get(void) @@ -57,7 +57,7 @@ ecore_x_screensaver_idle_time_get(void) #else return 0; #endif /* ifdef ECORE_XSS */ -} /* ecore_x_screensaver_idle_time_get */ +} EAPI void ecore_x_screensaver_set(int timeout, @@ -71,7 +71,7 @@ ecore_x_screensaver_set(int timeout, interval, prefer_blanking, allow_exposures); -} /* ecore_x_screensaver_set */ +} EAPI void ecore_x_screensaver_timeout_set(int timeout) @@ -81,7 +81,7 @@ ecore_x_screensaver_timeout_set(int timeout) LOGFN(__FILE__, __LINE__, __FUNCTION__); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); XSetScreenSaver(_ecore_x_disp, timeout, pint, pblank, pexpo); -} /* ecore_x_screensaver_timeout_set */ +} EAPI int ecore_x_screensaver_timeout_get(void) @@ -91,7 +91,7 @@ ecore_x_screensaver_timeout_get(void) LOGFN(__FILE__, __LINE__, __FUNCTION__); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); return pto; -} /* ecore_x_screensaver_timeout_get */ +} EAPI void ecore_x_screensaver_blank_set(int blank) @@ -101,7 +101,7 @@ ecore_x_screensaver_blank_set(int blank) LOGFN(__FILE__, __LINE__, __FUNCTION__); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); XSetScreenSaver(_ecore_x_disp, pto, pint, blank, pexpo); -} /* ecore_x_screensaver_blank_set */ +} EAPI int ecore_x_screensaver_blank_get(void) @@ -111,7 +111,7 @@ ecore_x_screensaver_blank_get(void) LOGFN(__FILE__, __LINE__, __FUNCTION__); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); return pblank; -} /* ecore_x_screensaver_blank_get */ +} EAPI void ecore_x_screensaver_expose_set(int expose) @@ -121,7 +121,7 @@ ecore_x_screensaver_expose_set(int expose) LOGFN(__FILE__, __LINE__, __FUNCTION__); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); XSetScreenSaver(_ecore_x_disp, pto, pint, pblank, expose); -} /* ecore_x_screensaver_expose_set */ +} EAPI int ecore_x_screensaver_expose_get(void) @@ -131,7 +131,7 @@ ecore_x_screensaver_expose_get(void) LOGFN(__FILE__, __LINE__, __FUNCTION__); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); return pexpo; -} /* ecore_x_screensaver_expose_get */ +} EAPI void ecore_x_screensaver_interval_set(int interval) @@ -141,7 +141,7 @@ ecore_x_screensaver_interval_set(int interval) LOGFN(__FILE__, __LINE__, __FUNCTION__); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); XSetScreenSaver(_ecore_x_disp, pto, interval, pblank, pexpo); -} /* ecore_x_screensaver_interval_set */ +} EAPI int ecore_x_screensaver_interval_get(void) @@ -151,7 +151,7 @@ ecore_x_screensaver_interval_get(void) LOGFN(__FILE__, __LINE__, __FUNCTION__); XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); return pint; -} /* ecore_x_screensaver_interval_get */ +} EAPI void ecore_x_screensaver_event_listen_set(Eina_Bool on) @@ -169,5 +169,5 @@ ecore_x_screensaver_event_listen_set(Eina_Bool on) return; on = EINA_FALSE; #endif /* ifdef ECORE_XSS */ -} /* ecore_x_screensaver_event_listen_set */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_selection.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_selection.c index b1aa611..fa177c3 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_selection.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_selection.c @@ -15,29 +15,29 @@ static Ecore_X_Selection_Intern selections[4]; static Ecore_X_Selection_Converter *converters = NULL; static Ecore_X_Selection_Parser *parsers = NULL; -static Eina_Bool _ecore_x_selection_converter_text(char *target, - void *data, - int size, - void **data_ret, - int *size_ret, +static Eina_Bool _ecore_x_selection_converter_text(char *target, + void *data, + int size, + void **data_ret, + int *size_ret, Ecore_X_Atom *tprop, int *); static int _ecore_x_selection_data_default_free(void *data); static void *_ecore_x_selection_parser_files(const char *target, - void *data, - int size, - int format); + void *data, + int size, + int format); static int _ecore_x_selection_data_files_free(void *data); static void *_ecore_x_selection_parser_text(const char *target, - void *data, - int size, - int format); + void *data, + int size, + int format); static int _ecore_x_selection_data_text_free(void *data); static void *_ecore_x_selection_parser_targets(const char *target, - void *data, - int size, - int format); -static int _ecore_x_selection_data_targets_free(void *data); + void *data, + int size, + int format); +static int _ecore_x_selection_data_targets_free(void *data); #define ECORE_X_SELECTION_DATA(x) ((Ecore_X_Selection_Data *)(x)) @@ -45,32 +45,32 @@ void _ecore_x_selection_data_init(void) { /* Initialize global data */ - memset(selections, 0, sizeof(selections)); + memset(selections, 0, sizeof(selections)); - /* Initialize converters */ - ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT, - _ecore_x_selection_converter_text); + /* Initialize converters */ + ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT, + _ecore_x_selection_converter_text); #ifdef X_HAVE_UTF8_STRING - ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING, - _ecore_x_selection_converter_text); + ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING, + _ecore_x_selection_converter_text); #endif /* ifdef X_HAVE_UTF8_STRING */ - ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT, - _ecore_x_selection_converter_text); - ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING, - _ecore_x_selection_converter_text); - - /* Initialize parsers */ - ecore_x_selection_parser_add("text/plain", - _ecore_x_selection_parser_text); - ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_UTF8_STRING, - _ecore_x_selection_parser_text); - ecore_x_selection_parser_add("text/uri-list", - _ecore_x_selection_parser_files); - ecore_x_selection_parser_add("_NETSCAPE_URL", - _ecore_x_selection_parser_files); - ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS, - _ecore_x_selection_parser_targets); -} /* _ecore_x_selection_data_init */ + ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT, + _ecore_x_selection_converter_text); + ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING, + _ecore_x_selection_converter_text); + + /* Initialize parsers */ + ecore_x_selection_parser_add("text/plain", + _ecore_x_selection_parser_text); + ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_UTF8_STRING, + _ecore_x_selection_parser_text); + ecore_x_selection_parser_add("text/uri-list", + _ecore_x_selection_parser_files); + ecore_x_selection_parser_add("_NETSCAPE_URL", + _ecore_x_selection_parser_files); + ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS, + _ecore_x_selection_parser_targets); +} void _ecore_x_selection_shutdown(void) @@ -102,7 +102,7 @@ _ecore_x_selection_shutdown(void) free(tmp); } parsers = NULL; -} /* _ecore_x_selection_shutdown */ +} Ecore_X_Selection_Intern * _ecore_x_selection_get(Ecore_X_Atom selection) @@ -117,12 +117,12 @@ _ecore_x_selection_get(Ecore_X_Atom selection) return &selections[3]; else return NULL; -} /* _ecore_x_selection_get */ +} Eina_Bool -_ecore_x_selection_set(Window w, - const void *data, - int size, +_ecore_x_selection_set(Window w, + const void *data, + int size, Ecore_X_Atom selection) { int in; @@ -162,7 +162,7 @@ _ecore_x_selection_set(Window w, } return EINA_TRUE; -} /* _ecore_x_selection_set */ +} /** * Claim ownership of the PRIMARY selection and set its data. @@ -174,12 +174,12 @@ _ecore_x_selection_set(Window w, */ EAPI Eina_Bool ecore_x_selection_primary_set(Ecore_X_Window w, - const void *data, - int size) + const void *data, + int size) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_PRIMARY); -} /* ecore_x_selection_primary_set */ +} /** * Release ownership of the primary selection @@ -192,7 +192,7 @@ ecore_x_selection_primary_clear(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_PRIMARY); -} /* ecore_x_selection_primary_clear */ +} /** * Claim ownership of the SECONDARY selection and set its data. @@ -204,15 +204,15 @@ ecore_x_selection_primary_clear(void) */ EAPI Eina_Bool ecore_x_selection_secondary_set(Ecore_X_Window w, - const void *data, - int size) + const void *data, + int size) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_SECONDARY); -} /* ecore_x_selection_secondary_set */ +} /** * Release ownership of the secondary selection @@ -228,7 +228,7 @@ ecore_x_selection_secondary_clear(void) NULL, 0, ECORE_X_ATOM_SELECTION_SECONDARY); -} /* ecore_x_selection_secondary_clear */ +} /** * Claim ownership of the XDND selection and set its data. @@ -240,12 +240,12 @@ ecore_x_selection_secondary_clear(void) */ EAPI Eina_Bool ecore_x_selection_xdnd_set(Ecore_X_Window w, - const void *data, - int size) + const void *data, + int size) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_XDND); -} /* ecore_x_selection_xdnd_set */ +} /** * Release ownership of the XDND selection @@ -258,7 +258,7 @@ ecore_x_selection_xdnd_clear(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_XDND); -} /* ecore_x_selection_xdnd_clear */ +} /** * Claim ownership of the CLIPBOARD selection and set its data. @@ -273,15 +273,15 @@ ecore_x_selection_xdnd_clear(void) */ EAPI Eina_Bool ecore_x_selection_clipboard_set(Ecore_X_Window w, - const void *data, - int size) + const void *data, + int size) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_CLIPBOARD); -} /* ecore_x_selection_clipboard_set */ +} /** * Release ownership of the clipboard selection @@ -297,7 +297,7 @@ ecore_x_selection_clipboard_clear(void) NULL, 0, ECORE_X_ATOM_SELECTION_CLIPBOARD); -} /* ecore_x_selection_clipboard_clear */ +} Ecore_X_Atom _ecore_x_selection_target_atom_get(const char *target) @@ -318,29 +318,29 @@ _ecore_x_selection_target_atom_get(const char *target) x_target = ecore_x_atom_get(target); return x_target; -} /* _ecore_x_selection_target_atom_get */ +} char * _ecore_x_selection_target_get(Ecore_X_Atom target) { /* FIXME: Should not return mem allocated with strdup or X mixed, * one should use free to free, the other XFree */ - if (target == ECORE_X_ATOM_FILE_NAME) - return strdup(ECORE_X_SELECTION_TARGET_FILENAME); - else if (target == ECORE_X_ATOM_STRING) - return strdup(ECORE_X_SELECTION_TARGET_STRING); - else if (target == ECORE_X_ATOM_UTF8_STRING) - return strdup(ECORE_X_SELECTION_TARGET_UTF8_STRING); - else if (target == ECORE_X_ATOM_TEXT) - return strdup(ECORE_X_SELECTION_TARGET_TEXT); - else - return XGetAtomName(_ecore_x_disp, target); -} /* _ecore_x_selection_target_get */ + if (target == ECORE_X_ATOM_FILE_NAME) + return strdup(ECORE_X_SELECTION_TARGET_FILENAME); + else if (target == ECORE_X_ATOM_STRING) + return strdup(ECORE_X_SELECTION_TARGET_STRING); + else if (target == ECORE_X_ATOM_UTF8_STRING) + return strdup(ECORE_X_SELECTION_TARGET_UTF8_STRING); + else if (target == ECORE_X_ATOM_TEXT) + return strdup(ECORE_X_SELECTION_TARGET_TEXT); + else + return XGetAtomName(_ecore_x_disp, target); +} static void _ecore_x_selection_request(Ecore_X_Window w, - Ecore_X_Atom selection, - const char *target_str) + Ecore_X_Atom selection, + const char *target_str) { Ecore_X_Atom target, prop; @@ -357,27 +357,27 @@ _ecore_x_selection_request(Ecore_X_Window w, XConvertSelection(_ecore_x_disp, selection, target, prop, w, CurrentTime); -} /* _ecore_x_selection_request */ +} EAPI void ecore_x_selection_primary_request(Ecore_X_Window w, - const char *target) + const char *target) { LOGFN(__FILE__, __LINE__, __FUNCTION__); _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_PRIMARY, target); -} /* ecore_x_selection_primary_request */ +} EAPI void ecore_x_selection_secondary_request(Ecore_X_Window w, - const char *target) + const char *target) { LOGFN(__FILE__, __LINE__, __FUNCTION__); _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_SECONDARY, target); -} /* ecore_x_selection_secondary_request */ +} EAPI void ecore_x_selection_xdnd_request(Ecore_X_Window w, - const char *target) + const char *target) { Ecore_X_Atom atom; Ecore_X_DND_Target *_target; @@ -388,25 +388,25 @@ ecore_x_selection_xdnd_request(Ecore_X_Window w, XConvertSelection(_ecore_x_disp, ECORE_X_ATOM_SELECTION_XDND, atom, ECORE_X_ATOM_SELECTION_PROP_XDND, w, _target->time); -} /* ecore_x_selection_xdnd_request */ +} EAPI void ecore_x_selection_clipboard_request(Ecore_X_Window w, - const char *target) + const char *target) { LOGFN(__FILE__, __LINE__, __FUNCTION__); _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_CLIPBOARD, target); -} /* ecore_x_selection_clipboard_request */ +} EAPI void -ecore_x_selection_converter_atom_add(Ecore_X_Atom target, - Eina_Bool (*func)(char *target, - void *data, - int size, - void **data_ret, - int *size_ret, - Ecore_X_Atom *ttype, - int *tsize)) +ecore_x_selection_converter_atom_add(Ecore_X_Atom target, + Eina_Bool (*func)(char *target, + void *data, + int size, + void **data_ret, + int *size_ret, + Ecore_X_Atom *ttype, + int *tsize)) { Ecore_X_Selection_Converter *cnv; @@ -441,17 +441,17 @@ ecore_x_selection_converter_atom_add(Ecore_X_Atom cnv->target = target; cnv->convert = func; -} /* ecore_x_selection_converter_atom_add */ +} EAPI void -ecore_x_selection_converter_add(char *target, - Eina_Bool (*func)(char *target, - void *data, - int size, - void **data_ret, - int *size_ret, - Ecore_X_Atom *, - int *)) +ecore_x_selection_converter_add(char *target, + Eina_Bool (*func)(char *target, + void *data, + int size, + void **data_ret, + int *size_ret, + Ecore_X_Atom *, + int *)) { Ecore_X_Atom x_target; @@ -462,7 +462,7 @@ ecore_x_selection_converter_add(char *target, x_target = _ecore_x_selection_target_atom_get(target); ecore_x_selection_converter_atom_add(x_target, func); -} /* ecore_x_selection_converter_add */ +} EAPI void ecore_x_selection_converter_atom_del(Ecore_X_Atom target) @@ -492,7 +492,7 @@ ecore_x_selection_converter_atom_del(Ecore_X_Atom target) prev_cnv = cnv; cnv = cnv->next; } -} /* ecore_x_selection_converter_atom_del */ +} EAPI void ecore_x_selection_converter_del(char *target) @@ -505,14 +505,14 @@ ecore_x_selection_converter_del(char *target) LOGFN(__FILE__, __LINE__, __FUNCTION__); x_target = _ecore_x_selection_target_atom_get(target); ecore_x_selection_converter_atom_del(x_target); -} /* ecore_x_selection_converter_del */ +} EAPI Eina_Bool ecore_x_selection_notify_send(Ecore_X_Window requestor, - Ecore_X_Atom selection, - Ecore_X_Atom target, - Ecore_X_Atom property, - Ecore_X_Time tim) + Ecore_X_Atom selection, + Ecore_X_Atom target, + Ecore_X_Atom property, + Ecore_X_Time tim) { XEvent xev; XSelectionEvent xnotify; @@ -530,16 +530,16 @@ ecore_x_selection_notify_send(Ecore_X_Window requestor, xev.xselection = xnotify; return (XSendEvent(_ecore_x_disp, requestor, False, 0, &xev) > 0) ? EINA_TRUE : EINA_FALSE; -} /* ecore_x_selection_notify_send */ +} /* Locate and run conversion callback for specified selection target */ EAPI Eina_Bool -ecore_x_selection_convert(Ecore_X_Atom selection, - Ecore_X_Atom target, - void **data_ret, - int *size, +ecore_x_selection_convert(Ecore_X_Atom selection, + Ecore_X_Atom target, + void **data_ret, + int *size, Ecore_X_Atom *targtype, - int *typesize) + int *typesize) { Ecore_X_Selection_Intern *sel; Ecore_X_Selection_Converter *cnv; @@ -572,24 +572,24 @@ ecore_x_selection_convert(Ecore_X_Atom selection, return EINA_FALSE; /* Default, just return the data - *data_ret = malloc(sel->length); + * data_ret = malloc(sel->length); memcpy(*data_ret, sel->data, sel->length); free(tgt_str); return 1; */ -} /* ecore_x_selection_convert */ +} /* TODO: We need to work out a mechanism for automatic conversion to any requested * locale using Ecore_Txt functions */ /* Converter for standard non-utf8 text targets */ static Eina_Bool -_ecore_x_selection_converter_text(char *target, - void *data, - int size, - void **data_ret, - int *size_ret, +_ecore_x_selection_converter_text(char *target, + void *data, + int size, + void **data_ret, + int *size_ret, Ecore_X_Atom *targprop __UNUSED__, - int *s __UNUSED__) + int *s __UNUSED__) { XTextProperty text_prop; char *mystr; @@ -651,7 +651,7 @@ _ecore_x_selection_converter_text(char *target, { return EINA_TRUE; } -} /* _ecore_x_selection_converter_text */ +} EAPI void ecore_x_selection_parser_add(const char *target, @@ -692,7 +692,7 @@ ecore_x_selection_parser_add(const char *target, prs->target = strdup(target); prs->parse = func; -} /* ecore_x_selection_parser_add */ +} EAPI void ecore_x_selection_parser_del(const char *target) @@ -726,19 +726,19 @@ ecore_x_selection_parser_del(const char *target) prev_prs = prs; prs = prs->next; } -} /* ecore_x_selection_parser_del */ +} /** * Change the owner and last-change time for the specified selection. * @param win The owner of the specified atom. * @param atom The selection atom - * @param time Specifies the time + * @param tim Specifies the time * @since 1.1.0 */ EAPI void ecore_x_selection_owner_set(Ecore_X_Window win, - Ecore_X_Atom atom, - Ecore_X_Time tim) + Ecore_X_Atom atom, + Ecore_X_Time tim) { XSetSelectionOwner(_ecore_x_disp, atom, win, tim); } @@ -760,9 +760,9 @@ ecore_x_selection_owner_get(Ecore_X_Atom atom) /* Locate and run conversion callback for specified selection target */ void * _ecore_x_selection_parse(const char *target, - void *data, - int size, - int format) + void *data, + int size, + int format) { Ecore_X_Selection_Parser *prs; Ecore_X_Selection_Data *sel; @@ -784,7 +784,7 @@ _ecore_x_selection_parse(const char *target, sel->format = format; sel->data = data; return sel; -} /* _ecore_x_selection_parse */ +} static int _ecore_x_selection_data_default_free(void *data) @@ -795,13 +795,13 @@ _ecore_x_selection_data_default_free(void *data) free(sel->data); free(sel); return 1; -} /* _ecore_x_selection_data_default_free */ +} static void * _ecore_x_selection_parser_files(const char *target, - void *_data, - int size, - int format __UNUSED__) + void *_data, + int size, + int format __UNUSED__) { Ecore_X_Selection_Data_Files *sel; char *t, *data = _data; @@ -820,15 +820,15 @@ _ecore_x_selection_parser_files(const char *target, if (data[size - 1]) { /* Isn't nul terminated */ - size++; - t = realloc(data, size); - if (!t) - { - free(sel); - return NULL; - } - data = t; - data[size - 1] = 0; + size++; + t = realloc(data, size); + if (!t) + { + free(sel); + return NULL; + } + data = t; + data[size - 1] = 0; } tmp = malloc(size); @@ -850,7 +850,8 @@ _ecore_x_selection_parser_files(const char *target, tmp[i++] = data[is++]; else { - while ((data[is] == '\r') || (data[is] == '\n')) is++; + while ((data[is] == '\r') || (data[is] == '\n')) + is++; tmp[i] = 0; sel->num_files++; t2 = realloc(sel->files, sel->num_files * sizeof(char *)); @@ -883,7 +884,7 @@ _ecore_x_selection_parser_files(const char *target, ECORE_X_SELECTION_DATA(sel)->length = sel->num_files; return ECORE_X_SELECTION_DATA(sel); -} /* _ecore_x_selection_parser_files */ +} static int _ecore_x_selection_data_files_free(void *data) @@ -901,13 +902,13 @@ _ecore_x_selection_data_files_free(void *data) free(sel); return 0; -} /* _ecore_x_selection_data_files_free */ +} static void * _ecore_x_selection_parser_text(const char *target __UNUSED__, - void *_data, - int size, - int format __UNUSED__) + void *_data, + int size, + int format __UNUSED__) { Ecore_X_Selection_Data_Text *sel; unsigned char *data = _data; @@ -918,15 +919,15 @@ _ecore_x_selection_parser_text(const char *target __UNUSED__, if (data[size - 1]) { /* Isn't nul terminated */ - size++; - t = realloc(data, size); - if (!t) - { - free(sel); - return NULL; - } - data = t; - data[size - 1] = 0; + size++; + t = realloc(data, size); + if (!t) + { + free(sel); + return NULL; + } + data = t; + data[size - 1] = 0; } sel->text = (char *)data; @@ -935,7 +936,7 @@ _ecore_x_selection_parser_text(const char *target __UNUSED__, ECORE_X_SELECTION_DATA(sel)->data = data; ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_text_free; return sel; -} /* _ecore_x_selection_parser_text */ +} static int _ecore_x_selection_data_text_free(void *data) @@ -946,13 +947,13 @@ _ecore_x_selection_data_text_free(void *data) free(sel->text); free(sel); return 1; -} /* _ecore_x_selection_data_text_free */ +} static void * _ecore_x_selection_parser_targets(const char *target __UNUSED__, - void *data, - int size, - int format __UNUSED__) + void *data, + int size, + int format __UNUSED__) { Ecore_X_Selection_Data_Targets *sel; unsigned long *targets; @@ -977,7 +978,7 @@ _ecore_x_selection_parser_targets(const char *target __UNUSED__, ECORE_X_SELECTION_DATA(sel)->length = size; ECORE_X_SELECTION_DATA(sel)->data = data; return sel; -} /* _ecore_x_selection_parser_targets */ +} static int _ecore_x_selection_data_targets_free(void *data) @@ -997,5 +998,5 @@ _ecore_x_selection_data_targets_free(void *data) free(ECORE_X_SELECTION_DATA(sel)->data); free(sel); return 1; -} /* _ecore_x_selection_data_targets_free */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_sync.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_sync.c index e49fede..0c7f546 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_sync.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_sync.c @@ -42,18 +42,18 @@ ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter) ecore_x_sync(); return alarm; -} /* ecore_x_sync_alarm_new */ +} EAPI Eina_Bool ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return XSyncDestroyAlarm(_ecore_x_disp, alarm); -} /* ecore_x_sync_alarm_free */ +} EAPI Eina_Bool ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, - unsigned int *val) + unsigned int *val) { XSyncValue value; @@ -65,7 +65,7 @@ ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, } return EINA_FALSE; -} /* ecore_x_sync_counter_query */ +} EAPI Ecore_X_Sync_Counter ecore_x_sync_counter_new(int val) @@ -77,29 +77,29 @@ ecore_x_sync_counter_new(int val) XSyncIntToValue(&v, val); counter = XSyncCreateCounter(_ecore_x_disp, v); return counter; -} /* ecore_x_sync_counter_new */ +} EAPI void ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XSyncDestroyCounter(_ecore_x_disp, counter); -} /* ecore_x_sync_counter_free */ +} EAPI void ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, - int by) + int by) { XSyncValue v; LOGFN(__FILE__, __LINE__, __FUNCTION__); XSyncIntToValue(&v, by); XSyncChangeCounter(_ecore_x_disp, counter, v); -} /* ecore_x_sync_counter_inc */ +} EAPI void ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, - int val) + int val) { XSyncWaitCondition cond; XSyncValue v, v2; @@ -115,11 +115,11 @@ ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, cond.event_threshold = v2; XSyncAwait(_ecore_x_disp, &cond, 1); // XSync(_ecore_x_disp, False); // dont need this -} /* ecore_x_sync_counter_val_wait */ +} EAPI void ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, - int val) + int val) { XSyncValue v; @@ -130,8 +130,8 @@ ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, EAPI void ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, - int val_hi, - unsigned int val_lo) + int val_hi, + unsigned int val_lo) { XSyncValue v; @@ -142,8 +142,8 @@ ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, EAPI Eina_Bool ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter, - int *val_hi, - unsigned int *val_lo) + int *val_hi, + unsigned int *val_lo) { XSyncValue value; 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 c4576f9..c8c04e4 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 @@ -42,7 +42,7 @@ ecore_x_test_fake_key_down(const char *key __UNUSED__) #else /* ifdef ECORE_XTEST */ return EINA_FALSE; #endif /* ifdef ECORE_XTEST */ -} /* ecore_x_test_fake_key_down */ +} EAPI Eina_Bool #ifdef ECORE_XTEST @@ -74,7 +74,7 @@ ecore_x_test_fake_key_up(const char *key __UNUSED__) #else /* ifdef ECORE_XTEST */ return EINA_FALSE; #endif /* ifdef ECORE_XTEST */ -} /* ecore_x_test_fake_key_up */ +} EAPI Eina_Bool #ifdef ECORE_XTEST @@ -145,11 +145,11 @@ ecore_x_test_fake_key_press(const char *key __UNUSED__) #else /* ifdef ECORE_XTEST */ return EINA_FALSE; #endif /* ifdef ECORE_XTEST */ -} /* ecore_x_test_fake_key_press */ +} EAPI const char * ecore_x_keysym_string_get(int keysym) { return XKeysymToString(keysym); -} /* ecore_x_keysym_string_get */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_vsync.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_vsync.c index f054298..4296bb2 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_vsync.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_vsync.c @@ -61,40 +61,40 @@ typedef union _drmVBlank typedef struct _drmEventContext { int version; - void (*vblank_handler)(int fd, + void (*vblank_handler)(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, - void *user_data); - void (*page_flip_handler)(int fd, + void *user_data); + void (*page_flip_handler)(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, - void *user_data); + void *user_data); } drmEventContext; static int (*sym_drmClose)(int fd) = NULL; -static int (*sym_drmGetMagic)(int fd, +static int (*sym_drmGetMagic)(int fd, drm_magic_t *magic) = NULL; -static int (*sym_drmWaitVBlank)(int fd, +static int (*sym_drmWaitVBlank)(int fd, drmVBlank *vbl) = NULL; -static int (*sym_drmHandleEvent)(int fd, +static int (*sym_drmHandleEvent)(int fd, drmEventContext *evctx) = NULL; //// dri static Bool (*sym_DRI2QueryExtension)(Display *display, - int *eventBase, - int *errorBase) = NULL; + int *eventBase, + int *errorBase) = NULL; static Bool (*sym_DRI2QueryVersion)(Display *display, - int *major, - int *minor) = NULL; + int *major, + int *minor) = NULL; static Bool (*sym_DRI2Connect)(Display *display, - XID window, - char **driverName, - char **deviceName) = NULL; -static Bool (*sym_DRI2Authenticate)(Display *display, - XID window, + XID window, + char **driverName, + char **deviceName) = NULL; +static Bool (*sym_DRI2Authenticate)(Display *display, + XID window, drm_magic_t magic) = NULL; //// dri/drm data needed @@ -142,18 +142,18 @@ _dri_drm_tick_end(void *data __UNUSED__) } static void -_dri_drm_vblank_handler(int fd __UNUSED__, +_dri_drm_vblank_handler(int fd __UNUSED__, unsigned int frame __UNUSED__, unsigned int sec __UNUSED__, unsigned int usec __UNUSED__, - void *data __UNUSED__) + void *data __UNUSED__) { ecore_animator_custom_tick(); if (drm_event_is_busy) _dri_drm_tick_schedule(); } static Eina_Bool -_dri_drm_cb(void *data __UNUSED__, +_dri_drm_cb(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UNUSED__) { sym_drmHandleEvent(drm_fd, &drm_evctx); 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 76670d3..1adb36b 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 @@ -33,10 +33,10 @@ static Ecore_X_Window *ignore_list = NULL; */ EAPI Ecore_X_Window ecore_x_window_new(Ecore_X_Window parent, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { Window win; XSetWindowAttributes attr; @@ -87,7 +87,7 @@ ecore_x_window_new(Ecore_X_Window parent, ecore_x_window_defaults_set(win); return win; -} /* ecore_x_window_new */ +} /** * Creates a window with the override redirect attribute set to @c True. @@ -102,10 +102,10 @@ ecore_x_window_new(Ecore_X_Window parent, */ EAPI Ecore_X_Window ecore_x_window_override_new(Ecore_X_Window parent, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { Window win; XSetWindowAttributes attr; @@ -152,7 +152,7 @@ ecore_x_window_override_new(Ecore_X_Window parent, CWWinGravity, &attr); return win; -} /* ecore_x_window_override_new */ +} /** * Creates a new input window. @@ -167,10 +167,10 @@ ecore_x_window_override_new(Ecore_X_Window parent, */ EAPI Ecore_X_Window ecore_x_window_input_new(Ecore_X_Window parent, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { Window win; XSetWindowAttributes attr; @@ -209,7 +209,7 @@ ecore_x_window_input_new(Ecore_X_Window parent, } return win; -} /* ecore_x_window_input_new */ +} /** * @defgroup Ecore_X_Window_Properties_Group X Window Property Functions @@ -263,18 +263,18 @@ ecore_x_window_defaults_set(Ecore_X_Window win) ecore_app_args_get(&argc, &argv); ecore_x_icccm_command_set(win, argc, argv); -} /* ecore_x_window_defaults_set */ +} EAPI void -ecore_x_window_configure(Ecore_X_Window win, +ecore_x_window_configure(Ecore_X_Window win, Ecore_X_Window_Configure_Mask mask, - int x, - int y, - int w, - int h, - int border_width, - Ecore_X_Window sibling, - int stack_mode) + int x, + int y, + int w, + int h, + int border_width, + Ecore_X_Window sibling, + int stack_mode) { XWindowChanges xwc; @@ -292,7 +292,7 @@ ecore_x_window_configure(Ecore_X_Window win, xwc.stack_mode = stack_mode; XConfigureWindow(_ecore_x_disp, win, mask, &xwc); -} /* ecore_x_window_configure */ +} /** * @defgroup Ecore_X_Window_Destroy_Group X Window Destroy Functions @@ -311,10 +311,10 @@ ecore_x_window_free(Ecore_X_Window win) /* sorry sir, deleting the root window doesn't sound like * a smart idea. */ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - if (win) - XDestroyWindow(_ecore_x_disp, win); -} /* ecore_x_window_free */ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + if (win) + XDestroyWindow(_ecore_x_disp, win); +} /** * Set if a window should be ignored. @@ -323,7 +323,7 @@ ecore_x_window_free(Ecore_X_Window win) */ EAPI void ecore_x_window_ignore_set(Ecore_X_Window win, - int ignore) + int ignore) { int i, j, cnt; Ecore_X_Window *t; @@ -373,7 +373,7 @@ ecore_x_window_ignore_set(Ecore_X_Window win, t = realloc(ignore_list, ignore_num * sizeof(Ecore_X_Window)); if (t) ignore_list = t; } -} /* ecore_x_window_ignore_set */ +} /** * Get the ignore list @@ -387,7 +387,7 @@ ecore_x_window_ignore_list(int *num) *num = ignore_num; return ignore_list; -} /* ecore_x_window_ignore_list */ +} /** * Sends a delete request to the given window. @@ -415,7 +415,7 @@ ecore_x_window_delete_request_send(Ecore_X_Window win) xev.xclient.data.l[1] = CurrentTime; XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev); -} /* ecore_x_window_delete_request_send */ +} /** * @defgroup Ecore_X_Window_Visibility_Group X Window Visibility Functions @@ -436,7 +436,7 @@ ecore_x_window_show(Ecore_X_Window win) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XMapWindow(_ecore_x_disp, win); -} /* ecore_x_window_show */ +} /** * Hides a window. @@ -480,7 +480,7 @@ ecore_x_window_hide(Ecore_X_Window win) XSendEvent(_ecore_x_disp, xev.xunmap.event, False, SubstructureRedirectMask | SubstructureNotifyMask, &xev); XUnmapWindow(_ecore_x_disp, win); -} /* ecore_x_window_hide */ +} /** * @defgroup Ecore_X_Window_Geometry_Group X Window Geometry Functions @@ -501,12 +501,12 @@ ecore_x_window_hide(Ecore_X_Window win) */ EAPI void ecore_x_window_move(Ecore_X_Window win, - int x, - int y) + int x, + int y) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XMoveWindow(_ecore_x_disp, win, x, y); -} /* ecore_x_window_move */ +} /** * Resizes a window. @@ -517,8 +517,8 @@ ecore_x_window_move(Ecore_X_Window win, */ EAPI void ecore_x_window_resize(Ecore_X_Window win, - int w, - int h) + int w, + int h) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (w < 1) @@ -528,7 +528,7 @@ ecore_x_window_resize(Ecore_X_Window win, h = 1; XResizeWindow(_ecore_x_disp, win, w, h); -} /* ecore_x_window_resize */ +} /** * Moves and resizes a window. @@ -541,10 +541,10 @@ ecore_x_window_resize(Ecore_X_Window win, */ EAPI void ecore_x_window_move_resize(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (w < 1) @@ -554,7 +554,7 @@ ecore_x_window_move_resize(Ecore_X_Window win, h = 1; XMoveResizeWindow(_ecore_x_disp, win, x, y, w, h); -} /* ecore_x_window_move_resize */ +} /** * @defgroup Ecore_X_Window_Focus_Functions X Window Focus Functions @@ -576,7 +576,7 @@ ecore_x_window_focus(Ecore_X_Window win) // XSetInputFocus(_ecore_x_disp, win, RevertToPointerRoot, CurrentTime); XSetInputFocus(_ecore_x_disp, win, RevertToParent, CurrentTime); -} /* ecore_x_window_focus */ +} /** * Sets the focus to the given window at a specific time. @@ -586,7 +586,7 @@ ecore_x_window_focus(Ecore_X_Window win) */ EAPI void ecore_x_window_focus_at_time(Ecore_X_Window win, - Ecore_X_Time t) + Ecore_X_Time t) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (win == 0) @@ -594,7 +594,7 @@ ecore_x_window_focus_at_time(Ecore_X_Window win, // XSetInputFocus(_ecore_x_disp, win, PointerRoot, t); XSetInputFocus(_ecore_x_disp, win, RevertToParent, t); -} /* ecore_x_window_focus_at_time */ +} /** * gets the focus to the window @p win. @@ -611,7 +611,7 @@ ecore_x_window_focus_get(void) win = 0; XGetInputFocus(_ecore_x_disp, &win, &revert_mode); return win; -} /* ecore_x_window_focus_get */ +} /** * @defgroup Ecore_X_Window_Z_Order_Group X Window Z Order Functions @@ -629,7 +629,7 @@ ecore_x_window_raise(Ecore_X_Window win) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XRaiseWindow(_ecore_x_disp, win); -} /* ecore_x_window_raise */ +} /** * Lowers the given window. @@ -641,7 +641,7 @@ ecore_x_window_lower(Ecore_X_Window win) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XLowerWindow(_ecore_x_disp, win); -} /* ecore_x_window_lower */ +} /** * @defgroup Ecore_X_Window_Parent_Group X Window Parent Functions @@ -660,15 +660,15 @@ ecore_x_window_lower(Ecore_X_Window win) EAPI void ecore_x_window_reparent(Ecore_X_Window win, Ecore_X_Window new_parent, - int x, - int y) + int x, + int y) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (new_parent == 0) new_parent = DefaultRootWindow(_ecore_x_disp); XReparentWindow(_ecore_x_disp, win, new_parent, x, y); -} /* ecore_x_window_reparent */ +} /** * Retrieves the size of the given window. @@ -679,8 +679,8 @@ ecore_x_window_reparent(Ecore_X_Window win, */ EAPI void ecore_x_window_size_get(Ecore_X_Window win, - int *w, - int *h) + int *w, + int *h) { int dummy_x, dummy_y; @@ -689,7 +689,7 @@ ecore_x_window_size_get(Ecore_X_Window win, win = DefaultRootWindow(_ecore_x_disp); ecore_x_drawable_geometry_get(win, &dummy_x, &dummy_y, w, h); -} /* ecore_x_window_size_get */ +} /** * Retrieves the geometry of the given window. @@ -709,17 +709,17 @@ ecore_x_window_size_get(Ecore_X_Window win, */ EAPI void ecore_x_window_geometry_get(Ecore_X_Window win, - int *x, - int *y, - int *w, - int *h) + int *x, + int *y, + int *w, + int *h) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!win) win = DefaultRootWindow(_ecore_x_disp); ecore_x_drawable_geometry_get(win, x, y, w, h); -} /* ecore_x_window_geometry_get */ +} /** * Retrieves the width of the border of the given window. @@ -736,7 +736,7 @@ ecore_x_window_border_width_get(Ecore_X_Window win) return 0; return ecore_x_drawable_border_width_get(win); -} /* ecore_x_window_border_width_get */ +} /** * Sets the width of the border of the given window. @@ -746,7 +746,7 @@ ecore_x_window_border_width_get(Ecore_X_Window win) */ EAPI void ecore_x_window_border_width_set(Ecore_X_Window win, - int width) + int width) { LOGFN(__FILE__, __LINE__, __FUNCTION__); /* doesn't make sense to call this on a root window */ @@ -754,7 +754,7 @@ ecore_x_window_border_width_set(Ecore_X_Window win, return; XSetWindowBorderWidth (_ecore_x_disp, win, width); -} /* ecore_x_window_border_width_set */ +} /** * Retrieves the depth of the given window. @@ -766,7 +766,7 @@ ecore_x_window_depth_get(Ecore_X_Window win) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return ecore_x_drawable_depth_get(win); -} /* ecore_x_window_depth_get */ +} /** * To be documented. @@ -775,7 +775,7 @@ ecore_x_window_depth_get(Ecore_X_Window win) */ EAPI void ecore_x_window_cursor_show(Ecore_X_Window win, - Eina_Bool show) + Eina_Bool show) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (win == 0) @@ -803,7 +803,7 @@ ecore_x_window_cursor_show(Ecore_X_Window win, } else XDefineCursor(_ecore_x_disp, win, 0); -} /* ecore_x_window_cursor_show */ +} EAPI void ecore_x_window_cursor_set(Ecore_X_Window win, @@ -814,7 +814,7 @@ ecore_x_window_cursor_set(Ecore_X_Window win, XUndefineCursor(_ecore_x_disp, win); else XDefineCursor(_ecore_x_disp, win, c); -} /* ecore_x_window_cursor_set */ +} /** * Finds out whether the given window is currently visible. @@ -830,7 +830,7 @@ ecore_x_window_visible_get(Ecore_X_Window win) LOGFN(__FILE__, __LINE__, __FUNCTION__); return XGetWindowAttributes(_ecore_x_disp, win, &attr) && (attr.map_state == IsViewable); -} /* ecore_x_window_visible_get */ +} typedef struct _Shadow Shadow; struct _Shadow @@ -914,7 +914,7 @@ _ecore_x_window_tree_walk(Window win) XFree(list); return s; -} /* _ecore_x_window_tree_walk */ +} static void _ecore_x_window_tree_shadow_free1(Shadow *s) @@ -935,7 +935,7 @@ _ecore_x_window_tree_shadow_free1(Shadow *s) } free(s); -} /* _ecore_x_window_tree_shadow_free1 */ +} static void _ecore_x_window_tree_shadow_free(void) @@ -955,7 +955,7 @@ _ecore_x_window_tree_shadow_free(void) free(shadow_base); shadow_base = NULL; shadow_num = 0; -} /* _ecore_x_window_tree_shadow_free */ +} static void _ecore_x_window_tree_shadow_populate(void) @@ -976,7 +976,7 @@ _ecore_x_window_tree_shadow_populate(void) free(roots); } -} /* _ecore_x_window_tree_shadow_populate */ +} /* static int shadow_count = 0; @@ -1000,7 +1000,7 @@ _ecore_x_window_tree_shadow_populate(void) static Shadow * _ecore_x_window_shadow_tree_find_shadow(Shadow *s, - Window win) + Window win) { Shadow *ss; int i; @@ -1020,7 +1020,7 @@ _ecore_x_window_shadow_tree_find_shadow(Shadow *s, } return NULL; -} /* _ecore_x_window_shadow_tree_find_shadow */ +} static Shadow * _ecore_x_window_shadow_tree_find(Window base) @@ -1037,16 +1037,16 @@ _ecore_x_window_shadow_tree_find(Window base) return s; } return NULL; -} /* _ecore_x_window_shadow_tree_find */ +} static int -_inside_rects(Shadow *s, - int x, - int y, - int bx, - int by, +_inside_rects(Shadow *s, + int x, + int y, + int bx, + int by, Ecore_X_Rectangle *rects, - int num) + int num) { int i, inside; @@ -1068,13 +1068,13 @@ _inside_rects(Shadow *s, } static Window -_ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow *s, - int bx, - int by, - int x, - int y, +_ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow *s, + int bx, + int by, + int x, + int y, Ecore_X_Window *skip, - int skip_num) + int skip_num) { Window child; int i, j; @@ -1131,16 +1131,16 @@ onward: } return s->win; -} /* _ecore_x_window_shadow_tree_at_xy_get_shadow */ +} static Window -_ecore_x_window_shadow_tree_at_xy_get(Window base, - int bx, - int by, - int x, - int y, +_ecore_x_window_shadow_tree_at_xy_get(Window base, + int bx, + int by, + int x, + int y, Ecore_X_Window *skip, - int skip_num) + int skip_num) { Shadow *s; @@ -1162,7 +1162,7 @@ _ecore_x_window_shadow_tree_at_xy_get(Window base, y, skip, skip_num); -} /* _ecore_x_window_shadow_tree_at_xy_get */ +} /** * Retrieves the top, visible window at the given location, @@ -1177,11 +1177,11 @@ _ecore_x_window_shadow_tree_at_xy_get(Window base, * @ingroup Ecore_X_Window_Geometry_Group */ EAPI Ecore_X_Window -ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base, - int x, - int y, +ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base, + int x, + int y, Ecore_X_Window *skip, - int skip_num) + int skip_num) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return _ecore_x_window_shadow_tree_at_xy_get(base, @@ -1191,7 +1191,7 @@ ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base, y, skip, skip_num); -} /* ecore_x_window_shadow_tree_at_xy_with_skip_get */ +} /** * Retrieves the parent window a given window has. This uses the shadow window @@ -1231,7 +1231,7 @@ ecore_x_window_shadow_parent_get(Ecore_X_Window root __UNUSED__, } } return 0; -} /* ecore_x_window_shadow_parent_get */ +} /** * Flushes the window shadow tree so nothing is stored. @@ -1242,7 +1242,7 @@ ecore_x_window_shadow_tree_flush(void) { LOGFN(__FILE__, __LINE__, __FUNCTION__); _ecore_x_window_tree_shadow_free(); -} /* ecore_x_window_shadow_tree_flush */ +} /** * Retrieves the root window a given window is on. @@ -1260,16 +1260,16 @@ ecore_x_window_root_get(Ecore_X_Window win) return 0; return att.root; -} /* ecore_x_window_root_get */ +} static Window -_ecore_x_window_at_xy_get(Window base, - int bx, - int by, - int x, - int y, +_ecore_x_window_at_xy_get(Window base, + int bx, + int by, + int x, + int y, Ecore_X_Window *skip, - int skip_num) + int skip_num) { Window *list = NULL; Window parent_win = 0, child = 0, root_win = 0; @@ -1324,7 +1324,7 @@ onward: } return base; -} /* _ecore_x_window_at_xy_get */ +} /** * Retrieves the top, visible window at the given location. @@ -1349,7 +1349,7 @@ ecore_x_window_at_xy_get(int x, ecore_x_ungrab(); return win ? win : root; -} /* ecore_x_window_at_xy_get */ +} /** * Retrieves the top, visible window at the given location, @@ -1360,10 +1360,10 @@ ecore_x_window_at_xy_get(int x, * @ingroup Ecore_X_Window_Geometry_Group */ EAPI Ecore_X_Window -ecore_x_window_at_xy_with_skip_get(int x, - int y, +ecore_x_window_at_xy_with_skip_get(int x, + int y, Ecore_X_Window *skip, - int skip_num) + int skip_num) { Ecore_X_Window win, root; @@ -1377,12 +1377,12 @@ ecore_x_window_at_xy_with_skip_get(int x, ecore_x_ungrab(); return win ? win : root; -} /* ecore_x_window_at_xy_with_skip_get */ +} EAPI Ecore_X_Window ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, - int x, - int y) + int x, + int y) { Ecore_X_Window win; @@ -1392,7 +1392,7 @@ ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, ecore_x_ungrab(); return win ? win : begin; -} /* ecore_x_window_at_xy_begin_get */ +} /** * Retrieves the parent window of the given window. @@ -1414,7 +1414,7 @@ ecore_x_window_parent_get(Ecore_X_Window win) XFree(children); return parent; -} /* ecore_x_window_parent_get */ +} /** * Sets the background color of the given window. @@ -1443,10 +1443,10 @@ ecore_x_window_background_color_set(Ecore_X_Window win, attr.background_pixel = col.pixel; XChangeWindowAttributes(_ecore_x_disp, win, CWBackPixel, &attr); -} /* ecore_x_window_background_color_set */ +} EAPI void -ecore_x_window_gravity_set(Ecore_X_Window win, +ecore_x_window_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav) { XSetWindowAttributes att; @@ -1454,10 +1454,10 @@ ecore_x_window_gravity_set(Ecore_X_Window win, LOGFN(__FILE__, __LINE__, __FUNCTION__); att.win_gravity = grav; XChangeWindowAttributes(_ecore_x_disp, win, CWWinGravity, &att); -} /* ecore_x_window_gravity_set */ +} EAPI void -ecore_x_window_pixel_gravity_set(Ecore_X_Window win, +ecore_x_window_pixel_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav) { XSetWindowAttributes att; @@ -1465,7 +1465,7 @@ ecore_x_window_pixel_gravity_set(Ecore_X_Window win, LOGFN(__FILE__, __LINE__, __FUNCTION__); att.bit_gravity = grav; XChangeWindowAttributes(_ecore_x_disp, win, CWBitGravity, &att); -} /* ecore_x_window_pixel_gravity_set */ +} EAPI void ecore_x_window_pixmap_set(Ecore_X_Window win, @@ -1473,50 +1473,50 @@ ecore_x_window_pixmap_set(Ecore_X_Window win, { LOGFN(__FILE__, __LINE__, __FUNCTION__); XSetWindowBackgroundPixmap(_ecore_x_disp, win, pmap); -} /* ecore_x_window_pixmap_set */ +} EAPI void ecore_x_window_area_clear(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XClearArea(_ecore_x_disp, win, x, y, w, h, False); -} /* ecore_x_window_area_clear */ +} EAPI void ecore_x_window_area_expose(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XClearArea(_ecore_x_disp, win, x, y, w, h, True); -} /* ecore_x_window_area_expose */ +} EAPI void ecore_x_window_override_set(Ecore_X_Window win, - Eina_Bool override) + Eina_Bool override) { XSetWindowAttributes att; LOGFN(__FILE__, __LINE__, __FUNCTION__); att.override_redirect = override; XChangeWindowAttributes(_ecore_x_disp, win, CWOverrideRedirect, &att); -} /* ecore_x_window_override_set */ +} #ifdef ECORE_XRENDER static Ecore_X_Window _ecore_x_window_argb_internal_new(Ecore_X_Window parent, - int x, - int y, - int w, - int h, - Eina_Bool override, - Eina_Bool saveunder) + int x, + int y, + int w, + int h, + Eina_Bool override, + Eina_Bool saveunder) { Window win; XSetWindowAttributes attr; @@ -1535,15 +1535,15 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent, else { /* ewww - round trip */ - XGetWindowAttributes(_ecore_x_disp, parent, &att); - for (i = 0; i < ScreenCount(_ecore_x_disp); i++) - { - if (att.screen == ScreenOfDisplay(_ecore_x_disp, i)) - { - scr = i; - break; - } - } + XGetWindowAttributes(_ecore_x_disp, parent, &att); + for (i = 0; i < ScreenCount(_ecore_x_disp); i++) + { + if (att.screen == ScreenOfDisplay(_ecore_x_disp, i)) + { + scr = i; + break; + } + } } vi_in.screen = scr; @@ -1615,7 +1615,7 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent, ecore_x_window_defaults_set(win); return win; -} /* _ecore_x_window_argb_internal_new */ +} #endif /* ifdef ECORE_XRENDER */ @@ -1641,7 +1641,7 @@ ecore_x_window_argb_get(Ecore_X_Window win) #else /* ifdef ECORE_XRENDER */ return 0; #endif /* ifdef ECORE_XRENDER */ -} /* ecore_x_window_argb_get */ +} /** * Creates a new window. @@ -1656,10 +1656,10 @@ ecore_x_window_argb_get(Ecore_X_Window win) */ EAPI Ecore_X_Window ecore_x_window_manager_argb_new(Ecore_X_Window parent, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { #ifdef ECORE_XRENDER LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -1667,7 +1667,7 @@ ecore_x_window_manager_argb_new(Ecore_X_Window parent, #else /* ifdef ECORE_XRENDER */ return 0; #endif /* ifdef ECORE_XRENDER */ -} /* ecore_x_window_manager_argb_new */ +} /** * Creates a new window. @@ -1682,10 +1682,10 @@ ecore_x_window_manager_argb_new(Ecore_X_Window parent, */ EAPI Ecore_X_Window ecore_x_window_argb_new(Ecore_X_Window parent, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { #ifdef ECORE_XRENDER LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -1693,7 +1693,7 @@ ecore_x_window_argb_new(Ecore_X_Window parent, #else /* ifdef ECORE_XRENDER */ return 0; #endif /* ifdef ECORE_XRENDER */ -} /* ecore_x_window_argb_new */ +} /** * Creates a window with the override redirect attribute set to @c True. @@ -1708,10 +1708,10 @@ ecore_x_window_argb_new(Ecore_X_Window parent, */ EAPI Ecore_X_Window ecore_x_window_override_argb_new(Ecore_X_Window parent, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { #ifdef ECORE_XRENDER LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -1719,5 +1719,5 @@ ecore_x_window_override_argb_new(Ecore_X_Window parent, #else /* ifdef ECORE_XRENDER */ return 0; #endif /* ifdef ECORE_XRENDER */ -} /* ecore_x_window_override_argb_new */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c index 8d5c757..b581a0e 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c @@ -21,9 +21,9 @@ */ EAPI void ecore_x_window_prop_card32_set(Ecore_X_Window win, - Ecore_X_Atom atom, - unsigned int *val, - unsigned int num) + Ecore_X_Atom atom, + unsigned int *val, + unsigned int num) { #if SIZEOF_INT == SIZEOF_LONG _ATOM_SET_CARD32(win, atom, val, num); @@ -41,7 +41,7 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, _ATOM_SET_CARD32(win, atom, v2, num); free(v2); #endif /* if SIZEOF_INT == SIZEOF_LONG */ -} /* ecore_x_window_prop_card32_set */ +} /* * Get CARD32 (array) property @@ -53,9 +53,9 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, */ EAPI int ecore_x_window_prop_card32_get(Ecore_X_Window win, - Ecore_X_Atom atom, - unsigned int *val, - unsigned int len) + Ecore_X_Atom atom, + unsigned int *val, + unsigned int len) { unsigned char *prop_ret; Atom type_ret; @@ -89,7 +89,7 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win, XFree(prop_ret); return num; -} /* ecore_x_window_prop_card32_get */ +} /* * Get CARD32 (array) property of any length @@ -100,7 +100,7 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win, */ EAPI int ecore_x_window_prop_card32_list_get(Ecore_X_Window win, - Ecore_X_Atom atom, + Ecore_X_Atom atom, unsigned int **plst) { unsigned char *prop_ret; @@ -125,7 +125,7 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, else { val = malloc(num_ret * sizeof(unsigned int)); - if (!val) + if (!val) { if (prop_ret) XFree(prop_ret); return -1; @@ -140,17 +140,17 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, XFree(prop_ret); return num; -} /* ecore_x_window_prop_card32_list_get */ +} /* * Set X ID (array) property */ EAPI void ecore_x_window_prop_xid_set(Ecore_X_Window win, - Ecore_X_Atom atom, - Ecore_X_Atom type, - Ecore_X_ID *lst, - unsigned int num) + Ecore_X_Atom atom, + Ecore_X_Atom type, + Ecore_X_ID *lst, + unsigned int num) { #if SIZEOF_INT == SIZEOF_LONG XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace, @@ -170,7 +170,7 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, (unsigned char *)pl, num); free(pl); #endif /* if SIZEOF_INT == SIZEOF_LONG */ -} /* ecore_x_window_prop_xid_set */ +} /* * Get X ID (array) property @@ -182,10 +182,10 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, */ EAPI int ecore_x_window_prop_xid_get(Ecore_X_Window win, - Ecore_X_Atom atom, - Ecore_X_Atom type, - Ecore_X_ID *lst, - unsigned int len) + Ecore_X_Atom atom, + Ecore_X_Atom type, + Ecore_X_ID *lst, + unsigned int len) { unsigned char *prop_ret; Atom type_ret; @@ -219,7 +219,7 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win, XFree(prop_ret); return num; -} /* ecore_x_window_prop_xid_get */ +} /* * Get X ID (array) property @@ -231,9 +231,9 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win, */ EAPI int ecore_x_window_prop_xid_list_get(Ecore_X_Window win, - Ecore_X_Atom atom, - Ecore_X_Atom type, - Ecore_X_ID **val) + Ecore_X_Atom atom, + Ecore_X_Atom type, + Ecore_X_ID **val) { unsigned char *prop_ret; Atom type_ret; @@ -268,17 +268,17 @@ ecore_x_window_prop_xid_list_get(Ecore_X_Window win, XFree(prop_ret); return num; -} /* ecore_x_window_prop_xid_list_get */ +} /* * Remove/add/toggle X ID list item. */ EAPI void ecore_x_window_prop_xid_list_change(Ecore_X_Window win, - Ecore_X_Atom atom, - Ecore_X_Atom type, - Ecore_X_ID item, - int op) + Ecore_X_Atom atom, + Ecore_X_Atom type, + Ecore_X_ID item, + int op) { Ecore_X_ID *lst; int i, num; @@ -300,22 +300,22 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, if (i < num) { /* Was in list */ - if (op == ECORE_X_PROP_LIST_ADD) - goto done; /* Remove it */ + if (op == ECORE_X_PROP_LIST_ADD) + goto done; /* Remove it */ - num--; - for (; i < num; i++) - lst[i] = lst[i + 1]; + num--; + for (; i < num; i++) + lst[i] = lst[i + 1]; } else { /* Was not in list */ - if (op == ECORE_X_PROP_LIST_REMOVE) - goto done; /* Add it */ + if (op == ECORE_X_PROP_LIST_REMOVE) + goto done; /* Add it */ - num++; - lst = realloc(lst, num * sizeof(Ecore_X_ID)); - lst[i] = item; + num++; + lst = realloc(lst, num * sizeof(Ecore_X_ID)); + lst[i] = item; } ecore_x_window_prop_xid_set(win, atom, type, lst, num); @@ -323,20 +323,20 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, done: if (lst) free(lst); -} /* ecore_x_window_prop_xid_list_change */ +} /* * Set Atom (array) property */ EAPI void ecore_x_window_prop_atom_set(Ecore_X_Window win, - Ecore_X_Atom atom, - Ecore_X_Atom *lst, - unsigned int num) + Ecore_X_Atom atom, + Ecore_X_Atom *lst, + unsigned int num) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_xid_set(win, atom, XA_ATOM, lst, num); -} /* ecore_x_window_prop_atom_set */ +} /* * Get Atom (array) property @@ -348,13 +348,13 @@ ecore_x_window_prop_atom_set(Ecore_X_Window win, */ EAPI int ecore_x_window_prop_atom_get(Ecore_X_Window win, - Ecore_X_Atom atom, - Ecore_X_Atom *lst, - unsigned int len) + Ecore_X_Atom atom, + Ecore_X_Atom *lst, + unsigned int len) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return ecore_x_window_prop_xid_get(win, atom, XA_ATOM, lst, len); -} /* ecore_x_window_prop_atom_get */ +} /* * Get Atom (array) property @@ -366,38 +366,38 @@ ecore_x_window_prop_atom_get(Ecore_X_Window win, */ EAPI int ecore_x_window_prop_atom_list_get(Ecore_X_Window win, - Ecore_X_Atom atom, + Ecore_X_Atom atom, Ecore_X_Atom **plst) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return ecore_x_window_prop_xid_list_get(win, atom, XA_ATOM, plst); -} /* ecore_x_window_prop_atom_list_get */ +} /* * Remove/add/toggle atom list item. */ EAPI void ecore_x_window_prop_atom_list_change(Ecore_X_Window win, - Ecore_X_Atom atom, - Ecore_X_Atom item, - int op) + Ecore_X_Atom atom, + Ecore_X_Atom item, + int op) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_xid_list_change(win, atom, XA_ATOM, item, op); -} /* ecore_x_window_prop_atom_list_change */ +} /* * Set Window (array) property */ EAPI void -ecore_x_window_prop_window_set(Ecore_X_Window win, - Ecore_X_Atom atom, +ecore_x_window_prop_window_set(Ecore_X_Window win, + Ecore_X_Atom atom, Ecore_X_Window *lst, - unsigned int num) + unsigned int num) { LOGFN(__FILE__, __LINE__, __FUNCTION__); ecore_x_window_prop_xid_set(win, atom, XA_WINDOW, lst, num); -} /* ecore_x_window_prop_window_set */ +} /* * Get Window (array) property @@ -408,14 +408,14 @@ ecore_x_window_prop_window_set(Ecore_X_Window win, * Note: Return value 0 means that the property exists but has no elements. */ EAPI int -ecore_x_window_prop_window_get(Ecore_X_Window win, - Ecore_X_Atom atom, +ecore_x_window_prop_window_get(Ecore_X_Window win, + Ecore_X_Atom atom, Ecore_X_Window *lst, - unsigned int len) + unsigned int len) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return ecore_x_window_prop_xid_get(win, atom, XA_WINDOW, lst, len); -} /* ecore_x_window_prop_window_get */ +} /* * Get Window (array) property @@ -426,13 +426,13 @@ ecore_x_window_prop_window_get(Ecore_X_Window win, * Note: Return value 0 means that the property exists but has no elements. */ EAPI int -ecore_x_window_prop_window_list_get(Ecore_X_Window win, - Ecore_X_Atom atom, +ecore_x_window_prop_window_list_get(Ecore_X_Window win, + Ecore_X_Atom atom, Ecore_X_Window **plst) { LOGFN(__FILE__, __LINE__, __FUNCTION__); return ecore_x_window_prop_xid_list_get(win, atom, XA_WINDOW, plst); -} /* ecore_x_window_prop_window_list_get */ +} /** * To be documented. @@ -443,7 +443,7 @@ EAPI Ecore_X_Atom ecore_x_window_prop_any_type(void) { return AnyPropertyType; -} /* ecore_x_window_prop_any_type */ +} /** * To be documented. @@ -452,11 +452,11 @@ ecore_x_window_prop_any_type(void) */ EAPI void ecore_x_window_prop_property_set(Ecore_X_Window win, - Ecore_X_Atom property, - Ecore_X_Atom type, - int size, - void *data, - int number) + Ecore_X_Atom property, + Ecore_X_Atom type, + int size, + void *data, + int number) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (win == 0) @@ -479,13 +479,14 @@ ecore_x_window_prop_property_set(Ecore_X_Window win, dat = malloc(sizeof(unsigned long) * number); if (dat) { - for (ptr = (int *)data, i = 0; i < number; i++) dat[i] = ptr[i]; + for (ptr = (int *)data, i = 0; i < number; i++) + dat[i] = ptr[i]; XChangeProperty(_ecore_x_disp, win, property, type, size, PropModeReplace, (unsigned char *)dat, number); free(dat); } } -} /* ecore_x_window_prop_property_set */ +} /** * To be documented. @@ -493,12 +494,12 @@ ecore_x_window_prop_property_set(Ecore_X_Window win, * FIXME: To be fixed. */ EAPI int -ecore_x_window_prop_property_get(Ecore_X_Window win, - Ecore_X_Atom property, - Ecore_X_Atom type, - int size __UNUSED__, +ecore_x_window_prop_property_get(Ecore_X_Window win, + Ecore_X_Atom property, + Ecore_X_Atom type, + int size __UNUSED__, unsigned char **data, - int *num) + int *num) { Atom type_ret = 0; int ret, size_ret = 0; @@ -552,7 +553,7 @@ ecore_x_window_prop_property_get(Ecore_X_Window win, for (i = 0; i < num_ret; i++) ((unsigned int *)*data)[i] = ((unsigned long *)prop_ret)[i]; break; - } /* switch */ + } XFree(prop_ret); @@ -560,19 +561,19 @@ ecore_x_window_prop_property_get(Ecore_X_Window win, *num = num_ret; return size_ret; -} /* ecore_x_window_prop_property_get */ +} EAPI void ecore_x_window_prop_property_del(Ecore_X_Window win, - Ecore_X_Atom property) + Ecore_X_Atom property) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XDeleteProperty(_ecore_x_disp, win, property); -} /* ecore_x_window_prop_property_del */ +} EAPI Ecore_X_Atom * ecore_x_window_prop_list(Ecore_X_Window win, - int *num_ret) + int *num_ret) { Ecore_X_Atom *atoms; Atom *atom_ret; @@ -589,14 +590,15 @@ ecore_x_window_prop_list(Ecore_X_Window win, atoms = malloc(num * sizeof(Ecore_X_Atom)); if (atoms) { - for (i = 0; i < num; i++) atoms[i] = atom_ret[i]; + for (i = 0; i < num; i++) + atoms[i] = atom_ret[i]; if (num_ret) *num_ret = num; } XFree(atom_ret); return atoms; -} /* ecore_x_window_prop_list */ +} /** * Set a window string property. @@ -608,8 +610,8 @@ ecore_x_window_prop_list(Ecore_X_Window win, */ EAPI void ecore_x_window_prop_string_set(Ecore_X_Window win, - Ecore_X_Atom type, - const char *str) + Ecore_X_Atom type, + const char *str) { XTextProperty xtp; @@ -622,7 +624,7 @@ ecore_x_window_prop_string_set(Ecore_X_Window win, xtp.encoding = ECORE_X_ATOM_UTF8_STRING; xtp.nitems = strlen(str); XSetTextProperty(_ecore_x_disp, win, &xtp, type); -} /* ecore_x_window_prop_string_set */ +} /** * Get a window string property. @@ -633,7 +635,7 @@ ecore_x_window_prop_string_set(Ecore_X_Window win, */ EAPI char * ecore_x_window_prop_string_get(Ecore_X_Window win, - Ecore_X_Atom type) + Ecore_X_Atom type) { XTextProperty xtp; char *str = NULL; @@ -673,10 +675,10 @@ ecore_x_window_prop_string_get(Ecore_X_Window win, } return str; -} /* ecore_x_window_prop_string_get */ +} EAPI Eina_Bool -ecore_x_window_prop_protocol_isset(Ecore_X_Window win, +ecore_x_window_prop_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol) { Atom proto, *protos = NULL; @@ -703,7 +705,7 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window win, XFree(protos); return ret; -} /* ecore_x_window_prop_protocol_isset */ +} /** * To be documented. @@ -712,7 +714,7 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window win, */ EAPI Ecore_X_WM_Protocol * ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, - int *num_ret) + int *num_ret) { Atom *protos = NULL; int i, protos_count = 0; @@ -746,5 +748,5 @@ ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, XFree(protos); *num_ret = protos_count; return prot_ret; -} /* ecore_x_window_prop_protocol_list_get */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_shape.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_shape.c index 2e8f8ce..71718cf 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_shape.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_shape.c @@ -28,7 +28,7 @@ ecore_x_window_shape_mask_set(Ecore_X_Window win, { LOGFN(__FILE__, __LINE__, __FUNCTION__); XShapeCombineMask(_ecore_x_disp, win, ShapeBounding, 0, 0, mask, ShapeSet); -} /* ecore_x_window_shape_mask_set */ +} /** * Sets the input shape of the given window to that given by the pixmap @p mask. @@ -48,7 +48,7 @@ ecore_x_window_shape_input_mask_set(Ecore_X_Window win, return; win = mask = 0; #endif /* ifdef ShapeInput */ -} /* ecore_x_window_shape_input_mask_set */ +} EAPI void ecore_x_window_shape_window_set(Ecore_X_Window win, @@ -63,7 +63,7 @@ ecore_x_window_shape_window_set(Ecore_X_Window win, shape_win, ShapeBounding, ShapeSet); -} /* ecore_x_window_shape_window_set */ +} EAPI void ecore_x_window_shape_input_window_set(Ecore_X_Window win, @@ -83,13 +83,13 @@ ecore_x_window_shape_input_window_set(Ecore_X_Window win, return; win = shape_win = 0; #endif -} /* ecore_x_window_shape_input_window_set */ +} EAPI void ecore_x_window_shape_window_set_xy(Ecore_X_Window win, Ecore_X_Window shape_win, - int x, - int y) + int x, + int y) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XShapeCombineShape(_ecore_x_disp, @@ -100,13 +100,13 @@ ecore_x_window_shape_window_set_xy(Ecore_X_Window win, shape_win, ShapeBounding, ShapeSet); -} /* ecore_x_window_shape_window_set_xy */ +} EAPI void ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win, Ecore_X_Window shape_win, - int x, - int y) + int x, + int y) { #ifdef ShapeInput LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -122,14 +122,14 @@ ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win, return; win = shape_win = x = y = 0; #endif -} /* ecore_x_window_shape_input_window_set_xy */ +} EAPI void ecore_x_window_shape_rectangle_set(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { XRectangle rect; @@ -147,14 +147,14 @@ ecore_x_window_shape_rectangle_set(Ecore_X_Window win, 1, ShapeSet, Unsorted); -} /* ecore_x_window_shape_rectangle_set */ +} EAPI void ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { #ifdef ShapeInput XRectangle rect; @@ -177,12 +177,12 @@ ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win, return; win = x = y = w = h = 0; #endif -} /* ecore_x_window_shape_input_rectangle_set */ +} EAPI void -ecore_x_window_shape_rectangles_set(Ecore_X_Window win, +ecore_x_window_shape_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects, - int num) + int num) { #ifdef ShapeInput XRectangle *rect = NULL; @@ -216,12 +216,12 @@ ecore_x_window_shape_rectangles_set(Ecore_X_Window win, return; win = rects = num = 0; #endif -} /* ecore_x_window_shape_rectangles_set */ +} EAPI void -ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win, +ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects, - int num) + int num) { #ifdef ShapeInput XRectangle *rect = NULL; @@ -255,14 +255,14 @@ ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win, return; win = rects = num = 0; #endif -} /* ecore_x_window_shape_input_rectangles_set */ +} EAPI void ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { XRectangle rect; @@ -280,14 +280,14 @@ ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win, 1, ShapeSubtract, Unsorted); -} /* ecore_x_window_shape_rectangle_subtract */ +} EAPI void ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { #ifdef ShapeInput XRectangle rect; @@ -310,7 +310,7 @@ ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win, return; win = x = y = w = h = 0; #endif -} /* ecore_x_window_shape_input_rectangle_subtract */ +} EAPI void ecore_x_window_shape_window_add(Ecore_X_Window win, @@ -325,13 +325,13 @@ ecore_x_window_shape_window_add(Ecore_X_Window win, shape_win, ShapeBounding, ShapeUnion); -} /* ecore_x_window_shape_window_add */ +} EAPI void ecore_x_window_shape_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win, - int x, - int y) + int x, + int y) { LOGFN(__FILE__, __LINE__, __FUNCTION__); XShapeCombineShape(_ecore_x_disp, @@ -342,13 +342,13 @@ ecore_x_window_shape_window_add_xy(Ecore_X_Window win, shape_win, ShapeBounding, ShapeUnion); -} /* ecore_x_window_shape_window_add_xy */ +} EAPI void ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win, - int x, - int y) + int x, + int y) { #ifdef ShapeInput LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -364,14 +364,14 @@ ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win, return; win = shape_win = x = y = 0; #endif -} /* ecore_x_window_shape_input_window_add_xy */ +} EAPI void ecore_x_window_shape_rectangle_add(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { XRectangle rect; @@ -389,14 +389,14 @@ ecore_x_window_shape_rectangle_add(Ecore_X_Window win, 1, ShapeUnion, Unsorted); -} /* ecore_x_window_shape_rectangle_add */ +} EAPI void ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { #ifdef ShapeInput XRectangle rect; @@ -419,14 +419,14 @@ ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win, return; win = x = y = w = h = 0; #endif -} /* ecore_x_window_shape_input_rectangle_add */ +} EAPI void ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { XRectangle rect; @@ -444,14 +444,14 @@ ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, 1, ShapeIntersect, Unsorted); -} /* ecore_x_window_shape_rectangle_clip */ +} EAPI void ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win, - int x, - int y, - int w, - int h) + int x, + int y, + int w, + int h) { #ifdef ShapeInput XRectangle rect; @@ -474,12 +474,12 @@ ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win, return; win = x = y = w = h = 0; #endif -} /* ecore_x_window_shape_input_rectangle_clip */ +} EAPI void -ecore_x_window_shape_rectangles_add(Ecore_X_Window win, +ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, - int num) + int num) { XRectangle *rect = NULL; int i; @@ -508,12 +508,12 @@ ecore_x_window_shape_rectangles_add(Ecore_X_Window win, ShapeUnion, Unsorted); if (rect) free(rect); -} /* ecore_x_window_shape_rectangles_add */ +} EAPI void -ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win, +ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, - int num) + int num) { #ifdef ShapeInput XRectangle *rect = NULL; @@ -547,11 +547,11 @@ ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win, return; win = rects = num = 0; #endif -} /* ecore_x_window_shape_input_rectangles_add */ +} EAPI Ecore_X_Rectangle * ecore_x_window_shape_rectangles_get(Ecore_X_Window win, - int *num_ret) + int *num_ret) { XRectangle *rect; Ecore_X_Rectangle *rects = NULL; @@ -585,11 +585,11 @@ ecore_x_window_shape_rectangles_get(Ecore_X_Window win, } if (num_ret) *num_ret = num; return rects; -} /* ecore_x_window_shape_rectangles_get */ +} EAPI Ecore_X_Rectangle * ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, - int *num_ret) + int *num_ret) { Ecore_X_Rectangle *rects = NULL; #ifdef ShapeInput @@ -643,16 +643,16 @@ ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, if (num_ret) *num_ret = 1; return rects; #endif -} /* ecore_x_window_shape_input_rectangles_get */ +} EAPI void ecore_x_window_shape_events_select(Ecore_X_Window win, - Eina_Bool on) + Eina_Bool on) { LOGFN(__FILE__, __LINE__, __FUNCTION__); if (on) XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask); else XShapeSelectInput(_ecore_x_disp, win, 0); -} /* ecore_x_window_shape_events_select */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xi2.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xi2.c index 38a81dd..fbfbd43 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xi2.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xi2.c @@ -46,7 +46,7 @@ _ecore_x_input_init(void) _ecore_x_xi2_devs = XIQueryDevice(_ecore_x_disp, XIAllDevices, &_ecore_x_xi2_num); #endif /* ifdef ECORE_XI2 */ -} /* _ecore_x_input_init */ +} void _ecore_x_input_shutdown(void) @@ -61,7 +61,7 @@ _ecore_x_input_shutdown(void) _ecore_x_xi2_num = 0; _ecore_x_xi2_opcode = -1; #endif /* ifdef ECORE_XI2 */ -} /* _ecore_x_input_shutdown */ +} void _ecore_x_input_handler(XEvent *xevent) @@ -205,9 +205,9 @@ _ecore_x_input_handler(XEvent *xevent) #endif default: break; - } /* switch */ + } #endif /* ifdef ECORE_XI2 */ -} /* _ecore_x_input_handler */ +} EAPI Eina_Bool ecore_x_input_multi_select(Ecore_X_Window win) @@ -279,5 +279,5 @@ ecore_x_input_multi_select(Ecore_X_Window win) #else /* ifdef ECORE_XI2 */ return EINA_FALSE; #endif /* ifdef ECORE_XI2 */ -} /* ecore_x_input_multi_select */ +} diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xinerama.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xinerama.c index 1d956b7..f49a4d3 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xinerama.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xinerama.c @@ -36,10 +36,10 @@ ecore_x_xinerama_screen_count_get(void) #endif /* ifdef ECORE_XINERAMA */ return 0; -} /* ecore_x_xinerama_screen_count_get */ +} EAPI Eina_Bool -ecore_x_xinerama_screen_geometry_get(int screen, +ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, @@ -87,5 +87,5 @@ ecore_x_xinerama_screen_geometry_get(int screen, return EINA_FALSE; screen = 0; -} /* ecore_x_xinerama_screen_geometry_get */ +} diff --git a/libraries/ecore/src/modules/Makefile.in b/libraries/ecore/src/modules/Makefile.in index 62cbce2..4bb9420 100644 --- a/libraries/ecore/src/modules/Makefile.in +++ b/libraries/ecore/src/modules/Makefile.in @@ -227,10 +227,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -249,6 +249,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -362,6 +366,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -374,6 +380,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -418,12 +426,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/modules/immodules/Makefile.am b/libraries/ecore/src/modules/immodules/Makefile.am index 6978672..2f121ae 100644 --- a/libraries/ecore/src/modules/immodules/Makefile.am +++ b/libraries/ecore/src/modules/immodules/Makefile.am @@ -5,3 +5,7 @@ SUBDIRS = if BUILD_ECORE_IMF_XIM SUBDIRS += xim endif + +if BUILD_ECORE_IMF_SCIM +SUBDIRS += scim +endif diff --git a/libraries/ecore/src/modules/immodules/Makefile.in b/libraries/ecore/src/modules/immodules/Makefile.in index 2ebe9fe..e65881c 100644 --- a/libraries/ecore/src/modules/immodules/Makefile.in +++ b/libraries/ecore/src/modules/immodules/Makefile.in @@ -34,6 +34,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @BUILD_ECORE_IMF_XIM_TRUE@am__append_1 = xim +@BUILD_ECORE_IMF_SCIM_TRUE@am__append_2 = scim subdir = src/modules/immodules DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -83,7 +84,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ distdir ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = xim +DIST_SUBDIRS = xim scim DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -228,10 +229,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -250,6 +251,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -363,6 +368,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -375,6 +382,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -419,12 +428,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ @@ -442,7 +453,7 @@ x_cflags = @x_cflags@ x_includes = @x_includes@ x_libs = @x_libs@ MAINTAINERCLEANFILES = Makefile.in -SUBDIRS = $(am__append_1) +SUBDIRS = $(am__append_1) $(am__append_2) all: all-recursive .SUFFIXES: diff --git a/libraries/ecore/src/modules/immodules/scim/Makefile.am b/libraries/ecore/src/modules/immodules/scim/Makefile.am new file mode 100644 index 0000000..40579ca --- /dev/null +++ b/libraries/ecore/src/modules/immodules/scim/Makefile.am @@ -0,0 +1,36 @@ +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I$(top_srcdir) \ +-I$(top_srcdir)/src/lib/ecore \ +-I$(top_srcdir)/src/lib/ecore_input \ +-I$(top_srcdir)/src/lib/ecore_x \ +-I$(top_srcdir)/src/lib/ecore_imf \ +-I$(top_srcdir)/src/lib/ecore_evas \ +-I$(top_builddir)/src/lib/ecore \ +-I$(top_builddir)/src/lib/ecore_input \ +-I$(top_builddir)/src/lib/ecore_x \ +-I$(top_builddir)/src/lib/ecore_imf \ +-I$(top_builddir)/src/lib/ecore_evas \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@SCIM_CFLAGS@ \ +@EVAS_CFLAGS@ \ +@EINA_CFLAGS@ + +pkgdir = $(libdir)/ecore/immodules + +pkg_LTLIBRARIES = scim.la +scim_la_SOURCES = \ +scim_imcontext.cpp \ +scim_module.cpp \ +scim_imcontext.h + +scim_la_LIBADD = \ + $(top_builddir)/src/lib/ecore_imf/libecore_imf.la \ + $(top_builddir)/src/lib/ecore_x/libecore_x.la \ + @SCIM_LIBS@ \ + @EVAS_LIBS@ \ + @EINA_LIBS@ +scim_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +scim_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/libraries/ecore/src/modules/immodules/scim/Makefile.in b/libraries/ecore/src/modules/immodules/scim/Makefile.in new file mode 100644 index 0000000..9fc3283 --- /dev/null +++ b/libraries/ecore/src/modules/immodules/scim/Makefile.in @@ -0,0 +1,849 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/immodules/scim +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ + $(top_srcdir)/m4/ac_path_generic.m4 \ + $(top_srcdir)/m4/check_x_extension.m4 \ + $(top_srcdir)/m4/ecore_check_module.m4 \ + $(top_srcdir)/m4/ecore_check_options.m4 \ + $(top_srcdir)/m4/efl_compiler_flag.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_examples.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" +LTLIBRARIES = $(pkg_LTLIBRARIES) +scim_la_DEPENDENCIES = \ + $(top_builddir)/src/lib/ecore_imf/libecore_imf.la \ + $(top_builddir)/src/lib/ecore_x/libecore_x.la +am_scim_la_OBJECTS = scim_la-scim_imcontext.lo scim_la-scim_module.lo +scim_la_OBJECTS = $(am_scim_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +scim_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(scim_la_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(scim_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_$(V)) +am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +am__v_CXX_0 = @echo " CXX " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_$(V)) +am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CXXLD_0 = @echo " CXXLD " $@; +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(scim_la_SOURCES) +DIST_SOURCES = $(scim_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CARES_CFLAGS = @CARES_CFLAGS@ +CARES_LIBS = @CARES_LIBS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CFLAGS = @CURL_CFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_XCB_CFLAGS = @ECORE_XCB_CFLAGS@ +ECORE_XCB_LIBS = @ECORE_XCB_LIBS@ +EFL_ECORE_BUILD = @EFL_ECORE_BUILD@ +EFL_ECORE_CON_BUILD = @EFL_ECORE_CON_BUILD@ +EFL_ECORE_EVAS_BUILD = @EFL_ECORE_EVAS_BUILD@ +EFL_ECORE_FILE_BUILD = @EFL_ECORE_FILE_BUILD@ +EFL_ECORE_IMF_BUILD = @EFL_ECORE_IMF_BUILD@ +EFL_ECORE_IMF_EVAS_BUILD = @EFL_ECORE_IMF_EVAS_BUILD@ +EFL_ECORE_INPUT_BUILD = @EFL_ECORE_INPUT_BUILD@ +EFL_ECORE_INPUT_EVAS_BUILD = @EFL_ECORE_INPUT_EVAS_BUILD@ +EFL_ECORE_IPC_BUILD = @EFL_ECORE_IPC_BUILD@ +EFL_ECORE_PSL1GHT_BUILD = @EFL_ECORE_PSL1GHT_BUILD@ +EFL_ECORE_SDL_BUILD = @EFL_ECORE_SDL_BUILD@ +EFL_ECORE_WIN32_BUILD = @EFL_ECORE_WIN32_BUILD@ +EFL_ECORE_WINCE_BUILD = @EFL_ECORE_WINCE_BUILD@ +EFL_PTHREAD_CFLAGS = @EFL_PTHREAD_CFLAGS@ +EFL_PTHREAD_LIBS = @EFL_PTHREAD_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +ESCAPE_CFLAGS = @ESCAPE_CFLAGS@ +ESCAPE_LIBS = @ESCAPE_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +KEYSYMDEFS = @KEYSYMDEFS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ +LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ +LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_CONFIG = @SDL_CONFIG@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SSL_CFLAGS = @SSL_CFLAGS@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +TLS2_CFLAGS = @TLS2_CFLAGS@ +TLS2_LIBS = @TLS2_LIBS@ +TLS_CFLAGS = @TLS_CFLAGS@ +TLS_LIBS = @TLS_LIBS@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +WIN32_LIBS = @WIN32_LIBS@ +XCB_COMPOSITE_CFLAGS = @XCB_COMPOSITE_CFLAGS@ +XCB_COMPOSITE_LIBS = @XCB_COMPOSITE_LIBS@ +XCB_CURSOR_CFLAGS = @XCB_CURSOR_CFLAGS@ +XCB_CURSOR_LIBS = @XCB_CURSOR_LIBS@ +XCB_DAMAGE_CFLAGS = @XCB_DAMAGE_CFLAGS@ +XCB_DAMAGE_LIBS = @XCB_DAMAGE_LIBS@ +XCB_DPMS_CFLAGS = @XCB_DPMS_CFLAGS@ +XCB_DPMS_LIBS = @XCB_DPMS_LIBS@ +XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@ +XCB_RANDR_LIBS = @XCB_RANDR_LIBS@ +XCB_RENDER_CFLAGS = @XCB_RENDER_CFLAGS@ +XCB_RENDER_LIBS = @XCB_RENDER_LIBS@ +XCB_SCREENSAVER_CFLAGS = @XCB_SCREENSAVER_CFLAGS@ +XCB_SCREENSAVER_LIBS = @XCB_SCREENSAVER_LIBS@ +XCB_SHAPE_CFLAGS = @XCB_SHAPE_CFLAGS@ +XCB_SHAPE_LIBS = @XCB_SHAPE_LIBS@ +XCB_SYNC_CFLAGS = @XCB_SYNC_CFLAGS@ +XCB_SYNC_LIBS = @XCB_SYNC_LIBS@ +XCB_X11_CFLAGS = @XCB_X11_CFLAGS@ +XCB_X11_LIBS = @XCB_X11_LIBS@ +XCB_XFIXES_CFLAGS = @XCB_XFIXES_CFLAGS@ +XCB_XFIXES_LIBS = @XCB_XFIXES_LIBS@ +XCB_XGESTURE_CFLAGS = @XCB_XGESTURE_CFLAGS@ +XCB_XGESTURE_LIBS = @XCB_XGESTURE_LIBS@ +XCB_XINERAMA_CFLAGS = @XCB_XINERAMA_CFLAGS@ +XCB_XINERAMA_LIBS = @XCB_XINERAMA_LIBS@ +XCB_XINPUT_CFLAGS = @XCB_XINPUT_CFLAGS@ +XCB_XINPUT_LIBS = @XCB_XINPUT_LIBS@ +XCB_XPRINT_CFLAGS = @XCB_XPRINT_CFLAGS@ +XCB_XPRINT_LIBS = @XCB_XPRINT_LIBS@ +XCB_XTEST_CFLAGS = @XCB_XTEST_CFLAGS@ +XCB_XTEST_LIBS = @XCB_XTEST_LIBS@ +XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@ +XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@ +XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@ +XDAMAGE_LIBS = @XDAMAGE_LIBS@ +XDPMS_CFLAGS = @XDPMS_CFLAGS@ +XDPMS_LIBS = @XDPMS_LIBS@ +XFIXES_CFLAGS = @XFIXES_CFLAGS@ +XFIXES_LIBS = @XFIXES_LIBS@ +XGESTURE_CFLAGS = @XGESTURE_CFLAGS@ +XGESTURE_LIBS = @XGESTURE_LIBS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XI2_CFLAGS = @XI2_CFLAGS@ +XI2_LIBS = @XI2_LIBS@ +XINERAMA_CFLAGS = @XINERAMA_CFLAGS@ +XINERAMA_LIBS = @XINERAMA_LIBS@ +XKB_CFLAGS = @XKB_CFLAGS@ +XKB_LIBS = @XKB_LIBS@ +XMKMF = @XMKMF@ +XPRINT_CFLAGS = @XPRINT_CFLAGS@ +XPRINT_LIBS = @XPRINT_LIBS@ +XRANDR_CFLAGS = @XRANDR_CFLAGS@ +XRANDR_LIBS = @XRANDR_LIBS@ +XRENDER_CFLAGS = @XRENDER_CFLAGS@ +XRENDER_LIBS = @XRENDER_LIBS@ +XSS_CFLAGS = @XSS_CFLAGS@ +XSS_LIBS = @XSS_LIBS@ +XTEST_CFLAGS = @XTEST_CFLAGS@ +XTEST_LIBS = @XTEST_LIBS@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +Xcursor_cflags = @Xcursor_cflags@ +Xcursor_libs = @Xcursor_libs@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cocoa_ldflags = @cocoa_ldflags@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +ecore_cocoa_cflags = @ecore_cocoa_cflags@ +ecore_cocoa_libs = @ecore_cocoa_libs@ +ecore_con_cflags = @ecore_con_cflags@ +ecore_con_libs = @ecore_con_libs@ +ecore_directfb_cflags = @ecore_directfb_cflags@ +ecore_directfb_libs = @ecore_directfb_libs@ +ecore_evas_cflags = @ecore_evas_cflags@ +ecore_evas_libs = @ecore_evas_libs@ +ecore_fb_cflags = @ecore_fb_cflags@ +ecore_fb_libs = @ecore_fb_libs@ +ecore_file_cflags = @ecore_file_cflags@ +ecore_file_libs = @ecore_file_libs@ +ecore_imf_cflags = @ecore_imf_cflags@ +ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ +ecore_imf_evas_libs = @ecore_imf_evas_libs@ +ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ +ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ +ecore_imf_xim_libs = @ecore_imf_xim_libs@ +ecore_input_cflags = @ecore_input_cflags@ +ecore_input_evas_cflags = @ecore_input_evas_cflags@ +ecore_input_evas_libs = @ecore_input_evas_libs@ +ecore_input_libs = @ecore_input_libs@ +ecore_ipc_cflags = @ecore_ipc_cflags@ +ecore_ipc_libs = @ecore_ipc_libs@ +ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ +ecore_psl1ght_libs = @ecore_psl1ght_libs@ +ecore_sdl_cflags = @ecore_sdl_cflags@ +ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ +ecore_win32_cflags = @ecore_win32_cflags@ +ecore_win32_libs = @ecore_win32_libs@ +ecore_wince_cflags = @ecore_wince_cflags@ +ecore_wince_libs = @ecore_wince_libs@ +ecore_x_cflags = @ecore_x_cflags@ +ecore_x_libs = @ecore_x_libs@ +ecore_x_libs_private = @ecore_x_libs_private@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +exec_prefix = @exec_prefix@ +have_ecore_x_xcb_define = @have_ecore_x_xcb_define@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +release_info = @release_info@ +requirements_ecore = @requirements_ecore@ +requirements_ecore_cocoa = @requirements_ecore_cocoa@ +requirements_ecore_con = @requirements_ecore_con@ +requirements_ecore_directfb = @requirements_ecore_directfb@ +requirements_ecore_evas = @requirements_ecore_evas@ +requirements_ecore_fb = @requirements_ecore_fb@ +requirements_ecore_file = @requirements_ecore_file@ +requirements_ecore_imf = @requirements_ecore_imf@ +requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ +requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ +requirements_ecore_input = @requirements_ecore_input@ +requirements_ecore_input_evas = @requirements_ecore_input_evas@ +requirements_ecore_ipc = @requirements_ecore_ipc@ +requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ +requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ +requirements_ecore_win32 = @requirements_ecore_win32@ +requirements_ecore_wince = @requirements_ecore_wince@ +requirements_ecore_x = @requirements_ecore_x@ +rt_libs = @rt_libs@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +x_cflags = @x_cflags@ +x_includes = @x_includes@ +x_libs = @x_libs@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I$(top_srcdir) \ +-I$(top_srcdir)/src/lib/ecore \ +-I$(top_srcdir)/src/lib/ecore_input \ +-I$(top_srcdir)/src/lib/ecore_x \ +-I$(top_srcdir)/src/lib/ecore_imf \ +-I$(top_srcdir)/src/lib/ecore_evas \ +-I$(top_builddir)/src/lib/ecore \ +-I$(top_builddir)/src/lib/ecore_input \ +-I$(top_builddir)/src/lib/ecore_x \ +-I$(top_builddir)/src/lib/ecore_imf \ +-I$(top_builddir)/src/lib/ecore_evas \ +-DPACKAGE_LIB_DIR=\"$(libdir)\" \ +-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@SCIM_CFLAGS@ \ +@EVAS_CFLAGS@ \ +@EINA_CFLAGS@ + +pkgdir = $(libdir)/ecore/immodules +pkg_LTLIBRARIES = scim.la +scim_la_SOURCES = \ +scim_imcontext.cpp \ +scim_module.cpp \ +scim_imcontext.h + +scim_la_LIBADD = \ + $(top_builddir)/src/lib/ecore_imf/libecore_imf.la \ + $(top_builddir)/src/lib/ecore_x/libecore_x.la \ + @SCIM_LIBS@ \ + @EVAS_LIBS@ \ + @EINA_LIBS@ + +scim_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version +scim_la_LIBTOOLFLAGS = --tag=disable-static +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/immodules/scim/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/immodules/scim/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +scim.la: $(scim_la_OBJECTS) $(scim_la_DEPENDENCIES) + $(AM_V_CXXLD)$(scim_la_LINK) -rpath $(pkgdir) $(scim_la_OBJECTS) $(scim_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scim_la-scim_imcontext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scim_la-scim_module.Plo@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +scim_la-scim_imcontext.lo: scim_imcontext.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(scim_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT scim_la-scim_imcontext.lo -MD -MP -MF $(DEPDIR)/scim_la-scim_imcontext.Tpo -c -o scim_la-scim_imcontext.lo `test -f 'scim_imcontext.cpp' || echo '$(srcdir)/'`scim_imcontext.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/scim_la-scim_imcontext.Tpo $(DEPDIR)/scim_la-scim_imcontext.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scim_imcontext.cpp' object='scim_la-scim_imcontext.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(scim_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o scim_la-scim_imcontext.lo `test -f 'scim_imcontext.cpp' || echo '$(srcdir)/'`scim_imcontext.cpp + +scim_la-scim_module.lo: scim_module.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(scim_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT scim_la-scim_module.lo -MD -MP -MF $(DEPDIR)/scim_la-scim_module.Tpo -c -o scim_la-scim_module.lo `test -f 'scim_module.cpp' || echo '$(srcdir)/'`scim_module.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/scim_la-scim_module.Tpo $(DEPDIR)/scim_la-scim_module.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='scim_module.cpp' object='scim_la-scim_module.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(scim_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o scim_la-scim_module.lo `test -f 'scim_module.cpp' || echo '$(srcdir)/'`scim_module.cpp + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pkgLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/ecore/src/modules/immodules/scim/scim_imcontext.cpp b/libraries/ecore/src/modules/immodules/scim/scim_imcontext.cpp new file mode 100644 index 0000000..6cb72c2 --- /dev/null +++ b/libraries/ecore/src/modules/immodules/scim/scim_imcontext.cpp @@ -0,0 +1,2839 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#define Uses_SCIM_DEBUG +#define Uses_SCIM_BACKEND +#define Uses_SCIM_IMENGINE_MODULE +#define Uses_SCIM_HOTKEY +#define Uses_SCIM_PANEL_CLIENT + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include "scim_imcontext.h" + +using namespace scim; + +struct _EcoreIMFContextISFImpl +{ + EcoreIMFContextISF *parent; + IMEngineInstancePointer si; + Ecore_X_Window client_window; + Evas *client_canvas; + Ecore_IMF_Input_Mode input_mode; + WideString preedit_string; + AttributeList preedit_attrlist; + Ecore_IMF_Autocapital_Type autocapital_type; + int preedit_caret; + int cursor_x; + int cursor_y; + int cursor_pos; + bool use_preedit; + bool is_on; + bool shared_si; + bool preedit_started; + bool preedit_updating; + bool need_commit_preedit; + bool uppercase; + bool prediction_allow; + + EcoreIMFContextISFImpl *next; +}; + +/* Input Context handling functions. */ +static EcoreIMFContextISFImpl *new_ic_impl (EcoreIMFContextISF *parent); +static void delete_ic_impl (EcoreIMFContextISFImpl *impl); +static void delete_all_ic_impl (void); + +static EcoreIMFContextISF *find_ic (int id); + + +/* private functions */ +static void panel_slot_reload_config (int context); +static void panel_slot_exit (int context); +static void panel_slot_update_lookup_table_page_size(int context, + int page_size); +static void panel_slot_lookup_table_page_up (int context); +static void panel_slot_lookup_table_page_down (int context); +static void panel_slot_trigger_property (int context, + const String &property); +static void panel_slot_process_helper_event (int context, + const String &target_uuid, + const String &helper_uuid, + const Transaction &trans); +static void panel_slot_move_preedit_caret (int context, + int caret_pos); +static void panel_slot_select_candidate (int context, + int cand_index); +static void panel_slot_process_key_event (int context, + const KeyEvent &key); +static void panel_slot_commit_string (int context, + const WideString &wstr); +static void panel_slot_forward_key_event (int context, + const KeyEvent &key); +static void panel_slot_request_help (int context); +static void panel_slot_request_factory_menu (int context); +static void panel_slot_change_factory (int context, + const String &uuid); + +static void panel_req_focus_in (EcoreIMFContextISF *ic); +static void panel_req_update_factory_info (EcoreIMFContextISF *ic); +static void panel_req_update_spot_location (EcoreIMFContextISF *ic); +static void panel_req_show_help (EcoreIMFContextISF *ic); +static void panel_req_show_factory_menu (EcoreIMFContextISF *ic); + +/* Panel iochannel handler*/ +static bool panel_initialize (void); +static void panel_finalize (void); +static Eina_Bool panel_iochannel_handler (void *data, + Ecore_Fd_Handler *fd_handler); + +/* utility functions */ +static bool filter_hotkeys (EcoreIMFContextISF *ic, + const KeyEvent &key); +static void turn_on_ic (EcoreIMFContextISF *ic); +static void turn_off_ic (EcoreIMFContextISF *ic); +static void set_ic_capabilities (EcoreIMFContextISF *ic); + +static void initialize (void); +static void finalize (void); + +static void open_next_factory (EcoreIMFContextISF *ic); +static void open_previous_factory (EcoreIMFContextISF *ic); +static void open_specific_factory (EcoreIMFContextISF *ic, + const String &uuid); +static void initialize_modifier_bits (Display *display); +static unsigned int scim_x11_keymask_scim_to_x11 (Display *display, uint16 scimkeymask); +static XKeyEvent createKeyEvent (Display *display, Window &win, + Window &winRoot, bool press, + int keycode, int modifiers); +static void _x_send_key_event (const KeyEvent &key); + +static void attach_instance (const IMEngineInstancePointer &si); + +/* slot functions */ +static void slot_show_preedit_string (IMEngineInstanceBase *si); +static void slot_show_aux_string (IMEngineInstanceBase *si); +static void slot_show_lookup_table (IMEngineInstanceBase *si); + +static void slot_hide_preedit_string (IMEngineInstanceBase *si); +static void slot_hide_aux_string (IMEngineInstanceBase *si); +static void slot_hide_lookup_table (IMEngineInstanceBase *si); + +static void slot_update_preedit_caret (IMEngineInstanceBase *si, + int caret); +static void slot_update_preedit_string (IMEngineInstanceBase *si, + const WideString &str, + const AttributeList &attrs); +static void slot_update_aux_string (IMEngineInstanceBase *si, + const WideString &str, + const AttributeList &attrs); +static void slot_commit_string (IMEngineInstanceBase *si, + const WideString &str); +static void slot_forward_key_event (IMEngineInstanceBase *si, + const KeyEvent &key); +static void slot_update_lookup_table (IMEngineInstanceBase *si, + const LookupTable &table); + +static void slot_register_properties (IMEngineInstanceBase *si, + const PropertyList &properties); +static void slot_update_property (IMEngineInstanceBase *si, + const Property &property); +static void slot_beep (IMEngineInstanceBase *si); +static void slot_start_helper (IMEngineInstanceBase *si, + const String &helper_uuid); +static void slot_stop_helper (IMEngineInstanceBase *si, + const String &helper_uuid); +static void slot_send_helper_event (IMEngineInstanceBase *si, + const String &helper_uuid, + const Transaction &trans); +static bool slot_get_surrounding_text (IMEngineInstanceBase *si, + WideString &text, + int &cursor, + int maxlen_before, + int maxlen_after); +static bool slot_delete_surrounding_text (IMEngineInstanceBase *si, + int offset, + int len); + +static void reload_config_callback (const ConfigPointer &config); + +static void fallback_commit_string_cb (IMEngineInstanceBase *si, + const WideString &str); + +static void caps_mode_check (Ecore_IMF_Context *ctx, Eina_Bool force); + +/* Local variables declaration */ +static String _language; +static EcoreIMFContextISFImpl *_used_ic_impl_list = 0; +static EcoreIMFContextISFImpl *_free_ic_impl_list = 0; +static EcoreIMFContextISF *_ic_list = 0; + +static KeyboardLayout _keyboard_layout = SCIM_KEYBOARD_Default; +static int _valid_key_mask = SCIM_KEY_AllMasks; + +static FrontEndHotkeyMatcher _frontend_hotkey_matcher; +static IMEngineHotkeyMatcher _imengine_hotkey_matcher; + +static IMEngineInstancePointer _default_instance; + +static ConfigModule *_config_module = 0; +static ConfigPointer _config; +static BackEndPointer _backend; + +static EcoreIMFContextISF *_focused_ic = 0; + +static bool _scim_initialized = false; + +static int _instance_count = 0; +static int _context_count = 0; + +static IMEngineFactoryPointer _fallback_factory; +static IMEngineInstancePointer _fallback_instance; +static PanelClient _panel_client; + +static Ecore_Fd_Handler *_panel_iochannel_read_handler = 0; +static Ecore_Fd_Handler *_panel_iochannel_err_handler = 0; + +static Ecore_X_Window _client_window = 0; + +static bool _on_the_spot = true; +static bool _shared_input_method = false; + +static Eina_Bool autocap_allow = EINA_FALSE; + +static Display *__current_display = 0; +static int __current_alt_mask = Mod1Mask; +static int __current_meta_mask = 0; +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. +class FinalizeHandler +{ +public: + FinalizeHandler () + { + SCIM_DEBUG_FRONTEND(1) << "FinalizeHandler::FinalizeHandler ()\n"; + } + ~FinalizeHandler () + { + SCIM_DEBUG_FRONTEND(1) << "FinalizeHandler::~FinalizeHandler ()\n"; + isf_imf_context_shutdown (); + } +}; + +static FinalizeHandler _finalize_handler; + +static unsigned int +utf8_offset_to_index(const char *str, int offset) +{ + int index = 0; + int i; + for (i = 0; i < offset; i++) + { + eina_unicode_utf8_get_next(str, &index); + } + + return index; +} + +static unsigned int +get_time (void) +{ + unsigned int tint; + struct timeval tv; + struct timezone tz; /* is not used since ages */ + gettimeofday (&tv, &tz); + tint = tv.tv_sec * 1000; + tint = tint / 1000 * 1000; + tint = tint + tv.tv_usec / 1000; + return tint; +} + +/* Function Implementations */ +static EcoreIMFContextISFImpl * +new_ic_impl (EcoreIMFContextISF *parent) +{ + EcoreIMFContextISFImpl *impl = NULL; + + if (_free_ic_impl_list != NULL) + { + impl = _free_ic_impl_list; + _free_ic_impl_list = _free_ic_impl_list->next; + } + else + { + impl = new EcoreIMFContextISFImpl; + if (impl == NULL) + return NULL; + } + + impl->uppercase = false; + impl->autocapital_type = ECORE_IMF_AUTOCAPITAL_TYPE_NONE; + impl->next = _used_ic_impl_list; + _used_ic_impl_list = impl; + + impl->parent = parent; + + return impl; +} + +static void +delete_ic_impl (EcoreIMFContextISFImpl *impl) +{ + EcoreIMFContextISFImpl *rec = _used_ic_impl_list, *last = 0; + + for (; rec != 0; last = rec, rec = rec->next) + { + if (rec == impl) + { + if (last != 0) + last->next = rec->next; + else + _used_ic_impl_list = rec->next; + + rec->next = _free_ic_impl_list; + _free_ic_impl_list = rec; + + rec->parent = 0; + rec->si.reset (); + rec->client_window = 0; + rec->preedit_string = WideString (); + rec->preedit_attrlist.clear (); + + return; + } + } +} + +static void +delete_all_ic_impl (void) +{ + EcoreIMFContextISFImpl *it = _used_ic_impl_list; + + while (it != 0) + { + _used_ic_impl_list = it->next; + delete it; + it = _used_ic_impl_list; + } + + it = _free_ic_impl_list; + while (it != 0) + { + _free_ic_impl_list = it->next; + delete it; + it = _free_ic_impl_list; + } +} + +static EcoreIMFContextISF * +find_ic (int id) +{ + EcoreIMFContextISFImpl *rec = _used_ic_impl_list; + + while (rec != 0) + { + if (rec->parent && rec->parent->id == id) + return rec->parent; + rec = rec->next; + } + + return 0; +} + +static Eina_Bool +analyze_surrounding_text(Ecore_IMF_Context *ctx) +{ + char *plain_str = NULL; + char *markup_str = NULL; + const char *puncs[3] = {". ", "! ", "? "}; + 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]; + EcoreIMFContextISF *context_scim; + + if (!ctx) return EINA_FALSE; + context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + if (!context_scim || !context_scim->impl) return EINA_FALSE; + + switch (context_scim->impl->autocapital_type) + { + case ECORE_IMF_AUTOCAPITAL_TYPE_NONE: + return EINA_FALSE; + case ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER: + return EINA_TRUE; + default: + break; + } + + for (i=0; i<3; i++) + uni_puncs[i] = eina_unicode_utf8_to_unicode(puncs[i], NULL); + + ecore_imf_context_surrounding_get(ctx, &markup_str, &cursor_pos); + if (!markup_str) goto done; + + if (cursor_pos == 0) + { + ret = EINA_TRUE; + goto done; + } + + // Convert into plain string + plain_str = evas_textblock_text_markup_to_utf8(NULL, markup_str); + if (!plain_str) goto done; + + // Convert string from utf8 to unicode + ustr = eina_unicode_utf8_to_unicode(plain_str, NULL); + if (!ustr) goto done; + + if (cursor_pos >= 1) + { + if (context_scim->impl->autocapital_type == ECORE_IMF_AUTOCAPITAL_TYPE_WORD) + { + if (ustr[cursor_pos-1] == ' ') + { + ret = EINA_TRUE; + goto done; + } + } + + // Check paragraph separator and carrage return
+ if ((ustr[cursor_pos-1] == 0x2029) || (ustr[cursor_pos-1] == '\n')) + { + ret = EINA_TRUE; + goto done; + } + } + + // check punctuation + if (cursor_pos >= 2) + { + tail = eina_unicode_strndup(ustr+cursor_pos-2, 2); + + if (tail) + { + for (i=0; i<3; i++) + { + if (!eina_unicode_strcmp(tail, uni_puncs[i])) + { + ret = EINA_TRUE; + break; + } + } + free(tail); + tail = NULL; + } + } + +done: + if (ustr) free(ustr); + if (markup_str) free(markup_str); + if (plain_str) free(plain_str); + + for (i=0; i<3; i++) + if (uni_puncs[i]) free(uni_puncs[i]); + + return ret; +} + +static void +caps_mode_check(Ecore_IMF_Context *ctx, Eina_Bool force) +{ + Eina_Bool uppercase; + EcoreIMFContextISF *context_scim; + + if (!ctx) return; + context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + + if (autocap_allow == EINA_FALSE) + return; + + // Check autocapital type + if (!context_scim || !context_scim->impl) + return; + + if (analyze_surrounding_text(ctx)) + uppercase = EINA_TRUE; + else + uppercase = EINA_FALSE; + + if (force) + context_scim->impl->uppercase = uppercase; + else + if (context_scim->impl->uppercase != uppercase) + context_scim->impl->uppercase = uppercase; +} + +static void +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 (); + + 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"; + } + 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"; + } +} + +/* Public functions */ +/** + * isf_imf_context_new + * + * This function will be called by Ecore IMF. + * Create a instance of type EcoreIMFContextISF. + * + * Return value: A pointer to the newly created EcoreIMFContextISF instance + */ +EAPI EcoreIMFContextISF * +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) + { + std::cerr << "memory allocation failed in " << __FUNCTION__ << "\n"; + return NULL; + } + + context_scim->id = _context_count++; + + if (!_scim_initialized) + { + initialize (); + _scim_initialized = true; + } + + env = getenv("ECORE_IMF_AUTOCAPITAL_ALLOW"); + if (env) + autocap_allow = !!atoi(env); + + return context_scim; +} + +/** + * isf_imf_shutdown + * + * It will be called when the scim im module is unloaded by ecore. It will do some + * cleanup job. + */ +EAPI void +isf_imf_context_shutdown (void) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + if (_scim_initialized) + { + _scim_initialized = false; + finalize (); + } +} + +EAPI void +isf_imf_context_add (Ecore_IMF_Context *ctx) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get (ctx); + + if (!context_scim) return; + + context_scim->impl = 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 ()) + { + si = _default_instance; + 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 ()) + { + 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 ()) + { + SCIM_DEBUG_FRONTEND(2) << "update default instance.\n"; + _default_instance = si; + } + + context_scim->ctx = ctx; + context_scim->impl = new_ic_impl (context_scim); + if (context_scim->impl == NULL) + { + std::cerr << "memory allocation failed in " << __FUNCTION__ << "\n"; + return; + } + + context_scim->impl->si = si; + context_scim->impl->client_window = 0; + context_scim->impl->client_canvas = NULL; + context_scim->impl->preedit_caret = 0; + context_scim->impl->cursor_x = 0; + context_scim->impl->cursor_y = 0; + context_scim->impl->cursor_pos = -1; + context_scim->impl->is_on = false; + context_scim->impl->shared_si = _shared_input_method; + context_scim->impl->use_preedit = _on_the_spot; + context_scim->impl->preedit_started = false; + context_scim->impl->preedit_updating = false; + context_scim->impl->need_commit_preedit = false; + + if (!_ic_list) + context_scim->next = NULL; + else + context_scim->next = _ic_list; + _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); + + _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) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + if (!_ic_list) return; + + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get (ctx); + + if (context_scim) + { + if (context_scim->id != _ic_list->id) + { + EcoreIMFContextISF * pre = _ic_list; + EcoreIMFContextISF * cur = _ic_list->next; + while (cur != NULL) + { + if (cur->id == context_scim->id) + { + pre->next = cur->next; + break; + } + pre = cur; + cur = cur->next; + } + } + else + _ic_list = _ic_list->next; + } + + if (context_scim && context_scim->impl) + { + _panel_client.prepare (context_scim->id); + + if (context_scim == _focused_ic) + context_scim->impl->si->focus_out (); + + // Delete the instance. + EcoreIMFContextISF *old_focused = _focused_ic; + _focused_ic = context_scim; + 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.remove_input_context (context_scim->id); + _panel_client.send (); + + if (context_scim->impl->client_window) + isf_imf_context_client_window_set (ctx, NULL); + + if (context_scim->impl) + { + delete_ic_impl (context_scim->impl); + context_scim->impl = 0; + } + } + + if (context_scim == _focused_ic) + _focused_ic = 0; + + if (context_scim) + { + delete context_scim; + context_scim = 0; + } +} + +/** + * isf_imf_context_client_canvas_set + * @ctx: a #Ecore_IMF_Context + * @canvas: the client canvas + * + * This function will be called by Ecore IMF. + * + * Set the client canvas for the Input Method Context; this is the canvas + * in which the input appears. + * + * The canvas type can be determined by using the context canvas type. + * Actually only canvas with type "evas" (Evas *) is supported. This canvas + * may be used in order to correctly position status windows, and may also + * be used for purposes internal to the Input Method Context. + */ +EAPI void +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); + + if (context_scim && context_scim->impl && context_scim->impl->client_canvas != (Evas*) canvas) + context_scim->impl->client_canvas = (Evas*)canvas; +} + +/** + * isf_imf_context_client_window_set + * @ctx: a #Ecore_IMF_Context + * @window: the client window + * + * This function will be called by Ecore IMF. + * + * Set the client window for the Input Method Context; this is the Ecore_X_Window + * when using X11, Ecore_Win32_Window when using Win32, etc. + * + * This window is used in order to correctly position status windows, + * 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) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + 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)) + { + context_scim->impl->client_window = (Ecore_X_Window)((Ecore_Window)window); + + if ((context_scim->impl->client_window != 0) && + (context_scim->impl->client_window != _client_window)) + _client_window = context_scim->impl->client_window; + } +} + +/** + * isf_imf_context_reset + * @ctx: a #Ecore_IMF_Context + * + * This function will be called by Ecore IMF. + * + * Notify the Input Method Context that a change such as a change in cursor + * position has been made. This will typically cause the Input Method Context + * to clear the preedit state. + */ +EAPI void +isf_imf_context_reset (Ecore_IMF_Context *ctx) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + 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 (); + + if (context_scim->impl->need_commit_preedit) + { + if (wstr.length ()) + { + 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 (); + } + } +} + +/** + * isf_imf_context_focus_in + * @ctx: a #Ecore_IMF_Context + * + * This function will be called by Ecore IMF. + * + * 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) +{ + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + + if (!context_scim) + return; + + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__<< "(" << context_scim->id << ")...\n"; + + if (_focused_ic) + { + 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); + } + + bool need_cap = false; + bool need_reset = false; + bool need_reg = false; + + if (context_scim && context_scim->impl) + { + _focused_ic = context_scim; + _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 ()) + { + 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"; + } + + 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->preedit_caret = 0; + context_scim->impl->preedit_started = false; + need_cap = true; + need_reset = true; + need_reg = true; + } + } + 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 ()) + { + 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); + 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"; + } + } + + 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 (); + + 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 (); + } + else + { + _panel_client.turn_off (context_scim->id); + } + + _panel_client.send (); + } +} + +/** + * isf_imf_context_focus_out + * @ctx: a #Ecore_IMF_Context + * + * This function will be called by Ecore IMF. + * + * 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) +{ + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + + if (!context_scim) return; + + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "(" << context_scim->id << ")...\n"; + + if (context_scim && context_scim->impl && context_scim == _focused_ic) + { + WideString wstr = context_scim->impl->preedit_string; + + if (context_scim->impl->need_commit_preedit) + { + if (wstr.length ()) + { + 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); + 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; + } +} + +/** + * isf_imf_context_cursor_location_set + * @ctx: a #Ecore_IMF_Context + * @x: x position of New cursor. + * @y: y position of New cursor. + * @w: the width of New cursor. + * @h: the height of New cursor. + * + * This function will be called by Ecore IMF. + * + * 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) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + Ecore_Evas *ee; + int canvas_x, canvas_y; + + if (cw == 0 && ch == 0) + return; + + if (context_scim && context_scim->impl && context_scim == _focused_ic) + { + // Don't update spot location while updating preedit string. + 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; + + ecore_evas_geometry_get (ee, &canvas_x, &canvas_y, NULL, NULL); + + 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 (); + SCIM_DEBUG_FRONTEND(2) << "new cursor location = " << context_scim->impl->cursor_x << "," << context_scim->impl->cursor_y << "\n"; + } + } +} + +/** + * isf_imf_context_use_preedit_set + * @ctx: a #Ecore_IMF_Context + * @use_preedit: Whether the IM context should use the preedit string. + * + * This function will be called by Ecore IMF. + * + * Set whether the IM context should use the preedit string to display feedback. + * If is 0 (default is 1), then the IM context may use some other method to + * 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) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " = " << (use_preedit ? "true" : "false") << "...\n"; + + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get (ctx); + + if (!_on_the_spot) return; + + if (context_scim && context_scim->impl) + { + bool old = context_scim->impl->use_preedit; + context_scim->impl->use_preedit = use_preedit; + if (context_scim == _focused_ic) + { + _panel_client.prepare (context_scim->id); + + if (old != use_preedit) + set_ic_capabilities (context_scim); + + if (context_scim->impl->preedit_string.length ()) + slot_show_preedit_string (context_scim->impl->si); + + _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) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + 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); + + if (str) + { + if (mbs.length ()) + *str = strdup (mbs.c_str ()); + else + *str = strdup (""); + } + + if (cursor_pos) + { + *cursor_pos = context_scim->impl->preedit_caret; + } + + if (attrs) + { + if (mbs.length ()) + { + int start_index, end_index; + 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)); + + 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 (); + + 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 ()); + + if (i->get_type () == SCIM_ATTR_DECORATE) + { + attr = (Ecore_IMF_Preedit_Attr *)calloc(1, sizeof(Ecore_IMF_Preedit_Attr)); + if (attr == NULL) + continue; + attr->start_index = start_index; + attr->end_index = end_index; + + 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) + { + attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_SUB2; + *attrs = eina_list_append(*attrs, (void *)attr); + } + 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); + } + + switch(i->get_value()) + { + case SCIM_ATTR_DECORATE_UNDERLINE: + case SCIM_ATTR_DECORATE_REVERSE: + case SCIM_ATTR_DECORATE_HIGHLIGHT: + // Record which character has attribute. + for (int pos = start_index; pos < end_index; ++pos) + attrs_flag [pos] = 1; + break; + default: + break; + } + } + else if (i->get_type () == SCIM_ATTR_FOREGROUND) + { + SCIM_DEBUG_FRONTEND(4) << "SCIM_ATTR_FOREGROUND\n"; + } + else if (i->get_type () == SCIM_ATTR_BACKGROUND) + { + SCIM_DEBUG_FRONTEND(4) << "SCIM_ATTR_BACKGROUND\n"; + } + } + } + + // Add underline for all characters which don't have attribute. + for (unsigned int pos = 0; pos < mbs.length (); ++pos) + { + if (!attrs_flag [pos]) + { + int begin_pos = pos; + + while (pos < mbs.length () && !attrs_flag [pos]) + ++pos; + + // use REVERSE style as default + attr = (Ecore_IMF_Preedit_Attr *)calloc(1, sizeof(Ecore_IMF_Preedit_Attr)); + if (attr == NULL) + continue; + attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_SUB2; + attr->start_index = begin_pos; + attr->end_index = pos; + *attrs = eina_list_append(*attrs, (void *)attr); + } + } + + delete [] attrs_flag; + } + } + } + else + { + if (str) + *str = strdup (""); + + if (cursor_pos) + *cursor_pos = 0; + + if (attrs) + *attrs = NULL; + } +} + +/** + * isf_imf_context_preedit_string_get + * @ctx: a #Ecore_IMF_Context + * @str: the preedit string + * @cursor_pos: the cursor position + * + * This function will be called by Ecore IMF. + * + * 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) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + 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); + + if (str) + { + if (mbs.length ()) + *str = strdup (mbs.c_str ()); + else + *str = strdup (""); + } + + if (cursor_pos) + *cursor_pos = context_scim->impl->preedit_caret; + } + else + { + if (str) + *str = strdup (""); + + if (cursor_pos) + *cursor_pos = 0; + } +} + +/** + * isf_imf_context_cursor_position_set + * @ctx: a #Ecore_IMF_Context + * @cursor_pos: New cursor position in characters. + * + * This function will be called by Ecore IMF. + * + * 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) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *context_scim = (EcoreIMFContextISF *)ecore_imf_context_data_get (ctx); + + if (context_scim && context_scim->impl && context_scim == _focused_ic) + { + // Don't update spot location while updating preedit string. + if (context_scim->impl->preedit_updating) + return; + + if (context_scim->impl->cursor_pos != cursor_pos) + { + context_scim->impl->cursor_pos = cursor_pos; + caps_mode_check(ctx, EINA_FALSE); + } + } +} + +/** + * isf_imf_context_input_mode_set + * @ctx: a #Ecore_IMF_Context + * @input_mode: the input mode + * + * This function will be called by Ecore IMF. + * + * To set the input mode of input method. The definition of Ecore_IMF_Input_Mode + * is in Ecore_IMF.h. + */ +EAPI void +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); + if (context_scim && context_scim->impl) + context_scim->impl->input_mode = input_mode; +} + +/** + * isf_imf_context_prediction_allow_set + * @ctx: a #Ecore_IMF_Context + * @use_prediction: Whether the IM context should use the prediction. + * + * This function will be called by Ecore IMF. + * + * Set whether the IM context should use the prediction. + */ +EAPI void +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); + + 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) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << " = " << autocapital_type << "...\n"; + + 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; +} + +/** + * isf_imf_context_filter_event + * @ctx: a #Ecore_IMF_Context + * @type: The type of event defined by Ecore_IMF_Event_Type. + * @event: The event itself. + * Return value: %TRUE if the input method handled the key event. + * + * This function will be called by Ecore IMF. + * + * Allow an Ecore Input Context to internally handle an event. If this function + * returns 1, then no further processing should be done for this event. Input + * methods must be able to accept all types of events (simply returning 0 if + * the event was not handled), but there is no obligation of any events to be + * submitted to this function. + */ + +EAPI Eina_Bool +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); + Eina_Bool ret = EINA_FALSE; + + if (ic == NULL || ic->impl == NULL) + return ret; + + KeyEvent key; + + 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); + 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; + if (ev->locks & ECORE_IMF_KEYBOARD_LOCK_CAPS) key.mask |=SCIM_KEY_CapsLockMask; + if (ev->locks & ECORE_IMF_KEYBOARD_LOCK_NUM) key.mask |=SCIM_KEY_NumLockMask; + } + 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); + 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; + if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_ALT) key.mask |=SCIM_KEY_AltMask; + if (ev->locks & ECORE_IMF_KEYBOARD_LOCK_CAPS) key.mask |=SCIM_KEY_CapsLockMask; + if (ev->locks & ECORE_IMF_KEYBOARD_LOCK_NUM) key.mask |=SCIM_KEY_NumLockMask; + } + else + { + return ret; + } + + key.mask &= _valid_key_mask; + + _panel_client.prepare (ic->id); + + ret = EINA_TRUE; + if (!filter_hotkeys (ic, key)) + { + if (!_focused_ic || !_focused_ic->impl->is_on || + !_focused_ic->impl->si->process_key_event (key)) + ret = EINA_FALSE; + } + + _panel_client.send (); + + return ret; +} + +/* Panel Slot functions */ +static void +panel_slot_reload_config (int context __UNUSED__) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + _config->reload (); +} + +static void +panel_slot_exit (int /* context */) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + finalize (); +} + +static void +panel_slot_update_lookup_table_page_size (int context, int page_size) +{ + 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 (); + } +} + +static void +panel_slot_lookup_table_page_up (int 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 (); + } +} + +static void +panel_slot_lookup_table_page_down (int 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 (); + } +} + +static void +panel_slot_trigger_property (int context, const String &property) +{ + 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 (); + } +} + +static void +panel_slot_process_helper_event (int context, const String &target_uuid, const String &helper_uuid, const Transaction &trans) +{ + 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) + { + _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 (); + } +} + +static void +panel_slot_move_preedit_caret (int context, int caret_pos) +{ + 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 (); + } +} + +static void +panel_slot_select_candidate (int context, int cand_index) +{ + 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 (); + } +} + +static void +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"; + + if (ic && ic->impl && ic->impl->client_canvas) + feed_key_event(ic->impl->client_canvas, key.get_key_string().c_str(), EINA_FALSE); +} + +static void +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"; + + 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_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) +{ + 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); +} + +static void +panel_slot_request_help (int 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 (); + } +} + +static void +panel_slot_request_factory_menu (int 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 (); + } +} + +static void +panel_slot_change_factory (int context, const String &uuid) +{ + 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 (); + } +} + +/* Panel Requestion functions. */ +static void +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"); + + if (ic && ic->impl) + { + 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_help ()); + help += String ("\n\n"); + + help += utf8_wcstombs (sf->get_credits ()); + } + _panel_client.show_help (ic->id, help); + } +} + +static void +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"); + + 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 ())); + } + + if (menu.size ()) + _panel_client.show_factory_menu (ic->id, menu); +} + +static void +panel_req_update_factory_info (EcoreIMFContextISF *ic) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + if (ic && ic->impl && ic == _focused_ic) + { + PanelFactoryInfo info; + if (ic->impl->is_on) + { + 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 ()); + } + else + { + info = PanelFactoryInfo (String (""), String ("English/Keyboard"), String ("C"), ""); + } + _panel_client.update_factory_info (ic->id, info); + } +} + +static void +panel_req_focus_in (EcoreIMFContextISF *ic) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + _panel_client.focus_in (ic->id, ic->impl->si->get_factory_uuid ()); +} + +static void +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); +} + +static bool +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); + + 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); + else + turn_off_ic (ic); + ret = true; + } + else if (hotkey_action == SCIM_FRONTEND_HOTKEY_ON) + { + if (!ic->impl->is_on) + turn_on_ic (ic); + ret = true; + } + else if (hotkey_action == SCIM_FRONTEND_HOTKEY_OFF) + { + if (ic->impl->is_on) + turn_off_ic (ic); + ret = true; + } + else if (hotkey_action == SCIM_FRONTEND_HOTKEY_NEXT_FACTORY) + { + open_next_factory (ic); + ret = true; + } + else if (hotkey_action == SCIM_FRONTEND_HOTKEY_PREVIOUS_FACTORY) + { + open_previous_factory (ic); + ret = true; + } + else if (hotkey_action == SCIM_FRONTEND_HOTKEY_SHOW_FACTORY_MENU) + { + panel_req_show_factory_menu (ic); + ret = true; + } + else if (_imengine_hotkey_matcher.is_matched ()) + { + String sfid = _imengine_hotkey_matcher.get_match_result (); + open_specific_factory (ic, sfid); + ret = true; + } + return ret; +} + +static bool +panel_initialize (void) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + String display_name; + { + const char *p = getenv ("DISPLAY"); + if (p) display_name = String (p); + } + + if (_panel_client.open_connection (_config->get_name (), display_name) >= 0) + { + 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); + + SCIM_DEBUG_FRONTEND(2) << " Panel FD= " << fd << "\n"; + + return true; + } + std::cerr << "panel_initialize () failed!!!\n"; + return false; +} + +static void +panel_finalize (void) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + _panel_client.close_connection (); + + if (_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); + _panel_iochannel_err_handler = 0; + } +} + +static Eina_Bool +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 ()) + { + panel_finalize (); + panel_initialize (); + return ECORE_CALLBACK_CANCEL; + } + } + else if (fd_handler == _panel_iochannel_err_handler) + { + panel_finalize (); + panel_initialize (); + return ECORE_CALLBACK_CANCEL; + } + return ECORE_CALLBACK_RENEW; +} + +static void +turn_on_ic (EcoreIMFContextISF *ic) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + if (ic && ic->impl && !ic->impl->is_on) + { + ic->impl->is_on = true; + + 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 (); + } + + //Record the IC on/off status + if (_shared_input_method) + _config->write (String (SCIM_CONFIG_FRONTEND_IM_OPENED_BY_DEFAULT), true); + + if (ic->impl->use_preedit && ic->impl->preedit_string.length ()) + { + 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_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL); + ic->impl->preedit_started = true; + } + } +} + +static void +turn_off_ic (EcoreIMFContextISF *ic) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + if (ic && ic->impl && ic->impl->is_on) + { + ic->impl->is_on = false; + + if (ic == _focused_ic) + { + ic->impl->si->focus_out (); + + 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); + + if (ic->impl->use_preedit && ic->impl->preedit_string.length ()) + { + 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_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL); + ic->impl->preedit_started = false; + } + } +} + +static void +set_ic_capabilities (EcoreIMFContextISF *ic) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + if (ic && ic->impl) + { + unsigned int cap = SCIM_CLIENT_CAP_ALL_CAPABILITIES; + + if (!_on_the_spot || !ic->impl->use_preedit) + cap -= SCIM_CLIENT_CAP_ONTHESPOT_PREEDIT; + + ic->impl->si->update_client_capabilities (cap); + } +} + +static bool +check_socket_frontend (void) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + SocketAddress address; + SocketClient client; + + uint32 magic; + + address.set_address (scim_get_default_socket_frontend_address ()); + + if (!client.connect (address)) + return false; + + if (!scim_socket_open_connection (magic, + String ("ConnectionTester"), + String ("SocketFrontEnd"), + client, + 1000)) + return false; + + return true; +} + +void +initialize (void) +{ + std::vector config_list; + std::vector engine_list; + std::vector load_engine_list; + + std::vector::iterator it; + + bool manual = false; + + bool socket = true; + + String config_module_name = "simple"; + + printf("Initializing Ecore SCIM IMModule...\n"); + + SCIM_DEBUG_FRONTEND(1) << "Initializing Ecore SCIM IMModule...\n"; + + // Get system language. + _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 (); + if (!check_result) + { + std::cerr << "Launching a SCIM daemon with Socket FrontEnd...\n"; + //get modules list + scim_get_imengine_module_list (engine_list); + + for (it = engine_list.begin (); it != engine_list.end (); it++) + { + if (*it != "socket") + 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); + manual = false; + } + + // If there is one Socket FrontEnd running and it's not manual mode, + // then just use this Socket Frontend. + if (!manual) + { + for (int i = 0; i < 200; ++i) + { + if (check_result) + { + config_module_name = "socket"; + load_engine_list.clear (); + load_engine_list.push_back ("socket"); + break; + } + scim_usleep (50000); + check_result = check_socket_frontend (); + } + } + } + + if (config_module_name != "dummy") + { + //load config module + SCIM_DEBUG_FRONTEND(1) << "Loading Config module: " << config_module_name << "...\n"; + _config_module = new ConfigModule (config_module_name); + + //create config instance + if (_config_module != NULL && _config_module->valid ()) + _config = _config_module->create_config (); + } + + 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_module_name = "dummy"; + } + + 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); + + if (_backend.null ()) + std::cerr << "Cannot create BackEnd Object!\n"; + else + _fallback_factory = _backend->get_factory (SCIM_COMPOSE_KEY_FACTORY_UUID); + + 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)); + + // 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 ()) + std::cerr << "Ecore IM Module: Cannot connect to Panel!\n"; +} + +static 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 (); + + SCIM_DEBUG_FRONTEND(2) << "Finalize all IC partially.\n"; + while (_used_ic_impl_list) + { + // 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); + } + + delete_all_ic_impl (); + + _fallback_instance.reset (); + _fallback_factory.reset (); + + SCIM_DEBUG_FRONTEND(2) << " Releasing BackEnd...\n"; + _backend.reset (); + + SCIM_DEBUG_FRONTEND(2) << " Releasing Config...\n"; + _config.reset (); + + if (_config_module) + { + SCIM_DEBUG_FRONTEND(2) << " Deleting _config_module...\n"; + delete _config_module; + _config_module = 0; + } + + _focused_ic = NULL; + _ic_list = NULL; + + _scim_initialized = false; + + panel_finalize (); +} + +static void +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 ()); + + 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 (); + 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); + + if (_shared_input_method) + { + _default_instance = ic->impl->si; + ic->impl->shared_si = true; + } + } +} + +static void +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 ()); + + 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 (); + 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); + + if (_shared_input_method) + { + _default_instance = ic->impl->si; + ic->impl->shared_si = true; + } + } +} + +static void +open_specific_factory (EcoreIMFContextISF *ic, + const String &uuid) +{ + if (ic == NULL) + return; + + 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) + { + turn_on_ic (ic); + return; + } + + IMEngineFactoryPointer sf = _backend->get_factory (uuid); + + 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 (); + 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); + + if (_shared_input_method) + { + _default_instance = ic->impl->si; + ic->impl->shared_si = true; + } + } + else + { + // 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 (); + + 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); + + if (ic->impl->use_preedit && ic->impl->preedit_string.length ()) + { + 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_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL); + ic->impl->preedit_started = false; + } + } + } +} + +static void initialize_modifier_bits (Display *display) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + if (__current_display == display) + return; + + __current_display = display; + + if (display == 0) + { + __current_alt_mask = Mod1Mask; + __current_meta_mask = ShiftMask | Mod1Mask; + __current_super_mask = 0; + __current_hyper_mask = 0; + __current_numlock_mask = Mod2Mask; + return; + } + + 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); + + int i, j; + + mods = XGetModifierMapping (display); + if (mods == NULL) + return; + + __current_alt_mask = 0; + __current_meta_mask = 0; + __current_super_mask = 0; + __current_hyper_mask = 0; + __current_numlock_mask = 0; + + /* We skip the first three sets for Shift, Lock, and Control. The + remaining sets are for Mod1, Mod2, Mod3, Mod4, and Mod5. */ + for (i = 3; i < 8; i++) + { + for (j = 0; j < mods->max_keypermod; j++) + { + ::KeyCode code = mods->modifiermap [i * mods->max_keypermod + j]; + if (! code) continue; + if (code == alt_l || code == alt_r) + __current_alt_mask |= (1 << i); + else if (code == meta_l || code == meta_r) + __current_meta_mask |= (1 << i); + else if (code == super_l || code == super_r) + __current_super_mask |= (1 << i); + else if (code == hyper_l || code == hyper_r) + __current_hyper_mask |= (1 << i); + else if (code == numlock) + __current_numlock_mask |= (1 << i); + } + } + + /* Check whether there is a combine keys mapped to Meta */ + if (__current_meta_mask == 0) + { + char buf [32]; + XKeyEvent xkey; + KeySym keysym_l, keysym_r; + + xkey.type = KeyPress; + xkey.display = display; + xkey.serial = 0L; + xkey.send_event = False; + xkey.x = xkey.y = xkey.x_root = xkey.y_root = 0; + xkey.time = 0; + xkey.same_screen = False; + xkey.subwindow = None; + xkey.window = None; + xkey.root = DefaultRootWindow (display); + xkey.state = ShiftMask; + + xkey.keycode = meta_l; + XLookupString (&xkey, buf, 32, &keysym_l, 0); + xkey.keycode = meta_r; + 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; + else if ((meta_l == ctrl_l && keysym_l == XK_Meta_L) || (meta_r == ctrl_r && keysym_r == XK_Meta_R)) + __current_meta_mask = ShiftMask + ControlMask; + } + + XFreeModifiermap (mods); +} + +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); + + if (scimkeymask & SCIM_KEY_ShiftMask) state |= ShiftMask; + if (scimkeymask & SCIM_KEY_CapsLockMask) state |= LockMask; + if (scimkeymask & SCIM_KEY_ControlMask) state |= ControlMask; + if (scimkeymask & SCIM_KEY_AltMask) state |= __current_alt_mask; + if (scimkeymask & SCIM_KEY_MetaMask) state |= __current_meta_mask; + if (scimkeymask & SCIM_KEY_SuperMask) state |= __current_super_mask; + if (scimkeymask & SCIM_KEY_HyperMask) state |= __current_hyper_mask; + if (scimkeymask & SCIM_KEY_NumLockMask) state |= __current_numlock_mask; + + return state; +} + +static XKeyEvent createKeyEvent (Display *display, Window &win, + Window &winRoot, bool press, + int keycode, int modifiers) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + XKeyEvent event; + + event.display = display; + event.window = win; + event.root = winRoot; + event.subwindow = None; + event.time = CurrentTime; + event.x = 1; + event.y = 1; + event.x_root = 1; + event.y_root = 1; + event.same_screen = EINA_TRUE; + event.state = modifiers; + event.keycode = XKeysymToKeycode (display, keycode); + if (press) + event.type = KeyPress; + else + event.type = KeyRelease; + event.send_event = EINA_FALSE; + event.serial = 0; + + return event; +} + +static void _x_send_key_event (const KeyEvent &key) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + // Obtain the X11 display. + Display *display = XOpenDisplay (NULL); + if (display == NULL) + { + std::cerr << "XOpenDisplay failed\n"; + return; + } + + // Get the root window for the current display. + Window winRoot = 0;// = XRootWindow (display, 1); + + // Find the window which has the current keyboard focus. + Window winFocus = 0; + int revert = RevertToParent; + + XGetInputFocus (display, &winFocus, &revert); + + // Send a fake key press event to the window. + XSelectInput (display, winFocus, FocusChangeMask|KeyPressMask|KeyReleaseMask); + XMapWindow (display, winFocus); + + unsigned int modifier = scim_x11_keymask_scim_to_x11 (display, key.mask); + XKeyEvent event; + if (key.is_key_press ()) + { + 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); + } + + XCloseDisplay (display); +} + +static void +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_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_commit_string ( + slot (slot_commit_string)); + + si->signal_connect_forward_key_event ( + slot (slot_forward_key_event)); + + si->signal_connect_register_properties ( + slot (slot_register_properties)); + + si->signal_connect_update_property ( + slot (slot_update_property)); + + si->signal_connect_beep ( + slot (slot_beep)); + + si->signal_connect_start_helper ( + slot (slot_start_helper)); + + si->signal_connect_stop_helper ( + slot (slot_stop_helper)); + + 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_delete_surrounding_text ( + slot (slot_delete_surrounding_text)); +} + +// Implementation of slot functions +static void +slot_show_preedit_string (IMEngineInstanceBase *si) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + + if (ic && ic->impl && _focused_ic == ic) + { + if (ic->impl->use_preedit) + { + if (!ic->impl->preedit_started) + { + 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); + } +} + +static void +slot_show_aux_string (IMEngineInstanceBase *si) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + + if (ic && ic->impl && _focused_ic == ic) + _panel_client.show_aux_string (ic->id); +} + +static void +slot_show_lookup_table (IMEngineInstanceBase *si) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + + if (ic && ic->impl && _focused_ic == ic) + _panel_client.show_lookup_table (ic->id); +} + +static void +slot_hide_preedit_string (IMEngineInstanceBase *si) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + + if (ic && ic->impl && _focused_ic == ic) + { + bool emit = false; + if (ic->impl->preedit_string.length ()) + { + ic->impl->preedit_string = WideString (); + ic->impl->preedit_caret = 0; + 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_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_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL); + ic->impl->preedit_started = false; + } + } + else + _panel_client.hide_preedit_string (ic->id); + } +} + +static void +slot_hide_aux_string (IMEngineInstanceBase *si) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + + if (ic && ic->impl && _focused_ic == ic) + _panel_client.hide_aux_string (ic->id); +} + +static void +slot_hide_lookup_table (IMEngineInstanceBase *si) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + + if (ic && ic->impl && _focused_ic == ic) + _panel_client.hide_lookup_table (ic->id); +} + +static void +slot_update_preedit_caret (IMEngineInstanceBase *si, int caret) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + + if (ic && ic->impl && _focused_ic == ic && ic->impl->preedit_caret != caret) + { + ic->impl->preedit_caret = caret; + if (ic->impl->use_preedit) + { + if (!ic->impl->preedit_started) + { + 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_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL); + } + else + _panel_client.update_preedit_caret (ic->id, caret); + } +} + +static void +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 ()); + + if (ic && ic->impl && _focused_ic == ic && (ic->impl->preedit_string != str || str.length ())) + { + ic->impl->preedit_string = str; + ic->impl->preedit_attrlist = attrs; + if (ic->impl->use_preedit) + { + if (!ic->impl->preedit_started) + { + 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_updating = true; + 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); + } + } +} + +static void +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 ()); + + if (ic && ic->impl && _focused_ic == ic) + _panel_client.update_aux_string (ic->id, str, attrs); +} + +static void +slot_commit_string (IMEngineInstanceBase *si, + const WideString & str) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + 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_event_callback_call(ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(str).c_str()); + } +} + +static void +slot_forward_key_event (IMEngineInstanceBase *si, + const KeyEvent & key) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + + if (ic && _focused_ic == ic) + { + if (!_fallback_instance->process_key_event (key)) + _x_send_key_event(key); + } +} + +static void +slot_update_lookup_table (IMEngineInstanceBase *si, + const LookupTable & table) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + + if (ic && ic->impl && _focused_ic == ic) + _panel_client.update_lookup_table (ic->id, table); +} + +static void +slot_register_properties (IMEngineInstanceBase *si, + const PropertyList & properties) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + + if (ic && ic->impl && _focused_ic == ic) + _panel_client.register_properties (ic->id, properties); +} + +static void +slot_update_property (IMEngineInstanceBase *si, + const Property & property) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + + if (ic && ic->impl && _focused_ic == ic) + _panel_client.update_property (ic->id, property); +} + +static void +slot_beep (IMEngineInstanceBase *si __UNUSED__) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; +} + +static void +slot_start_helper (IMEngineInstanceBase *si, + const String &helper_uuid) +{ + 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"; + + if (ic && ic->impl) + _panel_client.start_helper (ic->id, helper_uuid); +} + +static void +slot_stop_helper (IMEngineInstanceBase *si, + const String &helper_uuid) +{ + 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); +} + +static void +slot_send_helper_event (IMEngineInstanceBase *si, + const String &helper_uuid, + const Transaction &trans) +{ + 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"; + + if (ic && ic->impl) + _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) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + 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)) + { + 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 (); + text = before + after; + cursor = before.length (); + return true; + } + } + return false; +} + +static bool +slot_delete_surrounding_text (IMEngineInstanceBase *si, + int offset, + int len) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + EcoreIMFContextISF *ic = static_cast (si->get_frontend_data ()); + + if (ic && ic->impl && _focused_ic == ic) + { + Ecore_IMF_Event_Delete_Surrounding ev; + 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_event_callback_call(_focused_ic->ctx, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, &ev); + return true; + } + return false; +} + +static void +reload_config_callback (const ConfigPointer &config) +{ + SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n"; + + _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"))); + + _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); + + // Get keyboard layout setting + // Flush the global config first, in order to load the new configs from disk. + scim_global_config_flush (); + + _keyboard_layout = scim_get_default_keyboard_layout (); +} + +static void +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_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 new file mode 100644 index 0000000..84f1a2f --- /dev/null +++ b/libraries/ecore/src/modules/immodules/scim/scim_imcontext.h @@ -0,0 +1,40 @@ +#ifndef __ISF_IMF_CONTEXT_H +#define __ISF_IMF_CONTEXT_H + +#include + +typedef struct _EcoreIMFContextISF EcoreIMFContextISF; +typedef struct _EcoreIMFContextISFImpl EcoreIMFContextISFImpl; + +struct _EcoreIMFContextISF { + Ecore_IMF_Context *ctx; + + EcoreIMFContextISFImpl *impl; + + int id; /* Input Context id*/ + struct _EcoreIMFContextISF *next; +}; + +void isf_imf_context_add (Ecore_IMF_Context *ctx); +void isf_imf_context_del (Ecore_IMF_Context *ctx); +void isf_imf_context_client_window_set (Ecore_IMF_Context *ctx, void *window); +void isf_imf_context_client_canvas_set (Ecore_IMF_Context *ctx, void *window); +void isf_imf_context_focus_in (Ecore_IMF_Context *ctx); +void isf_imf_context_focus_out (Ecore_IMF_Context *ctx); +void isf_imf_context_reset (Ecore_IMF_Context *ctx); +void isf_imf_context_cursor_position_set (Ecore_IMF_Context *ctx, int cursor_pos); +void isf_imf_context_cursor_location_set (Ecore_IMF_Context *ctx, int x, int y, int w, int h); +void isf_imf_context_input_mode_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode); +void isf_imf_context_preedit_string_get (Ecore_IMF_Context *ctx, char** str, int *cursor_pos); +void isf_imf_context_preedit_string_with_attributes_get (Ecore_IMF_Context *ctx, char** str, Eina_List **attrs, int *cursor_pos); +void isf_imf_context_use_preedit_set (Ecore_IMF_Context* ctx, Eina_Bool use_preedit); +Eina_Bool isf_imf_context_filter_event (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *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); + +EcoreIMFContextISF* isf_imf_context_new (void); +void isf_imf_context_shutdown (void); + +#endif /* __ISF_IMF_CONTEXT_H */ + diff --git a/libraries/ecore/src/modules/immodules/scim/scim_module.cpp b/libraries/ecore/src/modules/immodules/scim/scim_module.cpp new file mode 100644 index 0000000..eff6381 --- /dev/null +++ b/libraries/ecore/src/modules/immodules/scim/scim_module.cpp @@ -0,0 +1,93 @@ +#include +#include "scim_imcontext.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + static const Ecore_IMF_Context_Info isf_imf_info = { + "scim", /* ID */ + "SCIM immodule for Ecore", /* Description */ + "*", /* Default locales */ + NULL, /* Canvas type */ + 0 /* Canvas required */ + }; + + static Ecore_IMF_Context_Class isf_imf_class = { + isf_imf_context_add, /* add */ + 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_preedit_string_get, /* get_preedit_string */ + isf_imf_context_focus_in, /* focus_in */ + isf_imf_context_focus_out, /* focus_out */ + isf_imf_context_reset, /* reset */ + isf_imf_context_cursor_position_set, /* cursor_position_set */ + isf_imf_context_use_preedit_set, /* use_preedit_set */ + isf_imf_context_input_mode_set, /* input_mode_set */ + isf_imf_context_filter_event, /* filter_event */ + isf_imf_context_preedit_string_with_attributes_get, /* preedit_string_with_attribute_get */ + isf_imf_context_prediction_allow_set, /* prediction_allow_set */ + isf_imf_context_autocapital_type_set, /* autocapital_type_set */ + NULL, /* control panel show */ + NULL, /* control panel hide */ + NULL, /* input_panel_layout_set */ + 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 */ + }; + + static Ecore_IMF_Context *imf_module_create (void); + static Ecore_IMF_Context *imf_module_exit (void); + + static Eina_Bool imf_module_init (void) + { + ecore_imf_module_register (&isf_imf_info, imf_module_create, imf_module_exit); + return EINA_TRUE; + } + + static void imf_module_shutdown (void) + { + isf_imf_context_shutdown (); + } + + static Ecore_IMF_Context *imf_module_create (void) + { + Ecore_IMF_Context *ctx = NULL; + EcoreIMFContextISF *ctxd = NULL; + + ctxd = isf_imf_context_new (); + if (!ctxd) + { + printf ("isf_imf_context_new () failed!!!\n"); + return NULL; + } + + ctx = ecore_imf_context_new (&isf_imf_class); + if (!ctx) + { + delete ctxd; + return NULL; + } + + ecore_imf_context_data_set (ctx, ctxd); + + return ctx; + } + + static Ecore_IMF_Context *imf_module_exit (void) + { + return NULL; + } + + EINA_MODULE_INIT(imf_module_init); + EINA_MODULE_SHUTDOWN(imf_module_shutdown); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + diff --git a/libraries/ecore/src/modules/immodules/xim/Makefile.in b/libraries/ecore/src/modules/immodules/xim/Makefile.in index ec58d4b..5b78946 100644 --- a/libraries/ecore/src/modules/immodules/xim/Makefile.in +++ b/libraries/ecore/src/modules/immodules/xim/Makefile.in @@ -244,10 +244,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -266,6 +266,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -379,6 +383,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -391,6 +397,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -435,12 +443,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ 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 7c40606..ea7ee7f 100644 --- a/libraries/ecore/src/modules/immodules/xim/ecore_imf_xim.c +++ b/libraries/ecore/src/modules/immodules/xim/ecore_imf_xim.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include @@ -12,9 +16,6 @@ #include #include #include -#ifdef HAVE_CONFIG_H -# include -#endif #define CLAMP(x, low, high) (x > high) ? high : (x < low) ? low : x #define _(x) x @@ -23,6 +24,8 @@ static Eina_List *open_ims = NULL; #endif +#define FEEDBACK_MASK (XIMReverse | XIMUnderline | XIMHighlight) + typedef struct _XIM_Im_Info XIM_Im_Info; struct _XIM_Im_Info { @@ -51,6 +54,7 @@ struct _Ecore_IMF_Context_Data Eina_Bool finalizing; Eina_Bool has_focus; Eina_Bool in_toplevel; + XIMFeedback *feedbacks; XIMCallback preedit_start_cb; XIMCallback preedit_done_cb; @@ -63,40 +67,62 @@ Ecore_IMF_Context_Data *imf_context_data_new(); void imf_context_data_destroy(Ecore_IMF_Context_Data *imf_context_data); #ifdef ENABLE_XIM -static void reinitialize_ic(Ecore_IMF_Context *ctx); -static void reinitialize_all_ics(XIM_Im_Info *info); -static void set_ic_client_window(Ecore_IMF_Context *ctx, - Ecore_X_Window window); -static int preedit_start_callback(XIC xic, - XPointer client_data, - XPointer call_data); -static void preedit_done_callback(XIC xic, - XPointer client_data, - XPointer call_data); -static int xim_text_to_utf8(Ecore_IMF_Context *ctx, - XIMText *xim_text, - char **text); -static void preedit_draw_callback(XIC xic, - XPointer client_data, - XIMPreeditDrawCallbackStruct *call_data); -static void preedit_caret_callback(XIC xic, - XPointer client_data, - XIMPreeditCaretCallbackStruct *call_data); +static void add_feedback_attr(Eina_List **attrs, + const char *str, + XIMFeedback feedback, + int start_pos, + int end_pos); + +static void reinitialize_ic(Ecore_IMF_Context *ctx); +static void reinitialize_all_ics(XIM_Im_Info *info); +static void set_ic_client_window(Ecore_IMF_Context *ctx, + Ecore_X_Window window); +static int preedit_start_callback(XIC xic, + XPointer client_data, + XPointer call_data); +static void preedit_done_callback(XIC xic, + XPointer client_data, + XPointer call_data); +static int xim_text_to_utf8(Ecore_IMF_Context *ctx, + XIMText *xim_text, + char **text); +static void preedit_draw_callback(XIC xic, + XPointer client_data, + XIMPreeditDrawCallbackStruct *call_data); +static void preedit_caret_callback(XIC xic, + XPointer client_data, + XIMPreeditCaretCallbackStruct *call_data); static XVaNestedList preedit_callback_set(Ecore_IMF_Context *ctx); static XIC get_ic(Ecore_IMF_Context *ctx); static XIM_Im_Info *get_im(Ecore_X_Window window, - char *locale); + char *locale); static void xim_info_try_im(XIM_Im_Info *info); static void xim_info_display_closed(Ecore_X_Display *display, - int is_error, - XIM_Im_Info *info); -static void xim_instantiate_callback(Display *display, - XPointer client_data, - XPointer call_data); -static void setup_im(XIM_Im_Info *info); -static void xim_destroy_callback(XIM xim, - XPointer client_data, - XPointer call_data); + int is_error, + XIM_Im_Info *info); +static void xim_instantiate_callback(Display *display, + XPointer client_data, + XPointer call_data); +static void setup_im(XIM_Im_Info *info); +static void xim_destroy_callback(XIM xim, + XPointer client_data, + XPointer call_data); +#endif + +#ifdef ENABLE_XIM +static unsigned int +utf8_offset_to_index(const char *str, int offset) +{ + int index = 0; + int i; + for (i = 0; i < offset; i++) + { + eina_unicode_utf8_get_next(str, &index); + } + + return index; +} + #endif static void @@ -107,7 +133,7 @@ _ecore_imf_context_xim_add(Ecore_IMF_Context *ctx) Ecore_IMF_Context_Data *imf_context_data = NULL; imf_context_data = imf_context_data_new(); - if(!imf_context_data) return; + if (!imf_context_data) return; imf_context_data->use_preedit = EINA_TRUE; imf_context_data->finalizing = EINA_FALSE; @@ -115,6 +141,8 @@ _ecore_imf_context_xim_add(Ecore_IMF_Context *ctx) imf_context_data->in_toplevel = EINA_FALSE; ecore_imf_context_data_set(ctx, imf_context_data); +#else + (void)ctx; #endif } @@ -127,48 +155,53 @@ _ecore_imf_context_xim_del(Ecore_IMF_Context *ctx) imf_context_data = ecore_imf_context_data_get(ctx); imf_context_data->finalizing = EINA_TRUE; - if(imf_context_data->im_info && !imf_context_data->im_info->ics->next) + if (imf_context_data->im_info && !imf_context_data->im_info->ics->next) { - if(imf_context_data->im_info->reconnecting == EINA_TRUE) + if (imf_context_data->im_info->reconnecting == EINA_TRUE) { Ecore_X_Display *dsp; dsp = ecore_x_display_get(); - XUnregisterIMInstantiateCallback (dsp, - NULL, NULL, NULL, - xim_instantiate_callback, - (XPointer)imf_context_data->im_info); + XUnregisterIMInstantiateCallback(dsp, + NULL, NULL, NULL, + xim_instantiate_callback, + (XPointer)imf_context_data->im_info); } - else if(imf_context_data->im_info->im) + else if (imf_context_data->im_info->im) { XIMCallback im_destroy_callback; im_destroy_callback.client_data = NULL; im_destroy_callback.callback = NULL; - XSetIMValues (imf_context_data->im_info->im, - XNDestroyCallback, &im_destroy_callback, - NULL); + XSetIMValues(imf_context_data->im_info->im, + XNDestroyCallback, &im_destroy_callback, + NULL); } } set_ic_client_window(ctx, 0); imf_context_data_destroy(imf_context_data); +#else + (void)ctx; #endif } static void _ecore_imf_context_xim_client_window_set(Ecore_IMF_Context *ctx, - void *window) + void *window) { EINA_LOG_DBG("in"); #ifdef ENABLE_XIM set_ic_client_window(ctx, (Ecore_X_Window)((Ecore_Window)window)); +#else + (void)ctx; + (void)window; #endif } static void _ecore_imf_context_xim_preedit_string_get(Ecore_IMF_Context *ctx, - char **str, - int *cursor_pos) + char **str, + int *cursor_pos) { EINA_LOG_DBG("in"); #ifdef ENABLE_XIM @@ -180,25 +213,73 @@ _ecore_imf_context_xim_preedit_string_get(Ecore_IMF_Context *ctx, { utf8 = eina_unicode_unicode_to_utf8(imf_context_data->preedit_chars, &len); - if(str) - *str = utf8; + if (str) + *str = utf8; else - free(utf8); + free(utf8); } else { - if(str) - *str = NULL; - if(cursor_pos) - *cursor_pos = 0; + if (str) + *str = NULL; + if (cursor_pos) + *cursor_pos = 0; } - if(cursor_pos) + if (cursor_pos) *cursor_pos = imf_context_data->preedit_cursor; #else - if(str) + (void)ctx; + if (str) + *str = NULL; + if (cursor_pos) + *cursor_pos = 0; +#endif +} + +static void +_ecore_imf_context_xim_preedit_string_with_attributes_get(Ecore_IMF_Context *ctx, + char **str, + Eina_List **attrs, + int *cursor_pos) +{ + EINA_LOG_DBG("in"); + +#ifdef ENABLE_XIM + Ecore_IMF_Context_Data *imf_context_data = ecore_imf_context_data_get(ctx); + + _ecore_imf_context_xim_preedit_string_get(ctx, str, cursor_pos); + + if (!attrs) return; + if (!imf_context_data || !imf_context_data->feedbacks) return; + + int i = 0; + XIMFeedback last_feedback = 0; + int start = -1; + + for (i = 0; i < imf_context_data->preedit_length; i++) + { + XIMFeedback new_feedback = imf_context_data->feedbacks[i] & FEEDBACK_MASK; + + if (new_feedback != last_feedback) + { + if (start >= 0) + add_feedback_attr(attrs, *str, last_feedback, start, i); + + last_feedback = new_feedback; + start = i; + } + } + + if (start >= 0) + add_feedback_attr(attrs, *str, last_feedback, start, i); +#else + (void)ctx; + if (str) *str = NULL; - if(cursor_pos) + if (attrs) + *attrs = NULL; + if (cursor_pos) *cursor_pos = 0; #endif } @@ -213,7 +294,7 @@ _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(ic) + if (ic) { char *str; @@ -226,6 +307,8 @@ _ecore_imf_context_xim_focus_in(Ecore_IMF_Context *ctx) XSetICFocus(ic); } +#else + (void)ctx; #endif } @@ -237,13 +320,15 @@ _ecore_imf_context_xim_focus_out(Ecore_IMF_Context *ctx) XIC ic; Ecore_IMF_Context_Data *imf_context_data; imf_context_data = ecore_imf_context_data_get(ctx); - if(imf_context_data->has_focus == EINA_TRUE) + if (imf_context_data->has_focus == EINA_TRUE) { imf_context_data->has_focus = EINA_FALSE; ic = imf_context_data->ic; - if(ic) + if (ic) XUnsetICFocus(ic); } +#else + (void)ctx; #endif } @@ -263,18 +348,18 @@ _ecore_imf_context_xim_reset(Ecore_IMF_Context *ctx) imf_context_data = ecore_imf_context_data_get(ctx); ic = imf_context_data->ic; - if(!ic) + if (!ic) return; - if(imf_context_data->preedit_length == 0) + if (imf_context_data->preedit_length == 0) return; preedit_attr = XVaCreateNestedList(0, XNPreeditState, &preedit_state, NULL); - if(!XGetICValues(ic, - XNPreeditAttributes, preedit_attr, - NULL)) + if (!XGetICValues(ic, + XNPreeditAttributes, preedit_attr, + NULL)) have_preedit_state = EINA_TRUE; XFree(preedit_attr); @@ -284,38 +369,49 @@ _ecore_imf_context_xim_reset(Ecore_IMF_Context *ctx) preedit_attr = XVaCreateNestedList(0, XNPreeditState, preedit_state, NULL); - if(have_preedit_state) + if (have_preedit_state) XSetICValues(ic, XNPreeditAttributes, preedit_attr, NULL); XFree(preedit_attr); - if(imf_context_data->preedit_length) + if (imf_context_data->feedbacks) + { + free(imf_context_data->feedbacks); + imf_context_data->feedbacks = NULL; + } + + if (imf_context_data->preedit_length) { imf_context_data->preedit_length = 0; free(imf_context_data->preedit_chars); imf_context_data->preedit_chars = NULL; + ecore_imf_context_preedit_changed_event_add(ctx); + ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL); } - if(result) + if (result) { - char *result_utf8 = strdup(result); - if(result_utf8) - { - ecore_imf_context_commit_event_add(ctx, result_utf8); - free(result_utf8); - } + char *result_utf8 = strdup(result); + if (result_utf8) + { + ecore_imf_context_commit_event_add(ctx, result_utf8); + ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_COMMIT, result_utf8); + free(result_utf8); + } } - XFree (result); + XFree(result); +#else + (void)ctx; #endif } static void _ecore_imf_context_xim_use_preedit_set(Ecore_IMF_Context *ctx, - Eina_Bool use_preedit) + Eina_Bool use_preedit) { EINA_LOG_DBG("in"); #ifdef ENABLE_XIM @@ -324,17 +420,53 @@ _ecore_imf_context_xim_use_preedit_set(Ecore_IMF_Context *ctx, use_preedit = use_preedit != EINA_FALSE; - if(imf_context_data->use_preedit != use_preedit) + if (imf_context_data->use_preedit != use_preedit) { imf_context_data->use_preedit = use_preedit; reinitialize_ic(ctx); } +#else + (void)ctx; + (void)use_preedit; #endif } +#ifdef ENABLE_XIM +static void +add_feedback_attr(Eina_List **attrs, + const char *str, + XIMFeedback feedback, + int start_pos, + int end_pos) +{ + Ecore_IMF_Preedit_Attr *attr = NULL; + + unsigned int start_index = utf8_offset_to_index(str, start_pos); + unsigned int end_index = utf8_offset_to_index(str, end_pos); + + if (feedback & FEEDBACK_MASK) + { + attr = (Ecore_IMF_Preedit_Attr *)calloc(1, sizeof(Ecore_IMF_Preedit_Attr)); + attr->start_index = start_index; + attr->end_index = end_index; + *attrs = eina_list_append(*attrs, (void *)attr); + } + + if (feedback & XIMUnderline) + attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_SUB1; + + if (feedback & XIMReverse) + attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_SUB2; + + if (feedback & XIMHighlight) + attr->preedit_type = ECORE_IMF_PREEDIT_TYPE_SUB3; +} + +#endif + static void -_ecore_imf_context_xim_cursor_location_set (Ecore_IMF_Context *ctx, - int x, int y, int w, int h) +_ecore_imf_context_xim_cursor_location_set(Ecore_IMF_Context *ctx, + int x, int y, int w, int h) { EINA_LOG_DBG("%s in", __FUNCTION__); @@ -342,7 +474,7 @@ _ecore_imf_context_xim_cursor_location_set (Ecore_IMF_Context *ctx, Ecore_IMF_Context_Data *imf_context_data; XIC ic; XVaNestedList preedit_attr; - XPoint spot; + XPoint spot; imf_context_data = ecore_imf_context_data_get(ctx); ic = imf_context_data->ic; @@ -351,15 +483,20 @@ _ecore_imf_context_xim_cursor_location_set (Ecore_IMF_Context *ctx, spot.x = x; spot.y = y + h; - - preedit_attr = XVaCreateNestedList (0, - XNSpotLocation, &spot, - NULL); - XSetICValues (ic, - XNPreeditAttributes, preedit_attr, - NULL); + + preedit_attr = XVaCreateNestedList(0, + XNSpotLocation, &spot, + NULL); + XSetICValues(ic, + XNPreeditAttributes, preedit_attr, + NULL); XFree(preedit_attr); +#else + (void)ctx; + (void)x; + (void)y; + (void)h; #endif (void)(w); // yes w is unused, but only a bi-product of the algorithm } @@ -371,19 +508,19 @@ _ecore_x_event_reverse_modifiers(unsigned int state) unsigned int modifiers = 0; /**< "Control" is pressed */ - if(state & ECORE_IMF_KEYBOARD_MODIFIER_CTRL) + if (state & ECORE_IMF_KEYBOARD_MODIFIER_CTRL) modifiers |= ControlMask; /**< "Alt" is pressed */ - if(state & ECORE_IMF_KEYBOARD_MODIFIER_ALT) + if (state & ECORE_IMF_KEYBOARD_MODIFIER_ALT) modifiers |= Mod1Mask; /**< "Shift" is pressed */ - if(state & ECORE_IMF_KEYBOARD_MODIFIER_SHIFT) + if (state & ECORE_IMF_KEYBOARD_MODIFIER_SHIFT) modifiers |= ShiftMask; /**< "Win" (between "Ctrl" and "A */ - if(state & ECORE_IMF_KEYBOARD_MODIFIER_WIN) + if (state & ECORE_IMF_KEYBOARD_MODIFIER_WIN) modifiers |= Mod5Mask; return modifiers; @@ -395,14 +532,14 @@ _ecore_x_event_reverse_locks(unsigned int state) unsigned int locks = 0; /**< "Num" lock is active */ - if(state & ECORE_IMF_KEYBOARD_LOCK_NUM) + if (state & ECORE_IMF_KEYBOARD_LOCK_NUM) locks |= Mod3Mask; - if(state & ECORE_IMF_KEYBOARD_LOCK_CAPS) + if (state & ECORE_IMF_KEYBOARD_LOCK_CAPS) locks |= LockMask; -#if 0 /* FIXME: add mask. */ - if(state & ECORE_IMF_KEYBOARD_LOCK_SCROLL) +#if 0 /* FIXME: add mask. */ + if (state & ECORE_IMF_KEYBOARD_LOCK_SCROLL) ; #endif @@ -411,12 +548,12 @@ _ecore_x_event_reverse_locks(unsigned int state) static KeyCode _keycode_get(Ecore_X_Display *dsp, - const char *keyname) + const char *keyname) { KeyCode keycode; // EINA_LOG_DBG("keyname:%s keysym:%lu", keyname, XStringToKeysym(keyname)); - if(strcmp(keyname, "Keycode-0") == 0) + if (strcmp(keyname, "Keycode-0") == 0) { keycode = 0; } @@ -430,9 +567,9 @@ _keycode_get(Ecore_X_Display *dsp, #endif static Eina_Bool -_ecore_imf_context_xim_filter_event(Ecore_IMF_Context *ctx, +_ecore_imf_context_xim_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, - Ecore_IMF_Event *event) + Ecore_IMF_Event *event) { EINA_LOG_DBG("%s in", __FUNCTION__); #ifdef ENABLE_XIM @@ -451,12 +588,12 @@ _ecore_imf_context_xim_filter_event(Ecore_IMF_Context *ctx, imf_context_data = ecore_imf_context_data_get(ctx); ic = imf_context_data->ic; - if(!ic) + if (!ic) { ic = get_ic(ctx); } - if(type == ECORE_IMF_EVENT_KEY_DOWN) + if (type == ECORE_IMF_EVENT_KEY_DOWN) { XKeyPressedEvent xev; Ecore_IMF_Event_Key_Down *ev = (Ecore_IMF_Event_Key_Down *)event; @@ -481,7 +618,7 @@ _ecore_imf_context_xim_filter_event(Ecore_IMF_Context *ctx, xev.keycode = _keycode_get(dsp, ev->keyname); xev.same_screen = True; - if(ic) + if (ic) { Status mbstatus; #ifdef X_HAVE_UTF8_STRING @@ -563,15 +700,16 @@ _ecore_imf_context_xim_filter_event(Ecore_IMF_Context *ctx, } } - if(compose) + if (compose) { Eina_Unicode *unicode; int len; unicode = eina_unicode_utf8_to_unicode(compose, &len); - if(!unicode) abort(); - if(unicode[0] >= 0x20 && unicode[0] != 0x7f) + if (!unicode) abort(); + if (unicode[0] >= 0x20 && unicode[0] != 0x7f) { ecore_imf_context_commit_event_add(ctx, compose); + ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_COMMIT, compose); result = EINA_TRUE; } free(compose); @@ -581,6 +719,9 @@ _ecore_imf_context_xim_filter_event(Ecore_IMF_Context *ctx, return result; #else + (void)ctx; + (void)type; + (void)event; return EINA_FALSE; #endif } @@ -608,7 +749,7 @@ static Ecore_IMF_Context_Class xim_class = { .use_preedit_set = _ecore_imf_context_xim_use_preedit_set, .input_mode_set = NULL, .filter_event = _ecore_imf_context_xim_filter_event, - .preedit_string_with_attributes_get = NULL, + .preedit_string_with_attributes_get = _ecore_imf_context_xim_preedit_string_with_attributes_get, .prediction_allow_set = NULL, .autocapital_type_set = NULL, .control_panel_show = NULL, @@ -627,7 +768,7 @@ xim_imf_module_create(void) Ecore_IMF_Context *ctx = NULL; ctx = ecore_imf_context_new(&xim_class); - if(!ctx) + if (!ctx) goto error; return ctx; @@ -686,15 +827,15 @@ imf_context_data_new() char *locale; locale = setlocale(LC_CTYPE, ""); - if(!locale) return NULL; + if (!locale) return NULL; - if(!XSupportsLocale()) return NULL; + if (!XSupportsLocale()) return NULL; imf_context_data = calloc(1, sizeof(Ecore_IMF_Context_Data)); - if(!imf_context_data) return NULL; + if (!imf_context_data) return NULL; imf_context_data->locale = strdup(locale); - if(!imf_context_data->locale) goto error; + if (!imf_context_data->locale) goto error; return imf_context_data; error: @@ -705,19 +846,26 @@ error: void imf_context_data_destroy(Ecore_IMF_Context_Data *imf_context_data) { - if(!imf_context_data) + if (!imf_context_data) return; - if(imf_context_data->ic) + if (imf_context_data->ic) XDestroyIC(imf_context_data->ic); free(imf_context_data->preedit_chars); + + if (imf_context_data->feedbacks) + { + free(imf_context_data->feedbacks); + imf_context_data->feedbacks = NULL; + } + free(imf_context_data->locale); free(imf_context_data); } static int -preedit_start_callback(XIC xic __UNUSED__, +preedit_start_callback(XIC xic __UNUSED__, XPointer client_data, XPointer call_data __UNUSED__) { @@ -726,14 +874,16 @@ preedit_start_callback(XIC xic __UNUSED__, Ecore_IMF_Context_Data *imf_context_data; imf_context_data = ecore_imf_context_data_get(ctx); - if(imf_context_data->finalizing == EINA_FALSE) - ecore_imf_context_preedit_start_event_add(ctx); - + if (imf_context_data->finalizing == EINA_FALSE) + { + ecore_imf_context_preedit_start_event_add(ctx); + ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL); + } return -1; } static void -preedit_done_callback(XIC xic __UNUSED__, +preedit_done_callback(XIC xic __UNUSED__, XPointer client_data, XPointer call_data __UNUSED__) { @@ -742,30 +892,34 @@ preedit_done_callback(XIC xic __UNUSED__, Ecore_IMF_Context_Data *imf_context_data; imf_context_data = ecore_imf_context_data_get(ctx); - if(imf_context_data->preedit_length) + if (imf_context_data->preedit_length) { imf_context_data->preedit_length = 0; free(imf_context_data->preedit_chars); imf_context_data->preedit_chars = NULL; ecore_imf_context_preedit_changed_event_add(ctx); + ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL); } - if(imf_context_data->finalizing == EINA_FALSE) - ecore_imf_context_preedit_end_event_add(ctx); + if (imf_context_data->finalizing == EINA_FALSE) + { + ecore_imf_context_preedit_end_event_add(ctx); + ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL); + } } /* FIXME */ static int xim_text_to_utf8(Ecore_IMF_Context *ctx __UNUSED__, - XIMText *xim_text, - char **text) + XIMText *xim_text, + char **text) { int text_length = 0; char *result = NULL; - if(xim_text && xim_text->string.multi_byte) + if (xim_text && xim_text->string.multi_byte) { - if(xim_text->encoding_is_wchar) + if (xim_text->encoding_is_wchar) { EINA_LOG_WARN("Wide character return from Xlib not currently supported"); *text = NULL; @@ -774,7 +928,7 @@ xim_text_to_utf8(Ecore_IMF_Context *ctx __UNUSED__, /* XXX Convert to UTF-8 */ result = strdup(xim_text->string.multi_byte); - if(result) + if (result) { text_length = eina_unicode_utf8_get_len(result); if (text_length != xim_text->length) @@ -798,8 +952,8 @@ xim_text_to_utf8(Ecore_IMF_Context *ctx __UNUSED__, } static void -preedit_draw_callback(XIC xic __UNUSED__, - XPointer client_data, +preedit_draw_callback(XIC xic __UNUSED__, + XPointer client_data, XIMPreeditDrawCallbackStruct *call_data) { EINA_LOG_DBG("in"); @@ -811,59 +965,83 @@ preedit_draw_callback(XIC xic __UNUSED__, Eina_Unicode *new_text = NULL; Eina_UStrbuf *preedit_bufs = NULL; int new_text_length; + int i = 0; preedit_bufs = eina_ustrbuf_new(); - if(imf_context_data->preedit_chars) { - ret = eina_ustrbuf_append(preedit_bufs, imf_context_data->preedit_chars); - if(ret == EINA_FALSE) goto done; - } + if (imf_context_data->preedit_chars) + { + ret = eina_ustrbuf_append(preedit_bufs, imf_context_data->preedit_chars); + if (ret == EINA_FALSE) goto done; + } new_text_length = xim_text_to_utf8(ctx, t, &tmp); - if(tmp) + if (tmp) { int tmp_len; new_text = eina_unicode_utf8_to_unicode((const char *)tmp, &tmp_len); free(tmp); } - if(t == NULL) { - /* delete string */ - ret = eina_ustrbuf_remove(preedit_bufs, - call_data->chg_first, call_data->chg_length); - } else if(call_data->chg_length == 0) { - /* insert string */ - ret = eina_ustrbuf_insert(preedit_bufs, new_text, call_data->chg_first); - } else if(call_data->chg_length > 0) { - /* replace string */ - ret = eina_ustrbuf_remove(preedit_bufs, - call_data->chg_first, call_data->chg_length); - if(ret == EINA_FALSE) goto done; - - ret = eina_ustrbuf_insert_n(preedit_bufs, new_text, - new_text_length, call_data->chg_first); - if(ret == EINA_FALSE) goto done; - } else { - ret = EINA_FALSE; - } - - done: - if(ret == EINA_TRUE) { - free(imf_context_data->preedit_chars); - imf_context_data->preedit_chars = + if (t == NULL) + { + /* delete string */ + ret = eina_ustrbuf_remove(preedit_bufs, + call_data->chg_first, call_data->chg_length); + } + else if (call_data->chg_length == 0) + { + /* insert string */ + ret = eina_ustrbuf_insert(preedit_bufs, new_text, call_data->chg_first); + } + else if (call_data->chg_length > 0) + { + /* replace string */ + ret = eina_ustrbuf_remove(preedit_bufs, + call_data->chg_first, call_data->chg_length); + if (ret == EINA_FALSE) goto done; + + ret = eina_ustrbuf_insert_n(preedit_bufs, new_text, + new_text_length, call_data->chg_first); + if (ret == EINA_FALSE) goto done; + } + else { + ret = EINA_FALSE; + } + +done: + if (ret == EINA_TRUE) + { + free(imf_context_data->preedit_chars); + imf_context_data->preedit_chars = eina_ustrbuf_string_steal(preedit_bufs); - imf_context_data->preedit_length = + imf_context_data->preedit_length = eina_unicode_strlen(imf_context_data->preedit_chars); - ecore_imf_context_preedit_changed_event_add(ctx); - } + if (imf_context_data->feedbacks) + { + free(imf_context_data->feedbacks); + imf_context_data->feedbacks = NULL; + } + + if (imf_context_data->preedit_length > 0) + { + imf_context_data->feedbacks = calloc(imf_context_data->preedit_length, sizeof(XIMFeedback)); + + for (i = 0; i < imf_context_data->preedit_length; i++) + imf_context_data->feedbacks[i] = t->feedback[i]; + } + + ecore_imf_context_preedit_changed_event_add(ctx); + ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL); + } free(new_text); eina_ustrbuf_free(preedit_bufs); } static void -preedit_caret_callback(XIC xic __UNUSED__, - XPointer client_data, +preedit_caret_callback(XIC xic __UNUSED__, + XPointer client_data, XIMPreeditCaretCallbackStruct *call_data) { EINA_LOG_DBG("in"); @@ -871,12 +1049,15 @@ preedit_caret_callback(XIC xic __UNUSED__, Ecore_IMF_Context_Data *imf_context_data; imf_context_data = ecore_imf_context_data_get(ctx); - if(call_data->direction == XIMAbsolutePosition) + if (call_data->direction == XIMAbsolutePosition) { // printf("call_data->position:%d\n", call_data->position); - imf_context_data->preedit_cursor = call_data->position; - if(imf_context_data->finalizing == EINA_FALSE) - ecore_imf_context_preedit_changed_event_add(ctx); + imf_context_data->preedit_cursor = call_data->position; + if (imf_context_data->finalizing == EINA_FALSE) + { + ecore_imf_context_preedit_changed_event_add(ctx); + ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL); + } } } @@ -917,7 +1098,7 @@ get_ic(Ecore_IMF_Context *ctx) XIC ic; imf_context_data = ecore_imf_context_data_get(ctx); ic = imf_context_data->ic; - if(!ic) + if (!ic) { XIM_Im_Info *im_info = imf_context_data->im_info; XVaNestedList preedit_attr = NULL; @@ -930,7 +1111,7 @@ get_ic(Ecore_IMF_Context *ctx) EINA_LOG_WARN("Doesn't open XIM."); return NULL; } - + // supported styles #if 0 int i; @@ -940,23 +1121,23 @@ get_ic(Ecore_IMF_Context *ctx) { printf("%i: ", i); if (im_info->xim_styles->supported_styles[i] & XIMPreeditCallbacks) - printf("XIMPreeditCallbacks | "); + printf("XIMPreeditCallbacks | "); if (im_info->xim_styles->supported_styles[i] & XIMPreeditPosition) - printf("XIMPreeditPosition | "); + printf("XIMPreeditPosition | "); if (im_info->xim_styles->supported_styles[i] & XIMPreeditArea) - printf("XIMPreeditArea | "); + printf("XIMPreeditArea | "); if (im_info->xim_styles->supported_styles[i] & XIMPreeditNothing) - printf("XIMPreeditNothing | "); + printf("XIMPreeditNothing | "); if (im_info->xim_styles->supported_styles[i] & XIMPreeditNone) - printf("XIMPreeditNone | "); + printf("XIMPreeditNone | "); if (im_info->xim_styles->supported_styles[i] & XIMStatusArea) - printf("XIMStatusArea | "); + printf("XIMStatusArea | "); if (im_info->xim_styles->supported_styles[i] & XIMStatusCallbacks) - printf("XIMStatusCallbacks | "); + printf("XIMStatusCallbacks | "); if (im_info->xim_styles->supported_styles[i] & XIMStatusNothing) - printf("XIMStatusNothing | "); + printf("XIMStatusNothing | "); if (im_info->xim_styles->supported_styles[i] & XIMStatusNone) - printf("XIMStatusNone | "); + printf("XIMStatusNone | "); printf("\n"); } } @@ -969,12 +1150,12 @@ get_ic(Ecore_IMF_Context *ctx) { if (im_info->supports_cursor) { - // kinput2 DOES do this... + // kinput2 DOES do this... XFontSet fs; char **missing_charset_list; int missing_charset_count; char *def_string; - + im_style |= XIMPreeditPosition; im_style |= XIMStatusNothing; fs = XCreateFontSet(ecore_x_display_get(), @@ -995,7 +1176,7 @@ get_ic(Ecore_IMF_Context *ctx) } name = XNPreeditAttributes; } - else + else { im_style |= XIMPreeditNothing; im_style |= XIMStatusNothing; @@ -1009,18 +1190,18 @@ get_ic(Ecore_IMF_Context *ctx) name, preedit_attr, NULL); } XFree(preedit_attr); - if(ic) + if (ic) { unsigned long mask = 0xaaaaaaaa; - XGetICValues (ic, - XNFilterEvents, &mask, - NULL); + XGetICValues(ic, + XNFilterEvents, &mask, + NULL); imf_context_data->mask = mask; ecore_x_event_mask_set(imf_context_data->win, mask); } imf_context_data->ic = ic; - if(ic && imf_context_data->has_focus == EINA_TRUE) + if (ic && imf_context_data->has_focus == EINA_TRUE) XSetICFocus(ic); } @@ -1032,16 +1213,17 @@ reinitialize_ic(Ecore_IMF_Context *ctx) { Ecore_IMF_Context_Data *imf_context_data = ecore_imf_context_data_get(ctx); XIC ic = imf_context_data->ic; - if(ic) + if (ic) { XDestroyIC(ic); imf_context_data->ic = NULL; - if(imf_context_data->preedit_length) + if (imf_context_data->preedit_length) { imf_context_data->preedit_length = 0; free(imf_context_data->preedit_chars); imf_context_data->preedit_chars = NULL; ecore_imf_context_preedit_changed_event_add(ctx); + ecore_imf_context_event_callback_call(ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL); } } } @@ -1052,13 +1234,13 @@ reinitialize_all_ics(XIM_Im_Info *info) Eina_List *tmp_list; Ecore_IMF_Context *ctx; - EINA_LIST_FOREACH(info->ics, tmp_list, ctx) + EINA_LIST_FOREACH (info->ics, tmp_list, ctx) reinitialize_ic(ctx); } static void set_ic_client_window(Ecore_IMF_Context *ctx, - Ecore_X_Window window) + Ecore_X_Window window) { EINA_LOG_DBG("in"); Ecore_IMF_Context_Data *imf_context_data = ecore_imf_context_data_get(ctx); @@ -1069,7 +1251,7 @@ set_ic_client_window(Ecore_IMF_Context *ctx, old_win = imf_context_data->win; EINA_LOG_DBG("old_win:%d window:%d ", old_win, window); - if(old_win != 0 && old_win != window) /* XXX how do check window... */ + if (old_win != 0 && old_win != window) /* XXX how do check window... */ { XIM_Im_Info *info; info = imf_context_data->im_info; @@ -1079,7 +1261,7 @@ set_ic_client_window(Ecore_IMF_Context *ctx, imf_context_data->win = window; - if(window) /* XXX */ + if (window) /* XXX */ { XIM_Im_Info *info = NULL; info = get_im(window, imf_context_data->locale); @@ -1092,17 +1274,17 @@ set_ic_client_window(Ecore_IMF_Context *ctx, static XIM_Im_Info * get_im(Ecore_X_Window window, - char *locale) + char *locale) { EINA_LOG_DBG("in"); Eina_List *l; XIM_Im_Info *im_info = NULL; XIM_Im_Info *info = NULL; - EINA_LIST_FOREACH(open_ims, l, im_info) { - if(strcmp(im_info->locale, locale) == 0) + EINA_LIST_FOREACH (open_ims, l, im_info) { + if (strcmp(im_info->locale, locale) == 0) { - if(im_info->im) + if (im_info->im) { return im_info; } @@ -1113,10 +1295,10 @@ get_im(Ecore_X_Window window, } } - if(!info) + if (!info) { info = calloc(1, sizeof(XIM_Im_Info)); - if(!info) return NULL; + if (!info) return NULL; open_ims = eina_list_prepend(open_ims, info); info->win = window; info->locale = strdup(locale); @@ -1137,13 +1319,13 @@ xim_info_try_im(XIM_Im_Info *info) if (info->reconnecting == EINA_TRUE) return; - if(XSupportsLocale()) + if (XSupportsLocale()) { - if (!XSetLocaleModifiers ("")) + if (!XSetLocaleModifiers("")) EINA_LOG_WARN("Unable to set locale modifiers with XSetLocaleModifiers()"); dsp = ecore_x_display_get(); info->im = XOpenIM(dsp, NULL, NULL, NULL); - if(!info->im) + if (!info->im) { XRegisterIMInstantiateCallback(dsp, NULL, NULL, NULL, @@ -1158,8 +1340,8 @@ xim_info_try_im(XIM_Im_Info *info) static void xim_info_display_closed(Ecore_X_Display *display __UNUSED__, - int is_error __UNUSED__, - XIM_Im_Info *info) + int is_error __UNUSED__, + XIM_Im_Info *info) { Eina_List *ics, *tmp_list; Ecore_IMF_Context *ctx; @@ -1169,21 +1351,21 @@ xim_info_display_closed(Ecore_X_Display *display __UNUSED__, ics = info->ics; info->ics = NULL; - EINA_LIST_FOREACH(ics, tmp_list, ctx) + EINA_LIST_FOREACH (ics, tmp_list, ctx) set_ic_client_window(ctx, 0); - EINA_LIST_FREE(ics, ctx) { + EINA_LIST_FREE (ics, ctx) { Ecore_IMF_Context_Data *imf_context_data; imf_context_data = ecore_imf_context_data_get(ctx); imf_context_data_destroy(imf_context_data); } - free (info->locale); + free(info->locale); if (info->im) - XCloseIM (info->im); + XCloseIM(info->im); - free (info); + free(info); } static void @@ -1203,11 +1385,11 @@ xim_instantiate_callback(Display *display, } info->im = im; - setup_im (info); + setup_im(info); - XUnregisterIMInstantiateCallback (display, NULL, NULL, NULL, - xim_instantiate_callback, - (XPointer)info); + XUnregisterIMInstantiateCallback(display, NULL, NULL, NULL, + xim_instantiate_callback, + (XPointer)info); info->reconnecting = EINA_FALSE; } @@ -1217,7 +1399,7 @@ setup_im(XIM_Im_Info *info) XIMValuesList *ic_values = NULL; XIMCallback im_destroy_callback; - if(!info->im) + if (!info->im) return; im_destroy_callback.client_data = (XPointer)info; @@ -1239,25 +1421,25 @@ setup_im(XIM_Im_Info *info) { if (!strcmp(ic_values->supported_values[i], XNStringConversionCallback)) - info->supports_string_conversion = EINA_TRUE; + info->supports_string_conversion = EINA_TRUE; if (!strcmp(ic_values->supported_values[i], XNCursor)) - info->supports_cursor = EINA_TRUE; + info->supports_cursor = EINA_TRUE; } #if 0 printf("values........\n"); for (i = 0; i < ic_values->count_values; i++) - printf("%s\n", ic_values->supported_values[i]); + printf("%s\n", ic_values->supported_values[i]); printf("styles........\n"); for (i = 0; i < info->xim_styles->count_styles; i++) - printf("%lx\n", info->xim_styles->supported_styles[i]); + printf("%lx\n", info->xim_styles->supported_styles[i]); #endif XFree(ic_values); } } static void -xim_destroy_callback(XIM xim __UNUSED__, +xim_destroy_callback(XIM xim __UNUSED__, XPointer client_data, XPointer call_data __UNUSED__) { diff --git a/libraries/ecore/src/tests/Makefile.in b/libraries/ecore/src/tests/Makefile.in index a21773c..bd7726a 100644 --- a/libraries/ecore/src/tests/Makefile.in +++ b/libraries/ecore/src/tests/Makefile.in @@ -229,10 +229,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -251,6 +251,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -364,6 +368,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -376,6 +382,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -420,12 +428,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/util/Makefile.in b/libraries/ecore/src/util/Makefile.in index 0e1e6e7..96cb48a 100644 --- a/libraries/ecore/src/util/Makefile.in +++ b/libraries/ecore/src/util/Makefile.in @@ -218,10 +218,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -240,6 +240,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -353,6 +357,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -365,6 +371,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -409,12 +417,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/edje/ChangeLog b/libraries/edje/ChangeLog index 39757b9..ae65d85 100644 --- a/libraries/edje/ChangeLog +++ b/libraries/edje/ChangeLog @@ -219,3 +219,69 @@ * Fix message and signal propagation to be consistent in all situations as well as simpler. +2011-12-02 Carsten Haitzler (The Rasterman) + + 1.1.0 release + +2011-12-12 Mike Blumenkrantz (discomfitor/zmike) + + * Fix potential crash from buffer overflow on copying map data. + +2011-12-15 Tom Hacohen (TAsn) + + * Entry: Added support for various new key bindings: + Ctrl+Arrows, Ctrl+Del and Ctrl+Backspace. + * Entry: Added cursor,changed,manual signal. + This signal indicates the cursor has been manually changed, i.e by + either mouse click or arrows. + +2011-12-15 Cedric Bail + + * Fix detections of limits by edje_cc parser. + +2011-12-16 Cedric Bail + + * Fix wrong call to free() in edje_load. + * Reduce parts walk to the strict minimum. + +2011-12-19 Cedric Bail + + * Check existence of group at compile time also. + +2012-01-02 Carsten Haitzler (The Rasterman) + + * Fix prototype for edje_object_part_text_cursor_content_get() + as it returned a strduped string and not an internal one, so + this just formalizes its existing behavior correctly. + +2012-01-03 Tom Hacohen (TAsn) + + * Entry: Fixed undo/redo with IMF. + +2012-01-04 Carsten Haitzler (The Rasterman) + + * Add HEX, TERMINAL and PASSWORD layouts to edje + * Add "recalc" smart callback for object size changes + +2012-01-05 Cedric Bail + + * Reduce call to stat during edje_object_file_set. + +2012-01-06 Cedric Bail + + * Unswallow object that are about to be swallowed if necessary. + * Add EDJE_ASPECT_PREFER_SOURCE. + +2012-01-07 David Seikel (onefang) + + * Lua: Calling non exstent functions no longer crashes scripts. + This is so that future scripts will still work with old libraries, + and lets us add the "host can provide Lua API" feature soon. + +2012-01-09 David Seikel (onefang) + + * Lua: Added edje.version(). + +2012-01-14 Carsten Haitzler (The Rasterman) + + * Added minmul propery for edje to multiply minimum size during min size calc diff --git a/libraries/edje/Makefile.in b/libraries/edje/Makefile.in index 2666156..b63286c 100644 --- a/libraries/edje/Makefile.in +++ b/libraries/edje/Makefile.in @@ -236,8 +236,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/edje/NEWS b/libraries/edje/NEWS index e34a719..bf529dc 100644 --- a/libraries/edje/NEWS +++ b/libraries/edje/NEWS @@ -1,5 +1,22 @@ Edje 1.1.0 +Changes since Edje 1.1.0: +------------------------- + +Additions: + + * "recalc" smart callback for object size changes + * EDJE_ASPECT_PREFER_SOURCE. + * edje.version() Lua function. + * minmul edc property + +Improvements: + * speedup load time of Edje file. + * check existence of group at compile time also. + * reduce number of call to stat during edje_object_file_set. + * unswallow object about to be swallowed if necessary. + * Lua scripts now more resilient against API changes. + Changes since Edje 1.0.0: ------------------------- diff --git a/libraries/edje/README b/libraries/edje/README index d040a5c..3cf9a65 100644 --- a/libraries/edje/README +++ b/libraries/edje/README @@ -4,16 +4,16 @@ Edje 1.1.0 FOR ANY ISSUES PLEASE EMAIL: enlightenment-devel@lists.sourceforge.net - + ****************************************************************************** - + Requirements: ------------- Must: libc - libm - eet (at least 1.5.0) + libm + eet (at least 1.5.0) ecore (at least 1.1.0) ecore-evas (at least 1.1.0) ecore-file (at least 1.1.0) diff --git a/libraries/edje/aclocal.m4 b/libraries/edje/aclocal.m4 index 23ca0ef..a809f4b 100644 --- a/libraries/edje/aclocal.m4 +++ b/libraries/edje/aclocal.m4 @@ -13,14 +13,13 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. 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 . # @@ -48,10 +47,7 @@ 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]) -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]) - +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -64,6 +60,7 @@ if test -n "$PKG_CONFIG"; then AC_MSG_RESULT([no]) PKG_CONFIG="" fi + fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -72,31 +69,34 @@ 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. # -# 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 +# +# 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 # -------------------------------------------------------------- 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_default([$2], [:]) + m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) + # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[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 +[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 fi[]dnl ])# _PKG_CONFIG @@ -138,17 +138,16 @@ 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 --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - m4_default([$4], [AC_MSG_ERROR( + ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -156,24 +155,25 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT])[]dnl - ]) +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( + ifelse([$4], , [AC_MSG_FAILURE(dnl [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 .])[]dnl - ]) +To get pkg-config, see .])], + [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - $3 + ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES @@ -968,7 +968,7 @@ AC_DEFUN([AM_PATH_PYTHON], dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], - [python python2 python3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 dnl + [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl python2.1 python2.0]) m4_if([$1],[],[ diff --git a/libraries/edje/configure b/libraries/edje/configure index 3b234ef..c763308 100755 --- a/libraries/edje/configure +++ b/libraries/edje/configure @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for edje 1.1.0. +# Generated by GNU Autoconf 2.65 for edje 1.1.99.67344. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error 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=$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 + 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 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&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, old GNU/Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, 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='edje' PACKAGE_TARNAME='edje' -PACKAGE_VERSION='1.1.0' -PACKAGE_STRING='edje 1.1.0' +PACKAGE_VERSION='1.1.99.67344' +PACKAGE_STRING='edje 1.1.99.67344' PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net' PACKAGE_URL='' @@ -751,8 +751,6 @@ requirement_edje BUILD_EXAMPLES_FALSE BUILD_EXAMPLES_TRUE edje_cc -INSTALL_EXAMPLES_FALSE -INSTALL_EXAMPLES_TRUE EFL_ENABLE_COVERAGE_FALSE EFL_ENABLE_COVERAGE_TRUE EFL_COVERAGE_LIBS @@ -808,8 +806,6 @@ EFL_EDJE_BUILD EVIL_LIBS EVIL_CFLAGS pkgconfig_requires_private -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH PKG_CONFIG HAVE_PYTHON_FALSE HAVE_PYTHON_TRUE @@ -990,13 +986,13 @@ enable_fixed_point with_vim enable_doc with_doxygen +enable_multisense enable_sndfile enable_remix enable_vorbisenc enable_flac enable_tests enable_coverage -enable_install_examples enable_build_examples ' ac_precious_vars='build_alias @@ -1009,8 +1005,6 @@ LIBS CPPFLAGS CPP PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR EVIL_CFLAGS EVIL_LIBS LUA_CFLAGS @@ -1105,9 +1099,8 @@ do fi case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1152,7 +1145,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 @@ -1178,7 +1171,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 @@ -1382,7 +1375,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 @@ -1398,7 +1391,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 @@ -1428,8 +1421,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." ;; *=*) @@ -1437,7 +1430,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 ;; @@ -1455,13 +1448,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 @@ -1484,7 +1477,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' @@ -1498,8 +1491,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 @@ -1514,9 +1507,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. @@ -1555,11 +1548,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 @@ -1585,7 +1578,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 edje 1.1.0 to adapt to many kinds of systems. +\`configure' configures edje 1.1.99.67344 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1599,7 +1592,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 @@ -1655,7 +1648,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of edje 1.1.0:";; + short | recursive ) echo "Configuration of edje 1.1.99.67344:";; esac cat <<\_ACEOF @@ -1690,6 +1683,8 @@ Optional Features: --enable-fixed-point reduce use of FPU by using Fixed Point provided by Eina and Eet, [[default=disabled]] --disable-doc Disable documentation build [default=enabled] + --enable-multisense multisense provides sound. tone and haptic effects + support, [[default=disabled]] --disable-sndfile disable sndfile support. [default=detect] --disable-remix disable remix support. [default=detect] --disable-vorbis disable ogg-vorbis support. [default=detect] @@ -1698,9 +1693,6 @@ Optional Features: --enable-tests enable tests [default=disabled] --enable-coverage enable coverage profiling instrumentation [default=disabled] - --disable-install-examples - disable installing examples (compiled or just - source). [default==enabled] --enable-build-examples Enable building examples. This requires extra denpendencies. If you don't have them installed yet, don't build with this option or it will fail. Build @@ -1726,10 +1718,6 @@ Some influential environment variables: you have headers in a nonstandard directory CPP 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 LUA_CFLAGS C compiler flags for LUA, overriding pkg-config @@ -1850,10 +1838,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -edje configure 1.1.0 -generated by GNU Autoconf 2.67 +edje configure 1.1.99.67344 +generated by GNU Autoconf 2.65 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1957,7 +1945,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2000,7 +1988,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; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -2066,7 +2054,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2133,10 +2121,10 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2172,7 +2160,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2195,15 +2183,17 @@ $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;} -( $as_echo "## -------------------------------------------------------- ## +( cat <<\_ASBOX +## -------------------------------------------------------- ## ## 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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2219,8 +2209,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 edje $as_me 1.1.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +It was created by edje $as_me 1.1.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2330,9 +2320,11 @@ trap 'exit_status=$? { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -2366,9 +2358,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do @@ -2381,9 +2375,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + cat <<\_ASBOX +## ------------------- ## ## File substitutions. ## -## ------------------- ##" +## ------------------- ## +_ASBOX echo for ac_var in $ac_subst_files do @@ -2397,9 +2393,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo cat confdefs.h echo @@ -2454,12 +2452,7 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # 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 + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2474,11 +2467,7 @@ 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" \ - || { { $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 ; } + . "$ac_site_file" fi done @@ -2554,7 +2543,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. ## @@ -2580,22 +2569,16 @@ am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - 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 + 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 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, @@ -2711,11 +2694,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 @@ -2737,7 +2720,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 @@ -2747,7 +2730,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 @@ -2985,7 +2968,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 eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2993,7 +2976,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;; @@ -3027,7 +3010,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 @@ -3043,7 +3026,7 @@ fi # Define the identity of the package. PACKAGE='edje' - VERSION='1.1.0' + VERSION='1.1.99.67344' cat >>confdefs.h <<_ACEOF @@ -3098,7 +3081,7 @@ AM_BACKSLASH='\' # 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; } @@ -3109,16 +3092,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='-' @@ -3143,7 +3126,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 @@ -3151,7 +3134,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='-' @@ -3170,7 +3153,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 @@ -3857,8 +3840,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 @@ -3972,8 +3955,9 @@ 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 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +{ as_fn_set_status 77 +as_fn_error "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; } @@ -4015,8 +3999,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 @@ -4073,9 +4057,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 @@ -4126,8 +4110,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 @@ -4531,7 +4515,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 @@ -4607,7 +4591,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 @@ -4673,7 +4657,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 @@ -4740,7 +4724,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 @@ -4856,7 +4840,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 : @@ -5058,13 +5042,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:5061: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5045: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5064: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5048: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5067: output\"" >&5) + (eval echo "\"\$as_me:5051: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5110,7 +5094,7 @@ else lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw*) + cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -5311,6 +5295,104 @@ esac +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; 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_prog_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +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_prog_OBJDUMP="${ac_tool_prefix}objdump" + $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 + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; 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_prog_ac_ct_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +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_prog_ac_ct_OBJDUMP="objdump" + $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 + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + 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 + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } @@ -5365,6 +5447,12 @@ mingw* | pw32*) fi ;; +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; @@ -5423,7 +5511,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -5903,7 +5991,7 @@ case $host_os in aix*) symcode='[BCDT]' ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) @@ -6163,7 +6251,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6166 "configure"' > conftest.$ac_ext + echo '#line 6254 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6952,7 +7040,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6968,11 +7056,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -7011,7 +7099,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -7027,18 +7115,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f 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 @@ -7167,7 +7255,8 @@ 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 " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7690,11 +7779,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:7693: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7782: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7697: \$? = $ac_status" >&5 + echo "$as_me:7786: \$? = $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. @@ -7762,7 +7851,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # PIC is the default for these OSes. ;; - mingw* | cygwin* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style @@ -7777,10 +7866,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. case $host_cpu in - hppa*64*|ia64*) + hppa*64*) # +Z the default ;; *) @@ -7830,7 +7920,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } fi ;; - mingw* | cygwin* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' @@ -7858,13 +7948,27 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in - icc* | ecc* | ifort*) + # old Intel for x86_64 which still supported -KPIC. + ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -8014,11 +8118,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:8017: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8121: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8021: \$? = $ac_status" >&5 + echo "$as_me:8125: \$? = $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. @@ -8119,11 +8223,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:8122: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8226: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8126: \$? = $ac_status" >&5 + echo "$as_me:8230: \$? = $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 @@ -8174,11 +8278,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:8177: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8281: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8181: \$? = $ac_status" >&5 + echo "$as_me:8285: \$? = $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 @@ -8278,7 +8382,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie extract_expsyms_cmds= case $host_os in - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -8293,6 +8397,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu) + link_all_deplibs=no + ;; esac ld_shlibs=yes @@ -8314,6 +8421,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -8365,7 +8473,7 @@ _LT_EOF fi ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' @@ -8405,7 +8513,7 @@ _LT_EOF archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -8431,6 +8539,9 @@ _LT_EOF tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; @@ -8663,6 +8774,7 @@ _LT_EOF fi fi + export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes @@ -8775,7 +8887,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec=-rdynamic ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is @@ -8806,7 +8918,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" - if test "$GCC" = "yes"; then + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" @@ -8898,7 +9014,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -9614,14 +9730,14 @@ bsdi[45]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -9644,7 +9760,7 @@ cygwin* | mingw* | pw32*) soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; - mingw*) + mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` @@ -9859,7 +9975,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -10097,7 +10213,7 @@ tpf*) version_type=linux need_lib_prefix=no need_version=no - library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -10274,7 +10390,7 @@ else lt_cv_dlopen_self=yes ;; - mingw* | pw32*) + mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; @@ -10546,7 +10662,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10549 "configure" +#line 10665 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10587,10 +10703,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -10606,7 +10718,7 @@ int main () else puts (dlerror ()); - exit (status); + return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -10646,7 +10758,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10649 "configure" +#line 10761 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10687,10 +10799,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -10706,7 +10814,7 @@ int main () else puts (dlerror ()); - exit (status); + return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -10894,15 +11002,15 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define VMIC 0 +#define VMIC 99 _ACEOF cat >>confdefs.h <<_ACEOF -#define VREV 0 +#define VREV 67344 _ACEOF -version_info="2:0:1" +version_info="2:99:1" release_info="" @@ -11640,8 +11748,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 @@ -12195,7 +12303,7 @@ sys.exit(sys.hexversion < minverhex)" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - as_fn_error $? "too old" "$LINENO" 5 + as_fn_error "too old" "$LINENO" 5 fi am_display_PYTHON=$PYTHON else @@ -12207,7 +12315,7 @@ if test "${am_cv_pathless_PYTHON+set}" = set; then : $as_echo_n "(cached) " >&6 else - for am_cv_pathless_PYTHON in python python2 python3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do + for am_cv_pathless_PYTHON in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros @@ -12409,10 +12517,6 @@ fi - - - - 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. @@ -12525,6 +12629,7 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } PKG_CONFIG="" fi + fi # Check whether pkg-config supports Requires.private @@ -12549,10 +12654,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVIL" >&5 $as_echo_n "checking for EVIL... " >&6; } -if test -n "$EVIL_CFLAGS"; then - pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_CFLAGS"; then + pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" + else + 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=$? @@ -12562,13 +12668,15 @@ if test -n "$EVIL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EVIL_LIBS"; then - pkg_cv_EVIL_LIBS="$EVIL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_LIBS"; then + pkg_cv_EVIL_LIBS="$EVIL_LIBS" + else + 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=$? @@ -12578,15 +12686,14 @@ if test -n "$EVIL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -12594,14 +12701,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evil >= 1.0.0"` else - EVIL_PKG_ERRORS=`$PKG_CONFIG --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evil >= 1.0.0"` 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 @@ -12610,13 +12717,12 @@ 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. @@ -12625,13 +12731,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 @@ -12653,10 +12759,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5 ac_status=$? @@ -12666,13 +12773,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua >= 5.1.0") 2>&5 ac_status=$? @@ -12682,15 +12791,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -12698,22 +12806,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1.0") 2>&5 ac_status=$? @@ -12723,13 +12834,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1.0") 2>&5 ac_status=$? @@ -12739,15 +12852,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -12755,22 +12867,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua5.1 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua5.1 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua5.1 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua5.1 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1.0") 2>&5 ac_status=$? @@ -12780,13 +12895,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1.0") 2>&5 ac_status=$? @@ -12796,15 +12913,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -12812,22 +12928,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua-5.1 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua-5.1 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua-5.1 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua-5.1 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -12837,13 +12956,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -12853,15 +12974,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -12869,17 +12989,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua51 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua51 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 - have_lua="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_lua="no" +elif test $pkg_failed = untried; then have_lua="no" else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS @@ -12889,17 +13009,16 @@ $as_echo "yes" >&6; } requirement_lua="lua51" 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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -12909,13 +13028,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -12925,15 +13046,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -12941,17 +13061,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua51 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua51 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 - have_lua="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_lua="no" +elif test $pkg_failed = untried; then have_lua="no" else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS @@ -12968,17 +13088,16 @@ $as_echo "yes" >&6; } requirement_lua="lua-5.1" 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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1.0") 2>&5 ac_status=$? @@ -12988,13 +13107,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1.0") 2>&5 ac_status=$? @@ -13004,15 +13125,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -13020,22 +13140,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua-5.1 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua-5.1 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua-5.1 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua-5.1 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -13045,13 +13168,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -13061,15 +13186,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -13077,17 +13201,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua51 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua51 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 - have_lua="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_lua="no" +elif test $pkg_failed = untried; then have_lua="no" else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS @@ -13097,17 +13221,16 @@ $as_echo "yes" >&6; } requirement_lua="lua51" 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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -13117,13 +13240,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -13133,15 +13258,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -13149,17 +13273,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua51 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua51 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 - have_lua="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_lua="no" +elif test $pkg_failed = untried; then have_lua="no" else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS @@ -13183,17 +13307,16 @@ $as_echo "yes" >&6; } requirement_lua="lua5.1" 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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1.0") 2>&5 ac_status=$? @@ -13203,13 +13326,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1.0") 2>&5 ac_status=$? @@ -13219,15 +13344,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -13235,22 +13359,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua5.1 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua5.1 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua5.1 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua5.1 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1.0") 2>&5 ac_status=$? @@ -13260,13 +13387,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried -fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1.0") 2>&5 ac_status=$? @@ -13276,15 +13405,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -13292,22 +13420,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua-5.1 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua-5.1 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua-5.1 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua-5.1 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -13317,13 +13448,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -13333,15 +13466,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -13349,17 +13481,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua51 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua51 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 - have_lua="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_lua="no" +elif test $pkg_failed = untried; then have_lua="no" else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS @@ -13369,17 +13501,16 @@ $as_echo "yes" >&6; } requirement_lua="lua51" 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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -13389,13 +13520,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -13405,15 +13538,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -13421,17 +13553,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua51 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua51 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 - have_lua="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_lua="no" +elif test $pkg_failed = untried; then have_lua="no" else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS @@ -13448,17 +13580,16 @@ $as_echo "yes" >&6; } requirement_lua="lua-5.1" 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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1.0") 2>&5 ac_status=$? @@ -13468,13 +13599,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua-5.1 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua-5.1 >= 5.1.0") 2>&5 ac_status=$? @@ -13484,15 +13617,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -13500,22 +13632,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua-5.1 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua-5.1 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua-5.1 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua-5.1 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -13525,13 +13660,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -13541,15 +13678,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -13557,17 +13693,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua51 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua51 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 - have_lua="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_lua="no" +elif test $pkg_failed = untried; then have_lua="no" else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS @@ -13577,17 +13713,16 @@ $as_echo "yes" >&6; } requirement_lua="lua51" 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 LUA" >&5 $as_echo_n "checking for LUA... " >&6; } -if test -n "$LUA_CFLAGS"; then - pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_CFLAGS"; then + pkg_cv_LUA_CFLAGS="$LUA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -13597,13 +13732,15 @@ if test -n "$LUA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$LUA_LIBS"; then - pkg_cv_LUA_LIBS="$LUA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$LUA_LIBS"; then + pkg_cv_LUA_LIBS="$LUA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua51 >= 5.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "lua51 >= 5.1.0") 2>&5 ac_status=$? @@ -13613,15 +13750,14 @@ if test -n "$LUA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -13629,17 +13765,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "lua51 >= 5.1.0"` else - LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors "lua51 >= 5.1.0" 2>&1` + LUA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "lua51 >= 5.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$LUA_PKG_ERRORS" >&5 - have_lua="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_lua="no" +elif test $pkg_failed = untried; then have_lua="no" else LUA_CFLAGS=$pkg_cv_LUA_CFLAGS @@ -13724,7 +13860,7 @@ fi if test "x${have_lua}" = "xno" ; then - as_fn_error $? "Cannot find lua library. Be sure that you have installed it and set CFLAGS and LDFLAGS correctly" "$LINENO" 5 + as_fn_error "Cannot find lua library. Be sure that you have installed it and set CFLAGS and LDFLAGS correctly" "$LINENO" 5 fi @@ -13732,10 +13868,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MINIMAL" >&5 $as_echo_n "checking for MINIMAL... " >&6; } -if test -n "$MINIMAL_CFLAGS"; then - pkg_cv_MINIMAL_CFLAGS="$MINIMAL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$MINIMAL_CFLAGS"; then + pkg_cv_MINIMAL_CFLAGS="$MINIMAL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" eina >= 1.1.0 eet >= 1.5.0 @@ -13754,13 +13891,15 @@ if test -n "$MINIMAL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$MINIMAL_LIBS"; then - pkg_cv_MINIMAL_LIBS="$MINIMAL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$MINIMAL_LIBS"; then + pkg_cv_MINIMAL_LIBS="$MINIMAL_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" eina >= 1.1.0 eet >= 1.5.0 @@ -13779,15 +13918,14 @@ if test -n "$MINIMAL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -13795,20 +13933,20 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - MINIMAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " + MINIMAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " eina >= 1.1.0 eet >= 1.5.0 - " 2>&1` + "` else - MINIMAL_PKG_ERRORS=`$PKG_CONFIG --print-errors " + MINIMAL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " eina >= 1.1.0 eet >= 1.5.0 - " 2>&1` + "` fi # Put the nasty error message in config.log where it belongs echo "$MINIMAL_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements ( + as_fn_error "Package requirements ( eina >= 1.1.0 eet >= 1.5.0 ) were not met: @@ -13820,13 +13958,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables MINIMAL_CFLAGS and MINIMAL_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. @@ -13835,13 +13972,13 @@ and MINIMAL_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 MINIMAL_CFLAGS=$pkg_cv_MINIMAL_CFLAGS MINIMAL_LIBS=$pkg_cv_MINIMAL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - + : fi @@ -13849,10 +13986,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EDJE" >&5 $as_echo_n "checking for EDJE... " >&6; } -if test -n "$EDJE_CFLAGS"; then - pkg_cv_EDJE_CFLAGS="$EDJE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_CFLAGS"; then + pkg_cv_EDJE_CFLAGS="$EDJE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" eina >= 1.1.0 eet >= 1.5.0 @@ -13886,13 +14024,15 @@ if test -n "$EDJE_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EDJE_LIBS"; then - pkg_cv_EDJE_LIBS="$EDJE_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_LIBS"; then + pkg_cv_EDJE_LIBS="$EDJE_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" eina >= 1.1.0 eet >= 1.5.0 @@ -13926,15 +14066,14 @@ if test -n "$EDJE_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -13942,7 +14081,7 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EDJE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " + EDJE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " eina >= 1.1.0 eet >= 1.5.0 evas >= 1.1.0 @@ -13950,9 +14089,9 @@ fi ecore-evas >= 1.1.0 ecore-file >= 1.1.0 embryo >= 1.1.0 - " 2>&1` + "` else - EDJE_PKG_ERRORS=`$PKG_CONFIG --print-errors " + EDJE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " eina >= 1.1.0 eet >= 1.5.0 evas >= 1.1.0 @@ -13960,12 +14099,12 @@ fi ecore-evas >= 1.1.0 ecore-file >= 1.1.0 embryo >= 1.1.0 - " 2>&1` + "` fi # Put the nasty error message in config.log where it belongs echo "$EDJE_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements ( + as_fn_error "Package requirements ( eina >= 1.1.0 eet >= 1.5.0 evas >= 1.1.0 @@ -13982,13 +14121,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables EDJE_CFLAGS and EDJE_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. @@ -13997,13 +14135,13 @@ and EDJE_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 EDJE_CFLAGS=$pkg_cv_EDJE_CFLAGS EDJE_LIBS=$pkg_cv_EDJE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - + : fi EDJE_LIBS="${EDJE_LIBS} ${LUA_LIBS} ${lua_libs}" @@ -14018,10 +14156,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECORE_IMF" >&5 $as_echo_n "checking for ECORE_IMF... " >&6; } -if test -n "$ECORE_IMF_CFLAGS"; then - pkg_cv_ECORE_IMF_CFLAGS="$ECORE_IMF_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$ECORE_IMF_CFLAGS"; then + pkg_cv_ECORE_IMF_CFLAGS="$ECORE_IMF_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" ecore-imf >= 1.1.0 ecore-imf-evas >= 1.1.0 @@ -14040,13 +14179,15 @@ if test -n "$ECORE_IMF_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$ECORE_IMF_LIBS"; then - pkg_cv_ECORE_IMF_LIBS="$ECORE_IMF_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$ECORE_IMF_LIBS"; then + pkg_cv_ECORE_IMF_LIBS="$ECORE_IMF_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" ecore-imf >= 1.1.0 ecore-imf-evas >= 1.1.0 @@ -14065,15 +14206,14 @@ if test -n "$ECORE_IMF_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -14081,23 +14221,23 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - ECORE_IMF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " + ECORE_IMF_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " ecore-imf >= 1.1.0 ecore-imf-evas >= 1.1.0 - " 2>&1` + "` else - ECORE_IMF_PKG_ERRORS=`$PKG_CONFIG --print-errors " + ECORE_IMF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " ecore-imf >= 1.1.0 ecore-imf-evas >= 1.1.0 - " 2>&1` + "` fi # Put the nasty error message in config.log where it belongs echo "$ECORE_IMF_PKG_ERRORS" >&5 - have_ecore_imf="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_ecore_imf="no" +elif test $pkg_failed = untried; then have_ecore_imf="no" else ECORE_IMF_CFLAGS=$pkg_cv_ECORE_IMF_CFLAGS @@ -14114,7 +14254,13 @@ $as_echo "#define HAVE_ECORE_IMF 1" >>confdefs.h fi # Enable Multisense use -want_multisense="no" +want_multisense="yes" +# Check whether --enable-multisense was given. +if test "${enable_multisense+set}" = set; then : + enableval=$enable_multisense; want_multisense=$enableval + +fi + if test "x${want_multisense}" = "xyes"; then ENABLE_MULTISENSE_TRUE= ENABLE_MULTISENSE_FALSE='#' @@ -14140,10 +14286,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SNDFILE" >&5 $as_echo_n "checking for SNDFILE... " >&6; } -if test -n "$SNDFILE_CFLAGS"; then - pkg_cv_SNDFILE_CFLAGS="$SNDFILE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SNDFILE_CFLAGS"; then + pkg_cv_SNDFILE_CFLAGS="$SNDFILE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sndfile >= 1.0.21\""; } >&5 ($PKG_CONFIG --exists --print-errors "sndfile >= 1.0.21") 2>&5 ac_status=$? @@ -14153,13 +14300,15 @@ if test -n "$SNDFILE_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$SNDFILE_LIBS"; then - pkg_cv_SNDFILE_LIBS="$SNDFILE_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SNDFILE_LIBS"; then + pkg_cv_SNDFILE_LIBS="$SNDFILE_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sndfile >= 1.0.21\""; } >&5 ($PKG_CONFIG --exists --print-errors "sndfile >= 1.0.21") 2>&5 ac_status=$? @@ -14169,15 +14318,14 @@ if test -n "$SNDFILE_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -14185,18 +14333,18 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SNDFILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sndfile >= 1.0.21" 2>&1` + SNDFILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sndfile >= 1.0.21"` else - SNDFILE_PKG_ERRORS=`$PKG_CONFIG --print-errors "sndfile >= 1.0.21" 2>&1` + SNDFILE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sndfile >= 1.0.21"` fi # Put the nasty error message in config.log where it belongs echo "$SNDFILE_PKG_ERRORS" >&5 - have_sndfile="no"; want_multisense="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_sndfile="no"; want_multisense="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } have_sndfile="no"; want_multisense="no" else @@ -14214,7 +14362,7 @@ $as_echo "#define HAVE_LIBSNDFILE 1" >>confdefs.h fi if test "x$want_sndfile" = "xyes" -a "x$have_sndfile" = "xno"; then - as_fn_error $? "sndfile support requested, but not found by pkg-config." "$LINENO" 5 + as_fn_error "sndfile support requested, but not found by pkg-config." "$LINENO" 5 fi fi if test "x${have_sndfile}" = "xyes"; then @@ -14241,10 +14389,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for REMIX" >&5 $as_echo_n "checking for REMIX... " >&6; } -if test -n "$REMIX_CFLAGS"; then - pkg_cv_REMIX_CFLAGS="$REMIX_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$REMIX_CFLAGS"; then + pkg_cv_REMIX_CFLAGS="$REMIX_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"remix >= 0.2.4\""; } >&5 ($PKG_CONFIG --exists --print-errors "remix >= 0.2.4") 2>&5 ac_status=$? @@ -14254,13 +14403,15 @@ if test -n "$REMIX_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$REMIX_LIBS"; then - pkg_cv_REMIX_LIBS="$REMIX_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$REMIX_LIBS"; then + pkg_cv_REMIX_LIBS="$REMIX_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"remix >= 0.2.4\""; } >&5 ($PKG_CONFIG --exists --print-errors "remix >= 0.2.4") 2>&5 ac_status=$? @@ -14270,15 +14421,14 @@ if test -n "$REMIX_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -14286,18 +14436,18 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - REMIX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "remix >= 0.2.4" 2>&1` + REMIX_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "remix >= 0.2.4"` else - REMIX_PKG_ERRORS=`$PKG_CONFIG --print-errors "remix >= 0.2.4" 2>&1` + REMIX_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "remix >= 0.2.4"` fi # Put the nasty error message in config.log where it belongs echo "$REMIX_PKG_ERRORS" >&5 - have_libremix="no"; want_multisense="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_libremix="no"; want_multisense="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } have_libremix="no"; want_multisense="no" else @@ -14325,7 +14475,7 @@ _ACEOF fi if test "x$want_libremix" = "xyes" -a "x$have_libremix" = "xno"; then - as_fn_error $? "remix support requested, but not found by pkg-config." "$LINENO" 5 + as_fn_error "remix support requested, but not found by pkg-config." "$LINENO" 5 fi fi if test "x${have_libremix}" = "xyes"; then @@ -14352,10 +14502,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VORBISENC" >&5 $as_echo_n "checking for VORBISENC... " >&6; } -if test -n "$VORBISENC_CFLAGS"; then - pkg_cv_VORBISENC_CFLAGS="$VORBISENC_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$VORBISENC_CFLAGS"; then + pkg_cv_VORBISENC_CFLAGS="$VORBISENC_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" ogg >= 1.1.4 vorbis >= 1.2.3 @@ -14377,13 +14528,15 @@ if test -n "$VORBISENC_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$VORBISENC_LIBS"; then - pkg_cv_VORBISENC_LIBS="$VORBISENC_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$VORBISENC_LIBS"; then + pkg_cv_VORBISENC_LIBS="$VORBISENC_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" ogg >= 1.1.4 vorbis >= 1.2.3 @@ -14405,15 +14558,14 @@ if test -n "$VORBISENC_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -14421,26 +14573,26 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - VORBISENC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " + VORBISENC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " ogg >= 1.1.4 vorbis >= 1.2.3 vorbisenc >= 1.2.3 - " 2>&1` + "` else - VORBISENC_PKG_ERRORS=`$PKG_CONFIG --print-errors " + VORBISENC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " ogg >= 1.1.4 vorbis >= 1.2.3 vorbisenc >= 1.2.3 - " 2>&1` + "` fi # Put the nasty error message in config.log where it belongs echo "$VORBISENC_PKG_ERRORS" >&5 - have_vorbis="no"; want_multisense="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_vorbis="no"; want_multisense="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } have_vorbis="no"; want_multisense="no" else @@ -14458,7 +14610,7 @@ $as_echo "#define HAVE_VORBIS 1" >>confdefs.h fi if test "x$want_vorbis" = "xyes" -a "x$have_vorbis" = "xno"; then - as_fn_error $? "vorbisenc support requested, but not found by pkg-config." "$LINENO" 5 + as_fn_error "vorbisenc support requested, but not found by pkg-config." "$LINENO" 5 fi fi @@ -14477,10 +14629,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5 $as_echo_n "checking for ALSA... " >&6; } -if test -n "$ALSA_CFLAGS"; then - pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$ALSA_CFLAGS"; then + pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" alsa >= 1.0.21 \""; } >&5 @@ -14496,13 +14649,15 @@ if test -n "$ALSA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$ALSA_LIBS"; then - pkg_cv_ALSA_LIBS="$ALSA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$ALSA_LIBS"; then + pkg_cv_ALSA_LIBS="$ALSA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" alsa >= 1.0.21 \""; } >&5 @@ -14518,15 +14673,14 @@ if test -n "$ALSA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -14534,22 +14688,22 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " + ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " alsa >= 1.0.21 - " 2>&1` + "` else - ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors " + ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " alsa >= 1.0.21 - " 2>&1` + "` fi # Put the nasty error message in config.log where it belongs echo "$ALSA_PKG_ERRORS" >&5 - have_alsa_lib="no"; want_multisense="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_alsa_lib="no"; want_multisense="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } have_alsa_lib="no"; want_multisense="no" else @@ -14567,7 +14721,7 @@ $as_echo "#define HAVE_LIBALSA 1" >>confdefs.h fi if test "x$want_alsa_lib" = "xyes" -a "x$have_alsa_lib" = "xno"; then - as_fn_error $? "alsa support requested, but not found by pkg-config." "$LINENO" 5 + as_fn_error "alsa support requested, but not found by pkg-config." "$LINENO" 5 fi fi if test "x${have_alsa_lib}" = "xyes"; then @@ -14595,10 +14749,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLAC" >&5 $as_echo_n "checking for FLAC... " >&6; } -if test -n "$FLAC_CFLAGS"; then - pkg_cv_FLAC_CFLAGS="$FLAC_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FLAC_CFLAGS"; then + pkg_cv_FLAC_CFLAGS="$FLAC_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" flac >= 1.2.1 \""; } >&5 @@ -14614,13 +14769,15 @@ if test -n "$FLAC_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$FLAC_LIBS"; then - pkg_cv_FLAC_LIBS="$FLAC_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FLAC_LIBS"; then + pkg_cv_FLAC_LIBS="$FLAC_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" flac >= 1.2.1 \""; } >&5 @@ -14636,15 +14793,14 @@ if test -n "$FLAC_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -14652,22 +14808,22 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - FLAC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " + FLAC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " flac >= 1.2.1 - " 2>&1` + "` else - FLAC_PKG_ERRORS=`$PKG_CONFIG --print-errors " + FLAC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " flac >= 1.2.1 - " 2>&1` + "` fi # Put the nasty error message in config.log where it belongs echo "$FLAC_PKG_ERRORS" >&5 - have_flac_lib="no"; want_multisense="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_flac_lib="no"; want_multisense="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } have_flac_lib="no"; want_multisense="no" else @@ -14688,7 +14844,7 @@ $as_echo "#define HAVE_LIBFLAC 1" >>confdefs.h fi if test "x$want_flac_lib" = "xyes" -a "x$have_flac_lib" = "xno"; then - as_fn_error $? "flac support requested, but not found by pkg-config." "$LINENO" 5 + as_fn_error "flac support requested, but not found by pkg-config." "$LINENO" 5 fi fi @@ -14706,10 +14862,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EDJE_CC" >&5 $as_echo_n "checking for EDJE_CC... " >&6; } -if test -n "$EDJE_CC_CFLAGS"; then - pkg_cv_EDJE_CC_CFLAGS="$EDJE_CC_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_CC_CFLAGS"; then + pkg_cv_EDJE_CC_CFLAGS="$EDJE_CC_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0") 2>&5 ac_status=$? @@ -14719,13 +14876,15 @@ if test -n "$EDJE_CC_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EDJE_CC_LIBS"; then - pkg_cv_EDJE_CC_LIBS="$EDJE_CC_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_CC_LIBS"; then + pkg_cv_EDJE_CC_LIBS="$EDJE_CC_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0") 2>&5 ac_status=$? @@ -14735,15 +14894,14 @@ if test -n "$EDJE_CC_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -14751,14 +14909,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EDJE_CC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0" 2>&1` + EDJE_CC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0"` else - EDJE_CC_PKG_ERRORS=`$PKG_CONFIG --print-errors "ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0" 2>&1` + EDJE_CC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$EDJE_CC_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0) were not met: + as_fn_error "Package requirements (ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0) were not met: $EDJE_CC_PKG_ERRORS @@ -14767,13 +14925,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables EDJE_CC_CFLAGS and EDJE_CC_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. @@ -14782,13 +14939,13 @@ and EDJE_CC_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 EDJE_CC_CFLAGS=$pkg_cv_EDJE_CC_CFLAGS EDJE_CC_LIBS=$pkg_cv_EDJE_CC_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - + : fi EDJE_CC_LIBS="${EDJE_CC_LIBS} ${LUA_LIBS} ${lua_libs}" fi @@ -14808,10 +14965,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EDJE_DECC" >&5 $as_echo_n "checking for EDJE_DECC... " >&6; } -if test -n "$EDJE_DECC_CFLAGS"; then - pkg_cv_EDJE_DECC_CFLAGS="$EDJE_DECC_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_DECC_CFLAGS"; then + pkg_cv_EDJE_DECC_CFLAGS="$EDJE_DECC_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0") 2>&5 ac_status=$? @@ -14821,13 +14979,15 @@ if test -n "$EDJE_DECC_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EDJE_DECC_LIBS"; then - pkg_cv_EDJE_DECC_LIBS="$EDJE_DECC_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_DECC_LIBS"; then + pkg_cv_EDJE_DECC_LIBS="$EDJE_DECC_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0") 2>&5 ac_status=$? @@ -14837,15 +14997,14 @@ if test -n "$EDJE_DECC_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -14853,14 +15012,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EDJE_DECC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0" 2>&1` + EDJE_DECC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0"` else - EDJE_DECC_PKG_ERRORS=`$PKG_CONFIG --print-errors "ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0" 2>&1` + EDJE_DECC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$EDJE_DECC_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0) were not met: + as_fn_error "Package requirements (ecore-file >= 1.1.0 ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eet >= 1.5.0 eina >= 1.1.0) were not met: $EDJE_DECC_PKG_ERRORS @@ -14869,13 +15028,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables EDJE_DECC_CFLAGS and EDJE_DECC_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. @@ -14884,13 +15042,13 @@ and EDJE_DECC_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 EDJE_DECC_CFLAGS=$pkg_cv_EDJE_DECC_CFLAGS EDJE_DECC_LIBS=$pkg_cv_EDJE_DECC_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - + : fi fi @@ -14900,10 +15058,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EDJE_PLAYER" >&5 $as_echo_n "checking for EDJE_PLAYER... " >&6; } -if test -n "$EDJE_PLAYER_CFLAGS"; then - pkg_cv_EDJE_PLAYER_CFLAGS="$EDJE_PLAYER_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_PLAYER_CFLAGS"; then + pkg_cv_EDJE_PLAYER_CFLAGS="$EDJE_PLAYER_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0") 2>&5 ac_status=$? @@ -14913,13 +15072,15 @@ if test -n "$EDJE_PLAYER_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EDJE_PLAYER_LIBS"; then - pkg_cv_EDJE_PLAYER_LIBS="$EDJE_PLAYER_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_PLAYER_LIBS"; then + pkg_cv_EDJE_PLAYER_LIBS="$EDJE_PLAYER_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0") 2>&5 ac_status=$? @@ -14929,15 +15090,14 @@ if test -n "$EDJE_PLAYER_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -14945,14 +15105,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EDJE_PLAYER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0" 2>&1` + EDJE_PLAYER_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0"` else - EDJE_PLAYER_PKG_ERRORS=`$PKG_CONFIG --print-errors "ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0" 2>&1` + EDJE_PLAYER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$EDJE_PLAYER_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0) were not met: + as_fn_error "Package requirements (ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0) were not met: $EDJE_PLAYER_PKG_ERRORS @@ -14961,13 +15121,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables EDJE_PLAYER_CFLAGS and EDJE_PLAYER_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. @@ -14976,13 +15135,13 @@ and EDJE_PLAYER_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 EDJE_PLAYER_CFLAGS=$pkg_cv_EDJE_PLAYER_CFLAGS EDJE_PLAYER_LIBS=$pkg_cv_EDJE_PLAYER_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - + : fi fi @@ -14992,10 +15151,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EDJE_INSPECTOR" >&5 $as_echo_n "checking for EDJE_INSPECTOR... " >&6; } -if test -n "$EDJE_INSPECTOR_CFLAGS"; then - pkg_cv_EDJE_INSPECTOR_CFLAGS="$EDJE_INSPECTOR_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_INSPECTOR_CFLAGS"; then + pkg_cv_EDJE_INSPECTOR_CFLAGS="$EDJE_INSPECTOR_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0") 2>&5 ac_status=$? @@ -15005,13 +15165,15 @@ if test -n "$EDJE_INSPECTOR_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EDJE_INSPECTOR_LIBS"; then - pkg_cv_EDJE_INSPECTOR_LIBS="$EDJE_INSPECTOR_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_INSPECTOR_LIBS"; then + pkg_cv_EDJE_INSPECTOR_LIBS="$EDJE_INSPECTOR_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0") 2>&5 ac_status=$? @@ -15021,15 +15183,14 @@ if test -n "$EDJE_INSPECTOR_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -15037,14 +15198,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EDJE_INSPECTOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0" 2>&1` + EDJE_INSPECTOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0"` else - EDJE_INSPECTOR_PKG_ERRORS=`$PKG_CONFIG --print-errors "ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0" 2>&1` + EDJE_INSPECTOR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$EDJE_INSPECTOR_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0) were not met: + as_fn_error "Package requirements (ecore-evas >= 1.1.0 ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0) were not met: $EDJE_INSPECTOR_PKG_ERRORS @@ -15053,13 +15214,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables EDJE_INSPECTOR_CFLAGS and EDJE_INSPECTOR_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. @@ -15068,13 +15228,13 @@ and EDJE_INSPECTOR_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 EDJE_INSPECTOR_CFLAGS=$pkg_cv_EDJE_INSPECTOR_CFLAGS EDJE_INSPECTOR_LIBS=$pkg_cv_EDJE_INSPECTOR_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - + : fi fi @@ -15084,10 +15244,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EDJE_EXTERNAL_INSPECTOR" >&5 $as_echo_n "checking for EDJE_EXTERNAL_INSPECTOR... " >&6; } -if test -n "$EDJE_EXTERNAL_INSPECTOR_CFLAGS"; then - pkg_cv_EDJE_EXTERNAL_INSPECTOR_CFLAGS="$EDJE_EXTERNAL_INSPECTOR_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_EXTERNAL_INSPECTOR_CFLAGS"; then + pkg_cv_EDJE_EXTERNAL_INSPECTOR_CFLAGS="$EDJE_EXTERNAL_INSPECTOR_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0") 2>&5 ac_status=$? @@ -15097,13 +15258,15 @@ if test -n "$EDJE_EXTERNAL_INSPECTOR_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EDJE_EXTERNAL_INSPECTOR_LIBS"; then - pkg_cv_EDJE_EXTERNAL_INSPECTOR_LIBS="$EDJE_EXTERNAL_INSPECTOR_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_EXTERNAL_INSPECTOR_LIBS"; then + pkg_cv_EDJE_EXTERNAL_INSPECTOR_LIBS="$EDJE_EXTERNAL_INSPECTOR_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0") 2>&5 ac_status=$? @@ -15113,15 +15276,14 @@ if test -n "$EDJE_EXTERNAL_INSPECTOR_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -15129,14 +15291,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EDJE_EXTERNAL_INSPECTOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0" 2>&1` + EDJE_EXTERNAL_INSPECTOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0"` else - EDJE_EXTERNAL_INSPECTOR_PKG_ERRORS=`$PKG_CONFIG --print-errors "ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0" 2>&1` + EDJE_EXTERNAL_INSPECTOR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0"` fi # Put the nasty error message in config.log where it belongs echo "$EDJE_EXTERNAL_INSPECTOR_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0) were not met: + as_fn_error "Package requirements (ecore >= 1.1.0 evas >= 1.1.0 eina >= 1.1.0) were not met: $EDJE_EXTERNAL_INSPECTOR_PKG_ERRORS @@ -15145,13 +15307,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables EDJE_EXTERNAL_INSPECTOR_CFLAGS and EDJE_EXTERNAL_INSPECTOR_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. @@ -15160,13 +15321,13 @@ and EDJE_EXTERNAL_INSPECTOR_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 EDJE_EXTERNAL_INSPECTOR_CFLAGS=$pkg_cv_EDJE_EXTERNAL_INSPECTOR_CFLAGS EDJE_EXTERNAL_INSPECTOR_LIBS=$pkg_cv_EDJE_EXTERNAL_INSPECTOR_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - + : fi fi @@ -15176,7 +15337,8 @@ for ac_header in locale.h sys/resource.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" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -15255,7 +15417,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : +if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16119,7 +16281,8 @@ 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" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -16235,10 +16398,11 @@ 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" && \ +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=$? @@ -16248,13 +16412,15 @@ if test -n "$CHECK_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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" && \ +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=$? @@ -16264,15 +16430,14 @@ if test -n "$CHECK_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -16280,17 +16445,17 @@ 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` + CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "check >= 0.9.5"` else - CHECK_PKG_ERRORS=`$PKG_CONFIG --print-errors "check >= 0.9.5" 2>&1` + 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 - _efl_enable_tests="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&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 @@ -16425,29 +16590,6 @@ fi ## Examples -install_examples="yes" -# Check whether --enable-install-examples was given. -if test "${enable_install_examples+set}" = set; then : - enableval=$enable_install_examples; - if test "x${enableval}" = "xyes" ; then - install_examples="yes" - else - install_examples="no" - fi - -else - install_examples="yes" -fi - - if test "x${install_examples}" = "xyes"; then - INSTALL_EXAMPLES_TRUE= - INSTALL_EXAMPLES_FALSE='#' -else - INSTALL_EXAMPLES_TRUE='#' - INSTALL_EXAMPLES_FALSE= -fi - - build_examples="no" # Check whether --enable-build-examples was given. if test "${enable_build_examples+set}" = set; then : @@ -16455,7 +16597,7 @@ if test "${enable_build_examples+set}" = set; then : if test "x${enableval}" = "xyes" ; then build_examples="yes" edje_cc=$($PKG_CONFIG --variable=prefix edje)/bin/edje_cc - # put in here the dependencies for Edje' examples. They are + # put in here the dependencies for Edje' examples. They are # meant to be 'real world' usage examples, thus one will be # using higher level libraries on these programs @@ -16563,7 +16705,6 @@ 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$//' @@ -16587,99 +16728,95 @@ 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 "${EDJE_AMALGAMATION_TRUE}" && test -z "${EDJE_AMALGAMATION_FALSE}"; then - as_fn_error $? "conditional \"EDJE_AMALGAMATION\" was never defined. + as_fn_error "conditional \"EDJE_AMALGAMATION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EDJE_CC_TRUE}" && test -z "${BUILD_EDJE_CC_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EDJE_CC\" was never defined. + as_fn_error "conditional \"BUILD_EDJE_CC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EDJE_DECC_TRUE}" && test -z "${BUILD_EDJE_DECC_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EDJE_DECC\" was never defined. + as_fn_error "conditional \"BUILD_EDJE_DECC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EDJE_RECC_TRUE}" && test -z "${BUILD_EDJE_RECC_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EDJE_RECC\" was never defined. + as_fn_error "conditional \"BUILD_EDJE_RECC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EDJE_PLAYER_TRUE}" && test -z "${BUILD_EDJE_PLAYER_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EDJE_PLAYER\" was never defined. + as_fn_error "conditional \"BUILD_EDJE_PLAYER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EDJE_INSPECTOR_TRUE}" && test -z "${BUILD_EDJE_INSPECTOR_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EDJE_INSPECTOR\" was never defined. + as_fn_error "conditional \"BUILD_EDJE_INSPECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EDJE_EXTERNAL_INSPECTOR_TRUE}" && test -z "${BUILD_EDJE_EXTERNAL_INSPECTOR_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EDJE_EXTERNAL_INSPECTOR\" was never defined. + as_fn_error "conditional \"BUILD_EDJE_EXTERNAL_INSPECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EDJE_PROGRAM_CACHE_TRUE}" && test -z "${EDJE_PROGRAM_CACHE_FALSE}"; then - as_fn_error $? "conditional \"EDJE_PROGRAM_CACHE\" was never defined. + as_fn_error "conditional \"EDJE_PROGRAM_CACHE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EDJE_CALC_CACHE_TRUE}" && test -z "${EDJE_CALC_CACHE_FALSE}"; then - as_fn_error $? "conditional \"EDJE_CALC_CACHE\" was never defined. + as_fn_error "conditional \"EDJE_CALC_CACHE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EDJE_FP_TRUE}" && test -z "${BUILD_EDJE_FP_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EDJE_FP\" was never defined. + as_fn_error "conditional \"BUILD_EDJE_FP\" 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 "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then - as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. + as_fn_error "conditional \"HAVE_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_MULTISENSE_TRUE}" && test -z "${ENABLE_MULTISENSE_FALSE}"; then - as_fn_error $? "conditional \"ENABLE_MULTISENSE\" was never defined. + as_fn_error "conditional \"ENABLE_MULTISENSE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBSNDFILE_TRUE}" && test -z "${HAVE_LIBSNDFILE_FALSE}"; then - as_fn_error $? "conditional \"HAVE_LIBSNDFILE\" was never defined. + as_fn_error "conditional \"HAVE_LIBSNDFILE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBREMIX_TRUE}" && test -z "${HAVE_LIBREMIX_FALSE}"; then - as_fn_error $? "conditional \"HAVE_LIBREMIX\" was never defined. + as_fn_error "conditional \"HAVE_LIBREMIX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBALSA_TRUE}" && test -z "${HAVE_LIBALSA_FALSE}"; then - as_fn_error $? "conditional \"HAVE_LIBALSA\" was never defined. + as_fn_error "conditional \"HAVE_LIBALSA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EPP_TRUE}" && test -z "${BUILD_EPP_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EPP\" was never defined. + as_fn_error "conditional \"BUILD_EPP\" 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 \"EFL_ENABLE_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EFL_ENABLE_COVERAGE_TRUE}" && test -z "${EFL_ENABLE_COVERAGE_FALSE}"; then - as_fn_error $? "conditional \"EFL_ENABLE_COVERAGE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${INSTALL_EXAMPLES_TRUE}" && test -z "${INSTALL_EXAMPLES_FALSE}"; then - as_fn_error $? "conditional \"INSTALL_EXAMPLES\" was never defined. + as_fn_error "conditional \"EFL_ENABLE_COVERAGE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EXAMPLES_TRUE}" && test -z "${BUILD_EXAMPLES_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EXAMPLES\" was never defined. + as_fn_error "conditional \"BUILD_EXAMPLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -16829,19 +16966,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error 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=$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 + 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 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -17037,7 +17174,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 @@ -17090,8 +17227,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 edje $as_me 1.1.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +This file was extended by edje $as_me 1.1.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -17156,11 +17293,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="\\ -edje config.status 1.1.0 -configured by $0, generated by GNU Autoconf 2.67, +edje config.status 1.1.99.67344 +configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -17178,16 +17315,11 @@ 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 @@ -17209,7 +17341,6 @@ 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;; @@ -17222,7 +17353,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 ;; @@ -17231,7 +17362,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" @@ -17405,47 +17536,6 @@ enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quot enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' -LD_='`$ECHO "X$LD_" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_='`$ECHO "X$old_archive_cmds_" | $Xsed -e "$delay_single_quote_subst"`' -compiler_='`$ECHO "X$compiler_" | $Xsed -e "$delay_single_quote_subst"`' -GCC_='`$ECHO "X$GCC_" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_='`$ECHO "X$lt_prog_compiler_no_builtin_flag_" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_='`$ECHO "X$lt_prog_compiler_wl_" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_='`$ECHO "X$lt_prog_compiler_pic_" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_='`$ECHO "X$lt_prog_compiler_static_" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_='`$ECHO "X$lt_cv_prog_compiler_c_o_" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_='`$ECHO "X$archive_cmds_need_lc_" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_='`$ECHO "X$enable_shared_with_static_runtimes_" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_='`$ECHO "X$export_dynamic_flag_spec_" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_='`$ECHO "X$whole_archive_flag_spec_" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_='`$ECHO "X$compiler_needs_object_" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_='`$ECHO "X$old_archive_from_new_cmds_" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_='`$ECHO "X$old_archive_from_expsyms_cmds_" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_='`$ECHO "X$archive_cmds_" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_='`$ECHO "X$archive_expsym_cmds_" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_='`$ECHO "X$module_cmds_" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_='`$ECHO "X$module_expsym_cmds_" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_='`$ECHO "X$with_gnu_ld_" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_='`$ECHO "X$allow_undefined_flag_" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_='`$ECHO "X$no_undefined_flag_" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_='`$ECHO "X$hardcode_libdir_flag_spec_" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_='`$ECHO "X$hardcode_libdir_flag_spec_ld_" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_='`$ECHO "X$hardcode_libdir_separator_" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_='`$ECHO "X$hardcode_direct_" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_='`$ECHO "X$hardcode_direct_absolute_" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_='`$ECHO "X$hardcode_minus_L_" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_='`$ECHO "X$hardcode_shlibpath_var_" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_='`$ECHO "X$hardcode_automatic_" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_='`$ECHO "X$inherit_rpath_" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_='`$ECHO "X$link_all_deplibs_" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_='`$ECHO "X$fix_srcfile_path_" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_='`$ECHO "X$always_export_symbols_" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_='`$ECHO "X$export_symbols_cmds_" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_='`$ECHO "X$exclude_expsyms_" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_='`$ECHO "X$include_expsyms_" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_='`$ECHO "X$prelink_cmds_" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_='`$ECHO "X$file_list_spec_" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_='`$ECHO "X$hardcode_action_" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' @@ -17508,27 +17598,7 @@ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ -striplib \ -LD_ \ -compiler_ \ -lt_prog_compiler_no_builtin_flag_ \ -lt_prog_compiler_wl_ \ -lt_prog_compiler_pic_ \ -lt_prog_compiler_static_ \ -lt_cv_prog_compiler_c_o_ \ -export_dynamic_flag_spec_ \ -whole_archive_flag_spec_ \ -compiler_needs_object_ \ -with_gnu_ld_ \ -allow_undefined_flag_ \ -no_undefined_flag_ \ -hardcode_libdir_flag_spec_ \ -hardcode_libdir_flag_spec_ld_ \ -hardcode_libdir_separator_ \ -fix_srcfile_path_ \ -exclude_expsyms_ \ -include_expsyms_ \ -file_list_spec_; do +striplib; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" @@ -17557,16 +17627,7 @@ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec \ -old_archive_cmds_ \ -old_archive_from_new_cmds_ \ -old_archive_from_expsyms_cmds_ \ -archive_cmds_ \ -archive_expsym_cmds_ \ -module_cmds_ \ -module_expsym_cmds_ \ -export_symbols_cmds_ \ -prelink_cmds_; do +sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" @@ -17633,7 +17694,7 @@ do "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;; "src/examples/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/Makefile" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -17671,7 +17732,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. @@ -17688,7 +17749,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 @@ -17702,18 +17763,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 @@ -17802,28 +17863,20 @@ 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 sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ 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[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// s/^[^=]*=[ ]*$// }' fi @@ -17851,7 +17904,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 @@ -17936,7 +17989,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" @@ -17949,7 +18002,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 @@ -17977,7 +18030,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error "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'" @@ -18004,7 +18057,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 @@ -18141,22 +18194,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) # @@ -18167,19 +18220,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" @@ -18970,7 +19023,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. @@ -18991,7 +19044,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 1 + $ac_cs_success || as_fn_exit $? 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 diff --git a/libraries/edje/configure.ac b/libraries/edje/configure.ac index 36bf32c..eceed6c 100644 --- a/libraries/edje/configure.ac +++ b/libraries/edje/configure.ac @@ -2,11 +2,11 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [1]) -m4_define([v_mic], [0]) -m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) +m4_define([v_mic], [99]) +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'])) 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 -m4_undefine([v_rev]) +dnl 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]) @@ -291,14 +291,14 @@ PKG_CHECK_MODULES([ECORE_IMF], [have_ecore_imf="no"]) # Enable Multisense use -want_multisense="no" -dnl AC_ARG_ENABLE([multisense], -dnl [AC_HELP_STRING( -dnl [--enable-multisense], -dnl [multisense provides sound. tone and haptic effects support, [[default=disabled]]] -dnl )], -dnl [want_multisense=$enableval] -dnl ) +want_multisense="yes" +AC_ARG_ENABLE([multisense], + [AC_HELP_STRING( + [--enable-multisense], + [multisense provides sound. tone and haptic effects support, [[default=disabled]]] + )], + [want_multisense=$enableval] +) AM_CONDITIONAL([ENABLE_MULTISENSE], [test "x${want_multisense}" = "xyes"]) ##sndfile library @@ -534,21 +534,6 @@ fi ## Examples -install_examples="yes" -AC_ARG_ENABLE([install-examples], - AC_HELP_STRING([--disable-install-examples], - [disable installing examples (compiled or just source). - @<:@default==enabled@:>@]), - [ - if test "x${enableval}" = "xyes" ; then - install_examples="yes" - else - install_examples="no" - fi - ], - [install_examples="yes"]) -AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"]) - build_examples="no" AC_ARG_ENABLE([build-examples], AC_HELP_STRING([--enable-build-examples], @@ -557,7 +542,7 @@ AC_ARG_ENABLE([build-examples], if test "x${enableval}" = "xyes" ; then build_examples="yes" edje_cc=$($PKG_CONFIG --variable=prefix edje)/bin/edje_cc - # put in here the dependencies for Edje' examples. They are + # put in here the dependencies for Edje' examples. They are # meant to be 'real world' usage examples, thus one will be # using higher level libraries on these programs AC_SUBST(edje_cc) diff --git a/libraries/edje/data/Makefile.in b/libraries/edje/data/Makefile.in index 8555a6e..83c9e7c 100644 --- a/libraries/edje/data/Makefile.in +++ b/libraries/edje/data/Makefile.in @@ -217,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/edje/data/include/Makefile.in b/libraries/edje/data/include/Makefile.in index ce14f03..b639450 100644 --- a/libraries/edje/data/include/Makefile.in +++ b/libraries/edje/data/include/Makefile.in @@ -177,8 +177,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/edje/doc/Makefile.in b/libraries/edje/doc/Makefile.in index b821675..d88c39e 100644 --- a/libraries/edje/doc/Makefile.in +++ b/libraries/edje/doc/Makefile.in @@ -154,8 +154,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/edje/edje.spec b/libraries/edje/edje.spec index d887479..cede72d 100644 --- a/libraries/edje/edje.spec +++ b/libraries/edje/edje.spec @@ -4,7 +4,7 @@ Summary: Complex Graphical Design/Layout Engine Name: edje -Version: 1.1.0 +Version: 1.1.99.67344 Release: %{_rel} License: BSD Group: System Environment/Libraries @@ -81,8 +81,8 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT %files devel %defattr(-, root, root) -%doc doc/html %{_libdir}/*.so +%{_libdir}/edje/modules/multisense_factory/*/module.* %{_libdir}/*.la %{_libdir}/*.a %{_libdir}/pkgconfig/* diff --git a/libraries/edje/edje.spec.in b/libraries/edje/edje.spec.in index be7069c..a05e8a3 100644 --- a/libraries/edje/edje.spec.in +++ b/libraries/edje/edje.spec.in @@ -81,8 +81,8 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT %files devel %defattr(-, root, root) -%doc doc/html %{_libdir}/*.so +%{_libdir}/edje/modules/multisense_factory/*/module.* %{_libdir}/*.la %{_libdir}/*.a %{_libdir}/pkgconfig/* diff --git a/libraries/edje/ltmain.sh b/libraries/edje/ltmain.sh index fa4b1e1..7ed280b 100755 --- a/libraries/edje/ltmain.sh +++ b/libraries/edje/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-2ubuntu3 +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,7 +73,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" +VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" TIMESTAMP="" package_revision=1.3017 diff --git a/libraries/edje/m4/libtool.m4 b/libraries/edje/m4/libtool.m4 index 6e86e5b..a3fee53 100644 --- a/libraries/edje/m4/libtool.m4 +++ b/libraries/edje/m4/libtool.m4 @@ -380,12 +380,12 @@ m4_define([lt_decl_dquote_varnames], # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_quote(m4_if([$2], [], - m4_quote(lt_decl_tag_varnames), - m4_quote(m4_shift($@)))), - m4_split(m4_normalize(m4_quote(_LT_TAGS))))]) -m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)]) +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) @@ -945,10 +945,10 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on + darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? + # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; @@ -990,7 +990,11 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - if test "$GCC" = "yes"; then + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" @@ -1512,7 +1516,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw*) + cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -1680,10 +1684,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -1699,7 +1699,7 @@ int main () else puts (dlerror ()); - exit (status); + return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then @@ -1738,7 +1738,7 @@ else lt_cv_dlopen_self=yes ;; - mingw* | pw32*) + mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; @@ -2035,6 +2035,7 @@ m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], @@ -2199,14 +2200,14 @@ bsdi[[45]]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -2229,7 +2230,7 @@ cygwin* | mingw* | pw32*) soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; - mingw*) + mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` @@ -2444,7 +2445,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -2667,7 +2668,7 @@ tpf*) version_type=linux need_lib_prefix=no need_version=no - library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -2691,7 +2692,7 @@ variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi - + if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi @@ -2968,6 +2969,7 @@ _LT_DECL([], [reload_cmds], [2])dnl # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -3018,6 +3020,12 @@ mingw* | pw32*) fi ;; +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; @@ -3076,7 +3084,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3329,7 +3337,7 @@ case $host_os in aix*) symcode='[[BCDT]]' ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) @@ -3575,7 +3583,7 @@ m4_if([$1], [CXX], [ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | cygwin* | os2* | pw32*) + mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style @@ -3602,10 +3610,11 @@ m4_if([$1], [CXX], [ fi ;; hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. case $host_cpu in - hppa*64*|ia64*) + hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' @@ -3696,19 +3705,26 @@ m4_if([$1], [CXX], [ ;; esac ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; - icpc* | ecpc* ) - # Intel C++ + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -3874,7 +3890,7 @@ m4_if([$1], [CXX], [ # PIC is the default for these OSes. ;; - mingw* | cygwin* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style @@ -3890,10 +3906,11 @@ m4_if([$1], [CXX], [ ;; hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. case $host_cpu in - hppa*64*|ia64*) + hppa*64*) # +Z the default ;; *) @@ -3943,7 +3960,7 @@ m4_if([$1], [CXX], [ fi ;; - mingw* | cygwin* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], @@ -3972,13 +3989,27 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in - icc* | ecc* | ifort*) + # old Intel for x86_64 which still supported -KPIC. + ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -4160,7 +4191,7 @@ m4_if([$1], [CXX], [ pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; - cygwin* | mingw*) + cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) @@ -4215,7 +4246,7 @@ dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -4230,6 +4261,9 @@ dnl Note also adjust exclude_expsyms for C++ above. openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -4251,6 +4285,7 @@ dnl Note also adjust exclude_expsyms for C++ above. fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -4302,7 +4337,7 @@ _LT_EOF fi ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' @@ -4342,7 +4377,7 @@ _LT_EOF _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -4368,6 +4403,9 @@ _LT_EOF tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; @@ -4600,6 +4638,7 @@ _LT_EOF fi fi + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes @@ -4654,7 +4693,7 @@ _LT_EOF _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is @@ -4758,7 +4797,7 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -5543,6 +5582,7 @@ if test "$_lt_caught_CXX_error" != yes; then fi fi + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. @@ -5601,7 +5641,7 @@ if test "$_lt_caught_CXX_error" != yes; then esac ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' @@ -5821,7 +5861,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -6986,6 +7026,18 @@ AC_SUBST([GREP]) ]) +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates diff --git a/libraries/edje/m4/ltoptions.m4 b/libraries/edje/m4/ltoptions.m4 index e970119..34151a3 100644 --- a/libraries/edje/m4/ltoptions.m4 +++ b/libraries/edje/m4/ltoptions.m4 @@ -125,7 +125,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) diff --git a/libraries/edje/sha1-for-source.txt b/libraries/edje/sha1-for-source.txt deleted file mode 100644 index ca5daa9..0000000 --- a/libraries/edje/sha1-for-source.txt +++ /dev/null @@ -1 +0,0 @@ -0753a3ba57908d7c3f0e5ab4fb437c24ed1b5dce diff --git a/libraries/edje/src/Makefile.in b/libraries/edje/src/Makefile.in index 532d75b..fc05386 100644 --- a/libraries/edje/src/Makefile.in +++ b/libraries/edje/src/Makefile.in @@ -193,8 +193,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/edje/src/bin/Makefile.in b/libraries/edje/src/bin/Makefile.in index 877bcb2..07bf025 100644 --- a/libraries/edje/src/bin/Makefile.in +++ b/libraries/edje/src/bin/Makefile.in @@ -291,8 +291,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/edje/src/bin/edje_cc.h b/libraries/edje/src/bin/edje_cc.h index bcd31a1..d0c6d22 100644 --- a/libraries/edje/src/bin/edje_cc.h +++ b/libraries/edje/src/bin/edje_cc.h @@ -138,6 +138,7 @@ struct _Edje_Part_Parser /* global fn calls */ void data_setup(void); void data_write(void); +void data_queue_group_lookup(const char *name, Edje_Part *part); void data_queue_part_lookup(Edje_Part_Collection *pc, const char *name, int *dest); void data_queue_copied_part_lookup(Edje_Part_Collection *pc, int *src, int *dest); void data_queue_program_lookup(Edje_Part_Collection *pc, const char *name, int *dest); diff --git a/libraries/edje/src/bin/edje_cc_handlers.c b/libraries/edje/src/bin/edje_cc_handlers.c index 8bfc262..f74fa12 100644 --- a/libraries/edje/src/bin/edje_cc_handlers.c +++ b/libraries/edje/src/bin/edje_cc_handlers.c @@ -172,6 +172,7 @@ static void st_collections_group_parts_part_description_visible(void); static void st_collections_group_parts_part_description_align(void); static void st_collections_group_parts_part_description_fixed(void); static void st_collections_group_parts_part_description_min(void); +static void st_collections_group_parts_part_description_minmul(void); static void st_collections_group_parts_part_description_max(void); static void st_collections_group_parts_part_description_step(void); static void st_collections_group_parts_part_description_aspect(void); @@ -261,12 +262,9 @@ static void st_collections_group_programs_program_after(void); static void st_collections_group_programs_program_api(void); static void ob_collections_group_programs_program_script(void); - -#ifdef ENABLE_MULTISENSE static void st_collections_group_sound_sample_name(void); static void st_collections_group_sound_sample_source(void); static void st_collections_group_sound_tone(void); -#endif /*****/ @@ -305,14 +303,13 @@ New_Statement_Handler statement_handlers[] = {"collections.color_classes.color_class.color", st_color_class_color}, /* dup */ {"collections.color_classes.color_class.color2", st_color_class_color2}, /* dup */ {"collections.color_classes.color_class.color3", st_color_class_color3}, /* dup */ -#ifdef ENABLE_MULTISENSE + {"collections.sounds.sample.name", st_collections_group_sound_sample_name}, {"collections.sounds.sample.source", st_collections_group_sound_sample_source}, {"collections.group.sounds.sample.name", st_collections_group_sound_sample_name}, /* dup */ {"collections.group.sounds.sample.source", st_collections_group_sound_sample_source}, /* dup */ {"collections.sounds.tone", st_collections_group_sound_tone}, {"collections.group.sounds.tone", st_collections_group_sound_tone}, /* dup */ -#endif {"collections.group.name", st_collections_group_name}, {"collections.group.inherit", st_collections_group_inherit}, {"collections.group.script_only", st_collections_group_script_only}, @@ -438,6 +435,7 @@ New_Statement_Handler statement_handlers[] = {"collections.group.parts.part.description.align", st_collections_group_parts_part_description_align}, {"collections.group.parts.part.description.fixed", st_collections_group_parts_part_description_fixed}, {"collections.group.parts.part.description.min", st_collections_group_parts_part_description_min}, + {"collections.group.parts.part.description.minmul", st_collections_group_parts_part_description_minmul}, {"collections.group.parts.part.description.max", st_collections_group_parts_part_description_max}, {"collections.group.parts.part.description.step", st_collections_group_parts_part_description_step}, {"collections.group.parts.part.description.aspect", st_collections_group_parts_part_description_aspect}, @@ -677,14 +675,13 @@ New_Object_Handler object_handlers[] = {"collections.styles.style", ob_styles_style}, /* dup */ {"collections.color_classes", NULL}, /* dup */ {"collections.color_classes.color_class", ob_color_class}, /* dup */ -#ifdef ENABLE_MULTISENSE {"collections.sounds", NULL}, {"collections.group.sounds", NULL}, /* dup */ {"collections.sounds.sample", NULL}, {"collections.group.sounds.sample", NULL}, /* dup */ -#endif {"collections.group", ob_collections_group}, {"collections.group.data", NULL}, + {"collections.group.limits", NULL}, {"collections.group.script", ob_collections_group_script}, {"collections.group.lua_script", ob_collections_group_lua_script}, {"collections.group.externals", NULL}, /* dup */ @@ -1836,12 +1833,6 @@ st_styles_style_tag(void) stl->tags = eina_list_append(stl->tags, tag); } -#ifdef ENABLE_MULTISENSE -/* add to below doc -sounds { } - */ -#endif - /** @page edcref @block @@ -1851,6 +1842,7 @@ sounds { } .. group { } group { } + sounds { } .. } @description @@ -1866,8 +1858,7 @@ ob_collections(void) edje_file->collection = eina_hash_string_small_new(NULL); } -#ifdef ENABLE_MULTISENSE -/* * delete space before * +/** @page edcref @block sounds @@ -1980,7 +1971,7 @@ st_collections_group_sound_sample_name(void) } -/* * delete space before * +/** @page edcref @property source @@ -2016,7 +2007,7 @@ st_collections_group_sound_sample_source(void) check_arg_count(1); } -/* * delete space before * +/** @page edcref @property tone @@ -2079,7 +2070,6 @@ st_collections_group_sound_tone(void) tone->value = value; tone->id = edje_file->sound_dir->tones_count - 1; } -#endif /** @edcsection{group,Group sub blocks} @@ -2677,14 +2667,14 @@ st_collections_group_orientation(void) @block limits @context - group { + group { limits { - vertical: "limit_name" height_barrier; - horizontal: "limit_name" width_barrier; - .. - } - .. - } + vertical: "limit_name" height_barrier; + horizontal: "limit_name" width_barrier; + .. + } + .. + } .. @description This block is used to trigger some signal when the Edje object is resized. @@ -2696,10 +2686,10 @@ st_collections_group_orientation(void) @parameters [name] [height barrier] @effect - It will send a signal: "limit,name,over" when the object is resized and pass - the limit by growing over it. And it will send: "limit,name,below" when - it pass below that limit. - This limit will be applied on the y absis. + It will send a signal: "limit,name,over" when the object is resized and pass + the limit by growing over it. And it will send: "limit,name,below" when + it pass below that limit. + This limit will be applied on the y absis and is expressed in pixels. @endproperty */ static void @@ -2734,10 +2724,10 @@ st_collections_group_limits_vertical(void) @parameters [name] [width barrier] @effect - It will send a signal: "limit,name,over" when the object is resized and pass - the limit by growing over it. And it will send: "limit,name,below" when - it pass below that limit. - This limit will be applied on the x absis. + It will send a signal: "limit,name,over" when the object is resized and pass + the limit by growing over it. And it will send: "limit,name,below" when + it pass below that limit. + This limit will be applied on the x absis and is expressed in pixels. @endproperty */ static void @@ -3224,6 +3214,7 @@ st_collections_group_parts_part_source(void) //FIXME: validate this somehow (need to decide on the format also) current_part->source = parse_str(0); + data_queue_group_lookup(current_part->source, current_part); } /** @@ -3245,6 +3236,7 @@ st_collections_group_parts_part_source2(void) //FIXME: validate this somehow (need to decide on the format also) current_part->source2 = parse_str(0); + data_queue_group_lookup(current_part->source2, current_part); } /** @@ -3266,6 +3258,7 @@ st_collections_group_parts_part_source3(void) //FIXME: validate this somehow (need to decide on the format also) current_part->source3 = parse_str(0); + data_queue_group_lookup(current_part->source3, current_part); } /** @@ -3287,6 +3280,7 @@ st_collections_group_parts_part_source4(void) //FIXME: validate this somehow (need to decide on the format also) current_part->source4 = parse_str(0); + data_queue_group_lookup(current_part->source4, current_part); } /** @@ -3308,6 +3302,7 @@ st_collections_group_parts_part_source5(void) //FIXME: validate this somehow (need to decide on the format also) current_part->source5 = parse_str(0); + data_queue_group_lookup(current_part->source5, current_part); } /** @@ -3329,6 +3324,7 @@ st_collections_group_parts_part_source6(void) //FIXME: validate this somehow (need to decide on the format also) current_part->source6 = parse_str(0); + data_queue_group_lookup(current_part->source6, current_part); } /** @@ -3439,10 +3435,9 @@ st_collections_group_parts_part_entry_mode(void) [MODE] @effect Sets the selection mode for a textblock part to one of: - @li DEFAULT - @li EXPLICIT - DEFAULT selection mode is what you would expect on any desktop. Press - mouse, drag and release to end. EXPLICIT mode requires the application + @li DEFAULT selection mode is what you would expect on any desktop. Press + mouse, drag and release to end. + @li EXPLICITmode requires the application controlling the edje object has to explicitly begin and end selection modes, and the selection itself is dragable at both ends. @endproperty @@ -3466,11 +3461,9 @@ st_collections_group_parts_part_select_mode(void) [MODE] @effect Sets the cursor mode for a textblock part to one of: - @li UNDER - @li BEFORE - UNDER cursor mode means the cursor will draw below the character pointed + @li UNDER cursor mode means the cursor will draw below the character pointed at. That's the default. - BEFORE cursor mode means the cursor is drawn as a vertical line before + @li BEFORE cursor mode means the cursor is drawn as a vertical line before the current character, just like many other GUI toolkits handle it. @endproperty */ @@ -3816,6 +3809,7 @@ static void st_collections_group_parts_part_box_items_item_source(void) check_arg_count(1); current_item->source = parse_str(0); + data_queue_group_lookup(current_item->source, current_part); } /** @@ -4140,6 +4134,9 @@ ob_collections_group_parts_part_description(void) ed->map.persp_on = 0; ed->persp.zplane = 0; ed->persp.focal = 1000; + ed->minmul.have = 1; + ed->minmul.w = FROM_INT(1); + ed->minmul.h = FROM_INT(1); } /** @@ -4558,6 +4555,27 @@ st_collections_group_parts_part_description_min(void) /** @page edcref @property + minmul + @parameters + [width multipler] [height multiplier] + @effect + A multiplier FORCIBLY applied to whatever minimum size is only during + minimum size calculation. + @endproperty + @since 1.2 +*/ +static void +st_collections_group_parts_part_description_minmul(void) +{ + check_arg_count(2); + + current_desc->minmul.w = FROM_DOUBLE(parse_float_range(0, 0, 999999)); + current_desc->minmul.h = FROM_DOUBLE(parse_float_range(1, 0, 999999)); +} + +/** + @page edcref + @property max @parameters [width] [height] @@ -4605,7 +4623,7 @@ st_collections_group_parts_part_description_step(void) Normally width and height can be resized to any values independently. The aspect property forces the width to height ratio to be kept between the minimum and maximum set. For example, "1.0 1.0" will increase the - width a pixel for every pixel added to heigh. The default value is + width a pixel for every pixel added to height. The default value is "0.0 0.0" disabling aspect. @endproperty */ @@ -4626,7 +4644,7 @@ st_collections_group_parts_part_description_aspect(void) [DIMENSION] @effect Sets the scope of the "aspect" property to a given dimension. Available - options are BOTH, VERTICAL, HORIZONTAL and NONE + options are BOTH, VERTICAL, HORIZONTAL, SOURCE and NONE @endproperty */ static void @@ -4639,6 +4657,7 @@ st_collections_group_parts_part_description_aspect_preference(void) "VERTICAL", EDJE_ASPECT_PREFER_VERTICAL, "HORIZONTAL", EDJE_ASPECT_PREFER_HORIZONTAL, "BOTH", EDJE_ASPECT_PREFER_BOTH, + "SOURCE", EDJE_ASPECT_PREFER_SOURCE, NULL); } @@ -7236,15 +7255,6 @@ st_collections_group_programs_program_in(void) current_program->in.range = parse_float_range(1, 0.0, 999999999.0); } -#ifdef ENABLE_MULTISENSE -/* add to docs below -, PLAY_SAMPLE, PLAY_TONE - - action: PLAY_SAMPLE "sample name";\n - action: PLAY_TONE "tone name" duration in seconds ( Range 0.1 to 10.0 );\n -*/ -#endif - /** @page edcref @property @@ -7254,7 +7264,7 @@ st_collections_group_programs_program_in(void) @effect Action to be performed by the program. Valid actions are: STATE_SET, ACTION_STOP, SIGNAL_EMIT, DRAG_VAL_SET, DRAG_VAL_STEP, DRAG_VAL_PAGE, - FOCUS_SET, PARAM_COPY, PARAM_SET + FOCUS_SET, PARAM_COPY, PARAM_SET, PLAY_SAMPLE, PLAY_TONE Only one action can be specified per program. Examples:\n action: STATE_SET "statename" 0.5;\n action: ACTION_STOP;\n @@ -7266,6 +7276,8 @@ st_collections_group_programs_program_in(void) action: FOCUS_OBJECT;\n action: PARAM_COPY "src_part" "src_param" "dst_part" "dst_param";\n action: PARAM_SET "part" "param" "value";\n + action: PLAY_SAMPLE "sample name";\n + action: PLAY_TONE "tone name" duration in seconds ( Range 0.1 to 10.0 );\n @endproperty */ static void @@ -7273,6 +7285,7 @@ st_collections_group_programs_program_action(void) { Edje_Part_Collection *pc; Edje_Program *ep; + int i; pc = eina_list_data_get(eina_list_last(edje_collections)); ep = current_program; @@ -7288,10 +7301,8 @@ st_collections_group_programs_program_action(void) "FOCUS_OBJECT", EDJE_ACTION_TYPE_FOCUS_OBJECT, "PARAM_COPY", EDJE_ACTION_TYPE_PARAM_COPY, "PARAM_SET", EDJE_ACTION_TYPE_PARAM_SET, -#ifdef ENABLE_MULTISENSE "PLAY_SAMPLE", EDJE_ACTION_TYPE_SOUND_SAMPLE, "PLAY_TONE", EDJE_ACTION_TYPE_SOUND_TONE, -#endif NULL); if (ep->action == EDJE_ACTION_TYPE_STATE_SET) { @@ -7303,11 +7314,8 @@ st_collections_group_programs_program_action(void) ep->state = parse_str(1); ep->state2 = parse_str(2); } -#ifdef ENABLE_MULTISENSE else if (ep->action == EDJE_ACTION_TYPE_SOUND_SAMPLE) { - int i; - ep->sample_name = parse_str(1); for (i = 0; i < (int)edje_file->sound_dir->samples_count; i++) { @@ -7324,8 +7332,6 @@ st_collections_group_programs_program_action(void) } else if (ep->action == EDJE_ACTION_TYPE_SOUND_TONE) { - int i; - ep->tone_name = parse_str(1); for (i = 0; i < (int)edje_file->sound_dir->tones_count; i++) { @@ -7340,7 +7346,6 @@ st_collections_group_programs_program_action(void) } ep->duration = parse_float_range(2, 0.1, 10.0); } -#endif else if (ep->action == EDJE_ACTION_TYPE_DRAG_VAL_SET) { ep->value = parse_float(1); @@ -7402,14 +7407,12 @@ st_collections_group_programs_program_action(void) case EDJE_ACTION_TYPE_PARAM_SET: check_arg_count(4); break; -#ifdef ENABLE_MULTISENSE case EDJE_ACTION_TYPE_SOUND_SAMPLE: check_arg_count(3); break; case EDJE_ACTION_TYPE_SOUND_TONE: check_arg_count(3); break; -#endif default: check_arg_count(3); } diff --git a/libraries/edje/src/bin/edje_cc_out.c b/libraries/edje/src/bin/edje_cc_out.c index 443a702..5050ad4 100644 --- a/libraries/edje/src/bin/edje_cc_out.c +++ b/libraries/edje/src/bin/edje_cc_out.c @@ -72,6 +72,7 @@ struct _Program_Lookup struct _Group_Lookup { char *name; + Edje_Part *part; }; struct _String_Lookup @@ -808,8 +809,8 @@ data_write_groups(Eet_File *ef, int *collection_num) if (verbose) { - printf("%s: Wrote %9i bytes (%4iKb) for \"%s\" collection entry\n", - progname, bytes, (bytes + 512) / 1024, buf); + printf("%s: Wrote %9i bytes (%4iKb) for \"%s\" aka \"%s\" collection entry\n", + progname, bytes, (bytes + 512) / 1024, buf, pc->part); } } @@ -1371,13 +1372,16 @@ reorder_parts(void) } void -data_queue_group_lookup(char *name) +data_queue_group_lookup(const char *name, Edje_Part *part) { Group_Lookup *gl; + if (!name || !name[0]) return; + gl = mem_alloc(SZ(Group_Lookup)); group_lookups = eina_list_append(group_lookups, gl); gl->name = mem_strdup(name); + gl->part = part; } void @@ -1698,15 +1702,38 @@ data_process_lookups(void) { Edje_Part_Collection_Directory_Entry *de; + if (group->part) + { + if (group->part->type != EDJE_PART_TYPE_GROUP + && group->part->type != EDJE_PART_TYPE_TEXTBLOCK + && group->part->type != EDJE_PART_TYPE_BOX + && group->part->type != EDJE_PART_TYPE_TABLE) + goto free_group; + } + de = eina_hash_find(edje_file->collection, group->name); if (!de) + { + Eina_Bool found = EINA_FALSE; + + EINA_LIST_FOREACH(aliases, l, de) + if (strcmp(de->entry, group->name) == 0) + { + found = EINA_TRUE; + break; + } + if (!found) de = NULL; + } + + if (!de) { ERR("%s: Error. Unable to find group name \"%s\".", progname, group->name); exit(-1); } + free_group: free(group->name); free(group); } @@ -1914,7 +1941,7 @@ _data_queue_program_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int static void _data_queue_group_lookup(Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr __UNUSED__, int len __UNUSED__) { - data_queue_group_lookup(name); + data_queue_group_lookup(name, NULL); } static void _data_queue_image_pc_lookup(Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr, int len) diff --git a/libraries/edje/src/bin/edje_cc_parse.c b/libraries/edje/src/bin/edje_cc_parse.c index ae68e00..adc08d3 100644 --- a/libraries/edje/src/bin/edje_cc_parse.c +++ b/libraries/edje/src/bin/edje_cc_parse.c @@ -238,8 +238,6 @@ next_token(char *p, char *end, char **new_p, int *delim) int in_comment_sa = 0; int had_quote = 0; int is_escaped = 0; - char *cpp_token_line = NULL; - char *cpp_token_file = NULL; *delim = 0; if (p >= end) return NULL; @@ -249,8 +247,6 @@ next_token(char *p, char *end, char **new_p, int *delim) { in_comment_ss = 0; in_comment_cpp = 0; - cpp_token_line = NULL; - cpp_token_file = NULL; line++; } if ((!in_comment_ss) && (!in_comment_sa)) @@ -275,8 +271,6 @@ next_token(char *p, char *end, char **new_p, int *delim) /* their line format is * #line [??] */ - cpp_token_line = NULL; - cpp_token_file = NULL; pp = p; while ((pp < end) && (*pp != '\n')) diff --git a/libraries/edje/src/bin/edje_decc.c b/libraries/edje/src/bin/edje_decc.c index 1b79e13..ac776e9 100644 --- a/libraries/edje/src/bin/edje_decc.c +++ b/libraries/edje/src/bin/edje_decc.c @@ -69,7 +69,6 @@ main(int argc, char **argv) eina_shutdown(); exit(-1); } - eina_log_level_set(EINA_LOG_LEVEL_INFO); progname = argv[0]; for (i = 1; i < argc; i++) { @@ -104,7 +103,7 @@ main(int argc, char **argv) if (!decomp()) return -1; output(); - printf("WARNING! If any Image or audio data was encoded in a LOSSY way, then\n" + fprintf(stderr, "WARNING! If any Image or audio data was encoded in a LOSSY way, then\n" "re-encoding will drop quality even more. You need access to the original\n" "data to ensure no loss of quality.\n"); eet_close(ef); diff --git a/libraries/edje/src/bin/edje_inspector.c b/libraries/edje/src/bin/edje_inspector.c index ed3baaf..093de86 100644 --- a/libraries/edje/src/bin/edje_inspector.c +++ b/libraries/edje/src/bin/edje_inspector.c @@ -263,20 +263,20 @@ border_fill_name_get(int id) } static void -state_details(Evas_Object *ed, const char *part, const char *state, double value) +state_details(Evas_Object *ed, const char *ppart, const char *state, double value) { - Edje_Part_Type t = edje_edit_part_type_get(ed, part); + Edje_Part_Type t = edje_edit_part_type_get(ed, ppart); double dx, dy; const char *str, *str2; int x, y, r, g, b, a; if (detail < 1) return; - b = edje_edit_state_visible_get(ed, part, state, value); + b = edje_edit_state_visible_get(ed, ppart, state, value); if (machine) printf("VISIBLE: %d\n", b); else if (!b) puts(INDENT4 "visible: 0;"); - edje_edit_state_color_get(ed, part, state, value, &r, &g, &b, &a); + edje_edit_state_color_get(ed, ppart, state, value, &r, &g, &b, &a); if (machine) printf("COLOR-R: %d\nCOLOR-G: %d\nCOLOR-B: %d\nCOLOR-A: %d\n", r, g, b, a); else if ((r != 255) || (g != 255) || (b != 255) || (a != 255)) @@ -284,14 +284,14 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value if (detail > 1) { - edje_edit_state_color2_get(ed, part, state, value, &r, &g, &b, &a); + edje_edit_state_color2_get(ed, ppart, state, value, &r, &g, &b, &a); if (machine) printf("COLOR2-R: %d\nCOLOR2-G: %d\nCOLOR2-B: %d\nCOLOR2-A: %d\n", r, g, b, a); else if ((r != 255) || (g != 255) || (b != 255) || (a != 255)) printf(INDENT4 "color2: %d %d %d %d;\n", r, g, b, a); - edje_edit_state_color3_get(ed, part, state, value, &r, &g, &b, &a); + edje_edit_state_color3_get(ed, ppart, state, value, &r, &g, &b, &a); if (machine) printf("COLOR3-R: %d\nCOLOR3-G: %d\nCOLOR3-B: %d\nCOLOR3-A: %d\n", r, g, b, a); @@ -299,19 +299,19 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value printf(INDENT4 "color3: %d %d %d %d;\n", r, g, b, a); } - dx = edje_edit_state_align_x_get(ed, part, state, value); - dy = edje_edit_state_align_y_get(ed, part, state, value); + dx = edje_edit_state_align_x_get(ed, ppart, state, value); + dy = edje_edit_state_align_y_get(ed, ppart, state, value); if (machine) printf("ALIGN-X: %g\nALIGN-Y: %g\n", dx, dy); else if (FDIFF(dx, 0.5) || FDIFF(dy, 0.5)) printf(INDENT4 "align: %g %g;\n", dx, dy); - x = edje_edit_state_min_w_get(ed, part, state, value); - y = edje_edit_state_min_h_get(ed, part, state, value); + x = edje_edit_state_min_w_get(ed, ppart, state, value); + y = edje_edit_state_min_h_get(ed, ppart, state, value); if (machine) printf("MIN-W: %d\nMIN-H: %d\n", x, y); else if ((x) || (y)) printf(INDENT4 "min: %d %d;\n", x, y); - x = edje_edit_state_max_w_get(ed, part, state, value); - y = edje_edit_state_max_h_get(ed, part, state, value); + x = edje_edit_state_max_w_get(ed, ppart, state, value); + y = edje_edit_state_max_h_get(ed, ppart, state, value); if (machine) printf("MAX-W: %d\nMAX-H: %d\n", x, y); else if ((x != -1) || (y != -1)) printf(INDENT4 "max: %d %d;\n", x, y); @@ -320,30 +320,30 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value if (detail > 1) { - dx = edje_edit_state_aspect_min_get(ed, part, state, value); - dy = edje_edit_state_aspect_max_get(ed, part, state, value); + dx = edje_edit_state_aspect_min_get(ed, ppart, state, value); + dy = edje_edit_state_aspect_max_get(ed, ppart, state, value); if (machine) printf("ASPECT-MIN: %g\nASPECT-MAX: %g\n", dx, dy); else if (FDIFF(dx, 0.0) || FDIFF(dy, 0.0)) printf(INDENT4 "aspect: %g %g;\n", dx, dy); - x = edje_edit_state_aspect_pref_get(ed, part, state, value); + x = edje_edit_state_aspect_pref_get(ed, ppart, state, value); str = aspect_pref_name_get(x); if (machine) printf("ASPECT-PREFERENCE: %s\n", str); else if (x) printf(INDENT4 "aspect_preference: %s;\n", str); /* do not free this str! */ - str = edje_edit_state_color_class_get(ed, part, state, value); + str = edje_edit_state_color_class_get(ed, ppart, state, value); if (machine) printf("COLOR_CLASS: %s\n", str ? str : ""); else if (str) printf(INDENT4 "color_class: \"%s\";\n", str); edje_edit_string_free(str); } - dx = edje_edit_state_rel1_relative_x_get(ed, part, state, value); - dy = edje_edit_state_rel1_relative_y_get(ed, part, state, value); - x = edje_edit_state_rel1_offset_x_get(ed, part, state, value); - y = edje_edit_state_rel1_offset_y_get(ed, part, state, value); - str = edje_edit_state_rel1_to_x_get(ed, part, state, value); - str2 = edje_edit_state_rel1_to_y_get(ed, part, state, value); + dx = edje_edit_state_rel1_relative_x_get(ed, ppart, state, value); + dy = edje_edit_state_rel1_relative_y_get(ed, ppart, state, value); + x = edje_edit_state_rel1_offset_x_get(ed, ppart, state, value); + y = edje_edit_state_rel1_offset_y_get(ed, ppart, state, value); + str = edje_edit_state_rel1_to_x_get(ed, ppart, state, value); + str2 = edje_edit_state_rel1_to_y_get(ed, ppart, state, value); if (FDIFF(dx, 0.0) || FDIFF(dy, 0.0) || (x) || (y) || (str) || (str2)) { if (machine) puts("REL1-BEGIN"); @@ -372,12 +372,12 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value edje_edit_string_free(str); edje_edit_string_free(str2); - dx = edje_edit_state_rel2_relative_x_get(ed, part, state, value); - dy = edje_edit_state_rel2_relative_y_get(ed, part, state, value); - x = edje_edit_state_rel2_offset_x_get(ed, part, state, value); - y = edje_edit_state_rel2_offset_y_get(ed, part, state, value); - str = edje_edit_state_rel2_to_x_get(ed, part, state, value); - str2 = edje_edit_state_rel2_to_y_get(ed, part, state, value); + dx = edje_edit_state_rel2_relative_x_get(ed, ppart, state, value); + dy = edje_edit_state_rel2_relative_y_get(ed, ppart, state, value); + x = edje_edit_state_rel2_offset_x_get(ed, ppart, state, value); + y = edje_edit_state_rel2_offset_y_get(ed, ppart, state, value); + str = edje_edit_state_rel2_to_x_get(ed, ppart, state, value); + str2 = edje_edit_state_rel2_to_y_get(ed, ppart, state, value); if (FDIFF(dx, 1.0) || FDIFF(dy, 1.0) || (x != -1) || (y != -1) || (str) || (str2)) { @@ -410,7 +410,7 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value if (t == EDJE_PART_TYPE_IMAGE) { - str = edje_edit_state_image_get(ed, part, state, value); + str = edje_edit_state_image_get(ed, ppart, state, value); if (machine) printf("IMAGE-BEGIN\nNORMAL: %s\n", str ? str : ""); else if (detail > 1) @@ -429,7 +429,7 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value double dx2, dy2; Eina_Bool has_orgin, has_size; - tweens = edje_edit_state_tweens_list_get(ed, part, state, value); + tweens = edje_edit_state_tweens_list_get(ed, ppart, state, value); EINA_LIST_FOREACH(tweens, l, str) { if (machine) printf("TWEEN: %s\n", str); @@ -438,14 +438,14 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value edje_edit_string_list_free(tweens); edje_edit_state_image_border_get - (ed, part, state, value, &bl, &br, &bt, &bb); + (ed, ppart, state, value, &bl, &br, &bt, &bb); if (machine) printf("BORDER-LEFT: %d\nBORDER-RIGHT: %d\n" "BORDER-TOP: %d\nBORDER-BOTTOM: %d\n", bl, br, bt, bb); else if ((bl) || (br) || (bt) || (bb)) printf(INDENT5 "border: %d %d %d %d;\n", bl, br, bt, bb); - x = edje_edit_state_image_border_fill_get(ed, part, state, value); + x = edje_edit_state_image_border_fill_get(ed, ppart, state, value); str = border_fill_name_get(x); if (machine) printf("BORDER-FILL: %s\n", str); else if (x != 1) printf(INDENT5 "middle: %s;\n", str); @@ -454,22 +454,22 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value // TODO support image.fill.smooth dx = edje_edit_state_fill_origin_relative_x_get - (ed, part, state, value); + (ed, ppart, state, value); dy = edje_edit_state_fill_origin_relative_y_get - (ed, part, state, value); + (ed, ppart, state, value); x = edje_edit_state_fill_origin_offset_x_get - (ed, part, state, value); + (ed, ppart, state, value); y = edje_edit_state_fill_origin_offset_y_get - (ed, part, state, value); + (ed, ppart, state, value); dx2 = edje_edit_state_fill_size_relative_x_get - (ed, part, state, value); + (ed, ppart, state, value); dy2 = edje_edit_state_fill_size_relative_y_get - (ed, part, state, value); + (ed, ppart, state, value); x2 = edje_edit_state_fill_size_offset_x_get - (ed, part, state, value); + (ed, ppart, state, value); y2 = edje_edit_state_fill_size_offset_y_get - (ed, part, state, value); + (ed, ppart, state, value); has_orgin = (FDIFF(dx, 0.0) || FDIFF(dy, 0.0) || (x) || (y)); has_size = (FDIFF(dx2, 1.0) || FDIFF(dy2, 1.0) || (x2) || (y2)); @@ -531,22 +531,22 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value // TODO support proxy.fill.smooth dx = edje_edit_state_fill_origin_relative_x_get - (ed, part, state, value); + (ed, ppart, state, value); dy = edje_edit_state_fill_origin_relative_y_get - (ed, part, state, value); + (ed, ppart, state, value); x = edje_edit_state_fill_origin_offset_x_get - (ed, part, state, value); + (ed, ppart, state, value); y = edje_edit_state_fill_origin_offset_y_get - (ed, part, state, value); + (ed, ppart, state, value); dx2 = edje_edit_state_fill_size_relative_x_get - (ed, part, state, value); + (ed, ppart, state, value); dy2 = edje_edit_state_fill_size_relative_y_get - (ed, part, state, value); + (ed, ppart, state, value); x2 = edje_edit_state_fill_size_offset_x_get - (ed, part, state, value); + (ed, ppart, state, value); y2 = edje_edit_state_fill_size_offset_y_get - (ed, part, state, value); + (ed, ppart, state, value); has_orgin = (FDIFF(dx, 0.0) || FDIFF(dy, 0.0) || (x) || (y)); has_size = (FDIFF(dx2, 1.0) || FDIFF(dy2, 1.0) || (x2) || (y2)); @@ -600,34 +600,34 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value if (machine) puts("TEXT-BEGIN"); else puts(INDENT4 "text {"); - str = edje_edit_state_text_get(ed, part, state, value); + str = edje_edit_state_text_get(ed, ppart, state, value); if (machine) printf("TEXT: %s\n", str ? str : ""); else if (str) printf(INDENT5 "text: \"%s\";\n", str); edje_edit_string_free(str); - str = edje_edit_state_font_get(ed, part, state, value); + str = edje_edit_state_font_get(ed, ppart, state, value); if (machine) printf("FONT: %s\n", str ? str : ""); else if (str) printf(INDENT5 "font: \"%s\";\n", str); edje_edit_string_free(str); - x = edje_edit_state_text_size_get(ed, part, state, value); + x = edje_edit_state_text_size_get(ed, ppart, state, value); if (machine) printf("SIZE: %d\n", x); else if (x > 0) printf(INDENT5 "size: %d;\n", x); // TODO text_class - dx = edje_edit_state_text_align_x_get(ed, part, state, value); - dy = edje_edit_state_text_align_y_get(ed, part, state, value); + dx = edje_edit_state_text_align_x_get(ed, ppart, state, value); + dy = edje_edit_state_text_align_y_get(ed, ppart, state, value); if (machine) printf("TEXT-ALIGN-X: %g\nTEXT-ALIGN-Y: %g\n", dx, dy); else if (FDIFF(dx, 0.5) || FDIFF(dy, 0.5)) printf(INDENT5 "align: %g %g;\n", dx, dy); - x = edje_edit_state_text_fit_x_get(ed, part, state, value); - y = edje_edit_state_text_fit_y_get(ed, part, state, value); + x = edje_edit_state_text_fit_x_get(ed, ppart, state, value); + y = edje_edit_state_text_fit_y_get(ed, ppart, state, value); if (machine) printf("TEXT-FIT-X: %d\nTEXT-FIT-Y: %d\n", x, y); else if ((x) || (y)) printf(INDENT5 "fit: %d %d;\n", x, y); - dx = edje_edit_state_text_elipsis_get(ed, part, state, value); + dx = edje_edit_state_text_elipsis_get(ed, ppart, state, value); if (machine) printf("TEXT-ELIPSIS: %g\n", dx); else if (FDIFF(dx, 0.5)) printf(INDENT5 "elipsis: %g;\n", dx); @@ -640,7 +640,7 @@ state_details(Evas_Object *ed, const char *part, const char *state, double value const Edje_External_Param *p; params = edje_edit_state_external_params_list_get - (ed, part, state, value); + (ed, ppart, state, value); if (params) { @@ -766,16 +766,16 @@ _api_name_fix(const char *orig) } static char * -_part_api_name_get(Evas_Object *ed, const char *part) +_part_api_name_get(Evas_Object *ed, const char *ppart) { - const char *orig = edje_edit_part_api_name_get(ed, part); + const char *orig = edje_edit_part_api_name_get(ed, ppart); char *fix = _api_name_fix(orig); edje_edit_string_free(orig); return fix; } static void -part_details(Evas_Object *ed, const char *part) +part_details(Evas_Object *ed, const char *ppart) { Eina_List *states, *l; Eina_Bool b; @@ -786,8 +786,8 @@ part_details(Evas_Object *ed, const char *part) if (machine) puts("PART-DETAILS-BEGIN"); - str = api =_part_api_name_get(ed, part); - str2 = edje_edit_part_api_description_get(ed, part); + str = api =_part_api_name_get(ed, ppart); + str2 = edje_edit_part_api_description_get(ed, ppart); if (machine) { printf("API-NAME: %s\n", str ? str : ""); @@ -798,67 +798,67 @@ part_details(Evas_Object *ed, const char *part) free(api); edje_edit_string_free(str2); - b = edje_edit_part_mouse_events_get(ed, part); + b = edje_edit_part_mouse_events_get(ed, ppart); if (machine) printf("MOUSE_EVENTS: %d\n", b); else if (!b) puts(INDENT3 "mouse_events: 0;"); if (detail > 1) { - b = edje_edit_part_repeat_events_get(ed, part); + b = edje_edit_part_repeat_events_get(ed, ppart); if (machine) printf("REPEAT_EVENTS: %d\n", b); else if (b) puts(INDENT3 "repeat_events: 1;"); - b = edje_edit_part_scale_get(ed, part); + b = edje_edit_part_scale_get(ed, ppart); if (machine) printf("SCALE: %d\n", b); else if (b) puts(INDENT3 "scale: 1;"); } - str = edje_edit_part_clip_to_get(ed, part); + str = edje_edit_part_clip_to_get(ed, ppart); if (machine) printf("CLIP_TO: %s\n", str ? str : ""); else if (str) printf(INDENT3 "clip_to: \"%s\";\n", str); edje_edit_string_free(str); - str = edje_edit_part_source_get(ed, part); + str = edje_edit_part_source_get(ed, ppart); if (machine) printf("SOURCE: %s\n", str ? str : ""); else if (str) printf(INDENT3 "source: \"%s\";\n", str); edje_edit_string_free(str); if (detail > 1) { - if (edje_edit_part_type_get(ed, part) == EDJE_PART_TYPE_TEXT) + if (edje_edit_part_type_get(ed, ppart) == EDJE_PART_TYPE_TEXT) { - str = text_effect_name_get(edje_edit_part_effect_get(ed, part)); + str = text_effect_name_get(edje_edit_part_effect_get(ed, ppart)); if (machine) printf("EFFECT: %s\n", str ? str : ""); else if (str) printf(INDENT3 "effect: %s;\n", str); /* do not free this str! */ } - if (edje_edit_part_drag_x_get(ed, part) || - edje_edit_part_drag_y_get(ed, part)) + if (edje_edit_part_drag_x_get(ed, ppart) || + edje_edit_part_drag_y_get(ed, ppart)) { int dir, step, count; if (machine) puts("DRAGABLE-BEGIN"); else puts(INDENT3 "dragable {"); - dir = edje_edit_part_drag_x_get(ed, part); - step = edje_edit_part_drag_step_x_get(ed, part); - count = edje_edit_part_drag_count_x_get(ed, part); + dir = edje_edit_part_drag_x_get(ed, ppart); + step = edje_edit_part_drag_step_x_get(ed, ppart); + count = edje_edit_part_drag_count_x_get(ed, ppart); if (machine) printf("DRAG-X: %d %d %d\n", dir, step, count); else printf(INDENT4 "x: %d %d %d;\n", dir, step, count); - dir = edje_edit_part_drag_y_get(ed, part); - step = edje_edit_part_drag_step_y_get(ed, part); - count = edje_edit_part_drag_count_y_get(ed, part); + dir = edje_edit_part_drag_y_get(ed, ppart); + step = edje_edit_part_drag_step_y_get(ed, ppart); + count = edje_edit_part_drag_count_y_get(ed, ppart); if (machine) printf("DRAG-Y: %d %d %d\n", dir, step, count); else printf(INDENT4 "y: %d %d %d;\n", dir, step, count); - str = edje_edit_part_drag_confine_get(ed, part); + str = edje_edit_part_drag_confine_get(ed, ppart); if (machine) printf("DRAG-CONFINE: %s\n", str ? str : ""); else if (str) printf(INDENT4 "confine: \"%s\";\n", str); edje_edit_string_free(str); - str = edje_edit_part_drag_event_get(ed, part); + str = edje_edit_part_drag_event_get(ed, ppart); if (machine) printf("DRAG-EVENTS: %s\n", str ? str : ""); else if (str) printf(INDENT4 "events: \"%s\";\n", str); edje_edit_string_free(str); @@ -868,7 +868,7 @@ part_details(Evas_Object *ed, const char *part) } } - states = edje_edit_part_states_list_get(ed, part); + states = edje_edit_part_states_list_get(ed, ppart); EINA_LIST_FOREACH(states, l, str) { char state[512], *delim; @@ -879,7 +879,7 @@ part_details(Evas_Object *ed, const char *part) delim++; value = strtod(delim, NULL); state_begin(state, value); - state_details(ed, part, state, value); + state_details(ed, ppart, state, value); state_end(); } edje_edit_string_list_free(states); @@ -1047,9 +1047,9 @@ program_end(void) static char * -_program_api_name_get(Evas_Object *ed, const char *program) +_program_api_name_get(Evas_Object *ed, const char *pprogram) { - const char *orig = edje_edit_program_api_name_get(ed, program); + const char *orig = edje_edit_program_api_name_get(ed, pprogram); char *fix = _api_name_fix(orig); edje_edit_string_free(orig); return fix; @@ -1071,7 +1071,7 @@ _transition_name_get(Edje_Tween_Mode mode) } static void -program_details(Evas_Object *ed, const char *program) +program_details(Evas_Object *ed, const char *pprogram) { const char *str, *str2; char *api; @@ -1080,8 +1080,8 @@ program_details(Evas_Object *ed, const char *program) if (machine) puts("PROGRAM-DETAILS-BEGIN"); - str = api =_program_api_name_get(ed, program); - str2 = edje_edit_program_api_description_get(ed, program); + str = api =_program_api_name_get(ed, pprogram); + str2 = edje_edit_program_api_description_get(ed, pprogram); if (machine) { printf("API-NAME: %s\n", str ? str : ""); @@ -1092,12 +1092,12 @@ program_details(Evas_Object *ed, const char *program) free(api); edje_edit_string_free(str2); - str = edje_edit_program_signal_get(ed, program); + str = edje_edit_program_signal_get(ed, pprogram); if (machine) printf("SIGNAL: %s\n", str ? str : ""); else if (str) printf(INDENT3 "signal: \"%s\";\n", str); edje_edit_string_free(str); - str = edje_edit_program_source_get(ed, program); + str = edje_edit_program_source_get(ed, pprogram); if (machine) printf("SOURCE: %s\n", str ? str : ""); else if (str) printf(INDENT3 "source: \"%s\";\n", str); edje_edit_string_free(str); @@ -1105,7 +1105,7 @@ program_details(Evas_Object *ed, const char *program) if (detail >= 1) { Eina_List *lst, *l; - Edje_Action_Type type = edje_edit_program_action_get(ed, program); + Edje_Action_Type type = edje_edit_program_action_get(ed, pprogram); switch (type) { case EDJE_ACTION_TYPE_ACTION_STOP: @@ -1113,18 +1113,18 @@ program_details(Evas_Object *ed, const char *program) else puts(INDENT3 "action: ACTION_STOP;"); break; case EDJE_ACTION_TYPE_STATE_SET: - str = edje_edit_program_state_get(ed, program); + str = edje_edit_program_state_get(ed, pprogram); if (machine) printf("ACTION: STATE_SET\nACTION-STATE: %s %g\n", - str, edje_edit_program_value_get(ed, program)); + str, edje_edit_program_value_get(ed, pprogram)); else printf(INDENT3 "action: STATE_SET \"%s\" %2.1f;\n", - str, edje_edit_program_value_get(ed, program)); + str, edje_edit_program_value_get(ed, pprogram)); edje_edit_string_free(str); break; case EDJE_ACTION_TYPE_SIGNAL_EMIT: - str = edje_edit_program_state_get(ed, program); - str2 = edje_edit_program_state2_get(ed, program); + str = edje_edit_program_state_get(ed, pprogram); + str2 = edje_edit_program_state2_get(ed, pprogram); if (machine) printf("ACTION: SIGNAL_EMIT\nACTION-SIGNAL: %s\n" "ACTION-SOURCE: %s\n", @@ -1146,7 +1146,7 @@ program_details(Evas_Object *ed, const char *program) //~ eina_strbuf_append(buf, I4"action: DRAG_VAL_PAGE TODO;\n"); //~ break; default: - ERR("Unhandled program action type %d", type); + ERR("Unhandled pprogram action type %d", type); break; } @@ -1154,11 +1154,11 @@ program_details(Evas_Object *ed, const char *program) { double from, range; - from = edje_edit_program_transition_time_get(ed, program); + from = edje_edit_program_transition_time_get(ed, pprogram); if (from > 0.0) { str = _transition_name_get - (edje_edit_program_transition_get(ed, program)); + (edje_edit_program_transition_get(ed, pprogram)); if (machine) printf("TRANSITION-NAME: %s\nTRANSITION-DURATION: %g\n", str, from); @@ -1166,8 +1166,8 @@ program_details(Evas_Object *ed, const char *program) /* do not free str! */ } - from = edje_edit_program_in_from_get(ed, program); - range = edje_edit_program_in_range_get(ed, program); + from = edje_edit_program_in_from_get(ed, pprogram); + range = edje_edit_program_in_range_get(ed, pprogram); if (FDIFF(from, 0.0) || FDIFF(range, 0.0)) { if (machine) @@ -1176,13 +1176,13 @@ program_details(Evas_Object *ed, const char *program) } } - lst = edje_edit_program_targets_get(ed, program); + lst = edje_edit_program_targets_get(ed, pprogram); EINA_LIST_FOREACH(lst, l, str) if (machine) printf("TARGET: %s\n", str); else printf(INDENT3 "target: \"%s\";\n", str); edje_edit_string_list_free(lst); - lst = edje_edit_program_afters_get(ed, program); + lst = edje_edit_program_afters_get(ed, pprogram); EINA_LIST_FOREACH(lst, l, str) if (machine) printf("AFTER: %s\n", str); else printf(INDENT3 "after: \"%s\";\n", str); diff --git a/libraries/edje/src/bin/edje_multisense_convert.c b/libraries/edje/src/bin/edje_multisense_convert.c index d37d218..62c2f67 100644 --- a/libraries/edje/src/bin/edje_multisense_convert.c +++ b/libraries/edje/src/bin/edje_multisense_convert.c @@ -12,7 +12,7 @@ # endif Edje_Sound_Encode * -_edje_multisense_encode(const char *filename, Edje_Sound_Sample *sample, double quality) +_edje_multisense_encode(const char *filename, Edje_Sound_Sample *sample, double quality __UNUSED__) { SF_INFO sfinfo; SNDFILE* sfile; diff --git a/libraries/edje/src/bin/epp/Makefile.in b/libraries/edje/src/bin/epp/Makefile.in index 2ef2e56..c1a8ee5 100644 --- a/libraries/edje/src/bin/epp/Makefile.in +++ b/libraries/edje/src/bin/epp/Makefile.in @@ -225,8 +225,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/edje/src/bin/epp/cppmain.c b/libraries/edje/src/bin/epp/cppmain.c index 45b67b5..ea0a0b2 100644 --- a/libraries/edje/src/bin/epp/cppmain.c +++ b/libraries/edje/src/bin/epp/cppmain.c @@ -44,7 +44,9 @@ main(int argc, char **argv) int argi = 1; /* Next argument to handle. */ struct cpp_options *opts = &options; enum cpp_token kind; - int got_text; +#if EPP_DEBUG + int got_text = 0; +#endif p = argv[0] + strlen(argv[0]); #ifndef __EMX__ @@ -76,7 +78,6 @@ main(int argc, char **argv) else if (!freopen(opts->out_fname, "w", stdout)) cpp_pfatal_with_name(&parse_in, opts->out_fname); - got_text = 0; for (i = 0;; i++) { kind = cpp_get_token(&parse_in); @@ -108,7 +109,9 @@ main(int argc, char **argv) case CPP_COMMA: case CPP_SEMICOLON: case CPP_3DOTS: - got_text = 1; +#if EPP_DEBUG + got_text = 1; +#endif continue; case CPP_COMMENT: @@ -130,7 +133,9 @@ main(int argc, char **argv) exit(FATAL_EXIT_CODE); } parse_in.limit = parse_in.token_buffer; - got_text = 0; +#if EPP_DEBUG + got_text = 0; +#endif } done: diff --git a/libraries/edje/src/examples/Makefile.am b/libraries/edje/src/examples/Makefile.am index 20e2c81..579f148 100644 --- a/libraries/edje/src/examples/Makefile.am +++ b/libraries/edje/src/examples/Makefile.am @@ -1,12 +1,15 @@ MAINTAINERCLEANFILES = Makefile.in -pkglibdir = $(datadir)/$(PACKAGE)/examples +examplesdir = $(datadir)/$(PACKAGE)/examples + if ENABLE_MULTISENSE MULTISENSE_EDC_FILE = multisense.edc SND_DIR = -sd $(srcdir) endif + #put here all EDCs one needs to the examples -EDCS = basic.edc \ +EDCS = \ + basic.edc \ swallow.edc \ text.edc \ table.edc \ @@ -20,26 +23,48 @@ EDCS = basic.edc \ sigtest.edc \ $(MULTISENSE_EDC_FILE) +.edc.edj: + $(edje_cc) -v -fd $(srcdir) -id $(srcdir) $(SND_DIR) $< $(builddir)/$(@F) + +EDJS = $(EDCS:%.edc=%.edj) + filesdir = $(datadir)/$(PACKAGE)/examples -files_DATA = +files_DATA = \ + $(EDCS) \ + bubble.png \ + red.png \ + test.png \ + Vera.ttf \ + edje-basic.c \ + edje-swallow.c \ + edje-text.c \ + edje-table.c \ + edje-box.c \ + edje-box2.c \ + edje-drag.c \ + edje-signals-messages.c \ + edje-color-class.c \ + edje-perspective.c \ + edje-animations.c \ + sigtest.c + +EXTRA_DIST = $(files_DATA) if BUILD_EXAMPLES AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ --DPACKAGE_EXAMPLES_DIR=\"$(datadir)/$(PACKAGE)/examples\" - -pkglib_PROGRAMS = + -I. \ + -I$(top_srcdir)/src/lib \ + -I$(top_srcdir)/src/lib/include \ + -DPACKAGE_BIN_DIR=\"$(bindir)\" \ + -DPACKAGE_LIB_DIR=\"$(libdir)\" \ + -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ + -DPACKAGE_EXAMPLES_DIR=\"$(datadir)/$(PACKAGE)/examples\" \ + @EDJE_CFLAGS@ -#the ones using ecore_evas follow -AM_CPPFLAGS += @EDJE_CFLAGS@ +files_DATA += $(EDJS) -pkglib_PROGRAMS += \ +examples_PROGRAMS = \ edje-basic \ edje-swallow \ edje-text \ @@ -55,53 +80,4 @@ pkglib_PROGRAMS += \ LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_LIBS@ -.edc.edj: - $(edje_cc) -v -id $(srcdir) $(SND_DIR) $< $(builddir)/$(@F) - -EDJS = $(EDCS:%.edc=%.edj) - -files_DATA += $(EDJS) - -endif # if BUILD_EXAMPLES - -if INSTALL_EXAMPLES - -#put here additional data when installing examples -files_DATA += \ - $(srcdir)/bubble.png \ - $(srcdir)/red.png \ - $(srcdir)/test.png \ - $(srcdir)/Vera.ttf - -files_DATA += \ - $(EDCS) \ - $(srcdir)/edje-basic.c \ - $(srcdir)/edje-swallow.c \ - $(srcdir)/edje-text.c \ - $(srcdir)/edje-table.c \ - $(srcdir)/edje-box.c \ - $(srcdir)/edje-box2.c \ - $(srcdir)/edje-drag.c \ - $(srcdir)/edje-signals-messages.c \ - $(srcdir)/edje-color-class.c \ - $(srcdir)/edje-perspective.c \ - $(srcdir)/edje-animations.c \ - $(srcdir)/sigtest.c endif - -EXTRA_DIST = $(EDCS) \ - $(srcdir)/bubble.png \ - $(srcdir)/red.png \ - $(srcdir)/test.png \ - $(srcdir)/edje-basic.c \ - $(srcdir)/edje-swallow.c \ - $(srcdir)/edje-text.c \ - $(srcdir)/edje-table.c \ - $(srcdir)/edje-box.c \ - $(srcdir)/edje-box2.c \ - $(srcdir)/edje-drag.c \ - $(srcdir)/edje-signals-messages.c \ - $(srcdir)/edje-color-class.c \ - $(srcdir)/edje-perspective.c \ - $(srcdir)/edje-animations.c \ - $(srcdir)/sigtest.c diff --git a/libraries/edje/src/examples/Makefile.in b/libraries/edje/src/examples/Makefile.in index bde628f..7f867e0 100644 --- a/libraries/edje/src/examples/Makefile.in +++ b/libraries/edje/src/examples/Makefile.in @@ -19,6 +19,7 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 @@ -34,7 +35,8 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@BUILD_EXAMPLES_TRUE@pkglib_PROGRAMS = edje-basic$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@am__append_1 = $(EDJS) +@BUILD_EXAMPLES_TRUE@examples_PROGRAMS = edje-basic$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ edje-swallow$(EXEEXT) edje-text$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ edje-table$(EXEEXT) edje-box$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ edje-box2$(EXEEXT) edje-drag$(EXEEXT) \ @@ -42,24 +44,6 @@ host_triplet = @host@ @BUILD_EXAMPLES_TRUE@ edje-color-class$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ edje-perspective$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ edje-animations$(EXEEXT) sigtest$(EXEEXT) -@BUILD_EXAMPLES_TRUE@am__append_1 = $(EDJS) - -#put here additional data when installing examples -@INSTALL_EXAMPLES_TRUE@am__append_2 = $(srcdir)/bubble.png \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/red.png $(srcdir)/test.png \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/Vera.ttf $(EDCS) \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-basic.c \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-swallow.c \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-text.c \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-table.c \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-box.c \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-box2.c \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-drag.c \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-signals-messages.c \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-color-class.c \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-perspective.c \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/edje-animations.c \ -@INSTALL_EXAMPLES_TRUE@ $(srcdir)/sigtest.c subdir = src/examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -77,8 +61,8 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)" -PROGRAMS = $(pkglib_PROGRAMS) +am__installdirs = "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)" +PROGRAMS = $(examples_PROGRAMS) edje_animations_SOURCES = edje-animations.c edje_animations_OBJECTS = edje-animations.$(OBJEXT) edje_animations_LDADD = $(LDADD) @@ -201,7 +185,6 @@ DATA = $(files_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -pkglibdir = $(datadir)/$(PACKAGE)/examples ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALSA_CFLAGS = @ALSA_CFLAGS@ @@ -296,8 +279,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ @@ -385,10 +366,13 @@ top_srcdir = @top_srcdir@ version_info = @version_info@ vimdir = @vimdir@ MAINTAINERCLEANFILES = Makefile.in +examplesdir = $(datadir)/$(PACKAGE)/examples @ENABLE_MULTISENSE_TRUE@MULTISENSE_EDC_FILE = multisense.edc @ENABLE_MULTISENSE_TRUE@SND_DIR = -sd $(srcdir) + #put here all EDCs one needs to the examples -EDCS = basic.edc \ +EDCS = \ + basic.edc \ swallow.edc \ text.edc \ table.edc \ @@ -402,36 +386,24 @@ EDCS = basic.edc \ sigtest.edc \ $(MULTISENSE_EDC_FILE) +EDJS = $(EDCS:%.edc=%.edj) filesdir = $(datadir)/$(PACKAGE)/examples -files_DATA = $(am__append_1) $(am__append_2) - -#the ones using ecore_evas follow -@BUILD_EXAMPLES_TRUE@AM_CPPFLAGS = -I. -I$(top_srcdir)/src/lib \ -@BUILD_EXAMPLES_TRUE@ -I$(top_srcdir)/src/lib/include \ -@BUILD_EXAMPLES_TRUE@ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -@BUILD_EXAMPLES_TRUE@ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -@BUILD_EXAMPLES_TRUE@ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ -@BUILD_EXAMPLES_TRUE@ -DPACKAGE_EXAMPLES_DIR=\"$(datadir)/$(PACKAGE)/examples\" \ -@BUILD_EXAMPLES_TRUE@ @EDJE_CFLAGS@ $(am__empty) -@BUILD_EXAMPLES_TRUE@LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_LIBS@ -@BUILD_EXAMPLES_TRUE@EDJS = $(EDCS:%.edc=%.edj) -EXTRA_DIST = $(EDCS) \ - $(srcdir)/bubble.png \ - $(srcdir)/red.png \ - $(srcdir)/test.png \ - $(srcdir)/edje-basic.c \ - $(srcdir)/edje-swallow.c \ - $(srcdir)/edje-text.c \ - $(srcdir)/edje-table.c \ - $(srcdir)/edje-box.c \ - $(srcdir)/edje-box2.c \ - $(srcdir)/edje-drag.c \ - $(srcdir)/edje-signals-messages.c \ - $(srcdir)/edje-color-class.c \ - $(srcdir)/edje-perspective.c \ - $(srcdir)/edje-animations.c \ - $(srcdir)/sigtest.c +files_DATA = $(EDCS) bubble.png red.png test.png Vera.ttf edje-basic.c \ + edje-swallow.c edje-text.c edje-table.c edje-box.c edje-box2.c \ + edje-drag.c edje-signals-messages.c edje-color-class.c \ + edje-perspective.c edje-animations.c sigtest.c $(am__append_1) +EXTRA_DIST = $(files_DATA) +@BUILD_EXAMPLES_TRUE@AM_CPPFLAGS = \ +@BUILD_EXAMPLES_TRUE@ -I. \ +@BUILD_EXAMPLES_TRUE@ -I$(top_srcdir)/src/lib \ +@BUILD_EXAMPLES_TRUE@ -I$(top_srcdir)/src/lib/include \ +@BUILD_EXAMPLES_TRUE@ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ +@BUILD_EXAMPLES_TRUE@ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ +@BUILD_EXAMPLES_TRUE@ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ +@BUILD_EXAMPLES_TRUE@ -DPACKAGE_EXAMPLES_DIR=\"$(datadir)/$(PACKAGE)/examples\" \ +@BUILD_EXAMPLES_TRUE@ @EDJE_CFLAGS@ +@BUILD_EXAMPLES_TRUE@LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_LIBS@ all: all-am .SUFFIXES: @@ -466,10 +438,10 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-pkglibPROGRAMS: $(pkglib_PROGRAMS) +install-examplesPROGRAMS: $(examples_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" - @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" + @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -486,23 +458,23 @@ install-pkglibPROGRAMS: $(pkglib_PROGRAMS) while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(examplesdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(examplesdir)$$dir" || exit $$?; \ } \ ; done -uninstall-pkglibPROGRAMS: +uninstall-examplesPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files + echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(examplesdir)" && rm -f $$files -clean-pkglibPROGRAMS: - @list='$(pkglib_PROGRAMS)'; test -n "$$list" || exit 0; \ +clean-examplesPROGRAMS: + @list='$(examples_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ @@ -701,7 +673,7 @@ check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)"; do \ + for dir in "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -732,7 +704,7 @@ maintainer-clean-generic: -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am -clean-am: clean-generic clean-libtool clean-pkglibPROGRAMS \ +clean-am: clean-examplesPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am @@ -753,13 +725,13 @@ info: info-am info-am: -install-data-am: install-filesDATA +install-data-am: install-examplesPROGRAMS install-filesDATA install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-pkglibPROGRAMS +install-exec-am: install-html: install-html-am @@ -799,28 +771,29 @@ ps: ps-am ps-am: -uninstall-am: uninstall-filesDATA uninstall-pkglibPROGRAMS +uninstall-am: uninstall-examplesPROGRAMS uninstall-filesDATA .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkglibPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-filesDATA \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-pkglibPROGRAMS \ +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-examplesPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am \ + install-examplesPROGRAMS install-exec install-exec-am \ + install-filesDATA install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-filesDATA \ - uninstall-pkglibPROGRAMS + tags uninstall uninstall-am uninstall-examplesPROGRAMS \ + uninstall-filesDATA -@BUILD_EXAMPLES_TRUE@.edc.edj: -@BUILD_EXAMPLES_TRUE@ $(edje_cc) -v -id $(srcdir) $(SND_DIR) $< $(builddir)/$(@F) +.edc.edj: + $(edje_cc) -v -fd $(srcdir) -id $(srcdir) $(SND_DIR) $< $(builddir)/$(@F) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libraries/edje/src/examples/Vera.ttf b/libraries/edje/src/examples/Vera.ttf new file mode 100644 index 0000000..58cd6b5 Binary files /dev/null and b/libraries/edje/src/examples/Vera.ttf differ diff --git a/libraries/edje/src/examples/lua_script.edc b/libraries/edje/src/examples/lua_script.edc index 24e8ebe..23c2926 100644 --- a/libraries/edje/src/examples/lua_script.edc +++ b/libraries/edje/src/examples/lua_script.edc @@ -104,6 +104,10 @@ collections { print("lua::init ... " .. D.val); edje.echo("lua::echo('hello world')"); + --// How to check the edje version. + version = edje.version(); + print("The edje version number is " .. version.major .. "." .. version.minor); + --// actually add the timer to call mycb in 1.23 sec D.tim = edje.timer(1.23, mycb); D.tra = edje.transition(5.0, mycb3); @@ -168,6 +172,14 @@ collections { print(D.text:text()); D.text:show(); + --// Put a few bogus API calls here to test the bogus API protection, + --// If the bogus API protection works, these should get ignored, but everything else runs smoothly. + --// Otherwise, the map is not done, the bubbles are not done, but the timers keep runinng. + bogus.failme(1, "two", D.rect); + temp = bogus.failme2(); + D.text.bogus(); + edje.bogus2(); + --// Fun with maps! D.map = edje.map(4); --// 4 is the only supported map size at the moment. --// These all do the same thing. diff --git a/libraries/edje/src/examples/multisense.edc b/libraries/edje/src/examples/multisense.edc new file mode 100644 index 0000000..5a3cf79 --- /dev/null +++ b/libraries/edje/src/examples/multisense.edc @@ -0,0 +1,139 @@ +#if 0 +collections { + sounds { + sample { + name: "sound_name1" RAW; + source: "8806__jovica__basic-sine-wave-g-1.wav"; +// source: "sample.wav"; +// source: "sample-flac10k.wav"; +// source: "sample-flac10k-mono.wav"; + } +// sample { +// name: "sound_name2" COMP; +// source: "sample.wav"; +// } +/* + sample { + name: "sound_name3" LOSSY 0.5; + source: "sample.wav"; + } + sample { + name: "sound_name4" AS_IS; + source: "sample.wav"; + } + */ + sample { +// name: "sound_name5" AS_IS; +// name: "sound_name5" COMP; + name: "sound_name5" RAW; +// source: "sample-ogg.wav"; + source: "sample-ogg-mono.wav"; +// source: "sample-ogg10k.wav"; +// source: "sample-flac10k.wav"; +// source: "sample-flac10k-mono.wav"; + } + sample { + name: "sound_name6" AS_IS; +// name: "sound_name6" LOSSY 45.0; + source: "sample-flac44k-mono.wav"; +// source: "sample-flac.wav"; +// source: "sample.ogg"; + } + tone: "tone-name" 2600; + } + group { + name: "example_group"; + parts { + part { + name: "sample_bg"; + type: RECT; + mouse_events: 1; + description { + state: "default" 0.0; + min: 300 150; + max: 300 150; + color: 200 200 200 100; + align: 0.5 0.0; + rel1 { + relative: 0.0 0.0; + } + } + } + part { + name: "sample_text"; + type: TEXT; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + rel1.to: "sample_bg"; + rel2.to: "sample_bg"; + text { + font: "Sans"; + size: 20; + text: "Play Sound Sample"; + } + } + } + part { + name: "tone_bg"; + type: RECT; + mouse_events: 1; + description { + state: "default" 0.0; + min: 300 150; + max: 300 150; + align: 0.5 0.0; + color: 180 180 180 100; + rel1 { + relative: 0.0 1.0; + to: "sample_bg"; + } + } + } + part { + name: "tone_text"; + type: TEXT; + mouse_events: 1; + repeat_events : 1; + description { + state: "default" 0.0; + rel1.to: "tone_bg"; + rel2.to: "tone_bg"; + text { + font: "Sans"; + size: 20; + text: "Play Tone"; + } + } + } + programs { + program { + name: "click_sample1"; + signal: "mouse,down,1"; + source: "sample_bg"; + action: PLAY_SAMPLE "sound_name1" 1.0; + } + program { + name: "click_sample2"; + signal: "mouse,down,2"; + source: "sample_bg"; + action: PLAY_SAMPLE "sound_name5" 1.0; + } + program { + name: "click_sample3"; + signal: "mouse,down,3"; + source: "sample_bg"; + action: PLAY_SAMPLE "sound_name6" 1.0; + } + program { + name: "click_tone"; + signal: "mouse,down,1"; + source: "tone_bg"; + action: PLAY_TONE "tone-name" 0.1; + } + } + } + } +} +#endif diff --git a/libraries/edje/src/examples/signals-messages.edc b/libraries/edje/src/examples/signals-messages.edc index 45d9c58..b251368 100644 --- a/libraries/edje/src/examples/signals-messages.edc +++ b/libraries/edje/src/examples/signals-messages.edc @@ -105,10 +105,10 @@ collections { if ((type == MSG_INT_SET) && (id == MSG_COLOR)) { new r, g, b, a; - r = getarg(3); - g = getarg(4); - b = getarg(5); - a = getarg(6); + r = getarg(2); + g = getarg(3); + b = getarg(4); + a = getarg(5); set_color_class("cc", r, g, b, a); } diff --git a/libraries/edje/src/lib/Edje.h b/libraries/edje/src/lib/Edje.h index c8094b4..6413014 100644 --- a/libraries/edje/src/lib/Edje.h +++ b/libraries/edje/src/lib/Edje.h @@ -377,6 +377,13 @@ part of Edje's API: @author Sebastian Dransfeld @author Tom Hacohen @author Aharon Hillel +@author Shilpa Singh +@author Mike Blumenkrantz +@author billiob (Boris Faure) +@author Govindaraju SM +@author Prince Kumar Dubey +@author David Seikel Please contact to get in contact with the developers and maintainers. @@ -472,7 +479,7 @@ extern "C" { #endif #define EDJE_VERSION_MAJOR 1 -#define EDJE_VERSION_MINOR 0 +#define EDJE_VERSION_MINOR 2 typedef struct _Edje_Version { @@ -794,7 +801,7 @@ typedef enum _Edje_External_Param_Flags EDJE_EXTERNAL_PARAM_FLAGS_STATE) /**< Convenience flag that sets property as GET, SET and STATE. */ } Edje_External_Param_Flags; -typedef enum +typedef enum _Edje_Input_Panel_Layout { EDJE_INPUT_PANEL_LAYOUT_NORMAL, /**< Default layout */ EDJE_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */ @@ -804,7 +811,10 @@ typedef enum EDJE_INPUT_PANEL_LAYOUT_IP, /**< IP layout */ EDJE_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */ EDJE_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */ - EDJE_INPUT_PANEL_LAYOUT_INVALID + EDJE_INPUT_PANEL_LAYOUT_INVALID, /**< Never use this */ + EDJE_INPUT_PANEL_LAYOUT_HEX, /**< Hexadecimal layout @since 1.2 */ + EDJE_INPUT_PANEL_LAYOUT_TERMINAL, /**< Command-line terminal layout @since 1.2 */ + EDJE_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */ } Edje_Input_Panel_Layout; /** @@ -1650,8 +1660,21 @@ EAPI void edje_box_layout_register (const char *name, Evas_Object * } * * @endcode + * + * @note You can get a callback every time edje re-calculates the object + * (either due to animation or some kind of signal or input). This is called + * in-line just after the recalculation has occured. It is a good idea not + * to go and delete or alter the object inside this callbacks, simply make + * a note that the recalculation has taken place and then do somethnig about + * it outside the callback. to register a callback use code like: + * + * @code + * evas_object_smart_callback_add(edje_obj, "recalc", my_cb, my_cb_data); + * @endcode + * + * @see evas_object_smart_callback_add() * - * @note before creating the first Edje object in your code, remember + * @note Before creating the first Edje object in your code, remember * to initialize the library, with edje_init(), or unexpected behavior * might occur. */ @@ -2757,12 +2780,15 @@ EAPI Eina_Bool edje_object_part_text_cursor_is_visible_format_get(const E /** * @brief Returns the content (char) at the cursor position. * @see evas_textblock_cursor_content_get + * + * You must free the return (if not NULL) after you are done with it. * * @param obj A valid Evas_Object handle * @param part The part name * @param cur The cursor to use + * @return The character string pointed to (may be a multi-byte utf8 sequence) terminated by a nul byte. */ -EAPI const char *edje_object_part_text_cursor_content_get (const Evas_Object *obj, const char *part, Edje_Cursor cur); +EAPI char *edje_object_part_text_cursor_content_get (const Evas_Object *obj, const char *part, Edje_Cursor cur); /** * @brief Sets the cursor position to the given value @@ -2941,7 +2967,9 @@ EAPI Eina_Bool edje_object_part_swallow (Evas_Object *obj, const c * * Causes the edje to regurgitate a previously swallowed object. :) * - * @note @p obj_swallow will @b not be deleted. + * @note @p obj_swallow will @b not be deleted or hidden. + * @note @p obj_swallow may appear shown on the evas depending on its state when + * it got unswallowed. Make sure you delete it or hide it if you do not want it to. */ EAPI void edje_object_part_unswallow (Evas_Object *obj, Evas_Object *obj_swallow); diff --git a/libraries/edje/src/lib/Makefile.in b/libraries/edje/src/lib/Makefile.in index cf73390..e67d90c 100644 --- a/libraries/edje/src/lib/Makefile.in +++ b/libraries/edje/src/lib/Makefile.in @@ -230,8 +230,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/edje/src/lib/edje_cache.c b/libraries/edje/src/lib/edje_cache.c index a8b355f..0ce6b30 100644 --- a/libraries/edje/src/lib/edje_cache.c +++ b/libraries/edje/src/lib/edje_cache.c @@ -128,18 +128,11 @@ _edje_file_coll_open(Edje_File *edf, const char *coll) } static Edje_File * -_edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret) +_edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, time_t mtime) { Edje_File *edf; Edje_Part_Collection *edc; Eet_File *ef; - struct stat st; - - if (stat(file, &st) != 0) - { - *error_ret = EDJE_LOAD_ERROR_DOES_NOT_EXIST; - return NULL; - } ef = eet_open(file, EET_FILE_MODE_READ); if (!ef) @@ -156,7 +149,7 @@ _edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Co } edf->ef = ef; - edf->mtime = st.st_mtime; + edf->mtime = mtime; if (edf->version != EDJE_FILE_VERSION) { @@ -262,7 +255,7 @@ open_new: if (!_edje_file_hash) _edje_file_hash = eina_hash_string_small_new(NULL); - edf = _edje_file_open(file, coll, error_ret, edc_ret); + edf = _edje_file_open(file, coll, error_ret, edc_ret, st.st_mtime); if (!edf) return NULL; diff --git a/libraries/edje/src/lib/edje_calc.c b/libraries/edje/src/lib/edje_calc.c index d9fd51d..213e266 100644 --- a/libraries/edje/src/lib/edje_calc.c +++ b/libraries/edje/src/lib/edje_calc.c @@ -8,7 +8,8 @@ static void _edje_part_recalc_single(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *center, Edje_Real_Part *light, Edje_Real_Part *persp, Edje_Real_Part *rel1_to_x, Edje_Real_Part *rel1_to_y, Edje_Real_Part *rel2_to_x, Edje_Real_Part *rel2_to_y, - Edje_Real_Part *confine_to, Edje_Calc_Params *params); + Edje_Real_Part *confine_to, Edje_Calc_Params *params, + FLOAT_T pos); void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2) @@ -115,6 +116,7 @@ _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T ep->description_pos = npos; ed->dirty = 1; + ed->recalc_call = 1; #ifdef EDJE_CALC_CACHE ep->invalidate = 1; #endif @@ -304,6 +306,179 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, const char *name, return ret; } +static int +_edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps, Edje_Part_Description_Image *st, Edje_Part_Image_Id *imid) +{ + Edje_Image_Directory_Set_Entry *entry; + Edje_Image_Directory_Set *set = NULL; + Eina_List *l; + int w = 0; + int h = 0; + int id; + + if (!st && !imid) + return -1; + + if (st && !st->image.set) + return st->image.id; + + if (imid && !imid->set) + return imid->id; + + if (imid) + id = imid->id; + else + id = st->image.id; + + evas_object_geometry_get(obj, NULL, NULL, &w, &h); + + if (eps && *eps) + { + if ((*eps)->id == id) + set = (*eps)->set; + + if (set) + if ((*eps)->entry->size.min.w <= w && w <= (*eps)->entry->size.max.w) + if ((*eps)->entry->size.min.h <= h && h <= (*eps)->entry->size.max.h) + return (*eps)->entry->id; + } + + if (!set) + set = ed->file->image_dir->sets + id; + + EINA_LIST_FOREACH(set->entries, l, entry) + { + if (entry->size.min.w <= w && w <= entry->size.max.w) + if (entry->size.min.h <= h && h <= entry->size.max.h) + { + if (eps) + { + if (!*eps) + *eps = calloc(1, sizeof (Edje_Real_Part_Set)); + + if (*eps) + { + (*eps)->entry = entry; + (*eps)->set = set; + (*eps)->id = id; + } + } + return entry->id; + } + } + + return -1; +} + +static void +_edje_real_part_image_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T pos) +{ + int image_id; + int image_count, image_num; + + image_id = _edje_image_find(ep->object, ed, + &ep->param1.set, + (Edje_Part_Description_Image*) ep->param1.description, + NULL); + if (image_id < 0) + { + Edje_Image_Directory_Entry *ie; + + if (!ed->file->image_dir) ie = NULL; + else ie = ed->file->image_dir->entries + (-image_id) - 1; + if ((ie) && + (ie->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) && + (ie->entry)) + { + evas_object_image_file_set(ep->object, ie->entry, NULL); + } + } + else + { + image_count = 2; + if (ep->param2) + image_count += ((Edje_Part_Description_Image*) ep->param2->description)->image.tweens_count; + image_num = TO_INT(MUL(pos, SUB(FROM_INT(image_count), + FROM_DOUBLE(0.5)))); + if (image_num > (image_count - 1)) + image_num = image_count - 1; + if (image_num == 0) + { + image_id = _edje_image_find(ep->object, ed, + &ep->param1.set, + (Edje_Part_Description_Image*) ep->param1.description, + NULL); + } + else + if (ep->param2) + { + if (image_num == (image_count - 1)) + { + image_id = _edje_image_find(ep->object, ed, + &ep->param2->set, + (Edje_Part_Description_Image*) ep->param2->description, + NULL); + } + else + { + Edje_Part_Image_Id *imid; + + imid = ((Edje_Part_Description_Image*) ep->param2->description)->image.tweens[image_num - 1]; + image_id = _edje_image_find(ep->object, ed, NULL, NULL, imid); + } + } + if (image_id < 0) + { + ERR("¨Part \"%s\" has description, " + "\"%s\" %3.3f with a missing image id!!!", + ep->part->name, + ep->param1.description->state.name, + ep->param1.description->state.value); + } + else + { + char buf[1024]; + + /* Replace snprint("edje/images/%i") == memcpy + itoa */ +#define IMAGES "edje/images/" + memcpy(buf, IMAGES, strlen(IMAGES)); + eina_convert_itoa(image_id, buf + strlen(IMAGES)); /* No need to check length as 2³² need only 10 characteres. */ + + evas_object_image_file_set(ep->object, ed->file->path, buf); + if (evas_object_image_load_error_get(ep->object) != EVAS_LOAD_ERROR_NONE) + { + ERR("Error loading image collection \"%s\" from " + "file \"%s\". Missing EET Evas loader module?", + buf, ed->file->path); + switch (evas_object_image_load_error_get(ep->object)) + { + case EVAS_LOAD_ERROR_GENERIC: + ERR("Error type: EVAS_LOAD_ERROR_GENERIC"); + break; + case EVAS_LOAD_ERROR_DOES_NOT_EXIST: + ERR("Error type: EVAS_LOAD_ERROR_DOES_NOT_EXIST"); + break; + case EVAS_LOAD_ERROR_PERMISSION_DENIED: + ERR("Error type: EVAS_LOAD_ERROR_PERMISSION_DENIED"); + break; + case EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED: + ERR("Error type: EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED"); + break; + case EVAS_LOAD_ERROR_CORRUPT_FILE: + ERR("Error type: EVAS_LOAD_ERROR_CORRUPT_FILE"); + break; + case EVAS_LOAD_ERROR_UNKNOWN_FORMAT: + ERR("Error type: EVAS_LOAD_ERROR_UNKNOWN_FORMAT"); + break; + default: + ERR("Error type: ???"); + break; + } + } + } + } +} + static void _edje_real_part_rel_to_apply(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part_State *state) { @@ -398,6 +573,7 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl _edje_external_recalc_apply(ed, ep, NULL, chosen_desc); ed->dirty = 1; + ed->recalc_call = 1; #ifdef EDJE_CALC_CACHE ep->invalidate = 1; #endif @@ -423,17 +599,23 @@ _edje_recalc(Edje *ed) return; } } - if (ed->postponed) return; - evas_object_smart_changed(ed->obj); - ed->postponed = 1; +// XXX: dont need this with current smart calc infra. remove me later +// if (ed->postponed) return; +// if (!ed->calc_only) + evas_object_smart_changed(ed->obj); +// XXX: dont need this with current smart calc infra. remove me later +// ed->postponed = 1; } void _edje_recalc_do(Edje *ed) { unsigned int i; + Eina_Bool need_calc; - ed->postponed = 0; +// XXX: dont need this with current smart calc infra. remove me later +// ed->postponed = 0; + need_calc = evas_object_smart_need_recalculate_get(ed->obj); evas_object_smart_need_recalculate_set(ed->obj, 0); if (!ed->dirty) return; ed->have_mapped_part = 0; @@ -460,6 +642,14 @@ _edje_recalc_do(Edje *ed) ed->all_part_change = 0; ed->text_part_change = 0; #endif + if (!ed->calc_only) + { + if (ed->recalc_call) + evas_object_smart_callback_call(ed->obj, "recalc", NULL); + } + else + evas_object_smart_need_recalculate_set(ed->obj, need_calc); + ed->recalc_call = 0; } void @@ -527,6 +717,7 @@ _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y) ep->drag->tmp.x = 0; ep->drag->need_reset = 0; ed->dirty = 1; + ed->recalc_call = 1; } if (ep->drag->y != y || ep->drag->tmp.y) @@ -535,6 +726,7 @@ _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y) ep->drag->tmp.y = 0; ep->drag->need_reset = 0; ed->dirty = 1; + ed->recalc_call = 1; } #ifdef EDJE_CALC_CACHE @@ -598,11 +790,13 @@ _edje_part_recalc_single_rel(Edje *ed, } static Edje_Internal_Aspect -_edje_part_recalc_single_aspect(Edje_Real_Part *ep, +_edje_part_recalc_single_aspect(Edje *ed, + Edje_Real_Part *ep, Edje_Part_Description_Common *desc, Edje_Calc_Params *params, int *minw, int *minh, - int *maxw, int *maxh) + int *maxw, int *maxh, + FLOAT_T pos) { Edje_Internal_Aspect apref = EDJE_ASPECT_PREFER_NONE; FLOAT_T aspect, amax, amin; @@ -612,6 +806,17 @@ _edje_part_recalc_single_aspect(Edje_Real_Part *ep, else aspect = DIV(FROM_INT(params->w), FROM_INT(params->h)); amax = desc->aspect.max; amin = desc->aspect.min; + if (desc->aspect.prefer == EDJE_ASPECT_PREFER_SOURCE && + ep->part->type == EDJE_PART_TYPE_IMAGE) + { + Evas_Coord w, h; + + /* We only need pose to find the right image that would be displayed, + and the right aspect ratio in that case */ + _edje_real_part_image_set(ed, ep, pos); + evas_object_image_size_get(ep->object, &w, &h); + amin = amax = DIV(FROM_INT(w), FROM_INT(h)); + } if ((ep->swallow_params.aspect.w > 0) && (ep->swallow_params.aspect.h > 0)) amin = amax = @@ -693,6 +898,7 @@ _edje_part_recalc_single_aspect(Edje_Real_Part *ep, if ((amin > ZERO) && (aspect < amin)) new_h = DIV(FROM_INT(params->w), amin); break; + case EDJE_ASPECT_PREFER_SOURCE: case EDJE_ASPECT_PREFER_BOTH: /* keep both dimensions in check */ /* adjust for max aspect (width / height) */ @@ -1255,6 +1461,7 @@ _edje_part_recalc_single_min(Edje_Part_Description_Common *desc, minh = tmp; break; } + case EDJE_ASPECT_PREFER_SOURCE: case EDJE_ASPECT_PREFER_BOTH: tmp = minh * params->w / h; if (tmp >= minw) @@ -1321,6 +1528,7 @@ _edje_part_recalc_single_max(Edje_Part_Description_Common *desc, maxh = tmp; break; } + case EDJE_ASPECT_PREFER_SOURCE: case EDJE_ASPECT_PREFER_BOTH: tmp = maxh * params->w / h; if (tmp <= maxw) @@ -1481,6 +1689,15 @@ _edje_part_recalc_single_min_max(FLOAT_T sc, if (ep->swallow_params.min.w > desc->min.w) *minw = ep->swallow_params.min.w; + if (ep->edje->calc_only) + { + if (desc->minmul.have) + { + FLOAT_T mmw = desc->minmul.w; + if (mmw != FROM_INT(1)) *minw = TO_INT(SCALE(mmw, *minw)); + } + } + /* XXX TODO: remove need of EDJE_INF_MAX_W, see edje_util.c */ if ((ep->swallow_params.max.w <= 0) || (ep->swallow_params.max.w == EDJE_INF_MAX_W)) @@ -1508,6 +1725,8 @@ _edje_part_recalc_single_min_max(FLOAT_T sc, *maxw = ep->swallow_params.max.w; } } + if ((ep->edje->calc_only) && (desc->minmul.have) && + (desc->minmul.w != FROM_INT(1))) *maxw = *minw; if (*maxw >= 0) { if (*maxw < *minw) *maxw = *minw; @@ -1518,6 +1737,16 @@ _edje_part_recalc_single_min_max(FLOAT_T sc, if (ep->swallow_params.min.h > desc->min.h) *minh = ep->swallow_params.min.h; + if (ep->edje->calc_only) + { + if (desc->minmul.have) + { + FLOAT_T mmh = desc->minmul.h; + if (mmh != FROM_INT(1)) *minh = TO_INT(SCALE(mmh, *minh)); + } + } + + /* XXX TODO: remove need of EDJE_INF_MAX_H, see edje_util.c */ if ((ep->swallow_params.max.h <= 0) || (ep->swallow_params.max.h == EDJE_INF_MAX_H)) @@ -1544,7 +1773,9 @@ _edje_part_recalc_single_min_max(FLOAT_T sc, if (ep->swallow_params.max.h < *maxh) *maxh = ep->swallow_params.max.h; } - } + } + if ((ep->edje->calc_only) && (desc->minmul.have) && + (desc->minmul.h != FROM_INT(1))) *maxh = *minh; if (*maxh >= 0) { if (*maxh < *minh) *maxh = *minh; @@ -1665,7 +1896,8 @@ _edje_part_recalc_single(Edje *ed, Edje_Real_Part *rel2_to_x, Edje_Real_Part *rel2_to_y, Edje_Real_Part *confine_to, - Edje_Calc_Params *params) + Edje_Calc_Params *params, + FLOAT_T pos) { Edje_Color_Class *cc = NULL; Edje_Internal_Aspect apref; @@ -1675,12 +1907,12 @@ _edje_part_recalc_single(Edje *ed, sc = ed->scale; if (sc == ZERO) sc = _edje_scale; _edje_part_recalc_single_min_max(sc, ep, desc, &minw, &minh, &maxw, &maxh); - + /* relative coords of top left & bottom right */ _edje_part_recalc_single_rel(ed, ep, desc, rel1_to_x, rel1_to_y, rel2_to_x, rel2_to_y, params); /* aspect */ - apref = _edje_part_recalc_single_aspect(ep, desc, params, &minw, &minh, &maxw, &maxh); + apref = _edje_part_recalc_single_aspect(ed, ep, desc, params, &minw, &minh, &maxw, &maxh, pos); /* size step */ _edje_part_recalc_single_step(desc, params); @@ -1855,77 +2087,13 @@ _edje_table_recalc_apply(Edje *ed __UNUSED__, } } -static int -_edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps, Edje_Part_Description_Image *st, Edje_Part_Image_Id *imid) -{ - Edje_Image_Directory_Set_Entry *entry; - Edje_Image_Directory_Set *set = NULL; - Eina_List *l; - int w = 0; - int h = 0; - int id; - - if (!st && !imid) - return -1; - - if (st && !st->image.set) - return st->image.id; - - if (imid && !imid->set) - return imid->id; - - if (imid) - id = imid->id; - else - id = st->image.id; - - evas_object_geometry_get(obj, NULL, NULL, &w, &h); - - if (eps && *eps) - { - if ((*eps)->id == id) - set = (*eps)->set; - - if (set) - if ((*eps)->entry->size.min.w <= w && w <= (*eps)->entry->size.max.w) - if ((*eps)->entry->size.min.h <= h && h <= (*eps)->entry->size.max.h) - return (*eps)->entry->id; - } - - if (!set) - set = ed->file->image_dir->sets + id; - - EINA_LIST_FOREACH(set->entries, l, entry) - { - if (entry->size.min.w <= w && w <= entry->size.max.w) - if (entry->size.min.h <= h && h <= entry->size.max.h) - { - if (eps) - { - if (!*eps) - *eps = calloc(1, sizeof (Edje_Real_Part_Set)); - - if (*eps) - { - (*eps)->entry = entry; - (*eps)->set = set; - (*eps)->id = id; - } - } - return entry->id; - } - } - - return -1; -} - static void _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Proxy *chosen_desc, FLOAT_T pos) { Edje_Real_Part *pp; int part_id = -1; - if (pos >= 0.5) + if (pos >= FROM_DOUBLE(0.5)) part_id = ((Edje_Part_Description_Proxy*) ep->param2->description)->proxy.id; else part_id = chosen_desc->proxy.id; @@ -1967,8 +2135,6 @@ _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj static void _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Image *chosen_desc, FLOAT_T pos) { - int image_id; - int image_count, image_num; FLOAT_T sc; sc = ed->scale; @@ -2003,107 +2169,7 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj else if (chosen_desc->image.border.no_fill == 2) evas_object_image_border_center_fill_set(ep->object, EVAS_BORDER_FILL_SOLID); - image_id = _edje_image_find(ep->object, ed, - &ep->param1.set, - (Edje_Part_Description_Image*) ep->param1.description, - NULL); - if (image_id < 0) - { - Edje_Image_Directory_Entry *ie; - - if (!ed->file->image_dir) ie = NULL; - else ie = ed->file->image_dir->entries + (-image_id) - 1; - if ((ie) && - (ie->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) && - (ie->entry)) - { - evas_object_image_file_set(ep->object, ie->entry, NULL); - } - } - else - { - image_count = 2; - if (ep->param2) - image_count += ((Edje_Part_Description_Image*) ep->param2->description)->image.tweens_count; - image_num = TO_INT(MUL(pos, SUB(FROM_INT(image_count), - FROM_DOUBLE(0.5)))); - if (image_num > (image_count - 1)) - image_num = image_count - 1; - if (image_num == 0) - { - image_id = _edje_image_find(ep->object, ed, - &ep->param1.set, - (Edje_Part_Description_Image*) ep->param1.description, - NULL); - } - else - if (ep->param2) - { - if (image_num == (image_count - 1)) - { - image_id = _edje_image_find(ep->object, ed, - &ep->param2->set, - (Edje_Part_Description_Image*) ep->param2->description, - NULL); - } - else - { - Edje_Part_Image_Id *imid; - - imid = ((Edje_Part_Description_Image*) ep->param2->description)->image.tweens[image_num - 1]; - image_id = _edje_image_find(ep->object, ed, NULL, NULL, imid); - } - } - if (image_id < 0) - { - ERR("¨Part \"%s\" has description, " - "\"%s\" %3.3f with a missing image id!!!", - ep->part->name, - ep->param1.description->state.name, - ep->param1.description->state.value); - } - else - { - char buf[1024]; - - /* Replace snprint("edje/images/%i") == memcpy + itoa */ -#define IMAGES "edje/images/" - memcpy(buf, IMAGES, strlen(IMAGES)); - eina_convert_itoa(image_id, buf + strlen(IMAGES)); /* No need to check length as 2³² need only 10 characteres. */ - - evas_object_image_file_set(ep->object, ed->file->path, buf); - if (evas_object_image_load_error_get(ep->object) != EVAS_LOAD_ERROR_NONE) - { - ERR("Error loading image collection \"%s\" from " - "file \"%s\". Missing EET Evas loader module?", - buf, ed->file->path); - switch (evas_object_image_load_error_get(ep->object)) - { - case EVAS_LOAD_ERROR_GENERIC: - ERR("Error type: EVAS_LOAD_ERROR_GENERIC"); - break; - case EVAS_LOAD_ERROR_DOES_NOT_EXIST: - ERR("Error type: EVAS_LOAD_ERROR_DOES_NOT_EXIST"); - break; - case EVAS_LOAD_ERROR_PERMISSION_DENIED: - ERR("Error type: EVAS_LOAD_ERROR_PERMISSION_DENIED"); - break; - case EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED: - ERR("Error type: EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED"); - break; - case EVAS_LOAD_ERROR_CORRUPT_FILE: - ERR("Error type: EVAS_LOAD_ERROR_CORRUPT_FILE"); - break; - case EVAS_LOAD_ERROR_UNKNOWN_FORMAT: - ERR("Error type: EVAS_LOAD_ERROR_UNKNOWN_FORMAT"); - break; - default: - ERR("Error type: ???"); - break; - } - } - } - } + _edje_real_part_image_set(ed, ep, pos); } static Edje_Real_Part * @@ -2299,13 +2365,15 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta Edje_Real_Part *pp; int part_id = -1; - if (pos >= 0.5) + if (pos >= FROM_DOUBLE(0.5)) part_id = ((Edje_Part_Description_Proxy*) ep->param2->description)->proxy.id; else part_id = ((Edje_Part_Description_Proxy*) chosen_desc)->proxy.id; pp = _edje_real_part_state_get(ed, ep, flags, part_id, NULL); +#ifdef EDJE_CALC_CACHE if (pp && pp->invalidate) proxy_invalidate = EINA_TRUE; +#endif } /* Recalc if needed the map center && light source */ @@ -2355,7 +2423,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta _edje_part_recalc_single(ed, ep, ep->param1.description, chosen_desc, center[0], light[0], persp[0], ep->param1.rel1_to_x, ep->param1.rel1_to_y, ep->param1.rel2_to_x, ep->param1.rel2_to_y, confine_to, - p1); + p1, pos); #ifdef EDJE_CALC_CACHE ep->param1.state = ed->state; @@ -2400,10 +2468,15 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta ((ep->part->type == EDJE_PART_TYPE_TEXT || ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) && ed->text_part_change)) #endif { - _edje_part_recalc_single(ed, ep, ep->param2->description, chosen_desc, center[1], light[1], persp[1], - ep->param2->rel1_to_x, ep->param2->rel1_to_y, ep->param2->rel2_to_x, ep->param2->rel2_to_y, + _edje_part_recalc_single(ed, ep, ep->param2->description, + chosen_desc, + center[1], light[1], persp[1], + ep->param2->rel1_to_x, + ep->param2->rel1_to_y, + ep->param2->rel2_to_x, + ep->param2->rel2_to_y, confine_to, - p2); + p2, pos); #ifdef EDJE_CALC_CACHE ep->param2->state = ed->state; #endif @@ -2449,7 +2522,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta p3->req.y = INTP(p1->req.y, p2->req.y, pos); p3->req.w = INTP(p1->req.w, p2->req.w, pos); p3->req.h = INTP(p1->req.h, p2->req.h, pos); - + if (ep->part->dragable.x) { p3->req_drag.x = INTP(p1->req_drag.x, p2->req_drag.x, pos); @@ -2543,11 +2616,11 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta } else if (p1->persp_on) { - memcpy(&p3->map.persp, &p1->map.persp, sizeof (p1->map.light)); + memcpy(&p3->map.persp, &p1->map.persp, sizeof (p1->map.persp)); } else if (p2->persp_on) { - memcpy(&p3->map.persp, &p2->map.persp, sizeof (p2->map.light)); + memcpy(&p3->map.persp, &p2->map.persp, sizeof (p2->map.persp)); } } diff --git a/libraries/edje/src/lib/edje_callbacks.c b/libraries/edje/src/lib/edje_callbacks.c index e0b0eae..2b02891 100644 --- a/libraries/edje/src/lib/edje_callbacks.c +++ b/libraries/edje/src/lib/edje_callbacks.c @@ -134,6 +134,7 @@ _edje_mouse_down_signal_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, voi _edje_emit(ed, buf, events->part->name); } ed->dirty = 1; + ed->recalc_call = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; #endif @@ -157,6 +158,7 @@ _edje_mouse_down_signal_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, voi rp->drag->val.y = dy; if (!ignored) _edje_emit(ed, "drag", rp->part->name); + ed->recalc_call = 1; ed->dirty = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; @@ -235,6 +237,7 @@ _edje_mouse_up_signal_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, void if (rp->drag->down.count == 0) { rp->drag->need_reset = 1; + ed->recalc_call = 1; ed->dirty = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; @@ -314,6 +317,7 @@ _edje_mouse_move_signal_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, voi rp->drag->tmp.x = ev->cur.canvas.x - rp->drag->down.x; if (rp->part->dragable.y) rp->drag->tmp.y = ev->cur.canvas.y - rp->drag->down.y; + ed->recalc_call = 1; ed->dirty = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; @@ -332,6 +336,7 @@ _edje_mouse_move_signal_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, voi rp->drag->val.y = dy; if (!ignored) _edje_emit(ed, "drag", rp->part->name); + ed->recalc_call = 1; ed->dirty = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; diff --git a/libraries/edje/src/lib/edje_data.c b/libraries/edje/src/lib/edje_data.c index 6b7b395..32b17b6 100644 --- a/libraries/edje/src/lib/edje_data.c +++ b/libraries/edje/src/lib/edje_data.c @@ -451,6 +451,9 @@ _edje_edd_init(void) EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "align.y", align.y, EDJE_T_FLOAT); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.w", fixed.w, EET_T_UCHAR); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.h", fixed.h, EET_T_UCHAR); \ + EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.have", minmul.have, EET_T_UCHAR); \ + EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.w", minmul.w, EDJE_T_FLOAT); \ + EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.h", minmul.h, EDJE_T_FLOAT); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.w", min.w, EET_T_INT); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.h", min.h, EET_T_INT); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "max.w", max.w, EET_T_INT); \ diff --git a/libraries/edje/src/lib/edje_edit.c b/libraries/edje/src/lib/edje_edit.c index 901a1b1..eec5e04 100644 --- a/libraries/edje/src/lib/edje_edit.c +++ b/libraries/edje/src/lib/edje_edit.c @@ -20,14 +20,18 @@ EAPI Eina_Error EDJE_EDIT_ERROR_GROUP_CURRENTLY_USED = 0 ; EAPI Eina_Error EDJE_EDIT_ERROR_GROUP_REFERENCED = 0; EAPI Eina_Error EDJE_EDIT_ERROR_GROUP_DOES_NOT_EXIST = 0; -/* Get ed(Edje*) from obj(Evas_Object*) */ -#define GET_ED_OR_RETURN(RET) \ - Edje *ed; \ +/* Get eed(Edje_Edit*) from obj(Evas_Object*) */ +#define GET_EED_OR_RETURN(RET) \ Edje_Edit *eed; \ if (!evas_object_smart_type_check_ptr(obj, _edje_edit_type)) \ return RET; \ eed = evas_object_smart_data_get(obj); \ - if (!eed) return RET; \ + if (!eed) return RET; + +/* Get ed(Edje*) from obj(Evas_Object*) */ +#define GET_ED_OR_RETURN(RET) \ + Edje *ed; \ + GET_EED_OR_RETURN(RET); \ ed = (Edje *)eed; /* Get rp(Edje_Real_Part*) from obj(Evas_Object*) and part(char*) */ @@ -388,72 +392,59 @@ _edje_real_part_free(Edje_Real_Part *rp) static Eina_Bool _edje_import_font_file(Edje *ed, const char *path, const char *entry) { + Eina_File *f; + Eet_File *eetf = NULL; void *fdata = NULL; long fsize = 0; /* Read font data from file */ - { - FILE *f = fopen(path, "rb"); - if (!f) - { - ERR("Unable to open font file \"%s\"", path); - return EINA_FALSE; - } + f = eina_file_open(path, 0); + if (!f) + { + ERR("Unable to open font file \"%s\"", path); + return EINA_FALSE; + } - fseek(f, 0, SEEK_END); - fsize = ftell(f); - rewind(f); - fdata = malloc(fsize); - if (!fdata) - { - ERR("Unable to alloc font file \"%s\"", path); - fclose(f); - return EINA_FALSE; - } - if (fread(fdata, fsize, 1, f) != 1) - { - free(fdata); - fclose(f); - ERR("Unable to read all of font file \"%s\"", path); - return EINA_FALSE; - } - fclose(f); - } + fsize = eina_file_size_get(f); + fdata = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!fdata) + { + ERR("Unable to map font file \"%s\"", path); + goto on_error; + } /* Write font to edje file */ - { - /* open the eet file */ - Eet_File *eetf = eet_open(ed->path, EET_FILE_MODE_READ_WRITE); - if (!eetf) - { - ERR("Unable to open \"%s\" for writing output", ed->path); - free(fdata); - return EINA_FALSE; - } + eetf = eet_open(ed->path, EET_FILE_MODE_READ_WRITE); + if (!eetf) + { + ERR("Unable to open \"%s\" for writing output", ed->path); + goto on_error; + } - if (eet_write(eetf, entry, fdata, fsize, 1) <= 0) - { - ERR("Unable to write font part \"%s\" as \"%s\" part entry", - path, entry); - eet_close(eetf); - free(fdata); - return EINA_FALSE; - } + if (eet_write(eetf, entry, fdata, fsize, 1) <= 0) + { + ERR("Unable to write font part \"%s\" as \"%s\" part entry", + path, entry); + goto on_error; + } - free(fdata); + /* write the edje_file */ + if (!_edje_edit_edje_file_save(eetf, ed->file)) + goto on_error; - /* write the edje_file */ - if (!_edje_edit_edje_file_save(eetf, ed->file)) - { - eet_delete(eetf, entry); - eet_close(eetf); - return EINA_FALSE; - } + eet_close(eetf); - eet_close(eetf); - } + eina_file_map_free(f, fdata); + eina_file_close(f); return EINA_TRUE; + + on_error: + if (eetf) eet_close(eetf); + eina_file_map_free(f, fdata); + eina_file_close(f); + + return EINA_FALSE; } @@ -4791,7 +4782,7 @@ edje_edit_image_id_get(Evas_Object *obj, const char *image_name) { eina_error_set(0); - GET_ED_OR_RETURN(-1); + GET_EED_OR_RETURN(-1); return _edje_image_id_find(eed, image_name); } @@ -5174,7 +5165,6 @@ EAPI Eina_Bool edje_edit_program_add(Evas_Object *obj, const char *name) { Edje_Program *epr; - Edje_Part_Collection *pc; eina_error_set(0); @@ -5191,7 +5181,7 @@ edje_edit_program_add(Evas_Object *obj, const char *name) if (!epr) return EINA_FALSE; //Add program to group - pc = ed->collection; + // pc = ed->collection; /* By default, source and signal are empty, so they fill in nocmp category */ ed->collection->programs.nocmp = realloc(ed->collection->programs.nocmp, @@ -5237,7 +5227,6 @@ edje_edit_program_del(Evas_Object *obj, const char *prog) Eina_List *l, *l_next; Edje_Program_Target *prt; Edje_Program_After *pa; - Edje_Part_Collection *pc; Edje_Program *p; Program_Script *ps, *old_ps; int id, i; @@ -5248,7 +5237,7 @@ edje_edit_program_del(Evas_Object *obj, const char *prog) GET_ED_OR_RETURN(EINA_FALSE); GET_EPR_OR_RETURN(EINA_FALSE); - pc = ed->collection; + //pc = ed->collection; //Remove program from programs list id = epr->id; @@ -5737,7 +5726,7 @@ edje_edit_program_action_set(Evas_Object *obj, const char *prog, Edje_Action_Typ eina_error_set(0); - GET_ED_OR_RETURN(EINA_FALSE); + GET_EED_OR_RETURN(EINA_FALSE); GET_EPR_OR_RETURN(EINA_FALSE); //printf("SET ACTION for program: %s [%d]\n", prog, action); @@ -6081,7 +6070,7 @@ edje_edit_script_set(Evas_Object *obj, const char *code) { eina_error_set(0); - GET_ED_OR_RETURN(); + GET_EED_OR_RETURN(); free(eed->embryo_source); free(eed->embryo_processed); @@ -6104,7 +6093,7 @@ edje_edit_script_program_get(Evas_Object *obj, const char *prog) eina_error_set(0); - GET_ED_OR_RETURN(NULL); + GET_EED_OR_RETURN(NULL); GET_EPR_OR_RETURN(NULL); if (epr->action != EDJE_ACTION_TYPE_SCRIPT) @@ -6124,7 +6113,7 @@ edje_edit_script_program_set(Evas_Object *obj, const char *prog, const char *cod eina_error_set(0); - GET_ED_OR_RETURN(); + GET_EED_OR_RETURN(); GET_EPR_OR_RETURN(); if (epr->action != EDJE_ACTION_TYPE_SCRIPT) @@ -6550,7 +6539,7 @@ almost_out: EAPI Eina_Bool edje_edit_script_compile(Evas_Object *obj) { - GET_ED_OR_RETURN(EINA_FALSE); + GET_EED_OR_RETURN(EINA_FALSE); if (!eed->script_need_recompile) return EINA_TRUE; @@ -6561,7 +6550,7 @@ edje_edit_script_compile(Evas_Object *obj) EAPI const Eina_List * edje_edit_script_error_list_get(Evas_Object *obj) { - GET_ED_OR_RETURN(NULL); + GET_EED_OR_RETURN(NULL); return eed->errors; } @@ -6643,7 +6632,7 @@ _edje_generate_source_of_program(Evas_Object *obj, const char *program, Eina_Str const char *api_name, *api_description; Edje_Program *epr; - GET_ED_OR_RETURN(EINA_FALSE); + GET_EED_OR_RETURN(EINA_FALSE); epr = _edje_program_get_byname(obj, program); @@ -6816,7 +6805,7 @@ _edje_generate_source_of_state(Evas_Object *obj, const char *part, const char *s if (pd->aspect.min || pd->aspect.max) BUF_APPENDF(I5"aspect: %g %g;\n", TO_DOUBLE(pd->aspect.min), TO_DOUBLE(pd->aspect.max)); if (pd->aspect.prefer) - BUF_APPENDF(I5"aspect_preference: %s;\n", prefers[pd->aspect.prefer]); + BUF_APPENDF(I5"aspect_preference: %s;\n", prefers[(int) pd->aspect.prefer]); if (pd->color_class) BUF_APPENDF(I5"color_class: \"%s\";\n", pd->color_class); @@ -7786,7 +7775,7 @@ edje_edit_print_internal_status(Evas_Object *obj) */ eina_error_set(0); - GET_ED_OR_RETURN(); + GET_EED_OR_RETURN(); _edje_generate_source(obj); /* diff --git a/libraries/edje/src/lib/edje_embryo.c b/libraries/edje/src/lib/edje_embryo.c index c89a4f4..1ad2377 100644 --- a/libraries/edje/src/lib/edje_embryo.c +++ b/libraries/edje/src/lib/edje_embryo.c @@ -674,6 +674,7 @@ _edje_embryo_fn_set_min_size(Embryo_Program *ep, Embryo_Cell *params) if (h < 0.0) h = 0.0; ed->collection->prop.min.w = w; ed->collection->prop.min.h = h; + ed->recalc_call = 1; ed->dirty = 1; #ifdef EDJE_CALC_CACHE ed->all_part_change = 1; @@ -701,6 +702,7 @@ _edje_embryo_fn_set_max_size(Embryo_Program *ep, Embryo_Cell *params) if (h < 0.0) h = 0.0; ed->collection->prop.max.w = w; ed->collection->prop.max.h = h; + ed->recalc_call = 1; ed->dirty = 1; #ifdef EDJE_CALC_CACHE ed->all_part_change = 1; diff --git a/libraries/edje/src/lib/edje_entry.c b/libraries/edje/src/lib/edje_entry.c index e25397a..563497d 100644 --- a/libraries/edje/src/lib/edje_entry.c +++ b/libraries/edje/src/lib/edje_entry.c @@ -2,9 +2,9 @@ #ifdef HAVE_ECORE_IMF static Eina_Bool _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx, char **text, int *cursor_pos); -static Eina_Bool _edje_entry_imf_event_commit_cb(void *data, int type, void *event); -static Eina_Bool _edje_entry_imf_event_preedit_changed_cb(void *data, int type, void *event); -static Eina_Bool _edje_entry_imf_event_delete_surrounding_cb(void *data, int type, void *event); +static void _edje_entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx, void *event_info); +static void _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx, void *event_info); +static void _edje_entry_imf_event_delete_surrounding_cb(void *data, Ecore_IMF_Context *ctx, void *event); #endif typedef struct _Entry Entry; @@ -39,10 +39,6 @@ struct _Entry #ifdef HAVE_ECORE_IMF Eina_Bool have_preedit : 1; Ecore_IMF_Context *imf_context; - - Ecore_Event_Handler *imf_ee_handler_commit; - Ecore_Event_Handler *imf_ee_handler_delete; - Ecore_Event_Handler *imf_ee_handler_changed; #endif }; @@ -272,20 +268,6 @@ _curs_update_from_curs(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__, Entr *cy += (ch / 2); } -static void -_curs_back(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__, - Entry *en __UNUSED__) -{ - evas_textblock_cursor_char_prev(c); -} - -static void -_curs_next(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__, - Entry *en __UNUSED__) -{ - evas_textblock_cursor_char_next(c); -} - static int _curs_line_last_get(Evas_Textblock_Cursor *c __UNUSED__, Evas_Object *o, Entry *en __UNUSED__) { @@ -415,6 +397,7 @@ static void _sel_extend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en) { if (!en->sel_end) return; + _edje_entry_imf_context_reset(en); _sel_enable(c, o, en); if (!evas_textblock_cursor_compare(c, en->sel_end)) return; evas_textblock_cursor_copy(c, en->sel_end); @@ -424,13 +407,13 @@ _sel_extend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en) en->selection = NULL; } _edje_emit(en->rp->edje, "selection,changed", en->rp->part->name); - _edje_entry_imf_context_reset(en); } static void _sel_preextend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en) { if (!en->sel_end) return; + _edje_entry_imf_context_reset(en); _sel_enable(c, o, en); if (!evas_textblock_cursor_compare(c, en->sel_start)) return; evas_textblock_cursor_copy(c, en->sel_start); @@ -440,7 +423,6 @@ _sel_preextend(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en) en->selection = NULL; } _edje_emit(en->rp->edje, "selection,changed", en->rp->part->name); - _edje_entry_imf_context_reset(en); } static void @@ -1107,6 +1089,10 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v } #endif + if ((!strcmp(ev->key, "Escape")) || + (!strcmp(ev->key, "Return")) || (!strcmp(ev->key, "KP_Enter"))) + _edje_entry_imf_context_reset(en); + old_cur_pos = evas_textblock_cursor_pos_get(en->cursor); control = evas_key_modifier_is_set(ev->modifiers, "Control"); @@ -1138,6 +1124,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v } _sel_clear(en->cursor, rp->object, en); _edje_emit(ed, "entry,key,up", rp->part->name); + _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); } else if (!strcmp(ev->key, "Down") || !strcmp(ev->key, "KP_Down")) { @@ -1157,6 +1144,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v } _sel_clear(en->cursor, rp->object, en); _edje_emit(ed, "entry,key,down", rp->part->name); + _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); } else if (!strcmp(ev->key, "Left") || !strcmp(ev->key, "KP_Left")) { @@ -1165,13 +1153,16 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v if (shift) _sel_start(en->cursor, rp->object, en); else _sel_clear(en->cursor, rp->object, en); } - _curs_back(en->cursor, rp->object, en); + evas_textblock_cursor_char_prev(en->cursor); + /* If control is pressed, go to the start of the word */ + if (control) evas_textblock_cursor_word_start(en->cursor); if (en->select_allow) { if (shift) _sel_extend(en->cursor, rp->object, en); } _sel_clear(en->cursor, rp->object, en); _edje_emit(ed, "entry,key,left", rp->part->name); + _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; } else if (!strcmp(ev->key, "Right") || !strcmp(ev->key, "KP_Right")) @@ -1181,20 +1172,31 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v if (shift) _sel_start(en->cursor, rp->object, en); else _sel_clear(en->cursor, rp->object, en); } - _curs_next(en->cursor, rp->object, en); + /* If control is pressed, go to the start of the word */ + if (control) evas_textblock_cursor_word_end(en->cursor); + evas_textblock_cursor_char_next(en->cursor); if (en->select_allow) { if (shift) _sel_extend(en->cursor, rp->object, en); } _sel_clear(en->cursor, rp->object, en); _edje_emit(ed, "entry,key,right", rp->part->name); + _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; } else if (!strcmp(ev->key, "BackSpace")) { - if (control) + if (control && !en->have_selection) { // del to start of previous word + _sel_start(en->cursor, rp->object, en); + + evas_textblock_cursor_char_prev(en->cursor); + evas_textblock_cursor_word_start(en->cursor); + + _sel_extend(en->cursor, rp->object, en); + + _range_del_emit(ed, en->cursor, rp->object, en); } else if ((alt) && (shift)) { @@ -1224,6 +1226,14 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v if (control) { // del to end of next word + _sel_start(en->cursor, rp->object, en); + + evas_textblock_cursor_word_end(en->cursor); + evas_textblock_cursor_char_next(en->cursor); + + _sel_extend(en->cursor, rp->object, en); + + _range_del_emit(ed, en->cursor, rp->object, en); } else if (shift) { @@ -1281,10 +1291,6 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v _edje_emit(ed, "entry,key,end", rp->part->name); ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; } - else if (!strcmp(ev->key, "Shift_L") || !strcmp(ev->key, "Shift_R")) - { - return; - } else if ((control) && (!strcmp(ev->key, "v"))) { _edje_emit(ed, "entry,paste,request", rp->part->name); @@ -1303,13 +1309,11 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v } else if ((control) && ((!strcmp(ev->key, "c") || (!strcmp(ev->key, "Insert"))))) { - // FIXME: copy - save selection _edje_emit(ed, "entry,copy,notify", rp->part->name); ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; } else if ((control) && ((!strcmp(ev->key, "x") || (!strcmp(ev->key, "m"))))) { - // FIXME: cut - save selection, delete seletion _edje_emit(ed, "entry,cut,notify", rp->part->name); ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; } @@ -1336,7 +1340,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v else if ((control) && (!strcmp(ev->key, "w"))) { _sel_clear(en->cursor, rp->object, en); - // select current word + // select current word? ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; } else if (!strcmp(ev->key, "Tab")) @@ -1361,10 +1365,10 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v _sel_clear(en->cursor, rp->object, en); info->change.insert.pos = evas_textblock_cursor_pos_get(en->cursor); - info->change.insert.content = eina_stringshare_add("<\t>"); + info->change.insert.content = eina_stringshare_add(""); //yy -// evas_textblock_cursor_format_prepend(en->cursor, "\t"); - _text_filter_format_prepend(en, en->cursor, "\t"); +// evas_textblock_cursor_format_prepend(en->cursor, "tab"); + _text_filter_format_prepend(en, en->cursor, "tab"); _anchors_get(en->cursor, rp->object, en); _edje_emit(ed, "entry,changed", rp->part->name); _edje_emit_full(ed, "entry,changed,user", rp->part->name, @@ -1427,19 +1431,20 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v info->change.insert.pos = evas_textblock_cursor_pos_get(en->cursor); - if (shift) + if (shift || + evas_object_textblock_legacy_newline_get(rp->object)) { //yy -// evas_textblock_cursor_format_prepend(en->cursor, "\n"); - _text_filter_format_prepend(en, en->cursor, "\n"); - info->change.insert.content = eina_stringshare_add("<\n>"); +// evas_textblock_cursor_format_prepend(en->cursor, "br"); + _text_filter_format_prepend(en, en->cursor, "br"); + info->change.insert.content = eina_stringshare_add("
"); } else { //yy // evas_textblock_cursor_format_prepend(en->cursor, "ps"); _text_filter_format_prepend(en, en->cursor, "ps"); - info->change.insert.content = eina_stringshare_add(""); + info->change.insert.content = eina_stringshare_add(""); } _anchors_get(en->cursor, rp->object, en); _edje_emit(ed, "entry,changed", rp->part->name); @@ -1499,7 +1504,6 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v if (!cursor_changed && (old_cur_pos != evas_textblock_cursor_pos_get(en->cursor))) _edje_emit(ed, "cursor,changed", rp->part->name); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_entry_real_part_configure(rp); } @@ -1576,6 +1580,8 @@ _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS } #endif + _edje_entry_imf_context_reset(en); + en->select_mod_start = EINA_FALSE; en->select_mod_end = EINA_FALSE; if (rp->part->select_mode == EDJE_ENTRY_SELECTION_MODE_DEFAULT) @@ -1690,10 +1696,12 @@ _edje_part_mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS } } if (evas_textblock_cursor_compare(tc, en->cursor)) - _edje_emit(rp->edje, "cursor,changed", rp->part->name); + { + _edje_emit(rp->edje, "cursor,changed", rp->part->name); + _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); + } evas_textblock_cursor_free(tc); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_entry_real_part_configure(rp); @@ -1733,6 +1741,8 @@ _edje_part_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED } #endif + _edje_entry_imf_context_reset(en); + tc = evas_object_textblock_cursor_new(rp->object); evas_textblock_cursor_copy(en->cursor, tc); evas_object_geometry_get(rp->object, &x, &y, &w, &h); @@ -1799,10 +1809,12 @@ _edje_part_mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED en->selecting = EINA_FALSE; } if (evas_textblock_cursor_compare(tc, en->cursor)) - _edje_emit(rp->edje, "cursor,changed", rp->part->name); + { + _edje_emit(rp->edje, "cursor,changed", rp->part->name); + _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); + } evas_textblock_cursor_free(tc); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_entry_real_part_configure(rp); } @@ -1893,7 +1905,10 @@ _edje_part_mouse_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS _sel_update(en->cursor, rp->object, en); } if (evas_textblock_cursor_compare(tc, en->cursor)) - _edje_emit(rp->edje, "cursor,changed", rp->part->name); + { + _edje_emit(rp->edje, "cursor,changed", rp->part->name); + _edje_emit(rp->edje, "cursor,changed,manual", rp->part->name); + } evas_textblock_cursor_free(tc); _edje_entry_imf_context_reset(en); @@ -2014,6 +2029,8 @@ _edje_entry_real_part_init(Edje_Real_Part *rp) evas_object_pass_events_set(en->cursor_fg, EINA_TRUE); _edje_subobj_register(en->rp->edje, en->cursor_fg); + evas_object_textblock_legacy_newline_set(rp->object, EINA_TRUE); + if (rp->part->entry_mode >= EDJE_ENTRY_EDIT_MODE_EDITABLE) { evas_object_show(en->cursor_bg); @@ -2055,9 +2072,9 @@ _edje_entry_real_part_init(Edje_Real_Part *rp) ecore_imf_context_retrieve_surrounding_callback_set(en->imf_context, _edje_entry_imf_retrieve_surrounding_cb, rp->edje); - en->imf_ee_handler_commit = ecore_event_handler_add(ECORE_IMF_EVENT_COMMIT, _edje_entry_imf_event_commit_cb, rp->edje); - en->imf_ee_handler_delete = ecore_event_handler_add(ECORE_IMF_EVENT_DELETE_SURROUNDING, _edje_entry_imf_event_delete_surrounding_cb, rp->edje); - en->imf_ee_handler_changed = ecore_event_handler_add(ECORE_IMF_EVENT_PREEDIT_CHANGED, _edje_entry_imf_event_preedit_changed_cb, rp->edje); + ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_COMMIT, _edje_entry_imf_event_commit_cb, rp->edje); + ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, _edje_entry_imf_event_delete_surrounding_cb, rp->edje); + ecore_imf_context_event_callback_add(en->imf_context, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, _edje_entry_imf_event_preedit_changed_cb, rp->edje); ecore_imf_context_input_mode_set(en->imf_context, rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD ? ECORE_IMF_INPUT_MODE_INVISIBLE : ECORE_IMF_INPUT_MODE_FULL); @@ -2094,23 +2111,9 @@ _edje_entry_real_part_shutdown(Edje_Real_Part *rp) { if (en->imf_context) { - if (en->imf_ee_handler_commit) - { - ecore_event_handler_del(en->imf_ee_handler_commit); - en->imf_ee_handler_commit = NULL; - } - - if (en->imf_ee_handler_delete) - { - ecore_event_handler_del(en->imf_ee_handler_delete); - en->imf_ee_handler_delete = NULL; - } - - if (en->imf_ee_handler_changed) - { - ecore_event_handler_del(en->imf_ee_handler_changed); - en->imf_ee_handler_changed = NULL; - } + ecore_imf_context_event_callback_del(en->imf_context, ECORE_IMF_CALLBACK_COMMIT, _edje_entry_imf_event_commit_cb); + ecore_imf_context_event_callback_del(en->imf_context, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, _edje_entry_imf_event_delete_surrounding_cb); + ecore_imf_context_event_callback_del(en->imf_context, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, _edje_entry_imf_event_preedit_changed_cb); ecore_imf_context_del(en->imf_context); en->imf_context = NULL; @@ -2189,7 +2192,7 @@ _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text) { Entry *en = rp->entry_data; if (!en) return; - + _edje_entry_imf_context_reset(en); // set text as markup _sel_clear(en->cursor, rp->object, en); evas_object_textblock_text_markup_set(rp->object, text); @@ -2228,6 +2231,8 @@ _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text) { Entry *en = rp->entry_data; if (!en) return; + _edje_entry_imf_context_reset(en); + // prepend markup @ cursor pos if (en->have_selection) _range_del(en->cursor, rp->object, en); @@ -2239,9 +2244,7 @@ _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text) _edje_emit(rp->edje, "entry,changed", rp->part->name); _edje_emit(rp->edje, "cursor,changed", rp->part->name); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); - _edje_entry_real_part_configure(rp); } @@ -2278,6 +2281,9 @@ _edje_entry_select_all(Edje_Real_Part *rp) { Entry *en = rp->entry_data; if (!en) return; + + _edje_entry_imf_context_reset(en); + _sel_clear(en->cursor, rp->object, en); _curs_start(en->cursor, rp->object, en); _sel_enable(en->cursor, rp->object, en); @@ -2285,7 +2291,6 @@ _edje_entry_select_all(Edje_Real_Part *rp) _curs_end(en->cursor, rp->object, en); _sel_extend(en->cursor, rp->object, en); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_entry_real_part_configure(rp); } @@ -2295,12 +2300,14 @@ _edje_entry_select_begin(Edje_Real_Part *rp) { Entry *en = rp->entry_data; if (!en) return; + + _edje_entry_imf_context_reset(en); + _sel_clear(en->cursor, rp->object, en); _sel_enable(en->cursor, rp->object, en); _sel_start(en->cursor, rp->object, en); _sel_extend(en->cursor, rp->object, en); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_entry_real_part_configure(rp); @@ -2311,9 +2318,9 @@ _edje_entry_select_extend(Edje_Real_Part *rp) { Entry *en = rp->entry_data; if (!en) return; + _edje_entry_imf_context_reset(en); _sel_extend(en->cursor, rp->object, en); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_entry_real_part_configure(rp); @@ -2560,13 +2567,14 @@ _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur) Entry *en = rp->entry_data; Evas_Textblock_Cursor *c = _cursor_get(rp, cur); if (!c) return EINA_FALSE; + + _edje_entry_imf_context_reset(en); + if (!evas_textblock_cursor_char_next(c)) { return EINA_FALSE; } _sel_update(c, rp->object, rp->entry_data); - - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_emit(rp->edje, "cursor,changed", rp->part->name); @@ -2580,6 +2588,9 @@ _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur) Entry *en = rp->entry_data; Evas_Textblock_Cursor *c = _cursor_get(rp, cur); if (!c) return EINA_FALSE; + + _edje_entry_imf_context_reset(en); + if (!evas_textblock_cursor_char_prev(c)) { if (evas_textblock_cursor_paragraph_prev(c)) goto ok; @@ -2588,7 +2599,6 @@ _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur) ok: _sel_update(c, rp->object, rp->entry_data); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_emit(rp->edje, "cursor,changed", rp->part->name); @@ -2604,6 +2614,9 @@ _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur) Evas_Coord lx, ly, lw, lh, cx, cy, cw, ch; int ln; if (!c) return EINA_FALSE; + + _edje_entry_imf_context_reset(en); + ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL); ln--; if (ln < 0) return EINA_FALSE; @@ -2620,7 +2633,6 @@ _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur) } _sel_update(c, rp->object, rp->entry_data); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_emit(rp->edje, "cursor,changed", rp->part->name); @@ -2636,6 +2648,9 @@ _edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur) Evas_Coord lx, ly, lw, lh, cx, cy, cw, ch; int ln; if (!c) return EINA_FALSE; + + _edje_entry_imf_context_reset(en); + ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL); ln++; if (!evas_object_textblock_line_number_geometry_get(rp->object, ln, @@ -2651,7 +2666,6 @@ _edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur) } _sel_update(c, rp->object, rp->entry_data); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_emit(rp->edje, "cursor,changed", rp->part->name); _edje_entry_real_part_configure(rp); @@ -2664,10 +2678,12 @@ _edje_entry_cursor_begin(Edje_Real_Part *rp, Edje_Cursor cur) Entry *en = rp->entry_data; Evas_Textblock_Cursor *c = _cursor_get(rp, cur); if (!c) return; + + _edje_entry_imf_context_reset(en); + evas_textblock_cursor_paragraph_first(c); _sel_update(c, rp->object, rp->entry_data); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_emit(rp->edje, "cursor,changed", rp->part->name); _edje_entry_real_part_configure(rp); @@ -2679,10 +2695,12 @@ _edje_entry_cursor_end(Edje_Real_Part *rp, Edje_Cursor cur) Entry *en = rp->entry_data; Evas_Textblock_Cursor *c = _cursor_get(rp, cur); if (!c) return; + + _edje_entry_imf_context_reset(en); + _curs_end(c, rp->object, rp->entry_data); _sel_update(c, rp->object, rp->entry_data); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_emit(rp->edje, "cursor,changed", rp->part->name); @@ -2715,10 +2733,11 @@ _edje_entry_cursor_line_begin(Edje_Real_Part *rp, Edje_Cursor cur) Entry *en = rp->entry_data; Evas_Textblock_Cursor *c = _cursor_get(rp, cur); if (!c) return; + _edje_entry_imf_context_reset(en); + evas_textblock_cursor_line_char_first(c); _sel_update(c, rp->object, rp->entry_data); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_emit(rp->edje, "cursor,changed", rp->part->name); @@ -2731,10 +2750,10 @@ _edje_entry_cursor_line_end(Edje_Real_Part *rp, Edje_Cursor cur) Entry *en = rp->entry_data; Evas_Textblock_Cursor *c = _cursor_get(rp, cur); if (!c) return; + _edje_entry_imf_context_reset(en); evas_textblock_cursor_line_char_last(c); _sel_update(c, rp->object, rp->entry_data); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_emit(rp->edje, "cursor,changed", rp->part->name); _edje_entry_real_part_configure(rp); @@ -2766,7 +2785,7 @@ _edje_entry_cursor_is_visible_format_get(Edje_Real_Part *rp, Edje_Cursor cur) return evas_textblock_cursor_format_is_visible_get(c); } -const char * +char * _edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur) { static char *s = NULL; @@ -2793,10 +2812,10 @@ _edje_entry_cursor_pos_set(Edje_Real_Part *rp, Edje_Cursor cur, int pos) if (evas_textblock_cursor_pos_get(c) == pos) return; + _edje_entry_imf_context_reset(en); evas_textblock_cursor_pos_set(c, pos); _sel_update(c, rp->object, rp->entry_data); - _edje_entry_imf_context_reset(en); _edje_entry_imf_cursor_info_set(en); _edje_emit(rp->edje, "cursor,changed", rp->part->name); _edje_entry_real_part_configure(rp); @@ -2891,43 +2910,33 @@ _edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx __UNU return EINA_TRUE; } -static Eina_Bool -_edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event) +static void +_edje_entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx __UNUSED__, void *event_info) { Edje *ed = data; Edje_Real_Part *rp = ed->focused_part; Entry *en; - Ecore_IMF_Event_Commit *ev = event; - Evas_Textblock_Cursor *tc; - Eina_Bool cursor_move = EINA_FALSE; + char *commit_str = event_info; + int start_pos; - if ((!rp) || (!ev) || (!ev->str)) return ECORE_CALLBACK_PASS_ON; + if ((!rp)) return; en = rp->entry_data; if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) - return ECORE_CALLBACK_PASS_ON; - - if (!en->imf_context) return ECORE_CALLBACK_PASS_ON; - if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON; + return; if (en->have_selection) { - if (strcmp(ev->str, "")) + if (strcmp(commit_str, "")) { /* delete selected characters */ - _range_del(en->cursor, rp->object, en); + _range_del_emit(ed, en->cursor, rp->object, en); _sel_clear(en->cursor, rp->object, en); } } - tc = evas_object_textblock_cursor_new(rp->object); - - /* calculate the cursor position to insert commit string */ - if (en->preedit_start) - evas_textblock_cursor_copy(en->preedit_start, tc); - else - evas_textblock_cursor_copy(en->cursor, tc); + start_pos = evas_textblock_cursor_pos_get(en->cursor); #ifdef HAVE_ECORE_IMF /* delete preedit characters */ @@ -2935,17 +2944,16 @@ _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event) _preedit_clear(en); #endif - if (evas_textblock_cursor_compare(en->cursor, tc)) - cursor_move = EINA_TRUE; if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) && _edje_password_show_last) _edje_entry_hide_visible_password(en->rp); if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) && _edje_password_show_last && (!en->preedit_start)) { - _text_filter_format_prepend(en, tc, "+ password=off"); - _text_filter_markup_prepend(en, tc, ev->str); - _text_filter_format_prepend(en, tc, "- password"); + _text_filter_format_prepend(en, en->cursor, "+ password=off"); + _text_filter_text_prepend(en, en->cursor, commit_str); + _text_filter_format_prepend(en, en->cursor, "- password"); + if (en->pw_timer) { ecore_timer_del(en->pw_timer); @@ -2955,51 +2963,54 @@ _edje_entry_imf_event_commit_cb(void *data, int type __UNUSED__, void *event) _password_timer_cb, en); } else - _text_filter_text_prepend(en, tc, ev->str); - - if (!cursor_move) - { - /* move cursor to the end of commit string */ - evas_textblock_cursor_copy(tc, en->cursor); - } + _text_filter_text_prepend(en, en->cursor, commit_str); - evas_textblock_cursor_free(tc); _edje_entry_imf_cursor_info_set(en); _anchors_get(en->cursor, rp->object, en); _edje_emit(rp->edje, "entry,changed", rp->part->name); - _edje_emit(ed, "entry,changed,user", rp->part->name); - _edje_emit(ed, "cursor,changed", rp->part->name); - return ECORE_CALLBACK_DONE; + { + Edje_Entry_Change_Info *info = calloc(1, sizeof(*info)); + info->insert = EINA_TRUE; + info->change.insert.pos = start_pos; + info->change.insert.content = eina_stringshare_add(commit_str); + info->change.insert.plain_length = + eina_unicode_utf8_get_len(info->change.insert.content); + _edje_emit_full(ed, "entry,changed,user", rp->part->name, + info, _free_entry_change_info); + _edje_emit(ed, "cursor,changed", rp->part->name); + } } -static Eina_Bool -_edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void *event) +static void +_edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx __UNUSED__, void *event_info __UNUSED__) { Edje *ed = data; Edje_Real_Part *rp = ed->focused_part; Entry *en; - Ecore_IMF_Event_Preedit_Changed *ev = event; int cursor_pos; int preedit_start_pos, preedit_end_pos; char *preedit_string; int i; Eina_Bool preedit_end_state = EINA_FALSE; + Eina_List *attrs = NULL, *l = NULL; + Ecore_IMF_Preedit_Attr *attr; + Eina_Strbuf *buf; - if ((!rp) || (!ev)) return ECORE_CALLBACK_PASS_ON; + if ((!rp)) return; en = rp->entry_data; if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) - return ECORE_CALLBACK_PASS_ON; - - if (!en->imf_context) return ECORE_CALLBACK_PASS_ON; + return; - if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON; + if (!en->imf_context) return; - ecore_imf_context_preedit_string_get(en->imf_context, &preedit_string, &cursor_pos); - if (!preedit_string) return ECORE_CALLBACK_PASS_ON; + ecore_imf_context_preedit_string_with_attributes_get(en->imf_context, + &preedit_string, + &attrs, &cursor_pos); + if (!preedit_string) return; if (!strcmp(preedit_string, "")) preedit_end_state = EINA_TRUE; @@ -3007,7 +3018,7 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void * if (en->have_selection && !preedit_end_state) { /* delete selected characters */ - _range_del(en->cursor, rp->object, en); + _range_del_emit(ed, en->cursor, rp->object, en); _sel_clear(en->cursor, rp->object, en); } @@ -3017,23 +3028,51 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void * preedit_start_pos = evas_textblock_cursor_pos_get(en->cursor); /* insert preedit character(s) */ - if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) && - _edje_password_show_last) + if (strlen(preedit_string) > 0) { - _text_filter_format_prepend(en, en->cursor, "+ password=off"); - _text_filter_markup_prepend(en, en->cursor, preedit_string); - _text_filter_format_prepend(en, en->cursor, "- password"); - if (en->pw_timer) + buf = eina_strbuf_new(); + if (attrs) { - ecore_timer_del(en->pw_timer); - en->pw_timer = NULL; + EINA_LIST_FOREACH(attrs, l, attr) + { + if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB1) + { + eina_strbuf_append(buf, ""); + eina_strbuf_append_n(buf, preedit_string + attr->start_index, + attr->end_index - attr->start_index); + eina_strbuf_append(buf, ""); + } + + else if (attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB2 || + attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB3) + { + eina_strbuf_append(buf, ""); + eina_strbuf_append_n(buf, preedit_string + attr->start_index, + attr->end_index - attr->start_index); + eina_strbuf_append(buf, ""); + } + } } - en->pw_timer = ecore_timer_add(_edje_password_show_last_timeout, - _password_timer_cb, en); - } - else - { - _text_filter_markup_prepend(en, en->cursor, preedit_string); + if ((rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD) && + _edje_password_show_last) + { + _edje_entry_hide_visible_password(en->rp); + _text_filter_format_prepend(en, en->cursor, "+ password=off"); + _text_filter_markup_prepend(en, en->cursor, eina_strbuf_string_get(buf)); + _text_filter_format_prepend(en, en->cursor, "- password"); + if (en->pw_timer) + { + ecore_timer_del(en->pw_timer); + en->pw_timer = NULL; + } + en->pw_timer = ecore_timer_add(_edje_password_show_last_timeout, + _password_timer_cb, en); + } + else + { + _text_filter_markup_prepend(en, en->cursor, eina_strbuf_string_get(buf)); + } + eina_strbuf_free(buf); } if (!preedit_end_state) @@ -3066,29 +3105,30 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, int type __UNUSED__, void * _edje_emit(rp->edje, "preedit,changed", rp->part->name); _edje_emit(ed, "cursor,changed", rp->part->name); - free(preedit_string); + /* delete attribute list */ + if (attrs) + { + EINA_LIST_FREE(attrs, attr) free(attr); + } - return ECORE_CALLBACK_DONE; + free(preedit_string); } -static Eina_Bool -_edje_entry_imf_event_delete_surrounding_cb(void *data, int type __UNUSED__, void *event) +static void +_edje_entry_imf_event_delete_surrounding_cb(void *data, Ecore_IMF_Context *ctx __UNUSED__, void *event_info) { Edje *ed = data; Edje_Real_Part *rp = ed->focused_part; Entry *en; - Ecore_IMF_Event_Delete_Surrounding *ev = event; + Ecore_IMF_Event_Delete_Surrounding *ev = event_info; Evas_Textblock_Cursor *del_start, *del_end; int cursor_pos; - if ((!rp) || (!ev)) return ECORE_CALLBACK_PASS_ON; + if ((!rp) || (!ev)) return; en = rp->entry_data; if ((!en) || (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) || (rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE)) - return ECORE_CALLBACK_PASS_ON; - - if (!en->imf_context) return ECORE_CALLBACK_PASS_ON; - if (en->imf_context != ev->ctx) return ECORE_CALLBACK_PASS_ON; + return; cursor_pos = evas_textblock_cursor_pos_get(en->cursor); @@ -3102,8 +3142,6 @@ _edje_entry_imf_event_delete_surrounding_cb(void *data, int type __UNUSED__, voi evas_textblock_cursor_free(del_start); evas_textblock_cursor_free(del_end); - - return ECORE_CALLBACK_DONE; } #endif diff --git a/libraries/edje/src/lib/edje_load.c b/libraries/edje/src/lib/edje_load.c index 644bb7c..8fe5842 100644 --- a/libraries/edje/src/lib/edje_load.c +++ b/libraries/edje/src/lib/edje_load.c @@ -262,6 +262,10 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g { Edje *ed; Evas *tev; + Edje_Real_Part *rp; + Eina_List *textblocks = NULL; + Eina_List *sources = NULL; + Eina_List *externals = NULL; Eina_List *old_swallows; unsigned int n; Eina_List *parts = NULL; @@ -323,7 +327,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g else { unsigned int i; - int errors = 0; /* colorclass stuff */ for (i = 0; i < ed->collection->parts_count; ++i) @@ -333,8 +336,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g ep = ed->collection->parts[i]; - if (errors) - break; /* Register any color classes in this parts descriptions. */ if ((ep->default_desc) && (ep->default_desc->color_class)) _edje_color_class_member_add(ed, ep->default_desc->color_class); @@ -353,12 +354,12 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g for (n = 0; n < ed->collection->parts_count; n++) { Edje_Part *ep; - Edje_Real_Part *rp; ep = ed->collection->parts[n]; rp = eina_mempool_malloc(_edje_real_part_mp, sizeof(Edje_Real_Part)); if (!rp) { + /* FIXME: destroy all allocated ressource, need to have a common exit point */ ed->load_error = EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; evas_event_thaw(tev); evas_event_thaw_eval(tev); @@ -373,7 +374,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g if (!rp->drag) { ed->load_error = EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - free(rp); + eina_mempool_free(_edje_real_part_mp, rp); evas_event_thaw(tev); evas_event_thaw_eval(tev); return 0; @@ -407,9 +408,12 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g rp->object = evas_object_text_add(ed->base.evas); evas_object_text_font_source_set(rp->object, ed->path); break; - case EDJE_PART_TYPE_SWALLOW: case EDJE_PART_TYPE_GROUP: + sources = eina_list_append(sources, rp); + case EDJE_PART_TYPE_SWALLOW: case EDJE_PART_TYPE_EXTERNAL: + if (ep->type == EDJE_PART_TYPE_EXTERNAL) + externals = eina_list_append(externals, rp); rp->object = evas_object_rectangle_add(ed->base.evas); evas_object_color_set(rp->object, 0, 0, 0, 0); evas_object_pass_events_set(rp->object, 1); @@ -417,13 +421,16 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g _edje_callbacks_focus_add(rp->object, ed, rp); break; case EDJE_PART_TYPE_TEXTBLOCK: + textblocks = eina_list_append(textblocks, rp); rp->object = evas_object_textblock_add(ed->base.evas); break; case EDJE_PART_TYPE_BOX: + sources = eina_list_append(sources, rp); rp->object = evas_object_box_add(ed->base.evas); rp->anim = _edje_box_layout_anim_new(rp->object); break; case EDJE_PART_TYPE_TABLE: + sources = eina_list_append(sources, rp); rp->object = evas_object_table_add(ed->base.evas); break; case EDJE_PART_TYPE_GRADIENT: @@ -463,7 +470,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g } if (n > 0) { - Edje_Real_Part *rp; Eina_List *l; ed->table_parts = malloc(sizeof(Edje_Real_Part *) * n); @@ -519,7 +525,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g } rp->swallow_params.min.w = 0; - rp->swallow_params.min.w = 0; + rp->swallow_params.min.h = 0; rp->swallow_params.max.w = -1; rp->swallow_params.max.h = -1; @@ -587,8 +593,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g _edje_var_init(ed); for (i = 0; i < ed->table_parts_size; i++) { - Edje_Real_Part *rp; - rp = ed->table_parts[i]; evas_object_show(rp->object); if (_edje_block_break(ed)) break; @@ -599,6 +603,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g _edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y); } } + ed->recalc_call = 1; ed->dirty = 1; #ifdef EDJE_CALC_CACHE ed->all_part_change = 1; @@ -606,11 +611,28 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g if ((evas_object_clipees_get(ed->base.clipper)) && (evas_object_visible_get(obj))) evas_object_show(ed->base.clipper); - + /* instantiate 'internal swallows' */ - for (i = 0; i < ed->table_parts_size; i++) + EINA_LIST_FREE(externals, rp) + { + Edje_Part_Description_External *external; + Evas_Object *child_obj; + + external = (Edje_Part_Description_External *) rp->part->default_desc; + child_obj = _edje_external_type_add(rp->part->source, + evas_object_evas_get(ed->obj), ed->obj, + external->external_params, rp->part->name); + if (child_obj) + { + _edje_real_part_swallow(rp, child_obj, EINA_TRUE); + rp->param1.external_params = _edje_external_params_parse(child_obj, + external->external_params); + _edje_external_recalc_apply(ed, rp, NULL, rp->chosen_description); + } + } + + EINA_LIST_FREE(sources, rp) { - Edje_Real_Part *rp; /* XXX: curr_item and pack_it don't require to be NULL since * XXX: they are just used when source != NULL and type == BOX, * XXX: and they're always set in this case, but GCC fails to @@ -620,8 +642,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g unsigned int item_count = 0; Edje_Pack_Element *pack_it = NULL; const char *source = NULL; - - rp = ed->table_parts[i]; switch (rp->part->type) { @@ -643,25 +663,9 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g } } break; - case EDJE_PART_TYPE_EXTERNAL: - { - Edje_Part_Description_External *external; - Evas_Object *child_obj; - - external = (Edje_Part_Description_External *) rp->part->default_desc; - child_obj = _edje_external_type_add(rp->part->source, - evas_object_evas_get(ed->obj), ed->obj, - external->external_params, rp->part->name); - if (child_obj) - { - _edje_real_part_swallow(rp, child_obj, EINA_TRUE); - rp->param1.external_params = _edje_external_params_parse(child_obj, - external->external_params); - _edje_external_recalc_apply(ed, rp, NULL, rp->chosen_description); - } - } - continue; default: + /* This list should only be filled by group, box or table, nothing else. */ + abort(); continue; } @@ -682,6 +686,11 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g { if (data == group_path_entry) { + ERR("recursive loop group '%s' already included inside part '%s' of group '%s' from file '%s'", + group_path_entry, rp->part->name, group, file); + textblocks = eina_list_free(textblocks); + externals = eina_list_free(externals); + sources = eina_list_free(sources); _edje_thaw(ed); _edje_unblock(ed); _edje_unref(ed); @@ -698,7 +707,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g return 0; } } - + child_obj = edje_object_add(ed->base.evas); group_path = eina_list_append(group_path, group_path_entry); if (rp->part->type == EDJE_PART_TYPE_GROUP) @@ -708,11 +717,16 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g if (!_edje_object_file_set_internal(child_obj, file, source, rp->part->name, group_path)) { + ERR("impossible to set part '%s' of group '%s' from file '%s' to '%s'", + rp->part->name, group_path_entry, file, source); + textblocks = eina_list_free(textblocks); + externals = eina_list_free(externals); + sources = eina_list_free(sources); _edje_thaw(ed); _edje_unblock(ed); _edje_unref(ed); _edje_file_del(ed); - + if (group_path_started) { while (group_path) @@ -794,56 +808,51 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g { const char *name; Evas_Object *swallow; - + name = eina_list_data_get(old_swallows); old_swallows = eina_list_remove_list(old_swallows, old_swallows); - + swallow = eina_list_data_get(old_swallows); old_swallows = eina_list_remove_list(old_swallows, old_swallows); - + edje_object_part_swallow(obj, name, swallow); eina_stringshare_del(name); } } - + _edje_recalc(ed); _edje_thaw(ed); _edje_unblock(ed); _edje_unref(ed); ed->load_error = EDJE_LOAD_ERROR_NONE; _edje_emit(ed, "load", NULL); - /* instantiate 'internal swallows' */ - for (i = 0; i < ed->table_parts_size; i++) - { - Edje_Real_Part *rp; - - rp = ed->table_parts[i]; - if ((rp->part->type == EDJE_PART_TYPE_TEXTBLOCK) && - (rp->part->default_desc)) - { - Edje_Part_Description_Text *text; - Edje_Style *stl = NULL; - const char *style; - - text = (Edje_Part_Description_Text *) rp->part->default_desc; - style = edje_string_get(&text->text.style); - if (style) - { - Eina_List *l; - - EINA_LIST_FOREACH(ed->file->styles, l, stl) - { - if ((stl->name) && (!strcmp(stl->name, style))) break; - stl = NULL; - } - } - if (stl) - { - if (evas_object_textblock_style_get(rp->object) != stl->style) - evas_object_textblock_style_set(rp->object, stl->style); - } - } - } + + /* instantiate 'internal textblock style' */ + EINA_LIST_FREE(textblocks, rp) + if (rp->part->default_desc) + { + Edje_Part_Description_Text *text; + Edje_Style *stl = NULL; + const char *style; + + text = (Edje_Part_Description_Text *) rp->part->default_desc; + style = edje_string_get(&text->text.style); + if (style) + { + Eina_List *l; + + EINA_LIST_FOREACH(ed->file->styles, l, stl) + { + if ((stl->name) && (!strcmp(stl->name, style))) break; + stl = NULL; + } + } + if (stl) + { + if (evas_object_textblock_style_get(rp->object) != stl->style) + evas_object_textblock_style_set(rp->object, stl->style); + } + } } _edje_entry_init(ed); evas_event_thaw(tev); diff --git a/libraries/edje/src/lib/edje_lua2.c b/libraries/edje/src/lib/edje_lua2.c index 2318af9..1d167e9 100644 --- a/libraries/edje/src/lib/edje_lua2.c +++ b/libraries/edje/src/lib/edje_lua2.c @@ -376,7 +376,7 @@ _elua_gc(lua_State *L) // Stack usage [-0, +0, e] // nil ~ static char * -_elua_push_name(lua_State *L, char *q, int index) // Stack usage [-0, +1, e or m] +_elua_push_name(lua_State *L, char *q, int idx) // Stack usage [-0, +1, e or m] { char *p = q; char temp = '\0'; @@ -387,8 +387,8 @@ _elua_push_name(lua_State *L, char *q, int index) // Stack usage [-0, +1, e or q++; temp = *q; *q = '\0'; - if (index > 0) - lua_getfield(L, index, p); // Stack usage [-0, +1, e] + if (idx > 0) + lua_getfield(L, idx, p); // Stack usage [-0, +1, e] else lua_pushstring(L, p); // Stack usage [-0, +1, m] *q = temp; @@ -614,6 +614,7 @@ static int _elua_echo(lua_State *L); static int _elua_date(lua_State *L); static int _elua_looptime(lua_State *L); static int _elua_seconds(lua_State *L); +static int _elua_version(lua_State *L); static int _elua_objgeom(lua_State *L); static int _elua_objpos(lua_State *L); @@ -649,6 +650,7 @@ static const struct luaL_reg _elua_edje_funcs [] = {"date", _elua_date}, // get date in a table {"looptime", _elua_looptime}, // get loop time {"seconds", _elua_seconds}, // get seconds + {"version", _elua_version}, // edje version // query edje - size, pos {"geom", _elua_objgeom}, // get while edje object geometry in canvas @@ -801,6 +803,25 @@ _elua_seconds(lua_State *L) // Stack usage [-0, +1, -] return 1; } +/** +@page luaref +@subsubsection edje_version edje:version() + +Retrieves the current edje version number. + +@returns A table with these fields: + - integer major: The edje version major number. + - integer minor: The edje version minor number. + +@since 1.2.0 +*/ +static int +_elua_version(lua_State *L) // Stack usage [-4, +5, em] +{ + _elua_ret(L, "%major %minor", EDJE_VERSION_MAJOR, EDJE_VERSION_MINOR); // Stack usage [-4, +5, em] + return 1; +} + //------------- /** @page luaref @@ -2936,7 +2957,9 @@ static int _elua_line_xy(lua_State *L) // Stack usage [ The lua evas map class includes functions for dealing with evas map objects. The evas map objects must have been previously created by lua using the lua -map object creation function edje:map(). +map object creation function edje:map(). The evas map system is complex, rather +than repeat the copious documentation here, please refer to the evas map +documentation. It has pictures and everything. B-) In the following, "map_object" is a place holder for any lua variable that holds a reference to an evas map object. @@ -2980,8 +3003,18 @@ static const struct luaL_reg _elua_evas_map_funcs [] = /** @page luaref -@subsubsection map_alpha map_object:alpha() +@subsubsection map_alpha map_object:alpha(alpha) + +Get (and optionally set) the maps alpha mode. + +Wraps evas_map_alpha_set(). +@param alpha The alpha mode. + +Note that the argument is optional, without it this function just queries the +current value. + +@return A boolean reflecting the alpha mode. @since 1.1.0 */ @@ -3008,6 +3041,11 @@ _elua_map_alpha(lua_State *L) // Stack usage [ @page luaref @subsubsection map_clockwise map_object:clockwise() +Get the maps clockwise state. + +Wraps evas_map_util_clockwise_get(). + +@return A boolean reflecting if the map is clockwise or not. @since 1.1.0 */ @@ -3025,8 +3063,30 @@ _elua_map_clockwise(lua_State *L) // Stack usage [ /** @page luaref -@subsubsection map_colour map_object:colour() +@subsubsection map_colour map_object:colour(index, r, g, b, a) +Gets or sets colour information for the map. There are two variations, with or +without the index. With the index parameter it gets (and optionally sets) the +colour of the point the index refers to, without it sets the colour for the +entire map. + +Wraps evas_map_point_color_set() or evas_map_util_points_color_set() + +@param index Which point to change the colour of. +@param r The new red value. +@param g The new green value. +@param b The new blue value. +@param a The new alpha value. + +Note that the arguments are optional, without them this function just queries +the current values. The colour arguments can be separate values, or named +fields in a table. + +@return A table with these fields: + - integer r: The red value. + - integer g: The green value. + - integer b: The blue value. + - integer a: The alpha value. @since 1.1.0 */ @@ -3073,8 +3133,24 @@ _elua_map_colour(lua_State *L) // Stack usage [ /** @page luaref -@subsubsection map_coord map_object:coord() +@subsubsection map_coord map_object:coord(index, x, y, z) + +Gets (and optionally sets) the 3D coordinates of a point on the map. + +Wraps evas_map_point_coord_set(). + +@param x The x coordinate of the point. +@param y The y coordinate of the point. +@param z The z coordinate of the point. + +Note that the arguments are optional, without them this function just queries +the current values. The coordinate arguments can be separate values, or named +fields in a table. +@return A table with these fields: + - integer x: The x coordinate of the point. + - integer y: The y coordinate of the point. + - integer z: The z coordinate of the point. @since 1.1.0 */ @@ -3104,8 +3180,21 @@ _elua_map_coord(lua_State *L) // Stack usage [ /** @page luaref -@subsubsection map_lighting map_object:lighting() +@subsubsection map_lighting map_object:lighting(x, y, z, r, g, b, ar, ag, ab) + +Set the 3D lights for the map. The three triplets can be tables. +Wraps evas_map_util_3d_lighting(). + +@param x The x coordinate of the light point. +@param y The y coordinate of the light point. +@param z The z coordinate of the light point. +@param r The new red value of the light point. +@param g The new green value of the light point. +@param b The new blue value of the light point. +@param ar The new red value of the ambient light. +@param ag The new green value of the ambient light. +@param ab The new blue value of the ambient light. @since 1.1.0 */ @@ -3133,8 +3222,18 @@ _elua_map_lighting(lua_State *L) // Stack usage [ /** @page luaref -@subsubsection map_perspective map_object:perspective() +@subsubsection map_perspective map_object:perspective(x, y, z, f) + +Apply a perspective transform to the map. + +Wraps evas_map_util_3d_perspective(). +The arguments can be separate values, or named fields in a table. + +@param x The perspective distance X coordinate +@param y The perspective distance Y coordinate +@param z The "0" z plane value +@param f The focal distance @since 1.1.0 */ @@ -3156,8 +3255,28 @@ _elua_map_perspective(lua_State *L) // Stack usage [ /** @page luaref -@subsubsection map_populate map_object:populate() +@subsubsection map_populate map_object:populate(...) + +Populate the points in a map, in one of three different methods. + +1) Wraps evas_map_util_points_populate_from_object(). + +@param source An evas object to copy points from. + +2) Wraps evas_map_util_paints_populate_from_object_full(). + +@param source An evas object to copy points from. +@param z Common Z coordinate hint for all four points. +3) Wraps evas_map_util_points_populate_from_geometry(). + +The first four arguments can be separate values, or named fields in a table. + +@param x Point X coordinate +@param y Point Y coordinate +@param w Width to use to calculate second and third points. +@param h Height to use to calculate third and fourth points. +@param z Common Z coordinate hint for all four points. @since 1.1.0 */ @@ -3210,8 +3329,17 @@ _elua_map_populate(lua_State *L) // Stack usage [ /** @page luaref -@subsubsection map_rotate map_object:rotate() +@subsubsection map_rotate map_object:rotate(degrees, x, y) + +Rotate the maps coordinates in 2D. +Wraps evas_map_util_rotate(). + +The coordinates can be separate values, or named fields in a table. + +@param degrees Amount of degrees from 0.0 to 360.0 to rotate. +@param x Rotation's centre horizontal position. +@param y Rotation's centre vertical position. @since 1.1.0 */ @@ -3238,8 +3366,21 @@ _elua_map_rotate(lua_State *L) // Stack usage [ /** @page luaref -@subsubsection map_rotate3d map_object:rotate3d() +@subsubsection map_rotate3d map_object:rotate3d(dx, dy, dz, x, y, z) + +Rotate the maps coordinates in 3D. +Wraps evas_map_util_3d_rotate(). + +The coordinates can be separate values, or named fields in a table. The same +with the rotation. + +@param dx Amount of degrees from 0.0 to 360.0 to rotate around X axis. +@param dy Amount of degrees from 0.0 to 360.0 to rotate around Y axis. +@param dz Amount of degrees from 0.0 to 360.0 to rotate around Z axis. +@param x Rotation's centre horizontal position. +@param y Rotation's centre vertical position. +@param z Rotation's centre vertical position. @since 1.1.0 */ @@ -3265,8 +3406,18 @@ _elua_map_rotate3d(lua_State *L) // Stack usage [ /** @page luaref -@subsubsection map_smooth map_object:smooth() +@subsubsection map_smooth map_object:smooth(smooth) + +Get (and optionally set) the maps smooth mode. + +Wraps evas_map_smooth_set(). + +@param smooth The smooth mode. + +Note that the argument is optional, without it this function just queries the +current value. +@return A boolean reflecting the smooth mode. @since 1.1.0 */ @@ -3291,8 +3442,23 @@ _elua_map_smooth(lua_State *L) // Stack usage [ /** @page luaref -@subsubsection map_uv map_object:uv() +@subsubsection map_uv map_object:uv(index, u, v) + +Gets (and optionally sets) the texture U and V texture coordinates for this map. + +Wraps evas_map_point_image_uv_set(). + +@param index Index of the point to change. Must be smaller than map size. +@param u The X coordinate within the image/texture source. +@param v The Y coordinate within the image/texture source. + +Note that the U,V arguments are optional, without them this function just queries +the current values. The coordinate arguments can be separate values, or named +fields in a table. +@return A table with these fields: + - number u: The X coordinate within the image/texture source. + - number v: The Y coordinate within the image/texture source. @since 1.1.0 */ @@ -3322,8 +3488,18 @@ _elua_map_uv(lua_State *L) // Stack usage [ /** @page luaref -@subsubsection map_zoom map_object:zoom() +@subsubsection map_zoom map_object:zoom(x, y, x, y) + +Apply a zoom to the map. + +Wraps evas_map_util_zoom(). +The arguments can be two separate values, or named fields in a table. + +@param x The horizontal zoom amount. +@param y The vertical zoom amount. +@param x The X coordinate of the centre of the zoom. +@param y The Y coordinate of the centre of the zoom. @since 1.1.0 */ @@ -3530,7 +3706,7 @@ _elua_text_font(lua_State *L) // Stack usage [ @page luaref @subsubsection text_text text_object:text(text) -Get (and optionally set) the actual tetx for this text object. +Get (and optionally set) the actual text for this text object. Wraps evas_object_text_text_set(). @@ -3569,25 +3745,80 @@ _elua_text_text(lua_State *L) // Stack usage [ //--------------------------------------------------------------------------// + +// A metatable and functions so that calling non existant API does not crash Lua scripts. + +static int _elua_bogan_nilfunc(lua_State *L); +static int _elua_bogan_index(lua_State *L); + +static const struct luaL_reg _elua_bogan_funcs [] = +{ + {"nilfunc", _elua_bogan_nilfunc}, // Just return a nil. + {"__index", _elua_bogan_index}, // Return the above func. + + {NULL, NULL} // end +}; + +static int +_elua_bogan_nilfunc(lua_State *L) +{ + lua_getglobal(L, "nil"); + return 1; +} + +static int +_elua_bogan_index(lua_State *L) +{ + const char *key; + + key = lua_tostring(L, 2); + LE("%s does not exist!", key); + lua_pushcfunction(L, _elua_bogan_nilfunc); + return 1; +} + +static void +_elua_bogan_protect(lua_State *L) // Stack usage [-3, +3, m] +{ + lua_pushnil(L); // Stack usage [-0, +1, -] + luaL_newmetatable(L, "bogan"); // Stack usage [-0, +1, m] + luaL_register(L, 0, _elua_bogan_funcs); // Stack usage [-1, +1, m] + lua_setmetatable(L, -2); // Stack usage [-1, +0, -] + lua_pop(L, 1); // Stack usage [-1, +0, -] +} + +//--------------------------------------------------------------------------// + // Brain dead inheritance thingy, built for speed. Kinda. Part 1. static void _elua_add_functions(lua_State *L, const char *api, const luaL_Reg *funcs, const char *meta, const char *parent, const char *base) // Stack usage [-3, +5, m] if inheriting [-6, +11, em] { + // Create an api table, fill it full of the methods. luaL_register(L, api, funcs); // Stack usage [-0, +1, m] + // Set the api metatable to the bogan metatable. + luaL_getmetatable(L, "bogan"); // Stack usage [-0, +1, -] + lua_setmetatable(L, -2); // Stack usage [-1, +0, -] + // Creat a meta metatable. luaL_newmetatable(L, meta); // Stack usage [-0, +1, m] + // Put the gc functions in the metatable. luaL_register(L, 0, _elua_edje_gc_funcs); // Stack usage [-1, +1, m] + // Create an __index entry in the metatable, make it point to the api table. lua_pushliteral(L, "__index"); // Stack usage [-0, +1, m] lua_pushvalue(L, -3); // Stack usage [-0, +1, -] lua_rawset(L, -3); // Stack usage [-2, +0, m] + // Later this metatable is used as the metatable for newly created objects of this class. if (base && parent) { // Inherit from base lua_getglobal(L, base); // Stack usage [-0, +1, e] + // Create a new parent metatable. luaL_newmetatable(L, parent); // Stack usage [-0, +1, m] + // Create an __index entry in the metatable, make it point to the base table. lua_pushliteral(L, "__index"); // Stack usage [-0, +1, m] lua_pushvalue(L, -3); // Stack usage [-0, +1, -] lua_rawset(L, -3); // Stack usage [-2, +0, m] + // Set the metatable for the api table to the parent metatable. lua_getglobal(L, api); // Stack usage [-0, +1, e] luaL_getmetatable(L, parent); // Stack usage [-0, +1, -] lua_setmetatable(L, -2); // Stack usage [-1, +0, -] @@ -3695,7 +3926,11 @@ _edje_lua2_script_init(Edje *ed) // Stack usage lua_call(L, 1, 0); // Stack usage [-2, +0, m] } + _elua_bogan_protect(L); // Stack usage [+3, -3, m] + luaL_register(L, _elua_edje_api, _elua_edje_funcs); // Stack usage [-0, +1, m] + luaL_getmetatable(L, "bogan"); // Stack usage [-0, +1, -] + lua_setmetatable(L, -2); // Stack usage [-1, +0, -] luaL_newmetatable(L, _elua_edje_meta); // Stack usage [-0, +1, m] luaL_register(L, 0, _elua_edje_gc_funcs); // Stack usage [-1, +1, m] @@ -3737,6 +3972,8 @@ _edje_lua2_script_init(Edje *ed) // Stack usage { int err; + /* This ends up pushing a function onto the stack for the lua_pcall() below to use. + * The function is the compiled code. */ err = luaL_loadbuffer(L, data, size, "edje_lua_script"); // Stack usage [-0, +1, m] if (err) { diff --git a/libraries/edje/src/lib/edje_main.c b/libraries/edje/src/lib/edje_main.c index cf443c7..5d011ad 100644 --- a/libraries/edje/src/lib/edje_main.c +++ b/libraries/edje/src/lib/edje_main.c @@ -22,10 +22,7 @@ edje_init(void) srand(time(NULL)); if (!eina_init()) - { - fprintf(stderr, "Edje: Eina init failed"); - return --_edje_init_count; - } + return --_edje_init_count; _edje_default_log_dom = eina_log_domain_register ("edje", EDJE_DEFAULT_LOG_COLOR); diff --git a/libraries/edje/src/lib/edje_message_queue.c b/libraries/edje/src/lib/edje_message_queue.c index 1a313a5..5628ccc 100644 --- a/libraries/edje/src/lib/edje_message_queue.c +++ b/libraries/edje/src/lib/edje_message_queue.c @@ -364,8 +364,8 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, } if (_injob > 0) { - if (_job_loss_timer) ecore_timer_del(_job_loss_timer); - _job_loss_timer = ecore_timer_add(0.001, _edje_job_loss_timer, NULL); + if (!_job_loss_timer) + _job_loss_timer = ecore_timer_add(0.001, _edje_job_loss_timer, NULL); } else { diff --git a/libraries/edje/src/lib/edje_module.c b/libraries/edje/src/lib/edje_module.c index effcee1..358295b 100644 --- a/libraries/edje/src/lib/edje_module.c +++ b/libraries/edje/src/lib/edje_module.c @@ -136,12 +136,12 @@ edje_available_modules_get(void) snprintf(tmp, sizeof (tmp), "%s/%s/" EDJE_MODULE_NAME, info->path, MODULE_ARCH #ifdef EDJE_EXTRA_MODULE_NAME - , ecore_file_file_get(info->path) + , info->path + info->name_start #endif ); if (ecore_file_exists(tmp)) - result = eina_list_append(result, eina_stringshare_add(ecore_file_file_get(info->path))); + result = eina_list_append(result, eina_stringshare_add(info->path + info->name_start)); } eina_iterator_free(it); diff --git a/libraries/edje/src/lib/edje_multisense.c b/libraries/edje/src/lib/edje_multisense.c index f9c7f91..f3324e7 100644 --- a/libraries/edje/src/lib/edje_multisense.c +++ b/libraries/edje/src/lib/edje_multisense.c @@ -351,8 +351,10 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c command.type.sample.speed = speed; size = write(command_pipe[1], &command, sizeof(command)); #else - ed = NULL; // warning shh - if (speed > 0) sample_name = NULL; // warning shh + // warning shh + (void) ed; + (void) sample_name; + (void) speed; #endif return (size == sizeof(Edje_Multisense_Sound_Action)); } @@ -371,8 +373,10 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const command.type.tone.duration = duration; size = write(command_pipe[1], &command, sizeof(command)); #else - ed = NULL; // warning shh - if (duration > 0) tone_name = NULL; // warning shh + // warning shh + (void) ed; + (void) duration; + (void) tone_name; #endif return (size == sizeof(Edje_Multisense_Sound_Action)); diff --git a/libraries/edje/src/lib/edje_private.h b/libraries/edje/src/lib/edje_private.h index cbb3e03..8bf18eb 100644 --- a/libraries/edje/src/lib/edje_private.h +++ b/libraries/edje/src/lib/edje_private.h @@ -192,7 +192,8 @@ typedef enum EDJE_ASPECT_PREFER_NONE, EDJE_ASPECT_PREFER_VERTICAL, EDJE_ASPECT_PREFER_HORIZONTAL, - EDJE_ASPECT_PREFER_BOTH + EDJE_ASPECT_PREFER_BOTH, + EDJE_ASPECT_PREFER_SOURCE } Edje_Internal_Aspect; struct _Edje_Perspective @@ -232,7 +233,7 @@ struct _Edje_Color struct _Edje_Aspect_Prefer { FLOAT_T min, max; - Edje_Internal_Aspect prefer; + char prefer; }; struct _Edje_Aspect @@ -834,6 +835,11 @@ struct _Edje_Part_Description_Common unsigned char w, h; /* width or height is fixed in side (cannot expand with Edje object size) */ } fixed; + struct { // only during recalc + unsigned char have; + FLOAT_T w, h; + } minmul; + Edje_Size min, max; Edje_Position step; /* size stepping by n pixels, 0 = none */ Edje_Aspect_Prefer aspect; @@ -1138,6 +1144,7 @@ struct _Edje unsigned int all_part_change : 1; #endif unsigned int have_mapped_part : 1; + unsigned int recalc_call : 1; }; struct _Edje_Calc_Params @@ -1915,7 +1922,7 @@ void _edje_entry_cursor_line_end(Edje_Real_Part *rp, Edje_Cursor cur); Eina_Bool _edje_entry_cursor_coord_set(Edje_Real_Part *rp, Edje_Cursor cur, int x, int y); Eina_Bool _edje_entry_cursor_is_format_get(Edje_Real_Part *rp, Edje_Cursor cur); Eina_Bool _edje_entry_cursor_is_visible_format_get(Edje_Real_Part *rp, Edje_Cursor cur); -const char *_edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur); +char *_edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur); void _edje_entry_cursor_pos_set(Edje_Real_Part *rp, Edje_Cursor cur, int pos); int _edje_entry_cursor_pos_get(Edje_Real_Part *rp, Edje_Cursor cur); void _edje_entry_input_panel_layout_set(Edje_Real_Part *rp, Edje_Input_Panel_Layout layout); diff --git a/libraries/edje/src/lib/edje_program.c b/libraries/edje/src/lib/edje_program.c index 505b6a2..d80c7c9 100644 --- a/libraries/edje/src/lib/edje_program.c +++ b/libraries/edje/src/lib/edje_program.c @@ -992,7 +992,7 @@ _edje_emit_full(Edje *ed, const char *sig, const char *src, void *data, void (*f break ; default: - fprintf(stderr, "SPANK SPANK SPANK !!!\nYou should never be here !\n"); + ERR("SPANK SPANK SPANK !!!\nYou should never be here !"); break; } } @@ -1621,6 +1621,7 @@ _edje_param_native_set(Edje_Real_Part *rp, const char *name, const Edje_External if (param->type != EDJE_EXTERNAL_PARAM_TYPE_DOUBLE) return EINA_FALSE; rp->drag->size.x = FROM_DOUBLE(CLAMP(param->d, 0.0, 1.0)); + rp->edje->recalc_call = 1; rp->edje->dirty = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; @@ -1633,6 +1634,7 @@ _edje_param_native_set(Edje_Real_Part *rp, const char *name, const Edje_External if (param->type != EDJE_EXTERNAL_PARAM_TYPE_DOUBLE) return EINA_FALSE; rp->drag->size.y = FROM_DOUBLE(CLAMP(param->d, 0.0, 1.0)); + rp->edje->recalc_call = 1; rp->edje->dirty = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; diff --git a/libraries/edje/src/lib/edje_util.c b/libraries/edje/src/lib/edje_util.c index dbb37a7..2205ba3 100644 --- a/libraries/edje/src/lib/edje_util.c +++ b/libraries/edje/src/lib/edje_util.c @@ -438,6 +438,7 @@ edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2 ed = eina_list_data_get(members); ed->dirty = 1; + ed->recalc_call = 1; #ifdef EDJE_CALC_CACHE ed->all_part_change = 1; #endif @@ -504,6 +505,7 @@ edje_color_class_del(const char *color_class) ed = eina_list_data_get(members); ed->dirty = 1; + ed->recalc_call = 1; #ifdef EDJE_CALC_CACHE ed->all_part_change = 1; #endif @@ -583,6 +585,7 @@ edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, in cc->b3 = b3; cc->a3 = a3; ed->dirty = 1; + ed->recalc_call = 1; #ifdef EDJE_CALC_CACHE ed->all_part_change = 1; #endif @@ -611,6 +614,7 @@ edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, in cc->a3 = a3; ed->color_classes = eina_list_append(ed->color_classes, cc); ed->dirty = 1; + ed->recalc_call = 1; #ifdef EDJE_CALC_CACHE ed->all_part_change = 1; #endif @@ -693,6 +697,7 @@ edje_object_color_class_del(Evas_Object *obj, const char *color_class) } ed->dirty = 1; + ed->recalc_call = 1; #ifdef EDJE_CALC_CACHE ed->all_part_change = 1; #endif @@ -752,6 +757,7 @@ edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size siz ed = eina_list_data_get(members); ed->dirty = 1; + ed->recalc_call = 1; _edje_textblock_style_all_update(ed); #ifdef EDJE_CALC_CACHE ed->text_part_change = 1; @@ -847,6 +853,7 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char /* Update edje */ ed->dirty = 1; + ed->recalc_call = 1; #ifdef EDJE_CALC_CACHE ed->text_part_change = 1; #endif @@ -881,6 +888,7 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char /* Add to edje's text class list */ ed->text_classes = eina_list_append(ed->text_classes, tc); ed->dirty = 1; + ed->recalc_call = 1; #ifdef EDJE_CALC_CACHE ed->text_part_change = 1; #endif @@ -1005,6 +1013,7 @@ _edje_object_part_text_raw_set(Evas_Object *obj, Edje_Real_Part *rp, const char else if (text) rp->text.text = eina_stringshare_add(text); rp->edje->dirty = 1; + rp->edje->recalc_call = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; #endif @@ -1039,6 +1048,7 @@ _edje_object_part_text_raw_append(Evas_Object *obj, Edje_Real_Part *rp, const ch } } rp->edje->dirty = 1; + rp->edje->recalc_call = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; #endif @@ -1307,6 +1317,7 @@ edje_object_part_text_insert(Evas_Object *obj, const char *part, const char *tex if (rp->part->entry_mode <= EDJE_ENTRY_EDIT_MODE_NONE) return; _edje_entry_text_markup_insert(rp, text); rp->edje->dirty = 1; + rp->edje->recalc_call = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; #endif @@ -1328,6 +1339,7 @@ edje_object_part_text_append(Evas_Object *obj, const char *part, const char *tex if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return; _edje_object_part_text_raw_append(obj, rp, part, text); rp->edje->dirty = 1; + rp->edje->recalc_call = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; #endif @@ -1675,7 +1687,7 @@ edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const return 0; } -EAPI const char * +EAPI char * edje_object_part_text_cursor_content_get(const Evas_Object *obj, const char *part, Edje_Cursor cur) { Edje *ed; @@ -1908,6 +1920,13 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw // XXX: by Sachiel, January 21th 2009, 19:30 UTC _edje_recalc_do(ed); + rp = evas_object_data_get(obj_swallow, "\377 edje.swallowing_part"); + if (rp) + { + /* The object is already swallowed somewhere, unswallow it first */ + edje_object_part_unswallow(rp->edje->obj, obj_swallow); + } + rp = _edje_real_part_recursive_get(ed, (char *)part); if (!rp) return EINA_FALSE; if (rp->part->type != EDJE_PART_TYPE_SWALLOW) @@ -1929,6 +1948,7 @@ _recalc_extern_parent(Evas_Object *obj) ed = _edje_fetch(parent); ed->dirty = 1; + ed->recalc_call = 1; // ZZZ: ??? _edje_recalc(ed); } @@ -2110,11 +2130,7 @@ _edje_box_layout_external_new(const char *name, Evas_Object_Box_Layout func, voi name_len = strlen(name) + 1; l = malloc(sizeof(Edje_Box_Layout) + name_len); - if (!l) - { - perror("malloc"); - return NULL; - } + if (!l) return NULL; l->func = func; l->layout_data_get = layout_data_get; @@ -2224,6 +2240,7 @@ edje_object_part_unswallow(Evas_Object *obj __UNUSED__, Evas_Object *obj_swallow rp->swallow_params.max.w = 0; rp->swallow_params.max.h = 0; rp->edje->dirty = 1; + rp->edje->recalc_call = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; #endif @@ -2684,6 +2701,7 @@ edje_object_part_drag_size_set(Evas_Object *obj, const char *part, double dw, do rp->drag->size.x = FROM_DOUBLE(dw); rp->drag->size.y = FROM_DOUBLE(dh); rp->edje->dirty = 1; + rp->edje->recalc_call = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; #endif @@ -3018,6 +3036,7 @@ _edje_box_child_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *child __UNUS Edje_Real_Part *rp = data; rp->edje->dirty = 1; + rp->edje->recalc_call = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; #endif @@ -3031,6 +3050,7 @@ _edje_box_child_add(Edje_Real_Part *rp, Evas_Object *child) (child, EVAS_CALLBACK_DEL, _edje_box_child_del_cb, rp); rp->edje->dirty = 1; + rp->edje->recalc_call = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; #endif @@ -3044,6 +3064,7 @@ _edje_box_child_remove(Edje_Real_Part *rp, Evas_Object *child) (child, EVAS_CALLBACK_DEL, _edje_box_child_del_cb, rp); rp->edje->dirty = 1; + rp->edje->recalc_call = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; #endif @@ -3186,6 +3207,7 @@ _edje_table_child_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *child __UN Edje_Real_Part *rp = data; rp->edje->dirty = 1; + rp->edje->recalc_call = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; #endif @@ -3199,6 +3221,7 @@ _edje_table_child_add(Edje_Real_Part *rp, Evas_Object *child) (child, EVAS_CALLBACK_DEL, _edje_table_child_del_cb, rp); rp->edje->dirty = 1; + rp->edje->recalc_call = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; #endif @@ -3212,6 +3235,7 @@ _edje_table_child_remove(Edje_Real_Part *rp, Evas_Object *child) (child, EVAS_CALLBACK_DEL, _edje_table_child_del_cb, rp); rp->edje->dirty = 1; + rp->edje->recalc_call = 1; #ifdef EDJE_CALC_CACHE rp->invalidate = 1; #endif @@ -3314,6 +3338,7 @@ _edje_perspective_obj_del(void *data, __UNUSED__ Evas *e, __UNUSED__ Evas_Object if (!ed) continue; ed->persp = NULL; ed->dirty = 1; + ed->recalc_call = 1; _edje_recalc_do(ed); } free(ps); @@ -3367,6 +3392,7 @@ edje_perspective_set(Edje_Perspective *ps, Evas_Coord px, Evas_Coord py, Evas_Co if (!ed->persp) { ed->dirty = 1; + ed->recalc_call = 1; _edje_recalc_do(ed); } } @@ -3381,6 +3407,7 @@ edje_perspective_set(Edje_Perspective *ps, Evas_Coord px, Evas_Coord py, Evas_Co if (!ed->persp) { ed->dirty = 1; + ed->recalc_call = 1; _edje_recalc_do(ed); } } @@ -3414,6 +3441,7 @@ edje_perspective_global_set(Edje_Perspective *ps, Eina_Bool global) if (!ed->persp) { ed->dirty = 1; + ed->recalc_call = 1; _edje_recalc_do(ed); } } @@ -3453,6 +3481,7 @@ edje_object_perspective_set(Evas_Object *obj, Edje_Perspective *ps) ed->persp = ps; if (ps) ps->users = eina_list_append(ps->users, obj); ed->dirty = 1; + ed->recalc_call = 1; _edje_recalc_do(ed); } @@ -4075,6 +4104,7 @@ _edje_object_part_swallow_changed_hints_cb(void *data, __UNUSED__ Evas *e, __UNU rp = data; _edje_real_part_swallow_hints_update(rp); rp->edje->dirty = 1; + rp->edje->recalc_call = 1; _edje_recalc(rp->edje); return; } @@ -4096,6 +4126,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp, if (hints_update) _edje_real_part_swallow_hints_update(rp); rp->edje->dirty = 1; + rp->edje->recalc_call = 1; _edje_recalc(rp->edje); return; } @@ -4139,6 +4170,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp, evas_object_precise_is_inside_set(obj_swallow, 1); rp->edje->dirty = 1; + rp->edje->recalc_call = 1; _edje_recalc(rp->edje); } diff --git a/libraries/edje/src/modules/Makefile.in b/libraries/edje/src/modules/Makefile.in index 55c47d6..5e81050 100644 --- a/libraries/edje/src/modules/Makefile.in +++ b/libraries/edje/src/modules/Makefile.in @@ -193,8 +193,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/edje/src/modules/alsa_snd_player/Makefile.in b/libraries/edje/src/modules/alsa_snd_player/Makefile.in index ce68f41..1fe2fb1 100644 --- a/libraries/edje/src/modules/alsa_snd_player/Makefile.in +++ b/libraries/edje/src/modules/alsa_snd_player/Makefile.in @@ -210,8 +210,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/edje/src/modules/eet_snd_reader/Makefile.in b/libraries/edje/src/modules/eet_snd_reader/Makefile.in index f4d99bb..12d0487 100644 --- a/libraries/edje/src/modules/eet_snd_reader/Makefile.in +++ b/libraries/edje/src/modules/eet_snd_reader/Makefile.in @@ -211,8 +211,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/edje/src/modules/multisense_factory/Makefile.in b/libraries/edje/src/modules/multisense_factory/Makefile.in index ed0c3e4..8fbc0aa 100644 --- a/libraries/edje/src/modules/multisense_factory/Makefile.in +++ b/libraries/edje/src/modules/multisense_factory/Makefile.in @@ -208,8 +208,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/edje/src/modules/multisense_factory/multisense_factory.c b/libraries/edje/src/modules/multisense_factory/multisense_factory.c index f89ae9b..8b17be1 100644 --- a/libraries/edje/src/modules/multisense_factory/multisense_factory.c +++ b/libraries/edje/src/modules/multisense_factory/multisense_factory.c @@ -1,33 +1,33 @@ -#include "config.h" -#include "edje_private.h" - -#define DEFAULT_SAMPLERATE 44100 - -#ifdef HAVE_LIBREMIX -EAPI RemixBase * -multisense_sound_player_get(Edje_Multisense_Env *msenv) -{ - RemixEnv *env = msenv->remixenv; - RemixPlugin *player_plugin; - RemixBase *player; - - player_plugin = remix_find_plugin(env, "alsa_snd_player"); - if (!player_plugin) - { - WRN("ALSA player_plugin init fail\n"); - return remix_monitor_new(env); - } - player = remix_new(env, player_plugin, NULL); - return player; -} -#endif - -EAPI Eina_Bool -multisense_factory_init(Edje_Multisense_Env *env) -{ -#ifdef HAVE_LIBREMIX - remix_set_samplerate(env->remixenv, DEFAULT_SAMPLERATE); - remix_set_channels(env->remixenv, REMIX_STEREO); -#endif - return EINA_TRUE; -} +#include "config.h" +#include "edje_private.h" + +#define DEFAULT_SAMPLERATE 44100 + +#ifdef HAVE_LIBREMIX +EAPI RemixBase * +multisense_sound_player_get(Edje_Multisense_Env *msenv) +{ + RemixEnv *env = msenv->remixenv; + RemixPlugin *player_plugin; + RemixBase *player; + + player_plugin = remix_find_plugin(env, "alsa_snd_player"); + if (!player_plugin) + { + WRN("ALSA player_plugin init fail\n"); + return remix_monitor_new(env); + } + player = remix_new(env, player_plugin, NULL); + return player; +} +#endif + +EAPI Eina_Bool +multisense_factory_init(Edje_Multisense_Env *env __UNUSED__) +{ +#ifdef HAVE_LIBREMIX + remix_set_samplerate(env->remixenv, DEFAULT_SAMPLERATE); + remix_set_channels(env->remixenv, REMIX_STEREO); +#endif + return EINA_TRUE; +} diff --git a/libraries/edje/src/tests/Makefile.in b/libraries/edje/src/tests/Makefile.in index f610548..ff5193e 100644 --- a/libraries/edje/src/tests/Makefile.in +++ b/libraries/edje/src/tests/Makefile.in @@ -189,8 +189,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/edje/utils/Makefile.in b/libraries/edje/utils/Makefile.in index 4c05fe5..4df8fbd 100644 --- a/libraries/edje/utils/Makefile.in +++ b/libraries/edje/utils/Makefile.in @@ -177,8 +177,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ diff --git a/libraries/eet/ChangeLog b/libraries/eet/ChangeLog index 0b3c5fb..795d102 100644 --- a/libraries/eet/ChangeLog +++ b/libraries/eet/ChangeLog @@ -107,7 +107,7 @@ 2008-09-25 Carsten Haitzler (The Rasterman) - 1.1.0 release + 1.5.0 release 2008-10-20 Cedric BAIL @@ -546,3 +546,22 @@ * JPEG encode and decode in eet now uses ISLOW (not IFAST) due to noticable quality losses in the chase for speed. It will use IFAST for quality less than 60 when encoding + +2011-12-02 Carsten Haitzler (The Rasterman) + + 1.1.0 release + +2011-12-02 Mike Blumenkrantz + + * added eet_file_get to return the filename of an Eet_File + * Eet_File filenames are now stringshared + * added mempool allocators + +2011-12-29 Carsten Haitzler (The Rasterman) + + * increase eet_connection packet size to 1Mb - more reasonable. + +2012-01-07 Boris Faure (billiob) + + * make eet tool write to standard output if no output file given. + diff --git a/libraries/eet/Makefile.am b/libraries/eet/Makefile.am index bc6e99a..34a5762 100644 --- a/libraries/eet/Makefile.am +++ b/libraries/eet/Makefile.am @@ -49,7 +49,7 @@ pkgconfig_DATA = eet.pc doc: @echo "entering doc/" - make -C doc doc + $(MAKE) -C doc doc # Unit tests @@ -83,9 +83,9 @@ lcov-report: @genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info coverage: - @make lcov-reset - @make check - @make lcov-report + @$(MAKE) lcov-reset + @$(MAKE) check + @$(MAKE) lcov-report clean-local: @rm -rf coverage diff --git a/libraries/eet/Makefile.in b/libraries/eet/Makefile.in index 4daff0f..b865027 100644 --- a/libraries/eet/Makefile.in +++ b/libraries/eet/Makefile.in @@ -223,8 +223,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -867,7 +865,7 @@ uninstall-am: uninstall-pkgconfigDATA doc: @echo "entering doc/" - make -C doc doc + $(MAKE) -C doc doc # Unit tests @@ -894,9 +892,9 @@ doc: @EFL_ENABLE_COVERAGE_TRUE@ @genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info @EFL_ENABLE_COVERAGE_TRUE@coverage: -@EFL_ENABLE_COVERAGE_TRUE@ @make lcov-reset -@EFL_ENABLE_COVERAGE_TRUE@ @make check -@EFL_ENABLE_COVERAGE_TRUE@ @make lcov-report +@EFL_ENABLE_COVERAGE_TRUE@ @$(MAKE) lcov-reset +@EFL_ENABLE_COVERAGE_TRUE@ @$(MAKE) check +@EFL_ENABLE_COVERAGE_TRUE@ @$(MAKE) lcov-report @EFL_ENABLE_COVERAGE_TRUE@clean-local: @EFL_ENABLE_COVERAGE_TRUE@ @rm -rf coverage diff --git a/libraries/eet/NEWS b/libraries/eet/NEWS index 43118b0..cccda15 100644 --- a/libraries/eet/NEWS +++ b/libraries/eet/NEWS @@ -1,3 +1,15 @@ +Eet 1.6.0 + +Changes since Eet 1.5.0: +-------------------------- + +Additions: + * eet_file_get to return filenames of Eet_Files + +Improvements: + + * most allocations moved to mempools + Eet 1.5.0 Changes since Eet 1.4.0: diff --git a/libraries/eet/aclocal.m4 b/libraries/eet/aclocal.m4 index 1d329e5..6d7b012 100644 --- a/libraries/eet/aclocal.m4 +++ b/libraries/eet/aclocal.m4 @@ -13,14 +13,13 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. 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 . # @@ -48,10 +47,7 @@ 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]) -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]) - +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -64,6 +60,7 @@ if test -n "$PKG_CONFIG"; then AC_MSG_RESULT([no]) PKG_CONFIG="" fi + fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -72,31 +69,34 @@ 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. # -# 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 +# +# 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 # -------------------------------------------------------------- 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_default([$2], [:]) + m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) + # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[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 +[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 fi[]dnl ])# _PKG_CONFIG @@ -138,17 +138,16 @@ 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 --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - m4_default([$4], [AC_MSG_ERROR( + ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -156,24 +155,25 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT])[]dnl - ]) +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( + ifelse([$4], , [AC_MSG_FAILURE(dnl [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 .])[]dnl - ]) +To get pkg-config, see .])], + [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - $3 + ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES diff --git a/libraries/eet/config.guess b/libraries/eet/config.guess index c2246a4..e3a2116 100755 --- a/libraries/eet/config.guess +++ b/libraries/eet/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, 2010 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-12-30' +timestamp='2009-06-10' # 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-12-30' # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted 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. # -# 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 +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,9 +56,8 @@ 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, 2009, 2010 Free -Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 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." @@ -334,9 +333,6 @@ 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" @@ -811,12 +807,12 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:*) + *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - authenticamd | genuineintel | EM64T) + EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -858,20 +854,6 @@ 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 \ @@ -894,17 +876,6 @@ 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 ;; @@ -930,18 +901,39 @@ EOF #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" 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 @@ -950,11 +942,8 @@ EOF *) echo hppa-unknown-linux-gnu ;; esac exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux @@ -977,6 +966,58 @@ 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 @@ -1206,16 +1247,6 @@ 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/eet/config.sub b/libraries/eet/config.sub index c2d1257..eb0389a 100755 --- a/libraries/eet/config.sub +++ b/libraries/eet/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, 2010 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2010-01-22' +timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,16 +32,13 @@ timestamp='2010-01-22' # Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# diff and a properly formatted 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. @@ -75,9 +72,8 @@ 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, 2009, 2010 Free -Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 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." @@ -153,7 +149,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 | -microblaze) + -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; @@ -288,7 +284,6 @@ 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 \ @@ -296,14 +291,13 @@ 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 | picochip) + m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -346,7 +340,7 @@ case $basic_machine in | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -374,17 +368,15 @@ case $basic_machine in | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | romp-* | rs6000-* \ | 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-* | tilegx-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ - | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ @@ -734,9 +726,6 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) - basic_machine=microblaze-xilinx - ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -1087,11 +1076,6 @@ 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 @@ -1263,9 +1247,6 @@ 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|'` ;; @@ -1287,8 +1268,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* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1309,7 +1290,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* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1442,8 +1423,6 @@ case $os in -dicos*) os=-dicos ;; - -nacl*) - ;; -none) ;; *) diff --git a/libraries/eet/configure b/libraries/eet/configure index a3dddde..b02c1c4 100755 --- a/libraries/eet/configure +++ b/libraries/eet/configure @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for eet 1.5.0. +# Generated by GNU Autoconf 2.65 for eet 1.5.99.67344. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error 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=$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 + 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 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&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, old GNU/Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, 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='eet' PACKAGE_TARNAME='eet' -PACKAGE_VERSION='1.5.0' -PACKAGE_STRING='eet 1.5.0' +PACKAGE_VERSION='1.5.99.67344' +PACKAGE_STRING='eet 1.5.99.67344' PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net' PACKAGE_URL='' @@ -781,8 +781,6 @@ EFL_ENABLE_TESTS_FALSE EFL_ENABLE_TESTS_TRUE CHECK_LIBS CHECK_CFLAGS -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH PKG_CONFIG BUILD_EXAMPLES_FALSE BUILD_EXAMPLES_TRUE @@ -944,8 +942,6 @@ LIBS CPPFLAGS CPP PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR CHECK_CFLAGS CHECK_LIBS EVIL_CFLAGS @@ -1018,9 +1014,8 @@ do fi case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1065,7 +1060,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 @@ -1091,7 +1086,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 @@ -1295,7 +1290,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 @@ -1311,7 +1306,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 @@ -1341,8 +1336,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." ;; *=*) @@ -1350,7 +1345,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 ;; @@ -1368,13 +1363,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 @@ -1397,7 +1392,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' @@ -1411,8 +1406,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 @@ -1427,9 +1422,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. @@ -1468,11 +1463,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 @@ -1498,7 +1493,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 eet 1.5.0 to adapt to many kinds of systems. +\`configure' configures eet 1.5.99.67344 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1512,7 +1507,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 @@ -1568,7 +1563,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of eet 1.5.0:";; + short | recursive ) echo "Configuration of eet 1.5.99.67344:";; esac cat <<\_ACEOF @@ -1628,10 +1623,6 @@ Some influential environment variables: you have headers in a nonstandard directory CPP 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 CHECK_CFLAGS C compiler flags for CHECK, overriding pkg-config CHECK_LIBS linker flags for CHECK, overriding pkg-config @@ -1713,10 +1704,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -eet configure 1.5.0 -generated by GNU Autoconf 2.67 +eet configure 1.5.99.67344 +generated by GNU Autoconf 2.65 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1820,7 +1811,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1863,7 +1854,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; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1929,7 +1920,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1996,10 +1987,10 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2035,7 +2026,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2058,15 +2049,17 @@ $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;} -( $as_echo "## -------------------------------------------------------- ## +( cat <<\_ASBOX +## -------------------------------------------------------- ## ## 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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2082,8 +2075,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 eet $as_me 1.5.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +It was created by eet $as_me 1.5.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2193,9 +2186,11 @@ trap 'exit_status=$? { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -2229,9 +2224,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do @@ -2244,9 +2241,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + cat <<\_ASBOX +## ------------------- ## ## File substitutions. ## -## ------------------- ##" +## ------------------- ## +_ASBOX echo for ac_var in $ac_subst_files do @@ -2260,9 +2259,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo cat confdefs.h echo @@ -2317,12 +2318,7 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # 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 + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2337,11 +2333,7 @@ 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" \ - || { { $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 ; } + . "$ac_site_file" fi done @@ -2417,7 +2409,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. ## @@ -2443,22 +2435,16 @@ am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - 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 + 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 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, @@ -2574,11 +2560,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 @@ -2600,7 +2586,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 @@ -2610,7 +2596,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 @@ -2848,7 +2834,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 eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2856,7 +2842,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;; @@ -2890,7 +2876,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 @@ -2906,7 +2892,7 @@ fi # Define the identity of the package. PACKAGE='eet' - VERSION='1.5.0' + VERSION='1.5.99.67344' cat >>confdefs.h <<_ACEOF @@ -2961,7 +2947,7 @@ AM_BACKSLASH='\' # 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; } @@ -2972,16 +2958,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='-' @@ -3006,7 +2992,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 @@ -3014,7 +3000,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='-' @@ -3720,8 +3706,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 @@ -3835,8 +3821,9 @@ 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 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +{ as_fn_set_status 77 +as_fn_error "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; } @@ -3878,8 +3865,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 @@ -3936,9 +3923,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 @@ -3989,8 +3976,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 @@ -4394,7 +4381,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 @@ -4470,7 +4457,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 @@ -4536,7 +4523,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 @@ -4603,7 +4590,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 @@ -4719,7 +4706,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 : @@ -4921,13 +4908,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:4924: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4911: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4927: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4914: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4930: output\"" >&5) + (eval echo "\"\$as_me:4917: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6130,7 +6117,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6133 "configure"' > conftest.$ac_ext + echo '#line 6120 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6919,7 +6906,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6935,11 +6922,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -6978,7 +6965,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6994,18 +6981,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f 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 @@ -7134,7 +7121,8 @@ 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 " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7657,11 +7645,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:7660: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7648: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7664: \$? = $ac_status" >&5 + echo "$as_me:7652: \$? = $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. @@ -7996,11 +7984,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:7999: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7987: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8003: \$? = $ac_status" >&5 + echo "$as_me:7991: \$? = $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. @@ -8101,11 +8089,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:8104: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8092: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8108: \$? = $ac_status" >&5 + echo "$as_me:8096: \$? = $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 @@ -8156,11 +8144,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:8159: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8147: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8163: \$? = $ac_status" >&5 + echo "$as_me:8151: \$? = $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 @@ -10540,7 +10528,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10543 "configure" +#line 10531 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10636,7 +10624,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10639 "configure" +#line 10627 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10880,15 +10868,15 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define VMIC 0 +#define VMIC 99 _ACEOF cat >>confdefs.h <<_ACEOF -#define VREV 0 +#define VREV 67344 _ACEOF -version_info="6:0:5" +version_info="6:99:5" release_info="" @@ -11182,10 +11170,6 @@ fi - - - - 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. @@ -11298,6 +11282,7 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } PKG_CONFIG="" fi + fi @@ -11329,10 +11314,11 @@ 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" && \ +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=$? @@ -11342,13 +11328,15 @@ if test -n "$CHECK_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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" && \ +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=$? @@ -11358,15 +11346,14 @@ if test -n "$CHECK_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -11374,17 +11361,17 @@ 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` + CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "check >= 0.9.5"` else - CHECK_PKG_ERRORS=`$PKG_CONFIG --print-errors "check >= 0.9.5" 2>&1` + 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 - _efl_enable_tests="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&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 @@ -11821,8 +11808,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 @@ -12192,10 +12179,6 @@ fi # pkg-config - - - - 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. @@ -12308,6 +12291,7 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } PKG_CONFIG="" fi + fi # Check whether pkg-config supports Requires.private @@ -12492,10 +12476,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVIL" >&5 $as_echo_n "checking for EVIL... " >&6; } -if test -n "$EVIL_CFLAGS"; then - pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_CFLAGS"; then + pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" + else + 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=$? @@ -12505,13 +12490,15 @@ if test -n "$EVIL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EVIL_LIBS"; then - pkg_cv_EVIL_LIBS="$EVIL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_LIBS"; then + pkg_cv_EVIL_LIBS="$EVIL_LIBS" + else + 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=$? @@ -12521,15 +12508,14 @@ if test -n "$EVIL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -12537,14 +12523,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evil >= 1.0.0"` else - EVIL_PKG_ERRORS=`$PKG_CONFIG --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evil >= 1.0.0"` 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 @@ -12553,13 +12539,12 @@ 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. @@ -12568,13 +12553,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 @@ -12603,10 +12588,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EINA" >&5 $as_echo_n "checking for EINA... " >&6; } -if test -n "$EINA_CFLAGS"; then - pkg_cv_EINA_CFLAGS="$EINA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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 ac_status=$? @@ -12616,13 +12602,15 @@ if test -n "$EINA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EINA_LIBS"; then - pkg_cv_EINA_LIBS="$EINA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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 ac_status=$? @@ -12632,15 +12620,14 @@ if test -n "$EINA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -12648,14 +12635,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eina >= 1.1.0" 2>&1` + EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eina >= 1.1.0"` else - EINA_PKG_ERRORS=`$PKG_CONFIG --print-errors "eina >= 1.1.0" 2>&1` + EINA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eina >= 1.1.0"` 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.1.0) were not met: $EINA_PKG_ERRORS @@ -12664,13 +12651,12 @@ 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. @@ -12679,13 +12665,13 @@ 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 requirement_eet="eina >= 1.1.0 ${requirement_eet}" @@ -12697,10 +12683,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNUTLS" >&5 $as_echo_n "checking for GNUTLS... " >&6; } -if test -n "$GNUTLS_CFLAGS"; then - pkg_cv_GNUTLS_CFLAGS="$GNUTLS_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GNUTLS_CFLAGS"; then + pkg_cv_GNUTLS_CFLAGS="$GNUTLS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 1.7.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnutls >= 1.7.6") 2>&5 ac_status=$? @@ -12710,13 +12697,15 @@ if test -n "$GNUTLS_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$GNUTLS_LIBS"; then - pkg_cv_GNUTLS_LIBS="$GNUTLS_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GNUTLS_LIBS"; then + pkg_cv_GNUTLS_LIBS="$GNUTLS_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 1.7.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnutls >= 1.7.6") 2>&5 ac_status=$? @@ -12726,15 +12715,14 @@ if test -n "$GNUTLS_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -12742,17 +12730,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gnutls >= 1.7.6" 2>&1` + GNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gnutls >= 1.7.6"` else - GNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors "gnutls >= 1.7.6" 2>&1` + GNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 1.7.6"` fi # Put the nasty error message in config.log where it belongs echo "$GNUTLS_PKG_ERRORS" >&5 - have_gnutls="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_gnutls="no" +elif test $pkg_failed = untried; then have_gnutls="no" else GNUTLS_CFLAGS=$pkg_cv_GNUTLS_CFLAGS @@ -12889,10 +12877,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5 $as_echo_n "checking for OPENSSL... " >&6; } -if test -n "$OPENSSL_CFLAGS"; then - pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$OPENSSL_CFLAGS"; then + pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" + else + 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=$? @@ -12902,13 +12891,15 @@ if test -n "$OPENSSL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$OPENSSL_LIBS"; then - pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$OPENSSL_LIBS"; then + pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" + else + 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=$? @@ -12918,15 +12909,14 @@ if test -n "$OPENSSL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -12934,17 +12924,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "openssl" 2>&1` + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "openssl"` else - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors "openssl" 2>&1` + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl"` fi # Put the nasty error message in config.log where it belongs echo "$OPENSSL_PKG_ERRORS" >&5 - have_openssl="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_openssl="no" +elif test $pkg_failed = untried; then have_openssl="no" else OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS @@ -13011,7 +13001,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_inclu if test "x$ac_cv_header_zlib_h" = x""yes; then : dummy="yes" else - as_fn_error $? "\"Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file\"" "$LINENO" 5 + as_fn_error "\"Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file\"" "$LINENO" 5 fi @@ -13020,7 +13010,7 @@ ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac if test "x$ac_cv_header_jpeglib_h" = x""yes; then : dummy="yes" else - as_fn_error $? "\"Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file\"" "$LINENO" 5 + as_fn_error "\"Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file\"" "$LINENO" 5 fi @@ -13029,7 +13019,8 @@ for ac_header in netinet/in.h unistd.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" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -13106,7 +13097,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : +if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14001,7 +13992,8 @@ 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" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -14068,7 +14060,8 @@ for ac_func in fmemopen open_memstream realpath 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" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -14160,7 +14153,7 @@ fi if test "x$_efl_have_fnmatch" = "xyes"; then : else - as_fn_error $? "Cannot find fnmatch()" "$LINENO" 5 + as_fn_error "Cannot find fnmatch()" "$LINENO" 5 fi @@ -14253,7 +14246,6 @@ 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$//' @@ -14277,43 +14269,43 @@ 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 "${EET_AMALGAMATION_TRUE}" && test -z "${EET_AMALGAMATION_FALSE}"; then - as_fn_error $? "conditional \"EET_AMALGAMATION\" was never defined. + as_fn_error "conditional \"EET_AMALGAMATION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EET_TRUE}" && test -z "${BUILD_EET_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EET\" was never defined. + as_fn_error "conditional \"BUILD_EET\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_EXAMPLES_TRUE}" && test -z "${INSTALL_EXAMPLES_FALSE}"; then - as_fn_error $? "conditional \"INSTALL_EXAMPLES\" was never defined. + as_fn_error "conditional \"INSTALL_EXAMPLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EXAMPLES_TRUE}" && test -z "${BUILD_EXAMPLES_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EXAMPLES\" was never defined. + as_fn_error "conditional \"BUILD_EXAMPLES\" 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 \"EFL_ENABLE_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EFL_ENABLE_COVERAGE_TRUE}" && test -z "${EFL_ENABLE_COVERAGE_FALSE}"; then - as_fn_error $? "conditional \"EFL_ENABLE_COVERAGE\" was never defined. + as_fn_error "conditional \"EFL_ENABLE_COVERAGE\" 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 @@ -14463,19 +14455,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error 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=$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 + 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 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -14671,7 +14663,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 @@ -14724,8 +14716,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 eet $as_me 1.5.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +This file was extended by eet $as_me 1.5.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -14790,11 +14782,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="\\ -eet config.status 1.5.0 -configured by $0, generated by GNU Autoconf 2.67, +eet config.status 1.5.99.67344 +configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -14812,16 +14804,11 @@ 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 @@ -14843,7 +14830,6 @@ 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;; @@ -14856,7 +14842,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 ;; @@ -14865,7 +14851,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" @@ -15190,7 +15176,7 @@ do "src/examples/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/Makefile" ;; "eet.spec") CONFIG_FILES="$CONFIG_FILES eet.spec" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -15228,7 +15214,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. @@ -15245,7 +15231,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 @@ -15259,18 +15245,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 @@ -15359,28 +15345,20 @@ 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 sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ 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[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// s/^[^=]*=[ ]*$// }' fi @@ -15408,7 +15386,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 @@ -15493,7 +15471,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" @@ -15506,7 +15484,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 @@ -15534,7 +15512,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error "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'" @@ -15561,7 +15539,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 @@ -15698,22 +15676,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) # @@ -15724,19 +15702,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" @@ -16527,7 +16505,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. @@ -16548,7 +16526,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 1 + $ac_cs_success || as_fn_exit $? 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 diff --git a/libraries/eet/configure.ac b/libraries/eet/configure.ac index 984cd75..220e2a1 100644 --- a/libraries/eet/configure.ac +++ b/libraries/eet/configure.ac @@ -2,11 +2,11 @@ y##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [5]) -m4_define([v_mic], [0]) -m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) +m4_define([v_mic], [99]) +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'])) 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 -m4_undefine([v_rev]) +dnl m4_undefine([v_rev]) ##-- When doing snapshots - change soname. remove dnl on below line dnl m4_define([relname], [ver-pre-svn-05]) dnl m4_define([v_rel], [-release relname]) diff --git a/libraries/eet/doc/Doxyfile b/libraries/eet/doc/Doxyfile index bf2352b..f6e3026 100644 --- a/libraries/eet/doc/Doxyfile +++ b/libraries/eet/doc/Doxyfile @@ -1,139 +1,1694 @@ +# Doxyfile 1.7.3 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + PROJECT_NAME = Eet -PROJECT_NUMBER = 1.5.0 + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 1.5.99.67344 + +# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + OUTPUT_DIRECTORY = . -INPUT = ./eet.dox ./examples.dox ../src/lib -IMAGE_PATH = img + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + OUTPUT_LANGUAGE = English -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = ./head.html -HTML_FOOTER = ./foot.html -HTML_STYLESHEET = ./e.css -HTML_ALIGN_MEMBERS = YES -ENUM_VALUES_PER_LINE = 1 -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = YES -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = YES + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -INTERNAL_DOCS = NO -STRIP_CODE_COMMENTS = NO -CASE_SENSE_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + SHORT_NAMES = NO -HIDE_SCOPE_NAMES = NO -VERBATIM_HEADERS = NO -SHOW_INCLUDE_FILES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + INHERIT_DOCS = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -DISTRIBUTE_GROUP_DOC = NO + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even if there is only one candidate or it is obvious which candidate to choose by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + GENERATE_DEPRECATEDLIST= YES -ALIASES = -ENABLED_SECTIONS = + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + MAX_INITIALIZER_LINES = 30 -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + SHOW_USED_FILES = NO + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -FILE_PATTERNS = -RECURSIVE = NO -EXCLUDE = + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ./eet.dox \ + ./examples.dox \ + ../src/lib + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.c \ + *.h + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = ../src/lib/eet_amalgamation.c + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = ../src/examples/ -EXAMPLE_PATTERNS = + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = ../src/examples + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = *.c,*.h,*.x + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + EXAMPLE_RECURSIVE = NO -INPUT_FILTER = + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = ../doc/img + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + COLS_IN_ALPHA_INDEX = 2 -IGNORE_PREFIX = eet_ _eet_ Eet_ _Eet_ EET_ _EET_ + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = eet_ \ + _eet_ \ + Eet_ \ + _Eet_ \ + EET_ \ + _EET_ + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = ./head.html + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = ./foot.html + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = ./e.css + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = YES + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = YES + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.enlightenment.Eet + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.enlightenment.Eet + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Enlightenment + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = YES + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.enlightenment.Eet + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.enlightenment.Eet + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = YES + +# This tag can be used to set the number of enum values (range [0,1..20]) +# that doxygen will group on one line in the generated HTML documentation. +# Note that a value of 0 will completely suppress the enum values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 1 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = NO + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + GENERATE_MAN = YES + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + MAN_LINKS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + GENERATE_XML = NO -XML_SCHEMA = -XML_DTD = + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = YES + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + SEARCH_INCLUDES = NO + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = EINA_MAGIC_DEBUG \ + __UNUSED__= \ + EINA_ARG_NONNULL()= \ + EINA_MALLOC= \ + EINA_WARN_UNUSED_RESULT= \ + EAPI= \ + EINA_PURE= \ + EINA_CONST= + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + SKIP_FUNCTION_MACROS = YES -TAGFILES = -GENERATE_TAGFILE = + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + CLASS_DIAGRAMS = NO + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will write a font called Helvetica to the output +# directory and reference it in all dot files that doxygen generates. +# When you want a differently looking font you can specify the font name +# using DOT_FONTNAME. You need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + CLASS_GRAPH = NO + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + COLLABORATION_GRAPH = NO + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + INCLUDE_GRAPH = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + INCLUDED_BY_GRAPH = NO + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + GRAPHICAL_HIERARCHY = NO + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, svg, gif or svg. +# If left blank png will be used. + DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 512 -MAX_DOT_GRAPH_HEIGHT = 512 + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = YES + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + DOT_CLEANUP = YES -SEARCHENGINE = NO diff --git a/libraries/eet/doc/Doxyfile.in b/libraries/eet/doc/Doxyfile.in index 4ed5452..eadf82a 100644 --- a/libraries/eet/doc/Doxyfile.in +++ b/libraries/eet/doc/Doxyfile.in @@ -1,139 +1,1694 @@ +# Doxyfile 1.7.3 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + PROJECT_NAME = Eet + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + PROJECT_NUMBER = @PACKAGE_VERSION@ + +# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + OUTPUT_DIRECTORY = . -INPUT = @srcdir@/eet.dox @srcdir@/examples.dox @top_srcdir@/src/lib -IMAGE_PATH = img + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + OUTPUT_LANGUAGE = English -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = @srcdir@/head.html -HTML_FOOTER = @srcdir@/foot.html -HTML_STYLESHEET = @srcdir@/e.css -HTML_ALIGN_MEMBERS = YES -ENUM_VALUES_PER_LINE = 1 -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = YES -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = YES + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -INTERNAL_DOCS = NO -STRIP_CODE_COMMENTS = NO -CASE_SENSE_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + SHORT_NAMES = NO -HIDE_SCOPE_NAMES = NO -VERBATIM_HEADERS = NO -SHOW_INCLUDE_FILES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + INHERIT_DOCS = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -DISTRIBUTE_GROUP_DOC = NO + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even if there is only one candidate or it is obvious which candidate to choose by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + GENERATE_DEPRECATEDLIST= YES -ALIASES = -ENABLED_SECTIONS = + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + MAX_INITIALIZER_LINES = 30 -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + SHOW_USED_FILES = NO + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -FILE_PATTERNS = -RECURSIVE = NO -EXCLUDE = + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = @builddir@/eet.dox \ + @srcdir@/examples.dox \ + @top_srcdir@/src/lib + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.c \ + *.h + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = @top_builddir@/src/lib/eet_amalgamation.c + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = @top_srcdir@/src/examples/ -EXAMPLE_PATTERNS = + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = @top_srcdir@/src/examples + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = *.c,*.h,*.x + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + EXAMPLE_RECURSIVE = NO -INPUT_FILTER = + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = @top_srcdir@/doc/img + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + COLS_IN_ALPHA_INDEX = 2 -IGNORE_PREFIX = eet_ _eet_ Eet_ _Eet_ EET_ _EET_ + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = eet_ \ + _eet_ \ + Eet_ \ + _Eet_ \ + EET_ \ + _EET_ + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = @srcdir@/head.html + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = @srcdir@/foot.html + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = @srcdir@/e.css + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = YES + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = YES + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.enlightenment.Eet + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.enlightenment.Eet + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Enlightenment + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = YES + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.enlightenment.Eet + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.enlightenment.Eet + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = YES + +# This tag can be used to set the number of enum values (range [0,1..20]) +# that doxygen will group on one line in the generated HTML documentation. +# Note that a value of 0 will completely suppress the enum values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 1 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = NO + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + GENERATE_MAN = YES + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + MAN_LINKS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + GENERATE_XML = NO -XML_SCHEMA = -XML_DTD = + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = YES + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + SEARCH_INCLUDES = NO + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = EINA_MAGIC_DEBUG \ + __UNUSED__= \ + EINA_ARG_NONNULL()= \ + EINA_MALLOC= \ + EINA_WARN_UNUSED_RESULT= \ + EAPI= \ + EINA_PURE= \ + EINA_CONST= + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + SKIP_FUNCTION_MACROS = YES -TAGFILES = -GENERATE_TAGFILE = + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + CLASS_DIAGRAMS = NO + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will write a font called Helvetica to the output +# directory and reference it in all dot files that doxygen generates. +# When you want a differently looking font you can specify the font name +# using DOT_FONTNAME. You need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + CLASS_GRAPH = NO + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + COLLABORATION_GRAPH = NO + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + INCLUDE_GRAPH = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + INCLUDED_BY_GRAPH = NO + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + GRAPHICAL_HIERARCHY = NO + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, svg, gif or svg. +# If left blank png will be used. + DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 512 -MAX_DOT_GRAPH_HEIGHT = 512 + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = YES + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + DOT_CLEANUP = YES -SEARCHENGINE = NO diff --git a/libraries/eet/doc/Makefile.am b/libraries/eet/doc/Makefile.am index 12f7073..145376f 100644 --- a/libraries/eet/doc/Makefile.am +++ b/libraries/eet/doc/Makefile.am @@ -20,6 +20,7 @@ doc: doc-clean bzip2 -9 $(PACKAGE_DOCNAME).tar rm -rf $(PACKAGE_DOCNAME)/ mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir) + @echo "Documentation Package: $(top_builddir)/$(PACKAGE_DOCNAME).tar.bz2" clean-local: doc-clean @@ -30,7 +31,7 @@ doc: endif -EXTRA_DIST = $(srcdir)/Doxyfile \ +EXTRA_DIST = $(builddir)/Doxyfile \ $(srcdir)/e.css \ $(srcdir)/foot.html \ $(srcdir)/head.html \ diff --git a/libraries/eet/doc/Makefile.in b/libraries/eet/doc/Makefile.in index c3bcf00..e285740 100644 --- a/libraries/eet/doc/Makefile.in +++ b/libraries/eet/doc/Makefile.in @@ -143,8 +143,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -214,7 +212,7 @@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in eet.dox PACKAGE_DOCNAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc -EXTRA_DIST = $(srcdir)/Doxyfile \ +EXTRA_DIST = $(builddir)/Doxyfile \ $(srcdir)/e.css \ $(srcdir)/foot.html \ $(srcdir)/head.html \ @@ -428,6 +426,7 @@ uninstall-am: @EFL_BUILD_DOC_TRUE@ bzip2 -9 $(PACKAGE_DOCNAME).tar @EFL_BUILD_DOC_TRUE@ rm -rf $(PACKAGE_DOCNAME)/ @EFL_BUILD_DOC_TRUE@ mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir) +@EFL_BUILD_DOC_TRUE@ @echo "Documentation Package: $(top_builddir)/$(PACKAGE_DOCNAME).tar.bz2" @EFL_BUILD_DOC_TRUE@clean-local: doc-clean diff --git a/libraries/eet/eet.spec b/libraries/eet/eet.spec index 07cabba..4b7994b 100644 --- a/libraries/eet/eet.spec +++ b/libraries/eet/eet.spec @@ -3,7 +3,7 @@ Summary: Library for speedy data storage, retrieval, and compression. Name: eet -Version: 1.5.0 +Version: 1.5.99.67344 Release: %{_rel} License: BSD Group: System Environment/Libraries @@ -70,6 +70,7 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT %{_includedir}/* %{_libdir}/*.a %{_libdir}/*.so +%{_datadir}/eet %{_libdir}/*.la %changelog diff --git a/libraries/eet/eet.spec.in b/libraries/eet/eet.spec.in index 898fd7a..5a91f60 100644 --- a/libraries/eet/eet.spec.in +++ b/libraries/eet/eet.spec.in @@ -70,6 +70,7 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT %{_includedir}/* %{_libdir}/*.a %{_libdir}/*.so +%{_datadir}/eet %{_libdir}/*.la %changelog diff --git a/libraries/eet/ltmain.sh b/libraries/eet/ltmain.sh index fa4b1e1..7ed280b 100755 --- a/libraries/eet/ltmain.sh +++ b/libraries/eet/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-2ubuntu3 +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,7 +73,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" +VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" TIMESTAMP="" package_revision=1.3017 diff --git a/libraries/eet/sha1-for-source.txt b/libraries/eet/sha1-for-source.txt deleted file mode 100644 index c9ecae4..0000000 --- a/libraries/eet/sha1-for-source.txt +++ /dev/null @@ -1 +0,0 @@ -bbbb3fea6997bc0cb3a5a1ce4ad00d7419b5e935 diff --git a/libraries/eet/src/Makefile.in b/libraries/eet/src/Makefile.in index 0a28065..8b2aa37 100644 --- a/libraries/eet/src/Makefile.in +++ b/libraries/eet/src/Makefile.in @@ -182,8 +182,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/eet/src/bin/Makefile.in b/libraries/eet/src/bin/Makefile.in index 9273fac..4a899f5 100644 --- a/libraries/eet/src/bin/Makefile.in +++ b/libraries/eet/src/bin/Makefile.in @@ -177,8 +177,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/eet/src/bin/eet_main.c b/libraries/eet/src/bin/eet_main.c index 7ab5555..0d577ad 100644 --- a/libraries/eet/src/bin/eet_main.c +++ b/libraries/eet/src/bin/eet_main.c @@ -77,7 +77,7 @@ do_eet_extract(const char *file, Eet_File *ef; void *data; int size = 0; - FILE *f; + FILE *f = stdout; ef = eet_open(file, EET_FILE_MODE_READ); if (!ef) @@ -93,20 +93,23 @@ do_eet_extract(const char *file, exit(-1); } - f = fopen(out, "wb"); - if (!f) + if (out) { - ERR("cannot open %s", out); - exit(-1); + f = fopen(out, "wb"); + if (!f) + { + ERR("cannot open %s", out); + exit(-1); + } } if (fwrite(data, size, 1, f) != 1) { - ERR("cannot write to %s", out); + ERR("cannot write to %s", out ? out : "standard output"); exit(-1); } - fclose(f); + if (out) fclose(f); free(data); eet_close(ef); } /* do_eet_extract */ @@ -125,7 +128,7 @@ do_eet_decode(const char *file, const char *crypto_key) { Eet_File *ef; - FILE *f; + FILE *f = stdout; ef = eet_open(file, EET_FILE_MODE_READ); if (!ef) @@ -134,20 +137,23 @@ do_eet_decode(const char *file, exit(-1); } - f = fopen(out, "wb"); - if (!f) + if (out) { - ERR("cannot open %s", out); - exit(-1); + f = fopen(out, "wb"); + if (!f) + { + ERR("cannot open %s", out); + exit(-1); + } } if (!eet_data_dump_cipher(ef, key, crypto_key, do_eet_decode_dump, f)) { - ERR("cannot write to %s", out); + ERR("cannot write to %s", out ? out : "standard output"); exit(-1); } - fclose(f); + if (out) fclose(f); eet_close(ef); } /* do_eet_decode */ @@ -352,9 +358,9 @@ main(int argc, help: printf( "Usage:\n" - " eet -l FILE.EET list all keys in FILE.EET\n" - " eet -x FILE.EET KEY OUT-FILE [CRYPTO_KEY] extract data stored in KEY in FILE.EET and write to OUT-FILE\n" - " eet -d FILE.EET KEY OUT-FILE [CRYPTO_KEY] extract and decode data stored in KEY in FILE.EET and write to OUT-FILE\n" + " eet -l FILE.EET list all keys in FILE.EET\n" + " eet -x FILE.EET KEY [OUT-FILE] [CRYPTO_KEY] extract data stored in KEY in FILE.EET and write to OUT-FILE or standard output\n" + " eet -d FILE.EET KEY [OUT-FILE] [CRYPTO_KEY] extract and decode data stored in KEY in FILE.EET and write to OUT-FILE or standard output\n" " eet -i FILE.EET KEY IN-FILE COMPRESS [CRYPTO_KEY] insert data to KEY in FILE.EET from IN-FILE and if COMPRESS is 1, compress it\n" " eet -e FILE.EET KEY IN-FILE COMPRESS [CRYPTO_KEY] insert and encode to KEY in FILE.EET from IN-FILE and if COMPRESS is 1, compress it\n" " eet -r FILE.EET KEY remove KEY in FILE.EET\n" @@ -369,19 +375,47 @@ help: goto help; else if ((!strcmp(argv[1], "-l")) && (argc > 2)) do_eet_list(argv[2]); - else if ((!strcmp(argv[1], "-x")) && (argc > 4)) + else if ((!strcmp(argv[1], "-x")) && (argc > 3)) { - if (argc > 5) - do_eet_extract(argv[2], argv[3], argv[4], argv[5]); - else - do_eet_extract(argv[2], argv[3], argv[4], NULL); + switch (argc) + { + case 4: + { + do_eet_extract(argv[2], argv[3], NULL, NULL); + break; + } + case 5: + { + do_eet_extract(argv[2], argv[3], argv[4], NULL); + break; + } + default: + { + do_eet_extract(argv[2], argv[3], argv[4], argv[5]); + break; + } + } } - else if ((!strcmp(argv[1], "-d")) && (argc > 4)) + else if ((!strcmp(argv[1], "-d")) && (argc > 3)) { - if (argc > 5) - do_eet_decode(argv[2], argv[3], argv[4], argv[5]); - else - do_eet_decode(argv[2], argv[3], argv[4], NULL); + switch (argc) + { + case 4: + { + do_eet_decode(argv[2], argv[3], NULL, NULL); + break; + } + case 5: + { + do_eet_decode(argv[2], argv[3], argv[4], NULL); + break; + } + default: + { + do_eet_decode(argv[2], argv[3], argv[4], argv[5]); + break; + } + } } else if ((!strcmp(argv[1], "-i")) && (argc > 5)) { diff --git a/libraries/eet/src/examples/Makefile.am b/libraries/eet/src/examples/Makefile.am index 8279445..6c5a324 100644 --- a/libraries/eet/src/examples/Makefile.am +++ b/libraries/eet/src/examples/Makefile.am @@ -1,6 +1,6 @@ MAINTAINERCLEANFILES = Makefile.in -pkglibdir = $(datadir)/$(PACKAGE)/examples +examplesdir = $(datadir)/$(PACKAGE)/examples if BUILD_EXAMPLES AM_CPPFLAGS = \ @@ -8,7 +8,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ @EINA_CFLAGS@ -pkglib_PROGRAMS = eet_basic eet_file eet_data_simple eet_data_nested eet_data_file_descriptor_01 eet_data_file_descriptor_02 eet_data_cipher_decipher +examples_PROGRAMS = eet_basic eet_file eet_data_simple eet_data_nested eet_data_file_descriptor_01 eet_data_file_descriptor_02 eet_data_cipher_decipher eet_basic_SOURCES = eet-basic.c eet_basic_LDADD = $(top_builddir)/src/lib/libeet.la @EINA_LIBS@ diff --git a/libraries/eet/src/examples/Makefile.in b/libraries/eet/src/examples/Makefile.in index d24b728..5830132 100644 --- a/libraries/eet/src/examples/Makefile.in +++ b/libraries/eet/src/examples/Makefile.in @@ -19,6 +19,7 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 @@ -34,7 +35,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@BUILD_EXAMPLES_TRUE@pkglib_PROGRAMS = eet_basic$(EXEEXT) \ +@BUILD_EXAMPLES_TRUE@examples_PROGRAMS = eet_basic$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ eet_file$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ eet_data_simple$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ eet_data_nested$(EXEEXT) \ @@ -70,8 +71,8 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)" -PROGRAMS = $(pkglib_PROGRAMS) +am__installdirs = "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)" +PROGRAMS = $(examples_PROGRAMS) am__eet_basic_SOURCES_DIST = eet-basic.c @BUILD_EXAMPLES_TRUE@am_eet_basic_OBJECTS = eet-basic.$(OBJEXT) eet_basic_OBJECTS = $(am_eet_basic_OBJECTS) @@ -184,7 +185,6 @@ DATA = $(files_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -pkglibdir = $(datadir)/$(PACKAGE)/examples ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ @@ -265,8 +265,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -335,6 +333,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in +examplesdir = $(datadir)/$(PACKAGE)/examples @BUILD_EXAMPLES_TRUE@AM_CPPFLAGS = \ @BUILD_EXAMPLES_TRUE@-I. \ @BUILD_EXAMPLES_TRUE@-I$(top_srcdir)/src/lib \ @@ -390,10 +389,10 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-pkglibPROGRAMS: $(pkglib_PROGRAMS) +install-examplesPROGRAMS: $(examples_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" - @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" + @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -410,23 +409,23 @@ install-pkglibPROGRAMS: $(pkglib_PROGRAMS) while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(examplesdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(examplesdir)$$dir" || exit $$?; \ } \ ; done -uninstall-pkglibPROGRAMS: +uninstall-examplesPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files + echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(examplesdir)" && rm -f $$files -clean-pkglibPROGRAMS: - @list='$(pkglib_PROGRAMS)'; test -n "$$list" || exit 0; \ +clean-examplesPROGRAMS: + @list='$(examples_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ @@ -605,7 +604,7 @@ check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)"; do \ + for dir in "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -636,7 +635,7 @@ maintainer-clean-generic: -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am -clean-am: clean-generic clean-libtool clean-pkglibPROGRAMS \ +clean-am: clean-examplesPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am @@ -657,13 +656,13 @@ info: info-am info-am: -install-data-am: install-filesDATA +install-data-am: install-examplesPROGRAMS install-filesDATA install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-pkglibPROGRAMS +install-exec-am: install-html: install-html-am @@ -703,24 +702,25 @@ ps: ps-am ps-am: -uninstall-am: uninstall-filesDATA uninstall-pkglibPROGRAMS +uninstall-am: uninstall-examplesPROGRAMS uninstall-filesDATA .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkglibPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-filesDATA \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-pkglibPROGRAMS \ +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-examplesPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am \ + install-examplesPROGRAMS install-exec install-exec-am \ + install-filesDATA install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-filesDATA \ - uninstall-pkglibPROGRAMS + tags uninstall uninstall-am uninstall-examplesPROGRAMS \ + uninstall-filesDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/libraries/eet/src/lib/Eet.h b/libraries/eet/src/lib/Eet.h index 8fda1e0..2df7fbf 100644 --- a/libraries/eet/src/lib/Eet.h +++ b/libraries/eet/src/lib/Eet.h @@ -188,7 +188,7 @@ extern "C" { */ #define EET_VERSION_MAJOR 1 -#define EET_VERSION_MINOR 4 +#define EET_VERSION_MINOR 6 /** * @typedef Eet_Version * @@ -755,7 +755,7 @@ eet_delete(Eet_File *ef, /** * Alias a specific section to another one. Destination may exist or not, - * no check are done. + * no checks are done. * @param ef A valid eet file handle opened for writing. * @param name Name of the new entry. eg: "/base/file_i_want". * @param destination Actual source of the aliased entry eg: "/base/the_real_stuff_i_want". @@ -775,6 +775,19 @@ eet_alias(Eet_File *ef, int compress); /** + * Retrieve the filename of an Eet_File + * @param ef A valid eet file handle opened for writing. + * @return The stringshared file string opened with eet_open(), or NULL on error + * + * @note This function will return NULL for files opened with eet_memopen_read() + * + * @since 1.6 + * @ingroup Eet_File_Group + */ +EAPI const char * +eet_file_get(Eet_File *ef); + +/** * Retrieve the destination name of an alias * @param ef A valid eet file handle opened for writing * @param name Name of the entry. eg: "/base/file_i_want" diff --git a/libraries/eet/src/lib/Eet_private.h b/libraries/eet/src/lib/Eet_private.h index 83f4c18..c04daf0 100644 --- a/libraries/eet/src/lib/Eet_private.h +++ b/libraries/eet/src/lib/Eet_private.h @@ -66,6 +66,126 @@ struct _Eet_Node Eet_Node_Data data; }; +typedef struct _Eet_File_Header Eet_File_Header; +typedef struct _Eet_File_Node Eet_File_Node; +typedef struct _Eet_File_Directory Eet_File_Directory; + +struct _Eet_File +{ + const char *path; + Eina_File *readfp; + Eet_File_Header *header; + Eet_Dictionary *ed; + Eet_Key *key; + const unsigned char *data; + const void *x509_der; + const void *signature; + void *sha1; + + Eet_File_Mode mode; + + int magic; + int references; + + unsigned long int data_size; + int x509_length; + unsigned int signature_length; + int sha1_length; + + Eina_Lock file_lock; + + unsigned char writes_pending : 1; + unsigned char delete_me_now : 1; +}; + +struct _Eet_File_Header +{ + int magic; + Eet_File_Directory *directory; +}; + +struct _Eet_File_Directory +{ + int size; + Eet_File_Node **nodes; +}; + +struct _Eet_File_Node +{ + char *name; + void *data; + Eet_File_Node *next; /* FIXME: make buckets linked lists */ + + unsigned long int offset; + unsigned long int dictionary_offset; + unsigned long int name_offset; + + unsigned int name_size; + unsigned int size; + unsigned int data_size; + + unsigned char free_name : 1; + unsigned char compression : 1; + unsigned char ciphered : 1; + unsigned char alias : 1; +}; + +#if 0 +/* Version 2 */ +/* NB: all int's are stored in network byte order on disk */ +/* file format: */ +int magic; /* magic number ie 0x1ee7ff00 */ +int num_directory_entries; /* number of directory entries to follow */ +int bytes_directory_entries; /* bytes of directory entries to follow */ +struct +{ + int offset; /* bytes offset into file for data chunk */ + int flags; /* flags - for now 0 = uncompressed and clear, 1 = compressed and clear, 2 = uncompressed and ciphered, 3 = compressed and ciphered */ + int size; /* size of the data chunk */ + int data_size; /* size of the (uncompressed) data chunk */ + int name_size; /* length in bytes of the name field */ + char name[name_size]; /* name string (variable length) and \0 terminated */ +} directory[num_directory_entries]; +/* and now startes the data stream... */ +#endif /* if 0 */ + +#if 0 +/* Version 3 */ +/* NB: all int's are stored in network byte order on disk */ +/* file format: */ +int magic; /* magic number ie 0x1ee70f42 */ +int num_directory_entries; /* number of directory entries to follow */ +int num_dictionary_entries; /* number of dictionary entries to follow */ +struct +{ + int data_offset; /* bytes offset into file for data chunk */ + int size; /* size of the data chunk */ + int data_size; /* size of the (uncompressed) data chunk */ + int name_offset; /* bytes offset into file for name string */ + int name_size; /* length in bytes of the name field */ + int flags; /* bit flags - for now: + bit 0 => compresion on/off + bit 1 => ciphered on/off + bit 2 => alias + */ +} directory[num_directory_entries]; +struct +{ + int hash; + int offset; + int size; + int prev; + int next; +} dictionary[num_dictionary_entries]; +/* now start the string stream. */ +/* and right after them the data stream. */ +int magic_sign; /* Optional, only if the eet file is signed. */ +int signature_length; /* Signature length. */ +int x509_length; /* Public certificate that signed the file. */ +char signature[signature_length]; /* The signature. */ +char x509[x509_length]; /* The public certificate. */ +#endif /* if 0 */ + /* * variable and macros used for the eina_log module */ @@ -178,6 +298,21 @@ Eet_Node * void eet_node_free(Eet_Node *node); + +#define GENERIC_ALLOC_FREE_HEADER(TYPE, Type) \ + TYPE *Type##_malloc(unsigned int); \ + TYPE *Type##_calloc(unsigned int); \ + void Type##_mp_free(TYPE *e); + +GENERIC_ALLOC_FREE_HEADER(Eet_File_Directory, eet_file_directory); +GENERIC_ALLOC_FREE_HEADER(Eet_File_Node, eet_file_node); +GENERIC_ALLOC_FREE_HEADER(Eet_File_Header, eet_file_header); +GENERIC_ALLOC_FREE_HEADER(Eet_Dictionary, eet_dictionary); +GENERIC_ALLOC_FREE_HEADER(Eet_File, eet_file); + +Eina_Bool eet_mempool_init(void); +void eet_mempool_shutdown(void); + #ifndef PATH_MAX # define PATH_MAX 4096 #endif /* ifndef PATH_MAX */ diff --git a/libraries/eet/src/lib/Makefile.am b/libraries/eet/src/lib/Makefile.am index 4633749..ae60168 100644 --- a/libraries/eet/src/lib/Makefile.am +++ b/libraries/eet/src/lib/Makefile.am @@ -22,6 +22,7 @@ includesdir = $(includedir)/eet-@VMAJ@ lib_LTLIBRARIES = libeet.la base_sources = \ +eet_alloc.c \ eet_lib.c \ eet_data.c \ eet_image.c \ diff --git a/libraries/eet/src/lib/Makefile.in b/libraries/eet/src/lib/Makefile.in index f80bcd8..2a3fec0 100644 --- a/libraries/eet/src/lib/Makefile.in +++ b/libraries/eet/src/lib/Makefile.in @@ -80,13 +80,14 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libeet_la_DEPENDENCIES = -am__libeet_la_SOURCES_DIST = eet_lib.c eet_data.c eet_image.c \ - eet_cipher.c eet_dictionary.c eet_node.c eet_utils.c \ - eet_connection.c -am__objects_1 = libeet_la-eet_lib.lo libeet_la-eet_data.lo \ - libeet_la-eet_image.lo libeet_la-eet_cipher.lo \ - libeet_la-eet_dictionary.lo libeet_la-eet_node.lo \ - libeet_la-eet_utils.lo libeet_la-eet_connection.lo +am__libeet_la_SOURCES_DIST = eet_alloc.c eet_lib.c eet_data.c \ + eet_image.c eet_cipher.c eet_dictionary.c eet_node.c \ + eet_utils.c eet_connection.c +am__objects_1 = libeet_la-eet_alloc.lo libeet_la-eet_lib.lo \ + libeet_la-eet_data.lo libeet_la-eet_image.lo \ + libeet_la-eet_cipher.lo libeet_la-eet_dictionary.lo \ + libeet_la-eet_node.lo libeet_la-eet_utils.lo \ + libeet_la-eet_connection.lo @EET_AMALGAMATION_FALSE@am_libeet_la_OBJECTS = $(am__objects_1) @EET_AMALGAMATION_TRUE@nodist_libeet_la_OBJECTS = \ @EET_AMALGAMATION_TRUE@ libeet_la-eet_amalgamation.lo @@ -210,8 +211,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -299,6 +298,7 @@ includes_HEADERS = Eet.h includesdir = $(includedir)/eet-@VMAJ@ lib_LTLIBRARIES = libeet.la base_sources = \ +eet_alloc.c \ eet_lib.c \ eet_data.c \ eet_image.c \ @@ -388,6 +388,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_la-eet_alloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_la-eet_amalgamation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_la-eet_cipher.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeet_la-eet_connection.Plo@am__quote@ @@ -422,6 +423,14 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +libeet_la-eet_alloc.lo: eet_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -MT libeet_la-eet_alloc.lo -MD -MP -MF $(DEPDIR)/libeet_la-eet_alloc.Tpo -c -o libeet_la-eet_alloc.lo `test -f 'eet_alloc.c' || echo '$(srcdir)/'`eet_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeet_la-eet_alloc.Tpo $(DEPDIR)/libeet_la-eet_alloc.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eet_alloc.c' object='libeet_la-eet_alloc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -c -o libeet_la-eet_alloc.lo `test -f 'eet_alloc.c' || echo '$(srcdir)/'`eet_alloc.c + libeet_la-eet_lib.lo: eet_lib.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeet_la_CFLAGS) $(CFLAGS) -MT libeet_la-eet_lib.lo -MD -MP -MF $(DEPDIR)/libeet_la-eet_lib.Tpo -c -o libeet_la-eet_lib.lo `test -f 'eet_lib.c' || echo '$(srcdir)/'`eet_lib.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeet_la-eet_lib.Tpo $(DEPDIR)/libeet_la-eet_lib.Plo diff --git a/libraries/eet/src/lib/eet_alloc.c b/libraries/eet/src/lib/eet_alloc.c new file mode 100644 index 0000000..85351ad --- /dev/null +++ b/libraries/eet/src/lib/eet_alloc.c @@ -0,0 +1,93 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include "Eet.h" +#include "Eet_private.h" + +typedef struct _Eet_Mempool Eet_Mempool; +struct _Eet_Mempool +{ + const char *name; + Eina_Mempool *mp; + size_t size; +}; + +#define GENERIC_ALLOC_FREE(TYPE, Type) \ + Eet_Mempool Type##_mp = { #TYPE, NULL, sizeof (TYPE) }; \ + \ + TYPE * \ + Type##_malloc(unsigned int num) \ + { \ + return eina_mempool_malloc(Type##_mp.mp, num * sizeof (TYPE)); \ + } \ + TYPE * \ + Type##_calloc(unsigned int num) \ + { \ + return eina_mempool_calloc(Type##_mp.mp, num * sizeof (TYPE)); \ + } \ + void \ + Type##_mp_free(TYPE *e) \ + { \ + eina_mempool_free(Type##_mp.mp, e); \ + } + +GENERIC_ALLOC_FREE(Eet_File_Directory, eet_file_directory); +GENERIC_ALLOC_FREE(Eet_File_Node, eet_file_node); +GENERIC_ALLOC_FREE(Eet_File_Header, eet_file_header); +GENERIC_ALLOC_FREE(Eet_Dictionary, eet_dictionary); +GENERIC_ALLOC_FREE(Eet_File, eet_file); + +static Eet_Mempool *mempool_array[] = { + &eet_file_directory_mp, + &eet_file_node_mp, + &eet_file_header_mp, + &eet_dictionary_mp, + &eet_file_mp, +}; + +Eina_Bool +eet_mempool_init(void) +{ + const char *choice; + unsigned int i; + + choice = getenv("EINA_MEMPOOL"); + if ((!choice) || (!choice[0])) + choice = "chained_mempool"; + + for (i = 0; i < sizeof (mempool_array) / sizeof (mempool_array[0]); ++i) + { + retry: + mempool_array[i]->mp = eina_mempool_add(choice, mempool_array[i]->name, NULL, mempool_array[i]->size, 64); + if (!mempool_array[i]->mp) + { + if (!strcmp(choice, "pass_through")) + { + ERR("Falling back to pass through ! Previously tried '%s' mempool.", choice); + choice = "pass_through"; + goto retry; + } + else + { + ERR("Impossible to allocate mempool '%s' !", choice); + return EINA_FALSE; + } + } + } + return EINA_TRUE; +} + +void +eet_mempool_shutdown(void) +{ + unsigned int i; + + for (i = 0; i < sizeof (mempool_array) / sizeof (mempool_array[0]); ++i) + { + eina_mempool_del(mempool_array[i]->mp); + mempool_array[i]->mp = NULL; + } +} + diff --git a/libraries/eet/src/lib/eet_cipher.c b/libraries/eet/src/lib/eet_cipher.c index 89ee65d..37a0899 100644 --- a/libraries/eet/src/lib/eet_cipher.c +++ b/libraries/eet/src/lib/eet_cipher.c @@ -275,7 +275,7 @@ on_error: cb = NULL; #endif /* ifdef HAVE_SIGNATURE */ return NULL; -} /* eet_identity_open */ +} EAPI void eet_identity_close(Eet_Key *key) @@ -295,7 +295,7 @@ eet_identity_close(Eet_Key *key) #else key = NULL; #endif /* ifdef HAVE_SIGNATURE */ -} /* eet_identity_close */ +} EAPI void eet_identity_print(Eet_Key *key, @@ -419,7 +419,7 @@ on_error: out = NULL; ERR("You need to compile signature support in EET."); #endif /* ifdef HAVE_SIGNATURE */ -} /* eet_identity_print */ +} void eet_identity_ref(Eet_Key *key) @@ -428,7 +428,7 @@ eet_identity_ref(Eet_Key *key) return; key->references++; -} /* eet_identity_ref */ +} void eet_identity_unref(Eet_Key *key) @@ -438,7 +438,7 @@ eet_identity_unref(Eet_Key *key) key->references--; eet_identity_close(key); -} /* eet_identity_unref */ +} void * eet_identity_compute_sha1(const void *data_base, @@ -479,7 +479,7 @@ eet_identity_compute_sha1(const void *data_base, #endif /* ifdef HAVE_SIGNATURE */ return result; -} /* eet_identity_compute_sha1 */ +} Eet_Error eet_identity_sign(FILE *fp, @@ -650,7 +650,7 @@ on_error: key = NULL; return EET_ERROR_NOT_IMPLEMENTED; #endif /* ifdef HAVE_SIGNATURE */ -} /* eet_identity_sign */ +} const void * eet_identity_check(const void *data_base, @@ -830,7 +830,7 @@ eet_identity_check(const void *data_base, x509_length = NULL; return NULL; #endif /* ifdef HAVE_SIGNATURE */ -} /* eet_identity_check */ +} EAPI void eet_identity_certificate_print(const unsigned char *certificate, @@ -896,7 +896,7 @@ on_error: out = NULL; ERR("You need to compile signature support in EET."); #endif /* ifdef HAVE_SIGNATURE */ -} /* eet_identity_certificate_print */ +} Eet_Error eet_cipher(const void *data, @@ -1073,7 +1073,7 @@ on_error: (void)result_length; return EET_ERROR_NOT_IMPLEMENTED; #endif /* ifdef HAVE_CIPHER */ -} /* eet_cipher */ +} Eet_Error eet_decipher(const void *data, @@ -1224,7 +1224,7 @@ on_error: (void)result_length; return EET_ERROR_NOT_IMPLEMENTED; #endif /* ifdef HAVE_CIPHER */ -} /* eet_decipher */ +} #ifdef HAVE_CIPHER # ifdef HAVE_GNUTLS @@ -1265,7 +1265,7 @@ eet_hmac_sha1(const void *key, gcry_md_close(mdh); return 0; -} /* eet_hmac_sha1 */ +} # endif /* ifdef HAVE_GNUTLS */ @@ -1337,6 +1337,6 @@ eet_pbkdf2_sha1(const char *key, HMAC_cleanup(&hctx); # endif /* ifdef HAVE_GNUTLS */ return 0; -} /* eet_pbkdf2_sha1 */ +} #endif /* ifdef HAVE_CIPHER */ diff --git a/libraries/eet/src/lib/eet_connection.c b/libraries/eet/src/lib/eet_connection.c index 6171b7e..7b6b934 100644 --- a/libraries/eet/src/lib/eet_connection.c +++ b/libraries/eet/src/lib/eet_connection.c @@ -35,6 +35,8 @@ void *alloca(size_t); #include "Eet.h" #include "Eet_private.h" +/* max message size: 1Mb - raised from original 64Kb */ +#define MAX_MSG_SIZE (1024 * 1024) #define MAGIC_EET_DATA_PACKET 0x4270ACE1 struct _Eet_Connection @@ -56,74 +58,62 @@ eet_connection_new(Eet_Read_Cb *eet_read_cb, const void *user_data) { Eet_Connection *conn; - - if (!eet_read_cb || !eet_write_cb) - return NULL; - + + if ((!eet_read_cb) || (!eet_write_cb)) return NULL; + conn = calloc(1, sizeof (Eet_Connection)); - if (!conn) - return NULL; - + if (!conn) return NULL; conn->eet_read_cb = eet_read_cb; conn->eet_write_cb = eet_write_cb; conn->user_data = (void *)user_data; - return conn; -} /* eet_connection_new */ +} EAPI int eet_connection_received(Eet_Connection *conn, const void *data, size_t size) { - if ((!conn) || (!data) || (!size)) - return size; - - do { + if ((!conn) || (!data) || (!size)) return size; + do + { size_t copy_size; - + if (conn->size == 0) { const int *msg; size_t packet_size; - - if (size < sizeof (int) * 2) - break; + + if (size < (sizeof(int) * 2)) break; msg = data; /* Check the magic */ - if (ntohl(msg[0]) != MAGIC_EET_DATA_PACKET) - break; + if (ntohl(msg[0]) != MAGIC_EET_DATA_PACKET) break; packet_size = ntohl(msg[1]); - /* Message should always be under 64K */ - if (packet_size > 64 * 1024) - break; + /* Message should always be under MAX_MSG_SIZE */ + if (packet_size > MAX_MSG_SIZE) break; data = (void *)(msg + 2); - size -= sizeof (int) * 2; + size -= sizeof(int) * 2; if ((size_t)packet_size <= size) { - /* Not a partial receive, go the quick way. */ - if (!conn->eet_read_cb(data, packet_size, conn->user_data)) - break; - - data = (void *)((char *)data + packet_size); - size -= packet_size; - - conn->received = 0; - continue; + /* Not a partial receive, go the quick way. */ + if (!conn->eet_read_cb(data, packet_size, conn->user_data)) + break; + + data = (void *)((char *)data + packet_size); + size -= packet_size; + conn->received = 0; + continue; } - conn->size = packet_size; if (conn->allocated < conn->size) { void *tmp; - + tmp = realloc(conn->buffer, conn->size); - if (!tmp) - break; - + if (!tmp) break; conn->buffer = tmp; conn->allocated = conn->size; } @@ -132,33 +122,33 @@ eet_connection_received(Eet_Connection *conn, /* Partial receive */ copy_size = (conn->size - conn->received >= - size) ? size : conn->size - conn->received; + size) ? size : conn->size - conn->received; memcpy((char *)conn->buffer + conn->received, data, copy_size); - + conn->received += copy_size; data = (void *)((char *)data + copy_size); size -= copy_size; - + if (conn->received == conn->size) { size_t data_size; - + data_size = conn->size; conn->size = 0; conn->received = 0; - /* Completed a packet. */ if (!conn->eet_read_cb(conn->buffer, data_size, conn->user_data)) { - /* Something goes wrong. Stop now. */ - size += data_size; - break; + /* Something goes wrong. Stop now. */ + size += data_size; + break; } } - } while (size > 0); - + } + while (size > 0); + return size; -} /* eet_connection_received */ +} static Eina_Bool _eet_connection_raw_send(Eet_Connection *conn, @@ -167,21 +157,17 @@ _eet_connection_raw_send(Eet_Connection *conn, { int *message; - /* Message should never be above 64K */ - if (data_size > 64 * 1024) - return EINA_FALSE; - - message = alloca(data_size + sizeof (int) * 2); + /* Message should always be under MAX_MSG_SIZE */ + if (data_size > MAX_MSG_SIZE) return EINA_FALSE; + message = alloca(data_size + (sizeof(int) * 2)); message[0] = htonl(MAGIC_EET_DATA_PACKET); message[1] = htonl(data_size); - memcpy(message + 2, data, data_size); - conn->eet_write_cb(message, - data_size + sizeof (int) * 2, + data_size + (sizeof(int) * 2), conn->user_data); return EINA_TRUE; -} /* _eet_connection_raw_send */ +} EAPI Eina_Bool eet_connection_send(Eet_Connection *conn, @@ -197,15 +183,11 @@ eet_connection_send(Eet_Connection *conn, data_in, cipher_key, &data_size); - if (!flat_data) - return EINA_FALSE; - - if (_eet_connection_raw_send(conn, flat_data, data_size)) - ret = EINA_TRUE; - + if (!flat_data) return EINA_FALSE; + if (_eet_connection_raw_send(conn, flat_data, data_size)) ret = EINA_TRUE; free(flat_data); return ret; -} /* eet_connection_send */ +} EAPI Eina_Bool eet_connection_node_send(Eet_Connection *conn, @@ -217,15 +199,12 @@ eet_connection_node_send(Eet_Connection *conn, Eina_Bool ret = EINA_FALSE; data = eet_data_node_encode_cipher(node, cipher_key, &data_size); - if (!data) - return EINA_FALSE; - + if (!data) return EINA_FALSE; if (_eet_connection_raw_send(conn, data, data_size)) ret = EINA_TRUE; - free(data); return ret; -} /* eet_connection_node_send */ +} EAPI void * eet_connection_close(Eet_Connection *conn, @@ -233,17 +212,11 @@ eet_connection_close(Eet_Connection *conn, { void *user_data; - if (!conn) - return NULL; - - if (on_going) - *on_going = conn->received == 0 ? EINA_FALSE : EINA_TRUE; - + if (!conn) return NULL; + if (on_going) *on_going = conn->received == 0 ? EINA_FALSE : EINA_TRUE; user_data = conn->user_data; - free(conn->buffer); free(conn); - return user_data; -} /* eet_connection_close */ +} diff --git a/libraries/eet/src/lib/eet_data.c b/libraries/eet/src/lib/eet_data.c index 23b0b97..56b9ee0 100644 --- a/libraries/eet/src/lib/eet_data.c +++ b/libraries/eet/src/lib/eet_data.c @@ -651,7 +651,7 @@ eet_data_get_char(const Eet_Dictionary *ed __UNUSED__, *d = *s; CONV8(*d); return sizeof(char); -} /* eet_data_get_char */ +} static void * eet_data_put_char(Eet_Dictionary *ed __UNUSED__, @@ -669,7 +669,7 @@ eet_data_put_char(Eet_Dictionary *ed __UNUSED__, CONV8(*d); *size_ret = sizeof(char); return d; -} /* eet_data_put_char */ +} /* SHORT TYPE */ static int @@ -687,7 +687,7 @@ eet_data_get_short(const Eet_Dictionary *ed __UNUSED__, d = (short *)dst; CONV16(*d); return sizeof(short); -} /* eet_data_get_short */ +} static void * eet_data_put_short(Eet_Dictionary *ed __UNUSED__, @@ -705,7 +705,7 @@ eet_data_put_short(Eet_Dictionary *ed __UNUSED__, CONV16(*d); *size_ret = sizeof(short); return d; -} /* eet_data_put_short */ +} /* INT TYPE */ static inline int @@ -723,7 +723,7 @@ eet_data_get_int(const Eet_Dictionary *ed __UNUSED__, d = (int *)dst; CONV32(*d); return sizeof(int); -} /* eet_data_get_int */ +} static void * eet_data_put_int(Eet_Dictionary *ed __UNUSED__, @@ -741,7 +741,7 @@ eet_data_put_int(Eet_Dictionary *ed __UNUSED__, CONV32(*d); *size_ret = sizeof(int); return d; -} /* eet_data_put_int */ +} /* LONG LONG TYPE */ static int @@ -759,7 +759,7 @@ eet_data_get_long_long(const Eet_Dictionary *ed __UNUSED__, d = (unsigned long long *)dst; CONV64(*d); return sizeof(unsigned long long); -} /* eet_data_get_long_long */ +} static void * eet_data_put_long_long(Eet_Dictionary *ed __UNUSED__, @@ -777,7 +777,7 @@ eet_data_put_long_long(Eet_Dictionary *ed __UNUSED__, CONV64(*d); *size_ret = sizeof(unsigned long long); return d; -} /* eet_data_put_long_long */ +} /* STRING TYPE */ static inline int @@ -796,7 +796,7 @@ eet_data_get_string_hash(const Eet_Dictionary *ed, } return -1; -} /* eet_data_get_string_hash */ +} static inline int eet_data_get_string(const Eet_Dictionary *ed, @@ -833,7 +833,7 @@ eet_data_get_string(const Eet_Dictionary *ed, *d = s; return strlen(s) + 1; -} /* eet_data_get_string */ +} static void * eet_data_put_string(Eet_Dictionary *ed, @@ -871,7 +871,7 @@ eet_data_put_string(Eet_Dictionary *ed, memcpy(d, s, len + 1); *size_ret = len + 1; return d; -} /* eet_data_put_string */ +} /* ALWAYS INLINED STRING TYPE */ static int @@ -881,7 +881,7 @@ eet_data_get_istring(const Eet_Dictionary *ed __UNUSED__, void *dst) { return eet_data_get_string(NULL, src, src_end, dst); -} /* eet_data_get_istring */ +} static void * eet_data_put_istring(Eet_Dictionary *ed __UNUSED__, @@ -889,7 +889,7 @@ eet_data_put_istring(Eet_Dictionary *ed __UNUSED__, int *size_ret) { return eet_data_put_string(NULL, src, size_ret); -} /* eet_data_put_istring */ +} /* ALWAYS NULL TYPE */ static int @@ -904,7 +904,7 @@ eet_data_get_null(const Eet_Dictionary *ed __UNUSED__, *d = NULL; return 1; -} /* eet_data_get_null */ +} static void * eet_data_put_null(Eet_Dictionary *ed __UNUSED__, @@ -913,7 +913,7 @@ eet_data_put_null(Eet_Dictionary *ed __UNUSED__, { *size_ret = 0; return NULL; -} /* eet_data_put_null */ +} /** * Fast lookups of simple doubles/floats. @@ -941,7 +941,7 @@ _eet_data_float_cache_get(const char *s, } return 0; -} /* _eet_data_float_cache_get */ +} static inline int _eet_data_double_cache_get(const char *s, @@ -963,7 +963,7 @@ _eet_data_double_cache_get(const char *s, } return 0; -} /* _eet_data_double_cache_get */ +} /* FLOAT TYPE */ static int @@ -1006,7 +1006,7 @@ eet_data_get_float(const Eet_Dictionary *ed, return -1; return 1; -} /* eet_data_get_float */ +} static void * eet_data_put_float(Eet_Dictionary *ed, @@ -1038,7 +1038,7 @@ eet_data_put_float(Eet_Dictionary *ed, return NULL; return eet_data_put_int(ed, &idx, size_ret); -} /* eet_data_put_float */ +} /* DOUBLE TYPE */ static int @@ -1082,7 +1082,7 @@ eet_data_get_double(const Eet_Dictionary *ed, return -1; return 1; -} /* eet_data_get_double */ +} static void * eet_data_put_double(Eet_Dictionary *ed, @@ -1115,7 +1115,7 @@ eet_data_put_double(Eet_Dictionary *ed, return NULL; return eet_data_put_int(ed, &idx, size_ret); -} /* eet_data_put_double */ +} static int eet_data_get_f32p32(const Eet_Dictionary *ed, @@ -1151,7 +1151,7 @@ eet_data_get_f32p32(const Eet_Dictionary *ed, return -1; return 1; -} /* eet_data_get_f32p32 */ +} static void * eet_data_put_f32p32(Eet_Dictionary *ed, @@ -1184,7 +1184,7 @@ eet_data_put_f32p32(Eet_Dictionary *ed, return NULL; return eet_data_put_int(ed, &idx, size_ret); -} /* eet_data_put_f32p32 */ +} static int eet_data_get_f16p16(const Eet_Dictionary *ed, @@ -1202,7 +1202,7 @@ eet_data_get_f16p16(const Eet_Dictionary *ed, *fp = eina_f32p32_to_f16p16(tmp); return 1; -} /* eet_data_get_f16p16 */ +} static void * eet_data_put_f16p16(Eet_Dictionary *ed, @@ -1213,7 +1213,7 @@ eet_data_put_f16p16(Eet_Dictionary *ed, tmp = eina_f16p16_to_f32p32((Eina_F16p16)(*(Eina_F16p16 *)src)); return eet_data_put_f32p32(ed, &tmp, size_ret); -} /* eet_data_put_f16p16 */ +} static int eet_data_get_f8p24(const Eet_Dictionary *ed, @@ -1231,7 +1231,7 @@ eet_data_get_f8p24(const Eet_Dictionary *ed, *fp = eina_f32p32_to_f8p24(tmp); return 1; -} /* eet_data_get_f8p24 */ +} static void * eet_data_put_f8p24(Eet_Dictionary *ed, @@ -1242,7 +1242,7 @@ eet_data_put_f8p24(Eet_Dictionary *ed, tmp = eina_f8p24_to_f32p32((Eina_F8p24)(*(Eina_F8p24 *)src)); return eet_data_put_f32p32(ed, &tmp, size_ret); -} /* eet_data_put_f8p24 */ +} static inline int eet_data_get_type(const Eet_Dictionary *ed, @@ -1255,7 +1255,7 @@ eet_data_get_type(const Eet_Dictionary *ed, ret = eet_basic_codec[type - 1].get(ed, src, src_end, dest); return ret; -} /* eet_data_get_type */ +} static inline void * eet_data_put_type(Eet_Dictionary *ed, @@ -1267,7 +1267,7 @@ eet_data_put_type(Eet_Dictionary *ed, ret = eet_basic_codec[type - 1].put(ed, src, size_ret); return ret; -} /* eet_data_put_type */ +} static inline Eina_Bool eet_data_type_match(int type1, @@ -1301,10 +1301,10 @@ eet_data_type_match(int type1, default: break; - } /* switch */ + } return EINA_FALSE; -} /* eet_data_type_match */ +} /* chunk format... * @@ -1359,7 +1359,7 @@ case EET_I_ ## Type: chnk->type = EET_T_ ## Type; break; default: return; - } /* switch */ + } } else if (chnk->type > EET_T_LAST) { @@ -1409,7 +1409,7 @@ case EET_I_ ## Type: chnk->type = EET_T_ ## Type; break; } return; -} /* eet_data_chunk_get */ +} static inline Eet_Data_Chunk * eet_data_chunk_new(void *data, @@ -1441,7 +1441,7 @@ eet_data_chunk_new(void *data, chnk->type = type; chnk->group_type = group_type; return chnk; -} /* eet_data_chunk_new */ +} static inline void eet_data_chunk_free(Eet_Data_Chunk *chnk) @@ -1450,7 +1450,7 @@ eet_data_chunk_free(Eet_Data_Chunk *chnk) free(chnk->name); free(chnk); -} /* eet_data_chunk_free */ +} static inline Eet_Data_Stream * eet_data_stream_new(void) @@ -1462,7 +1462,7 @@ eet_data_stream_new(void) return NULL; return ds; -} /* eet_data_stream_new */ +} static inline void eet_data_stream_free(Eet_Data_Stream *ds) @@ -1471,13 +1471,13 @@ eet_data_stream_free(Eet_Data_Stream *ds) free(ds->data); free(ds); -} /* eet_data_stream_free */ +} static inline void eet_data_stream_flush(Eet_Data_Stream *ds) { free(ds); -} /* eet_data_stream_flush */ +} static inline void eet_data_stream_write(Eet_Data_Stream *ds, @@ -1502,7 +1502,7 @@ eet_data_stream_write(Eet_Data_Stream *ds, p = ds->data; memcpy(p + ds->pos, data, size); ds->pos += size; -} /* eet_data_stream_write */ +} static void eet_data_chunk_put(Eet_Dictionary *ed, @@ -1541,7 +1541,7 @@ case EET_T_ ## Type: type += EET_I_ ## Type; break; default: return; - } /* switch */ + } buf[3] = type; } @@ -1578,7 +1578,7 @@ case EET_T_ ## Type: type += EET_I_ ## Type; break; free(string); on_error: free(size); -} /* eet_data_chunk_put */ +} /*---*/ @@ -1611,7 +1611,7 @@ _eet_descriptor_hash_new(Eet_Data_Descriptor *edd) edd->elements.hash.buckets[hash].next = bucket; } } -} /* _eet_descriptor_hash_new */ +} static void _eet_descriptor_hash_free(Eet_Data_Descriptor *edd) @@ -1632,7 +1632,7 @@ _eet_descriptor_hash_free(Eet_Data_Descriptor *edd) } if (edd->elements.hash.buckets) free(edd->elements.hash.buckets); -} /* _eet_descriptor_hash_free */ +} static Eet_Data_Element * _eet_descriptor_hash_find(Eet_Data_Descriptor *edd, @@ -1677,31 +1677,31 @@ _eet_descriptor_hash_find(Eet_Data_Descriptor *edd, bucket = bucket->next; } return NULL; -} /* _eet_descriptor_hash_find */ +} static void * _eet_mem_alloc(size_t size) { return calloc(1, size); -} /* _eet_mem_alloc */ +} static void _eet_mem_free(void *mem) { free(mem); -} /* _eet_mem_free */ +} static char * _eet_str_alloc(const char *str) { return strdup(str); -} /* _eet_str_alloc */ +} static void _eet_str_free(const char *str) { free((char *)str); -} /* _eet_str_free */ +} static Eina_Hash * _eet_eina_hash_add_alloc(Eina_Hash *hash, @@ -1716,7 +1716,7 @@ _eet_eina_hash_add_alloc(Eina_Hash *hash, eina_hash_add(hash, key, data); return hash; -} /* _eet_eina_hash_add_alloc */ +} static Eina_Hash * _eet_eina_hash_direct_add_alloc(Eina_Hash *hash, @@ -1731,18 +1731,18 @@ _eet_eina_hash_direct_add_alloc(Eina_Hash *hash, eina_hash_direct_add(hash, key, data); return hash; -} /* _eet_eina_hash_direct_add_alloc */ +} static char * _eet_str_direct_alloc(const char *str) { return (char *)str; -} /* _eet_str_direct_alloc */ +} static void _eet_str_direct_free(const char *str __UNUSED__) { -} /* _eet_str_direct_free */ +} static void _eet_eina_hash_foreach(void *hash, @@ -1751,14 +1751,14 @@ _eet_eina_hash_foreach(void *hash, { if (hash) eina_hash_foreach(hash, cb, fdata); -} /* _eet_eina_hash_foreach */ +} static void _eet_eina_hash_free(void *hash) { if (hash) eina_hash_free(hash); -} /* _eet_eina_hash_free */ +} /*---*/ EAPI Eina_Bool @@ -1792,7 +1792,7 @@ eet_eina_stream_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc, eddc->func.array_free = _eet_mem_free; return EINA_TRUE; -} /* eet_eina_stream_data_descriptor_class_set */ +} EAPI Eina_Bool eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc, @@ -1811,7 +1811,7 @@ eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc, eddc->func.str_direct_free = _eet_str_direct_free; return EINA_TRUE; -} /* eet_eina_file_data_descriptor_class_set */ +} static Eet_Data_Descriptor * _eet_data_descriptor_new(const Eet_Data_Descriptor_Class *eddc, @@ -1872,7 +1872,7 @@ _eet_data_descriptor_new(const Eet_Data_Descriptor_Class *eddc, } return edd; -} /* _eet_data_descriptor_new */ +} EAPI Eet_Data_Descriptor * eet_data_descriptor_new(const char *name, @@ -1905,31 +1905,31 @@ eet_data_descriptor_new(const char *name, eddc.func.hash_free = func_hash_free; return _eet_data_descriptor_new(&eddc, 0); -} /* eet_data_descriptor_new */ +} EAPI Eet_Data_Descriptor * eet_data_descriptor2_new(const Eet_Data_Descriptor_Class *eddc) { return _eet_data_descriptor_new(eddc, 1); -} /* eet_data_descriptor2_new */ +} EAPI Eet_Data_Descriptor * eet_data_descriptor3_new(const Eet_Data_Descriptor_Class *eddc) { return _eet_data_descriptor_new(eddc, 2); -} /* eet_data_descriptor3_new */ +} EAPI Eet_Data_Descriptor * eet_data_descriptor_stream_new(const Eet_Data_Descriptor_Class *eddc) { return _eet_data_descriptor_new(eddc, 1); -} /* eet_data_descriptor_stream_new */ +} EAPI Eet_Data_Descriptor * eet_data_descriptor_file_new(const Eet_Data_Descriptor_Class *eddc) { return _eet_data_descriptor_new(eddc, 2); -} /* eet_data_descriptor_file_new */ +} EAPI void eet_data_descriptor_free(Eet_Data_Descriptor *edd) @@ -1942,7 +1942,7 @@ eet_data_descriptor_free(Eet_Data_Descriptor *edd) free(edd->elements.set); free(edd); -} /* eet_data_descriptor_free */ +} EAPI void eet_data_descriptor_element_add(Eet_Data_Descriptor *edd, @@ -2039,7 +2039,7 @@ eet_data_descriptor_element_add(Eet_Data_Descriptor *edd, ede->counter_name = counter_name; ede->subtype = subtype; -} /* eet_data_descriptor_element_add */ +} EAPI void * eet_data_read_cipher(Eet_File *ef, @@ -2075,7 +2075,7 @@ eet_data_read_cipher(Eet_File *ef, free((void *)data); return data_dec; -} /* eet_data_read_cipher */ +} EAPI Eet_Node * eet_data_node_read_cipher(Eet_File *ef, @@ -2110,7 +2110,7 @@ eet_data_node_read_cipher(Eet_File *ef, free((void *)data); return result; -} /* eet_data_node_read_cipher */ +} EAPI void * eet_data_read(Eet_File *ef, @@ -2118,7 +2118,7 @@ eet_data_read(Eet_File *ef, const char *name) { return eet_data_read_cipher(ef, edd, name, NULL); -} /* eet_data_read */ +} EAPI int eet_data_write_cipher(Eet_File *ef, @@ -2142,7 +2142,7 @@ eet_data_write_cipher(Eet_File *ef, val = eet_write_cipher(ef, name, data_enc, size, compress, cipher_key); free(data_enc); return val; -} /* eet_data_write_cipher */ +} EAPI int eet_data_write(Eet_File *ef, @@ -2152,7 +2152,7 @@ eet_data_write(Eet_File *ef, int compress) { return eet_data_write_cipher(ef, edd, name, NULL, data, compress); -} /* eet_data_write */ +} static void eet_free_context_init(Eet_Free_Context *context) @@ -2222,7 +2222,7 @@ _eet_free_hash(void *data) #endif /* if defined (_WIN64) || ((!defined (_WIN32)) && (LONG_BIT != 32)) */ return hash & 0xFF; -} /* _eet_free_hash */ +} static void _eet_free_add(Eet_Free *ef, @@ -2240,7 +2240,7 @@ _eet_free_add(Eet_Free *ef, return; eina_array_push(&ef->list[hash], data); -} /* _eet_free_add */ +} #if 0 static void @@ -2274,19 +2274,19 @@ _eet_free_reset(Eet_Free *ef) for (i = 0; i < EET_FREE_COUNT; ++i) eina_array_clean(&ef->list[i]); -} /* _eet_free_reset */ +} static void _eet_free_ref(Eet_Free *ef) { ef->ref++; -} /* _eet_free_ref */ +} static void _eet_free_unref(Eet_Free *ef) { ef->ref--; -} /* _eet_free_unref */ +} #define _eet_freelist_add(Ctx, Data) _eet_free_add(&Ctx->freelist, Data); #define _eet_freelist_del(Ctx, Data) _eet_free_del(&Ctx->freelist, Data); @@ -2316,7 +2316,7 @@ _eet_freelist_free(Eet_Free_Context *context, free(track); } _eet_free_reset(&context->freelist); -} /* _eet_freelist_free */ +} #define _eet_freelist_array_add(Ctx, Data) _eet_free_add(&Ctx->freelist_array, Data); #define _eet_freelist_array_del(Ctx, Data) _eet_free_del(&Ctx->freelist_array, Data); @@ -2351,7 +2351,7 @@ _eet_freelist_array_free(Eet_Free_Context *context, free(track); } _eet_free_reset(&context->freelist_array); -} /* _eet_freelist_array_free */ +} #define _eet_freelist_list_add(Ctx, Data) _eet_free_add(&Ctx->freelist_list, Data); #define _eet_freelist_list_del(Ctx, Data) _eet_free_del(&Ctx->freelist_list, Data); @@ -2379,7 +2379,7 @@ _eet_freelist_list_free(Eet_Free_Context *context, edd->func.list_free(*((void **)(track))); } _eet_free_reset(&context->freelist_list); -} /* _eet_freelist_list_free */ +} #define _eet_freelist_str_add(Ctx, Data) _eet_free_add(&Ctx->freelist_str, Data); #define _eet_freelist_str_del(Ctx, Data) _eet_free_del(&Ctx->freelist_str, Data); @@ -2409,7 +2409,7 @@ _eet_freelist_str_free(Eet_Free_Context *context, free(track); } _eet_free_reset(&context->freelist_str); -} /* _eet_freelist_str_free */ +} #define _eet_freelist_direct_str_add(Ctx, Data) _eet_free_add(&Ctx->freelist_direct_str, Data); #define _eet_freelist_direct_str_del(Ctx, Data) _eet_free_del(&Ctx->freelist_direct_str, Data); @@ -2439,7 +2439,7 @@ _eet_freelist_direct_str_free(Eet_Free_Context *context, free(track); } _eet_free_reset(&context->freelist_direct_str); -} /* _eet_freelist_direct_str_free */ +} #define _eet_freelist_hash_add(Ctx, Data) _eet_free_add(&Ctx->freelist_hash, Data); #define _eet_freelist_hash_del(Ctx, Data) _eet_free_del(&Ctx->freelist_hash, Data); @@ -2469,7 +2469,7 @@ _eet_freelist_hash_free(Eet_Free_Context *context, free(track); } _eet_free_reset(&context->freelist_hash); -} /* _eet_freelist_hash_free */ +} static void _eet_freelist_all_ref(Eet_Free_Context *freelist_context) @@ -2479,7 +2479,7 @@ _eet_freelist_all_ref(Eet_Free_Context *freelist_context) _eet_freelist_list_ref(freelist_context); _eet_freelist_hash_ref(freelist_context); _eet_freelist_direct_str_ref(freelist_context); -} /* _eet_freelist_all_ref */ +} static void _eet_freelist_all_unref(Eet_Free_Context *freelist_context) @@ -2489,7 +2489,7 @@ _eet_freelist_all_unref(Eet_Free_Context *freelist_context) _eet_freelist_list_unref(freelist_context); _eet_freelist_hash_unref(freelist_context); _eet_freelist_direct_str_unref(freelist_context); -} /* _eet_freelist_all_unref */ +} static int eet_data_descriptor_encode_hash_cb(void *hash __UNUSED__, @@ -2556,7 +2556,7 @@ eet_data_descriptor_encode_hash_cb(void *hash __UNUSED__, } return 1; -} /* eet_data_descriptor_encode_hash_cb */ +} static char * _eet_data_dump_token_get(const char *src, @@ -2639,7 +2639,7 @@ _eet_data_dump_token_get(const char *src, free(tok); return NULL; -} /* _eet_data_dump_token_get */ +} static void eet_data_encode(Eet_Dictionary *ed, @@ -2663,7 +2663,7 @@ eet_data_encode(Eet_Dictionary *ed, eet_data_chunk_put(ed, echnk, ds); eet_data_chunk_free(echnk); free(data); -} /* eet_data_encode */ +} static void * _eet_data_dump_encode(int parent_type, @@ -2976,7 +2976,7 @@ case Eet_Type: \ eet_data_chunk_free(chnk); return cdata; -} /* _eet_data_dump_encode */ +} static void * _eet_data_dump_parse(Eet_Dictionary *ed, @@ -3238,7 +3238,7 @@ _eet_data_dump_parse(Eet_Dictionary *ed, } return cdata; -} /* _eet_data_dump_parse */ +} #define NEXT_CHUNK(P, Size, Echnk, Ed) \ { \ @@ -3352,7 +3352,7 @@ _eet_data_descriptor_decode(Eet_Free_Context *context, case EET_G_VARIANT: default: goto error; - } /* switch */ + } } while (size > 0) @@ -3477,7 +3477,7 @@ error: /* FIXME: Warn that something goes wrong here. */ return NULL; -} /* _eet_data_descriptor_decode */ +} static int eet_data_get_list(Eet_Free_Context *context, @@ -3544,7 +3544,7 @@ eet_data_get_list(Eet_Free_Context *context, on_error: return 0; -} /* eet_data_get_list */ +} static int eet_data_get_hash(Eet_Free_Context *context, @@ -3629,7 +3629,7 @@ eet_data_get_hash(Eet_Free_Context *context, on_error: return 0; -} /* eet_data_get_hash */ +} /* var arrays and fixed arrays have to * get all chunks at once. for fixed arrays @@ -3793,7 +3793,7 @@ on_error: eet_node_del(tmp); return 0; -} /* eet_data_get_array */ +} static void eet_data_put_union(Eet_Dictionary *ed, @@ -3849,7 +3849,7 @@ eet_data_put_union(Eet_Dictionary *ed, break; } -} /* eet_data_put_union */ +} static int eet_data_get_union(Eet_Free_Context *context, @@ -3947,7 +3947,7 @@ eet_data_get_union(Eet_Free_Context *context, on_error: return 0; -} /* eet_data_get_union */ +} static void eet_data_put_variant(Eet_Dictionary *ed, @@ -4058,7 +4058,7 @@ eet_data_put_variant(Eet_Dictionary *ed, break; } -} /* eet_data_put_variant */ +} static int eet_data_get_variant(Eet_Free_Context *context, @@ -4213,7 +4213,7 @@ eet_data_get_variant(Eet_Free_Context *context, on_error: return 0; -} /* eet_data_get_variant */ +} static Eet_Node * eet_data_node_simple_type(int type, @@ -4249,8 +4249,8 @@ case Eet_Type: \ default: ERR("Unknow type passed to eet_data_node_simple_type"); return NULL; - } /* switch */ -} /* eet_data_node_simple_type */ + } +} static int eet_data_get_unknown(Eet_Free_Context *context, @@ -4366,7 +4366,7 @@ eet_data_get_unknown(Eet_Free_Context *context, } return 1; -} /* eet_data_get_unknown */ +} static void eet_data_put_array(Eet_Dictionary *ed, @@ -4442,7 +4442,7 @@ eet_data_put_array(Eet_Dictionary *ed, offset += subsize; } -} /* eet_data_put_array */ +} static void eet_data_put_unknown(Eet_Dictionary *ed, @@ -4471,7 +4471,7 @@ eet_data_put_unknown(Eet_Dictionary *ed, size, ede->type, ede->group_type); -} /* eet_data_put_unknown */ +} static void eet_data_put_list(Eet_Dictionary *ed, @@ -4512,7 +4512,7 @@ eet_data_put_list(Eet_Dictionary *ed, ede->group_type); } } -} /* eet_data_put_list */ +} static void eet_data_put_hash(Eet_Dictionary *ed, @@ -4529,7 +4529,7 @@ eet_data_put_hash(Eet_Dictionary *ed, fdata.ede = ede; fdata.ed = ed; edd->func.hash_foreach(l, eet_data_descriptor_encode_hash_cb, &fdata); -} /* eet_data_put_hash */ +} EAPI int eet_data_dump_cipher(Eet_File *ef, @@ -4570,7 +4570,7 @@ eet_data_dump_cipher(Eet_File *ef, free((void *)data); return result ? 1 : 0; -} /* eet_data_dump_cipher */ +} EAPI int eet_data_dump(Eet_File *ef, @@ -4579,7 +4579,7 @@ eet_data_dump(Eet_File *ef, void *dumpdata) { return eet_data_dump_cipher(ef, name, NULL, dumpfunc, dumpdata); -} /* eet_data_dump */ +} EAPI int eet_data_text_dump_cipher(const void *data_in, @@ -4624,7 +4624,7 @@ eet_data_text_dump_cipher(const void *data_in, free(ret); return result ? 1 : 0; -} /* eet_data_text_dump_cipher */ +} EAPI int eet_data_text_dump(const void *data_in, @@ -4633,7 +4633,7 @@ eet_data_text_dump(const void *data_in, void *dumpdata) { return eet_data_text_dump_cipher(data_in, NULL, size_in, dumpfunc, dumpdata); -} /* eet_data_text_dump */ +} EAPI void * eet_data_text_undump_cipher(const char *text, @@ -4666,7 +4666,7 @@ eet_data_text_undump_cipher(const char *text, } return ret; -} /* eet_data_text_undump_cipher */ +} EAPI void * eet_data_text_undump(const char *text, @@ -4674,7 +4674,7 @@ eet_data_text_undump(const char *text, int *size_ret) { return eet_data_text_undump_cipher(text, NULL, textlen, size_ret); -} /* eet_data_text_undump */ +} EAPI int eet_data_undump_cipher(Eet_File *ef, @@ -4698,7 +4698,7 @@ eet_data_undump_cipher(Eet_File *ef, val = eet_write_cipher(ef, name, data_enc, size, compress, cipher_key); free(data_enc); return val; -} /* eet_data_undump_cipher */ +} EAPI int eet_data_undump(Eet_File *ef, @@ -4708,7 +4708,7 @@ eet_data_undump(Eet_File *ef, int compress) { return eet_data_undump_cipher(ef, name, NULL, text, textlen, compress); -} /* eet_data_undump */ +} EAPI void * eet_data_descriptor_decode_cipher(Eet_Data_Descriptor *edd, @@ -4744,7 +4744,7 @@ eet_data_descriptor_decode_cipher(Eet_Data_Descriptor *edd, free(deciphered); return ret; -} /* eet_data_descriptor_decode_cipher */ +} EAPI void * eet_data_descriptor_decode(Eet_Data_Descriptor *edd, @@ -4752,7 +4752,7 @@ eet_data_descriptor_decode(Eet_Data_Descriptor *edd, int size_in) { return eet_data_descriptor_decode_cipher(edd, data_in, NULL, size_in); -} /* eet_data_descriptor_decode */ +} EAPI Eet_Node * eet_data_node_decode_cipher(const void *data_in, @@ -4787,7 +4787,7 @@ eet_data_node_decode_cipher(const void *data_in, free(deciphered); return ret; -} /* eet_data_node_decode_cipher */ +} static void * _eet_data_descriptor_encode(Eet_Dictionary *ed, @@ -4849,7 +4849,7 @@ _eet_data_descriptor_encode(Eet_Dictionary *ed, eet_data_chunk_free(chnk); return cdata; -} /* _eet_data_descriptor_encode */ +} EAPI int eet_data_node_write_cipher(Eet_File *ef, @@ -4872,7 +4872,7 @@ eet_data_node_write_cipher(Eet_File *ef, val = eet_write_cipher(ef, name, data_enc, size, compress, cipher_key); free(data_enc); return val; -} /* eet_data_node_write_cipher */ +} EAPI void * eet_data_node_encode_cipher(Eet_Node *node, @@ -4909,7 +4909,7 @@ eet_data_node_encode_cipher(Eet_Node *node, *size_ret = size; return ret; -} /* eet_data_node_encode_cipher */ +} EAPI void * eet_data_descriptor_encode_cipher(Eet_Data_Descriptor *edd, @@ -4947,7 +4947,7 @@ eet_data_descriptor_encode_cipher(Eet_Data_Descriptor *edd, *size_ret = size; return ret; -} /* eet_data_descriptor_encode_cipher */ +} EAPI void * eet_data_descriptor_encode(Eet_Data_Descriptor *edd, @@ -4955,7 +4955,7 @@ eet_data_descriptor_encode(Eet_Data_Descriptor *edd, int *size_ret) { return eet_data_descriptor_encode_cipher(edd, data_in, NULL, size_ret); -} /* eet_data_descriptor_encode */ +} EAPI void * eet_data_xattr_cipher_get(const char *filename, diff --git a/libraries/eet/src/lib/eet_dictionary.c b/libraries/eet/src/lib/eet_dictionary.c index 60d0ec1..287860d 100644 --- a/libraries/eet/src/lib/eet_dictionary.c +++ b/libraries/eet/src/lib/eet_dictionary.c @@ -16,34 +16,33 @@ eet_dictionary_add(void) { Eet_Dictionary *new; - new = calloc(1, sizeof (Eet_Dictionary)); + new = eet_dictionary_calloc(1); if (!new) return NULL; memset(new->hash, -1, sizeof (int) * 256); return new; -} /* eet_dictionary_add */ +} void eet_dictionary_free(Eet_Dictionary *ed) { - if (ed) - { - int i; + int i; - for (i = 0; i < ed->count; ++i) - if (ed->all[i].allocated) - eina_stringshare_del(ed->all[i].str); + if (!ed) return; - if (ed->all) - free(ed->all); + for (i = 0; i < ed->count; ++i) + if (ed->all[i].allocated) + eina_stringshare_del(ed->all[i].str); - if (ed->converts) eina_hash_free(ed->converts); + if (ed->all) + free(ed->all); - free(ed); - } -} /* eet_dictionary_free */ + if (ed->converts) eina_hash_free(ed->converts); + + eet_dictionary_mp_free(ed); +} static int _eet_dictionary_lookup(Eet_Dictionary *ed, @@ -77,7 +76,7 @@ _eet_dictionary_lookup(Eet_Dictionary *ed, return prev; return current; -} /* _eet_dictionary_lookup */ +} int eet_dictionary_string_add(Eet_Dictionary *ed, @@ -110,7 +109,7 @@ eet_dictionary_string_add(Eet_Dictionary *ed, total = ed->total + 8; - new = realloc(ed->all, sizeof (Eet_String) * total); + new = realloc(ed->all, total * sizeof(Eet_String)); if (!new) return -1; @@ -152,7 +151,7 @@ eet_dictionary_string_add(Eet_Dictionary *ed, } return ed->count++; -} /* eet_dictionary_string_add */ +} int eet_dictionary_string_get_size(const Eet_Dictionary *ed, @@ -168,7 +167,7 @@ eet_dictionary_string_get_size(const Eet_Dictionary *ed, return ed->all[idx].len; return 0; -} /* eet_dictionary_string_get_size */ +} int eet_dictionary_string_get_hash(const Eet_Dictionary *ed, @@ -184,7 +183,7 @@ eet_dictionary_string_get_hash(const Eet_Dictionary *ed, return ed->all[idx].hash; return -1; -} /* eet_dictionary_string_get_hash */ +} const char * eet_dictionary_string_get_char(const Eet_Dictionary *ed, @@ -210,7 +209,7 @@ eet_dictionary_string_get_char(const Eet_Dictionary *ed, } return NULL; -} /* eet_dictionary_string_get_char */ +} static inline Eina_Bool _eet_dictionary_string_get_me_cache(const char *s, @@ -227,7 +226,7 @@ _eet_dictionary_string_get_me_cache(const char *s, } return EINA_FALSE; -} /* _eet_dictionary_string_get_me_cache */ +} static inline Eina_Bool _eet_dictionary_string_get_float_cache(const char *s, @@ -248,7 +247,7 @@ _eet_dictionary_string_get_float_cache(const char *s, } return EINA_FALSE; -} /* _eet_dictionary_string_get_float_cache */ +} static inline Eina_Bool _eet_dictionary_string_get_double_cache(const char *s, @@ -269,7 +268,7 @@ _eet_dictionary_string_get_double_cache(const char *s, } return EINA_FALSE; -} /* _eet_dictionary_string_get_double_cache */ +} static inline Eina_Bool _eet_dictionary_test(const Eet_Dictionary *ed, @@ -289,7 +288,7 @@ _eet_dictionary_test(const Eet_Dictionary *ed, return EINA_FALSE; return EINA_TRUE; -} /* _eet_dictionary_test */ +} static Eet_Convert * eet_dictionary_convert_get(const Eet_Dictionary *ed, @@ -351,7 +350,7 @@ eet_dictionary_string_get_float(const Eet_Dictionary *ed, *result = convert->f; return EINA_TRUE; -} /* eet_dictionary_string_get_float */ +} Eina_Bool eet_dictionary_string_get_double(const Eet_Dictionary *ed, @@ -387,7 +386,7 @@ eet_dictionary_string_get_double(const Eet_Dictionary *ed, *result = convert->d; return EINA_TRUE; -} /* eet_dictionary_string_get_double */ +} Eina_Bool eet_dictionary_string_get_fp(const Eet_Dictionary *ed, @@ -416,7 +415,7 @@ eet_dictionary_string_get_fp(const Eet_Dictionary *ed, *result = convert->fp; return EINA_TRUE; -} /* eet_dictionary_string_get_fp */ +} EAPI int eet_dictionary_string_check(Eet_Dictionary *ed, @@ -435,5 +434,5 @@ eet_dictionary_string_check(Eet_Dictionary *ed, return 1; return 0; -} /* eet_dictionary_string_check */ +} diff --git a/libraries/eet/src/lib/eet_image.c b/libraries/eet/src/lib/eet_image.c index 79f6f90..8c6c03c 100644 --- a/libraries/eet/src/lib/eet_image.c +++ b/libraries/eet/src/lib/eet_image.c @@ -66,7 +66,7 @@ _eet_jpeg_membuf_src_init(j_decompress_ptr cinfo) { /* FIXME: Use attribute unused */ (void)cinfo; -} /* _eet_jpeg_membuf_src_init */ +} static boolean _eet_jpeg_membuf_src_fill(j_decompress_ptr cinfo) @@ -78,7 +78,7 @@ _eet_jpeg_membuf_src_fill(j_decompress_ptr cinfo) src->pub.next_input_byte = jpeg_eoi; return TRUE; -} /* _eet_jpeg_membuf_src_fill */ +} static void _eet_jpeg_membuf_src_skip(j_decompress_ptr cinfo, @@ -88,7 +88,7 @@ _eet_jpeg_membuf_src_skip(j_decompress_ptr cinfo, src->pub.bytes_in_buffer -= num_bytes; src->pub.next_input_byte += num_bytes; -} /* _eet_jpeg_membuf_src_skip */ +} static void _eet_jpeg_membuf_src_term(j_decompress_ptr cinfo) @@ -97,7 +97,7 @@ _eet_jpeg_membuf_src_term(j_decompress_ptr cinfo) free(src); cinfo->src = NULL; -} /* _eet_jpeg_membuf_src_term */ +} static int eet_jpeg_membuf_src(j_decompress_ptr cinfo, @@ -124,7 +124,7 @@ eet_jpeg_membuf_src(j_decompress_ptr cinfo, src->pub.next_input_byte = src->buf; return 0; -} /* eet_jpeg_membuf_src */ +} struct jpeg_membuf_dst { @@ -144,7 +144,7 @@ _eet_jpeg_membuf_dst_init(j_compress_ptr cinfo) { /* FIXME: Use eina attribute */ (void)cinfo; -} /* _eet_jpeg_membuf_dst_init */ +} static boolean _eet_jpeg_membuf_dst_flush(j_compress_ptr cinfo) @@ -168,7 +168,7 @@ _eet_jpeg_membuf_dst_flush(j_compress_ptr cinfo) dst->len *= 2; return FALSE; -} /* _eet_jpeg_membuf_dst_flush */ +} static void _eet_jpeg_membuf_dst_term(j_compress_ptr cinfo) @@ -189,7 +189,7 @@ _eet_jpeg_membuf_dst_term(j_compress_ptr cinfo) free(dst); cinfo->dest = NULL; -} /* _eet_jpeg_membuf_dst_term */ +} static int eet_jpeg_membuf_dst(j_compress_ptr cinfo, @@ -223,7 +223,7 @@ eet_jpeg_membuf_dst(j_compress_ptr cinfo, dst->failed = 0; return 0; -} /* eet_jpeg_membuf_dst */ +} /*---*/ @@ -336,7 +336,7 @@ _JPEGFatalErrorHandler(j_common_ptr cinfo) /* cinfo->err->output_message(cinfo);*/ longjmp(errmgr->setjmp_buffer, 1); return; -} /* _JPEGFatalErrorHandler */ +} static void _JPEGErrorHandler(j_common_ptr cinfo __UNUSED__) @@ -347,7 +347,7 @@ _JPEGErrorHandler(j_common_ptr cinfo __UNUSED__) /* cinfo->err->output_message(cinfo);*/ /* longjmp(errmgr->setjmp_buffer, 1);*/ return; -} /* _JPEGErrorHandler */ +} static void _JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__, @@ -359,7 +359,7 @@ _JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__, /* cinfo->err->output_message(cinfo);*/ /* longjmp(errmgr->setjmp_buffer, 1);*/ return; -} /* _JPEGErrorHandler2 */ +} static int eet_data_image_jpeg_header_decode(const void *data, @@ -405,7 +405,7 @@ eet_data_image_jpeg_header_decode(const void *data, return 0; return 1; -} /* eet_data_image_jpeg_header_decode */ +} static int eet_data_image_jpeg_rgb_decode(const void *data, @@ -558,7 +558,7 @@ eet_data_image_jpeg_rgb_decode(const void *data, jpeg_finish_decompress(&cinfo); jpeg_destroy_decompress(&cinfo); return 1; -} /* eet_data_image_jpeg_rgb_decode */ +} static void * eet_data_image_jpeg_alpha_decode(const void *data, @@ -667,7 +667,7 @@ eet_data_image_jpeg_alpha_decode(const void *data, jpeg_finish_decompress(&cinfo); jpeg_destroy_decompress(&cinfo); return d; -} /* eet_data_image_jpeg_alpha_decode */ +} static void * eet_data_image_lossless_convert(int *size, @@ -715,7 +715,7 @@ eet_data_image_lossless_convert(int *size, *size = ((w * h * 4) + (8 * 4)); return d; } -} /* eet_data_image_lossless_convert */ +} static void * eet_data_image_lossless_compressed_convert(int *size, @@ -789,7 +789,7 @@ eet_data_image_lossless_compressed_convert(int *size, free(comp); return d; } -} /* eet_data_image_lossless_compressed_convert */ +} static void * eet_data_image_jpeg_convert(int *size, @@ -872,7 +872,7 @@ eet_data_image_jpeg_convert(int *size, *size = sz; return d; -} /* eet_data_image_jpeg_convert */ +} static void * eet_data_image_jpeg_alpha_convert(int *size, @@ -1063,7 +1063,7 @@ eet_data_image_jpeg_alpha_convert(int *size, free(d2); *size = 12 + sz1 + sz2; return d; -} /* eet_data_image_jpeg_alpha_convert */ +} EAPI int eet_data_image_write_cipher(Eet_File *ef, @@ -1091,7 +1091,7 @@ eet_data_image_write_cipher(Eet_File *ef, } return 0; -} /* eet_data_image_write_cipher */ +} EAPI int eet_data_image_write(Eet_File *ef, @@ -1114,7 +1114,7 @@ eet_data_image_write(Eet_File *ef, comp, quality, lossy); -} /* eet_data_image_write */ +} EAPI void * eet_data_image_read_cipher(Eet_File *ef, @@ -1149,7 +1149,7 @@ eet_data_image_read_cipher(Eet_File *ef, free(data); return d; -} /* eet_data_image_read_cipher */ +} EAPI void * eet_data_image_read(Eet_File *ef, @@ -1163,7 +1163,7 @@ eet_data_image_read(Eet_File *ef, { return eet_data_image_read_cipher(ef, name, NULL, w, h, alpha, comp, quality, lossy); -} /* eet_data_image_read */ +} EAPI int eet_data_image_read_to_surface_cipher(Eet_File *ef, @@ -1204,7 +1204,7 @@ eet_data_image_read_to_surface_cipher(Eet_File *ef, free(data); return res; -} /* eet_data_image_read_to_surface_cipher */ +} EAPI int eet_data_image_read_to_surface(Eet_File *ef, @@ -1225,7 +1225,7 @@ eet_data_image_read_to_surface(Eet_File *ef, w, h, row_stride, alpha, comp, quality, lossy); -} /* eet_data_image_read_to_surface */ +} EAPI int eet_data_image_header_read_cipher(Eet_File *ef, @@ -1260,7 +1260,7 @@ eet_data_image_header_read_cipher(Eet_File *ef, free(data); return d; -} /* eet_data_image_header_read_cipher */ +} EAPI int eet_data_image_header_read(Eet_File *ef, @@ -1275,7 +1275,7 @@ eet_data_image_header_read(Eet_File *ef, return eet_data_image_header_read_cipher(ef, name, NULL, w, h, alpha, comp, quality, lossy); -} /* eet_data_image_header_read */ +} EAPI void * eet_data_image_encode_cipher(const void *data, @@ -1333,7 +1333,7 @@ eet_data_image_encode_cipher(const void *data, *size_ret = size; return d; -} /* eet_data_image_encode_cipher */ +} EAPI void * eet_data_image_encode(const void *data, @@ -1347,7 +1347,7 @@ eet_data_image_encode(const void *data, { return eet_data_image_encode_cipher(data, NULL, w, h, alpha, comp, quality, lossy, size_ret); -} /* eet_data_image_encode */ +} EAPI int eet_data_image_header_decode_cipher(const void *data, @@ -1499,7 +1499,7 @@ eet_data_image_header_decode_cipher(const void *data, } return 0; -} /* eet_data_image_header_decode_cipher */ +} EAPI int eet_data_image_header_decode(const void *data, @@ -1520,7 +1520,7 @@ eet_data_image_header_decode(const void *data, comp, quality, lossy); -} /* eet_data_image_header_decode */ +} static void _eet_data_image_copy_buffer(const unsigned int *src, @@ -1544,7 +1544,7 @@ _eet_data_image_copy_buffer(const unsigned int *src, for (y = 0; y < h; ++y, src += src_w, over += row_stride) memcpy(over, src, w * 4); } -} /* _eet_data_image_copy_buffer */ +} static int _eet_data_image_decode_inside(const void *data, @@ -1647,7 +1647,7 @@ _eet_data_image_decode_inside(const void *data, abort(); return 1; -} /* _eet_data_image_decode_inside */ +} EAPI void * eet_data_image_decode_cipher(const void *data, @@ -1714,7 +1714,7 @@ eet_data_image_decode_cipher(const void *data, *lossy = ilossy; return d; -} /* eet_data_image_decode_cipher */ +} EAPI void * eet_data_image_decode(const void *data, @@ -1728,7 +1728,7 @@ eet_data_image_decode(const void *data, { return eet_data_image_decode_cipher(data, NULL, size, w, h, alpha, comp, quality, lossy); -} /* eet_data_image_decode */ +} EAPI int eet_data_image_decode_to_surface_cipher(const void *data, @@ -1795,7 +1795,7 @@ eet_data_image_decode_to_surface_cipher(const void *data, *lossy = ilossy; return 1; -} /* eet_data_image_decode_to_surface_cipher */ +} EAPI int eet_data_image_decode_to_surface(const void *data, @@ -1816,5 +1816,5 @@ eet_data_image_decode_to_surface(const void *data, w, h, row_stride, alpha, comp, quality, lossy); -} /* eet_data_image_decode_to_surface */ +} diff --git a/libraries/eet/src/lib/eet_lib.c b/libraries/eet/src/lib/eet_lib.c index a0d6435..04feebe 100644 --- a/libraries/eet/src/lib/eet_lib.c +++ b/libraries/eet/src/lib/eet_lib.c @@ -82,126 +82,6 @@ EAPI Eet_Version *eet_version = &_version; #define EET_MAGIC_FILE2 0x1ee70f42 -typedef struct _Eet_File_Header Eet_File_Header; -typedef struct _Eet_File_Node Eet_File_Node; -typedef struct _Eet_File_Directory Eet_File_Directory; - -struct _Eet_File -{ - char *path; - Eina_File *readfp; - Eet_File_Header *header; - Eet_Dictionary *ed; - Eet_Key *key; - const unsigned char *data; - const void *x509_der; - const void *signature; - void *sha1; - - Eet_File_Mode mode; - - int magic; - int references; - - unsigned long int data_size; - int x509_length; - unsigned int signature_length; - int sha1_length; - - Eina_Lock file_lock; - - unsigned char writes_pending : 1; - unsigned char delete_me_now : 1; -}; - -struct _Eet_File_Header -{ - int magic; - Eet_File_Directory *directory; -}; - -struct _Eet_File_Directory -{ - int size; - Eet_File_Node **nodes; -}; - -struct _Eet_File_Node -{ - char *name; - void *data; - Eet_File_Node *next; /* FIXME: make buckets linked lists */ - - unsigned long int offset; - unsigned long int dictionary_offset; - unsigned long int name_offset; - - unsigned int name_size; - unsigned int size; - unsigned int data_size; - - unsigned char free_name : 1; - unsigned char compression : 1; - unsigned char ciphered : 1; - unsigned char alias : 1; -}; - -#if 0 -/* Version 2 */ -/* NB: all int's are stored in network byte order on disk */ -/* file format: */ -int magic; /* magic number ie 0x1ee7ff00 */ -int num_directory_entries; /* number of directory entries to follow */ -int bytes_directory_entries; /* bytes of directory entries to follow */ -struct -{ - int offset; /* bytes offset into file for data chunk */ - int flags; /* flags - for now 0 = uncompressed and clear, 1 = compressed and clear, 2 = uncompressed and ciphered, 3 = compressed and ciphered */ - int size; /* size of the data chunk */ - int data_size; /* size of the (uncompressed) data chunk */ - int name_size; /* length in bytes of the name field */ - char name[name_size]; /* name string (variable length) and \0 terminated */ -} directory[num_directory_entries]; -/* and now startes the data stream... */ -#endif /* if 0 */ - -#if 0 -/* Version 3 */ -/* NB: all int's are stored in network byte order on disk */ -/* file format: */ -int magic; /* magic number ie 0x1ee70f42 */ -int num_directory_entries; /* number of directory entries to follow */ -int num_dictionary_entries; /* number of dictionary entries to follow */ -struct -{ - int data_offset; /* bytes offset into file for data chunk */ - int size; /* size of the data chunk */ - int data_size; /* size of the (uncompressed) data chunk */ - int name_offset; /* bytes offset into file for name string */ - int name_size; /* length in bytes of the name field */ - int flags; /* bit flags - for now: - bit 0 => compresion on/off - bit 1 => ciphered on/off - bit 2 => alias - */ -} directory[num_directory_entries]; -struct -{ - int hash; - int offset; - int size; - int prev; - int next; -} dictionary[num_dictionary_entries]; -/* now start the string stream. */ -/* and right after them the data stream. */ -int magic_sign; /* Optional, only if the eet file is signed. */ -int signature_length; /* Signature length. */ -int x509_length; /* Public certificate that signed the file. */ -char signature[signature_length]; /* The signature. */ -char x509[x509_length]; /* The public certificate. */ -#endif /* if 0 */ - #define EET_FILE2_HEADER_COUNT 3 #define EET_FILE2_DIRECTORY_ENTRY_COUNT 6 #define EET_FILE2_DICTIONARY_ENTRY_COUNT 5 @@ -280,7 +160,7 @@ eet_check_pointer(const Eet_File *ef) return 1; return 0; -} /* eet_check_pointer */ +} static inline int eet_check_header(const Eet_File *ef) @@ -292,7 +172,7 @@ eet_check_header(const Eet_File *ef) return 1; return 0; -} /* eet_check_header */ +} static inline int eet_test_close(int test, @@ -305,7 +185,7 @@ eet_test_close(int test, } return test; -} /* eet_test_close */ +} /* find an eet file in the currently in use cache */ static Eet_File * @@ -326,7 +206,7 @@ eet_cache_find(const char *path, /* not found */ return NULL; -} /* eet_cache_find */ +} /* add to end of cache */ /* this should only be called when the cache lock is already held */ @@ -382,7 +262,7 @@ eet_cache_add(Eet_File *ef, *cache = new_cache; *cache_num = new_cache_num; *cache_alloc = new_cache_alloc; -} /* eet_cache_add */ +} /* delete from cache */ /* this should only be called when the cache lock is already held */ @@ -437,7 +317,7 @@ eet_cache_del(Eet_File *ef, *cache = new_cache; *cache_num = new_cache_num; *cache_alloc = new_cache_alloc; -} /* eet_cache_del */ +} /* internal string match. null friendly, catches same ptr */ static int @@ -452,7 +332,7 @@ eet_string_match(const char *s1, return 1; return !strcmp(s1, s2); -} /* eet_string_match */ +} /* flush out writes to a v2 eet file */ static Eet_Error @@ -494,7 +374,7 @@ eet_flush2(Eet_File *ef) if (!fp) return EET_ERROR_NOT_WRITABLE; - fcntl(fileno(fp), F_SETFD, FD_CLOEXEC); + fcntl(fd, F_SETFD, FD_CLOEXEC); } else return EET_ERROR_NOT_WRITABLE; @@ -627,14 +507,6 @@ eet_flush2(Eet_File *ef) /* flush all write to the file. */ fflush(fp); -// this is going to really cause trouble. if ANYTHING this needs to go into a -// thread spawned off - but even then... -// in this case... ext4 is "wrong". (yes we can jump up and down and point posix -// manual pages at eachother, but ext4 broke behavior that has been in place -// for decades and that 1000's of apps rely on daily - that is that one operation -// to disk is committed to disk BEFORE following operations, so the fs retains -// a consistent state -// fsync(fileno(fp)); /* append signature if required */ if (ef->key) @@ -665,13 +537,13 @@ write_error: case EPIPE: error = EET_ERROR_WRITE_ERROR_FILE_CLOSED; break; default: error = EET_ERROR_WRITE_ERROR; break; - } /* switch */ + } } sign_error: fclose(fp); return error; -} /* eet_flush2 */ +} EAPI int eet_init(void) @@ -680,10 +552,7 @@ eet_init(void) return eet_init_count; if (!eina_init()) - { - fprintf(stderr, "Eet: Eina init failed"); - return --eet_init_count; - } + return --eet_init_count; _eet_log_dom_global = eina_log_domain_register("eet", EET_DEFAULT_LOG_COLOR); if (_eet_log_dom_global < 0) @@ -694,12 +563,18 @@ eet_init(void) eina_lock_new(&eet_cache_lock); - if (!eet_node_init()) + if (!eet_mempool_init()) { EINA_LOG_ERR("Eet: Eet_Node mempool creation failed"); goto unregister_log_domain; } + if (!eet_node_init()) + { + EINA_LOG_ERR("Eet: Eet_Node mempool creation failed"); + goto shutdown_mempool; + } + #ifdef HAVE_GNUTLS /* Before the library can be used, it must initialize itself if needed. */ if (gcry_control(GCRYCTL_ANY_INITIALIZATION_P) == 0) @@ -741,13 +616,15 @@ eet_init(void) shutdown_eet: #endif eet_node_shutdown(); +shutdown_mempool: + eet_mempool_shutdown(); unregister_log_domain: eina_log_domain_unregister(_eet_log_dom_global); _eet_log_dom_global = -1; shutdown_eina: eina_shutdown(); return --eet_init_count; -} /* eet_init */ +} EAPI int eet_shutdown(void) @@ -757,6 +634,7 @@ eet_shutdown(void) eet_clearcache(); eet_node_shutdown(); + eet_mempool_shutdown(); eina_lock_free(&eet_cache_lock); @@ -772,7 +650,7 @@ eet_shutdown(void) eina_shutdown(); return eet_init_count; -} /* eet_shutdown */ +} EAPI Eet_Error eet_sync(Eet_File *ef) @@ -795,7 +673,7 @@ eet_sync(Eet_File *ef) UNLOCK_FILE(ef); return ret; -} /* eet_sync */ +} EAPI void eet_clearcache(void) @@ -853,7 +731,7 @@ eet_clearcache(void) } UNLOCK_CACHE; -} /* eet_clearcache */ +} /* FIXME: MMAP race condition in READ_WRITE_MODE */ static Eet_File * @@ -902,14 +780,14 @@ eet_internal_read2(Eet_File *ef) return NULL; /* allocate header */ - ef->header = calloc(1, sizeof(Eet_File_Header)); + ef->header = eet_file_header_calloc(1); if (eet_test_close(!ef->header, ef)) return NULL; ef->header->magic = EET_MAGIC_FILE_HEADER; /* allocate directory block in ram */ - ef->header->directory = calloc(1, sizeof(Eet_File_Directory)); + ef->header->directory = eet_file_directory_calloc(1); if (eet_test_close(!ef->header->directory, ef)) return NULL; @@ -939,10 +817,10 @@ eet_internal_read2(Eet_File *ef) /* out directory block is inconsistent - we have overrun our */ /* dynamic block buffer before we finished scanning dir entries */ - efn = malloc(sizeof(Eet_File_Node)); + efn = eet_file_node_malloc(1); if (eet_test_close(!efn, ef)) { - if (efn) free(efn); /* yes i know - we only get here if + if (efn) eet_file_node_mp_free(efn); /* yes i know - we only get here if * efn is null/0 -> trying to shut up * warning tools like cppcheck */ return NULL; @@ -963,7 +841,7 @@ eet_internal_read2(Eet_File *ef) #define EFN_TEST(Test, Ef, Efn) \ if (eet_test_close(Test, Ef)) \ { \ - free(Efn); \ + eet_file_node_mp_free(Efn); \ return NULL; \ } @@ -1022,11 +900,11 @@ eet_internal_read2(Eet_File *ef) ef)) return NULL; - ef->ed = calloc(1, sizeof (Eet_Dictionary)); + ef->ed = eet_dictionary_calloc(1); if (eet_test_close(!ef->ed, ef)) return NULL; - ef->ed->all = calloc(num_dictionary_entries, sizeof (Eet_String)); + ef->ed->all = calloc(1, num_dictionary_entries * sizeof(Eet_String)); if (eet_test_close(!ef->ed->all, ef)) return NULL; @@ -1112,7 +990,7 @@ eet_internal_read2(Eet_File *ef) } return ef; -} /* eet_internal_read2 */ +} #if EET_OLD_EET_FILE_FORMAT static Eet_File * @@ -1162,14 +1040,14 @@ eet_internal_read1(Eet_File *ef) return NULL; /* allocate header */ - ef->header = calloc(1, sizeof(Eet_File_Header)); + ef->header = eet_file_header_calloc(1); if (eet_test_close(!ef->header, ef)) return NULL; ef->header->magic = EET_MAGIC_FILE_HEADER; /* allocate directory block in ram */ - ef->header->directory = calloc(1, sizeof(Eet_File_Directory)); + ef->header->directory = eet_file_directory_calloc(1); if (eet_test_close(!ef->header->directory, ef)) return NULL; @@ -1204,10 +1082,10 @@ eet_internal_read1(Eet_File *ef) return NULL; /* allocate all the ram needed for this stored node accounting */ - efn = malloc (sizeof(Eet_File_Node)); + efn = eet_file_node_malloc(1); if (eet_test_close(!efn, ef)) { - if (efn) free(efn); /* yes i know - we only get here if + if (efn) eet_file_node_mp_free(efn); /* yes i know - we only get here if * efn is null/0 -> trying to shut up * warning tools like cppcheck */ return NULL; @@ -1227,21 +1105,21 @@ eet_internal_read1(Eet_File *ef) /* invalid size */ if (eet_test_close(efn->size <= 0, ef)) { - free(efn); + eet_file_node_mp_free(efn); return NULL; } /* invalid name_size */ if (eet_test_close(name_size <= 0, ef)) { - free(efn); + eet_file_node_mp_free(efn); return NULL; } /* reading name would mean falling off end of dyn_buf - invalid */ if (eet_test_close((p + 16 + name_size) > (dyn_buf + byte_entries), ef)) { - free(efn); + eet_file_node_mp_free(efn); return NULL; } @@ -1257,7 +1135,7 @@ eet_internal_read1(Eet_File *ef) efn->name = malloc(sizeof(char) * name_size + 1); if (eet_test_close(!efn->name, ef)) { - free(efn); + eet_file_node_mp_free(efn); return NULL; } @@ -1294,7 +1172,7 @@ eet_internal_read1(Eet_File *ef) p += HEADER_SIZE + name_size; } return ef; -} /* eet_internal_read1 */ +} #endif /* if EET_OLD_EET_FILE_FORMAT */ @@ -1329,10 +1207,10 @@ eet_internal_read(Eet_File *ef) ef->delete_me_now = 1; eet_internal_close(ef, EINA_TRUE); break; - } /* switch */ + } return NULL; -} /* eet_internal_read */ +} static Eet_Error eet_internal_close(Eet_File *ef, @@ -1405,16 +1283,16 @@ eet_internal_close(Eet_File *ef, if (efn->free_name) free(efn->name); - free(efn); + eet_file_node_mp_free(efn); } } free(ef->header->directory->nodes); } - free(ef->header->directory); + eet_file_directory_mp_free(ef->header->directory); } - free(ef->header); + eet_file_header_mp_free(ef->header); } eet_dictionary_free(ef->ed); @@ -1434,7 +1312,8 @@ eet_internal_close(Eet_File *ef, memset(ef, 0, sizeof(Eet_File)); /* free it */ - free(ef); + eina_stringshare_del(ef->path); + eet_file_mp_free(ef); return err; on_error: @@ -1442,7 +1321,7 @@ on_error: UNLOCK_CACHE; return EET_ERROR_NONE; -} /* eet_internal_close */ +} EAPI Eet_File * eet_memopen_read(const void *data, @@ -1453,7 +1332,7 @@ eet_memopen_read(const void *data, if (!data || size == 0) return NULL; - ef = malloc (sizeof (Eet_File)); + ef = eet_file_malloc(1); if (!ef) return NULL; @@ -1477,7 +1356,14 @@ eet_memopen_read(const void *data, ef = eet_internal_read(ef); UNLOCK_CACHE; return ef; -} /* eet_memopen_read */ +} + +EAPI const char * +eet_file_get(Eet_File *ef) +{ + if (eet_check_pointer(ef)) return NULL; + return ef->path; +} EAPI Eet_File * eet_open(const char *file, @@ -1578,7 +1464,7 @@ open_error: file_len = strlen(file) + 1; /* Allocate struct for eet file and have it zero'd out */ - ef = malloc(sizeof(Eet_File) + file_len); + ef = eet_file_malloc(1); if (!ef) goto on_error; @@ -1586,8 +1472,7 @@ open_error: INIT_FILE(ef); ef->key = NULL; ef->readfp = fp; - ef->path = ((char *)ef) + sizeof(Eet_File); - memcpy(ef->path, file, file_len); + ef->path = eina_stringshare_add_length(file, file_len); ef->magic = EET_MAGIC_FILE; ef->references = 1; ef->mode = mode; @@ -1641,7 +1526,7 @@ empty_file: on_error: UNLOCK_CACHE; return NULL; -} /* eet_open */ +} EAPI Eet_File_Mode eet_mode_get(Eet_File *ef) @@ -1651,7 +1536,7 @@ eet_mode_get(Eet_File *ef) return EET_FILE_MODE_INVALID; else return ef->mode; -} /* eet_mode_get */ +} EAPI const void * eet_identity_x509(Eet_File *ef, @@ -1664,7 +1549,7 @@ eet_identity_x509(Eet_File *ef, *der_length = ef->x509_length; return ef->x509_der; -} /* eet_identity_x509 */ +} EAPI const void * eet_identity_signature(Eet_File *ef, @@ -1677,7 +1562,7 @@ eet_identity_signature(Eet_File *ef, *signature_length = ef->signature_length; return ef->signature; -} /* eet_identity_signature */ +} EAPI const void * eet_identity_sha1(Eet_File *ef, @@ -1692,7 +1577,7 @@ eet_identity_sha1(Eet_File *ef, *sha1_length = ef->sha1_length; return ef->sha1; -} /* eet_identity_sha1 */ +} EAPI Eet_Error eet_identity_set(Eet_File *ef, @@ -1712,13 +1597,13 @@ eet_identity_set(Eet_File *ef, ef->writes_pending = 1; return EET_ERROR_NONE; -} /* eet_identity_set */ +} EAPI Eet_Error eet_close(Eet_File *ef) { return eet_internal_close(ef, EINA_FALSE); -} /* eet_close */ +} EAPI void * eet_read_cipher(Eet_File *ef, @@ -1889,7 +1774,7 @@ on_error: UNLOCK_FILE(ef); free(data); return NULL; -} /* eet_read_cipher */ +} EAPI void * eet_read(Eet_File *ef, @@ -1897,7 +1782,7 @@ eet_read(Eet_File *ef, int *size_ret) { return eet_read_cipher(ef, name, size_ret, NULL); -} /* eet_read */ +} EAPI const void * eet_read_direct(Eet_File *ef, @@ -1995,7 +1880,7 @@ eet_read_direct(Eet_File *ef, on_error: UNLOCK_FILE(ef); return NULL; -} /* eet_read_direct */ +} EAPI const char * eet_alias_get(Eet_File *ef, @@ -2102,16 +1987,16 @@ eet_alias(Eet_File *ef, if (!ef->header) { /* allocate header */ - ef->header = calloc(1, sizeof(Eet_File_Header)); + ef->header = eet_file_header_calloc(1); if (!ef->header) goto on_error; ef->header->magic = EET_MAGIC_FILE_HEADER; /* allocate directory block in ram */ - ef->header->directory = calloc(1, sizeof(Eet_File_Directory)); + ef->header->directory = eet_file_directory_calloc(1); if (!ef->header->directory) { - free(ef->header); + eet_file_header_mp_free(ef->header); ef->header = NULL; goto on_error; } @@ -2124,7 +2009,7 @@ eet_alias(Eet_File *ef, (1 << ef->header->directory->size)); if (!ef->header->directory->nodes) { - free(ef->header->directory); + eet_file_directory_mp_free(ef->header->directory); ef->header = NULL; goto on_error; } @@ -2198,7 +2083,7 @@ eet_alias(Eet_File *ef, } if (!exists_already) { - efn = malloc(sizeof(Eet_File_Node)); + efn = eet_file_node_malloc(1); if (!efn) { free(data2); @@ -2230,7 +2115,7 @@ eet_alias(Eet_File *ef, on_error: UNLOCK_FILE(ef); return EINA_FALSE; -} /* eet_alias */ +} EAPI int eet_write_cipher(Eet_File *ef, @@ -2262,16 +2147,16 @@ eet_write_cipher(Eet_File *ef, if (!ef->header) { /* allocate header */ - ef->header = calloc(1, sizeof(Eet_File_Header)); + ef->header = eet_file_header_calloc(1); if (!ef->header) goto on_error; ef->header->magic = EET_MAGIC_FILE_HEADER; /* allocate directory block in ram */ - ef->header->directory = calloc(1, sizeof(Eet_File_Directory)); + ef->header->directory = eet_file_directory_calloc(1); if (!ef->header->directory) { - free(ef->header); + eet_file_header_mp_free(ef->header); ef->header = NULL; goto on_error; } @@ -2284,7 +2169,7 @@ eet_write_cipher(Eet_File *ef, (1 << ef->header->directory->size)); if (!ef->header->directory->nodes) { - free(ef->header->directory); + eet_file_directory_mp_free(ef->header->directory); ef->header = NULL; goto on_error; } @@ -2382,7 +2267,7 @@ eet_write_cipher(Eet_File *ef, } if (!exists_already) { - efn = malloc(sizeof(Eet_File_Node)); + efn = eet_file_node_malloc(1); if (!efn) { free(data2); @@ -2413,7 +2298,7 @@ eet_write_cipher(Eet_File *ef, on_error: UNLOCK_FILE(ef); return 0; -} /* eet_write_cipher */ +} EAPI int eet_write(Eet_File *ef, @@ -2423,7 +2308,7 @@ eet_write(Eet_File *ef, int comp) { return eet_write_cipher(ef, name, data, size, comp, NULL); -} /* eet_write */ +} EAPI int eet_delete(Eet_File *ef, @@ -2472,7 +2357,7 @@ eet_delete(Eet_File *ef, if (efn->free_name) free(efn->name); - free(efn); + eet_file_node_mp_free(efn); exists_already = 1; break; } @@ -2485,7 +2370,7 @@ eet_delete(Eet_File *ef, /* update access time */ return exists_already; -} /* eet_delete */ +} EAPI Eet_Dictionary * eet_dictionary_get(Eet_File *ef) @@ -2494,7 +2379,7 @@ eet_dictionary_get(Eet_File *ef) return NULL; return ef->ed; -} /* eet_dictionary_get */ +} EAPI char ** eet_list(Eet_File *ef, @@ -2578,7 +2463,7 @@ on_error: *count_ret = 0; return NULL; -} /* eet_list */ +} EAPI int eet_num_entries(Eet_File *ef) @@ -2605,7 +2490,7 @@ eet_num_entries(Eet_File *ef) UNLOCK_FILE(ef); return ret; -} /* eet_num_entries */ +} static Eet_File_Node * find_node_by_name(Eet_File *ef, @@ -2624,7 +2509,7 @@ find_node_by_name(Eet_File *ef, } return NULL; -} /* find_node_by_name */ +} static int read_data_from_disk(Eet_File *ef, @@ -2644,5 +2529,5 @@ read_data_from_disk(Eet_File *ef, memcpy(buf, ef->data + efn->offset, len); return len; -} /* read_data_from_disk */ +} diff --git a/libraries/eet/src/lib/eet_node.c b/libraries/eet/src/lib/eet_node.c index d90ef83..11d7cc0 100644 --- a/libraries/eet/src/lib/eet_node.c +++ b/libraries/eet/src/lib/eet_node.c @@ -27,13 +27,13 @@ eet_node_new(void) memset(result, 0, sizeof (Eet_Node)); return result; -} /* eet_node_new */ +} void eet_node_free(Eet_Node *node) { eina_mempool_free(_eet_node_mp, node); -} /* eet_node_free */ +} static Eet_Node * _eet_node_new(const char *name, @@ -49,7 +49,7 @@ _eet_node_new(const char *name, n->name = eina_stringshare_add(name); return n; -} /* _eet_node_new */ +} static void _eet_node_append(Eet_Node *n, @@ -63,7 +63,7 @@ _eet_node_append(Eet_Node *n, value->next = n->values; n->values = value; } -} /* _eet_node_append */ +} #define EET_NODE_NEW(Eet_type, Name, Value, Type) \ EAPI Eet_Node * \ @@ -133,7 +133,7 @@ eet_node_list_new(const char *name, _eet_node_append(n, nodes); return n; -} /* eet_node_list_new */ +} Eet_Node * eet_node_array_new(const char *name, @@ -151,7 +151,7 @@ eet_node_array_new(const char *name, _eet_node_append(n, nodes); return n; -} /* eet_node_array_new */ +} Eet_Node * eet_node_var_array_new(const char *name, @@ -168,7 +168,7 @@ eet_node_var_array_new(const char *name, _eet_node_append(n, nodes); return n; -} /* eet_node_var_array_new */ +} Eet_Node * eet_node_hash_new(const char *name, @@ -191,7 +191,7 @@ eet_node_hash_new(const char *name, _eet_node_append(n, nodes); return n; -} /* eet_node_hash_new */ +} Eet_Node * eet_node_struct_new(const char *name, @@ -206,7 +206,7 @@ eet_node_struct_new(const char *name, _eet_node_append(n, nodes); return n; -} /* eet_node_struct_new */ +} Eet_Node * eet_node_struct_child_new(const char *parent, @@ -226,7 +226,7 @@ eet_node_struct_child_new(const char *parent, _eet_node_append(n, eina_list_prepend(NULL, child)); return n; -} /* eet_node_struct_child_new */ +} Eet_Node * eet_node_children_get(Eet_Node *node) @@ -289,7 +289,7 @@ eet_node_list_append(Eet_Node *parent, parent->values = nn; eina_stringshare_del(tmp); -} /* eet_node_list_append */ +} void eet_node_struct_append(Eet_Node *parent, @@ -338,7 +338,7 @@ eet_node_struct_append(Eet_Node *parent, } eina_stringshare_del(tmp); -} /* eet_node_struct_append */ +} void eet_node_hash_add(Eet_Node *parent, @@ -356,7 +356,7 @@ eet_node_hash_add(Eet_Node *parent, /* And add it to the parent. */ nn->next = parent->values; parent->values = nn; -} /* eet_node_hash_add */ +} int eet_node_type_get(Eet_Node *node) @@ -420,11 +420,11 @@ eet_node_del(Eet_Node *n) case EET_T_USHORT: case EET_T_UINT: break; - } /* switch */ + } eina_stringshare_del(n->name); eet_node_free(n); -} /* eet_node_del */ +} static const char *eet_node_dump_g_name[6] = { "struct", @@ -458,7 +458,7 @@ eet_node_dump_level(int level, int i; for (i = 0; i < level; i++) dumpfunc(dumpdata, " "); -} /* eet_node_dump_level */ +} static char * eet_node_string_escape(const char *str) @@ -499,7 +499,7 @@ eet_node_string_escape(const char *str) } *sp = 0; return s; -} /* eet_node_string_escape */ +} static void eet_node_dump_string_escape(void *dumpdata, @@ -514,7 +514,7 @@ eet_node_dump_string_escape(void *dumpdata, dumpfunc(dumpdata, s); free(s); -} /* eet_node_dump_string_escape */ +} static void eet_node_dump_simple_type(Eet_Node *n, @@ -578,10 +578,10 @@ case Eet_Type: \ default: dumpfunc(dumpdata, "???: ???"); break; - } /* switch */ + } dumpfunc(dumpdata, ";\n"); -} /* eet_node_dump_simple_type */ +} static void eet_node_dump_group_start(int level, @@ -602,7 +602,7 @@ eet_node_dump_group_start(int level, dumpfunc(dumpdata, eet_node_dump_g_name[chnk_type - EET_G_UNKNOWN]); dumpfunc(dumpdata, " {\n"); -} /* eet_node_dump_group_start */ +} static void eet_node_dump_group_end(int level, @@ -611,7 +611,7 @@ eet_node_dump_group_end(int level, { eet_node_dump_level(level, dumpfunc, dumpdata); dumpfunc(dumpdata, "}\n"); -} /* eet_node_dump_group_end */ +} void eet_node_dump(Eet_Node *n, @@ -676,8 +676,8 @@ eet_node_dump(Eet_Node *n, case EET_T_ULONG_LONG: eet_node_dump_simple_type(n, dumplevel, dumpfunc, dumpdata); break; - } /* switch */ -} /* eet_node_dump */ + } +} void * eet_node_walk(void *parent, @@ -759,13 +759,13 @@ eet_node_walk(void *parent, case EET_T_ULONG_LONG: me = cb->simple(root->type, &root->data, user_data); break; - } /* switch */ + } if (parent) cb->struct_add(parent, name, me, user_data); return me; -} /* eet_node_walk */ +} int eet_node_init(void) @@ -778,7 +778,7 @@ eet_node_init(void) #else choice = "chained_mempool"; #endif - tmp = getenv("EET_MEMPOOL"); + tmp = getenv("EINA_MEMPOOL"); if (tmp && tmp[0]) choice = tmp; @@ -786,12 +786,12 @@ eet_node_init(void) eina_mempool_add(choice, "eet-node-alloc", NULL, sizeof(Eet_Node), 1024); return _eet_node_mp ? 1 : 0; -} /* eet_node_init */ +} void eet_node_shutdown(void) { eina_mempool_del(_eet_node_mp); _eet_node_mp = NULL; -} /* eet_node_shutdown */ +} diff --git a/libraries/eet/src/lib/eet_utils.c b/libraries/eet/src/lib/eet_utils.c index 8e591a2..b04ad1b 100644 --- a/libraries/eet/src/lib/eet_utils.c +++ b/libraries/eet/src/lib/eet_utils.c @@ -32,5 +32,5 @@ _eet_hash_gen(const char *key, hash_num &= mask; /* return it */ return hash_num; -} /* _eet_hash_gen */ +} diff --git a/libraries/eet/src/tests/Makefile.am b/libraries/eet/src/tests/Makefile.am index c90a1d5..61158f7 100644 --- a/libraries/eet/src/tests/Makefile.am +++ b/libraries/eet/src/tests/Makefile.am @@ -2,6 +2,7 @@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ +-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests\" \ @CHECK_CFLAGS@ \ @EINA_CFLAGS@ diff --git a/libraries/eet/src/tests/Makefile.in b/libraries/eet/src/tests/Makefile.in index bb15127..791f9fd 100644 --- a/libraries/eet/src/tests/Makefile.in +++ b/libraries/eet/src/tests/Makefile.in @@ -174,8 +174,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -246,6 +244,7 @@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ +-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests\" \ @CHECK_CFLAGS@ \ @EINA_CFLAGS@ diff --git a/libraries/eet/src/tests/eet_suite.c b/libraries/eet/src/tests/eet_suite.c index 5230c86..3bbc912 100644 --- a/libraries/eet/src/tests/eet_suite.c +++ b/libraries/eet/src/tests/eet_suite.c @@ -24,6 +24,8 @@ #include "eet_suite.h" +#define CERT_DIR ((*TESTS_SRC_DIR == '/') ? TESTS_SRC_DIR : "src/tests/" TESTS_SRC_DIR) + START_TEST(eet_test_init) { int ret; @@ -211,21 +213,21 @@ _eet_test_basic_check(Eet_Test_Basic_Type *result, fail_if(result->empty != NULL); if (i == 0) { - Eet_Test_Basic_Type *tmp; - - tmp = result->with; - fail_if(tmp == NULL); - - fail_if(tmp->c != EET_TEST_CHAR); - fail_if(tmp->s != EET_TEST_SHORT); - fail_if(tmp->i != EET_TEST_INT + i + 1); - fail_if(tmp->l != (long long)EET_TEST_LONG_LONG); - fail_if(strcmp(tmp->str, EET_TEST_STRING) != 0); - fail_if(strcmp(tmp->istr, EET_TEST_STRING) != 0); - fail_if(tmp->uc != EET_TEST_CHAR); - fail_if(tmp->us != EET_TEST_SHORT); - fail_if(tmp->ui != EET_TEST_INT); - fail_if(tmp->ul != EET_TEST_LONG_LONG); + Eet_Test_Basic_Type *tmp2; + + tmp2 = result->with; + fail_if(tmp2 == NULL); + + fail_if(tmp2->c != EET_TEST_CHAR); + fail_if(tmp2->s != EET_TEST_SHORT); + fail_if(tmp2->i != EET_TEST_INT + i + 1); + fail_if(tmp2->l != (long long)EET_TEST_LONG_LONG); + fail_if(strcmp(tmp2->str, EET_TEST_STRING) != 0); + fail_if(strcmp(tmp2->istr, EET_TEST_STRING) != 0); + fail_if(tmp2->uc != EET_TEST_CHAR); + fail_if(tmp2->us != EET_TEST_SHORT); + fail_if(tmp2->ui != EET_TEST_INT); + fail_if(tmp2->ul != EET_TEST_LONG_LONG); } else fail_if(result->with != NULL); @@ -1640,7 +1642,7 @@ START_TEST(eet_identity_simple) eet_init(); fail_if(!(file = tmpnam(file))); - fail_if(chdir("src/tests")); + fail_if(chdir(CERT_DIR)); fail_if(!(noread = fopen("/dev/null", "w"))); /* Sign an eet file. */ @@ -1707,7 +1709,7 @@ START_TEST(eet_identity_open_simple) eet_init(); - fail_if(chdir("src/tests")); + fail_if(chdir(CERT_DIR)); k = eet_identity_open("cert.pem", "key.pem", NULL); fail_if(!k); @@ -1725,7 +1727,7 @@ START_TEST(eet_identity_open_pkcs8) eet_init(); - fail_if(chdir("src/tests")); + fail_if(chdir(CERT_DIR)); k = eet_identity_open("cert.pem", "key_enc_none.pem", NULL); fail_if(!k); @@ -1774,7 +1776,7 @@ START_TEST(eet_identity_open_pkcs8_enc) eet_init(); - fail_if(chdir("src/tests")); + fail_if(chdir(CERT_DIR)); k = eet_identity_open("cert.pem", "key_enc.pem", NULL); fail_if(k); @@ -1810,7 +1812,7 @@ START_TEST(eet_cipher_decipher_simple) eet_init(); fail_if(!(file = tmpnam(file))); - fail_if(chdir("src/tests")); + fail_if(chdir(CERT_DIR)); /* Crypt an eet file. */ ef = eet_open(file, EET_FILE_MODE_WRITE); diff --git a/libraries/eina/AUTHORS b/libraries/eina/AUTHORS index 1483270..c146e20 100644 --- a/libraries/eina/AUTHORS +++ b/libraries/eina/AUTHORS @@ -20,3 +20,4 @@ Myungjae Lee Youness Alaoui billiob (Boris Faure) Sung W. Park +Guillaume Friloux diff --git a/libraries/eina/ChangeLog b/libraries/eina/ChangeLog index 0d1ccdf..dfecb61 100644 --- a/libraries/eina/ChangeLog +++ b/libraries/eina/ChangeLog @@ -147,3 +147,54 @@ * Add new hash function eina_hash_murmur3 that should be better at hashing strings. + +2011-12-02 Carsten Haitzler (The Rasterman) + + 1.1.0 release + +2011-12-02 Mike Blumenkrantz (discomfitor/zmike) + + * Add eina_mempool_calloc for returning zeroed memory + +2011-12-07 Mike Blumenkrantz (discomfitor/zmike) + + * eina_log*level_check() functions now return the correct value + +2011-12-08 Tom Hacohen + + * Binbuf + Strbuf + Ustrbuf: Added eina_*buf_manage_new_length. + Same as eina_(u)strbuf_manage_new except that it accepts a length + parameter. + +2011-12-20 Cedric Bail + + * Fix bug on eina_shutdown when using eina_error. + +2011-12-28 Cedric Bail + + * Fix NONNULL argument for eina_hash_find. + +2011-12-30 Vincent Torri + + * Add Eina_Semaphore abstraction API. + +2011-12-30 Cedric Bail + + * Let eina_hash_free behave like free. + +2012-01-03 Cedric Bail + + * Add eina_xattr_fd_ls, eina_xattr_value_fd_ls and eina_xattr_value_ls. + * Detect fault during access to Eina_File mmap memory, use eina_file_map_faulted + to learn if it happens. + * Add eina_file_xattr_get and eina_file_xattr_value_get. + +2012-01-09 Gustavo Barbieri + + * Deprecated eina_array_count_get(), use eina_array_count() instead. + * Add eina_inarray data type. + * Add eina_value data type (generic value storage). + +2012-01-19 Shinwoo Kim + + * Fix compilation of eina_semaphore_lock() (Windows port) diff --git a/libraries/eina/Makefile.am b/libraries/eina/Makefile.am index a818b10..7778fd8 100644 --- a/libraries/eina/Makefile.am +++ b/libraries/eina/Makefile.am @@ -57,7 +57,7 @@ m4/efl_path_max.m4 doc: @echo "entering doc/" - @cd doc && make doc + @cd doc && $(MAKE) doc # Unit tests @@ -91,9 +91,9 @@ lcov-report: @genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info coverage: - @make lcov-reset - @make check - @make lcov-report + @$(MAKE) lcov-reset + @$(MAKE) check + @$(MAKE) lcov-report else lcov-reset: @echo "reconfigure with --enable-coverage" @@ -108,7 +108,7 @@ endif if EFL_ENABLE_BENCHMARK benchmark: - @cd src && make benchmark + @cd src && $(MAKE) benchmark @mkdir result || true @cd result && ../src/tests/eina_bench `date +%F_%s` diff --git a/libraries/eina/Makefile.in b/libraries/eina/Makefile.in index 8152d7f..423f4da 100644 --- a/libraries/eina/Makefile.in +++ b/libraries/eina/Makefile.in @@ -188,7 +188,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -240,8 +242,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -895,7 +895,7 @@ uninstall-am: uninstall-pkgconfigDATA doc: @echo "entering doc/" - @cd doc && make doc + @cd doc && $(MAKE) doc # Unit tests @@ -922,9 +922,9 @@ doc: @EFL_ENABLE_COVERAGE_TRUE@ @genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info @EFL_ENABLE_COVERAGE_TRUE@coverage: -@EFL_ENABLE_COVERAGE_TRUE@ @make lcov-reset -@EFL_ENABLE_COVERAGE_TRUE@ @make check -@EFL_ENABLE_COVERAGE_TRUE@ @make lcov-report +@EFL_ENABLE_COVERAGE_TRUE@ @$(MAKE) lcov-reset +@EFL_ENABLE_COVERAGE_TRUE@ @$(MAKE) check +@EFL_ENABLE_COVERAGE_TRUE@ @$(MAKE) lcov-report @EFL_ENABLE_COVERAGE_FALSE@lcov-reset: @EFL_ENABLE_COVERAGE_FALSE@ @echo "reconfigure with --enable-coverage" @@ -935,7 +935,7 @@ doc: @EFL_ENABLE_COVERAGE_FALSE@ @echo "reconfigure with --enable-tests --enable-coverage" @EFL_ENABLE_BENCHMARK_TRUE@benchmark: -@EFL_ENABLE_BENCHMARK_TRUE@ @cd src && make benchmark +@EFL_ENABLE_BENCHMARK_TRUE@ @cd src && $(MAKE) benchmark @EFL_ENABLE_BENCHMARK_TRUE@ @mkdir result || true @EFL_ENABLE_BENCHMARK_TRUE@ @cd result && ../src/tests/eina_bench `date +%F_%s` diff --git a/libraries/eina/NEWS b/libraries/eina/NEWS index 6f9a0ef..8669aa7 100644 --- a/libraries/eina/NEWS +++ b/libraries/eina/NEWS @@ -1,3 +1,20 @@ +Eina 1.2.0 + +Changes since Eina 1.1.0: +------------------------- + +Additions: + + * eina_mempool_calloc + * Eina_Semaphore abstraction API + * eina_xattr_fd_ls + * Eina_Xattr iterator : eina_xattr_value_fd_ls and eina_xattr_value_ls API + * eina_file_map_faulted API + * Xattr iterator for Eina_File : eina_file_xattr_get and eina_file_xattr_value_get API + * Deprecated eina_array_count_get(), use eina_array_count() instead. + * Added eina_inarray data type + * Added eina_value data type (generic value storage) + Eina 1.1.0 Changes since Eina 1.0.0: diff --git a/libraries/eina/README b/libraries/eina/README index 69ec205..6ff84c8 100644 --- a/libraries/eina/README +++ b/libraries/eina/README @@ -17,7 +17,7 @@ Eina is a library providing data structure utilities for EFL that are meant to be lean, efficient and tailored to EFL's needs. This saves each library implementing its own custom datatype handling and duplicating the code. Some of the datatypes handles are: - Arrays (variable sized) + Arrays (variable sized, including inline members) Hash tables Inlined linked lists Linked lists diff --git a/libraries/eina/aclocal.m4 b/libraries/eina/aclocal.m4 index 45a06ce..f26e3d1 100644 --- a/libraries/eina/aclocal.m4 +++ b/libraries/eina/aclocal.m4 @@ -13,14 +13,13 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. 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 . # @@ -48,10 +47,7 @@ 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]) -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]) - +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -64,6 +60,7 @@ if test -n "$PKG_CONFIG"; then AC_MSG_RESULT([no]) PKG_CONFIG="" fi + fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -72,31 +69,34 @@ 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. # -# 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 +# +# 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 # -------------------------------------------------------------- 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_default([$2], [:]) + m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) + # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[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 +[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 fi[]dnl ])# _PKG_CONFIG @@ -138,17 +138,16 @@ 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 --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - m4_default([$4], [AC_MSG_ERROR( + ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -156,24 +155,25 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT])[]dnl - ]) +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( + ifelse([$4], , [AC_MSG_FAILURE(dnl [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 .])[]dnl - ]) +To get pkg-config, see .])], + [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - $3 + ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES diff --git a/libraries/eina/config.guess b/libraries/eina/config.guess index c2246a4..e3a2116 100755 --- a/libraries/eina/config.guess +++ b/libraries/eina/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, 2010 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-12-30' +timestamp='2009-06-10' # 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-12-30' # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted 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. # -# 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 +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,9 +56,8 @@ 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, 2009, 2010 Free -Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 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." @@ -334,9 +333,6 @@ 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" @@ -811,12 +807,12 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:*) + *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - authenticamd | genuineintel | EM64T) + EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -858,20 +854,6 @@ 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 \ @@ -894,17 +876,6 @@ 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 ;; @@ -930,18 +901,39 @@ EOF #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" 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 @@ -950,11 +942,8 @@ EOF *) echo hppa-unknown-linux-gnu ;; esac exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux @@ -977,6 +966,58 @@ 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 @@ -1206,16 +1247,6 @@ 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/eina/config.h.in b/libraries/eina/config.h.in index d6370dc..9bd97a1 100644 --- a/libraries/eina/config.h.in +++ b/libraries/eina/config.h.in @@ -70,6 +70,9 @@ /* Set to 1 if ${enable_pass_through} is built */ #undef EINA_BUILD_PASS_THROUGH +/* Turn on debugging overhead in mempool */ +#undef EINA_DEBUG_MALLOC + /* if set, logging is limited to this amount. */ #undef EINA_LOG_LEVEL_MAXIMUM @@ -107,11 +110,10 @@ */ #undef HAVE_ALLOCA_H -/* Define to 1 if you have the header file, and it defines `DIR'. - */ +/* Define to 1 if you have a valid header file. */ #undef HAVE_DIRENT_H -/* Define to 1 if you have the `dirfd' function. */ +/* Define to 1 if you have the `dirfd' function or macro. */ #undef HAVE_DIRFD /* Define to 1 if you have the `dladdr' function. */ @@ -150,6 +152,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIBGEN_H +/* Define to 1 if we log support is on */ +#undef HAVE_LOG + +/* We will be able to know the exact amount of wasted memory */ +#undef HAVE_MALLOC_USABLE_SIZE + /* Have mcheck.h */ #undef HAVE_MCHECK @@ -162,9 +170,6 @@ /* Have mtrace */ #undef HAVE_MTRACE -/* Define to 1 if you have the header file, and it defines `DIR'. */ -#undef HAVE_NDIR_H - /* Define to 1 if you have the `openat' function. */ #undef HAVE_OPENAT @@ -192,13 +197,11 @@ /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#undef HAVE_SYS_DIR_H +/* Define to 1 if the system has the type `struct dirent'. */ +#undef HAVE_STRUCT_DIRENT -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#undef HAVE_SYS_NDIR_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MMAN_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H diff --git a/libraries/eina/config.sub b/libraries/eina/config.sub index c2d1257..eb0389a 100755 --- a/libraries/eina/config.sub +++ b/libraries/eina/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, 2010 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2010-01-22' +timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,16 +32,13 @@ timestamp='2010-01-22' # Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# diff and a properly formatted 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. @@ -75,9 +72,8 @@ 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, 2009, 2010 Free -Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 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." @@ -153,7 +149,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 | -microblaze) + -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; @@ -288,7 +284,6 @@ 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 \ @@ -296,14 +291,13 @@ 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 | picochip) + m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -346,7 +340,7 @@ case $basic_machine in | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -374,17 +368,15 @@ case $basic_machine in | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | romp-* | rs6000-* \ | 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-* | tilegx-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ - | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ @@ -734,9 +726,6 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) - basic_machine=microblaze-xilinx - ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -1087,11 +1076,6 @@ 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 @@ -1263,9 +1247,6 @@ 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|'` ;; @@ -1287,8 +1268,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* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1309,7 +1290,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* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1442,8 +1423,6 @@ case $os in -dicos*) os=-dicos ;; - -nacl*) - ;; -none) ;; *) diff --git a/libraries/eina/configure b/libraries/eina/configure index 7c01482..d3c2f30 100755 --- a/libraries/eina/configure +++ b/libraries/eina/configure @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for eina 1.1.0. +# Generated by GNU Autoconf 2.65 for eina 1.1.99.67344. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error 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=$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 + 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 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&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, old GNU/Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, 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='eina' PACKAGE_TARNAME='eina' -PACKAGE_VERSION='1.1.0' -PACKAGE_STRING='eina 1.1.0' +PACKAGE_VERSION='1.1.99.67344' +PACKAGE_STRING='eina 1.1.99.67344' PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net' PACKAGE_URL='' @@ -799,22 +799,24 @@ EINA_BUILD_CHAINED_POOL_FALSE EINA_BUILD_CHAINED_POOL_TRUE rt_libs iconv_libs +EINA_CONFIGURE_ENABLE_LOG EFL_FNMATCH_LIBS dlopen_libs ALLOCA -ESCAPE_LIBS -ESCAPE_CFLAGS +EINA_CONFIGURE_HAVE_DIRENT_H +EINA_SIZEOF_WCHAR_T +EINA_CONFIGURE_HAVE_STDINT_H +EINA_CONFIGURE_HAVE_INTTYPES_H lt_enable_auto_import EINA_LIBS EINA_CFLAGS EINA_CPPFLAGS +ESCAPE_LIBS +ESCAPE_CFLAGS EINA_HAVE_WIN32_FALSE EINA_HAVE_WIN32_TRUE EINA_HAVE_WINCE_FALSE EINA_HAVE_WINCE_TRUE -EINA_SIZEOF_WCHAR_T -EINA_CONFIGURE_HAVE_STDINT_H -EINA_CONFIGURE_HAVE_INTTYPES_H BUILD_TILER_EXAMPLE_FALSE BUILD_TILER_EXAMPLE_TRUE ECORE_EVAS_LIBS @@ -831,8 +833,6 @@ EFL_BUILD_DOC_TRUE efl_doxygen efl_have_doxygen pkgconfig_requires_private -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH PKG_CONFIG CXXCPP am__fastdepCXX_FALSE @@ -1007,6 +1007,8 @@ with_doxygen enable_valgrind enable_ememoa enable_assert +enable_debug_malloc +enable_log with_iconv_link enable_mempool_chained_pool enable_mempool_ememoa_fixed @@ -1037,8 +1039,6 @@ CXXFLAGS CCC CXXCPP PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR VALGRIND_CFLAGS VALGRIND_LIBS EVIL_CFLAGS @@ -1115,9 +1115,8 @@ do fi case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1162,7 +1161,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 @@ -1188,7 +1187,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 @@ -1392,7 +1391,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 @@ -1408,7 +1407,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 @@ -1438,8 +1437,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." ;; *=*) @@ -1447,7 +1446,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 ;; @@ -1465,13 +1464,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 @@ -1494,7 +1493,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' @@ -1508,8 +1507,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 @@ -1524,9 +1523,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. @@ -1565,11 +1564,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 @@ -1595,7 +1594,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 eina 1.1.0 to adapt to many kinds of systems. +\`configure' configures eina 1.1.99.67344 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1609,7 +1608,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 @@ -1665,7 +1664,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of eina 1.1.0:";; + short | recursive ) echo "Configuration of eina 1.1.99.67344:";; esac cat <<\_ACEOF @@ -1711,6 +1710,10 @@ Optional Features: usages, having it to report proper mempool leaks. --enable-ememoa build ememoa memory pool module [default=yes] --disable-assert turn off assertions + --enable-debug-malloc enable debugging of malloc usage overhead in our + allocator [default=enabled] + --disable-log disable Eina_Log infrastructure completly + [default=enabled] --enable-mempool-chained-pool enable build of chained pool [default=${enable_chained_pool}] @@ -1769,10 +1772,6 @@ Some influential environment variables: 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 VALGRIND_CFLAGS C compiler flags for VALGRIND, overriding pkg-config VALGRIND_LIBS @@ -1861,10 +1860,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -eina configure 1.1.0 -generated by GNU Autoconf 2.67 +eina configure 1.1.99.67344 +generated by GNU Autoconf 2.65 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1934,7 +1933,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; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1958,10 +1957,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1997,7 +1996,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2020,15 +2019,17 @@ $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;} -( $as_echo "## -------------------------------------------------------- ## +( cat <<\_ASBOX +## -------------------------------------------------------- ## ## 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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2092,7 +2093,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2168,7 +2169,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2286,7 +2287,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; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : @@ -2535,7 +2536,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2583,8 +2584,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 eina $as_me 1.1.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +It was created by eina $as_me 1.1.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2694,9 +2695,11 @@ trap 'exit_status=$? { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -2730,9 +2733,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do @@ -2745,9 +2750,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + cat <<\_ASBOX +## ------------------- ## ## File substitutions. ## -## ------------------- ##" +## ------------------- ## +_ASBOX echo for ac_var in $ac_subst_files do @@ -2761,9 +2768,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo cat confdefs.h echo @@ -2818,12 +2827,7 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # 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 + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2838,11 +2842,7 @@ 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" \ - || { { $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 ; } + . "$ac_site_file" fi done @@ -2918,7 +2918,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. ## @@ -2944,22 +2944,16 @@ am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - 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 + 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 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, @@ -3075,11 +3069,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 @@ -3101,7 +3095,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 @@ -3111,7 +3105,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 @@ -3349,7 +3343,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 eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3357,7 +3351,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;; @@ -3391,7 +3385,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 @@ -3407,7 +3401,7 @@ fi # Define the identity of the package. PACKAGE='eina' - VERSION='1.1.0' + VERSION='1.1.99.67344' cat >>confdefs.h <<_ACEOF @@ -3822,8 +3816,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 @@ -3937,8 +3931,9 @@ 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 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +{ as_fn_set_status 77 +as_fn_error "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; } @@ -3980,8 +3975,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 @@ -4038,9 +4033,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 @@ -4091,8 +4086,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 @@ -4482,7 +4477,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4498,11 +4493,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -4541,7 +4536,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4557,18 +4552,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f 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 @@ -4629,7 +4624,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 @@ -4695,7 +4690,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 @@ -4827,7 +4822,8 @@ 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 " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -5100,7 +5096,7 @@ fi # 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; } @@ -5111,16 +5107,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='-' @@ -5145,7 +5141,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 @@ -5153,7 +5149,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='-' @@ -5172,7 +5168,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 @@ -5554,7 +5550,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 @@ -5633,7 +5629,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 @@ -5749,7 +5745,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 : @@ -5951,13 +5947,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:5954: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5950: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5957: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5953: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5960: output\"" >&5) + (eval echo "\"\$as_me:5956: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6003,7 +5999,7 @@ else lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw*) + cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -6204,6 +6200,104 @@ esac +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; 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_prog_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +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_prog_OBJDUMP="${ac_tool_prefix}objdump" + $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 + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; 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_prog_ac_ct_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +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_prog_ac_ct_OBJDUMP="objdump" + $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 + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + 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 + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } @@ -6258,6 +6352,12 @@ mingw* | pw32*) fi ;; +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; @@ -6316,7 +6416,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -6796,7 +6896,7 @@ case $host_os in aix*) symcode='[BCDT]' ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) @@ -7055,7 +7155,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7058 "configure"' > conftest.$ac_ext + echo '#line 7158 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8315,11 +8415,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:8318: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8418: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8322: \$? = $ac_status" >&5 + echo "$as_me:8422: \$? = $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. @@ -8387,7 +8487,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # PIC is the default for these OSes. ;; - mingw* | cygwin* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style @@ -8402,10 +8502,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. case $host_cpu in - hppa*64*|ia64*) + hppa*64*) # +Z the default ;; *) @@ -8455,7 +8556,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } fi ;; - mingw* | cygwin* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' @@ -8483,13 +8584,27 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in - icc* | ecc* | ifort*) + # old Intel for x86_64 which still supported -KPIC. + ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='--shared' + lt_prog_compiler_static='--static' + ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -8639,11 +8754,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:8642: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8757: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8646: \$? = $ac_status" >&5 + echo "$as_me:8761: \$? = $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. @@ -8744,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:8747: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8862: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8751: \$? = $ac_status" >&5 + echo "$as_me:8866: \$? = $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 @@ -8799,11 +8914,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:8802: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8917: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8806: \$? = $ac_status" >&5 + echo "$as_me:8921: \$? = $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 @@ -8903,7 +9018,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie extract_expsyms_cmds= case $host_os in - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -8918,6 +9033,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu) + link_all_deplibs=no + ;; esac ld_shlibs=yes @@ -8939,6 +9057,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -8990,7 +9109,7 @@ _LT_EOF fi ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' @@ -9030,7 +9149,7 @@ _LT_EOF archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -9056,6 +9175,9 @@ _LT_EOF tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + whole_archive_flag_spec= + tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; @@ -9288,6 +9410,7 @@ _LT_EOF fi fi + export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes @@ -9400,7 +9523,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi export_dynamic_flag_spec=-rdynamic ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is @@ -9431,7 +9554,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" - if test "$GCC" = "yes"; then + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" @@ -9523,7 +9650,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -10239,14 +10366,14 @@ bsdi[45]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -10269,7 +10396,7 @@ cygwin* | mingw* | pw32*) soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; - mingw*) + mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` @@ -10484,7 +10611,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -10722,7 +10849,7 @@ tpf*) version_type=linux need_lib_prefix=no need_version=no - library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -10899,7 +11026,7 @@ else lt_cv_dlopen_self=yes ;; - mingw* | pw32*) + mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; @@ -11171,7 +11298,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11174 "configure" +#line 11301 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11212,10 +11339,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -11231,7 +11354,7 @@ int main () else puts (dlerror ()); - exit (status); + return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -11271,7 +11394,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11274 "configure" +#line 11397 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11312,10 +11435,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -11331,7 +11450,7 @@ int main () else puts (dlerror ()); - exit (status); + return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -11519,15 +11638,15 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define VMIC 0 +#define VMIC 99 _ACEOF cat >>confdefs.h <<_ACEOF -#define VREV 0 +#define VREV 67344 _ACEOF -version_info="2:0:1" +version_info="2:99:1" release_info="" @@ -11549,7 +11668,7 @@ case "$host_os" in MODULE_ARCH="$host_os-$host_cpu" ;; *) - MODULE_ARCH="$host_os-$host_cpu-1.1.0" + MODULE_ARCH="$host_os-$host_cpu-1.1.99" ;; esac @@ -12047,7 +12166,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 @@ -12055,7 +12174,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 ;; *) ;; @@ -12118,7 +12237,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="" @@ -12379,7 +12498,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 @@ -12793,8 +12912,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 @@ -13970,7 +14089,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -13986,11 +14105,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -14029,7 +14148,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -14045,11 +14164,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else @@ -14278,7 +14397,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 : @@ -14439,6 +14558,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie fi fi + export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. @@ -14555,7 +14675,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' @@ -14588,7 +14708,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" - if test "$GCC" = "yes"; then + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" @@ -14798,7 +14922,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi inherit_rpath_CXX=yes ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -15505,7 +15629,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | cygwin* | os2* | pw32*) + mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style @@ -15531,10 +15655,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } fi ;; hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. case $host_cpu in - hppa*64*|ia64*) + hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' @@ -15625,19 +15750,26 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; esac ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; - icpc* | ecpc* ) - # Intel C++ + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + lt_prog_compiler_static_CXX='-static' + ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' @@ -15806,11 +15938,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:15809: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15941: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15813: \$? = $ac_status" >&5 + echo "$as_me:15945: \$? = $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. @@ -15905,11 +16037,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:15908: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16040: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15912: \$? = $ac_status" >&5 + echo "$as_me:16044: \$? = $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 @@ -15957,11 +16089,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:15960: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16092: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15964: \$? = $ac_status" >&5 + echo "$as_me:16096: \$? = $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 @@ -16030,7 +16162,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; - cygwin* | mingw*) + cygwin* | mingw* | cegcc*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) @@ -16291,14 +16423,14 @@ bsdi[45]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -16321,7 +16453,7 @@ cygwin* | mingw* | pw32*) soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; - mingw*) + mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` @@ -16535,7 +16667,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -16773,7 +16905,7 @@ tpf*) version_type=linux need_lib_prefix=no need_version=no - library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -16909,10 +17041,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # pkg-config - - - - 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. @@ -17025,6 +17153,7 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } PKG_CONFIG="" fi + fi # Check whether pkg-config supports Requires.private @@ -17220,10 +17349,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND" >&5 $as_echo_n "checking for VALGRIND... " >&6; } -if test -n "$VALGRIND_CFLAGS"; then - pkg_cv_VALGRIND_CFLAGS="$VALGRIND_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$VALGRIND_CFLAGS"; then + pkg_cv_VALGRIND_CFLAGS="$VALGRIND_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind >= 2.4.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "valgrind >= 2.4.0") 2>&5 ac_status=$? @@ -17233,13 +17363,15 @@ if test -n "$VALGRIND_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$VALGRIND_LIBS"; then - pkg_cv_VALGRIND_LIBS="$VALGRIND_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$VALGRIND_LIBS"; then + pkg_cv_VALGRIND_LIBS="$VALGRIND_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind >= 2.4.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "valgrind >= 2.4.0") 2>&5 ac_status=$? @@ -17249,15 +17381,14 @@ if test -n "$VALGRIND_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -17265,30 +17396,30 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - VALGRIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "valgrind >= 2.4.0" 2>&1` + VALGRIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "valgrind >= 2.4.0"` else - VALGRIND_PKG_ERRORS=`$PKG_CONFIG --print-errors "valgrind >= 2.4.0" 2>&1` + VALGRIND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "valgrind >= 2.4.0"` fi # Put the nasty error message in config.log where it belongs echo "$VALGRIND_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } $as_echo "#define NVALGRIND 1" >>confdefs.h if test "x${want_valgrind}" = "xyes"; then - as_fn_error $? "Valgrind >= 2.4.0 is required" "$LINENO" 5 + as_fn_error "Valgrind >= 2.4.0 is required" "$LINENO" 5 fi elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } $as_echo "#define NVALGRIND 1" >>confdefs.h if test "x${want_valgrind}" = "xyes"; then - as_fn_error $? "Valgrind >= 2.4.0 is required" "$LINENO" 5 + as_fn_error "Valgrind >= 2.4.0 is required" "$LINENO" 5 fi else @@ -17318,10 +17449,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVIL" >&5 $as_echo_n "checking for EVIL... " >&6; } -if test -n "$EVIL_CFLAGS"; then - pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_CFLAGS"; then + pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" + else + 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=$? @@ -17331,13 +17463,15 @@ if test -n "$EVIL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EVIL_LIBS"; then - pkg_cv_EVIL_LIBS="$EVIL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_LIBS"; then + pkg_cv_EVIL_LIBS="$EVIL_LIBS" + else + 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=$? @@ -17347,15 +17481,14 @@ if test -n "$EVIL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -17363,14 +17496,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evil >= 1.0.0"` else - EVIL_PKG_ERRORS=`$PKG_CONFIG --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evil >= 1.0.0"` 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 @@ -17379,13 +17512,12 @@ 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. @@ -17394,13 +17526,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 @@ -17438,10 +17570,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMEMOA" >&5 $as_echo_n "checking for EMEMOA... " >&6; } -if test -n "$EMEMOA_CFLAGS"; then - pkg_cv_EMEMOA_CFLAGS="$EMEMOA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EMEMOA_CFLAGS"; then + pkg_cv_EMEMOA_CFLAGS="$EMEMOA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ememoa >= 0.0.26 \""; } >&5 ($PKG_CONFIG --exists --print-errors "ememoa >= 0.0.26 ") 2>&5 ac_status=$? @@ -17451,13 +17584,15 @@ if test -n "$EMEMOA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EMEMOA_LIBS"; then - pkg_cv_EMEMOA_LIBS="$EMEMOA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EMEMOA_LIBS"; then + pkg_cv_EMEMOA_LIBS="$EMEMOA_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ememoa >= 0.0.26 \""; } >&5 ($PKG_CONFIG --exists --print-errors "ememoa >= 0.0.26 ") 2>&5 ac_status=$? @@ -17467,15 +17602,14 @@ if test -n "$EMEMOA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -17483,17 +17617,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EMEMOA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ememoa >= 0.0.26 " 2>&1` + EMEMOA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ememoa >= 0.0.26 "` else - EMEMOA_PKG_ERRORS=`$PKG_CONFIG --print-errors "ememoa >= 0.0.26 " 2>&1` + EMEMOA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ememoa >= 0.0.26 "` fi # Put the nasty error message in config.log where it belongs echo "$EMEMOA_PKG_ERRORS" >&5 - enable_ememoa="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + enable_ememoa="no" +elif test $pkg_failed = untried; then enable_ememoa="no" else EMEMOA_CFLAGS=$pkg_cv_EMEMOA_CFLAGS @@ -17509,10 +17643,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECORE_EVAS" >&5 $as_echo_n "checking for ECORE_EVAS... " >&6; } -if test -n "$ECORE_EVAS_CFLAGS"; then - pkg_cv_ECORE_EVAS_CFLAGS="$ECORE_EVAS_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$ECORE_EVAS_CFLAGS"; then + pkg_cv_ECORE_EVAS_CFLAGS="$ECORE_EVAS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas ecore evas\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-evas ecore evas") 2>&5 ac_status=$? @@ -17522,13 +17657,15 @@ if test -n "$ECORE_EVAS_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$ECORE_EVAS_LIBS"; then - pkg_cv_ECORE_EVAS_LIBS="$ECORE_EVAS_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$ECORE_EVAS_LIBS"; then + pkg_cv_ECORE_EVAS_LIBS="$ECORE_EVAS_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas ecore evas\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-evas ecore evas") 2>&5 ac_status=$? @@ -17538,15 +17675,14 @@ if test -n "$ECORE_EVAS_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -17554,17 +17690,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ecore-evas ecore evas" 2>&1` + ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ecore-evas ecore evas"` else - ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --print-errors "ecore-evas ecore evas" 2>&1` + ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ecore-evas ecore evas"` fi # Put the nasty error message in config.log where it belongs echo "$ECORE_EVAS_PKG_ERRORS" >&5 - build_tiler_example="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + build_tiler_example="no" +elif test $pkg_failed = untried; then build_tiler_example="no" else ECORE_EVAS_CFLAGS=$pkg_cv_ECORE_EVAS_CFLAGS @@ -17583,364 +17719,10 @@ else fi - -### Checks for header files - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5 -$as_echo_n "checking whether to enable assertions... " >&6; } - # Check whether --enable-assert was given. -if test "${enable_assert+set}" = set; then : - enableval=$enable_assert; ac_enable_assert=$enableval - if test "x$enableval" = xno; then : - -$as_echo "#define NDEBUG 1" >>confdefs.h - -elif test "x$enableval" != xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5 -$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;} - ac_enable_assert=yes -fi -else - ac_enable_assert=yes -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_assert" >&5 -$as_echo "$ac_enable_assert" >&6; } - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if eval "test \"\${$as_ac_Header+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" -else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_ac_Header - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dir; 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_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' x; 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_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - - - -default_max="4096" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATH_MAX in limits.h" >&5 -$as_echo_n "checking for PATH_MAX in limits.h... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include - -int -main () -{ - -int i = PATH_MAX; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - - -cat >>confdefs.h <<_ACEOF -#define PATH_MAX ${default_max} -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: using ${default_max}" >&5 -$as_echo "no: using ${default_max}" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -for ac_header in unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.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" -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 - -fi - -done - - -if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then - EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H" - -$as_echo "#define HAVE_INTTYPES_H 1" >>confdefs.h - -fi - - -if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then - EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H" - -$as_echo "#define HAVE_STDINT_H 1" >>confdefs.h - -fi - - -### Checks for types - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 -$as_echo_n "checking size of wchar_t... " >&6; } -if test "${ac_cv_sizeof_wchar_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_wchar_t" = 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_error 77 "cannot compute sizeof (wchar_t) -See \`config.log' for more details" "$LINENO" 5 ; } - else - ac_cv_sizeof_wchar_t=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 -$as_echo "$ac_cv_sizeof_wchar_t" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t -_ACEOF - - -EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t - -ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "#include - #if HAVE_SIGINFO_H - # include - #endif - -" -if test "x$ac_cv_type_siginfo_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SIGINFO_T 1 -_ACEOF - - -fi - - -### Checks for structures - - -### Checks for compiler characteristics -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +### Checks for compiler characteristics +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18238,8 +18020,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 inline" >&5 @@ -18639,20 +18421,112 @@ else EINA_HAVE_WINCE_FALSE= fi - if test "x$have_win32" = "xyes"; then - EINA_HAVE_WIN32_TRUE= - EINA_HAVE_WIN32_FALSE='#' -else - EINA_HAVE_WIN32_TRUE='#' - EINA_HAVE_WIN32_FALSE= + if test "x$have_win32" = "xyes"; then + EINA_HAVE_WIN32_TRUE= + EINA_HAVE_WIN32_FALSE='#' +else + EINA_HAVE_WIN32_TRUE='#' + EINA_HAVE_WIN32_FALSE= +fi + + + + + +CFLAGS_save="${CFLAGS}" +CFLAGS="${CFLAGS} -Wall" + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wall" >&5 +$as_echo_n "checking whether the compiler supports -Wall... " >&6; } + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + have_flag="yes" +else + have_flag="no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_flag}" >&5 +$as_echo "${have_flag}" >&6; } + +if test "x${have_flag}" = "xno" ; then + CFLAGS="${CFLAGS_save}" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + +CFLAGS_save="${CFLAGS}" +CFLAGS="${CFLAGS} -W" + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -W" >&5 +$as_echo_n "checking whether the compiler supports -W... " >&6; } + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + have_flag="yes" +else + have_flag="no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_flag}" >&5 +$as_echo "${have_flag}" >&6; } + +if test "x${have_flag}" = "xno" ; then + CFLAGS="${CFLAGS_save}" fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + CFLAGS_save="${CFLAGS}" -CFLAGS="${CFLAGS} -Wall" +CFLAGS="${CFLAGS} -Wshadow" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -18660,8 +18534,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wall" >&5 -$as_echo_n "checking whether the compiler supports -Wall... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wshadow" >&5 +$as_echo_n "checking whether the compiler supports -Wshadow... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18695,9 +18569,147 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +case "$host_vendor" in + ps3*) -CFLAGS_save="${CFLAGS}" -CFLAGS="${CFLAGS} -W" +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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"escape\""; } >&5 + ($PKG_CONFIG --exists --print-errors "escape") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ESCAPE_CFLAGS=`$PKG_CONFIG --cflags "escape" 2>/dev/null` +else + pkg_failed=yes +fi + fi +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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"escape\""; } >&5 + ($PKG_CONFIG --exists --print-errors "escape") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ESCAPE_LIBS=`$PKG_CONFIG --libs "escape" 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 + ESCAPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "escape"` + else + ESCAPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "escape"` + 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: + +$ESCAPE_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +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 +elif test $pkg_failed = untried; then + { { $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 +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +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. + +To get pkg-config, see . +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 + +$as_echo "#define HAVE_ESCAPE 1" >>confdefs.h + + requirement_eina="escape" + EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}" + ;; +esac + + + + + +### Checks for linker characteristics +EINA_LIBS= +lt_enable_auto_import="" +case "${host_os}" in + mingw*) + EINA_LIBS="-ldl ${EVIL_LIBS} -lm" + lt_enable_auto_import="-Wl,--enable-auto-import" + ;; + dragonfly*|openbsd*) + EINA_LIBS="-lm" + ;; + freebsd*|netbsd*) + EINA_LIBS="-lrt -lm" + ;; + darwin*) + EINA_LIBS="-lm" + ;; + cygwin*) + EINA_LIBS="-ldl -lm" + ;; + *) + EINA_LIBS="-ldl -lrt -lm" + ;; +esac +case "$host_vendor" in + ps3*) + # Escape had already been checked to exist + EINA_LIBS="${ESCAPE_LIBS}" + ;; +esac + + + + + +LDFLAGS_save="${LDFLAGS}" +LDFLAGS="${LDFLAGS} -fno-strict-aliasing" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -18705,8 +18717,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -W" >&5 -$as_echo_n "checking whether the compiler supports -W... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-strict-aliasing" >&5 +$as_echo_n "checking whether the compiler supports -fno-strict-aliasing... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18719,17 +18731,18 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_link "$LINENO"; then : have_flag="yes" else have_flag="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_flag}" >&5 $as_echo "${have_flag}" >&6; } if test "x${have_flag}" = "xno" ; then - CFLAGS="${CFLAGS_save}" + LDFLAGS="${LDFLAGS_save}" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -18740,44 +18753,111 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +CFLAGS="${CFLAGS} ${EINA_CFLAGS}" +LDFLAGS="${LDFLAGS} ${EINA_LDFLAGS}" +LIBS="${LIBS} ${EINA_LIBS}" + +### Checks for header files + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5 +$as_echo_n "checking whether to enable assertions... " >&6; } + # Check whether --enable-assert was given. +if test "${enable_assert+set}" = set; then : + enableval=$enable_assert; ac_enable_assert=$enableval + if test "x$enableval" = xno; then : +$as_echo "#define NDEBUG 1" >>confdefs.h + +elif test "x$enableval" != xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5 +$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;} + ac_enable_assert=yes +fi +else + ac_enable_assert=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_assert" >&5 +$as_echo "$ac_enable_assert" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if test "${ac_cv_header_time+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes +else + ac_cv_header_time=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +fi -CFLAGS_save="${CFLAGS}" -CFLAGS="${CFLAGS} -Wshadow" + +default_max="4096" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wshadow" >&5 -$as_echo_n "checking whether the compiler supports -Wshadow... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATH_MAX in limits.h" >&5 +$as_echo_n "checking for PATH_MAX in limits.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + int main () { +int i = PATH_MAX; + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - have_flag="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - have_flag="no" + + +cat >>confdefs.h <<_ACEOF +#define PATH_MAX ${default_max} +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: using ${default_max}" >&5 +$as_echo "no: using ${default_max}" >&6; } + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_flag}" >&5 -$as_echo "${have_flag}" >&6; } -if test "x${have_flag}" = "xno" ; then - CFLAGS="${CFLAGS_save}" -fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -18786,184 +18866,114 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +for ac_header in unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h strings.h sys/mman.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 : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi +done +if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then + EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H" -### Checks for linker characteristics -EINA_LIBS= -lt_enable_auto_import="" -case "${host_os}" in - mingw*) - EINA_LIBS="-ldl ${EVIL_LIBS} -lm" - lt_enable_auto_import="-Wl,--enable-auto-import" - ;; - dragonfly*|openbsd*) - EINA_LIBS="-lm" - ;; - freebsd*|netbsd*) - EINA_LIBS="-lrt -lm" - ;; - darwin*) - EINA_LIBS="-lm" - ;; - cygwin*) - EINA_LIBS="-ldl -lm" - ;; - *) - EINA_LIBS="-ldl -lrt -lm" - ;; -esac +$as_echo "#define HAVE_INTTYPES_H 1" >>confdefs.h +fi -case "$host_vendor" in - ps3*) +if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then + EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H" -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ESCAPE" >&5 -$as_echo_n "checking for ESCAPE... " >&6; } +$as_echo "#define HAVE_STDINT_H 1" >>confdefs.h -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=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_ESCAPE_CFLAGS=`$PKG_CONFIG --cflags "escape" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -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=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_ESCAPE_LIBS=`$PKG_CONFIG --libs "escape" 2>/dev/null` -else - pkg_failed=yes -fi - else - pkg_failed=untried fi +### Checks for types -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 +$as_echo_n "checking size of wchar_t... " >&6; } +if test "${ac_cv_sizeof_wchar_t+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"; then : -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes else - _pkg_short_errors_supported=no + if test "$ac_cv_type_wchar_t" = 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 (wchar_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_wchar_t=0 + fi fi - if test $_pkg_short_errors_supported = yes; then - ESCAPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "escape" 2>&1` - else - 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: - -$ESCAPE_PKG_ERRORS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 +$as_echo "$ac_cv_sizeof_wchar_t" >&6; } -Consider adjusting the PKG_CONFIG_PATH environment variable if you -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 -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 -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. -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. +cat >>confdefs.h <<_ACEOF +#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t +_ACEOF -To get pkg-config, see . -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 +EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t -$as_echo "#define HAVE_ESCAPE 1" >>confdefs.h +ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "#include + #if HAVE_SIGINFO_H + # include + #endif - requirement_eina="escape" - EINA_LIBS="${ESCAPE_LIBS}" - EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}" - ;; -esac +" +if test "x$ac_cv_type_siginfo_t" = x""yes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGINFO_T 1 +_ACEOF -LDFLAGS_save="${LDFLAGS}" -LDFLAGS="${LDFLAGS} -fno-strict-aliasing" +fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-strict-aliasing" >&5 -$as_echo_n "checking whether the compiler supports -fno-strict-aliasing... " >&6; } +### Check if dirent.h is usable -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +ac_fn_c_check_type "$LINENO" "struct dirent" "ac_cv_type_struct_dirent" "#include -int -main () -{ +" +if test "x$ac_cv_type_struct_dirent" = x""yes; then : - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_DIRENT 1 _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - have_flag="yes" + +have_dirent="yes" else - have_flag="no" + have_dirent="no" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_flag}" >&5 -$as_echo "${have_flag}" >&6; } -if test "x${have_flag}" = "xno" ; then - LDFLAGS="${LDFLAGS_save}" -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test "x${have_dirent}" = "xyes" ; then + EINA_CONFIGURE_HAVE_DIRENT_H="#define EINA_HAVE_DIRENT_H" +$as_echo "#define HAVE_DIRENT_H 1" >>confdefs.h +fi ### Checks for library functions @@ -19150,7 +19160,8 @@ 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" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -19212,11 +19223,12 @@ _ACEOF fi -for ac_func in strlcpy dirfd openat fstatat fpathconf execvp +for ac_func in strlcpy openat fstatat fpathconf 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" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -19225,6 +19237,87 @@ fi done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5 +$as_echo_n "checking for dirfd... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include + +int +main () +{ + +int main(void) +{ + DIR *dirp; + return dirfd(dirp); +} + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + have_dirfd="yes" +else + have_dirfd="no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_dirfd}" >&5 +$as_echo "${have_dirfd}" >&6; } + +if test "x${have_dirfd}" = "xyes" ; then + +$as_echo "#define HAVE_DIRFD 1" >>confdefs.h + +fi + +# check debug information for malloc +for ac_func in malloc_usable_size +do : + ac_fn_c_check_func "$LINENO" "malloc_usable_size" "ac_cv_func_malloc_usable_size" +if test "x$ac_cv_func_malloc_usable_size" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MALLOC_USABLE_SIZE 1 +_ACEOF + malloc_true_size="yes" +else + malloc_true_size="no" +fi +done + +if test "x${malloc_true_size}" = "xyes" ; then + +$as_echo "#define HAVE_MALLOC_USABLE_SIZE 1" >>confdefs.h + +fi + +want_debug_malloc="no" +# Check whether --enable-debug-malloc was given. +if test "${enable_debug_malloc+set}" = set; then : + enableval=$enable_debug_malloc; + if test "x${enableval}" = "xyes" ; then + want_debug_malloc="yes" + else + want_debug_malloc="no" + fi + +else + want_debug_malloc="no" +fi + + +if test "x${malloc_true_size}" = "xyes" -a "x${want_debug_malloc}" = "xyes"; then + +$as_echo "#define EINA_DEBUG_MALLOC 1" >>confdefs.h + +fi + # dlopen and dladdr dlopen_libs="" case "$host_os" in @@ -19358,6 +19451,7 @@ fi esac +have_log="yes" ac_fn_c_check_header_mongrel "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default" @@ -19439,11 +19533,44 @@ fi if test "x$_efl_have_fnmatch" = "xyes"; then : + have_log="yes" +else + have_log="no" +fi + + + +want_log="yes" +# Check whether --enable-log was given. +if test "${enable_log+set}" = set; then : + enableval=$enable_log; + if test "x${enableval}" = "xyes" ; then + want_log="yes" + else + want_log="no" + fi else - as_fn_error $? "Cannot find fnmatch()" "$LINENO" 5 + want_log="yes" +fi + + +enable_log="no" +if test "x${have_log}" = xyes -a "x${want_log}" = xyes; then + enable_log="yes" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking wether to build Eina_Log infrastructure" >&5 +$as_echo_n "checking wether to build Eina_Log infrastructure... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_log}" >&5 +$as_echo "${enable_log}" >&6; } + +if test "x${enable_log}" = "xyes"; then + EINA_CONFIGURE_ENABLE_LOG="#define EINA_ENABLE_LOG" + +$as_echo "#define HAVE_LOG 1" >>confdefs.h + +fi for ac_header in mcheck.h @@ -20239,10 +20366,11 @@ 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" && \ +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=$? @@ -20252,13 +20380,15 @@ if test -n "$CHECK_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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" && \ +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=$? @@ -20268,15 +20398,14 @@ if test -n "$CHECK_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -20284,17 +20413,17 @@ 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` + CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "check >= 0.9.5"` else - CHECK_PKG_ERRORS=`$PKG_CONFIG --print-errors "check >= 0.9.5" 2>&1` + 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 - _efl_enable_tests="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&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 @@ -20489,10 +20618,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 $as_echo_n "checking for GLIB... " >&6; } -if test -n "$GLIB_CFLAGS"; then - pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GLIB_CFLAGS"; then + pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" + else + 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=$? @@ -20502,13 +20632,15 @@ if test -n "$GLIB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$GLIB_LIBS"; then - pkg_cv_GLIB_LIBS="$GLIB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GLIB_LIBS"; then + pkg_cv_GLIB_LIBS="$GLIB_LIBS" + else + 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=$? @@ -20518,15 +20650,14 @@ if test -n "$GLIB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -20534,17 +20665,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0" 2>&1` + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0"` else - GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0" 2>&1` + GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 - have_module="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_module="no" +elif test $pkg_failed = untried; then have_module="no" else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS @@ -20753,7 +20884,6 @@ 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$//' @@ -20777,148 +20907,148 @@ 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 "${EINA_HAVE_THREADS_TRUE}" && test -z "${EINA_HAVE_THREADS_FALSE}"; then - as_fn_error $? "conditional \"EINA_HAVE_THREADS\" was never defined. + as_fn_error "conditional \"EINA_HAVE_THREADS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_DEBUG_THREADS_TRUE}" && test -z "${EINA_DEBUG_THREADS_FALSE}"; then - as_fn_error $? "conditional \"EINA_DEBUG_THREADS\" was never defined. + as_fn_error "conditional \"EINA_DEBUG_THREADS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_ON_OFF_THREADS_TRUE}" && test -z "${EINA_ON_OFF_THREADS_FALSE}"; then - as_fn_error $? "conditional \"EINA_ON_OFF_THREADS\" was never defined. + as_fn_error "conditional \"EINA_ON_OFF_THREADS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SAFETY_CHECKS_TRUE}" && test -z "${SAFETY_CHECKS_FALSE}"; then - as_fn_error $? "conditional \"SAFETY_CHECKS\" was never defined. + as_fn_error "conditional \"SAFETY_CHECKS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_AMALGAMATION_TRUE}" && test -z "${EINA_AMALGAMATION_FALSE}"; then - as_fn_error $? "conditional \"EINA_AMALGAMATION\" was never defined. + as_fn_error "conditional \"EINA_AMALGAMATION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_ENABLE_BENCHMARK_E17_TRUE}" && test -z "${EINA_ENABLE_BENCHMARK_E17_FALSE}"; then - as_fn_error $? "conditional \"EINA_ENABLE_BENCHMARK_E17\" was never defined. + as_fn_error "conditional \"EINA_ENABLE_BENCHMARK_E17\" 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 "${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 "${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 "${BUILD_TILER_EXAMPLE_TRUE}" && test -z "${BUILD_TILER_EXAMPLE_FALSE}"; then - as_fn_error $? "conditional \"BUILD_TILER_EXAMPLE\" was never defined. + as_fn_error "conditional \"BUILD_TILER_EXAMPLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_HAVE_WINCE_TRUE}" && test -z "${EINA_HAVE_WINCE_FALSE}"; then - as_fn_error $? "conditional \"EINA_HAVE_WINCE\" was never defined. + as_fn_error "conditional \"EINA_HAVE_WINCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_HAVE_WIN32_TRUE}" && test -z "${EINA_HAVE_WIN32_FALSE}"; then - as_fn_error $? "conditional \"EINA_HAVE_WIN32\" was never defined. + as_fn_error "conditional \"EINA_HAVE_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_BUILD_CHAINED_POOL_TRUE}" && test -z "${EINA_BUILD_CHAINED_POOL_FALSE}"; then - as_fn_error $? "conditional \"EINA_BUILD_CHAINED_POOL\" was never defined. + as_fn_error "conditional \"EINA_BUILD_CHAINED_POOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_STATIC_BUILD_CHAINED_POOL_TRUE}" && test -z "${EINA_STATIC_BUILD_CHAINED_POOL_FALSE}"; then - as_fn_error $? "conditional \"EINA_STATIC_BUILD_CHAINED_POOL\" was never defined. + as_fn_error "conditional \"EINA_STATIC_BUILD_CHAINED_POOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_BUILD_EMEMOA_FIXED_TRUE}" && test -z "${EINA_BUILD_EMEMOA_FIXED_FALSE}"; then - as_fn_error $? "conditional \"EINA_BUILD_EMEMOA_FIXED\" was never defined. + as_fn_error "conditional \"EINA_BUILD_EMEMOA_FIXED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_STATIC_BUILD_EMEMOA_FIXED_TRUE}" && test -z "${EINA_STATIC_BUILD_EMEMOA_FIXED_FALSE}"; then - as_fn_error $? "conditional \"EINA_STATIC_BUILD_EMEMOA_FIXED\" was never defined. + as_fn_error "conditional \"EINA_STATIC_BUILD_EMEMOA_FIXED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_BUILD_EMEMOA_UNKNOWN_TRUE}" && test -z "${EINA_BUILD_EMEMOA_UNKNOWN_FALSE}"; then - as_fn_error $? "conditional \"EINA_BUILD_EMEMOA_UNKNOWN\" was never defined. + as_fn_error "conditional \"EINA_BUILD_EMEMOA_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_STATIC_BUILD_EMEMOA_UNKNOWN_TRUE}" && test -z "${EINA_STATIC_BUILD_EMEMOA_UNKNOWN_FALSE}"; then - as_fn_error $? "conditional \"EINA_STATIC_BUILD_EMEMOA_UNKNOWN\" was never defined. + as_fn_error "conditional \"EINA_STATIC_BUILD_EMEMOA_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_BUILD_FIXED_BITMAP_TRUE}" && test -z "${EINA_BUILD_FIXED_BITMAP_FALSE}"; then - as_fn_error $? "conditional \"EINA_BUILD_FIXED_BITMAP\" was never defined. + as_fn_error "conditional \"EINA_BUILD_FIXED_BITMAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_STATIC_BUILD_FIXED_BITMAP_TRUE}" && test -z "${EINA_STATIC_BUILD_FIXED_BITMAP_FALSE}"; then - as_fn_error $? "conditional \"EINA_STATIC_BUILD_FIXED_BITMAP\" was never defined. + as_fn_error "conditional \"EINA_STATIC_BUILD_FIXED_BITMAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_BUILD_PASS_THROUGH_TRUE}" && test -z "${EINA_BUILD_PASS_THROUGH_FALSE}"; then - as_fn_error $? "conditional \"EINA_BUILD_PASS_THROUGH\" was never defined. + as_fn_error "conditional \"EINA_BUILD_PASS_THROUGH\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_STATIC_BUILD_PASS_THROUGH_TRUE}" && test -z "${EINA_STATIC_BUILD_PASS_THROUGH_FALSE}"; then - as_fn_error $? "conditional \"EINA_STATIC_BUILD_PASS_THROUGH\" was never defined. + as_fn_error "conditional \"EINA_STATIC_BUILD_PASS_THROUGH\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_BUILD_BUDDY_TRUE}" && test -z "${EINA_BUILD_BUDDY_FALSE}"; then - as_fn_error $? "conditional \"EINA_BUILD_BUDDY\" was never defined. + as_fn_error "conditional \"EINA_BUILD_BUDDY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_STATIC_BUILD_BUDDY_TRUE}" && test -z "${EINA_STATIC_BUILD_BUDDY_FALSE}"; then - as_fn_error $? "conditional \"EINA_STATIC_BUILD_BUDDY\" was never defined. + as_fn_error "conditional \"EINA_STATIC_BUILD_BUDDY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_BUILD_ONE_BIG_TRUE}" && test -z "${EINA_BUILD_ONE_BIG_FALSE}"; then - as_fn_error $? "conditional \"EINA_BUILD_ONE_BIG\" was never defined. + as_fn_error "conditional \"EINA_BUILD_ONE_BIG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_STATIC_BUILD_ONE_BIG_TRUE}" && test -z "${EINA_STATIC_BUILD_ONE_BIG_FALSE}"; then - as_fn_error $? "conditional \"EINA_STATIC_BUILD_ONE_BIG\" was never defined. + as_fn_error "conditional \"EINA_STATIC_BUILD_ONE_BIG\" 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 \"EFL_ENABLE_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EFL_ENABLE_COVERAGE_TRUE}" && test -z "${EFL_ENABLE_COVERAGE_FALSE}"; then - as_fn_error $? "conditional \"EFL_ENABLE_COVERAGE\" was never defined. + as_fn_error "conditional \"EFL_ENABLE_COVERAGE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EFL_ENABLE_BENCHMARK_TRUE}" && test -z "${EFL_ENABLE_BENCHMARK_FALSE}"; then - as_fn_error $? "conditional \"EFL_ENABLE_BENCHMARK\" was never defined. + as_fn_error "conditional \"EFL_ENABLE_BENCHMARK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EINA_HAVE_GLIB_TRUE}" && test -z "${EINA_HAVE_GLIB_FALSE}"; then - as_fn_error $? "conditional \"EINA_HAVE_GLIB\" was never defined. + as_fn_error "conditional \"EINA_HAVE_GLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CITYHASH_BENCH_TRUE}" && test -z "${CITYHASH_BENCH_FALSE}"; then - as_fn_error $? "conditional \"CITYHASH_BENCH\" was never defined. + as_fn_error "conditional \"CITYHASH_BENCH\" 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 @@ -21068,19 +21198,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error 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=$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 + 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 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -21276,7 +21406,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 @@ -21329,8 +21459,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 eina $as_me 1.1.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +This file was extended by eina $as_me 1.1.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -21395,11 +21525,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="\\ -eina config.status 1.1.0 -configured by $0, generated by GNU Autoconf 2.67, +eina config.status 1.1.99.67344 +configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -21417,16 +21547,11 @@ 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 @@ -21448,7 +21573,6 @@ 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;; @@ -21461,7 +21585,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 ;; @@ -21470,7 +21594,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" @@ -21900,7 +22024,7 @@ do "src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;; "src/examples/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/Makefile" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -21938,7 +22062,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. @@ -21955,7 +22079,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 @@ -21969,18 +22093,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 @@ -22069,28 +22193,20 @@ 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 sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ 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[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// s/^[^=]*=[ ]*$// }' fi @@ -22118,7 +22234,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 @@ -22203,7 +22319,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" @@ -22216,7 +22332,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 @@ -22244,7 +22360,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error "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'" @@ -22271,7 +22387,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 @@ -22408,22 +22524,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) # @@ -22434,19 +22550,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" @@ -23404,7 +23520,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. @@ -23425,7 +23541,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 1 + $ac_cs_success || as_fn_exit $? 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 @@ -23452,6 +23568,7 @@ echo " Maximum log level....: ${with_max_log_level}" echo " Report string usage..: ${have_stringshare_usage}" echo " Valgrind support.....: ${have_valgrind}" echo " Default mempool......: ${have_default_mempool}" +echo " Log support..........: ${enable_log}" echo " Thread Support.......: ${have_threads}" if test "${have_threads}" = "POSIX" ; then echo " spinlock...........: ${have_posix_threads_spinlock}" @@ -23460,7 +23577,7 @@ echo " on/off support.....: ${have_on_off_threads}" fi echo " Amalgamation.........: ${do_amalgamation}" echo " Iconv support........: ${have_iconv}" -echo " File dirfd...........: ${ac_cv_func_dirfd}" +echo " File dirfd...........: ${have_dirfd}" echo " File xattr...........: ${have_xattr}" echo echo " Documentation........: ${build_doc}" diff --git a/libraries/eina/configure.ac b/libraries/eina/configure.ac index 5e2fab2..367ffe1 100644 --- a/libraries/eina/configure.ac +++ b/libraries/eina/configure.ac @@ -2,11 +2,11 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [1]) -m4_define([v_mic], [0]) -m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) +m4_define([v_mic], [99]) +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'])) 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 -m4_undefine([v_rev]) +dnl 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]) @@ -352,41 +352,6 @@ PKG_CHECK_MODULES([ECORE_EVAS], AM_CONDITIONAL([BUILD_TILER_EXAMPLE], [test "x${build_tiler_example}" = "xyes"]) - -### Checks for header files -AC_HEADER_ASSERT -AC_HEADER_DIRENT -AC_HEADER_TIME -EFL_CHECK_PATH_MAX -AC_CHECK_HEADERS([unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h]) - -if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then - EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H" - AC_DEFINE([HAVE_INTTYPES_H], [1], [Define to 1 if you have the header file.]) -fi -AC_SUBST([EINA_CONFIGURE_HAVE_INTTYPES_H]) - -if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then - EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H" - AC_DEFINE([HAVE_STDINT_H], [1], [Define to 1 if you have the header file.]) -fi -AC_SUBST([EINA_CONFIGURE_HAVE_STDINT_H]) - -### Checks for types - -AC_CHECK_SIZEOF([wchar_t]) -EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t -AC_SUBST([EINA_SIZEOF_WCHAR_T]) -AC_CHECK_TYPES([siginfo_t], [], [], - [[#include - #if HAVE_SIGINFO_H - # include - #endif - ]]) - -### Checks for structures - - ### Checks for compiler characteristics AC_C_CONST AC_C_BIGENDIAN @@ -422,6 +387,15 @@ m4_ifdef([v_mic], EFL_COMPILER_FLAG([-Wshadow]) +case "$host_vendor" in + ps3*) + PKG_CHECK_MODULES([ESCAPE], [escape]) + AC_DEFINE(HAVE_ESCAPE, 1, [Set to 1 if evil package is installed]) + requirement_eina="escape" + EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}" + ;; +esac + AC_SUBST([EINA_CPPFLAGS]) AC_SUBST([EINA_CFLAGS]) @@ -450,26 +424,112 @@ case "${host_os}" in EINA_LIBS="-ldl -lrt -lm" ;; esac -AC_SUBST([EINA_LIBS]) -AC_SUBST([lt_enable_auto_import]) - case "$host_vendor" in ps3*) - PKG_CHECK_MODULES([ESCAPE], [escape]) - AC_DEFINE(HAVE_ESCAPE, 1, [Set to 1 if evil package is installed]) - requirement_eina="escape" + # Escape had already been checked to exist EINA_LIBS="${ESCAPE_LIBS}" - EINA_CFLAGS="${ESCAPE_CFLAGS} ${EINA_CFLAGS}" ;; esac +AC_SUBST([EINA_LIBS]) +AC_SUBST([lt_enable_auto_import]) EFL_LINKER_FLAG([-fno-strict-aliasing]) +CFLAGS="${CFLAGS} ${EINA_CFLAGS}" +LDFLAGS="${LDFLAGS} ${EINA_LDFLAGS}" +LIBS="${LIBS} ${EINA_LIBS}" + +### Checks for header files +AC_HEADER_ASSERT +AC_HEADER_TIME +EFL_CHECK_PATH_MAX +AC_CHECK_HEADERS([unistd.h libgen.h inttypes.h stdint.h sys/types.h siginfo.h strings.h sys/mman.h]) + +if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then + EINA_CONFIGURE_HAVE_INTTYPES_H="#define EINA_HAVE_INTTYPES_H" + AC_DEFINE([HAVE_INTTYPES_H], [1], [Define to 1 if you have the header file.]) +fi +AC_SUBST([EINA_CONFIGURE_HAVE_INTTYPES_H]) + +if test "x${ac_cv_header_inttypes_h}" = "xyes" ; then + EINA_CONFIGURE_HAVE_STDINT_H="#define EINA_HAVE_STDINT_H" + AC_DEFINE([HAVE_STDINT_H], [1], [Define to 1 if you have the header file.]) +fi +AC_SUBST([EINA_CONFIGURE_HAVE_STDINT_H]) + +### Checks for types + +AC_CHECK_SIZEOF([wchar_t]) +EINA_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t +AC_SUBST([EINA_SIZEOF_WCHAR_T]) +AC_CHECK_TYPES([siginfo_t], [], [], + [[#include + #if HAVE_SIGINFO_H + # include + #endif + ]]) + +### Check if dirent.h is usable + +AC_CHECK_TYPES([struct dirent], [have_dirent="yes"], [have_dirent="no"], + [[#include + ]]) + +if test "x${have_dirent}" = "xyes" ; then + EINA_CONFIGURE_HAVE_DIRENT_H="#define EINA_HAVE_DIRENT_H" + AC_DEFINE([HAVE_DIRENT_H], [1], [Define to 1 if you have a valid header file.]) +fi +AC_SUBST([EINA_CONFIGURE_HAVE_DIRENT_H]) ### Checks for library functions AC_ISC_POSIX AC_FUNC_ALLOCA -AC_CHECK_FUNCS([strlcpy dirfd openat fstatat fpathconf execvp]) +AC_CHECK_FUNCS([strlcpy openat fstatat fpathconf execvp]) + +AC_MSG_CHECKING([for dirfd]) +AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM( + [[ +#include + ]], + [[ +int main(void) +{ + DIR *dirp; + return dirfd(dirp); +} + ]]) + ], + [have_dirfd="yes"], + [have_dirfd="no"]) + +AC_MSG_RESULT([${have_dirfd}]) + +if test "x${have_dirfd}" = "xyes" ; then + AC_DEFINE([HAVE_DIRFD], [1], [ Define to 1 if you have the `dirfd' function or macro.]) +fi + +# check debug information for malloc +AC_CHECK_FUNCS([malloc_usable_size], [malloc_true_size="yes"], [malloc_true_size="no"]) +if test "x${malloc_true_size}" = "xyes" ; then + AC_DEFINE([HAVE_MALLOC_USABLE_SIZE], [1], [We will be able to know the exact amount of wasted memory]) +fi + +want_debug_malloc="no" +AC_ARG_ENABLE([debug-malloc], + [AC_HELP_STRING([--enable-debug-malloc], [enable debugging of malloc usage overhead in our allocator @<:@default=enabled@:>@])], + [ + if test "x${enableval}" = "xyes" ; then + want_debug_malloc="yes" + else + want_debug_malloc="no" + fi + ], [want_debug_malloc="no"]) + +if test "x${malloc_true_size}" = "xyes" -a "x${want_debug_malloc}" = "xyes"; then + AC_DEFINE([EINA_DEBUG_MALLOC], [1], [Turn on debugging overhead in mempool]) +fi # dlopen and dladdr dlopen_libs="" @@ -496,7 +556,34 @@ case "$host_os" in esac AC_SUBST([dlopen_libs]) -EFL_CHECK_FNMATCH([], [AC_MSG_ERROR([Cannot find fnmatch()])]) +have_log="yes" +EFL_CHECK_FNMATCH([have_log="yes"], [have_log="no"]) + +want_log="yes" +AC_ARG_ENABLE([log], + [AC_HELP_STRING([--disable-log], [disable Eina_Log infrastructure completly @<:@default=enabled@:>@])], + [ + if test "x${enableval}" = "xyes" ; then + want_log="yes" + else + want_log="no" + fi + ], + [want_log="yes"]) + +enable_log="no" +if test "x${have_log}" = xyes -a "x${want_log}" = xyes; then + enable_log="yes" +fi + +AC_MSG_CHECKING([wether to build Eina_Log infrastructure]) +AC_MSG_RESULT([${enable_log}]) + +if test "x${enable_log}" = "xyes"; then + EINA_CONFIGURE_ENABLE_LOG="#define EINA_ENABLE_LOG" + AC_DEFINE([HAVE_LOG], [1], [Define to 1 if we log support is on]) +fi +AC_SUBST([EINA_CONFIGURE_ENABLE_LOG]) AC_CHECK_HEADERS([mcheck.h], [AC_DEFINE([HAVE_MCHECK], [1], [Have mcheck.h])]) AC_CHECK_FUNCS([mtrace], [AC_DEFINE([HAVE_MTRACE], [1], [Have mtrace])]) @@ -748,6 +835,7 @@ echo " Maximum log level....: ${with_max_log_level}" echo " Report string usage..: ${have_stringshare_usage}" echo " Valgrind support.....: ${have_valgrind}" echo " Default mempool......: ${have_default_mempool}" +echo " Log support..........: ${enable_log}" echo " Thread Support.......: ${have_threads}" if test "${have_threads}" = "POSIX" ; then echo " spinlock...........: ${have_posix_threads_spinlock}" @@ -756,7 +844,7 @@ echo " on/off support.....: ${have_on_off_threads}" fi echo " Amalgamation.........: ${do_amalgamation}" echo " Iconv support........: ${have_iconv}" -echo " File dirfd...........: ${ac_cv_func_dirfd}" +echo " File dirfd...........: ${have_dirfd}" echo " File xattr...........: ${have_xattr}" echo echo " Documentation........: ${build_doc}" diff --git a/libraries/eina/doc/Doxyfile.in b/libraries/eina/doc/Doxyfile.in index 5843161..97b0bf9 100644 --- a/libraries/eina/doc/Doxyfile.in +++ b/libraries/eina/doc/Doxyfile.in @@ -1,224 +1,240 @@ -# Doxyfile 1.5.5 +# Doxyfile 1.7.3 # This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project +# doxygen (www.doxygen.org) for a project. # -# All text after a hash (#) is considered a comment and will be ignored +# All text after a hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") +# Values that contain spaces should be placed between quotes (" "). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = Eina -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = @PACKAGE_VERSION@ -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = . -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, -# and Ukrainian. +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = +STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = YES -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO @@ -228,425 +244,510 @@ BUILTIN_STL_SUPPORT = NO CPP_CLI_SUPPORT = NO -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = NO -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = NO -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = NO -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even if there is only one candidate or it is obvious which candidate to choose by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = NO -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = YES -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = @top_srcdir@/src/include @top_srcdir@/src/lib +INPUT = @top_srcdir@/src/include \ + @top_srcdir@/src/lib -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl -FILE_PATTERNS = *.c *.h *.x +FILE_PATTERNS = *.c \ + *.h \ + *.x -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = @top_srcdir@/src/lib/eina_amalgamation.c +EXCLUDE = @top_builddir@/src/lib/eina_amalgamation.c -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = @top_srcdir@/src/examples -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = *.c,*.h,*.x -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). -IMAGE_PATH = doc/img doc/benchmark +IMAGE_PATH = @top_srcdir@/doc/img \ + @top_srcdir@/doc/benchmark -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be # ignored. -INPUT_FILTER = +INPUT_FILTER = -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. -FILTER_PATTERNS = +FILTER_PATTERNS = -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES @@ -654,20 +755,21 @@ REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentstion. +# link to the source code. +# Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = NO @@ -676,312 +778,513 @@ VERBATIM_HEADERS = NO # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 2 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. -IGNORE_PREFIX = +IGNORE_PREFIX = eina_ \ + _eina_ \ + Eina_ \ + _Eina_ \ + EINA_ \ + _EINA_ #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = @srcdir@/head.html +HTML_HEADER = @srcdir@/head.html -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = @srcdir@/foot.html -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = @srcdir@/e.css -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). -GENERATE_HTMLHELP = NO +HTML_DYNAMIC_SECTIONS = YES -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. -GENERATE_DOCSET = NO +GENERATE_DOCSET = YES -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.enlightenment.Eina -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. -HTML_DYNAMIC_SECTIONS = NO +DOCSET_PUBLISHER_ID = org.enlightenment.Eina -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Enlightenment + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = YES + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.enlightenment.Eina + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.enlightenment.Eina + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. -DISABLE_INDEX = YES +DISABLE_INDEX = YES -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [0,1..20]) # that doxygen will group on one line in the generated HTML documentation. +# Note that a value of 0 will completely suppress the enum values from appearing in the overview section. ENUM_VALUES_PER_LINE = 1 -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = NO -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = NO + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. -USE_PDFLATEX = NO +USE_PDFLATEX = YES -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = YES -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = YES @@ -990,33 +1293,33 @@ MAN_LINKS = YES # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_SCHEMA = +XML_SCHEMA = -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_DTD = +XML_DTD = -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES @@ -1025,10 +1328,10 @@ XML_PROGRAMLISTING = YES # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -1037,320 +1340,356 @@ GENERATE_AUTOGEN_DEF = NO # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = YES -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = NO -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = EINA_MAGIC_DEBUG __UNUSED__= EINA_ARG_NONNULL()= EINA_MALLOC= EINA_WARN_UNUSED_RESULT= EAPI= +PREDEFINED = EINA_MAGIC_DEBUG \ + __UNUSED__= \ + EINA_ARG_NONNULL()= \ + EINA_MALLOC= \ + EINA_WARN_UNUSED_RESULT= \ + EAPI= \ + EINA_PURE= \ + EINA_CONST= -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that overrules the definition found in the source code. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = NO -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. -MSCGEN_PATH = +MSCGEN_PATH = -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will write a font called Helvetica to the output +# directory and reference it in all dot files that doxygen generates. +# When you want a differently looking font you can specify the font name +# using DOT_FONTNAME. You need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = NO -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = NO -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = NO -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = NO -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, svg, gif or svg. # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be +# The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = +DOT_PATH = -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = -# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is enabled by default, which results in a transparent -# background. Warning: Depending on the platform used, enabling this option -# may lead to badly anti-aliased labels on the edges of a graph (i.e. they -# become hard to read). +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). DOT_TRANSPARENT = YES -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/libraries/eina/doc/Makefile.am b/libraries/eina/doc/Makefile.am index 6f31b96..7856c13 100644 --- a/libraries/eina/doc/Makefile.am +++ b/libraries/eina/doc/Makefile.am @@ -20,6 +20,7 @@ doc: all bzip2 -9 $(PACKAGE_DOCNAME).tar rm -rf $(PACKAGE_DOCNAME)/ mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir) + @echo "Documentation Package: $(top_builddir)/$(PACKAGE_DOCNAME).tar.bz2" clean-local: doc-clean diff --git a/libraries/eina/doc/Makefile.in b/libraries/eina/doc/Makefile.in index e8e647a..7331cf1 100644 --- a/libraries/eina/doc/Makefile.in +++ b/libraries/eina/doc/Makefile.in @@ -108,7 +108,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -160,8 +162,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -449,6 +449,7 @@ uninstall-am: @EFL_BUILD_DOC_TRUE@ bzip2 -9 $(PACKAGE_DOCNAME).tar @EFL_BUILD_DOC_TRUE@ rm -rf $(PACKAGE_DOCNAME)/ @EFL_BUILD_DOC_TRUE@ mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir) +@EFL_BUILD_DOC_TRUE@ @echo "Documentation Package: $(top_builddir)/$(PACKAGE_DOCNAME).tar.bz2" @EFL_BUILD_DOC_TRUE@clean-local: doc-clean diff --git a/libraries/eina/eina.pc b/libraries/eina/eina.pc index 067d7c5..0ca596f 100644 --- a/libraries/eina/eina.pc +++ b/libraries/eina/eina.pc @@ -1,4 +1,4 @@ -prefix=/usr/local +prefix=/opt/e17 exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include @@ -6,7 +6,7 @@ includedir=${prefix}/include Name: Eina Description: A Library that implements fast data types and miscellaneous tools Requires.private: valgrind -Version: 1.1.0 +Version: 1.1.99.67344 Libs: -L${libdir} -leina -pthread Libs.private: -pthread -lrt -ldl -lrt -lm Cflags: -I${includedir}/eina-1 -I${includedir}/eina-1/eina diff --git a/libraries/eina/eina.spec b/libraries/eina/eina.spec index c325f06..0ad6732 100644 --- a/libraries/eina/eina.spec +++ b/libraries/eina/eina.spec @@ -3,7 +3,7 @@ Summary: Data Type Library Name: eina -Version: 1.1.0 +Version: 1.1.99.67344 Release: %{_rel} License: LGPLv2.1 Group: System Environment/Libraries diff --git a/libraries/eina/ltmain.sh b/libraries/eina/ltmain.sh index fa4b1e1..7ed280b 100755 --- a/libraries/eina/ltmain.sh +++ b/libraries/eina/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-2ubuntu3 +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,7 +73,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" +VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" TIMESTAMP="" package_revision=1.3017 diff --git a/libraries/eina/m4/libtool.m4 b/libraries/eina/m4/libtool.m4 index 6e86e5b..a3fee53 100644 --- a/libraries/eina/m4/libtool.m4 +++ b/libraries/eina/m4/libtool.m4 @@ -380,12 +380,12 @@ m4_define([lt_decl_dquote_varnames], # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_quote(m4_if([$2], [], - m4_quote(lt_decl_tag_varnames), - m4_quote(m4_shift($@)))), - m4_split(m4_normalize(m4_quote(_LT_TAGS))))]) -m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)]) +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) @@ -945,10 +945,10 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on + darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? + # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; @@ -990,7 +990,11 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - if test "$GCC" = "yes"; then + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" @@ -1512,7 +1516,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=-1; ;; - cygwin* | mingw*) + cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, @@ -1680,10 +1684,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -1699,7 +1699,7 @@ int main () else puts (dlerror ()); - exit (status); + return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then @@ -1738,7 +1738,7 @@ else lt_cv_dlopen_self=yes ;; - mingw* | pw32*) + mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; @@ -2035,6 +2035,7 @@ m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], @@ -2199,14 +2200,14 @@ bsdi[[45]]*) # libtool to hard-code these into programs ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -2229,7 +2230,7 @@ cygwin* | mingw* | pw32*) soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; - mingw*) + mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` @@ -2444,7 +2445,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -2667,7 +2668,7 @@ tpf*) version_type=linux need_lib_prefix=no need_version=no - library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -2691,7 +2692,7 @@ variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi - + if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi @@ -2968,6 +2969,7 @@ _LT_DECL([], [reload_cmds], [2])dnl # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -3018,6 +3020,12 @@ mingw* | pw32*) fi ;; +cegcc) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; @@ -3076,7 +3084,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3329,7 +3337,7 @@ case $host_os in aix*) symcode='[[BCDT]]' ;; -cygwin* | mingw* | pw32*) +cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) @@ -3575,7 +3583,7 @@ m4_if([$1], [CXX], [ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | cygwin* | os2* | pw32*) + mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style @@ -3602,10 +3610,11 @@ m4_if([$1], [CXX], [ fi ;; hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. case $host_cpu in - hppa*64*|ia64*) + hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' @@ -3696,19 +3705,26 @@ m4_if([$1], [CXX], [ ;; esac ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; - icpc* | ecpc* ) - # Intel C++ + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -3874,7 +3890,7 @@ m4_if([$1], [CXX], [ # PIC is the default for these OSes. ;; - mingw* | cygwin* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style @@ -3890,10 +3906,11 @@ m4_if([$1], [CXX], [ ;; hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. case $host_cpu in - hppa*64*|ia64*) + hppa*64*) # +Z the default ;; *) @@ -3943,7 +3960,7 @@ m4_if([$1], [CXX], [ fi ;; - mingw* | cygwin* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], @@ -3972,13 +3989,27 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in - icc* | ecc* | ifort*) + # old Intel for x86_64 which still supported -KPIC. + ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -4160,7 +4191,7 @@ m4_if([$1], [CXX], [ pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; - cygwin* | mingw*) + cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) @@ -4215,7 +4246,7 @@ dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. @@ -4230,6 +4261,9 @@ dnl Note also adjust exclude_expsyms for C++ above. openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -4251,6 +4285,7 @@ dnl Note also adjust exclude_expsyms for C++ above. fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -4302,7 +4337,7 @@ _LT_EOF fi ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' @@ -4342,7 +4377,7 @@ _LT_EOF _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -4368,6 +4403,9 @@ _LT_EOF tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; @@ -4600,6 +4638,7 @@ _LT_EOF fi fi + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes @@ -4654,7 +4693,7 @@ _LT_EOF _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is @@ -4758,7 +4797,7 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -5543,6 +5582,7 @@ if test "$_lt_caught_CXX_error" != yes; then fi fi + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. @@ -5601,7 +5641,7 @@ if test "$_lt_caught_CXX_error" != yes; then esac ;; - cygwin* | mingw* | pw32*) + cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' @@ -5821,7 +5861,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -6986,6 +7026,18 @@ AC_SUBST([GREP]) ]) +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates diff --git a/libraries/eina/m4/ltoptions.m4 b/libraries/eina/m4/ltoptions.m4 index e970119..34151a3 100644 --- a/libraries/eina/m4/ltoptions.m4 +++ b/libraries/eina/m4/ltoptions.m4 @@ -125,7 +125,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) diff --git a/libraries/eina/sha1-for-source.txt b/libraries/eina/sha1-for-source.txt deleted file mode 100644 index 0f5bce1..0000000 --- a/libraries/eina/sha1-for-source.txt +++ /dev/null @@ -1 +0,0 @@ -cbaf0e4752d2758ae79c353cb342eb8451a52be7 diff --git a/libraries/eina/src/Makefile.in b/libraries/eina/src/Makefile.in index c954fc5..eb3a2c0 100644 --- a/libraries/eina/src/Makefile.in +++ b/libraries/eina/src/Makefile.in @@ -147,7 +147,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -199,8 +201,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/eina/src/examples/Makefile.am b/libraries/eina/src/examples/Makefile.am index ea5ca6a..45b72f0 100644 --- a/libraries/eina/src/examples/Makefile.am +++ b/libraries/eina/src/examples/Makefile.am @@ -1,6 +1,6 @@ MAINTAINERCLEANFILES = Makefile.in -pkglibdir = $(datadir)/$(PACKAGE)/examples +examplesdir = $(datadir)/$(PACKAGE)/examples AM_CPPFLAGS = \ -I. \ @@ -39,7 +39,7 @@ SRCS = \ eina_strbuf_01.c \ eina_tiler_01.c -pkglib_PROGRAMS = +examples_PROGRAMS = if EFL_INSTALL_EXAMPLES filesdir = $(datadir)/$(PACKAGE)/examples @@ -47,9 +47,9 @@ files_DATA = $(SRCS) endif if EFL_BUILD_EXAMPLES -pkglib_PROGRAMS += \ +examples_PROGRAMS += \ eina_accessor_01 \ - eina_array_01 \ + eina_array_01 \ eina_array_02 \ eina_error_01 \ eina_file_01 \ @@ -77,7 +77,7 @@ pkglib_PROGRAMS += \ if BUILD_TILER_EXAMPLE AM_CPPFLAGS += @ECORE_EVAS_CFLAGS@ -pkglib_PROGRAMS += eina_tiler_01 +examples_PROGRAMS += eina_tiler_01 eina_tiler_01_LDADD = $(top_builddir)/src/lib/libeina.la @ECORE_EVAS_LIBS@ endif diff --git a/libraries/eina/src/examples/Makefile.in b/libraries/eina/src/examples/Makefile.in index 3379e55..6e432bb 100644 --- a/libraries/eina/src/examples/Makefile.in +++ b/libraries/eina/src/examples/Makefile.in @@ -19,6 +19,7 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 @@ -34,10 +35,10 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -pkglib_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) +examples_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) @EFL_BUILD_EXAMPLES_TRUE@am__append_1 = \ @EFL_BUILD_EXAMPLES_TRUE@ eina_accessor_01 \ -@EFL_BUILD_EXAMPLES_TRUE@ eina_array_01 \ +@EFL_BUILD_EXAMPLES_TRUE@ eina_array_01 \ @EFL_BUILD_EXAMPLES_TRUE@ eina_array_02 \ @EFL_BUILD_EXAMPLES_TRUE@ eina_error_01 \ @EFL_BUILD_EXAMPLES_TRUE@ eina_file_01 \ @@ -115,8 +116,8 @@ CONFIG_CLEAN_VPATH_FILES = @EFL_BUILD_EXAMPLES_TRUE@ eina_str_01$(EXEEXT) \ @EFL_BUILD_EXAMPLES_TRUE@ eina_strbuf_01$(EXEEXT) @BUILD_TILER_EXAMPLE_TRUE@@EFL_BUILD_EXAMPLES_TRUE@am__EXEEXT_2 = eina_tiler_01$(EXEEXT) -am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)" -PROGRAMS = $(pkglib_PROGRAMS) +am__installdirs = "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)" +PROGRAMS = $(examples_PROGRAMS) eina_accessor_01_SOURCES = eina_accessor_01.c eina_accessor_01_OBJECTS = eina_accessor_01.$(OBJEXT) eina_accessor_01_LDADD = $(LDADD) @@ -294,7 +295,6 @@ DATA = $(files_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -pkglibdir = $(datadir)/$(PACKAGE)/examples ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ @@ -337,7 +337,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -389,8 +391,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -465,6 +465,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in +examplesdir = $(datadir)/$(PACKAGE)/examples AM_CPPFLAGS = -I. -I$(top_srcdir)/src/include \ -I$(top_builddir)/src/include $(am__append_2) LDADD = \ @@ -536,10 +537,10 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-pkglibPROGRAMS: $(pkglib_PROGRAMS) +install-examplesPROGRAMS: $(examples_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" - @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" + @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -556,23 +557,23 @@ install-pkglibPROGRAMS: $(pkglib_PROGRAMS) while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(examplesdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(examplesdir)$$dir" || exit $$?; \ } \ ; done -uninstall-pkglibPROGRAMS: +uninstall-examplesPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files + echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(examplesdir)" && rm -f $$files -clean-pkglibPROGRAMS: - @list='$(pkglib_PROGRAMS)'; test -n "$$list" || exit 0; \ +clean-examplesPROGRAMS: + @list='$(examples_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ @@ -831,7 +832,7 @@ check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)"; do \ + for dir in "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -862,7 +863,7 @@ maintainer-clean-generic: -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am -clean-am: clean-generic clean-libtool clean-pkglibPROGRAMS \ +clean-am: clean-examplesPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am @@ -883,13 +884,13 @@ info: info-am info-am: -install-data-am: install-filesDATA +install-data-am: install-examplesPROGRAMS install-filesDATA install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-pkglibPROGRAMS +install-exec-am: install-html: install-html-am @@ -929,24 +930,25 @@ ps: ps-am ps-am: -uninstall-am: uninstall-filesDATA uninstall-pkglibPROGRAMS +uninstall-am: uninstall-examplesPROGRAMS uninstall-filesDATA .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkglibPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-filesDATA \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-pkglibPROGRAMS \ +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-examplesPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am \ + install-examplesPROGRAMS install-exec install-exec-am \ + install-filesDATA install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-filesDATA \ - uninstall-pkglibPROGRAMS + tags uninstall uninstall-am uninstall-examplesPROGRAMS \ + uninstall-filesDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/libraries/eina/src/examples/eina_array_01.c b/libraries/eina/src/examples/eina_array_01.c index 25e0944..d93eb35 100644 --- a/libraries/eina/src/examples/eina_array_01.c +++ b/libraries/eina/src/examples/eina_array_01.c @@ -35,12 +35,12 @@ main(int argc, char **argv) for (i = 0; i < 20; i++) eina_array_push(array, strdup(strings[i])); - printf("array count: %d\n", eina_array_count_get(array)); + printf("array count: %d\n", eina_array_count(array)); eina_array_foreach(array, _print, NULL); printf("Top gun: %s\n", (char*)eina_array_data_get(array, 2)); - while (eina_array_count_get(array)) + while (eina_array_count(array)) free(eina_array_pop(array)); eina_array_free(array); diff --git a/libraries/eina/src/include/Eina.h b/libraries/eina/src/include/Eina.h index 68c41f5..721a991 100644 --- a/libraries/eina/src/include/Eina.h +++ b/libraries/eina/src/include/Eina.h @@ -47,7 +47,7 @@ * * @version 1.1 * @date 2008-2011 - * + * * @section eina_intro_sec Introduction * * The Eina library is a library that implements an API for data types @@ -59,10 +59,11 @@ * Linux, BSD, Opensolaris and Windows (XP and CE). * * The data types that are available are (see @ref Eina_Data_Types_Group): + * @li @ref Eina_Inline_Array_Group standard array of inlined members. * @li @ref Eina_Array_Group standard array of @c void* data. * @li @ref Eina_Hash_Group standard hash of @c void* data. * @li @ref Eina_Inline_List_Group list with nodes inlined into user type. - * @li @ref Eina_CList_Group compact inlined list. + * @li @ref Eina_CList_Group Compact List. * @li @ref Eina_List_Group standard list of @c void* data. * @li @ref Eina_Iterator_Group Iterator functions. * @li @ref Eina_Matrixsparse_Group sparse matrix of @c void* data. @@ -89,7 +90,7 @@ * * Please see the @ref authors page for contact details. * - * @defgroup Eina_Data_Types_Group Data types + * @defgroup Eina_Data_Types_Group Data Types * * Eina provide easy to use and optimized data types and structures. * @@ -158,6 +159,7 @@ extern "C" { #include "eina_mempool.h" #include "eina_error.h" #include "eina_log.h" +#include "eina_inarray.h" #include "eina_array.h" #include "eina_binshare.h" #include "eina_stringshare.h" @@ -186,6 +188,7 @@ extern "C" { #include "eina_refcount.h" #include "eina_mmap.h" #include "eina_xattr.h" +#include "eina_value.h" #ifdef __cplusplus } diff --git a/libraries/eina/src/include/Makefile.am b/libraries/eina/src/include/Makefile.am index 41a37cb..a818d5f 100644 --- a/libraries/eina/src/include/Makefile.am +++ b/libraries/eina/src/include/Makefile.am @@ -14,6 +14,8 @@ eina_hash.h \ eina_inline_hash.x \ eina_lalloc.h \ eina_clist.h \ +eina_inline_clist.x \ +eina_inarray.h \ eina_inlist.h \ eina_list.h \ eina_file.h \ @@ -60,7 +62,9 @@ eina_lock.h \ eina_prefix.h \ eina_refcount.h \ eina_mmap.h \ -eina_xattr.h +eina_xattr.h \ +eina_value.h \ +eina_inline_value.x # Will be back for developper after 1.1. # eina_object.h diff --git a/libraries/eina/src/include/Makefile.in b/libraries/eina/src/include/Makefile.in index f6e0074..ea922e5 100644 --- a/libraries/eina/src/include/Makefile.in +++ b/libraries/eina/src/include/Makefile.in @@ -78,23 +78,24 @@ am__dist_installed_headers_DATA_DIST = eina_safety_checks.h \ eina_error.h eina_log.h eina_inline_log.x eina_fp.h \ eina_inline_f32p32.x eina_inline_f16p16.x eina_inline_f8p24.x \ eina_inline_fp.x eina_hash.h eina_inline_hash.x eina_lalloc.h \ - eina_clist.h eina_inlist.h eina_list.h eina_file.h \ - eina_mempool.h eina_module.h eina_rectangle.h eina_types.h \ - eina_array.h eina_counter.h eina_inline_array.x eina_magic.h \ - eina_stringshare.h eina_binshare.h eina_binbuf.h \ - eina_ustringshare.h eina_inline_stringshare.x \ - eina_inline_ustringshare.x eina_inline_list.x eina_accessor.h \ - eina_convert.h eina_rbtree.h eina_benchmark.h \ - eina_inline_rbtree.x eina_inline_mempool.x \ - eina_inline_rectangle.x eina_inline_trash.x eina_trash.h \ - eina_iterator.h eina_main.h eina_cpu.h eina_sched.h \ - eina_tiler.h eina_hamster.h eina_matrixsparse.h \ - eina_inline_tiler.x eina_str.h eina_inline_str.x eina_strbuf.h \ - eina_ustrbuf.h eina_unicode.h eina_quadtree.h \ - eina_simple_xml_parser.h eina_lock.h eina_prefix.h \ - eina_refcount.h eina_mmap.h eina_xattr.h \ - eina_inline_lock_wince.x eina_inline_lock_win32.x \ - eina_inline_lock_posix.x eina_inline_lock_void.x + eina_clist.h eina_inline_clist.x eina_inarray.h eina_inlist.h \ + eina_list.h eina_file.h eina_mempool.h eina_module.h \ + eina_rectangle.h eina_types.h eina_array.h eina_counter.h \ + eina_inline_array.x eina_magic.h eina_stringshare.h \ + eina_binshare.h eina_binbuf.h eina_ustringshare.h \ + eina_inline_stringshare.x eina_inline_ustringshare.x \ + eina_inline_list.x eina_accessor.h eina_convert.h \ + eina_rbtree.h eina_benchmark.h eina_inline_rbtree.x \ + eina_inline_mempool.x eina_inline_rectangle.x \ + eina_inline_trash.x eina_trash.h eina_iterator.h eina_main.h \ + eina_cpu.h eina_sched.h eina_tiler.h eina_hamster.h \ + eina_matrixsparse.h eina_inline_tiler.x eina_str.h \ + eina_inline_str.x eina_strbuf.h eina_ustrbuf.h eina_unicode.h \ + eina_quadtree.h eina_simple_xml_parser.h eina_lock.h \ + eina_prefix.h eina_refcount.h eina_mmap.h eina_xattr.h \ + eina_value.h eina_inline_value.x eina_inline_lock_wince.x \ + eina_inline_lock_win32.x eina_inline_lock_posix.x \ + eina_inline_lock_void.x am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -163,7 +164,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -215,8 +218,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -295,10 +296,10 @@ EINAHEADERS = eina_safety_checks.h eina_error.h eina_log.h \ eina_inline_log.x eina_fp.h eina_inline_f32p32.x \ eina_inline_f16p16.x eina_inline_f8p24.x eina_inline_fp.x \ eina_hash.h eina_inline_hash.x eina_lalloc.h eina_clist.h \ - eina_inlist.h eina_list.h eina_file.h eina_mempool.h \ - eina_module.h eina_rectangle.h eina_types.h eina_array.h \ - eina_counter.h eina_inline_array.x eina_magic.h \ - eina_stringshare.h eina_binshare.h eina_binbuf.h \ + eina_inline_clist.x eina_inarray.h eina_inlist.h eina_list.h \ + eina_file.h eina_mempool.h eina_module.h eina_rectangle.h \ + eina_types.h eina_array.h eina_counter.h eina_inline_array.x \ + eina_magic.h eina_stringshare.h eina_binshare.h eina_binbuf.h \ eina_ustringshare.h eina_inline_stringshare.x \ eina_inline_ustringshare.x eina_inline_list.x eina_accessor.h \ eina_convert.h eina_rbtree.h eina_benchmark.h \ @@ -309,8 +310,9 @@ EINAHEADERS = eina_safety_checks.h eina_error.h eina_log.h \ eina_inline_tiler.x eina_str.h eina_inline_str.x eina_strbuf.h \ eina_ustrbuf.h eina_unicode.h eina_quadtree.h \ eina_simple_xml_parser.h eina_lock.h eina_prefix.h \ - eina_refcount.h eina_mmap.h eina_xattr.h $(am__append_1) \ - $(am__append_2) $(am__append_3) $(am__append_4) + eina_refcount.h eina_mmap.h eina_xattr.h eina_value.h \ + eina_inline_value.x $(am__append_1) $(am__append_2) \ + $(am__append_3) $(am__append_4) installed_mainheaderdir = $(includedir)/eina-@VMAJ@ dist_installed_mainheader_DATA = Eina.h eina_config.h installed_headersdir = $(includedir)/eina-@VMAJ@/eina diff --git a/libraries/eina/src/include/eina_array.h b/libraries/eina/src/include/eina_array.h index d33f5e9..53183b4 100644 --- a/libraries/eina/src/include/eina_array.h +++ b/libraries/eina/src/include/eina_array.h @@ -31,7 +31,7 @@ /** - * @page array_01_example_page Basic array usage + * @page eina_array_01_example_page Basic array usage * @dontinclude eina_array_01.c * * For this example we add stdlib.h, stdio.h and string.h for some @@ -94,7 +94,7 @@ */ /** - * @page array_02_example_page Removing array elements + * @page eina_array_02_example_page Removing array elements * @dontinclude eina_array_02.c * * Just the usual includes: @@ -169,7 +169,7 @@ * element, use eina_array_push() and to remove the last element, use * eina_array_pop(). To retrieve the element at a given position, use * eina_array_data_get(). The number of elements can be retrieved with - * eina_array_count_get(). + * eina_array_count(). * * Eina_Array is different from a conventional C array in a number of ways, most * importantly they grow and shrink dynamically, this means that if you add an @@ -191,8 +191,8 @@ * of void pointers. * * See here some examples: - * @li @ref array_01_example_page - * @li @ref array_02_example_page + * @li @ref eina_array_01_example_page + * @li @ref eina_array_02_example_page */ /** @@ -351,7 +351,8 @@ static inline void *eina_array_data_get(const Eina_Array *array, static inline void eina_array_data_set(const Eina_Array *array, unsigned int idx, const void *data) EINA_ARG_NONNULL(1); -static inline unsigned int eina_array_count_get(const Eina_Array *array) EINA_ARG_NONNULL(1); +static inline unsigned int eina_array_count_get(const Eina_Array *array) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT EINA_DEPRECATED; +static inline unsigned int eina_array_count(const Eina_Array *array) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; /** * @brief Returned a new iterator associated to an array. @@ -394,7 +395,7 @@ EAPI Eina_Accessor *eina_array_accessor_new(const Eina_Array *array) EINA */ static inline Eina_Bool eina_array_foreach(Eina_Array *array, Eina_Each_Cb cb, - void *data); + void *fdata); /** * @def EINA_ARRAY_ITER_NEXT * @brief Macro to iterate over an array easily. @@ -429,7 +430,7 @@ static inline Eina_Bool eina_array_foreach(Eina_Array *array, */ #define EINA_ARRAY_ITER_NEXT(array, index, item, iterator) \ for (index = 0, iterator = (array)->data; \ - (index < eina_array_count_get(array)) && ((item = *((iterator)++))); \ + (index < eina_array_count(array)) && ((item = *((iterator)++))); \ ++(index)) #include "eina_inline_array.x" diff --git a/libraries/eina/src/include/eina_benchmark.h b/libraries/eina/src/include/eina_benchmark.h index 721e1c0..9e96d64 100644 --- a/libraries/eina/src/include/eina_benchmark.h +++ b/libraries/eina/src/include/eina_benchmark.h @@ -398,9 +398,9 @@ EAPI void eina_benchmark_free(Eina_Benchmark *bench); * * This function adds the test named @p name to @p benchmark. @p * bench_cb is the function called when the test is executed. That - * test can be executed a certain amount of time. @p start, @p end and - * @p step define a loop with a step increment. The integer that is - * increasing by @p step from @p start to @p end is passed to @p + * test can be executed a certain amount of time. @p count_start, @p count_end and + * @p count_step define a loop with a step increment. The integer that is + * increasing by @p count_step from @p count_start to @p count_end is passed to @p * bench_cb when eina_benchmark_run() is called. * * If @p bench is @c NULL, this function returns imediatly. If the @@ -413,7 +413,7 @@ EAPI Eina_Bool eina_benchmark_register(Eina_Benchmark *bench, Eina_Benchmark_Specimens bench_cb, int count_start, int count_end, - int count_set); + int count_step); /** * @brief Run the benchmark tests that have been registered. diff --git a/libraries/eina/src/include/eina_binbuf.h b/libraries/eina/src/include/eina_binbuf.h index 92f788e..7c3524b 100644 --- a/libraries/eina/src/include/eina_binbuf.h +++ b/libraries/eina/src/include/eina_binbuf.h @@ -49,6 +49,24 @@ typedef struct _Eina_Strbuf Eina_Binbuf; EAPI Eina_Binbuf *eina_binbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; /** + * @brief Create a new string buffer using the passed string. The passed + * string is used directly as the buffer, it's somehow the opposite function of + * @ref eina_binbuf_string_steal . The passed string must be malloced. + * + * @param str the string to manage + * @param length the length of the string. + * @return Newly allocated string buffer instance. + * + * This function creates a new string buffer. On error, @c NULL is + * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To + * free the resources, use eina_binbuf_free(). + * + * @see eina_binbuf_manage_new() + * @since 1.2.0 + */ +EAPI Eina_Binbuf *eina_binbuf_manage_new_length(unsigned char *str, size_t length) EINA_MALLOC EINA_WARN_UNUSED_RESULT; + +/** * @brief Free a string buffer. * * @param buf The string buffer to free. diff --git a/libraries/eina/src/include/eina_clist.h b/libraries/eina/src/include/eina_clist.h index 68f15df..096a4b7 100644 --- a/libraries/eina/src/include/eina_clist.h +++ b/libraries/eina/src/include/eina_clist.h @@ -23,7 +23,22 @@ #define __EINA_CLIST_H__ /** - * @addtogroup Eina_CList_Group Compact inline list + * @addtogroup Eina_Data_Types_Group Data Types + * + * @{ + */ + +/** + * @addtogroup Eina_Containers_Group Containers + * + * @{ + */ + +/** + * @defgroup Eina_CList_Group Compact List + * + * @{ + * * @brief Eina_Clist is a compact (inline) list implementation * * Elements of this list are members of the structs stored in the list @@ -42,9 +57,8 @@ * @note There's no NULL at the end of the list, the last item points to the head. * * @note List heads must be initialized with EINA_CLIST_INIT or by calling eina_clist_element_init - */ - -/* Define a list like so: + * + * Define a list like so: * * @code * struct gadget @@ -88,24 +102,6 @@ */ /** - * @addtogroup Eina_Data_Types_Group Data Types - * - * @{ - */ - -/** - * @addtogroup Eina_Containers_Group Containers - * - * @{ - */ - -/** - * @defgroup Eina_CList_Group Compact list - * - * @{ - */ - -/** * @typedef Eina_Clist * This is the list head and the list entry. * @since 1.1.0 @@ -135,13 +131,7 @@ struct _Eina_Clist * @note There's no need to initialize an element before adding it to the list. * @since 1.1.0 */ -static inline void eina_clist_add_after(Eina_Clist *elem, Eina_Clist *to_add) -{ - to_add->next = elem->next; - to_add->prev = elem; - elem->next->prev = to_add; - elem->next = to_add; -} +static inline void eina_clist_add_after(Eina_Clist *elem, Eina_Clist *to_add); /** * Add an element before the specified one. @@ -154,13 +144,7 @@ static inline void eina_clist_add_after(Eina_Clist *elem, Eina_Clist *to_add) * @note There's no need to initialize an element before adding it to the list. * @since 1.1.0 */ -static inline void eina_clist_add_before(Eina_Clist *elem, Eina_Clist *to_add) -{ - to_add->next = elem; - to_add->prev = elem->prev; - elem->prev->next = to_add; - elem->prev = to_add; -} +static inline void eina_clist_add_before(Eina_Clist *elem, Eina_Clist *to_add); /** * Add element at the head of the list. @@ -173,10 +157,7 @@ static inline void eina_clist_add_before(Eina_Clist *elem, Eina_Clist *to_add) * @note There's no need to initialize an element before adding it to the list. * @since 1.1.0 */ -static inline void eina_clist_add_head(Eina_Clist *list, Eina_Clist *elem) -{ - eina_clist_add_after(list, elem); -} +static inline void eina_clist_add_head(Eina_Clist *list, Eina_Clist *elem); /** * Add element at the tail of the list. @@ -189,10 +170,7 @@ static inline void eina_clist_add_head(Eina_Clist *list, Eina_Clist *elem) * @note There's no need to initialize an element before adding it to the list. * @since 1.1.0 */ -static inline void eina_clist_add_tail(Eina_Clist *list, Eina_Clist *elem) -{ - eina_clist_add_before(list, elem); -} +static inline void eina_clist_add_tail(Eina_Clist *list, Eina_Clist *elem); /** * Init an (unlinked) element. @@ -207,11 +185,7 @@ static inline void eina_clist_add_tail(Eina_Clist *list, Eina_Clist *elem) * @note It is not necessary to call this before adding an element to this list. * @since 1.1.0 */ -static inline void eina_clist_element_init(Eina_Clist *elem) -{ - elem->next = NULL; - elem->prev = NULL; -} +static inline void eina_clist_element_init(Eina_Clist *elem); /** * Check if an element is in a list or not. @@ -222,10 +196,7 @@ static inline void eina_clist_element_init(Eina_Clist *elem) * it has been added to a list or remove from a list. * @since 1.1.0 */ -static inline int eina_clist_element_is_linked(Eina_Clist *elem) -{ - return (elem->next != NULL && elem->prev != NULL); -} +static inline int eina_clist_element_is_linked(Eina_Clist *elem); /** * Remove an element from its list. @@ -235,12 +206,7 @@ static inline int eina_clist_element_is_linked(Eina_Clist *elem) * @post The element is marked as not being in any list * @since 1.1.0 */ -static inline void eina_clist_remove(Eina_Clist *elem) -{ - elem->next->prev = elem->prev; - elem->prev->next = elem->next; - eina_clist_element_init(elem); -} +static inline void eina_clist_remove(Eina_Clist *elem); /** * Get the next element. @@ -248,15 +214,10 @@ static inline void eina_clist_remove(Eina_Clist *elem) * @param list The list * @param elem An element * @pre @a elem is in @a list - * @return The element after @elem in @list or NULL if @a elem is last in @a list + * @return The element after @a elem in @a list or @c NULL if @a elem is last in @a list * @since 1.1.0 */ -static inline Eina_Clist *eina_clist_next(const Eina_Clist *list, const Eina_Clist *elem) -{ - Eina_Clist *ret = elem->next; - if (elem->next == list) ret = NULL; - return ret; -} +static inline Eina_Clist *eina_clist_next(const Eina_Clist *list, const Eina_Clist *elem); /** * Get the previous element. @@ -267,12 +228,7 @@ static inline Eina_Clist *eina_clist_next(const Eina_Clist *list, const Eina_Cli * @return The element before @a elem or NULL if @a elem is the first in the list * @since 1.1.0 */ -static inline Eina_Clist *eina_clist_prev(const Eina_Clist *list, const Eina_Clist *elem) -{ - Eina_Clist *ret = elem->prev; - if (elem->prev == list) ret = NULL; - return ret; -} +static inline Eina_Clist *eina_clist_prev(const Eina_Clist *list, const Eina_Clist *elem); /** * Get the first element. @@ -281,22 +237,16 @@ static inline Eina_Clist *eina_clist_prev(const Eina_Clist *list, const Eina_Cli * @returns The first element in @a list or NULL if @a list is empty * @since 1.1.0 */ -static inline Eina_Clist *eina_clist_head(const Eina_Clist *list) -{ - return eina_clist_next(list, list); -} +static inline Eina_Clist *eina_clist_head(const Eina_Clist *list); /** * Get the last element. * * @param list The list - * @returns The last element in @a list or NULL if @list is empty + * @returns The last element in @a list or NULL if @a list is empty * @since 1.1.0 */ -static inline Eina_Clist *eina_clist_tail(const Eina_Clist *list) -{ - return eina_clist_prev(list, list); -} +static inline Eina_Clist *eina_clist_tail(const Eina_Clist *list); /** * Check if a list is empty. @@ -305,10 +255,7 @@ static inline Eina_Clist *eina_clist_tail(const Eina_Clist *list) * @returns non-zero if @a list is empty, zero if it is not * @since 1.1.0 */ -static inline int eina_clist_empty(const Eina_Clist *list) -{ - return list->next == list; -} +static inline int eina_clist_empty(const Eina_Clist *list); /** * Initialize a list @@ -322,10 +269,7 @@ static inline int eina_clist_empty(const Eina_Clist *list) * initialize the list by zero'ing out the list head. * @since 1.1.0 */ -static inline void eina_clist_init(Eina_Clist *list) -{ - list->next = list->prev = list; -} +static inline void eina_clist_init(Eina_Clist *list); /** * Count the elements of a list @@ -334,13 +278,7 @@ static inline void eina_clist_init(Eina_Clist *list) * @returns The number of items in the list * @since 1.1.0 */ -static inline unsigned int eina_clist_count(const Eina_Clist *list) -{ - unsigned count = 0; - const Eina_Clist *ptr; - for (ptr = list->next; ptr != list; ptr = ptr->next) count++; - return count; -} +static inline unsigned int eina_clist_count(const Eina_Clist *list); /** * Move all elements from src to the tail of dst @@ -351,16 +289,7 @@ static inline unsigned int eina_clist_count(const Eina_Clist *list) * @post @a src is initialized but empty after this operation * @since 1.1.0 */ -static inline void eina_clist_move_tail(Eina_Clist *dst, Eina_Clist *src) -{ - if (eina_clist_empty(src)) return; - - dst->prev->next = src->next; - src->next->prev = dst->prev; - dst->prev = src->prev; - src->prev->next = dst; - eina_clist_init(src); -} +static inline void eina_clist_move_tail(Eina_Clist *dst, Eina_Clist *src); /** * move all elements from src to the head of dst @@ -371,16 +300,7 @@ static inline void eina_clist_move_tail(Eina_Clist *dst, Eina_Clist *src) * @post @a src is initialized but empty after this operation * @since 1.1.0 */ -static inline void eina_clist_move_head(Eina_Clist *dst, Eina_Clist *src) -{ - if (eina_clist_empty(src)) return; - - dst->next->prev = src->prev; - src->prev->next = dst->next; - dst->next = src->next; - src->next->prev = dst; - eina_clist_init(src); -} +static inline void eina_clist_move_head(Eina_Clist *dst, Eina_Clist *src); /** * iterate through the list @@ -441,15 +361,17 @@ static inline void eina_clist_move_head(Eina_Clist *dst, Eina_Clist *src) #define EINA_CLIST_ENTRY(elem, type, field) \ ((type *)((char *)(elem) - (unsigned long)(&((type *)0)->field))) -/* +#include "eina_inline_clist.x" + +/** * @} */ -/* +/** * @} */ -/* +/** * @} */ diff --git a/libraries/eina/src/include/eina_config.h b/libraries/eina/src/include/eina_config.h index 3341731..474edaa 100644 --- a/libraries/eina/src/include/eina_config.h +++ b/libraries/eina/src/include/eina_config.h @@ -64,4 +64,14 @@ #endif +#ifdef EINA_CONFIGURE_HAVE_DIRENT_H +# undef EINA_CONFIGURE_HAVE_DIRENT_H +#endif +#define EINA_HAVE_DIRENT_H + +#ifdef EINA_CONFIGURE_ENABLE_LOG +# undef EINA_CONFIGURE_ENABLE_LOG +#endif +#define EINA_ENABLE_LOG + #endif /* EINA_CONFIG_H_ */ diff --git a/libraries/eina/src/include/eina_config.h.in b/libraries/eina/src/include/eina_config.h.in index be328cd..2459ace 100644 --- a/libraries/eina/src/include/eina_config.h.in +++ b/libraries/eina/src/include/eina_config.h.in @@ -64,4 +64,14 @@ #endif @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ +#ifdef EINA_CONFIGURE_HAVE_DIRENT_H +# undef EINA_CONFIGURE_HAVE_DIRENT_H +#endif +@EINA_CONFIGURE_HAVE_DIRENT_H@ + +#ifdef EINA_CONFIGURE_ENABLE_LOG +# undef EINA_CONFIGURE_ENABLE_LOG +#endif +@EINA_CONFIGURE_ENABLE_LOG@ + #endif /* EINA_CONFIG_H_ */ diff --git a/libraries/eina/src/include/eina_file.h b/libraries/eina/src/include/eina_file.h index 01ef8f5..422fb65 100644 --- a/libraries/eina/src/include/eina_file.h +++ b/libraries/eina/src/include/eina_file.h @@ -94,6 +94,9 @@ typedef struct _Eina_File_Direct_Info Eina_File_Direct_Info; * @typedef Eina_File_Dir_List_Cb * Type for a callback to be called when iterating over the files of a * directory. + * @param The file name EXCLUDING the path + * @param path The path passed to eina_file_dir_list() + * @param data The data passed to eina_file_dir_list() */ typedef void (*Eina_File_Dir_List_Cb)(const char *name, const char *path, void *data); @@ -345,6 +348,33 @@ EAPI time_t eina_file_mtime_get(Eina_File *file); EAPI const char *eina_file_filename_get(Eina_File *file); /** + * @brief Get the eXtended attribute of an open file. + * + * @param file The file handler to request the eXtended attribute from. + * @return an iterator. + * + * The iterator will list all eXtended attribute name without allocating + * them, so you need to copy them yourself if needed. + * + * @since 1.2 + */ +EAPI Eina_Iterator *eina_file_xattr_get(Eina_File *file); + +/** + * @brief Get the eXtended attribute of an open file. + * + * @param file The file handler to request the eXtended attribute from. + * @return an iterator. + * + * The iterator will list all eXtended attribute without allocating + * them, so you need to copy them yourself if needed. It is returning + * Eina_Xattr structure. + * + * @since 1.2 + */ +EAPI Eina_Iterator *eina_file_xattr_value_get(Eina_File *file); + +/** * @brief Map all the file to a buffer. * * @param file The file handler to map in memory @@ -382,6 +412,16 @@ EAPI void *eina_file_map_new(Eina_File *file, Eina_File_Populate rule, EAPI void eina_file_map_free(Eina_File *file, void *map); /** + * @brief Tell if their was an IO error during the life of a mmaped file + * + * @param file The file handler to the mmaped file. + * @param map Memory map to check if an error occured on it. + * + * @since 1.2 + */ +EAPI Eina_Bool eina_file_map_faulted(Eina_File *file, void *map); + +/** * @} */ diff --git a/libraries/eina/src/include/eina_hash.h b/libraries/eina/src/include/eina_hash.h index c8eb048..57316b2 100644 --- a/libraries/eina/src/include/eina_hash.h +++ b/libraries/eina/src/include/eina_hash.h @@ -578,7 +578,7 @@ EAPI Eina_Bool eina_hash_del(Eina_Hash *hash, * otherwise. */ EAPI void *eina_hash_find(const Eina_Hash *hash, - const void *key) EINA_ARG_NONNULL(1, 2); + const void *key) EINA_ARG_NONNULL(2); /** * @brief Modify the entry pointer at the specified key and return the old @@ -1005,7 +1005,7 @@ EAPI Eina_Iterator *eina_hash_iterator_tuple_new(const Eina_Hash *hash) EINA_MAL * @endcode */ EAPI void eina_hash_foreach(const Eina_Hash *hash, - Eina_Hash_Foreach cb, + Eina_Hash_Foreach func, const void *fdata) EINA_ARG_NONNULL(1, 2); /* Paul Hsieh (http://www.azillionmonkeys.com/qed/hash.html) hash function used by WebCore (http://webkit.org/blog/8/hashtables-part-2/) */ EAPI int eina_hash_superfast(const char *key, diff --git a/libraries/eina/src/include/eina_inarray.h b/libraries/eina/src/include/eina_inarray.h new file mode 100644 index 0000000..d37c76b --- /dev/null +++ b/libraries/eina/src/include/eina_inarray.h @@ -0,0 +1,572 @@ +/* EINA - EFL data type library + * Copyright (C) 2012 ProFUSION embedded systems + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; + * if not, see . + */ + +#ifndef EINA_INARRAY_H_ +#define EINA_INARRAY_H_ + +#include "eina_types.h" +#include "eina_iterator.h" +#include "eina_accessor.h" + +/** + * @addtogroup Eina_Data_Types_Group Data Types + * + * @since 1.2 + * + * @{ + */ + +/** + * @addtogroup Eina_Containers_Group Containers + * + * @{ + */ + +/** + * @defgroup Eina_Inline_Array_Group Inline Array + * + * @{ + */ + + +/** + * @typedef Eina_Inarray + * Inlined array type. + * + * @since 1.2 + */ +typedef struct _Eina_Inarray Eina_Inarray; + +/** + * Inline array structure, use #Eina_Inarray typedef instead. + * + * Do not modify these fields directly, use eina_inarray_setup() or + * eina_inarray_new() instead. + * + * @since 1.2 + */ +struct _Eina_Inarray +{ + unsigned int member_size; /**< byte size of each entry in members */ + unsigned int len; /**< number of elements used in members */ + unsigned int max; /**< number of elements allocated in members */ + unsigned int step; /**< amount to grow number of members allocated */ + void *members; /**< actual array of elements */ + EINA_MAGIC +}; + +/** + * @brief Create new inline array. + * + * @param member_size size of each member in the array. + * @param step when resizing the array, do this using the following + * extra amount. + * @return The new inline array table or @c NULL on failure. + * + * Create a new array where members are inlined in a sequence. Each + * member has @a member_size bytes. + * + * If the @a step is 0, then a safe default is chosen. + * + * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is + * set. If @a member_size is zero, then @c NULL is returned. + * + * @see eina_inarray_free() + * + * @since 1.2 + */ +EAPI Eina_Inarray *eina_inarray_new(unsigned int member_size, + unsigned int step) EINA_MALLOC EINA_WARN_UNUSED_RESULT; + +/** + * @brief Free array and its members. + * @param array array object + * + * @see eina_inarray_flush() + * + * @since 1.2 + */ +EAPI void eina_inarray_free(Eina_Inarray *array) EINA_ARG_NONNULL(1); + +/** + * @brief Initialize inline array. + * @param array array object to initialize. + * @param member_size size of each member in the array. + * @param step when resizing the array, do this using the following + * extra amount. + * + * Initialize array. If the @a step is 0, then a safe default is + * chosen. + * + * This is useful for arrays inlined into other structures or + * allocated at stack. + * + * @see eina_inarray_flush() + * + * @since 1.2 + */ +EAPI void eina_inarray_setup(Eina_Inarray *array, + unsigned int member_size, + unsigned int step) EINA_ARG_NONNULL(1); + +/** + * @brief Remove every member from array. + * @param array array object + * + * @since 1.2 + */ +EAPI void eina_inarray_flush(Eina_Inarray *array) EINA_ARG_NONNULL(1); + +/** + * @brief Copy the data as the last member of the array. + * @param array array object + * @param data data to be copied at the end + * @return the index of the new member or -1 on errors. + * + * Copies the given pointer contents at the end of the array. The + * pointer is not referenced, instead it's contents is copied to the + * members array using the previously defined @c member_size. + * + * @see eina_inarray_insert_at(). + * + * @since 1.2 + */ +EAPI int eina_inarray_append(Eina_Inarray *array, + const void *data) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Copy the data to array at position found by comparison function + * @param array array object + * @param data data to be copied + * @param compare compare function + * @return the index of the new member or -1 on errors. + * + * Copies the given pointer contents at the array position defined by + * given @a compare function. The pointer is not referenced, instead + * it's contents is copied to the members array using the previously + * defined @c member_size. + * + * The data given to @a compare function are the pointer to member + * memory itself, do no change it. + * + * @see eina_inarray_insert_sorted() + * @see eina_inarray_insert_at() + * @see eina_inarray_append() + * + * @since 1.2 + */ +EAPI int eina_inarray_insert(Eina_Inarray *array, + const void *data, + Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2, 3); + +/** + * @brief Copy the data to array at position found by comparison function + * @param array array object + * @param data data to be copied + * @param compare compare function + * @return the index of the new member or -1 on errors. + * + * Copies the given pointer contents at the array position defined by + * given @a compare function. The pointer is not referenced, instead + * it's contents is copied to the members array using the previously + * defined @c member_size. + * + * The data given to @a compare function are the pointer to member + * memory itself, do no change it. + * + * This variation will optimize insertion position assuming the array + * is already sorted by doing binary search. + * + * @see eina_inarray_sort() + * + * @since 1.2 + */ +EAPI int eina_inarray_insert_sorted(Eina_Inarray *array, + const void *data, + Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2, 3); + +/** + * @brief Find data and remove matching member + * @param array array object + * @param data data to be found and removed + * @return the index of the removed member or -1 on errors. + * + * Find data in the array and remove it. Data may be an existing + * member of array (then optimized) or the contents will be matched + * using memcmp(). + * + * @see eina_inarray_pop() + * @see eina_inarray_remove_at() + * + * @since 1.2 + */ +EAPI int eina_inarray_remove(Eina_Inarray *array, + const void *data) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Removes the last member of the array + * @param array array object + * @return the index of the removed member or -1 on errors. + * + * @since 1.2 + */ +EAPI int eina_inarray_pop(Eina_Inarray *array) EINA_ARG_NONNULL(1); + +/** + * @brief Get the member at given position + * @param array array object + * @param position member position + * @return pointer to current member memory. + * + * Gets the member given its position in the array. It is a pointer to + * its current memory, then it can be invalidated with functions that + * changes the array such as eina_inarray_append(), + * eina_inarray_insert_at() or eina_inarray_remove_at() or variants. + * + * See also eina_inarray_lookup() and eina_inarray_lookup_sorted(). + * + * @since 1.2 + */ +EAPI void *eina_inarray_nth(const Eina_Inarray *array, + unsigned int position) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; + +/** + * @brief Copy the data at given position in the array + * @param array array object + * @param position where to insert the member + * @param data data to be copied at position + * @return #EINA_TRUE on success, #EINA_FALSE on failure. + * + * Copies the given pointer contents at the given @a position in the + * array. The pointer is not referenced, instead it's contents is + * copied to the members array using the previously defined + * @c member_size. + * + * All the members from @a position to the end of the array are + * shifted to the end. + * + * If @a position is equal to the end of the array (equals to + * eina_inarray_count()), then the member is appended. + * + * If @a position is bigger than the array length, it will fail. + * + * @since 1.2 + */ +EAPI Eina_Bool eina_inarray_insert_at(Eina_Inarray *array, + unsigned int position, + const void *data) EINA_ARG_NONNULL(1, 3); + +/** + * @brief Opens a space at given position, returning its pointer. + * @param array array object + * @param position where to insert first member (open/allocate space) + * @param member_count how many times member_size bytes will be allocated. + * @return pointer to first member memory allocated or @c NULL on errors. + * + * This is similar to eina_inarray_insert_at(), but useful if the + * members contents are still unknown or unallocated. It will make + * room for the required number of items and return the pointer to the + * first item, similar to malloc(member_count * member_size), with the + * guarantee all memory is within members array. + * + * The new member memory is undefined, it's not automatically zeroed. + * + * All the members from @a position to the end of the array are + * shifted to the end. + * + * If @a position is equal to the end of the array (equals to + * eina_inarray_count()), then the member is appended. + * + * If @a position is bigger than the array length, it will fail. + * + * @since 1.2 + */ +EAPI void *eina_inarray_alloc_at(Eina_Inarray *array, + unsigned int position, + unsigned int member_count) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; + +/** + * @brief Copy the data over the given position. + * @param array array object + * @param position where to replace the member + * @param data data to be copied at position + * @return #EINA_TRUE on success, #EINA_FALSE on failure. + * + * Copies the given pointer contents at the given @a position in the + * array. The pointer is not referenced, instead it's contents is + * copied to the members array using the previously defined + * @c member_size. + * + * If @a position does not exist, it will fail. + * + * @since 1.2 + */ +EAPI Eina_Bool eina_inarray_replace_at(Eina_Inarray *array, + unsigned int position, + const void *data) EINA_ARG_NONNULL(1, 3); + +/** + * @brief Remove member at given position + * @param array array object + * @param position position to be removed + * @return #EINA_TRUE on success, #EINA_FALSE on failure. + * + * The member is removed from array and any members after it are moved + * towards the array head. + * + * See also eina_inarray_pop() and eina_inarray_remove(). + * + * @since 1.2 + */ +EAPI Eina_Bool eina_inarray_remove_at(Eina_Inarray *array, + unsigned int position) EINA_ARG_NONNULL(1); + +/** + * @brief Reverse members in the array. + * @param array array object + * + * If you do not want to change the array, just walk its elements + * backwards, then use EINA_INARRAY_REVERSE_FOREACH() macro. + * + * @see EINA_INARRAY_REVERSE_FOREACH() + * + * @since 1.2 + */ +EAPI void eina_inarray_reverse(Eina_Inarray *array) EINA_ARG_NONNULL(1); + +/** + * @brief Applies quick sort to array + * @param array array object + * @param compare compare function + * + * Applies quick sort to the @a array. + * + * The data given to @a compare function are the pointer to member + * memory itself, do no change it. + * + * @see eina_inarray_insert_sorted() + * + * @since 1.2 + */ +EAPI void eina_inarray_sort(Eina_Inarray *array, + Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Search member (linear walk) + * @param array array object + * @param data member to search using @a compare function. + * @param compare compare function + * @return the member index or -1 if not found. + * + * Walks array linearly looking for given data as compared by + * @a compare function. + * + * The data given to @a compare function are the pointer to member + * memory itself, do no change it. + * + * See also eina_inarray_lookup_sorted(). + * + * @since 1.2 + */ +EAPI int eina_inarray_search(const Eina_Inarray *array, + const void *data, + Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2, 3); + +/** + * @brief Search member (binary search walk) + * @param array array object + * @param data member to search using @a compare function. + * @param compare compare function + * @return the member index or -1 if not found. + * + * Uses binary search for given data as compared by @a compare function. + * + * The data given to @a compare function are the pointer to member + * memory itself, do no change it. + * + * @since 1.2 + */ +EAPI int eina_inarray_search_sorted(const Eina_Inarray *array, + const void *data, + Eina_Compare_Cb compare) EINA_ARG_NONNULL(1, 2, 3); + +/** + * @brief Call function for each array member + * @param array array object + * @param function callback function + * @param user_data user data given to callback @a function + * @return #EINA_TRUE if it successfully iterate all items of the array. + * + * Call @a function for every given data in @a array. + * + * Safe way to iterate over an array. @p function should return + * #EINA_TRUE as long as you want the function to continue iterating, + * by returning #EINA_FALSE it will stop and return #EINA_FALSE as a + * result. + * + * The data given to @a function are the pointer to member memory + * itself. + * + * @see EINA_INARRAY_FOREACH() + * + * @since 1.2 + */ +EAPI Eina_Bool eina_inarray_foreach(const Eina_Inarray *array, + Eina_Each_Cb function, + const void *user_data) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Remove all members that matched. + * @param array array object + * @param match match function + * @param user_data user data given to callback @a match. + * @return number of removed entries or -1 on error. + * + * Remove all entries in the @a array where @a match function + * returns #EINA_TRUE. + * + * @since 1.2 + */ +EAPI int eina_inarray_foreach_remove(Eina_Inarray *array, + Eina_Each_Cb match, + const void *user_data) EINA_ARG_NONNULL(1, 2); + +/** + * @brief number of members in array. + * @param array array object + * @return number of members in array. + * + * @since 1.2 + */ +EAPI unsigned int eina_inarray_count(const Eina_Inarray *array) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; + +/** + * @brief Returned a new iterator associated to an array. + * @param array array object + * @return A new iterator. + * + * This function returns a newly allocated iterator associated to + * @p array. + * + * If the memory can not be allocated, NULL is returned and + * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is + * returned. + * + * @warning if the array structure changes then the iterator becomes + * invalid! That is, if you add or remove members this + * iterator behavior is undefined and your program may crash! + * + * @since 1.2 + */ +EAPI Eina_Iterator *eina_inarray_iterator_new(const Eina_Inarray *array) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * @brief Returned a new reversed iterator associated to an array. + * @param array array object + * @return A new iterator. + * + * This function returns a newly allocated iterator associated to + * @p array. + * + * Unlike eina_inarray_iterator_new(), this will walk the array backwards. + * + * If the memory can not be allocated, NULL is returned and + * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid iterator is + * returned. + * + * @warning if the array structure changes then the iterator becomes + * invalid! That is, if you add or remove nodes this iterator + * behavior is undefined and your program may crash! + * + * @since 1.2 + */ +EAPI Eina_Iterator *eina_inarray_iterator_reversed_new(const Eina_Inarray *array) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * @brief Returned a new accessor associated to an array. + * @param array array object + * @return A new accessor. + * + * This function returns a newly allocated accessor associated to + * @p array. + * + * If the memory can not be allocated, NULL is returned and + * #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, a valid accessor is + * returned. + * + * @since 1.2 + */ +EAPI Eina_Accessor *eina_inarray_accessor_new(const Eina_Inarray *array) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * @def EINA_INARRAY_FOREACH + * @brief walks array linearly from head to tail + * @param array array object + * @param itr the iterator pointer + * + * @a itr must be a pointer with sizeof(itr*) == array->member_size. + * + * @warning This is fast as it does direct pointer access, but it will + * not check for @c NULL pointers or invalid array object! + * See eina_inarray_foreach() to do that. + * + * @warning Do not modify array as you walk it! If that is desired, + * then use eina_inarray_foreach_remove() + * + * @since 1.2 + */ +#define EINA_INARRAY_FOREACH(array, itr) \ + for ((itr) = array->members; \ + (itr) < (((typeof(*itr)*)array->members) + array->len); \ + (itr)++) + +/** + * @def EINA_INARRAY_REVERSE_FOREACH + * @brief walks array linearly from tail to head + * @param array array object + * @param itr the iterator pointer + * + * @a itr must be a pointer with sizeof(itr*) == array->member_size. + * + * @warning This is fast as it does direct pointer access, but it will + * not check for @c NULL pointers or invalid array object! + * + * @warning Do not modify array as you walk it! If that is desired, + * then use eina_inarray_foreach_remove() + * + * @since 1.2 + */ +#define EINA_INARRAY_REVERSE_FOREACH(array, itr) \ + for ((itr) = ((((typeof(*(itr))*)array->members) + array->len) - 1); \ + (((itr) >= (typeof(*(itr))*)array->members) \ + && (array->members != NULL)); \ + (itr)--) + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + +#endif /*EINA_INARRAY_H_*/ diff --git a/libraries/eina/src/include/eina_inline_array.x b/libraries/eina/src/include/eina_inline_array.x index f9f6026..a635ee2 100644 --- a/libraries/eina/src/include/eina_inline_array.x +++ b/libraries/eina/src/include/eina_inline_array.x @@ -19,6 +19,8 @@ #ifndef EINA_INLINE_ARRAY_X_ #define EINA_INLINE_ARRAY_X_ +#include + #include /** @@ -126,6 +128,8 @@ eina_array_data_set(const Eina_Array *array, unsigned int idx, const void *data) * This function returns the number of elements in @p array. For * performance reasons, there is no check of @p array. If it is * @c NULL or invalid, the program may crash. + * + * @deprecated use eina_array_count() */ static inline unsigned int eina_array_count_get(const Eina_Array *array) @@ -133,6 +137,22 @@ eina_array_count_get(const Eina_Array *array) return array->count; } +/** + * @brief Return the number of elements in an array. + * + * @param array The array. + * @return The number of elements. + * + * This function returns the number of elements in @p array. For + * performance reasons, there is no check of @p array. If it is + * @c NULL or invalid, the program may crash. + */ +static inline unsigned int +eina_array_count(const Eina_Array *array) +{ + return array->count; +} + static inline Eina_Bool eina_array_foreach(Eina_Array *array, Eina_Each_Cb cb, void *fdata) { diff --git a/libraries/eina/src/include/eina_inline_clist.x b/libraries/eina/src/include/eina_inline_clist.x new file mode 100644 index 0000000..66223fe --- /dev/null +++ b/libraries/eina/src/include/eina_inline_clist.x @@ -0,0 +1,135 @@ +/* + * Linked lists support + * + * Copyright (C) 2002 Alexandre Julliard + * Copyright (C) 2011 Mike McCormack (adapted for Eina) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __EINA_CLIST_INLINE_H__ +#define __EINA_CLIST_INLINE_H__ + +#include + +static inline void eina_clist_add_after(Eina_Clist *elem, Eina_Clist *to_add) +{ + to_add->next = elem->next; + to_add->prev = elem; + elem->next->prev = to_add; + elem->next = to_add; +} + +static inline void eina_clist_add_before(Eina_Clist *elem, Eina_Clist *to_add) +{ + to_add->next = elem; + to_add->prev = elem->prev; + elem->prev->next = to_add; + elem->prev = to_add; +} + +static inline void eina_clist_add_head(Eina_Clist *list, Eina_Clist *elem) +{ + eina_clist_add_after(list, elem); +} + +static inline void eina_clist_add_tail(Eina_Clist *list, Eina_Clist *elem) +{ + eina_clist_add_before(list, elem); +} + +static inline void eina_clist_element_init(Eina_Clist *elem) +{ + elem->next = NULL; + elem->prev = NULL; +} + +static inline int eina_clist_element_is_linked(Eina_Clist *elem) +{ + return (elem->next != NULL && elem->prev != NULL); +} + +static inline void eina_clist_remove(Eina_Clist *elem) +{ + elem->next->prev = elem->prev; + elem->prev->next = elem->next; + eina_clist_element_init(elem); +} + +static inline Eina_Clist *eina_clist_next(const Eina_Clist *list, const Eina_Clist *elem) +{ + Eina_Clist *ret = elem->next; + if (elem->next == list) ret = NULL; + return ret; +} + +static inline Eina_Clist *eina_clist_prev(const Eina_Clist *list, const Eina_Clist *elem) +{ + Eina_Clist *ret = elem->prev; + if (elem->prev == list) ret = NULL; + return ret; +} + +static inline Eina_Clist *eina_clist_head(const Eina_Clist *list) +{ + return eina_clist_next(list, list); +} + +static inline Eina_Clist *eina_clist_tail(const Eina_Clist *list) +{ + return eina_clist_prev(list, list); +} + +static inline int eina_clist_empty(const Eina_Clist *list) +{ + return list->next == list; +} + +static inline void eina_clist_init(Eina_Clist *list) +{ + list->next = list->prev = list; +} + +static inline unsigned int eina_clist_count(const Eina_Clist *list) +{ + unsigned count = 0; + const Eina_Clist *ptr; + for (ptr = list->next; ptr != list; ptr = ptr->next) count++; + return count; +} + +static inline void eina_clist_move_tail(Eina_Clist *dst, Eina_Clist *src) +{ + if (eina_clist_empty(src)) return; + + dst->prev->next = src->next; + src->next->prev = dst->prev; + dst->prev = src->prev; + src->prev->next = dst; + eina_clist_init(src); +} + +static inline void eina_clist_move_head(Eina_Clist *dst, Eina_Clist *src) +{ + if (eina_clist_empty(src)) return; + + dst->next->prev = src->prev; + src->prev->next = dst->next; + dst->next = src->next; + src->next->prev = dst; + eina_clist_init(src); +} + +#endif diff --git a/libraries/eina/src/include/eina_inline_hash.x b/libraries/eina/src/include/eina_inline_hash.x index f27060f..be20e8f 100644 --- a/libraries/eina/src/include/eina_inline_hash.x +++ b/libraries/eina/src/include/eina_inline_hash.x @@ -101,7 +101,7 @@ static inline unsigned int _fmix32(unsigned int h) return h; } -int +static inline int eina_hash_murmur3(const char *key, int len) { const unsigned char * data = (const unsigned char*)key; diff --git a/libraries/eina/src/include/eina_inline_lock_posix.x b/libraries/eina/src/include/eina_inline_lock_posix.x index 77f5b8b..64e049a 100644 --- a/libraries/eina/src/include/eina_inline_lock_posix.x +++ b/libraries/eina/src/include/eina_inline_lock_posix.x @@ -19,6 +19,15 @@ #ifndef EINA_INLINE_LOCK_POSIX_X_ #define EINA_INLINE_LOCK_POSIX_X_ +#ifdef EINA_UNUSED +# undef EINA_UNUSED +#endif +#ifdef __GNUC__ +# define EINA_UNUSED __attribute__((unused)) +#else +# define EINA_UNUSED +#endif + #include #ifndef __USE_UNIX98 # define __USE_UNIX98 @@ -28,7 +37,10 @@ # include #endif +#include + #include +#include #ifdef EINA_HAVE_DEBUG_THREADS #include @@ -45,6 +57,7 @@ typedef struct _Eina_Lock Eina_Lock; typedef struct _Eina_RWLock Eina_RWLock; typedef struct _Eina_Condition Eina_Condition; typedef pthread_key_t Eina_TLS; +typedef sem_t Eina_Semaphore; struct _Eina_Lock { @@ -77,8 +90,6 @@ struct _Eina_RWLock EAPI extern Eina_Bool _eina_threads_activated; #ifdef EINA_HAVE_DEBUG_THREADS -# include - EAPI extern int _eina_threads_debug; EAPI extern pthread_t _eina_main_loop; EAPI extern pthread_mutex_t _eina_tracking_lock; @@ -506,4 +517,40 @@ eina_tls_set(Eina_TLS key, const void *data) return EINA_TRUE; } +static inline Eina_Bool +eina_semaphore_new(Eina_Semaphore *sem, int count_init) +{ + if (!sem || (count_init <= 0)) + return EINA_FALSE; + + return (sem_init(sem, count_init, 1) == 0) ? EINA_TRUE : EINA_FALSE; +} + +static inline Eina_Bool +eina_semaphore_free(Eina_Semaphore *sem) +{ + if (!sem) + return EINA_FALSE; + + return (sem_destroy(sem) == 0) ? EINA_TRUE : EINA_FALSE; +} + +static inline Eina_Bool +eina_semaphore_lock(Eina_Semaphore *sem) +{ + if (!sem) + return EINA_FALSE; + + return (sem_wait(sem) == 0) ? EINA_TRUE : EINA_FALSE; +} + +static inline Eina_Bool +eina_semaphore_release(Eina_Semaphore *sem, int count_release EINA_UNUSED) +{ + if (!sem) + return EINA_FALSE; + + return (sem_post(sem) == 0) ? EINA_TRUE : EINA_FALSE; +} + #endif diff --git a/libraries/eina/src/include/eina_inline_lock_void.x b/libraries/eina/src/include/eina_inline_lock_void.x index 8cb9a49..2f5209f 100644 --- a/libraries/eina/src/include/eina_inline_lock_void.x +++ b/libraries/eina/src/include/eina_inline_lock_void.x @@ -47,6 +47,7 @@ typedef void *Eina_Lock; typedef void *Eina_RWLock; typedef void *Eina_Condition; typedef void *Eina_TLS; +typedef void *Eina_Semaphore; /** * @brief Create a new #Eina_Lock. @@ -63,7 +64,7 @@ typedef void *Eina_TLS; static inline Eina_Bool eina_lock_new(Eina_Lock *mutex EINA_UNUSED) { - return EINA_FALSE; + return EINA_TRUE; } /** @@ -94,7 +95,7 @@ eina_lock_free(Eina_Lock *mutex EINA_UNUSED) static inline Eina_Lock_Result eina_lock_take(Eina_Lock *mutex EINA_UNUSED) { - return EINA_LOCK_FAIL; + return EINA_LOCK_SUCCEED; } /** @@ -115,7 +116,7 @@ eina_lock_take(Eina_Lock *mutex EINA_UNUSED) static inline Eina_Lock_Result eina_lock_take_try(Eina_Lock *mutex EINA_UNUSED) { - return EINA_LOCK_FAIL; + return EINA_LOCK_SUCCEED; } /** @@ -132,7 +133,7 @@ eina_lock_take_try(Eina_Lock *mutex EINA_UNUSED) static inline Eina_Lock_Result eina_lock_release(Eina_Lock *mutex EINA_UNUSED) { - return EINA_LOCK_FAIL; + return EINA_LOCK_SUCCEED; } static inline void @@ -143,7 +144,7 @@ eina_lock_debug(const Eina_Lock *mutex EINA_UNUSED) static inline Eina_Bool eina_condition_new(Eina_Condition *cond EINA_UNUSED, Eina_Lock *mutex EINA_UNUSED) { - return EINA_FALSE; + return EINA_TRUE; } static inline void @@ -154,72 +155,72 @@ eina_condition_free(Eina_Condition *cond EINA_UNUSED) static inline Eina_Bool eina_condition_wait(Eina_Condition *cond EINA_UNUSED) { - return EINA_FALSE; + return EINA_TRUE; } static inline Eina_Bool eina_condition_timedwait(Eina_Condition *cond EINA_UNUSED, double val EINA_UNUSED) { - return EINA_FALSE; + return EINA_TRUE; } static inline Eina_Bool eina_condition_broadcast(Eina_Condition *cond EINA_UNUSED) { - return EINA_FALSE; + return EINA_TRUE; } static inline Eina_Bool eina_condition_signal(Eina_Condition *cond EINA_UNUSED) { - return EINA_FALSE; + return EINA_TRUE; } static inline Eina_Bool eina_rwlock_new(Eina_RWLock *mutex EINA_UNUSED) { - return EINA_FALSE; + return EINA_TRUE; } static inline void - eina_rwlock_free(Eina_RWLock *mutex EINA_UNUSED) +eina_rwlock_free(Eina_RWLock *mutex EINA_UNUSED) { } static inline Eina_Lock_Result eina_rwlock_read_take(Eina_RWLock *mutex EINA_UNUSED) { - return EINA_LOCK_FAIL; + return EINA_LOCK_SUCCEED; } static inline Eina_Lock_Result eina_rwlock_write_take(Eina_RWLock *mutex EINA_UNUSED) { - return EINA_LOCK_FAIL; + return EINA_LOCK_SUCCEED; } static inline Eina_Lock_Result eina_rwlock_release(Eina_RWLock *mutex EINA_UNUSED) { - return EINA_LOCK_FAIL; + return EINA_LOCK_SUCCEED; } static inline Eina_Lock_Result eina_rwlock_take_read(Eina_RWLock *mutex EINA_UNUSED) { - return EINA_LOCK_FAIL; + return EINA_LOCK_SUCCEED; } static inline Eina_Lock_Result eina_rwlock_take_write(Eina_RWLock *mutex EINA_UNUSED) { - return EINA_LOCK_FAIL; + return EINA_LOCK_SUCCEED; } static inline Eina_Bool eina_tls_new(Eina_TLS *key EINA_UNUSED) { - return EINA_FALSE; + return EINA_TRUE; } static inline void @@ -236,9 +237,34 @@ eina_tls_get(Eina_TLS key EINA_UNUSED) static inline Eina_Bool eina_tls_set(Eina_TLS key EINA_UNUSED, const void *data EINA_UNUSED) { - return EINA_FALSE; + return EINA_TRUE; } +static inline Eina_Bool +eina_semaphore_new(Eina_Semaphore *sem EINA_UNUSED, + int count_init EINA_UNUSED) +{ + return EINA_TRUE; +} + +static inline Eina_Bool +eina_semaphore_free(Eina_Semaphore *sem EINA_UNUSED) +{ + return EINA_TRUE; +} + +static inline Eina_Bool +eina_semaphore_lock(Eina_Semaphore *sem EINA_UNUSED) +{ + return EINA_TRUE; +} + +static inline Eina_Bool +eina_semaphore_release(Eina_Semaphore *sem EINA_UNUSED, + int count_release EINA_UNUSED) +{ + return EINA_TRUE; +} /** * @} diff --git a/libraries/eina/src/include/eina_inline_lock_win32.x b/libraries/eina/src/include/eina_inline_lock_win32.x index 072095c..e8363d5 100644 --- a/libraries/eina/src/include/eina_inline_lock_win32.x +++ b/libraries/eina/src/include/eina_inline_lock_win32.x @@ -58,6 +58,8 @@ struct _Eina_Win32_RWLock typedef DWORD Eina_TLS; +typedef HANDLE Eina_Semaphore; + EAPI extern Eina_Bool _eina_threads_activated; static inline Eina_Bool @@ -463,4 +465,48 @@ eina_tls_set(Eina_TLS key, const void *data) return EINA_TRUE; } +static inline Eina_Bool +eina_semaphore_new(Eina_Semaphore *sem, int count_init) +{ + if (!sem || (count_init <= 0)) + return EINA_FALSE; + + *sem = CreateSemaphore(NULL, count_init, 32767, NULL); + if (!*sem) + return EINA_FALSE; +} + +static inline Eina_Bool +eina_semaphore_free(Eina_Semaphore *sem) +{ + if (!sem) + return EINA_FALSE; + + CloseHandle(*sem); +} + +static inline Eina_Bool +eina_semaphore_lock(Eina_Semaphore *sem) +{ + DWORD res; + + if (!sem) + return EINA_FALSE; + + res = WaitForSingleObject(*sem, 0L); + if (res == WAIT_OBJECT_0) + return EINA_TRUE; + + return EINA_FALSE; +} + +static inline Eina_Bool +eina_semaphore_release(Eina_Semaphore *sem, int count_release) +{ + if (!sem) + return EINA_FALSE; + + return ReleaseSemaphore(*sem, count_release, NULL) ? EINA_TRUE : EINA_FALSE; +} + #endif diff --git a/libraries/eina/src/include/eina_inline_lock_wince.x b/libraries/eina/src/include/eina_inline_lock_wince.x index 965d475..1af1aac 100644 --- a/libraries/eina/src/include/eina_inline_lock_wince.x +++ b/libraries/eina/src/include/eina_inline_lock_wince.x @@ -19,6 +19,15 @@ #ifndef EINA_INLINE_LOCK_WIN32_X_ #define EINA_INLINE_LOCK_WIN32_X_ +#ifdef EINA_UNUSED +# undef EINA_UNUSED +#endif +#ifdef __GNUC__ +# define EINA_UNUSED __attribute__((unused)) +#else +# define EINA_UNUSED +#endif + #include EAPI extern Eina_Bool _threads_activated; @@ -26,6 +35,7 @@ EAPI extern Eina_Bool _threads_activated; typedef HANDLE Eina_Lock; typedef Eina_Lock Eina_RWLock; typedef DWORD Eina_TLS; +typedef void * Eina_Semaphore; static inline Eina_Bool eina_lock_new(Eina_Lock *mutex) @@ -173,6 +183,30 @@ eina_tls_set(Eina_TLS key, const void *data) return EINA_TRUE; } +static inline Eina_Bool +eina_semaphore_new(Eina_Semaphore *sem EINA_UNUSED, + int count_init EINA_UNUSED) +{ + return EINA_FALSE; +} +static inline Eina_Bool +eina_semaphore_free(Eina_Semaphore *sem EINA_UNUSED) +{ + return EINA_FALSE; +} + +static inline Eina_Bool +eina_semaphore_lock(Eina_Semaphore *sem EINA_UNUSED) +{ + return EINA_FALSE; +} + +static inline Eina_Bool +eina_semaphore_release(Eina_Semaphore *sem EINA_UNUSED, + int count_release EINA_UNUSED) +{ + return EINA_FALSE; +} #endif diff --git a/libraries/eina/src/include/eina_inline_log.x b/libraries/eina/src/include/eina_inline_log.x index 4cdd7d8..53d8afb 100644 --- a/libraries/eina/src/include/eina_inline_log.x +++ b/libraries/eina/src/include/eina_inline_log.x @@ -49,7 +49,7 @@ static inline Eina_Bool eina_log_level_check(int level) { - return eina_log_level_get() <= level; + return eina_log_level_get() >= level; } /** @@ -81,7 +81,7 @@ eina_log_domain_level_check(int domain, int level) int dom_level = eina_log_domain_registered_level_get(domain); if (EINA_UNLIKELY(dom_level == EINA_LOG_LEVEL_UNKNOWN)) return EINA_FALSE; - return dom_level <= level; + return dom_level >= level; } /** diff --git a/libraries/eina/src/include/eina_inline_mempool.x b/libraries/eina/src/include/eina_inline_mempool.x index a67ec3d..729a669 100644 --- a/libraries/eina/src/include/eina_inline_mempool.x +++ b/libraries/eina/src/include/eina_inline_mempool.x @@ -19,6 +19,8 @@ #ifndef EINA_INLINE_MEMPOOL_X_ #define EINA_INLINE_MEMPOOL_X_ +#include + /** * @addtogroup Eina_Memory_Pool_Group Memory Pool * @@ -67,17 +69,16 @@ struct _Eina_Mempool }; /** - * @brief Re-allocate a amount memory by the given mempool. + * @brief Re-allocate an amount memory by the given mempool. * * @param mp The mempool. * @param element The element to re-allocate. * @param size The size in bytes to re-allocate. * @return The newly re-allocated data. * - * This function re-allocates @p element with @p size bytes, using the - * mempool @p mp and returns the allocated data. If not used anymore, - * the data must be freed with eina_mempool_free(). No check is done - * on @p mp, so it must be a valid mempool. + * This function re-allocates and returns @p element with @p size bytes using the + * mempool @p mp. If not used anymore, the data must be freed with eina_mempool_free(). + * @warning No checks are done for @p mp. */ static inline void * eina_mempool_realloc(Eina_Mempool *mp, void *element, unsigned int size) @@ -86,16 +87,15 @@ eina_mempool_realloc(Eina_Mempool *mp, void *element, unsigned int size) } /** - * @brief Allocate a amount memory by the given mempool. + * @brief Allocate memory using the given mempool. * * @param mp The mempool. * @param size The size in bytes to allocate. * @return The newly allocated data. * - * This function allocates @p size bytes, using the mempool @p mp and - * returns the allocated data. If not used anymore, the data must be - * freed with eina_mempool_free(). No check is done on @p mp, so it - * must be a valid mempool. + * This function allocates and returns @p size bytes using the mempool @p mp. + * If not used anymore, the data must be freed with eina_mempool_free(). + * @warning No checks are done for @p mp. */ static inline void * eina_mempool_malloc(Eina_Mempool *mp, unsigned int size) @@ -104,15 +104,36 @@ eina_mempool_malloc(Eina_Mempool *mp, unsigned int size) } /** - * @brief Free the allocated ressources by the given mempool. + * @brief Allocate and zero memory using the given mempool. + * + * @param mp The mempool. + * @param size The size in bytes to allocate. + * @return The newly allocated data. + * + * This function allocates, zeroes, and returns @p size bytes using the mempool @p mp. + * If not used anymore, the data must be freed with eina_mempool_free(). + * @warning No checks are done for @p mp. + * @since 1.2 + */ +static inline void * +eina_mempool_calloc(Eina_Mempool *mp, unsigned int size) +{ + void *r = mp->backend.alloc(mp->backend_data, size); + if (!r) return NULL; + memset(r, 0, size); + return r; +} + +/** + * @brief Free resources previously allocated by the given mempool. * * @param mp The mempool. * @param element The data to free. * * This function frees @p element allocated by @p mp. @p element must - * have been obtained by eina_mempool_malloc() or - * eina_mempool_realloc(). No check is done on @p mp, so it must be a - * valid mempool. + * have been obtained from eina_mempool_malloc(), eina_mempool_calloc(), or + * eina_mempool_realloc(). + * @warning No checks are done for @p mp. */ static inline void eina_mempool_free(Eina_Mempool *mp, void *element) diff --git a/libraries/eina/src/include/eina_inline_value.x b/libraries/eina/src/include/eina_inline_value.x new file mode 100644 index 0000000..59ec315 --- /dev/null +++ b/libraries/eina/src/include/eina_inline_value.x @@ -0,0 +1,1705 @@ +/* Eina - EFL data type library + * Copyright (C) 2012 ProFUSION embedded systems + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; + * if not, see . + */ + +#ifndef EINA_INLINE_VALUE_X_ +#define EINA_INLINE_VALUE_X_ + +#include +#include + +#include "eina_stringshare.h" + +/* NOTE: most of value is implemented here for performance reasons */ + +//#define EINA_VALUE_NO_OPTIMIZE 1 +#ifdef EINA_VALUE_NO_OPTIMIZE +#define EINA_VALUE_TYPE_DEFAULT(type) (0) +#else + +/** + * @var _EINA_VALUE_TYPE_BASICS_START + * pointer to the first basic type. + * @since 1.2 + * @private + */ +EAPI extern const Eina_Value_Type *_EINA_VALUE_TYPE_BASICS_START; + +/** + * @var _EINA_VALUE_TYPE_BASICS_END + * pointer to the last (inclusive) basic type. + * @since 1.2 + * @private + */ +EAPI extern const Eina_Value_Type *_EINA_VALUE_TYPE_BASICS_END; +#define EINA_VALUE_TYPE_DEFAULT(type) \ + ((_EINA_VALUE_TYPE_BASICS_START <= type) && \ + (type <= _EINA_VALUE_TYPE_BASICS_END)) +#endif + +#define EINA_VALUE_TYPE_CHECK_RETURN(value) \ + EINA_SAFETY_ON_NULL_RETURN(value); \ + EINA_SAFETY_ON_FALSE_RETURN(eina_value_type_check(value->type)) + +#define EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, retval) \ + EINA_SAFETY_ON_NULL_RETURN_VAL(value, retval); \ + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(value->type), retval) + +#define EINA_VALUE_TYPE_DISPATCH(type, method, no_method_err, ...) \ + do \ + { \ + if (type->method) \ + type->method(type, ##__VA_ARGS__); \ + else \ + eina_error_set(no_method_err); \ + } \ + while (0) + +#define EINA_VALUE_TYPE_DISPATCH_RETURN(value, method, no_method_err, def_ret, ...) \ + do \ + { \ + if (type->method) \ + return type->method(type, ##__VA_ARGS__); \ + eina_error_set(no_method_err); \ + return def_ret; \ + } \ + while (0) + +/** + * @brief Get memory for given value (inline or allocated buffer). + * @since 1.2 + * @private + */ +static inline void * +eina_value_memory_get(const Eina_Value *value) +{ + if (value->type->value_size <= 8) + return (void *)value->value.buf; + return value->value.ptr; +} + +/** + * @brief Allocate memory for internal value types. + * @since 1.2 + * @private + */ +EAPI void *eina_value_inner_alloc(size_t size); +/** + * @brief Releases memory for internal value types. + * @since 1.2 + * @private + */ +EAPI void eina_value_inner_free(size_t size, void *mem); + +static inline Eina_Bool +eina_value_setup(Eina_Value *value, const Eina_Value_Type *type) +{ + void *mem; + + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(type->value_size > 0, EINA_FALSE); + + value->type = type; + + if (type->value_size <= 8) mem = &value->value; + else + { + mem = value->value.ptr = eina_value_inner_alloc(type->value_size); + EINA_SAFETY_ON_NULL_RETURN_VAL(mem, EINA_FALSE); + } + + memset(mem, 0, type->value_size); + + if (EINA_VALUE_TYPE_DEFAULT(type)) + { + eina_error_set(0); + return EINA_TRUE; + } + + EINA_VALUE_TYPE_DISPATCH_RETURN(type, setup, + EINA_ERROR_VALUE_FAILED, EINA_FALSE, mem); +} + +static inline void +eina_value_flush(Eina_Value *value) +{ + const Eina_Value_Type *type; + void *mem; + + EINA_VALUE_TYPE_CHECK_RETURN(value); + + type = value->type; + mem = eina_value_memory_get(value); + + if (EINA_VALUE_TYPE_DEFAULT(type)) + { + if (type == EINA_VALUE_TYPE_STRINGSHARE) + { + if (value->value.ptr) eina_stringshare_del((const char*) value->value.ptr); + } + else if (type == EINA_VALUE_TYPE_STRING) + { + if (value->value.ptr) free(value->value.ptr); + } + else if (type->value_size > 8) + eina_value_inner_free(type->value_size, mem); + eina_error_set(0); + return; + } + + EINA_VALUE_TYPE_DISPATCH(type, flush, EINA_ERROR_VALUE_FAILED, mem); + if (type->value_size > 8) + eina_value_inner_free(type->value_size, mem); + value->type = NULL; +} + +static inline int +eina_value_compare(const Eina_Value *a, const Eina_Value *b) +{ + const Eina_Value_Type *type; + void *pa, *pb; + + EINA_VALUE_TYPE_CHECK_RETURN_VAL(a, -1); + EINA_SAFETY_ON_NULL_RETURN_VAL(b, -1); + EINA_SAFETY_ON_FALSE_RETURN_VAL(a->type == b->type, -1); + + eina_error_set(0); + type = a->type; + pa = eina_value_memory_get(a); + pb = eina_value_memory_get(b); + +#ifndef EINA_VALUE_NO_OPTIMIZE + if (type == EINA_VALUE_TYPE_UCHAR) + { + unsigned char *ta = (unsigned char *) pa, *tb = (unsigned char *) pb; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; + } + else if (type == EINA_VALUE_TYPE_USHORT) + { + unsigned short *ta = (unsigned short *) pa, *tb = (unsigned short *) pb; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; + } + else if (type == EINA_VALUE_TYPE_UINT) + { + unsigned int *ta = (unsigned int *) pa, *tb = (unsigned int *) pb; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; + } + else if (type == EINA_VALUE_TYPE_ULONG) + { + unsigned long *ta = (unsigned long *) pa, *tb = (unsigned long *) pb; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; + } + else if (type == EINA_VALUE_TYPE_UINT64) + { + uint64_t *ta = (uint64_t *) pa, *tb = (uint64_t *) pb; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; + } + else if (type == EINA_VALUE_TYPE_CHAR) + { + char *ta = (char *) pa, *tb = (char *) pb; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; + } + else if (type == EINA_VALUE_TYPE_SHORT) + { + short *ta = (short *) pa, *tb = (short *) pb; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; + } + else if (type == EINA_VALUE_TYPE_INT) + { + int *ta = (int *) pa, *tb = (int *) pb; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; + } + else if (type == EINA_VALUE_TYPE_LONG) + { + long *ta = (long *) pa, *tb = (long *) pb; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; + } + else if (type == EINA_VALUE_TYPE_INT64) + { + int64_t *ta = (int64_t *) pa, *tb = (int64_t *) pb; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; + } + else if (type == EINA_VALUE_TYPE_FLOAT) + { + float *ta = (float *) pa, *tb = (float *) pb; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; + } + else if (type == EINA_VALUE_TYPE_DOUBLE) + { + double *ta = (double *) pa, *tb = (double *) pb; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; + } + else if (type == EINA_VALUE_TYPE_STRINGSHARE || + type == EINA_VALUE_TYPE_STRING) + { + const char *sa = *(const char **)pa; + const char *sb = *(const char **)pb; + if (sa == sb) + return 0; + if (sa == NULL) + return -1; + if (sb == NULL) + return 1; + return strcmp(sa, sb); + } +#endif + + EINA_VALUE_TYPE_DISPATCH_RETURN(type, compare, EINA_ERROR_VALUE_FAILED, + EINA_FALSE, pa, pb); +} + +static inline Eina_Bool +eina_value_set(Eina_Value *value, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, value); + ret = eina_value_vset(value, args); + va_end(args); + return ret; +} + +static inline Eina_Bool +eina_value_get(const Eina_Value *value, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, value); + ret = eina_value_vget(value, args); + va_end(args); + return ret; +} + +static inline Eina_Bool +eina_value_vset(Eina_Value *value, va_list args) +{ + const Eina_Value_Type *type; + void *mem; + + EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, EINA_FALSE); + + type = value->type; + mem = eina_value_memory_get(value); + eina_error_set(0); +#ifndef EINA_VALUE_NO_OPTIMIZE + if (type == EINA_VALUE_TYPE_UCHAR) + { + unsigned char *tmem = (unsigned char *) mem; + *tmem = va_arg(args, unsigned int); /* promoted by va_arg */ + return EINA_TRUE; + } + else if (type == EINA_VALUE_TYPE_USHORT) + { + unsigned short *tmem = (unsigned short *) mem; + *tmem = va_arg(args, unsigned int); /* promoted by va_arg */ + return EINA_TRUE; + } + else if (type == EINA_VALUE_TYPE_UINT) + { + unsigned int *tmem = (unsigned int *) mem; + *tmem = va_arg(args, unsigned int); + return EINA_TRUE; + } + else if (type == EINA_VALUE_TYPE_ULONG) + { + unsigned long *tmem = (unsigned long *) mem; + *tmem = va_arg(args, unsigned long); + return EINA_TRUE; + } + else if (type == EINA_VALUE_TYPE_UINT64) + { + uint64_t *tmem = (uint64_t *) mem; + *tmem = va_arg(args, uint64_t); + return EINA_TRUE; + } + else if (type == EINA_VALUE_TYPE_CHAR) + { + char *tmem = (char *) mem; + *tmem = va_arg(args, int); /* promoted by va_arg */ + return EINA_TRUE; + } + else if (type == EINA_VALUE_TYPE_SHORT) + { + short *tmem = (short *) mem; + *tmem = va_arg(args, int); /* promoted by va_arg */ + return EINA_TRUE; + } + else if (type == EINA_VALUE_TYPE_INT) + { + int *tmem = (int *) mem; + *tmem = va_arg(args, int); + return EINA_TRUE; + } + else if (type == EINA_VALUE_TYPE_LONG) + { + long *tmem = (long *) mem; + *tmem = va_arg(args, long); + return EINA_TRUE; + } + else if (type == EINA_VALUE_TYPE_INT64) + { + int64_t *tmem = (int64_t *) mem; + *tmem = va_arg(args, int64_t); + return EINA_TRUE; + } + else if (type == EINA_VALUE_TYPE_FLOAT) + { + float *tmem = (float *) mem; + *tmem = va_arg(args, double); /* promoted by va_arg */ + return EINA_TRUE; + } + else if (type == EINA_VALUE_TYPE_DOUBLE) + { + double *tmem = (double *) mem; + *tmem = va_arg(args, double); + return EINA_TRUE; + } + else if (type == EINA_VALUE_TYPE_STRINGSHARE) + { + const char *str = (const char *) va_arg(args, const char *); + return eina_stringshare_replace((const char **)&value->value.ptr, str); + } + else if (type == EINA_VALUE_TYPE_STRING) + { + const char *str = (const char *) va_arg(args, const char *); + free(value->value.ptr); + if (!str) + value->value.ptr = NULL; + else + { + value->value.ptr = strdup(str); + if (!value->value.ptr) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + } + return EINA_TRUE; + } +#endif + + EINA_VALUE_TYPE_DISPATCH_RETURN(value, vset, EINA_ERROR_VALUE_FAILED, + EINA_FALSE, mem, args); +} + +static inline Eina_Bool +eina_value_vget(const Eina_Value *value, va_list args) +{ + const Eina_Value_Type *type; + const void *mem; + void *ptr; + + EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, EINA_FALSE); + + type = value->type; + mem = eina_value_memory_get(value); + ptr = va_arg(args, void *); + eina_error_set(0); + if (EINA_VALUE_TYPE_DEFAULT(type)) + { + memcpy(ptr, mem, type->value_size); + return EINA_TRUE; + } + + EINA_VALUE_TYPE_DISPATCH_RETURN(value, pget, EINA_ERROR_VALUE_FAILED, + EINA_FALSE, mem, ptr); +} + +static inline Eina_Bool +eina_value_pset(Eina_Value *value, const void *ptr) +{ + const Eina_Value_Type *type; + void *mem; + + EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(ptr, EINA_FALSE); + + type = value->type; + mem = eina_value_memory_get(value); + eina_error_set(0); + + if (EINA_VALUE_TYPE_DEFAULT(type)) + { + if (type == EINA_VALUE_TYPE_STRINGSHARE) + { + const char * const *pstr = (const char * const *) ptr; + const char *str = *pstr; + + return eina_stringshare_replace((const char **)&value->value.ptr, + str); + } + else if (type == EINA_VALUE_TYPE_STRING) + { + const char * const * pstr = (const char * const *) ptr; + const char *str = *pstr; + + free(value->value.ptr); + if (!str) + value->value.ptr = NULL; + else + { + value->value.ptr = strdup(str); + if (!value->value.ptr) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + } + return EINA_TRUE; + } + else + memcpy(mem, ptr, type->value_size); + return EINA_TRUE; + } + + EINA_VALUE_TYPE_DISPATCH_RETURN(value, pset, EINA_ERROR_VALUE_FAILED, + EINA_FALSE, mem, ptr); +} + +static inline Eina_Bool +eina_value_pget(const Eina_Value *value, void *ptr) +{ + const Eina_Value_Type *type; + const void *mem; + + EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(ptr, EINA_FALSE); + + type = value->type; + mem = eina_value_memory_get(value); + eina_error_set(0); + if (EINA_VALUE_TYPE_DEFAULT(type)) + { + memcpy(ptr, mem, type->value_size); + return EINA_TRUE; + } + + EINA_VALUE_TYPE_DISPATCH_RETURN(value, pget, EINA_ERROR_VALUE_FAILED, + EINA_FALSE, mem, ptr); +} + +static inline const Eina_Value_Type * +eina_value_type_get(const Eina_Value *value) +{ + EINA_VALUE_TYPE_CHECK_RETURN_VAL(value, NULL); + return value->type; +} + +#define EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, retval) \ + EINA_SAFETY_ON_NULL_RETURN_VAL(value, retval); \ + EINA_SAFETY_ON_FALSE_RETURN_VAL(value->type == EINA_VALUE_TYPE_ARRAY, retval) + +static inline Eina_Bool +eina_value_array_setup(Eina_Value *value, const Eina_Value_Type *subtype, unsigned int step) +{ + Eina_Value_Array desc = { subtype, step, NULL }; + if (!eina_value_setup(value, EINA_VALUE_TYPE_ARRAY)) + return EINA_FALSE; + if (!eina_value_pset(value, &desc)) + { + eina_value_flush(value); + return EINA_FALSE; + } + return EINA_TRUE; +} + +static inline unsigned int +eina_value_array_count(const Eina_Value *value) +{ + Eina_Value_Array desc; + EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0); + if (!eina_value_pget(value, &desc)) + return 0; + return eina_inarray_count(desc.array); +} + +static inline Eina_Bool +eina_value_array_remove(Eina_Value *value, unsigned int position) +{ + Eina_Value_Array desc; + void *mem; + + EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0); + if (!eina_value_pget(value, &desc)) + return EINA_FALSE; + + mem = eina_inarray_nth(desc.array, position); + if (!mem) + return EINA_FALSE; + + eina_value_type_flush(desc.subtype, mem); + return eina_inarray_remove_at(desc.array, position); +} + +static inline Eina_Bool +eina_value_array_vset(Eina_Value *value, unsigned int position, va_list args) +{ + Eina_Value_Array desc; + void *mem; + + EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0); + if (!eina_value_pget(value, &desc)) + return EINA_FALSE; + + mem = eina_inarray_nth(desc.array, position); + if (!mem) + return EINA_FALSE; + + eina_value_type_flush(desc.subtype, mem); + + if (!eina_value_type_setup(desc.subtype, mem)) goto error_setup; + if (!eina_value_type_vset(desc.subtype, mem, args)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc.subtype, mem); + error_setup: + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_array_vget(const Eina_Value *value, unsigned int position, va_list args) +{ + Eina_Value_Array desc; + const void *mem; + void *ptr; + Eina_Bool ret; + + EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0); + if (!eina_value_pget(value, &desc)) + return EINA_FALSE; + + mem = eina_inarray_nth(desc.array, position); + if (!mem) + return EINA_FALSE; + + ptr = va_arg(args, void *); + ret = eina_value_type_pget(desc.subtype, mem, ptr); + return ret; +} + +static inline Eina_Bool +eina_value_array_vinsert(Eina_Value *value, unsigned int position, va_list args) +{ + Eina_Value_Array desc; + void *mem; + + EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0); + if (!eina_value_pget(value, &desc)) + return EINA_FALSE; + + mem = eina_inarray_alloc_at(desc.array, position, 1); + if (!mem) + return EINA_FALSE; + + if (!eina_value_type_setup(desc.subtype, mem)) goto error_setup; + if (!eina_value_type_vset(desc.subtype, mem, args)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc.subtype, mem); + error_setup: + eina_inarray_remove_at(desc.array, position); + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_array_vappend(Eina_Value *value, va_list args) +{ + Eina_Value_Array desc; + void *mem; + int position; + + EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0); + if (!eina_value_pget(value, &desc)) + return EINA_FALSE; + + position = eina_inarray_count(desc.array); + mem = eina_inarray_alloc_at(desc.array, position, 1); + if (!mem) + return EINA_FALSE; + + if (!eina_value_type_setup(desc.subtype, mem)) goto error_setup; + if (!eina_value_type_vset(desc.subtype, mem, args)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc.subtype, mem); + error_setup: + eina_inarray_remove_at(desc.array, position); + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_array_set(Eina_Value *value, unsigned int position, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, position); + ret = eina_value_array_vset(value, position, args); + va_end(args); + return ret; +} + +static inline Eina_Bool +eina_value_array_get(const Eina_Value *value, unsigned int position, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, position); + ret = eina_value_array_vget(value, position, args); + va_end(args); + return ret; +} + +static inline Eina_Bool +eina_value_array_insert(Eina_Value *value, unsigned int position, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, position); + ret = eina_value_array_vinsert(value, position, args); + va_end(args); + return ret; +} + +static inline Eina_Bool eina_value_array_append(Eina_Value *value, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, value); + ret = eina_value_array_vappend(value, args); + va_end(args); + return ret; +} + +static inline Eina_Bool +eina_value_array_pset(Eina_Value *value, unsigned int position, const void *ptr) +{ + Eina_Value_Array desc; + void *mem; + + EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0); + if (!eina_value_pget(value, &desc)) + return EINA_FALSE; + + mem = eina_inarray_nth(desc.array, position); + if (!mem) + return EINA_FALSE; + + eina_value_type_flush(desc.subtype, mem); + + if (!eina_value_type_setup(desc.subtype, mem)) goto error_setup; + if (!eina_value_type_pset(desc.subtype, mem, ptr)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc.subtype, mem); + error_setup: + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_array_pget(const Eina_Value *value, unsigned int position, void *ptr) +{ + Eina_Value_Array desc; + const void *mem; + Eina_Bool ret; + + EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0); + if (!eina_value_pget(value, &desc)) + return EINA_FALSE; + + mem = eina_inarray_nth(desc.array, position); + if (!mem) + return EINA_FALSE; + + ret = eina_value_type_pget(desc.subtype, mem, ptr); + return ret; +} + +static inline Eina_Bool +eina_value_array_pinsert(Eina_Value *value, unsigned int position, const void *ptr) +{ + Eina_Value_Array desc; + void *mem; + + EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0); + if (!eina_value_pget(value, &desc)) + return EINA_FALSE; + + mem = eina_inarray_alloc_at(desc.array, position, 1); + if (!mem) + return EINA_FALSE; + + if (!eina_value_type_setup(desc.subtype, mem)) goto error_setup; + if (!eina_value_type_pset(desc.subtype, mem, ptr)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc.subtype, mem); + error_setup: + eina_inarray_remove_at(desc.array, position); + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_array_pappend(Eina_Value *value, const void *ptr) +{ + Eina_Value_Array desc; + void *mem; + int position; + + EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL(value, 0); + if (!eina_value_pget(value, &desc)) + return EINA_FALSE; + + position = eina_inarray_count(desc.array); + mem = eina_inarray_alloc_at(desc.array, position, 1); + if (!mem) + return EINA_FALSE; + + if (!eina_value_type_setup(desc.subtype, mem)) goto error_setup; + if (!eina_value_type_pset(desc.subtype, mem, ptr)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc.subtype, mem); + error_setup: + eina_inarray_remove_at(desc.array, position); + return EINA_FALSE; +} + +#undef EINA_VALUE_TYPE_ARRAY_CHECK_RETURN_VAL + +#define EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, retval) \ + EINA_SAFETY_ON_NULL_RETURN_VAL(value, retval); \ + EINA_SAFETY_ON_FALSE_RETURN_VAL(value->type == EINA_VALUE_TYPE_LIST, retval) + +static inline void * +eina_value_list_node_memory_get(const Eina_Value_Type *type, const Eina_List *node) +{ + if (node == NULL) return NULL; + if (type->value_size <= sizeof(void*)) + return (void *)&(node->data); + return node->data; +} + +static inline void * +eina_value_list_node_memory_setup(const Eina_Value_Type *type, Eina_List *node) +{ + if (type->value_size <= sizeof(void*)) + return (void *)&(node->data); + node->data = malloc(type->value_size); + return node->data; +} + +static inline void +eina_value_list_node_memory_flush(const Eina_Value_Type *type, Eina_List *node) +{ + if (type->value_size <= sizeof(void*)) + return; + free(node->data); +} + +static inline Eina_Bool +eina_value_list_setup(Eina_Value *value, const Eina_Value_Type *subtype) +{ + Eina_Value_List desc = { subtype, NULL }; + if (!eina_value_setup(value, EINA_VALUE_TYPE_LIST)) + return EINA_FALSE; + if (!eina_value_pset(value, &desc)) + { + eina_value_flush(value); + return EINA_FALSE; + } + return EINA_TRUE; +} + +static inline unsigned int +eina_value_list_count(const Eina_Value *value) +{ + Eina_Value_List *desc; + EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0); + desc = (Eina_Value_List *)eina_value_memory_get(value); + if (!desc) + return 0; + return eina_list_count(desc->list); +} + +static inline Eina_Bool +eina_value_list_remove(Eina_Value *value, unsigned int position) +{ + Eina_Value_List *desc; + Eina_List *node; + void *mem; + + EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0); + desc = (Eina_Value_List *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + node = eina_list_nth_list(desc->list, position); + mem = eina_value_list_node_memory_get(desc->subtype, node); + if (!mem) + return EINA_FALSE; + + eina_value_type_flush(desc->subtype, mem); + eina_value_list_node_memory_flush(desc->subtype, node); + desc->list = eina_list_remove_list(desc->list, node); + return EINA_TRUE; +} + +static inline Eina_Bool +eina_value_list_vset(Eina_Value *value, unsigned int position, va_list args) +{ + Eina_Value_List *desc; + Eina_List *node; + void *mem; + + EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0); + desc = (Eina_Value_List *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + node = eina_list_nth_list(desc->list, position); + mem = eina_value_list_node_memory_get(desc->subtype, node); + if (!mem) + return EINA_FALSE; + + eina_value_type_flush(desc->subtype, mem); + + if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup; + if (!eina_value_type_vset(desc->subtype, mem, args)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc->subtype, mem); + error_setup: + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_list_vget(const Eina_Value *value, unsigned int position, va_list args) +{ + const Eina_Value_List *desc; + const Eina_List *node; + const void *mem; + void *ptr; + Eina_Bool ret; + + EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0); + desc = (const Eina_Value_List *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + node = eina_list_nth_list(desc->list, position); + mem = eina_value_list_node_memory_get(desc->subtype, node); + if (!mem) + return EINA_FALSE; + + ptr = va_arg(args, void *); + ret = eina_value_type_pget(desc->subtype, mem, ptr); + return ret; +} + +static inline Eina_Bool +eina_value_list_vinsert(Eina_Value *value, unsigned int position, va_list args) +{ + Eina_Value_List *desc; + Eina_List *node; + void *mem; + + EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0); + desc = (Eina_Value_List *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + if (!desc->list) + node = desc->list = eina_list_append(NULL, (void*)1L); + else if (position == 0) + node = desc->list = eina_list_prepend(desc->list, (void*)1L); + else + { + Eina_List *rel = eina_list_nth_list(desc->list, position - 1); + desc->list = eina_list_append_relative_list(desc->list, (void*)1L, rel); + node = rel->next; + } + EINA_SAFETY_ON_NULL_RETURN_VAL(node, EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(node->data == (void*)1L, EINA_FALSE); + + mem = eina_value_list_node_memory_setup(desc->subtype, node); + if (!mem) + { + desc->list = eina_list_remove_list(desc->list, node); + return EINA_FALSE; + } + + if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup; + if (!eina_value_type_vset(desc->subtype, mem, args)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc->subtype, mem); + error_setup: + eina_value_list_node_memory_flush(desc->subtype, node); + desc->list = eina_list_remove_list(desc->list, node); + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_list_vappend(Eina_Value *value, va_list args) +{ + Eina_Value_List *desc; + Eina_List *node; + void *mem; + + EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0); + desc = (Eina_Value_List *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + desc->list = eina_list_append(desc->list, (void*)1L); + node = eina_list_last(desc->list); + EINA_SAFETY_ON_NULL_RETURN_VAL(node, EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(node->data == (void*)1L, EINA_FALSE); + + mem = eina_value_list_node_memory_setup(desc->subtype, node); + if (!mem) + { + desc->list = eina_list_remove_list(desc->list, node); + return EINA_FALSE; + } + + if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup; + if (!eina_value_type_vset(desc->subtype, mem, args)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc->subtype, mem); + error_setup: + eina_value_list_node_memory_flush(desc->subtype, node); + desc->list = eina_list_remove_list(desc->list, node); + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_list_set(Eina_Value *value, unsigned int position, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, position); + ret = eina_value_list_vset(value, position, args); + va_end(args); + return ret; +} + +static inline Eina_Bool +eina_value_list_get(const Eina_Value *value, unsigned int position, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, position); + ret = eina_value_list_vget(value, position, args); + va_end(args); + return ret; +} + +static inline Eina_Bool +eina_value_list_insert(Eina_Value *value, unsigned int position, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, position); + ret = eina_value_list_vinsert(value, position, args); + va_end(args); + return ret; +} + +static inline Eina_Bool eina_value_list_append(Eina_Value *value, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, value); + ret = eina_value_list_vappend(value, args); + va_end(args); + return ret; +} + +static inline Eina_Bool +eina_value_list_pset(Eina_Value *value, unsigned int position, const void *ptr) +{ + Eina_Value_List *desc; + Eina_List *node; + void *mem; + + EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0); + desc = (Eina_Value_List *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + node = eina_list_nth_list(desc->list, position); + mem = eina_value_list_node_memory_get(desc->subtype, node); + if (!mem) + return EINA_FALSE; + + eina_value_type_flush(desc->subtype, mem); + + if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup; + if (!eina_value_type_pset(desc->subtype, mem, ptr)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc->subtype, mem); + error_setup: + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_list_pget(const Eina_Value *value, unsigned int position, void *ptr) +{ + const Eina_Value_List *desc; + const Eina_List *node; + const void *mem; + Eina_Bool ret; + + EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0); + desc = (const Eina_Value_List *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + node = eina_list_nth_list(desc->list, position); + mem = eina_value_list_node_memory_get(desc->subtype, node); + if (!mem) + return EINA_FALSE; + + ret = eina_value_type_pget(desc->subtype, mem, ptr); + return ret; +} + +static inline Eina_Bool +eina_value_list_pinsert(Eina_Value *value, unsigned int position, const void *ptr) +{ + Eina_Value_List *desc; + Eina_List *node; + void *mem; + + EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0); + desc = (Eina_Value_List *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + if (!desc->list) + node = desc->list = eina_list_append(NULL, (void*)1L); + else if (position == 0) + node = desc->list = eina_list_prepend(desc->list, (void*)1L); + else + { + Eina_List *rel = eina_list_nth_list(desc->list, position - 1); + desc->list = eina_list_append_relative_list(desc->list, (void*)1L, rel); + node = rel->next; + } + EINA_SAFETY_ON_NULL_RETURN_VAL(node, EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(node->data == (void*)1L, EINA_FALSE); + + mem = eina_value_list_node_memory_setup(desc->subtype, node); + if (!mem) + { + desc->list = eina_list_remove_list(desc->list, node); + return EINA_FALSE; + } + + if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup; + if (!eina_value_type_pset(desc->subtype, mem, ptr)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc->subtype, mem); + error_setup: + eina_value_list_node_memory_flush(desc->subtype, node); + desc->list = eina_list_remove_list(desc->list, node); + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_list_pappend(Eina_Value *value, const void *ptr) +{ + Eina_Value_List *desc; + Eina_List *node; + void *mem; + + EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL(value, 0); + desc = (Eina_Value_List *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + desc->list = eina_list_append(desc->list, (void*)1L); + node = eina_list_last(desc->list); + EINA_SAFETY_ON_NULL_RETURN_VAL(node, EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(node->data == (void*)1L, EINA_FALSE); + + mem = eina_value_list_node_memory_setup(desc->subtype, node); + if (!mem) + { + desc->list = eina_list_remove_list(desc->list, node); + return EINA_FALSE; + } + + if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup; + if (!eina_value_type_pset(desc->subtype, mem, ptr)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc->subtype, mem); + error_setup: + eina_value_list_node_memory_flush(desc->subtype, node); + desc->list = eina_list_remove_list(desc->list, node); + return EINA_FALSE; +} +#undef EINA_VALUE_TYPE_LIST_CHECK_RETURN_VAL + +#define EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, retval) \ + EINA_SAFETY_ON_NULL_RETURN_VAL(value, retval); \ + EINA_SAFETY_ON_FALSE_RETURN_VAL(value->type == EINA_VALUE_TYPE_HASH, retval) + +static inline Eina_Bool +eina_value_hash_setup(Eina_Value *value, const Eina_Value_Type *subtype, unsigned int buckets_power_size) +{ + Eina_Value_Hash desc = { subtype, buckets_power_size, NULL }; + if (!eina_value_setup(value, EINA_VALUE_TYPE_HASH)) + return EINA_FALSE; + if (!eina_value_pset(value, &desc)) + { + eina_value_flush(value); + return EINA_FALSE; + } + return EINA_TRUE; +} + +static inline unsigned int +eina_value_hash_population(const Eina_Value *value) +{ + Eina_Value_Hash *desc; + EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, 0); + desc = (Eina_Value_Hash *)eina_value_memory_get(value); + if (!desc) + return 0; + return eina_hash_population(desc->hash); +} + +static inline Eina_Bool +eina_value_hash_del(Eina_Value *value, const char *key) +{ + Eina_Value_Hash *desc; + void *mem; + + EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE); + desc = (Eina_Value_Hash *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + mem = eina_hash_find(desc->hash, key); + if (!mem) + return EINA_FALSE; + + eina_value_type_flush(desc->subtype, mem); + free(mem); + eina_hash_del_by_key(desc->hash, key); + return EINA_TRUE; +} + +static inline Eina_Bool +eina_value_hash_vset(Eina_Value *value, const char *key, va_list args) +{ + Eina_Value_Hash *desc; + void *mem; + + EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE); + desc = (Eina_Value_Hash *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + mem = eina_hash_find(desc->hash, key); + if (mem) + eina_value_type_flush(desc->subtype, mem); + else + { + mem = malloc(desc->subtype->value_size); + if (!mem) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + if (!eina_hash_add(desc->hash, key, mem)) + { + free(mem); + return EINA_FALSE; + } + } + + if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup; + if (!eina_value_type_vset(desc->subtype, mem, args)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc->subtype, mem); + error_setup: + eina_hash_del_by_key(desc->hash, key); + free(mem); + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_hash_vget(const Eina_Value *value, const char *key, va_list args) +{ + const Eina_Value_Hash *desc; + const void *mem; + void *ptr; + Eina_Bool ret; + + EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE); + desc = (const Eina_Value_Hash *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + mem = eina_hash_find(desc->hash, key); + if (!mem) + return EINA_FALSE; + + ptr = va_arg(args, void *); + ret = eina_value_type_pget(desc->subtype, mem, ptr); + return ret; +} + +static inline Eina_Bool +eina_value_hash_set(Eina_Value *value, const char *key, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, key); + ret = eina_value_hash_vset(value, key, args); + va_end(args); + return ret; +} + +static inline Eina_Bool +eina_value_hash_get(const Eina_Value *value, const char *key, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, key); + ret = eina_value_hash_vget(value, key, args); + va_end(args); + return ret; +} + +static inline Eina_Bool +eina_value_hash_pset(Eina_Value *value, const char *key, const void *ptr) +{ + Eina_Value_Hash *desc; + void *mem; + + EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE); + desc = (Eina_Value_Hash *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + mem = eina_hash_find(desc->hash, key); + if (mem) + eina_value_type_flush(desc->subtype, mem); + else + { + mem = malloc(desc->subtype->value_size); + if (!mem) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + if (!eina_hash_add(desc->hash, key, mem)) + { + free(mem); + return EINA_FALSE; + } + } + + if (!eina_value_type_setup(desc->subtype, mem)) goto error_setup; + if (!eina_value_type_pset(desc->subtype, mem, ptr)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(desc->subtype, mem); + error_setup: + eina_hash_del_by_key(desc->hash, key); + free(mem); + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_hash_pget(const Eina_Value *value, const char *key, void *ptr) +{ + const Eina_Value_Hash *desc; + const void *mem; + Eina_Bool ret; + + EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL(value, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE); + desc = (const Eina_Value_Hash *)eina_value_memory_get(value); + if (!desc) + return EINA_FALSE; + + mem = eina_hash_find(desc->hash, key); + if (!mem) + return EINA_FALSE; + + ret = eina_value_type_pget(desc->subtype, mem, ptr); + return ret; +} +#undef EINA_VALUE_TYPE_HASH_CHECK_RETURN_VAL + +#define EINA_VALUE_TYPE_STRUCT_CHECK_RETURN_VAL(value, retval) \ + EINA_SAFETY_ON_NULL_RETURN_VAL(value, retval); \ + EINA_SAFETY_ON_FALSE_RETURN_VAL(value->type == EINA_VALUE_TYPE_STRUCT, retval) + +/** + * @brief Find member of struct + * @since 1.2 + * @internal + */ +EAPI const Eina_Value_Struct_Member *eina_value_struct_member_find(const Eina_Value_Struct *st, const char *name) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT; + +static inline Eina_Bool +eina_value_struct_setup(Eina_Value *value, const Eina_Value_Struct_Desc *sdesc) +{ + Eina_Value_Struct desc = {sdesc, NULL}; + if (!eina_value_setup(value, EINA_VALUE_TYPE_STRUCT)) + return EINA_FALSE; + if (!eina_value_pset(value, &desc)) + { + eina_value_flush(value); + return EINA_FALSE; + } + return EINA_TRUE; +} + +static inline void * +eina_value_struct_member_memory_get(const Eina_Value_Struct *st, const Eina_Value_Struct_Member *member) +{ + unsigned char *base = (unsigned char *)st->memory; + if (!base) return NULL; + return base + member->offset; +} + +static inline Eina_Bool +eina_value_struct_vset(Eina_Value *value, const char *name, va_list args) +{ + const Eina_Value_Struct_Member *member; + Eina_Value_Struct *st; + void *mem; + + EINA_VALUE_TYPE_STRUCT_CHECK_RETURN_VAL(value, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE); + st = (Eina_Value_Struct *)eina_value_memory_get(value); + if (!st) + return EINA_FALSE; + member = eina_value_struct_member_find(st, name); + if (!member) + return EINA_FALSE; + mem = eina_value_struct_member_memory_get(st, member); + if (!mem) + return EINA_FALSE; + + eina_value_type_flush(member->type, mem); + if (!eina_value_type_setup(member->type, mem)) goto error_setup; + if (!eina_value_type_vset(member->type, mem, args)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(member->type, mem); + error_setup: + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_struct_vget(const Eina_Value *value, const char *name, va_list args) +{ + const Eina_Value_Struct_Member *member; + const Eina_Value_Struct *st; + const void *mem; + void *ptr; + Eina_Bool ret; + + EINA_VALUE_TYPE_STRUCT_CHECK_RETURN_VAL(value, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE); + st = (const Eina_Value_Struct *)eina_value_memory_get(value); + if (!st) + return EINA_FALSE; + member = eina_value_struct_member_find(st, name); + if (!member) + return EINA_FALSE; + mem = eina_value_struct_member_memory_get(st, member); + if (!mem) + return EINA_FALSE; + + ptr = va_arg(args, void *); + ret = eina_value_type_pget(member->type, mem, ptr); + return ret; +} + +static inline Eina_Bool +eina_value_struct_set(Eina_Value *value, const char *name, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, name); + ret = eina_value_struct_vset(value, name, args); + va_end(args); + return ret; +} + +static inline Eina_Bool +eina_value_struct_get(const Eina_Value *value, const char *name, ...) +{ + va_list args; + Eina_Bool ret; + va_start(args, name); + ret = eina_value_struct_vget(value, name, args); + va_end(args); + return ret; +} + +static inline Eina_Bool +eina_value_struct_pset(Eina_Value *value, const char *name, const void *ptr) +{ + const Eina_Value_Struct_Member *member; + Eina_Value_Struct *st; + void *mem; + + EINA_VALUE_TYPE_STRUCT_CHECK_RETURN_VAL(value, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE); + st = (Eina_Value_Struct *)eina_value_memory_get(value); + if (!st) + return EINA_FALSE; + member = eina_value_struct_member_find(st, name); + if (!member) + return EINA_FALSE; + mem = eina_value_struct_member_memory_get(st, member); + if (!mem) + return EINA_FALSE; + + eina_value_type_flush(member->type, mem); + if (!eina_value_type_setup(member->type, mem)) goto error_setup; + if (!eina_value_type_pset(member->type, mem, ptr)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(member->type, mem); + error_setup: + return EINA_FALSE; +} + +static inline Eina_Bool +eina_value_struct_pget(const Eina_Value *value, const char *name, void *ptr) +{ + const Eina_Value_Struct_Member *member; + const Eina_Value_Struct *st; + const void *mem; + Eina_Bool ret; + + EINA_VALUE_TYPE_STRUCT_CHECK_RETURN_VAL(value, 0); + EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE); + st = (const Eina_Value_Struct *)eina_value_memory_get(value); + if (!st) + return EINA_FALSE; + member = eina_value_struct_member_find(st, name); + if (!member) + return EINA_FALSE; + mem = eina_value_struct_member_memory_get(st, member); + if (!mem) + return EINA_FALSE; + + ret = eina_value_type_pget(member->type, mem, ptr); + return ret; +} +#undef EINA_VALUE_TYPE_STRUCT_CHECK_RETURN_VAL + + +static inline Eina_Bool +eina_value_type_setup(const Eina_Value_Type *type, void *mem) +{ + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); + if (!type->setup) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + return type->setup(type, mem); +} + +static inline Eina_Bool +eina_value_type_flush(const Eina_Value_Type *type, void *mem) +{ + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); + if (!type->flush) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + return type->flush(type, mem); +} + +static inline Eina_Bool +eina_value_type_copy(const Eina_Value_Type *type, const void *src, void *dst) +{ + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); + if (!type->copy) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + return type->copy(type, src, dst); +} + +static inline int +eina_value_type_compare(const Eina_Value_Type *type, const void *a, const void *b) +{ + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); + if (!type->compare) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + return type->compare(type, a, b); +} + +static inline Eina_Bool +eina_value_type_convert_to(const Eina_Value_Type *type, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); + if (!type->convert_to) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + return type->convert_to(type, convert, type_mem, convert_mem); +} + +static inline Eina_Bool +eina_value_type_convert_from(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem) +{ + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); + if (!type->convert_from) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + return type->convert_from(type, convert, type_mem, convert_mem); +} + +static inline Eina_Bool +eina_value_type_vset(const Eina_Value_Type *type, void *mem, va_list args) +{ + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); + if (!type->vset) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + return type->vset(type, mem, args); +} + +static inline Eina_Bool +eina_value_type_pset(const Eina_Value_Type *type, void *mem, const void *ptr) +{ + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); + if (!type->pset) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + return type->pset(type, mem, ptr); +} + +static inline Eina_Bool +eina_value_type_pget(const Eina_Value_Type *type, const void *mem, void *ptr) +{ + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), EINA_FALSE); + if (!type->pget) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + return type->pget(type, mem, ptr); +} + +#undef EINA_VALUE_TYPE_DEFAULT +#undef EINA_VALUE_TYPE_CHECK_RETURN +#undef EINA_VALUE_TYPE_CHECK_RETURN_VAL +#undef EINA_VALUE_TYPE_DISPATCH +#undef EINA_VALUE_TYPE_DISPATCH_RETURN +#endif diff --git a/libraries/eina/src/include/eina_inlist.h b/libraries/eina/src/include/eina_inlist.h index 1b3ab27..cfb3159 100644 --- a/libraries/eina/src/include/eina_inlist.h +++ b/libraries/eina/src/include/eina_inlist.h @@ -25,7 +25,7 @@ #include /** - * @page inlist_01_example_page Eina_Inlist basic usage + * @page eina_inlist_01_example_page Eina_Inlist basic usage * @dontinclude eina_inlist_01.c * * To see the full source for this example, click here: @ref @@ -111,7 +111,7 @@ */ /** - * @page inlist_02_example_page Eina_Inlist advanced usage - lists and inlists + * @page eina_inlist_02_example_page Eina_Inlist advanced usage - lists and inlists * @dontinclude eina_inlist_02.c * * This example describes the usage of @ref Eina_Inlist mixed with @ref @@ -120,7 +120,7 @@ * from this normal list. * * The struct that is going to be used is the same used in @ref - * inlist_01_example_page , since we still need the @ref EINA_INLIST macro to + * eina_inlist_01_example_page , since we still need the @ref EINA_INLIST macro to * declare the inlist node info: * * @skip struct @@ -184,7 +184,7 @@ */ /** - * @page inlist_03_example_page Eina_Inlist advanced usage - multi-inlists + * @page eina_inlist_03_example_page Eina_Inlist advanced usage - multi-inlists * @dontinclude eina_inlist_03.c * * This example describes the usage of multiple inlists storing the same data. @@ -315,7 +315,7 @@ * exactly what type this list is. * * A simple example demonstrating the basic usage of an inlist can be found - * here: @ref inlist_01_example_page + * here: @ref eina_inlist_01_example_page * * @section inlist_algo Algorithm * @@ -368,9 +368,9 @@ * @ref inlist_03_example_page * * List of examples: - * @li @ref inlist_01_example_page - * @li @ref inlist_02_example_page - * @li @ref inlist_03_example_page + * @li @ref eina_inlist_01_example_page + * @li @ref eina_inlist_02_example_page + * @li @ref eina_inlist_03_example_page */ /** @@ -428,17 +428,17 @@ struct _Eina_Inlist * Add a new node to end of a list. * * @note this code is meant to be fast: appends are O(1) and do not - * walk @a list. + * walk @a in_list. * - * @note @a new_l is considered to be in no list. If it was in another + * @note @a in_item is considered to be in no list. If it was in another * list before, eina_inlist_remove() it before adding. No * check of @a new_l prev and next pointers is done, so it's safe * to have them uninitialized. * - * @param list existing list head or NULL to create a new list. - * @param new_l new list node, must not be NULL. + * @param in_list existing list head or NULL to create a new list. + * @param in_item new list node, must not be NULL. * - * @return the new list head. Use it and not @a list anymore. + * @return the new list head. Use it and not @a in_list anymore. */ EAPI Eina_Inlist *eina_inlist_append(Eina_Inlist *in_list, Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; @@ -447,17 +447,17 @@ EAPI Eina_Inlist *eina_inlist_append(Eina_Inlist *in_list, * Add a new node to beginning of list. * * @note this code is meant to be fast: appends are O(1) and do not - * walk @a list. + * walk @a in_list. * * @note @a new_l is considered to be in no list. If it was in another * list before, eina_inlist_remove() it before adding. No * check of @a new_l prev and next pointers is done, so it's safe * to have them uninitialized. * - * @param list existing list head or NULL to create a new list. - * @param new_l new list node, must not be NULL. + * @param in_list existing list head or NULL to create a new list. + * @param in_item new list node, must not be NULL. * - * @return the new list head. Use it and not @a list anymore. + * @return the new list head. Use it and not @a in_list anymore. */ EAPI Eina_Inlist *eina_inlist_prepend(Eina_Inlist *in_list, Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; @@ -466,21 +466,21 @@ EAPI Eina_Inlist *eina_inlist_prepend(Eina_Inlist *in_list, * Add a new node after the given relative item in list. * * @note this code is meant to be fast: appends are O(1) and do not - * walk @a list. + * walk @a in_list. * - * @note @a new_l is considered to be in no list. If it was in another + * @note @a in_item_l is considered to be in no list. If it was in another * list before, eina_inlist_remove() it before adding. No - * check of @a new_l prev and next pointers is done, so it's safe + * check of @a in_item prev and next pointers is done, so it's safe * to have them uninitialized. * - * @note @a relative is considered to be inside @a list, no checks are + * @note @a in_relative is considered to be inside @a in_list, no checks are * done to confirm that and giving nodes from different lists - * will lead to problems. Giving NULL @a relative is the same as + * will lead to problems. Giving NULL @a in_relative is the same as * eina_list_append(). * - * @param list existing list head or NULL to create a new list. - * @param new_l new list node, must not be NULL. - * @param relative reference node, @a new_l will be added after it. + * @param in_list existing list head or NULL to create a new list. + * @param in_item new list node, must not be NULL. + * @param in_relative reference node, @a in_item will be added after it. * * @return the new list head. Use it and not @a list anymore. */ @@ -492,23 +492,23 @@ EAPI Eina_Inlist *eina_inlist_append_relative(Eina_Inlist *in_list, * Add a new node before the given relative item in list. * * @note this code is meant to be fast: appends are O(1) and do not - * walk @a list. + * walk @a in_list. * - * @note @a new_l is considered to be in no list. If it was in another + * @note @a in_item is considered to be in no list. If it was in another * list before, eina_inlist_remove() it before adding. No - * check of @a new_l prev and next pointers is done, so it's safe + * check of @a in_item prev and next pointers is done, so it's safe * to have them uninitialized. * - * @note @a relative is considered to be inside @a list, no checks are + * @note @a in_relative is considered to be inside @a in_list, no checks are * done to confirm that and giving nodes from different lists - * will lead to problems. Giving NULL @a relative is the same as + * will lead to problems. Giving NULL @a in_relative is the same as * eina_list_prepend(). * - * @param list existing list head or NULL to create a new list. - * @param new_l new list node, must not be NULL. - * @param relative reference node, @a new_l will be added before it. + * @param in_list existing list head or NULL to create a new list. + * @param in_item new list node, must not be NULL. + * @param in_relative reference node, @a in_item will be added before it. * - * @return the new list head. Use it and not @a list anymore. + * @return the new list head. Use it and not @a in_list anymore. */ EAPI Eina_Inlist *eina_inlist_prepend_relative(Eina_Inlist *in_list, Eina_Inlist *in_item, @@ -520,14 +520,14 @@ EAPI Eina_Inlist *eina_inlist_prepend_relative(Eina_Inlist *in_list, * @note this code is meant to be fast: appends are O(1) and do not * walk @a list. * - * @note @a item is considered to be inside @a list, no checks are + * @note @a in_item is considered to be inside @a in_list, no checks are * done to confirm that and giving nodes from different lists - * will lead to problems, especially if @a item is the head since + * will lead to problems, especially if @a in_item is the head since * it will be different from @a list and the wrong new head will * be returned. * - * @param list existing list head, must not be NULL. - * @param item existing list node, must not be NULL. + * @param in_list existing list head, must not be NULL. + * @param in_item existing list node, must not be NULL. * * @return the new list head. Use it and not @a list anymore. */ @@ -540,10 +540,10 @@ EAPI Eina_Inlist *eina_inlist_remove(Eina_Inlist *in_list, * @warning this is an expensive call and has O(n) cost, possibly * walking the whole list. * - * @param list existing list to search @a item in, must not be NULL. - * @param item what to search for, must not be NULL. + * @param in_list existing list to search @a in_item in, must not be NULL. + * @param in_item what to search for, must not be NULL. * - * @return @a item if found, NULL if not. + * @return @a in_item if found, NULL if not. */ EAPI Eina_Inlist *eina_inlist_find(Eina_Inlist *in_list, Eina_Inlist *in_item) EINA_ARG_NONNULL(2) EINA_WARN_UNUSED_RESULT; @@ -603,11 +603,11 @@ EAPI unsigned int eina_inlist_count(const Eina_Inlist *list) EINA_WARN_UNUSED_ /** * @brief Returns a new iterator associated to @a list. * - * @param list The list. + * @param in_list The list. * @return A new iterator. * * This function returns a newly allocated iterator associated to @p - * list. If @p list is @c NULL or the count member of @p list is less + * in_list. If @p in_list is @c NULL or the count member of @p in_list is less * or equal than 0, this function still returns a valid iterator that * will always return false on eina_iterator_next(), thus keeping API * sane. @@ -625,13 +625,13 @@ EAPI Eina_Iterator *eina_inlist_iterator_new(const Eina_Inlist *in_list) EINA_MA /** * @brief Returns a new accessor associated to a list. * - * @param list The list. + * @param in_list The list. * @return A new accessor. * * This function returns a newly allocated accessor associated to - * @p list. If @p list is @c NULL or the count member of @p list is - * less or equal than 0, this function returns NULL. If the memory can - * not be allocated, NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is + * @p in_list. If @p in_list is @c NULL or the count member of @p in_list is + * less or equal than 0, this function returns @c NULL. If the memory can + * not be allocated, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY is * set. Otherwise, a valid accessor is returned. */ EAPI Eina_Accessor *eina_inlist_accessor_new(const Eina_Inlist *in_list) EINA_MALLOC EINA_WARN_UNUSED_RESULT; @@ -728,13 +728,13 @@ EAPI Eina_Inlist *eina_inlist_sorted_state_insert(Eina_Inlist *list, /** * @brief Sort a list according to the ordering func will return. * - * @param list The list handle to sort. + * @param head The list handle to sort. * @param func A function pointer that can handle comparing the list data * nodes. * @return the new head of list. * - * This function sorts all the elements of @p list. @p func is used to - * compare two elements of @p list. If @p list or @p func are @c NULL, + * This function sorts all the elements of @p head. @p func is used to + * compare two elements of @p head. If @p head or @p func are @c NULL, * this function returns @c NULL. * * @note @b in-place: this will change the given list, so you should @@ -787,6 +787,7 @@ EAPI Eina_Inlist *eina_inlist_sort(Eina_Inlist *head, Eina_Compare_Cb func); _EINA_INLIST_OFFSET(ref)) #endif +/** Macro to iterate over an inlist */ #define EINA_INLIST_FOREACH(list, l) \ for (l = NULL, l = (list ? _EINA_INLIST_CONTAINER(l, list) : NULL); l; \ l = (EINA_INLIST_GET(l)->next ? _EINA_INLIST_CONTAINER(l, EINA_INLIST_GET(l)->next) : NULL)) diff --git a/libraries/eina/src/include/eina_iterator.h b/libraries/eina/src/include/eina_iterator.h index 1c8e6ce..10a9ece 100644 --- a/libraries/eina/src/include/eina_iterator.h +++ b/libraries/eina/src/include/eina_iterator.h @@ -25,7 +25,7 @@ #include "eina_magic.h" /** - * @page eina_iterator_example Eina_Iterator usage + * @page eina_iterator_example_page Eina_Iterator usage * @dontinclude eina_iterator_01.c * * As always when using eina we need to include it: @@ -48,7 +48,7 @@ * @until eina_init * * Next we populate both an array and a list with our strings, for more details - * see @ref eina_list_01_example and @ref eina_array_01_example: + * see @ref eina_list_01_example_page and @ref eina_array_01_example_page : * @until } * * And now we create an array and because the first element of the container @@ -63,7 +63,7 @@ * iterator itself: * @until eina_iterator_free * - * But so far you're not impressed in @ref eina_array_01_example an array is + * But so far you're not impressed in @ref eina_array_01_example_page an array is * also printed, so now we go to the cool stuff and use an iterator to do same * stuff to a list: * @until eina_iterator_free @@ -99,7 +99,7 @@ * eina_iterator_next(). To call a function on all the elements of a * container, use eina_iterator_foreach(). * - * Here an @ref eina_iterator_example "example" + * Here an @ref eina_iterator_example_page "example" */ /** diff --git a/libraries/eina/src/include/eina_list.h b/libraries/eina/src/include/eina_list.h index 8a8f25e..db65e17 100644 --- a/libraries/eina/src/include/eina_list.h +++ b/libraries/eina/src/include/eina_list.h @@ -29,7 +29,7 @@ #include "eina_magic.h" /** - * @page list_01_example_page Adding elements to Eina_List + * @page eina_list_01_example_page Adding elements to Eina_List * @dontinclude eina_list_01.c * * Creating an @ref Eina_List and adding elements to it is very easy and can be @@ -99,11 +99,11 @@ */ /** - * @page list_02_example_page Sorting Eina_List elements + * @page eina_list_02_example_page Sorting Eina_List elements * @dontinclude eina_list_02.c * * If you don't know how to create lists see - * @ref list_01_example_page. + * @ref eina_list_01_example_page. * * @skip #include * @until boomer @@ -151,11 +151,11 @@ */ /** - * @page list_03_example_page Reordering Eina_List elments + * @page eina_list_03_example_page Reordering Eina_List elments * @dontinclude eina_list_03.c * * If you don't know how to create lists see - * @ref list_01_example_page. + * @ref eina_list_01_example_page. * * We start out with code that should be familiar by now: * @skip #include @@ -197,12 +197,12 @@ */ /** - * @page list_04_example_page Eina_List and memory allocation + * @page eina_list_04_example_page Eina_List and memory allocation * @dontinclude eina_list_04.c * * If you don't know how to create lists see - * @ref list_01_example_page. In this example we also use - * @ref eina_stringshare, however it should be possible to understand the code + * @ref eina_list_01_example_page. In this example we also use + * @ref Eina_Stringshare_Group, however it should be possible to understand the code * regardless of previous knowledge about it. * * Here we have the usual list creation code with a twist, now we are using as @@ -276,10 +276,10 @@ * list as the list! * * Here are some examples of @ref Eina_List usage: - * @li @ref list_01_example_page - * @li @ref list_02_example_page - * @li @ref list_03_example_page - * @li @ref list_04_example_page + * @li @ref eina_list_01_example_page + * @li @ref eina_list_02_example_page + * @li @ref eina_list_03_example_page + * @li @ref eina_list_04_example_page */ /** @@ -582,7 +582,7 @@ EAPI Eina_List *eina_list_remove(Eina_List *list, const void *data) E /** - * @brief Remove the specified data. + * @brief Remove the specified list node. * * @param list The given linked list. * @param remove_list The list node which is to be removed. diff --git a/libraries/eina/src/include/eina_lock.h b/libraries/eina/src/include/eina_lock.h index 7c26dc0..16f4314 100644 --- a/libraries/eina/src/include/eina_lock.h +++ b/libraries/eina/src/include/eina_lock.h @@ -81,6 +81,10 @@ static inline void eina_tls_free(Eina_TLS key); static inline void *eina_tls_get(Eina_TLS key); static inline Eina_Bool eina_tls_set(Eina_TLS key, const void *data); +static inline Eina_Bool eina_semaphore_new(Eina_Semaphore *sem, int count_init); +static inline Eina_Bool eina_semaphore_free(Eina_Semaphore *sem); +static inline Eina_Bool eina_semaphore_lock(Eina_Semaphore *sem); +static inline Eina_Bool eina_semaphore_release(Eina_Semaphore *sem, int count_release); #ifdef EINA_HAVE_DEBUG_THREADS # define EINA_MAIN_LOOP_CHECK_RETURN_VAL(val) \ diff --git a/libraries/eina/src/include/eina_log.h b/libraries/eina/src/include/eina_log.h index 5cd7c59..186397d 100644 --- a/libraries/eina/src/include/eina_log.h +++ b/libraries/eina/src/include/eina_log.h @@ -21,6 +21,7 @@ #include #include +#include #include "eina_types.h" @@ -297,22 +298,27 @@ EAPI extern int EINA_LOG_DOMAIN_GLOBAL; * paths. Never define @c EINA_LOG_LEVEL_MAXIMUM on public * header files. */ -#ifdef EINA_LOG_LEVEL_MAXIMUM -#define EINA_LOG(DOM, LEVEL, fmt, ...) \ - do { \ - if (LEVEL <= EINA_LOG_LEVEL_MAXIMUM) { \ - eina_log_print(DOM, LEVEL, __FILE__, __FUNCTION__, __LINE__, \ - fmt, ## __VA_ARGS__); } \ - } while (0) -#else -#define EINA_LOG(DOM, LEVEL, fmt, ...) \ - eina_log_print(DOM, \ - LEVEL, \ - __FILE__, \ - __FUNCTION__, \ - __LINE__, \ - fmt, \ +#ifdef EINA_ENABLE_LOG +# ifdef EINA_LOG_LEVEL_MAXIMUM +# define EINA_LOG(DOM, LEVEL, fmt, ...) \ + do { \ + if (LEVEL <= EINA_LOG_LEVEL_MAXIMUM) { \ + eina_log_print(DOM, LEVEL, __FILE__, __FUNCTION__, __LINE__, \ + fmt, ## __VA_ARGS__); } \ + } while (0) +# else +# define EINA_LOG(DOM, LEVEL, fmt, ...) \ + eina_log_print(DOM, \ + LEVEL, \ + __FILE__, \ + __FUNCTION__, \ + __LINE__, \ + fmt, \ ## __VA_ARGS__) +# endif +#else +#define EINA_LOG(DOM, LEVEL, fmt, ...) \ + do { (void) DOM; (void) LEVEL; (void) fmt; } while (0) #endif /** @@ -726,7 +732,7 @@ EAPI void eina_log_domain_unregister(int domain); * specified value (eina_log_level_set() or environment * variables EINA_LOG_LEVEL, EINA_LOG_LEVELS) will be ignored. * @param file filename that originated the call, must @b not be @c NULL. - * @param fnc function that originated the call, must @b not be @c NULL. + * @param function function that originated the call, must @b not be @c NULL. * @param line originating line in @a file. * @param fmt printf-like format to use. Should not provide trailing * '\n' as it is automatically included. @@ -780,7 +786,7 @@ EAPI void eina_log_vprint(int domain, */ /** - * Alternative logging method, this will output to standard output stream. + * @brief Alternative logging method, this will output to standard output stream. * * @param d The domain. * @param level The level. @@ -815,7 +821,16 @@ EAPI void eina_log_print_cb_stdout(const Eina_Log_Domain *d, va_list args); /** - * Default logging method, this will output to standard error stream. + * @brief Default logging method, this will output to standard error stream. + * + * @param d The domain. + * @param level The level. + * @param file The file which is logged. + * @param fnc The function which is logged. + * @param line The line which is logged. + * @param fmt The ouptut format to use. + * @param data Not used. + * @param args The arguments needed by the format. * * This method will colorize output based on domain provided color and * message logging level. diff --git a/libraries/eina/src/include/eina_magic.h b/libraries/eina/src/include/eina_magic.h index 44cd4e9..d4909d8 100644 --- a/libraries/eina/src/include/eina_magic.h +++ b/libraries/eina/src/include/eina_magic.h @@ -21,6 +21,7 @@ #include "eina_config.h" #include "eina_types.h" +#include "eina_error.h" /** * @page eina_magic_example_01_page @@ -200,6 +201,13 @@ EAPI Eina_Bool eina_magic_string_static_set(Eina_Magic magic, */ #define EINA_MAGIC_NONE 0x1234fedc +/** + * @var EINA_ERROR_MAGIC_FAILED + * Error identifier corresponding to magic check failure. + */ +EAPI extern Eina_Error EINA_ERROR_MAGIC_FAILED; + + #ifdef EINA_MAGIC_DEBUG /** diff --git a/libraries/eina/src/include/eina_main.h b/libraries/eina/src/include/eina_main.h index fa34d59..4baf40e 100644 --- a/libraries/eina/src/include/eina_main.h +++ b/libraries/eina/src/include/eina_main.h @@ -50,7 +50,7 @@ * @def EINA_VERSION_MINOR * @brief Minor version of Eina */ -#define EINA_VERSION_MINOR 0 +#define EINA_VERSION_MINOR 2 /** * @typedef Eina_Version @@ -134,6 +134,9 @@ EAPI int eina_threads_shutdown(void); /** * @brief Check if you are calling this function from the same thread Eina was initialized or not + * + * @return #EINA_TRUE is the calling function is the same thread, #EINA_FALSE otherwise. + * * @since 1.1.0 * * Most EFL function are not thread safe and all the call need to happen in diff --git a/libraries/eina/src/include/eina_module.h b/libraries/eina/src/include/eina_module.h index 58e38f9..178fa9a 100644 --- a/libraries/eina/src/include/eina_module.h +++ b/libraries/eina/src/include/eina_module.h @@ -67,6 +67,10 @@ */ typedef struct _Eina_Module Eina_Module; +/** + * @typedef Eina_Module_Cb + * Dynamic module loader callback. + */ typedef Eina_Bool (*Eina_Module_Cb)(Eina_Module *m, void *data); /** @@ -135,21 +139,21 @@ EAPI Eina_Module * /** * @brief Delete a module. * - * @param m The module to delete. + * @param module The module to delete. * @return EINA_TRUE on success, EINA_FALSE otherwise. * - * This function calls eina_module_unload() if @p m has been previously + * This function calls eina_module_unload() if @p module has been previously * loaded and frees the allocated memory. On success this function - * returns EINA_TRUE and EINA_FALSE otherwise. If @p m is @c NULL, the + * returns EINA_TRUE and EINA_FALSE otherwise. If @p module is @c NULL, the * function returns immediately. */ EAPI Eina_Bool - eina_module_free(Eina_Module *m) EINA_ARG_NONNULL(1); + eina_module_free(Eina_Module *module) EINA_ARG_NONNULL(1); /** * @brief Load a module. * - * @param m The module to load. + * @param module The module to load. * @return EINA_TRUE on success, EINA_FALSE otherwise. * * This function load the shared file object passed in @@ -160,7 +164,7 @@ EAPI Eina_Bool * module can not be initialized, the error * #EINA_ERROR_MODULE_INIT_FAILED is set and #EINA_FALSE is * returned. If the module has already been loaded, it's refeence - * counter is increased by one and #EINA_TRUE is returned. If @p m is + * counter is increased by one and #EINA_TRUE is returned. If @p module is * @c NULL, the function returns immediately #EINA_FALSE. * * When the symbols of the shared file objetcts are not needed @@ -172,29 +176,29 @@ EAPI Eina_Bool /** * @brief Unload a module. * - * @param m The module to load. + * @param module The module to load. * @return EINA_TRUE on success, EINA_FALSE otherwise. * - * This function unload the module @p m that has been previously - * loaded by eina_module_load(). If the reference counter of @p m is + * This function unload the module @p module that has been previously + * loaded by eina_module_load(). If the reference counter of @p module is * strictly greater than @c 1, #EINA_FALSE is returned. Otherwise, the * shared object file is closed and if it is a internal Eina module, it * is shutted down just before. In that case, #EINA_TRUE is - * returned. In all case, the reference counter is decreased. If @p m + * returned. In all case, the reference counter is decreased. If @p module * is @c NULL, the function returns immediately #EINA_FALSE. */ EAPI Eina_Bool - eina_module_unload(Eina_Module *m) EINA_ARG_NONNULL(1); + eina_module_unload(Eina_Module *module) EINA_ARG_NONNULL(1); /** * @brief Retrive the data associated to a symbol. * - * @param m The module. + * @param module The module. * @param symbol The symbol. * @return The data associated to the symbol, or @c NULL on failure. * - * This function returns the data associated to @p symbol of @p m. @p - * m must have been loaded before with eina_module_load(). If @p m + * This function returns the data associated to @p symbol of @p module. @p + * module must have been loaded before with eina_module_load(). If @p module * is @c NULL, or if it has not been correctly loaded before, the * function returns immediately @c NULL. */ @@ -204,15 +208,15 @@ EAPI void * /** * @brief Return the file name associated to the module. * - * @param m The module. + * @param module The module. * @return The file name. * * This function returns the file name passed in eina_module_new(). If - * @p m is @c NULL, the function returns immediately @c NULL. The + * @p module is @c NULL, the function returns immediately @c NULL. The * returned value must no be freed. */ EAPI const char * - eina_module_file_get(const Eina_Module *m) EINA_PURE EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + eina_module_file_get(const Eina_Module *module) EINA_PURE EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -256,6 +260,7 @@ EAPI char * * @param array The array that stores the list of the modules. * @param path The directory's path to search for modules. * @param arch The architecture string. + * @return The array of modules found in @p path matching @p arch. * * This function adds to @p array the module names found in @p path * which match the cpu architecture @p arch. If @p path or @p arch is @@ -273,6 +278,7 @@ EAPI Eina_Array * * @param recursive Iterate recursively on the path. * @param cb Callback function to call on each module. * @param data Data passed to the callback function. + * @return The array of modules found in @p path. * * This function adds to @p array the list of modules found in * @p path. If @p recursive is #EINA_TRUE, then recursive search is @@ -295,7 +301,7 @@ EAPI Eina_Array * * @p array. If @p array is @c NULL, this function does nothing. */ EAPI void - eina_module_list_load(Eina_Array *list) EINA_ARG_NONNULL(1); + eina_module_list_load(Eina_Array *array) EINA_ARG_NONNULL(1); /** * @brief Unload every module on the list of modules. @@ -306,7 +312,7 @@ EAPI void * @p array. If @p array is @c NULL, this function does nothing. */ EAPI void - eina_module_list_unload(Eina_Array *list) EINA_ARG_NONNULL(1); + eina_module_list_unload(Eina_Array *array) EINA_ARG_NONNULL(1); /** * @p Free every module on the list of modules. @@ -317,13 +323,14 @@ EAPI void * @p array. If @p array is @c NULL, this function does nothing. */ EAPI void - eina_module_list_free(Eina_Array *list) EINA_ARG_NONNULL(1); + eina_module_list_free(Eina_Array *array) EINA_ARG_NONNULL(1); /** * @brief Find an module in array. * * @param array The array to find the module. * @param module The name of module to be searched. + * @return The module to find on success, @c NULL otherwise. * * This function finds an @p module in @p array. * If the element is found the function returns the module, else diff --git a/libraries/eina/src/include/eina_simple_xml_parser.h b/libraries/eina/src/include/eina_simple_xml_parser.h index db9a4e1..78660ef 100644 --- a/libraries/eina/src/include/eina_simple_xml_parser.h +++ b/libraries/eina/src/include/eina_simple_xml_parser.h @@ -119,16 +119,16 @@ struct _Eina_Simple_XML_Node_Data typedef enum _Eina_Simple_XML_Type { - EINA_SIMPLE_XML_OPEN = 0, /* */ - EINA_SIMPLE_XML_OPEN_EMPTY, /* */ - EINA_SIMPLE_XML_CLOSE, /* */ - EINA_SIMPLE_XML_DATA, /* tag text data */ - EINA_SIMPLE_XML_CDATA, /* */ - EINA_SIMPLE_XML_ERROR, /* error contents */ - EINA_SIMPLE_XML_PROCESSING, /* */ - EINA_SIMPLE_XML_DOCTYPE, /* */ - EINA_SIMPLE_XML_IGNORED /* whatever is ignored by parser, like whitespace */ + EINA_SIMPLE_XML_OPEN = 0, /*!< */ + EINA_SIMPLE_XML_OPEN_EMPTY, /*!< */ + EINA_SIMPLE_XML_CLOSE, /*!< */ + EINA_SIMPLE_XML_DATA, /*!< tag text data */ + EINA_SIMPLE_XML_CDATA, /*!< */ + EINA_SIMPLE_XML_ERROR, /*!< error contents */ + EINA_SIMPLE_XML_PROCESSING, /*!< */ + EINA_SIMPLE_XML_DOCTYPE, /*!< */ + EINA_SIMPLE_XML_IGNORED /*!< whatever is ignored by parser, like whitespace */ } Eina_Simple_XML_Type; typedef Eina_Bool (*Eina_Simple_XML_Cb)(void *data, Eina_Simple_XML_Type type, const char *content, unsigned offset, unsigned length); @@ -137,7 +137,7 @@ typedef Eina_Bool (*Eina_Simple_XML_Attribute_Cb)(void *data, const char *key, c /** * Parse a section of XML string text - * + * * @param buf the input string. May not contain \0 terminator. * @param buflen the input string size. * @param strip whenever this parser should strip leading and trailing @@ -164,12 +164,15 @@ EAPI Eina_Bool eina_simple_xml_parse(const char *buf, unsigned buflen, /** * Given the contents of a tag, find where the attributes start. * - * The tag contents is returned by eina_simple_xml_parse() when - * type is #EINA_SIMPLE_XML_OPEN or #EINA_SIMPLE_XML_OPEN_EMPTY. - * + * @param buf the input string. May not contain \0 terminator. + * @param buflen the input string size. * @return pointer to the start of attributes, it can be used * to feed eina_simple_xml_attributes_parse(). NULL is returned * if no attributes were found. + * + * The tag contents is returned by eina_simple_xml_parse() when + * type is #EINA_SIMPLE_XML_OPEN or #EINA_SIMPLE_XML_OPEN_EMPTY. + * */ EAPI const char * eina_simple_xml_tag_attributes_find(const char *buf, unsigned buflen); @@ -183,6 +186,7 @@ EAPI const char * eina_simple_xml_tag_attributes_find(const char *buf, unsigned * key (null-terminated) and the last is the value (null * terminated). These strings should not be modified and * reference is just valid until the function return. + * @param data data to pass to the callback function. * * @return EINA_TRUE on success or EINA_FALSE if it was aborted by user or * parsing error. @@ -238,8 +242,8 @@ EAPI void eina_simple_xml_node_tag_free(Eina_Simple_XML_Node_Tag *tag); * * @param parent if provided, will be set in the resulting structure * as well as the data will be appended to children list. - * @param content string to be used. Must not be NULL. - * @param length size in bytes of @a content. + * @param contents string to be used. Must not be NULL. + * @param length size in bytes of @a contents. * * @return newly allocated memory or NULL on error. This memory should be * released with eina_simple_xml_node_data_free() or indirectly @@ -250,7 +254,7 @@ EAPI Eina_Simple_XML_Node_Data * eina_simple_xml_node_data_new(Eina_Simple_XML_N /** * Remove data from parent and delete it. * - * @param data to release memory. + * @param node to release memory. */ EAPI void eina_simple_xml_node_data_free(Eina_Simple_XML_Node_Data *node); @@ -260,7 +264,7 @@ EAPI void eina_simple_xml_node_data_free(Eina_Simple_XML_Node_Data *node); * * @param parent if provided, will be set in the resulting structure * as well as the cdata will be appended to children list. - * @param content string to be used. Must not be NULL. + * @param contents string to be used. Must not be NULL. * @param length size in bytes of @a content. * * @return newly allocated memory or NULL on error. This memory should be @@ -272,7 +276,7 @@ EAPI Eina_Simple_XML_Node_CData * eina_simple_xml_node_cdata_new(Eina_Simple_XML /** * Remove cdata from parent and delete it. * - * @param cdata to release memory. + * @param node to release memory. */ EAPI void eina_simple_xml_node_cdata_free(Eina_Simple_XML_Node_Data *node); @@ -282,8 +286,8 @@ EAPI void eina_simple_xml_node_cdata_free(Eina_Simple_XML_Node_Data *node); * * @param parent if provided, will be set in the resulting structure * as well as the processing will be appended to children list. - * @param content string to be used. Must not be NULL. - * @param length size in bytes of @a content. + * @param contents string to be used. Must not be NULL. + * @param length size in bytes of @a contents. * * @return newly allocated memory or NULL on error. This memory should be * released with eina_simple_xml_node_processing_free() or indirectly @@ -294,7 +298,7 @@ EAPI Eina_Simple_XML_Node_Processing * eina_simple_xml_node_processing_new(Eina_ /** * Remove processing from parent and delete it. * - * @param processing to release memory. + * @param node processing to release memory. */ EAPI void eina_simple_xml_node_processing_free(Eina_Simple_XML_Node_Data *node); @@ -304,8 +308,8 @@ EAPI void eina_simple_xml_node_processing_free(Eina_Simple_XML_Node_Data *node); * * @param parent if provided, will be set in the resulting structure * as well as the doctype will be appended to children list. - * @param content string to be used. Must not be NULL. - * @param length size in bytes of @a content. + * @param contents string to be used. Must not be NULL. + * @param length size in bytes of @a contents. * * @return newly allocated memory or NULL on error. This memory should be * released with eina_simple_xml_node_doctype_free() or indirectly @@ -316,7 +320,7 @@ EAPI Eina_Simple_XML_Node_Doctype * eina_simple_xml_node_doctype_new(Eina_Simple /** * Remove doctype from parent and delete it. * - * @param doctype to release memory. + * @param node doctype to release memory. */ EAPI void eina_simple_xml_node_doctype_free(Eina_Simple_XML_Node_Data *node); @@ -326,8 +330,8 @@ EAPI void eina_simple_xml_node_doctype_free(Eina_Simple_XML_Node_Data *node); * * @param parent if provided, will be set in the resulting structure * as well as the comment will be appended to children list. - * @param content string to be used. Must not be NULL. - * @param length size in bytes of @a content. + * @param contents string to be used. Must not be NULL. + * @param length size in bytes of @a contents. * * @return newly allocated memory or NULL on error. This memory should be * released with eina_simple_xml_node_comment_free() or indirectly @@ -338,7 +342,7 @@ EAPI Eina_Simple_XML_Node_Comment * eina_simple_xml_node_comment_new(Eina_Simple /** * Remove comment from parent and delete it. * - * @param comment to release memory. + * @param node comment to release memory. */ EAPI void eina_simple_xml_node_comment_free(Eina_Simple_XML_Node_Data *node); @@ -370,7 +374,7 @@ EAPI void eina_simple_xml_node_root_free(Eina_Simple_XML_Node_Root *root); * @param node the base node to convert. * @param indent indentation string, or NULL to disable it. * - * @param NULL on errors or a newly allocated string on success. + * @return NULL on errors or a newly allocated string on success. */ EAPI char * eina_simple_xml_node_dump(Eina_Simple_XML_Node *node, const char *indent); diff --git a/libraries/eina/src/include/eina_str.h b/libraries/eina/src/include/eina_str.h index 8b52ab2..2913fbf 100644 --- a/libraries/eina/src/include/eina_str.h +++ b/libraries/eina/src/include/eina_str.h @@ -161,14 +161,14 @@ EAPI Eina_Bool eina_str_has_extension(const char *str, const char *ext) EI /** * @brief Split a string using a delimiter. * - * @param str The string to split. - * @param delim The string which specifies the places at which to split the string. + * @param string The string to split. + * @param delimiter The string which specifies the places at which to split the string. * @param max_tokens The maximum number of strings to split string into. * @return A newly-allocated NULL-terminated array of strings or NULL if it * fails to allocate the array. * - * This functin splits @p str into a maximum of @p max_tokens pieces, - * using the given delimiter @p delim. @p delim is not included in any + * This functin splits @p string into a maximum of @p max_tokens pieces, + * using the given delimiter @p delimiter. @p delimiter is not included in any * of the resulting strings, unless @p max_tokens is reached. If * @p max_tokens is less than @c 1, the string is splitted completely. If * @p max_tokens is reached, the last string in the returned string @@ -185,16 +185,16 @@ EAPI char **eina_str_split(const char *string, const char *delimiter, i /** * @brief Split a string using a delimiter and returns number of elements. * - * @param str The string to split. - * @param delim The string which specifies the places at which to split the string. + * @param string The string to split. + * @param delimiter The string which specifies the places at which to split the string. * @param max_tokens The maximum number of strings to split string into. * @param elements Where to return the number of elements in returned * array (not counting the terminating @c NULL). May be @c NULL. * @return A newly-allocated NULL-terminated array of strings or NULL if it * fails to allocate the array. * - * This functin splits @p str into a maximum of @p max_tokens pieces, - * using the given delimiter @p delim. @p delim is not included in any + * This function splits @p string into a maximum of @p max_tokens pieces, + * using the given delimiter @p delimiter. @p delimiter is not included in any * of the resulting strings, unless @p max_tokens is reached. If * @p max_tokens is less than @c 1, the string is splitted completely. If * @p max_tokens is reached, the last string in the returned string diff --git a/libraries/eina/src/include/eina_strbuf.h b/libraries/eina/src/include/eina_strbuf.h index 7043575..34c200f 100644 --- a/libraries/eina/src/include/eina_strbuf.h +++ b/libraries/eina/src/include/eina_strbuf.h @@ -99,6 +99,24 @@ EAPI Eina_Strbuf *eina_strbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; EAPI Eina_Strbuf *eina_strbuf_manage_new(char *str) EINA_MALLOC EINA_WARN_UNUSED_RESULT; /** + * @brief Create a new string buffer using the passed string. The passed + * string is used directly as the buffer, it's somehow the opposite function of + * @ref eina_strbuf_string_steal . The passed string must be malloced. + * + * @param str the string to manage + * @param length the length of the string. + * @return Newly allocated string buffer instance. + * + * This function creates a new string buffer. On error, @c NULL is + * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To + * free the resources, use eina_strbuf_free(). + * + * @see eina_strbuf_manage_new() + * @since 1.2.0 + */ +EAPI Eina_Strbuf *eina_strbuf_manage_new_length(char *str, size_t length) EINA_MALLOC EINA_WARN_UNUSED_RESULT; + +/** * @brief Free a string buffer. * * @param buf The string buffer to free. diff --git a/libraries/eina/src/include/eina_stringshare.h b/libraries/eina/src/include/eina_stringshare.h index af58add..862b2b2 100644 --- a/libraries/eina/src/include/eina_stringshare.h +++ b/libraries/eina/src/include/eina_stringshare.h @@ -289,6 +289,7 @@ EAPI void eina_stringshare_del(const char *str); * * @param str the shared string to know the length. It is safe to * give NULL, in that case -1 is returned. + * @return The length of a shared string. * * This function is a cheap way to known the length of a shared * string. Note that if the given pointer is not shared, bad diff --git a/libraries/eina/src/include/eina_types.h b/libraries/eina/src/include/eina_types.h index 8c77cdf..1653949 100644 --- a/libraries/eina/src/include/eina_types.h +++ b/libraries/eina/src/include/eina_types.h @@ -251,6 +251,10 @@ typedef int (*Eina_Compare_Cb)(const void *data1, const void *data2); */ #define EINA_COMPARE_CB(function) ((Eina_Compare_Cb)function) +/** + * @typedef Eina_Each_Cb + * A callback type used when iterating over a container. + */ typedef Eina_Bool (*Eina_Each_Cb)(const void *container, void *data, void *fdata); /** diff --git a/libraries/eina/src/include/eina_unicode.h b/libraries/eina/src/include/eina_unicode.h index aed59af..2bbfe45 100644 --- a/libraries/eina/src/include/eina_unicode.h +++ b/libraries/eina/src/include/eina_unicode.h @@ -68,7 +68,16 @@ EAPI Eina_Unicode *eina_unicode_strdup(const Eina_Unicode *text) EINA_WARN_UNUSE /** - * @brief Same as strdup but cuts on n. Assumes n < len + * @brief Same as strdup but cuts on the given size. Assumes n < len + * + * @param text The text to duplicate. + * @param n The maximum size of the text to duplicate. + * @return The duplicated string. + * + * This function duplicates @p text. The resuting string is cut on @p + * n. @p n is assumed to be lesser (<) than the length of @p + * text. When not needed anymore, the returned string must be freed. + * * @since 1.1.0 */ EAPI Eina_Unicode *eina_unicode_strndup(const Eina_Unicode *text, size_t n) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; @@ -107,9 +116,9 @@ EAPI Eina_Unicode *eina_unicode_escape(const Eina_Unicode *str) EINA_ARG_NONNULL /** - * Reads UTF8 bytes from @buf, starting at *@index and returns - * the decoded code point at iindex offset, and advances iindex - * to the next code point after this. iindex is always advanced, + * Reads UTF8 bytes from @p buf, starting at @p iindex and returns + * the decoded code point at @p iindex offset, and advances @p iindex + * to the next code point after this. @p iindex is always advanced, * unless if the advancement is after the NULL. * On error: return a codepoint between DC80 to DCFF where the low 8 bits * are the byte's value. @@ -122,9 +131,9 @@ EAPI Eina_Unicode *eina_unicode_escape(const Eina_Unicode *str) EINA_ARG_NONNULL EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex) EINA_ARG_NONNULL(1, 2); /** - * Reads UTF8 bytes from @buf, starting at *@iindex and returns - * the decoded code point at iindex offset, and moves iindex - * to the previous code point. iindex is always moved, as long + * Reads UTF8 bytes from @p buf, starting at @p iindex and returns + * the decoded code point at @p iindex offset, and moves àp iindex + * to the previous code point. @p iindex is always moved, as long * as it's not past the start of the string. * On error: return a codepoint between DC80 to DCFF where the low 8 bits * are the byte's value. diff --git a/libraries/eina/src/include/eina_ustrbuf.h b/libraries/eina/src/include/eina_ustrbuf.h index f68cb7b..9710c42 100644 --- a/libraries/eina/src/include/eina_ustrbuf.h +++ b/libraries/eina/src/include/eina_ustrbuf.h @@ -65,7 +65,25 @@ EAPI Eina_UStrbuf *eina_ustrbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; * @see eina_ustrbuf_string_get() * @since 1.1.0 */ -EAPI Eina_Strbuf *eina_ustrbuf_manage_new(Eina_Unicode *str) EINA_MALLOC EINA_WARN_UNUSED_RESULT; +EAPI Eina_UStrbuf *eina_ustrbuf_manage_new(Eina_Unicode *str) EINA_MALLOC EINA_WARN_UNUSED_RESULT; + +/** + * @brief Create a new string buffer using the passed string. The passed + * string is used directly as the buffer, it's somehow the opposite function of + * @ref eina_ustrbuf_string_steal . The passed string must be malloced. + * + * @param str the string to manage + * @param length the length of the string. + * @return Newly allocated string buffer instance. + * + * This function creates a new string buffer. On error, @c NULL is + * returned and Eina error is set to #EINA_ERROR_OUT_OF_MEMORY. To + * free the resources, use eina_ustrbuf_free(). + * + * @see eina_ustrbuf_manage_new() + * @since 1.2.0 + */ +EAPI Eina_UStrbuf *eina_ustrbuf_manage_new_length(Eina_Unicode *str, size_t length) EINA_MALLOC EINA_WARN_UNUSED_RESULT; /** * @brief Free a string buffer. diff --git a/libraries/eina/src/include/eina_value.h b/libraries/eina/src/include/eina_value.h new file mode 100644 index 0000000..846c4ef --- /dev/null +++ b/libraries/eina/src/include/eina_value.h @@ -0,0 +1,3114 @@ +/* EINA - EFL data type library + * Copyright (C) 2012 ProFUSION embedded systems + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; + * if not, see . + */ + +#ifndef EINA_VALUE_H_ +#define EINA_VALUE_H_ + +#include "eina_types.h" +#include "eina_fp.h" /* defines int64_t and uint64_t */ +#include "eina_inarray.h" +#include "eina_list.h" +#include "eina_hash.h" +#include + +/** + * @addtogroup Eina_Data_Types_Group Data Types + * + * @since 1.2 + * + * @{ + */ + +/** + * @addtogroup Eina_Containers_Group Containers + * + * @{ + */ + +/** + * @defgroup Eina_Value_Group Generic Value Storage + * + * @{ + */ + + +/** + * @typedef Eina_Value + * Store generic values. + * + * @since 1.2 + */ +typedef struct _Eina_Value Eina_Value; + +/** + * @typedef Eina_Value_Type + * Describes the data contained by the value + * + * @since 1.2 + */ +typedef struct _Eina_Value_Type Eina_Value_Type; + +/** + * @typedef Eina_Value_Union + * Union of all known value types. + * + * @since 1.2 + */ +typedef union _Eina_Value_Union Eina_Value_Union; + +/** + * @union _Eina_Value_Union + * All possible value types. + * + * @since 1.2 + */ +union _Eina_Value_Union +{ + unsigned char buf[8]; /**< just hold 8-bytes, more goes into ptr */ + void *ptr; /**< used as generic pointer */ + uint64_t _guarantee; /**< guarantees 8-byte alignment */ +}; + +/** + * @var EINA_VALUE_TYPE_UCHAR + * manages unsigned char type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_UCHAR; + +/** + * @var EINA_VALUE_TYPE_USHORT + * manages unsigned short type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_USHORT; + +/** + * @var EINA_VALUE_TYPE_UINT + * manages unsigned int type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_UINT; + +/** + * @var EINA_VALUE_TYPE_ULONG + * manages unsigned long type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_ULONG; + +/** + * @var EINA_VALUE_TYPE_UINT64 + * manages unsigned integer of 64 bits type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_UINT64; + +/** + * @var EINA_VALUE_TYPE_CHAR + * manages char type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_CHAR; + +/** + * @var EINA_VALUE_TYPE_SHORT + * manages short type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_SHORT; + +/** + * @var EINA_VALUE_TYPE_INT + * manages int type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_INT; + +/** + * @var EINA_VALUE_TYPE_LONG + * manages long type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_LONG; + +/** + * @var EINA_VALUE_TYPE_INT64 + * manages integer of 64 bits type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_INT64; + +/** + * @var EINA_VALUE_TYPE_FLOAT + * manages float type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_FLOAT; + +/** + * @var EINA_VALUE_TYPE_DOUBLE + * manages double type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_DOUBLE; + +/** + * @var EINA_VALUE_TYPE_STRINGSHARE + * manages stringshared string type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_STRINGSHARE; + +/** + * @var EINA_VALUE_TYPE_STRING + * manages string type. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_STRING; + + +/** + * @var EINA_VALUE_TYPE_ARRAY + * + * manages array type. Use the value get/set for arrays: + * @li eina_value_array_get() and eina_value_array_set() + * @li eina_value_array_vget() and eina_value_array_vset() + * @li eina_value_array_pget() and eina_value_array_pset() + * + * eina_value_set() takes an #Eina_Value_Array where just @c subtype + * and @c step are used. If there is an @c array, it will be adopted + * and its contents must be properly configurable as @c subtype + * expects. eina_value_pset() takes a pointer to an #Eina_Value_Array. + * For your convenience, use eina_value_array_setup(). + * + * eina_value_get() and eina_value_pget() takes a pointer to + * #Eina_Value_Array, it's an exact copy of the current structure in + * use by value, no copies are done. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_ARRAY; + +/** + * @var EINA_VALUE_TYPE_LIST + * + * manages list type. Use the value get/set for lists: + * @li eina_value_list_get() and eina_value_list_set() + * @li eina_value_list_vget() and eina_value_list_vset() + * @li eina_value_list_pget() and eina_value_list_pset() + * + * eina_value_set() takes an #Eina_Value_List where just @c subtype is + * used. If there is an @c list, it will be adopted and its contents + * must be properly configurable as @c subtype + * expects. eina_value_pset() takes a pointer to an #Eina_Value_List. + * For your convenience, use eina_value_list_setup(). + * + * eina_value_get() and eina_value_pget() takes a pointer to + * #Eina_Value_List, it's an exact copy of the current structure in + * use by value, no copies are done. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_LIST; + +/** + * @var EINA_VALUE_TYPE_HASH + * + * manages hash type. Use the value get/set for hashes: + * @li eina_value_hash_get() and eina_value_hash_set() + * @li eina_value_hash_vget() and eina_value_hash_vset() + * @li eina_value_hash_pget() and eina_value_hash_pset() + * + * eina_value_set() takes an #Eina_Value_Hash where just @c subtype + * and @c buckets_power_size are used. If there is an @c hash, it will + * be adopted and its contents must be properly configurable as @c + * subtype expects. eina_value_pset() takes a pointer to an + * #Eina_Value_Hash. For your convenience, use + * eina_value_hash_setup(). + * + * eina_value_get() and eina_value_pget() takes a pointer to + * #Eina_Value_Hash, it's an exact copy of the current structure in + * use by value, no copies are done. + * + * @note be aware that hash data is always an allocated memory of size + * defined by @c subtype->value_size. If your @c subtype is an + * integer, add as data malloc(sizeof(int)). If your @c subtype + * is an string, add as data malloc(sizeof(char*)) and this data + * value must point to strdup(string)! + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_HASH; + +/** + * @var EINA_VALUE_TYPE_TIMEVAL + * manages 'struct timeval' type + * + * eina_value_set() takes a "struct timeval" from sys/time.h. + * eina_value_pset() takes a pointer to "struct timeval". + * + * eina_value_get() and eina_value_pget() takes a pointer to "struct + * timeval" and it's an exact copy of value. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_TIMEVAL; + +/** + * @var EINA_VALUE_TYPE_BLOB + * manages blob of bytes type, see @ref Eina_Value_Blob + * + * eina_value_set() takes an #Eina_Value_Blob + * eina_value_pset() takes a pointer to #Eina_Value_Blob. + * + * eina_value_get() and eina_value_pget() takes a pointer to + * #Eina_Value_Blob and it's an exact copy of value, no allocations + * are made. + * + * Memory is untouched unless you provide @c ops (operations) pointer. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_BLOB; + +/** + * @var EINA_VALUE_TYPE_STRUCT + * + * manages struct type. Use the value get/set for structs: + * @li eina_value_struct_get() and eina_value_struct_set() + * @li eina_value_struct_vget() and eina_value_struct_vset() + * @li eina_value_struct_pget() and eina_value_struct_pset() + * + * eina_value_set() takes an #Eina_Value_Struct where just @c desc is + * used. If there is an @c memory, it will be adopted and its contents + * must be properly configurable as @c desc expects. eina_value_pset() + * takes a pointer to an #Eina_Value_Struct. For your convenience, use + * eina_value_struct_setup(). + * + * eina_value_get() and eina_value_pget() takes a pointer to + * #Eina_Value_Struct, it's an exact copy of the current structure in + * use by value, no copies are done. + * + * @since 1.2 + */ +EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_STRUCT; + +/** + * @var EINA_ERROR_VALUE_FAILED + * Error identifier corresponding to value check failure. + * + * @since 1.2 + */ +EAPI extern int EINA_ERROR_VALUE_FAILED; + +/** + * @defgroup Eina_Value_Value_Group Generic Value management + * + * @{ + */ + +/** + * @struct _Eina_Value + * defines the contents of a value + * + * @since 1.2 + */ +struct _Eina_Value +{ + const Eina_Value_Type *type; /**< how to access values */ + Eina_Value_Union value; /**< to be accessed with type descriptor */ +}; + +/** + * @brief Create generic value storage. + * @param type how to manage this value. + * @return The new value or @c NULL on failure. + * + * Create a new generic value storage. The members are managed using + * the description specified by @a type. + * + * Some types may specify more operations: + * eg. #EINA_VALUE_TYPE_ARRAY uses eina_value_array_set(), + * eina_value_array_get() and so on. + * + * On failure, @c NULL is returned and either #EINA_ERROR_OUT_OF_MEMORY or + * #EINA_ERROR_VALUE_FAILED is set. + * + * @note this calls creates from mempool and then uses + * eina_value_setup(). Consider using eina_value_flush() and + * eina_value_setup() instead to avoid memory allocations. + * + * @see eina_value_free() + * + * @since 1.2 + */ +EAPI Eina_Value *eina_value_new(const Eina_Value_Type *type) EINA_ARG_NONNULL(1) EINA_MALLOC EINA_WARN_UNUSED_RESULT; + +/** + * @brief Free value and its data. + * @param value value object + * + * @see eina_value_flush() + * + * @since 1.2 + */ +EAPI void eina_value_free(Eina_Value *value) EINA_ARG_NONNULL(1); + + +/** + * @brief Initialize generic value storage. + * @param value value object + * @param type how to manage this value. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * Initializes existing generic value storage. The members are managed using the + * description specified by @a type. + * + * Some types may specify more operations, as an example + * #EINA_VALUE_TYPE_ARRAY uses eina_value_array_set(), + * eina_value_array_get() and so on. + * + * @note Existing contents are ignored! If the value was previously used, then + * use eina_value_flush() first. + * + * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY + * or #EINA_ERROR_VALUE_FAILED is set. + * + * @see eina_value_flush() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_setup(Eina_Value *value, + const Eina_Value_Type *type) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Create generic value storage. + * @param value value object + * + * Releases all the resources associated with an #Eina_Value. The + * value must be already set with eina_value_setup() or + * eina_value_new(). + * + * After this call returns, the contents of the value are undefined, + * but the value can be reused by calling eina_value_setup() again. + * + * @see eina_value_setup() + * @see eina_value_free() + * + * @since 1.2 + */ +static inline void eina_value_flush(Eina_Value *value) EINA_ARG_NONNULL(1); + +/** + * @brief Copy generic value storage. + * @param value source value object + * @param copy destination value object + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The @a copy object is considered internalized and its existing + * contents are overwritten (just as if eina_value_flush() was called on + * it). + * + * The copy happens by calling eina_value_setup() on @a copy, followed + * by getting the contents of @a value and setting it to @a copy. + * + * @since 1.2 + */ +EAPI Eina_Bool eina_value_copy(const Eina_Value *value, + Eina_Value *copy) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Compare generic value storage. + * @param a left side of comparison + * @param b right side of comparison + * @return less than zero if a < b, greater than zero if a > b, zero + * if a == b + * + * @since 1.2 + */ +static inline int eina_value_compare(const Eina_Value *a, + const Eina_Value *b) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Set the generic value. + * @param value source value object + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The variable argument is dependent on chosen type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char + * @li EINA_VALUE_TYPE_USHORT: unsigned short + * @li EINA_VALUE_TYPE_UINT: unsigned int + * @li EINA_VALUE_TYPE_ULONG: unsigned long + * @li EINA_VALUE_TYPE_UINT64: uint64_t + * @li EINA_VALUE_TYPE_CHAR: char + * @li EINA_VALUE_TYPE_SHORT: short + * @li EINA_VALUE_TYPE_INT: int + * @li EINA_VALUE_TYPE_LONG: long + * @li EINA_VALUE_TYPE_INT64: int64_t + * @li EINA_VALUE_TYPE_FLOAT: float + * @li EINA_VALUE_TYPE_DOUBLE: double + * @li EINA_VALUE_TYPE_STRINGSHARE: const char * + * @li EINA_VALUE_TYPE_STRING: const char * + * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct + * + * @code + * Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT); + * int x = 567; + * eina_value_set(value, 1234); + * eina_value_set(value, x); + * + * eina_value_flush(value); + * + * eina_value_setup(value, EINA_VALUE_TYPE_STRING); + * eina_value_set(value, "hello world!"); + * + * eina_value_free(value); + * @endcode + * + * @note for array member see eina_value_array_set() + * @note for list member see eina_value_list_set() + * @note for hash member see eina_value_hash_set() + * + * @see eina_value_get() + * @see eina_value_vset() + * @see eina_value_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_set(Eina_Value *value, + ...) EINA_ARG_NONNULL(1); + +/** + * @brief Get the generic value. + * @param value source value object + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in the variable argument parameter, the + * actual value is type-dependent, but usually it will be what is + * stored inside the object. There shouldn't be any memory allocation, + * thus the contents should @b not be freed. + * + * The variable argument is dependent on chosen type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array* + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List* + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @code + * Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT); + * int x; + * const char *s; + * + * eina_value_set(value, 1234); + * eina_value_get(value, &x); + * + * eina_value_flush(value); + * + * eina_value_setup(value, EINA_VALUE_TYPE_STRING); + * eina_value_set(value, "hello world!"); + * eina_value_get(value, &s); + * + * eina_value_free(value); + * @endcode + * + * @note for array member see eina_value_array_get() + * @note for list member see eina_value_list_get() + * @note for hash member see eina_value_hash_get() + * + * @see eina_value_set() + * @see eina_value_vset() + * @see eina_value_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_get(const Eina_Value *value, + ...) EINA_ARG_NONNULL(1); + +/** + * @brief Set the generic value. + * @param value source value object + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * @note for array member see eina_value_array_vset() + * @note for list member see eina_value_list_vset() + * @note for hash member see eina_value_hash_vset() + * + * @see eina_value_vget() + * @see eina_value_set() + * @see eina_value_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_vset(Eina_Value *value, + va_list args) EINA_ARG_NONNULL(1); + +/** + * @brief Get the generic value. + * @param value source value object + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in the variable argument parameter, the + * actual value is type-dependent, but usually it will be what is + * stored inside the object. There shouldn't be any memory allocation, + * thus the contents should @b not be freed. + * + * @note for array member see eina_value_array_vget() + * @note for list member see eina_value_list_vget() + * @note for hash member see eina_value_hash_vget() + * + * @see eina_value_vset() + * @see eina_value_get() + * @see eina_value_pget() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_vget(const Eina_Value *value, + va_list args) EINA_ARG_NONNULL(1); + +/** + * @brief Set the generic value from pointer. + * @param value source value object + * @param ptr pointer to specify the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array* + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List* + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @note the pointer contents are written using the size defined by + * type. It can be larger than void* or uint64_t. + * + * @code + * Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT); + * int x = 567; + * const char *s = "hello world!"; + * + * eina_value_pset(value, &x); + * + * eina_value_flush(value); + * + * eina_value_setup(value, EINA_VALUE_TYPE_STRING); + * eina_value_pset(value, &s); + * + * eina_value_free(value); + * @endcode + * + * @note for array member see eina_value_array_pset() + * @note for list member see eina_value_list_pset() + * @note for hash member see eina_value_hash_pset() + * + * @see eina_value_pget() + * @see eina_value_set() + * @see eina_value_vset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_pset(Eina_Value *value, + const void *ptr) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Get the generic value to pointer. + * @param value source value object + * @param ptr pointer to receive the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in pointer contents, the actual value is + * type-dependent, but usually it will be what is stored inside the + * object. There shouldn't be any memory allocation, thus the contents + * should @b not be freed. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array* + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List* + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * + * @code + * Eina_Value *value = eina_value_new(EINA_VALUE_TYPE_INT); + * int x; + * const char *s; + * + * eina_value_set(value, 1234); + * eina_value_pget(value, &x); + * + * eina_value_flush(value); + * + * eina_value_setup(value, EINA_VALUE_TYPE_STRING); + * eina_value_set(value, "hello world!"); + * eina_value_pget(value, &s); + * + * eina_value_free(value); + * @endcode + * + * @note for array member see eina_value_array_get() + * @note for list member see eina_value_list_get() + * @note for hash member see eina_value_hash_get() + * + * @see eina_value_set() + * @see eina_value_vset() + * @see eina_value_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_pget(const Eina_Value *value, + void *ptr) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Convert one value to another type. + * @param value source value object. + * @param convert destination value object. + * @return #EINA_TRUE if converted, #EINA_FALSE otherwise. + * + * Converts one value to another trying first @a value type + * @c convert_to() function. If unsuccessful, tries using @c convert_from() + * function in @a convert. + * + * Conversion functions are type defined, and the basic types can convert + * between themselves, but conversion is strict! That is, if + * converting from negative value to unsigned type, it will fail. It + * also fails on value overflow. + * + * It is recommended that all types implement at least convert to + * string, used by eina_value_to_string(). + * + * @note Both objects must have eina_value_setup() called on them beforehand! + * + * @since 1.2 + */ +EAPI Eina_Bool eina_value_convert(const Eina_Value *value, + Eina_Value *convert) EINA_ARG_NONNULL(1, 2); + + +/** + * @brief Convert value to string. + * @param value value object. + * @return newly allocated memory or @c NULL on failure. + * + * @see eina_value_convert() + * @since 1.2 + */ +EAPI char *eina_value_to_string(const Eina_Value *value) EINA_ARG_NONNULL(1); + +/** + * @brief Query value type. + * @param value value object. + * @return type instance or @c NULL if type is invalid. + * + * Check if value type is valid and returns it. A type is invalid if + * it does not exist or if it is using a different version field. + * + * @see eina_value_type_check() + * + * @since 1.2 + */ +static inline const Eina_Value_Type *eina_value_type_get(const Eina_Value *value) EINA_PURE EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; + +/** + * @} + */ + + +/** + * @defgroup Eina_Value_Array_Group Generic Value Array management + * + * @{ + */ + + +/** + * @typedef Eina_Value_Array + * Value type for #EINA_VALUE_TYPE_ARRAY + * + * @since 1.2 + */ +typedef struct _Eina_Value_Array Eina_Value_Array; + +/** + * @struct _Eina_Value_Array + * Used to store the array and its subtype. + */ +struct _Eina_Value_Array +{ + const Eina_Value_Type *subtype; /**< how to allocate and access items */ + unsigned int step; /**< how to grow the members array */ + Eina_Inarray *array; /**< the array that holds data, members are of subtype->value_size bytes. */ +}; + +/** + * @brief Create generic value storage of type array. + * @param subtype how to manage this array members. + * @param step how to grow the members array. + * @return The new value or @c NULL on failure. + * + * Create a new generic value storage of type array. The members are + * managed using the description specified by @a subtype. + * + * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY or + * #EINA_ERROR_VALUE_FAILED is set. + * + * @note this creates from mempool and then uses + * eina_value_array_setup(). @see eina_value_free() @see + * eina_value_array_setup() + * + * @since 1.2 + */ +EAPI Eina_Value *eina_value_array_new(const Eina_Value_Type *subtype, + unsigned int step) EINA_ARG_NONNULL(1); + +/** + * @brief Initialize generic value storage of type array. + * @param value value object + * @param subtype how to manage array members. + * @param step how to grow the members array. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * Initializes new generic value storage of type array with the given + * @a subtype. + * + * This is the same as calling eina_value_set() with + * #EINA_VALUE_TYPE_ARRAY followed by eina_value_pset() with the + * #Eina_Value_Array description configured. + * + * @note Existing contents are ignored! If the value was previously used, then + * use eina_value_flush() first. + * + * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY + * or #EINA_ERROR_VALUE_FAILED is set. + * + * @see eina_value_flush() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_setup(Eina_Value *value, + const Eina_Value_Type *subtype, + unsigned int step) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Query number of elements in value of array type. + * @param value value object. + * @return number of child elements. + * @since 1.2 + */ +static inline unsigned int eina_value_array_count(const Eina_Value *value); + +/** + * @brief Remove element at given position in value of array type. + * @param value value object. + * @param position index of the member + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_remove(Eina_Value *value, + unsigned int position) EINA_ARG_NONNULL(1); + +/** + * @brief Set the generic value in an array member. + * @param value source value object + * @param position index of the member + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The variable argument is dependent on chosen subtype. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char + * @li EINA_VALUE_TYPE_USHORT: unsigned short + * @li EINA_VALUE_TYPE_UINT: unsigned int + * @li EINA_VALUE_TYPE_ULONG: unsigned long + * @li EINA_VALUE_TYPE_UINT64: uint64_t + * @li EINA_VALUE_TYPE_CHAR: char + * @li EINA_VALUE_TYPE_SHORT: short + * @li EINA_VALUE_TYPE_INT: int + * @li EINA_VALUE_TYPE_LONG: long + * @li EINA_VALUE_TYPE_INT64: int64_t + * @li EINA_VALUE_TYPE_FLOAT: float + * @li EINA_VALUE_TYPE_DOUBLE: double + * @li EINA_VALUE_TYPE_STRINGSHARE: const char * + * @li EINA_VALUE_TYPE_STRING: const char * + * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct + * + * @code + * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0); + * int x; + * + * eina_value_array_append(value, 1234); + * eina_value_array_set(value, 0, 5678); + * eina_value_array_get(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_array_get() + * @see eina_value_array_vset() + * @see eina_value_array_pset() + * @see eina_value_array_insert() + * @see eina_value_array_vinsert() + * @see eina_value_array_pinsert() + * @see eina_value_array_append() + * @see eina_value_array_vappend() + * @see eina_value_array_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_set(Eina_Value *value, + unsigned int position, + ...) EINA_ARG_NONNULL(1); + +/** + * @brief Get the generic value from an array member. + * @param value source value object + * @param position index of the member + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in the variable argument parameter, and the + * actual value is type-dependent, but usually it will be what is + * stored inside the object. There shouldn't be any memory allocation; + * thus the contents should @b not be freed. + * + * The variable argument is dependent on chosen subtype. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array* + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List* + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @code + * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0); + * int x; + * + * eina_value_array_append(value, 1234); + * eina_value_array_get(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_array_set() + * @see eina_value_array_vset() + * @see eina_value_array_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_get(const Eina_Value *value, + unsigned int position, + ...) EINA_ARG_NONNULL(1); + +/** + * @brief Insert a generic value in an array member position. + * @param value source value object + * @param position index of the member + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The variable argument is dependent on chosen subtype. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char + * @li EINA_VALUE_TYPE_USHORT: unsigned short + * @li EINA_VALUE_TYPE_UINT: unsigned int + * @li EINA_VALUE_TYPE_ULONG: unsigned long + * @li EINA_VALUE_TYPE_UINT64: uint64_t + * @li EINA_VALUE_TYPE_CHAR: char + * @li EINA_VALUE_TYPE_SHORT: short + * @li EINA_VALUE_TYPE_INT: int + * @li EINA_VALUE_TYPE_LONG: long + * @li EINA_VALUE_TYPE_INT64: int64_t + * @li EINA_VALUE_TYPE_FLOAT: float + * @li EINA_VALUE_TYPE_DOUBLE: double + * @li EINA_VALUE_TYPE_STRINGSHARE: const char * + * @li EINA_VALUE_TYPE_STRING: const char * + * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct + * + * @code + * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0); + * int x; + * + * eina_value_array_insert(value, 0, 1234); + * eina_value_array_get(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_array_set() + * @see eina_value_array_get() + * @see eina_value_array_vset() + * @see eina_value_array_pset() + * @see eina_value_array_vinsert() + * @see eina_value_array_pinsert() + * @see eina_value_array_append() + * @see eina_value_array_vappend() + * @see eina_value_array_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_insert(Eina_Value *value, + unsigned int position, + ...) EINA_ARG_NONNULL(1); + + +/** + * @brief Append a generic value in an array. + * @param value source value object + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The variable argument is dependent on chosen subtype. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char + * @li EINA_VALUE_TYPE_USHORT: unsigned short + * @li EINA_VALUE_TYPE_UINT: unsigned int + * @li EINA_VALUE_TYPE_ULONG: unsigned long + * @li EINA_VALUE_TYPE_UINT64: uint64_t + * @li EINA_VALUE_TYPE_CHAR: char + * @li EINA_VALUE_TYPE_SHORT: short + * @li EINA_VALUE_TYPE_INT: int + * @li EINA_VALUE_TYPE_LONG: long + * @li EINA_VALUE_TYPE_INT64: int64_t + * @li EINA_VALUE_TYPE_FLOAT: float + * @li EINA_VALUE_TYPE_DOUBLE: double + * @li EINA_VALUE_TYPE_STRINGSHARE: const char * + * @li EINA_VALUE_TYPE_STRING: const char * + * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct + * + * @code + * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0); + * int x; + * + * eina_value_array_append(value, 1234); + * eina_value_array_get(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_array_set() + * @see eina_value_array_get() + * @see eina_value_array_vset() + * @see eina_value_array_pset() + * @see eina_value_array_vinsert() + * @see eina_value_array_pinsert() + * @see eina_value_array_append() + * @see eina_value_array_vappend() + * @see eina_value_array_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_append(Eina_Value *value, + ...) EINA_ARG_NONNULL(1); + +/** + * @brief Set a generic value to an array member. + * @param value source value object + * @param position index of the member + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @see eina_value_array_set() + * @see eina_value_array_get() + * @see eina_value_array_pset() + * @see eina_value_array_insert() + * @see eina_value_array_vinsert() + * @see eina_value_array_pinsert() + * @see eina_value_array_append() + * @see eina_value_array_vappend() + * @see eina_value_array_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_vset(Eina_Value *value, + unsigned int position, + va_list args) EINA_ARG_NONNULL(1); + +/** + * @brief Get the generic value from an array member. + * @param value source value object + * @param position index of the member + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in the variable argument parameter, the + * actual value is type-dependent, but usually it will be what is + * stored inside the object. There shouldn't be any memory allocation, + * thus the contents should @b not be freed. + * + * @see eina_value_array_vset() + * @see eina_value_array_get() + * @see eina_value_array_pget() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_vget(const Eina_Value *value, + unsigned int position, + va_list args) EINA_ARG_NONNULL(1); +/** + * @brief Insert a generic value to an array member position. + * @param value source value object + * @param position index of the member + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @see eina_value_array_set() + * @see eina_value_array_get() + * @see eina_value_array_vset() + * @see eina_value_array_pset() + * @see eina_value_array_insert() + * @see eina_value_array_pinsert() + * @see eina_value_array_append() + * @see eina_value_array_vappend() + * @see eina_value_array_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_vinsert(Eina_Value *value, + unsigned int position, + va_list args) EINA_ARG_NONNULL(1); + +/** + * @brief Append a generic value to an array. + * @param value source value object + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @see eina_value_array_set() + * @see eina_value_array_get() + * @see eina_value_array_vget() + * @see eina_value_array_pset() + * @see eina_value_array_insert() + * @see eina_value_array_vinsert() + * @see eina_value_array_pinsert() + * @see eina_value_array_append() + * @see eina_value_array_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_vappend(Eina_Value *value, + va_list args) EINA_ARG_NONNULL(1); + + +/** + * @brief Set a generic value to an array member from a pointer. + * @param value source value object + * @param position index of the member + * @param ptr pointer to specify the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array* + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List* + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @note the pointer contents are written using the size defined by + * type. It can be larger than void* or uint64_t. + * + * @code + * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0); + * int x = 1234; + * + * eina_value_array_append(value, 1234); + * eina_value_array_pset(value, 0, &x); + * eina_value_array_pget(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_array_set() + * @see eina_value_array_get() + * @see eina_value_array_vset() + * @see eina_value_array_insert() + * @see eina_value_array_vinsert() + * @see eina_value_array_pinsert() + * @see eina_value_array_append() + * @see eina_value_array_vappend() + * @see eina_value_array_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_pset(Eina_Value *value, + unsigned int position, + const void *ptr) EINA_ARG_NONNULL(1, 3); + +/** + * @brief Retrieve a generic value into a pointer from an array member. + * @param value source value object + * @param position index of the member + * @param ptr pointer to receive the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in pointer contents, the actual value is + * type-dependent, but usually it will be what is stored inside the + * object. There shouldn't be any memory allocation, thus the contents + * should @b not be freed. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array* + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List* + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @code + * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0); + * int x; + * + * eina_value_array_append(value, 1234); + * eina_value_array_pget(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_array_set() + * @see eina_value_array_vset() + * @see eina_value_array_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_pget(const Eina_Value *value, + unsigned int position, + void *ptr) EINA_ARG_NONNULL(1, 3); + +/** + * @brief Insert a generic value to an array member position from a pointer. + * @param value source value object + * @param position index of the member + * @param ptr pointer to specify the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array* + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List* + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @note the pointer contents are written using the size defined by + * type. It can be larger than void* or uint64_t. + * + * @code + * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0); + * int x = 1234; + * + * eina_value_array_pinsert(value, 0, &x); + * eina_value_array_pget(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_array_set() + * @see eina_value_array_get() + * @see eina_value_array_vset() + * @see eina_value_array_insert() + * @see eina_value_array_vinsert() + * @see eina_value_array_pinsert() + * @see eina_value_array_append() + * @see eina_value_array_vappend() + * @see eina_value_array_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_pinsert(Eina_Value *value, + unsigned int position, + const void *ptr) EINA_ARG_NONNULL(1); + +/** + * @brief Append a generic value to an array from a pointer. + * @param value source value object + * @param ptr pointer to specify the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_ARRAY: Eina_Value_Array* + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List* + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @note the pointer contents are written using the size defined by + * type. It can be larger than void* or uint64_t. + * + * @code + * Eina_Value *value = eina_value_array_new(EINA_VALUE_TYPE_INT, 0); + * int x = 1234; + * + * eina_value_array_pappend(value, &x); + * eina_value_array_pget(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_array_set() + * @see eina_value_array_get() + * @see eina_value_array_vset() + * @see eina_value_array_insert() + * @see eina_value_array_vinsert() + * @see eina_value_array_pinsert() + * @see eina_value_array_append() + * @see eina_value_array_vappend() + * @see eina_value_array_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_array_pappend(Eina_Value *value, + const void *ptr) EINA_ARG_NONNULL(1); + +/** + * @} + */ + + +/** + * @defgroup Eina_Value_List_Group Generic Value List management + * + * @{ + */ + + +/** + * @typedef Eina_Value_List + * Value type for #EINA_VALUE_TYPE_LIST + * + * @since 1.2 + */ +typedef struct _Eina_Value_List Eina_Value_List; + +/** + * @struct _Eina_Value_List + * Used to store the list and its subtype. + */ +struct _Eina_Value_List +{ + const Eina_Value_Type *subtype; /**< how to allocate and access items */ + Eina_List *list; /**< the list that holds data, members are of subtype->value_size bytes. */ +}; + +/** + * @brief Create generic value storage of type list. + * @param subtype how to manage this list members. + * @return The new value or @c NULL on failure. + * + * Create a new generic value storage of type list. The members are + * managed using the description specified by @a subtype. + * + * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY or + * #EINA_ERROR_VALUE_FAILED is set. + * + * @note this creates from mempool and then uses + * eina_value_list_setup(). + * + * @see eina_value_free() + * @see eina_value_list_setup() + * + * @since 1.2 + */ +EAPI Eina_Value *eina_value_list_new(const Eina_Value_Type *subtype) EINA_ARG_NONNULL(1); + +/** + * @brief Initialize generic value storage of type list. + * @param value value object + * @param subtype how to manage this list members. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * Initializes new generic value storage of type list with the given + * @a subtype. + * + * This is the same as calling eina_value_set() with + * #EINA_VALUE_TYPE_LIST followed by eina_value_pset() with the + * #Eina_Value_List description configured. + * + * @note Existing contents are ignored! If the value was previously used, then + * use eina_value_flush() first. + * + * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY + * or #EINA_ERROR_VALUE_FAILED is set. + * + * @see eina_value_flush() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_setup(Eina_Value *value, + const Eina_Value_Type *subtype) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Query number of elements in value of list type. + * @param value value object. + * @return number of child elements. + * @since 1.2 + */ +static inline unsigned int eina_value_list_count(const Eina_Value *value); + +/** + * @brief Remove element at given position in value of list type. + * @param value value object. + * @param position index of the member + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_remove(Eina_Value *value, + unsigned int position) EINA_ARG_NONNULL(1); + +/** + * @brief Set the generic value in an list member. + * @param value source value object + * @param position index of the member + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The variable argument is dependent on chosen subtype. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char + * @li EINA_VALUE_TYPE_USHORT: unsigned short + * @li EINA_VALUE_TYPE_UINT: unsigned int + * @li EINA_VALUE_TYPE_ULONG: unsigned long + * @li EINA_VALUE_TYPE_UINT64: uint64_t + * @li EINA_VALUE_TYPE_CHAR: char + * @li EINA_VALUE_TYPE_SHORT: short + * @li EINA_VALUE_TYPE_INT: int + * @li EINA_VALUE_TYPE_LONG: long + * @li EINA_VALUE_TYPE_INT64: int64_t + * @li EINA_VALUE_TYPE_FLOAT: float + * @li EINA_VALUE_TYPE_DOUBLE: double + * @li EINA_VALUE_TYPE_STRINGSHARE: const char * + * @li EINA_VALUE_TYPE_STRING: const char * + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct + * + * @code + * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT); + * int x; + * + * eina_value_list_append(value, 1234); + * eina_value_list_set(value, 0, 5678); + * eina_value_list_get(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_list_get() + * @see eina_value_list_vset() + * @see eina_value_list_pset() + * @see eina_value_list_insert() + * @see eina_value_list_vinsert() + * @see eina_value_list_pinsert() + * @see eina_value_list_append() + * @see eina_value_list_vappend() + * @see eina_value_list_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_set(Eina_Value *value, + unsigned int position, + ...) EINA_ARG_NONNULL(1); + +/** + * @brief Get the generic value from an list member. + * @param value source value object + * @param position index of the member + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in the variable argument parameter, the + * actual value is type-dependent, but usually it will be what is + * stored inside the object. There shouldn't be any memory allocation, + * thus the contents should @b not be freed. + * + * The variable argument is dependent on chosen subtype. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List* + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @code + * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT); + * int x; + * + * eina_value_list_append(value, 1234); + * eina_value_list_get(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_list_set() + * @see eina_value_list_vset() + * @see eina_value_list_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_get(const Eina_Value *value, + unsigned int position, + ...) EINA_ARG_NONNULL(1); + +/** + * @brief Insert the generic value in an list member position. + * @param value source value object + * @param position index of the member + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The variable argument is dependent on chosen subtype. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char + * @li EINA_VALUE_TYPE_USHORT: unsigned short + * @li EINA_VALUE_TYPE_UINT: unsigned int + * @li EINA_VALUE_TYPE_ULONG: unsigned long + * @li EINA_VALUE_TYPE_UINT64: uint64_t + * @li EINA_VALUE_TYPE_CHAR: char + * @li EINA_VALUE_TYPE_SHORT: short + * @li EINA_VALUE_TYPE_INT: int + * @li EINA_VALUE_TYPE_LONG: long + * @li EINA_VALUE_TYPE_INT64: int64_t + * @li EINA_VALUE_TYPE_FLOAT: float + * @li EINA_VALUE_TYPE_DOUBLE: double + * @li EINA_VALUE_TYPE_STRINGSHARE: const char * + * @li EINA_VALUE_TYPE_STRING: const char * + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct + * + * @code + * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT); + * int x; + * + * eina_value_list_insert(value, 0, 1234); + * eina_value_list_get(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_list_set() + * @see eina_value_list_get() + * @see eina_value_list_vset() + * @see eina_value_list_pset() + * @see eina_value_list_vinsert() + * @see eina_value_list_pinsert() + * @see eina_value_list_append() + * @see eina_value_list_vappend() + * @see eina_value_list_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_insert(Eina_Value *value, + unsigned int position, + ...) EINA_ARG_NONNULL(1); + + +/** + * @brief Append the generic value in an list. + * @param value source value object + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The variable argument is dependent on chosen subtype. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char + * @li EINA_VALUE_TYPE_USHORT: unsigned short + * @li EINA_VALUE_TYPE_UINT: unsigned int + * @li EINA_VALUE_TYPE_ULONG: unsigned long + * @li EINA_VALUE_TYPE_UINT64: uint64_t + * @li EINA_VALUE_TYPE_CHAR: char + * @li EINA_VALUE_TYPE_SHORT: short + * @li EINA_VALUE_TYPE_INT: int + * @li EINA_VALUE_TYPE_LONG: long + * @li EINA_VALUE_TYPE_INT64: int64_t + * @li EINA_VALUE_TYPE_FLOAT: float + * @li EINA_VALUE_TYPE_DOUBLE: double + * @li EINA_VALUE_TYPE_STRINGSHARE: const char * + * @li EINA_VALUE_TYPE_STRING: const char * + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct + * + * @code + * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT); + * int x; + * + * eina_value_list_append(value, 1234); + * eina_value_list_get(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_list_set() + * @see eina_value_list_get() + * @see eina_value_list_vset() + * @see eina_value_list_pset() + * @see eina_value_list_vinsert() + * @see eina_value_list_pinsert() + * @see eina_value_list_append() + * @see eina_value_list_vappend() + * @see eina_value_list_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_append(Eina_Value *value, + ...) EINA_ARG_NONNULL(1); + +/** + * @brief Set the generic value in an list member. + * @param value source value object + * @param position index of the member + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @see eina_value_list_set() + * @see eina_value_list_get() + * @see eina_value_list_pset() + * @see eina_value_list_insert() + * @see eina_value_list_vinsert() + * @see eina_value_list_pinsert() + * @see eina_value_list_append() + * @see eina_value_list_vappend() + * @see eina_value_list_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_vset(Eina_Value *value, + unsigned int position, + va_list args) EINA_ARG_NONNULL(1); + +/** + * @brief Get the generic value from an list member. + * @param value source value object + * @param position index of the member + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in the variable argument parameter, the + * actual value is type-dependent, but usually it will be what is + * stored inside the object. There shouldn't be any memory allocation, + * thus the contents should @b not be freed. + * + * @see eina_value_list_vset() + * @see eina_value_list_get() + * @see eina_value_list_pget() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_vget(const Eina_Value *value, + unsigned int position, + va_list args) EINA_ARG_NONNULL(1); +/** + * @brief Insert the generic value in an list member position. + * @param value source value object + * @param position index of the member + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @see eina_value_list_set() + * @see eina_value_list_get() + * @see eina_value_list_vset() + * @see eina_value_list_pset() + * @see eina_value_list_insert() + * @see eina_value_list_pinsert() + * @see eina_value_list_append() + * @see eina_value_list_vappend() + * @see eina_value_list_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_vinsert(Eina_Value *value, + unsigned int position, + va_list args) EINA_ARG_NONNULL(1); + +/** + * @brief Append the generic value in an list. + * @param value source value object + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @see eina_value_list_set() + * @see eina_value_list_get() + * @see eina_value_list_vget() + * @see eina_value_list_pset() + * @see eina_value_list_insert() + * @see eina_value_list_vinsert() + * @see eina_value_list_pinsert() + * @see eina_value_list_append() + * @see eina_value_list_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_vappend(Eina_Value *value, + va_list args) EINA_ARG_NONNULL(1); + + +/** + * @brief Set the generic value in an list member from pointer. + * @param value source value object + * @param position index of the member + * @param ptr pointer to specify the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List* + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @note the pointer contents are written using the size defined by + * type. It can be larger than void* or uint64_t. + * + * @code + * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT); + * int x = 1234; + * + * eina_value_list_append(value, 1234); + * eina_value_list_pset(value, 0, &x); + * eina_value_list_pget(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_list_set() + * @see eina_value_list_get() + * @see eina_value_list_vset() + * @see eina_value_list_insert() + * @see eina_value_list_vinsert() + * @see eina_value_list_pinsert() + * @see eina_value_list_append() + * @see eina_value_list_vappend() + * @see eina_value_list_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_pset(Eina_Value *value, + unsigned int position, + const void *ptr) EINA_ARG_NONNULL(1, 3); + +/** + * @brief Get the generic value to pointer from an list member. + * @param value source value object + * @param position index of the member + * @param ptr pointer to receive the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in pointer contents, the actual value is + * type-dependent, but usually it will be what is stored inside the + * object. There shouldn't be any memory allocation, thus the contents + * should @b not be freed. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List* + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @code + * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT); + * int x; + * + * eina_value_list_append(value, 1234); + * eina_value_list_pget(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_list_set() + * @see eina_value_list_vset() + * @see eina_value_list_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_pget(const Eina_Value *value, + unsigned int position, + void *ptr) EINA_ARG_NONNULL(1, 3); + +/** + * @brief Insert the generic value in an list member position from pointer. + * @param value source value object + * @param position index of the member + * @param ptr pointer to specify the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List* + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @note the pointer contents are written using the size defined by + * type. It can be larger than void* or uint64_t. + * + * @code + * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT); + * int x = 1234; + * + * eina_value_list_pinsert(value, 0, &x); + * eina_value_list_pget(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_list_set() + * @see eina_value_list_get() + * @see eina_value_list_vset() + * @see eina_value_list_insert() + * @see eina_value_list_vinsert() + * @see eina_value_list_pinsert() + * @see eina_value_list_append() + * @see eina_value_list_vappend() + * @see eina_value_list_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_pinsert(Eina_Value *value, + unsigned int position, + const void *ptr) EINA_ARG_NONNULL(1); + +/** + * @brief Append the generic value in an list from pointer. + * @param value source value object + * @param ptr pointer to specify the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_LIST: Eina_Value_List* + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @note the pointer contents are written using the size defined by + * type. It can be larger than void* or uint64_t. + * + * @code + * Eina_Value *value = eina_value_list_new(EINA_VALUE_TYPE_INT); + * int x = 1234; + * + * eina_value_list_pappend(value, &x); + * eina_value_list_pget(value, 0, &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_list_set() + * @see eina_value_list_get() + * @see eina_value_list_vset() + * @see eina_value_list_insert() + * @see eina_value_list_vinsert() + * @see eina_value_list_pinsert() + * @see eina_value_list_append() + * @see eina_value_list_vappend() + * @see eina_value_list_pappend() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_list_pappend(Eina_Value *value, + const void *ptr) EINA_ARG_NONNULL(1); + +/** + * @} + */ + +/** + * @defgroup Eina_Value_Hash_Group Generic Value Hash management + * + * @{ + */ + +/** + * @typedef Eina_Value_Hash + * Value type for #EINA_VALUE_TYPE_HASH + * + * @since 1.2 + */ +typedef struct _Eina_Value_Hash Eina_Value_Hash; + +/** + * @struct _Eina_Value_Hash + * Used to store the hash and its subtype. + */ +struct _Eina_Value_Hash +{ + const Eina_Value_Type *subtype; /**< how to allocate and access items */ + unsigned int buckets_power_size; /**< how to allocate hash buckets, if zero a sane default is chosen. */ + Eina_Hash *hash; /**< the hash that holds data, members are of subtype->value_size bytes. */ +}; + +/** + * @brief Create generic value storage of type hash. + * @param subtype how to manage this hash members. + * @param buckets_power_size how to allocate hash buckets (2 ^ + * buckets_power_size), if zero then a sane value is chosen. + * @return The new value or @c NULL on failure. + * + * Create a new generic value storage of type hash. The members are + * managed using the description specified by @a subtype. + * + * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY or + * #EINA_ERROR_VALUE_FAILED is set. + * + * @note this creates from mempool and then uses + * eina_value_hash_setup(). + * + * @see eina_value_free() + * @see eina_value_hash_setup() + * + * @since 1.2 + */ +EAPI Eina_Value *eina_value_hash_new(const Eina_Value_Type *subtype, unsigned int buckets_power_size) EINA_ARG_NONNULL(1); + +/** + * @brief Initialize generic value storage of type hash. + * @param value value object + * @param subtype how to manage this hash members. + * @param buckets_power_size how to allocate hash buckets (2 ^ + * buckets_power_size), if zero then a sane value is chosen. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * Initializes new generic value storage of type hash with the given + * @a subtype. + * + * This is the same as calling eina_value_set() with + * #EINA_VALUE_TYPE_HASH followed by eina_value_pset() with the + * #Eina_Value_Hash description configured. + * + * @note Existing contents are ignored! If the value was previously used, then + * use eina_value_flush() first. + * + * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY + * or #EINA_ERROR_VALUE_FAILED is set. + * + * @see eina_value_flush() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_hash_setup(Eina_Value *value, + const Eina_Value_Type *subtype, + unsigned int buckets_power_size) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Query number of elements in value of hash type. + * @param value value object. + * @return number of child elements. + * @since 1.2 + */ +static inline unsigned int eina_value_hash_population(const Eina_Value *value); + +/** + * @brief Remove element at given position in value of hash type. + * @param value value object. + * @param key key to find the member + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @since 1.2 + */ +static inline Eina_Bool eina_value_hash_del(Eina_Value *value, + const char *key) EINA_ARG_NONNULL(1); + +/** + * @brief Set the generic value in an hash member. + * @param value source value object + * @param key key to find the member + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The variable argument is dependent on chosen subtype. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char + * @li EINA_VALUE_TYPE_USHORT: unsigned short + * @li EINA_VALUE_TYPE_UINT: unsigned int + * @li EINA_VALUE_TYPE_ULONG: unsigned long + * @li EINA_VALUE_TYPE_UINT64: uint64_t + * @li EINA_VALUE_TYPE_CHAR: char + * @li EINA_VALUE_TYPE_SHORT: short + * @li EINA_VALUE_TYPE_INT: int + * @li EINA_VALUE_TYPE_LONG: long + * @li EINA_VALUE_TYPE_INT64: int64_t + * @li EINA_VALUE_TYPE_FLOAT: float + * @li EINA_VALUE_TYPE_DOUBLE: double + * @li EINA_VALUE_TYPE_STRINGSHARE: const char * + * @li EINA_VALUE_TYPE_STRING: const char * + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @code + * Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0); + * int x; + * + * eina_value_hash_set(value, "abc", 5678); + * eina_value_hash_get(value, "abc", &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_hash_get() + * @see eina_value_hash_vset() + * @see eina_value_hash_pset() + * @see eina_value_hash_del() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_hash_set(Eina_Value *value, + const char *key, + ...) EINA_ARG_NONNULL(1); + +/** + * @brief Get the generic value from an hash member. + * @param value source value object + * @param key key to find the member + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in the variable argument parameter, the + * actual value is type-dependent, but usually it will be what is + * stored inside the object. There shouldn't be any memory allocation, + * thus the contents should @b not be freed. + * + * The variable argument is dependent on chosen subtype. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @code + * Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0); + * int x; + * + * eina_value_hash_set(value, "abc", 1234); + * eina_value_hash_get(value, "abc", &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_hash_set() + * @see eina_value_hash_vset() + * @see eina_value_hash_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_hash_get(const Eina_Value *value, + const char *key, + ...) EINA_ARG_NONNULL(1); + +/** + * @brief Set the generic value in an hash member. + * @param value source value object + * @param key key to find the member + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @see eina_value_hash_set() + * @see eina_value_hash_get() + * @see eina_value_hash_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_hash_vset(Eina_Value *value, + const char *key, + va_list args) EINA_ARG_NONNULL(1); + +/** + * @brief Get the generic value from an hash member. + * @param value source value object + * @param key key to find the member + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in the variable argument parameter, the + * actual value is type-dependent, but usually it will be what is + * stored inside the object. There shouldn't be any memory allocation, + * thus the contents should @b not be freed. + * + * @see eina_value_hash_vset() + * @see eina_value_hash_get() + * @see eina_value_hash_pget() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_hash_vget(const Eina_Value *value, + const char *key, + va_list args) EINA_ARG_NONNULL(1); + +/** + * @brief Set the generic value in an hash member from pointer. + * @param value source value object + * @param key key to find the member + * @param ptr pointer to specify the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @note the pointer contents are written using the size defined by + * type. It can be larger than void* or uint64_t. + * + * @code + * Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0); + * int x = 1234; + * + * eina_value_hash_pset(value, "abc", &x); + * eina_value_hash_pget(value, "abc", &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_hash_set() + * @see eina_value_hash_get() + * @see eina_value_hash_vset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_hash_pset(Eina_Value *value, + const char *key, + const void *ptr) EINA_ARG_NONNULL(1, 3); + +/** + * @brief Get the generic value to pointer from an hash member. + * @param value source value object + * @param key key to find the member + * @param ptr pointer to receive the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in pointer contents, the actual value is + * type-dependent, but usually it will be what is stored inside the + * object. There shouldn't be any memory allocation, thus the contents + * should @b not be freed. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @code + * Eina_Value *value = eina_value_hash_new(EINA_VALUE_TYPE_INT, 0); + * int x; + * + * eina_value_hash_set(value, "abc", 1234); + * eina_value_hash_pget(value, "abc", &x); + * eina_value_free(value); + * @endcode + * + * @see eina_value_hash_set() + * @see eina_value_hash_vset() + * @see eina_value_hash_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_hash_pget(const Eina_Value *value, + const char *key, + void *ptr) EINA_ARG_NONNULL(1, 3); + +/** + * @} + */ + +/** + * @defgroup Eina_Value_Blob_Group Generic Value Blob management + * + * @{ + */ + +/** + * @typedef Eina_Value_Blob_Operations + * How to manage blob. Any @c NULL callback is ignored. + * @since 1.2 + */ +typedef struct _Eina_Value_Blob_Operations Eina_Value_Blob_Operations; + +/** + * @struct _Eina_Value_Blob_Operations + * How to manage blob. Any @c NULL callback is ignored. + * @since 1.2 + */ +struct _Eina_Value_Blob_Operations +{ +#define EINA_VALUE_BLOB_OPERATIONS_VERSION (1) + unsigned int version; /**< must be EINA_VALUE_BLOB_OPERATIONS_VERSION */ + void (*free)(const Eina_Value_Blob_Operations *ops, void *memory, size_t size); + void *(*copy)(const Eina_Value_Blob_Operations *ops, const void *memory, size_t size); + int (*compare)(const Eina_Value_Blob_Operations *ops, const void *data1, size_t size_data1, const void *data2, size_t size_data2); + char *(*to_string)(const Eina_Value_Blob_Operations *ops, const void *memory, size_t size); +}; + +/** + * @var EINA_VALUE_BLOB_OPERATIONS_MALLOC + * + * Assumes @c memory was create with malloc() and applies free() to it + * during flush (Eina_Value_Blob_Operations::free). Copy is done with + * malloc() as well. + * + * No compare or to_string are provided, defaults will be used. + */ +EAPI extern const Eina_Value_Blob_Operations *EINA_VALUE_BLOB_OPERATIONS_MALLOC; + +/** + * @typedef Eina_Value_Blob + * @since 1.2 + */ +typedef struct _Eina_Value_Blob Eina_Value_Blob; + +/** + * @struct _Eina_Value_Blob + * @since 1.2 + */ +struct _Eina_Value_Blob +{ + const Eina_Value_Blob_Operations *ops; /**< if @c NULL, nothing is freed, copy will just copy the memory pointer, not its value. */ + const void *memory; + unsigned int size; +}; + +/** + * @} + */ + +/** + * @defgroup Eina_Value_Struct_Group Generic Value Struct management + * + * @{ + */ + +/** + * @typedef Eina_Value_Struct_Operations + * How to manage struct. Any @c NULL callback is ignored. + * @since 1.2 + */ +typedef struct _Eina_Value_Struct_Operations Eina_Value_Struct_Operations; + +/** + * @typedef Eina_Value_Struct_Member + * Describes a single member of struct. + * @since 1.2 + */ +typedef struct _Eina_Value_Struct_Member Eina_Value_Struct_Member; + +/** + * @typedef Eina_Value_Struct_Desc + * Describes the struct by listing its size, members and operations. + * @since 1.2 + */ +typedef struct _Eina_Value_Struct_Desc Eina_Value_Struct_Desc; + +/** + * @typedef Eina_Value_Struct + * @since 1.2 + */ +typedef struct _Eina_Value_Struct Eina_Value_Struct; + +/** + * @struct _Eina_Value_Struct_Operations + * How to manage struct. Any @c NULL callback is ignored. + * @since 1.2 + */ +struct _Eina_Value_Struct_Operations +{ +#define EINA_VALUE_STRUCT_OPERATIONS_VERSION (1) + unsigned int version; /**< must be EINA_VALUE_STRUCT_OPERATIONS_VERSION */ + void *(*alloc)(const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc); + void (*free)(const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc, void *memory); + void *(*copy)(const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc, const void *memory); + int (*compare)(const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc, const void *data1, const void *data2); + const Eina_Value_Struct_Member *(*find_member)(const Eina_Value_Struct_Operations *ops, const Eina_Value_Struct_Desc *desc, const char *name); /**< replace the function to find description for member. For huge structures consider using binary search, stringshared, hash or gperf. The default function does linear search using strcmp(). */ +}; + +/** + * @var EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH + * + * Assumes @c members is sorted by name and applies binary search for + * names. + * + * Ideally the @c member_count field is set to speed it up. + * + * No other methods are set (alloc, free, copy, compare), then it uses + * the default operations. + */ +EAPI extern const Eina_Value_Struct_Operations *EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH; + +/** + * @var EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE + * + * Assumes @c members name are stringshared and can be compared for + * equality without using its contents (simple pointer comparison). + * + * Ideally the search @c name will be stringshared as well, but it + * will do a second loop with a forced stringshare if it did not find + * the member. + * + * No other methods are set (alloc, free, copy, compare), then it uses + * the default operations. + */ +EAPI extern const Eina_Value_Struct_Operations *EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE; + +/** + * @struct _Eina_Value_Struct_Member + * @since 1.2 + */ +struct _Eina_Value_Struct_Member +{ + const char *name; + const Eina_Value_Type *type; + unsigned int offset; +}; + +/** + * @struct _Eina_Value_Struct_Desc + * @since 1.2 + */ +struct _Eina_Value_Struct_Desc +{ +#define EINA_VALUE_STRUCT_DESC_VERSION (1) + unsigned int version; /**< must be EINA_VALUE_STRUCT_DESC_VERSION */ + const Eina_Value_Struct_Operations *ops; /**< operations, if @c NULL defaults will be used. You may use operations to optimize member lookup using binary search or gperf hash. */ + const Eina_Value_Struct_Member *members; /**< array of member descriptions, if @c member_count is zero, then it must be @c NULL terminated. */ + unsigned int member_count; /**< if > 0, specifies number of members. If zero then @c members must be NULL terminated. */ + unsigned int size; /**< byte size to allocate, may be bigger than sum of members */ +}; + +/** + * @def EINA_VALUE_STRUCT_MEMBER + * + * Helper to define Eina_Value_Struct_Member fields, uses offsetof() + * with type and member. + * + * @since 1.2 + */ +#define EINA_VALUE_STRUCT_MEMBER(eina_value_type, type, member) \ + {#member, eina_value_type, offsetof(type, member)} + +/** + * @def EINA_VALUE_STRUCT_MEMBER_SENTINEL + * + * Helper to define Eina_Value_Struct_Member fields for sentinel (last + * item), useful if you did not define @c member_count. + * + * @since 1.2 + */ +#define EINA_VALUE_STRUCT_MEMBER_SENTINEL {NULL, NULL, 0} + + +/** + * @struct _Eina_Value_Struct + * @since 1.2 + */ +struct _Eina_Value_Struct +{ + const Eina_Value_Struct_Desc *desc; + void *memory; +}; + +/** + * @brief Create generic value storage of type struct. + * @param desc how to manage this struct members. + * @return The new value or @c NULL on failure. + * + * Create a new generic value storage of type struct. The members are + * managed using the description specified by @a desc. + * + * On failure, @c NULL is returned and #EINA_ERROR_OUT_OF_MEMORY or + * #EINA_ERROR_VALUE_FAILED is set. + * + * @note this creates from mempool and then uses + * eina_value_struct_setup(). + * + * @see eina_value_free() + * @see eina_value_struct_setup() + * + * @since 1.2 + */ +EAPI Eina_Value *eina_value_struct_new(const Eina_Value_Struct_Desc *desc) EINA_ARG_NONNULL(1); + +/** + * @brief Initialize generic value storage of type struct. + * @param value value object + * @param desc how to manage this struct members. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * Initializes new generic value storage of type struct with the given + * @a desc. + * + * This is the same as calling eina_value_set() with + * #EINA_VALUE_TYPE_STRUCT followed by eina_value_pset() with the + * #Eina_Value_Struct description configured. + * + * @note Existing contents are ignored! If the value was previously used, then + * use eina_value_flush() first. + * + * On failure, #EINA_FALSE is returned and #EINA_ERROR_OUT_OF_MEMORY + * or #EINA_ERROR_VALUE_FAILED is set. + * + * @see eina_value_flush() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_struct_setup(Eina_Value *value, + const Eina_Value_Struct_Desc *desc) EINA_ARG_NONNULL(1, 2); + +/** + * @brief Set the generic value in an struct member. + * @param value source value object + * @param name name to find the member + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The variable argument is dependent on chosen member type. The list + * for basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char + * @li EINA_VALUE_TYPE_USHORT: unsigned short + * @li EINA_VALUE_TYPE_UINT: unsigned int + * @li EINA_VALUE_TYPE_ULONG: unsigned long + * @li EINA_VALUE_TYPE_UINT64: uint64_t + * @li EINA_VALUE_TYPE_CHAR: char + * @li EINA_VALUE_TYPE_SHORT: short + * @li EINA_VALUE_TYPE_INT: int + * @li EINA_VALUE_TYPE_LONG: long + * @li EINA_VALUE_TYPE_INT64: int64_t + * @li EINA_VALUE_TYPE_FLOAT: float + * @li EINA_VALUE_TYPE_DOUBLE: double + * @li EINA_VALUE_TYPE_STRINGSHARE: const char * + * @li EINA_VALUE_TYPE_STRING: const char * + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @code + * struct myst { + * int i; + * char c; + * }; + * const Eina_Value_Struct_Member myst_members[] = { + * {"i", EINA_VALUE_TYPE_INT, 0}, + * {"c", EINA_VALUE_TYPE_CHAR, 4}, + * {NULL, NULL, 0} + * }; + * const Eina_Value_Struct_Desc myst_desc = { + * EINA_VALUE_STRUCT_DESC_VERSION, + * NULL, myst_members, 2, sizeof(struct myst) + * }; + * Eina_Value *value = eina_value_struct_new(&my_desc); + * int x; + * char y; + * + * eina_value_struct_set(value, "i", 5678); + * eina_value_struct_get(value, "i", &x); + * eina_value_struct_set(value, "c", 0xf); + * eina_value_struct_get(value, "c", &y); + * eina_value_free(value); + * @endcode + * + * @see eina_value_struct_get() + * @see eina_value_struct_vset() + * @see eina_value_struct_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_struct_set(Eina_Value *value, + const char *name, + ...) EINA_ARG_NONNULL(1); + +/** + * @brief Get the generic value from an struct member. + * @param value source value object + * @param name name to find the member + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in the variable argument parameter, the + * actual value is type-dependent, but usually it will be what is + * stored inside the object. There shouldn't be any memory allocation, + * thus the contents should @b not be freed. + * + * The variable argument is dependent on chosen member type. The list + * for basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @code + * struct myst { + * int i; + * char c; + * }; + * const Eina_Value_Struct_Member myst_members[] = { + * {"i", EINA_VALUE_TYPE_INT, 0}, + * {"c", EINA_VALUE_TYPE_CHAR, 4}, + * {NULL, NULL, 0} + * }; + * const Eina_Value_Struct_Desc myst_desc = { + * EINA_VALUE_STRUCT_DESC_VERSION, + * NULL, myst_members, 2, sizeof(struct myst) + * }; + * Eina_Value *value = eina_value_struct_new(&my_desc); + * int x; + * char y; + * + * eina_value_struct_set(value, "i", 5678); + * eina_value_struct_get(value, "i", &x); + * eina_value_struct_set(value, "c", 0xf); + * eina_value_struct_get(value, "c", &y); + * eina_value_free(value); + * @endcode + * + * @see eina_value_struct_set() + * @see eina_value_struct_vset() + * @see eina_value_struct_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_struct_get(const Eina_Value *value, + const char *name, + ...) EINA_ARG_NONNULL(1); + +/** + * @brief Set the generic value in an struct member. + * @param value source value object + * @param name name to find the member + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @see eina_value_struct_set() + * @see eina_value_struct_get() + * @see eina_value_struct_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_struct_vset(Eina_Value *value, + const char *name, + va_list args) EINA_ARG_NONNULL(1); + +/** + * @brief Get the generic value from an struct member. + * @param value source value object + * @param name name to find the member + * @param args variable argument + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in the variable argument parameter, the + * actual value is type-dependent, but usually it will be what is + * stored inside the object. There shouldn't be any memory allocation, + * thus the contents should @b not be freed. + * + * @see eina_value_struct_vset() + * @see eina_value_struct_get() + * @see eina_value_struct_pget() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_struct_vget(const Eina_Value *value, + const char *name, + va_list args) EINA_ARG_NONNULL(1); + +/** + * @brief Set the generic value in an struct member from pointer. + * @param value source value object + * @param name name to find the member + * @param ptr pointer to specify the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @note the pointer contents are written using the size defined by + * type. It can be larger than void* or uint64_t. + * + * @code + * struct myst { + * int i; + * char c; + * }; + * const Eina_Value_Struct_Member myst_members[] = { + * {"i", EINA_VALUE_TYPE_INT, 0}, + * {"c", EINA_VALUE_TYPE_CHAR, 4}, + * {NULL, NULL, 0} + * }; + * const Eina_Value_Struct_Desc myst_desc = { + * EINA_VALUE_STRUCT_DESC_VERSION, + * NULL, myst_members, 2, sizeof(struct myst) + * }; + * Eina_Value *value = eina_value_struct_new(&my_desc); + * int x = 5678; + * char y = 0xf; + * + * eina_value_struct_pset(value, "i", &); + * eina_value_struct_pget(value, "i", &x); + * eina_value_struct_pset(value, "c", &y); + * eina_value_struct_pget(value, "c", &y); + * eina_value_free(value); + * @endcode + * + * @see eina_value_struct_set() + * @see eina_value_struct_get() + * @see eina_value_struct_vset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_struct_pset(Eina_Value *value, + const char *name, + const void *ptr) EINA_ARG_NONNULL(1, 3); + +/** + * @brief Get the generic value to pointer from an struct member. + * @param value source value object + * @param name name to find the member + * @param ptr pointer to receive the contents. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * + * The value is returned in pointer contents, the actual value is + * type-dependent, but usually it will be what is stored inside the + * object. There shouldn't be any memory allocation, thus the contents + * should @b not be freed. + * + * The pointer type is dependent on chosen value type. The list for + * basic types: + * + * @li EINA_VALUE_TYPE_UCHAR: unsigned char* + * @li EINA_VALUE_TYPE_USHORT: unsigned short* + * @li EINA_VALUE_TYPE_UINT: unsigned int* + * @li EINA_VALUE_TYPE_ULONG: unsigned long* + * @li EINA_VALUE_TYPE_UINT64: uint64_t* + * @li EINA_VALUE_TYPE_CHAR: char* + * @li EINA_VALUE_TYPE_SHORT: short* + * @li EINA_VALUE_TYPE_INT: int* + * @li EINA_VALUE_TYPE_LONG: long* + * @li EINA_VALUE_TYPE_INT64: int64_t* + * @li EINA_VALUE_TYPE_FLOAT: float* + * @li EINA_VALUE_TYPE_DOUBLE: double* + * @li EINA_VALUE_TYPE_STRINGSHARE: const char ** + * @li EINA_VALUE_TYPE_STRING: const char ** + * @li EINA_VALUE_TYPE_HASH: Eina_Value_Hash* + * @li EINA_VALUE_TYPE_TIMEVAL: struct timeval* + * @li EINA_VALUE_TYPE_BLOB: Eina_Value_Blob* + * @li EINA_VALUE_TYPE_STRUCT: Eina_Value_Struct* + * + * @code + * struct myst { + * int i; + * char c; + * }; + * const Eina_Value_Struct_Member myst_members[] = { + * {"i", EINA_VALUE_TYPE_INT, 0}, + * {"c", EINA_VALUE_TYPE_CHAR, 4}, + * {NULL, NULL, 0} + * }; + * const Eina_Value_Struct_Desc myst_desc = { + * EINA_VALUE_STRUCT_DESC_VERSION, + * NULL, myst_members, 2, sizeof(struct myst) + * }; + * Eina_Value *value = eina_value_struct_new(&my_desc); + * int x = 5678; + * char y = 0xf; + * + * eina_value_struct_pset(value, "i", &); + * eina_value_struct_pget(value, "i", &x); + * eina_value_struct_pset(value, "c", &y); + * eina_value_struct_pget(value, "c", &y); + * eina_value_free(value); + * @endcode + * + * @see eina_value_struct_set() + * @see eina_value_struct_vset() + * @see eina_value_struct_pset() + * + * @since 1.2 + */ +static inline Eina_Bool eina_value_struct_pget(const Eina_Value *value, + const char *name, + void *ptr) EINA_ARG_NONNULL(1, 3); + +/** + * @} + */ + + +/** + * @defgroup Eina_Value_Type_Group Generic Value Type management + * + * @{ + */ + +/** + * @struct _Eina_Value_Type + * API to access values. + * + * @since 1.2 + */ +struct _Eina_Value_Type +{ + /** + * @def EINA_VALUE_TYPE_VERSION + * Current API version, used to validate type. + */ +#define EINA_VALUE_TYPE_VERSION (1) + unsigned int version; /**< must be #EINA_VALUE_TYPE_VERSION */ + unsigned int value_size; /**< byte size of value */ + const char *name; /**< name for debug and introspection */ + Eina_Bool (*setup)(const Eina_Value_Type *type, void *mem); /**< mem will be malloc(value_size) and should be configured */ + Eina_Bool (*flush)(const Eina_Value_Type *type, void *mem); /**< clear any values from mem */ + Eina_Bool (*copy)(const Eina_Value_Type *type, const void *src, void *dst); /**< how to copy values, both memory are @c value_size */ + int (*compare)(const Eina_Value_Type *type, const void *a, const void *b); /**< how to compare values, both memory are @c value_size */ + Eina_Bool (*convert_to)(const Eina_Value_Type *type, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem); /**< how to convert values, both memory are @c value_size */ + Eina_Bool (*convert_from)(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem); /**< how to convert values, both memory are @c value_size */ + Eina_Bool (*vset)(const Eina_Value_Type *type, void *mem, va_list args); /**< how to set memory from variable argument */ + Eina_Bool (*pset)(const Eina_Value_Type *type, void *mem, const void *ptr); /**< how to set memory from pointer */ + Eina_Bool (*pget)(const Eina_Value_Type *type, const void *mem, void *ptr); /**< how to read memory */ +}; + +/** + * @brief Query type name. + * @param type type reference. + * @return string or @c NULL if type is invalid. + * @since 1.2 + */ +EAPI const char *eina_value_type_name_get(const Eina_Value_Type *type) EINA_PURE EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; + +/** + * @brief Check if type is valid. + * @param type type reference. + * @return #EINA_TRUE if valid, #EINA_FALSE otherwise. + * + * A type is invalid if it's NULL or if version field is not the same + * as runtime #EINA_VALUE_TYPE_VERSION. + * + * @since 1.2 + */ +EAPI Eina_Bool eina_value_type_check(const Eina_Value_Type *type) EINA_PURE EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; + +/** + * @brief Initialize memory using type descriptor. + * @param type type reference. + * @param mem memory to operate, must be of size @c type->value_size. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @since 1.2 + */ +static inline Eina_Bool eina_value_type_setup(const Eina_Value_Type *type, void *mem); + +/** + * @brief Flush (clear) memory using type descriptor. + * @param type type reference. + * @param mem memory to operate, must be of size @c type->value_size. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @since 1.2 + */ +static inline Eina_Bool eina_value_type_flush(const Eina_Value_Type *type, void *mem); + +/** + * @brief Copy memory using type descriptor. + * @param type type reference. + * @param src memory to operate, must be of size @c type->value_size. + * @param dst memory to operate, must be of size @c type->value_size. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @since 1.2 + */ +static inline Eina_Bool eina_value_type_copy(const Eina_Value_Type *type, const void *src, void *dst); + +/** + * @brief Compare memory using type descriptor. + * @param type type reference. + * @param a memory to operate, must be of size @c type->value_size. + * @param b memory to operate, must be of size @c type->value_size. + * @return less than zero if a < b, greater than zero if a > b, zero if equal. + * @since 1.2 + */ +static inline int eina_value_type_compare(const Eina_Value_Type *type, const void *a, const void *b); + +/** + * @brief Convert memory using type descriptor. + * @param type type reference of the source. + * @param convert type reference of the destination. + * @param type_mem memory to operate, must be of size @c type->value_size. + * @param convert_mem memory to operate, must be of size @c convert->value_size. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @since 1.2 + */ +static inline Eina_Bool eina_value_type_convert_to(const Eina_Value_Type *type, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem); + +/** + * @brief Convert memory using type descriptor. + * @param type type reference of the destination. + * @param convert type reference of the source. + * @param type_mem memory to operate, must be of size @c type->value_size. + * @param convert_mem memory to operate, must be of size @c convert->value_size. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @since 1.2 + */ +static inline Eina_Bool eina_value_type_convert_from(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem); + +/** + * @brief Set memory using type descriptor and variable argument. + * @param type type reference of the source. + * @param mem memory to operate, must be of size @c type->value_size. + * @param args input value. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @since 1.2 + */ +static inline Eina_Bool eina_value_type_vset(const Eina_Value_Type *type, void *mem, va_list args); + +/** + * @brief Set memory using type descriptor and pointer. + * @param type type reference of the source. + * @param mem memory to operate, must be of size @c type->value_size. + * @param ptr pointer to input value. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @since 1.2 + */ +static inline Eina_Bool eina_value_type_pset(const Eina_Value_Type *type, void *mem, const void *ptr); + +/** + * @brief Get memory using type descriptor. + * @param type type reference of the source. + * @param mem memory to operate, must be of size @c type->value_size. + * @param ptr pointer to output. + * @return #EINA_TRUE on success, #EINA_FALSE otherwise. + * @since 1.2 + */ +static inline Eina_Bool eina_value_type_pget(const Eina_Value_Type *type, const void *mem, void *ptr); + +/** + * @} + */ + +#include "eina_inline_value.x" + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +#endif diff --git a/libraries/eina/src/include/eina_xattr.h b/libraries/eina/src/include/eina_xattr.h index 8ddb30a..0f89cc3 100644 --- a/libraries/eina/src/include/eina_xattr.h +++ b/libraries/eina/src/include/eina_xattr.h @@ -39,6 +39,14 @@ typedef enum { EINA_XATTR_CREATED /**< This will only succeed if the extended attribute wasn't previously set */ } Eina_Xattr_Flags; +typedef struct _Eina_Xattr Eina_Xattr; +struct _Eina_Xattr +{ + const char *name; /**< The eXtended attribute name @since 1.2 */ + const char *value; /**< The eXtended attribute value @since 1.2 */ + + size_t length; /**< The length of the eXtended attribute value @since 1.2 */ +}; /** * @brief Get an iterator that list all extended attribute of a file. @@ -54,10 +62,49 @@ typedef enum { EAPI Eina_Iterator *eina_xattr_ls(const char *file); /** + * @brief Get an iterator that list all extended attribute value related to a fd. + * + * @param file The filename to retrieve the extended attribute list from. + * @return an iterator. + * + * The iterator will not allocate any data during the iteration step, so you need to copy them yourself + * if you need. The iterator will provide an Eina_Xattr structure. + * + * @since 1.2 + */ +EAPI Eina_Iterator *eina_xattr_value_ls(const char *file); + +/** + * @brief Get an iterator that list all extended attribute related to a fd. + * + * @param fd The file descriptor to retrieve the extended attribute list from. + * @return an iterator. + * + * The iterator will not allocate any data during the iteration step, so you need to copy them yourself + * if you need. + * + * @since 1.2 + */ +EAPI Eina_Iterator *eina_xattr_fd_ls(int fd); + +/** + * @brief Get an iterator that list all extended attribute value related to a fd. + * + * @param fd The file descriptor to retrieve the extended attribute list from. + * @return an iterator. + * + * The iterator will not allocate any data during the iteration step, so you need to copy them yourself + * if you need. The iterator will provide an Eina_Xattr structure. + * + * @since 1.2 + */ +EAPI Eina_Iterator *eina_xattr_value_fd_ls(int fd); + +/** * @brief Retrieve an extended attribute from a file. * * @param file The file to retrieve the extended attribute from. - * @param atttribute The extended attribute name to retrieve. + * @param attribute The extended attribute name to retrieve. * @param size The size of the retrieved extended attribute. * @return the allocated data that hold the extended attribute value. * @@ -112,7 +159,7 @@ EAPI char *eina_xattr_string_get(const char *file, const char *attribute); * * @param file The file to set the double to. * @param attribute The attribute to set. - * @param data The NULL terminated double to set. + * @param value The NULL terminated double to set. * @param flags Define the set policy. * @return EINA_TRUE on success, EINA_FALSE otherwise. * @@ -139,7 +186,7 @@ EAPI Eina_Bool eina_xattr_double_get(const char *file, const char *attribute, do * * @param file The file to set the int to. * @param attribute The attribute to set. - * @param data The NULL terminated int to set. + * @param value The NULL terminated int to set. * @param flags Define the set policy. * @return EINA_TRUE on success, EINA_FALSE otherwise. * diff --git a/libraries/eina/src/lib/Makefile.am b/libraries/eina/src/lib/Makefile.am index 0537a61..d8c9d20 100644 --- a/libraries/eina/src/lib/Makefile.am +++ b/libraries/eina/src/lib/Makefile.am @@ -22,6 +22,7 @@ eina_error.c \ eina_fp.c \ eina_hamster.c \ eina_hash.c \ +eina_inarray.c \ eina_inlist.c \ eina_iterator.c \ eina_lalloc.c \ @@ -130,12 +131,17 @@ eina_amalgamation.c: $(base_sources) Makefile @echo "#include " >> eina_amalgamation.c @echo "#include " >> eina_amalgamation.c @echo "#include " >> eina_amalgamation.c - @echo "#include " >> eina_amalgamation.c + @echo "#ifdef HAVE_DLOPEN" >> eina_amalgamation.c + @echo "# include " >> eina_amalgamation.c + @echo "#endif" >> eina_amalgamation.c @echo "#include " >> eina_amalgamation.c - @echo "#include " >> eina_amalgamation.c + @echo "#ifdef HAVE_DIRENT_H" >> eina_amalgamation.c + @echo "# include " >> eina_amalgamation.c + @echo "#endif" >> eina_amalgamation.c @echo "#include " >> eina_amalgamation.c @echo "#include " >> eina_amalgamation.c @echo "#include " >> eina_amalgamation.c + @echo "#include " >> eina_amalgamation.c @echo "#ifdef HAVE_EVIL" >> eina_amalgamation.c @echo "# include " >> eina_amalgamation.c diff --git a/libraries/eina/src/lib/Makefile.in b/libraries/eina/src/lib/Makefile.in index 359aba0..878bcbe 100644 --- a/libraries/eina/src/lib/Makefile.in +++ b/libraries/eina/src/lib/Makefile.in @@ -96,15 +96,16 @@ libeina_la_DEPENDENCIES = am__libeina_la_SOURCES_DIST = eina_accessor.c eina_array.c \ eina_benchmark.c eina_binbuf.c eina_binshare.c eina_convert.c \ eina_counter.c eina_cpu.c eina_error.c eina_fp.c \ - eina_hamster.c eina_hash.c eina_inlist.c eina_iterator.c \ - eina_lalloc.c eina_list.c eina_log.c eina_magic.c eina_main.c \ - eina_matrixsparse.c eina_mempool.c eina_mmap.c eina_module.c \ - eina_prefix.c eina_quadtree.c eina_rbtree.c eina_rectangle.c \ - eina_safety_checks.c eina_sched.c eina_share_common.c \ - eina_simple_xml_parser.c eina_str.c eina_strbuf.c \ - eina_strbuf_common.c eina_stringshare.c eina_tiler.c \ - eina_unicode.c eina_ustrbuf.c eina_ustringshare.c eina_value.c \ - eina_xattr.c eina_file_win32.c eina_file.c \ + eina_hamster.c eina_hash.c eina_inarray.c eina_inlist.c \ + eina_iterator.c eina_lalloc.c eina_list.c eina_log.c \ + eina_magic.c eina_main.c eina_matrixsparse.c eina_mempool.c \ + eina_mmap.c eina_module.c eina_prefix.c eina_quadtree.c \ + eina_rbtree.c eina_rectangle.c eina_safety_checks.c \ + eina_sched.c eina_share_common.c eina_simple_xml_parser.c \ + eina_str.c eina_strbuf.c eina_strbuf_common.c \ + eina_stringshare.c eina_tiler.c eina_unicode.c eina_ustrbuf.c \ + eina_ustringshare.c eina_value.c eina_xattr.c \ + eina_file_win32.c eina_file.c \ $(top_srcdir)/src/modules/mp/buddy/eina_buddy.c \ $(top_srcdir)/src/modules/mp/chained_pool/eina_chained_mempool.c \ $(top_srcdir)/src/modules/mp/ememoa_fixed/eina_ememoa_fixed.c \ @@ -129,15 +130,16 @@ am__objects_10 = libeina_la-eina_accessor.lo libeina_la-eina_array.lo \ libeina_la-eina_counter.lo libeina_la-eina_cpu.lo \ libeina_la-eina_error.lo libeina_la-eina_fp.lo \ libeina_la-eina_hamster.lo libeina_la-eina_hash.lo \ - libeina_la-eina_inlist.lo libeina_la-eina_iterator.lo \ - libeina_la-eina_lalloc.lo libeina_la-eina_list.lo \ - libeina_la-eina_log.lo libeina_la-eina_magic.lo \ - libeina_la-eina_main.lo libeina_la-eina_matrixsparse.lo \ - libeina_la-eina_mempool.lo libeina_la-eina_mmap.lo \ - libeina_la-eina_module.lo libeina_la-eina_prefix.lo \ - libeina_la-eina_quadtree.lo libeina_la-eina_rbtree.lo \ - libeina_la-eina_rectangle.lo libeina_la-eina_safety_checks.lo \ - libeina_la-eina_sched.lo libeina_la-eina_share_common.lo \ + libeina_la-eina_inarray.lo libeina_la-eina_inlist.lo \ + libeina_la-eina_iterator.lo libeina_la-eina_lalloc.lo \ + libeina_la-eina_list.lo libeina_la-eina_log.lo \ + libeina_la-eina_magic.lo libeina_la-eina_main.lo \ + libeina_la-eina_matrixsparse.lo libeina_la-eina_mempool.lo \ + libeina_la-eina_mmap.lo libeina_la-eina_module.lo \ + libeina_la-eina_prefix.lo libeina_la-eina_quadtree.lo \ + libeina_la-eina_rbtree.lo libeina_la-eina_rectangle.lo \ + libeina_la-eina_safety_checks.lo libeina_la-eina_sched.lo \ + libeina_la-eina_share_common.lo \ libeina_la-eina_simple_xml_parser.lo libeina_la-eina_str.lo \ libeina_la-eina_strbuf.lo libeina_la-eina_strbuf_common.lo \ libeina_la-eina_stringshare.lo libeina_la-eina_tiler.lo \ @@ -231,7 +233,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -283,8 +287,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -371,10 +373,10 @@ AM_CPPFLAGS = \ base_sources = eina_accessor.c eina_array.c eina_benchmark.c \ eina_binbuf.c eina_binshare.c eina_convert.c eina_counter.c \ eina_cpu.c eina_error.c eina_fp.c eina_hamster.c eina_hash.c \ - eina_inlist.c eina_iterator.c eina_lalloc.c eina_list.c \ - eina_log.c eina_magic.c eina_main.c eina_matrixsparse.c \ - eina_mempool.c eina_mmap.c eina_module.c eina_prefix.c \ - eina_quadtree.c eina_rbtree.c eina_rectangle.c \ + eina_inarray.c eina_inlist.c eina_iterator.c eina_lalloc.c \ + eina_list.c eina_log.c eina_magic.c eina_main.c \ + eina_matrixsparse.c eina_mempool.c eina_mmap.c eina_module.c \ + eina_prefix.c eina_quadtree.c eina_rbtree.c eina_rectangle.c \ eina_safety_checks.c eina_sched.c eina_share_common.c \ eina_simple_xml_parser.c eina_str.c eina_strbuf.c \ eina_strbuf_common.c eina_stringshare.c eina_tiler.c \ @@ -489,6 +491,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_fp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_hamster.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_hash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_inarray.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_inlist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_iterator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeina_la-eina_lalloc.Plo@am__quote@ @@ -641,6 +644,14 @@ libeina_la-eina_hash.lo: eina_hash.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeina_la_CFLAGS) $(CFLAGS) -c -o libeina_la-eina_hash.lo `test -f 'eina_hash.c' || echo '$(srcdir)/'`eina_hash.c +libeina_la-eina_inarray.lo: eina_inarray.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeina_la_CFLAGS) $(CFLAGS) -MT libeina_la-eina_inarray.lo -MD -MP -MF $(DEPDIR)/libeina_la-eina_inarray.Tpo -c -o libeina_la-eina_inarray.lo `test -f 'eina_inarray.c' || echo '$(srcdir)/'`eina_inarray.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeina_la-eina_inarray.Tpo $(DEPDIR)/libeina_la-eina_inarray.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eina_inarray.c' object='libeina_la-eina_inarray.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeina_la_CFLAGS) $(CFLAGS) -c -o libeina_la-eina_inarray.lo `test -f 'eina_inarray.c' || echo '$(srcdir)/'`eina_inarray.c + libeina_la-eina_inlist.lo: eina_inlist.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeina_la_CFLAGS) $(CFLAGS) -MT libeina_la-eina_inlist.lo -MD -MP -MF $(DEPDIR)/libeina_la-eina_inlist.Tpo -c -o libeina_la-eina_inlist.lo `test -f 'eina_inlist.c' || echo '$(srcdir)/'`eina_inlist.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeina_la-eina_inlist.Tpo $(DEPDIR)/libeina_la-eina_inlist.Plo @@ -1189,12 +1200,17 @@ uninstall-am: uninstall-libLTLIBRARIES @EINA_AMALGAMATION_TRUE@ @echo "#include " >> eina_amalgamation.c @EINA_AMALGAMATION_TRUE@ @echo "#include " >> eina_amalgamation.c @EINA_AMALGAMATION_TRUE@ @echo "#include " >> eina_amalgamation.c -@EINA_AMALGAMATION_TRUE@ @echo "#include " >> eina_amalgamation.c +@EINA_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_DLOPEN" >> eina_amalgamation.c +@EINA_AMALGAMATION_TRUE@ @echo "# include " >> eina_amalgamation.c +@EINA_AMALGAMATION_TRUE@ @echo "#endif" >> eina_amalgamation.c @EINA_AMALGAMATION_TRUE@ @echo "#include " >> eina_amalgamation.c -@EINA_AMALGAMATION_TRUE@ @echo "#include " >> eina_amalgamation.c +@EINA_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_DIRENT_H" >> eina_amalgamation.c +@EINA_AMALGAMATION_TRUE@ @echo "# include " >> eina_amalgamation.c +@EINA_AMALGAMATION_TRUE@ @echo "#endif" >> eina_amalgamation.c @EINA_AMALGAMATION_TRUE@ @echo "#include " >> eina_amalgamation.c @EINA_AMALGAMATION_TRUE@ @echo "#include " >> eina_amalgamation.c @EINA_AMALGAMATION_TRUE@ @echo "#include " >> eina_amalgamation.c +@EINA_AMALGAMATION_TRUE@ @echo "#include " >> eina_amalgamation.c @EINA_AMALGAMATION_TRUE@ @echo "#ifdef HAVE_EVIL" >> eina_amalgamation.c @EINA_AMALGAMATION_TRUE@ @echo "# include " >> eina_amalgamation.c diff --git a/libraries/eina/src/lib/eina_array.c b/libraries/eina/src/lib/eina_array.c index 5a850ac..4bcab61 100644 --- a/libraries/eina/src/lib/eina_array.c +++ b/libraries/eina/src/lib/eina_array.c @@ -119,7 +119,7 @@ eina_array_iterator_next(Eina_Iterator_Array *it, void **data) { EINA_MAGIC_CHECK_ARRAY_ITERATOR(it, EINA_FALSE); - if (!(it->index < eina_array_count_get(it->array))) + if (!(it->index < eina_array_count(it->array))) return EINA_FALSE; if (data) @@ -150,7 +150,7 @@ eina_array_accessor_get_at(Eina_Accessor_Array *it, { EINA_MAGIC_CHECK_ARRAY_ACCESSOR(it, EINA_FALSE); - if (!(idx < eina_array_count_get(it->array))) + if (!(idx < eina_array_count(it->array))) return EINA_FALSE; if (data) diff --git a/libraries/eina/src/lib/eina_binbuf_template_c.x b/libraries/eina/src/lib/eina_binbuf_template_c.x index 613a715..7e0c539 100644 --- a/libraries/eina/src/lib/eina_binbuf_template_c.x +++ b/libraries/eina/src/lib/eina_binbuf_template_c.x @@ -65,6 +65,15 @@ _FUNC_EXPAND(new)(void) return buf; } +EAPI _STRBUF_STRUCT_NAME * +_FUNC_EXPAND(manage_new_length)(_STRBUF_DATA_TYPE *str, size_t length) +{ + _STRBUF_STRUCT_NAME *buf = + eina_strbuf_common_manage_new(_STRBUF_CSIZE, (void *) str, length); + EINA_MAGIC_SET(buf, _STRBUF_MAGIC); + return buf; +} + EAPI void _FUNC_EXPAND(free)(_STRBUF_STRUCT_NAME *buf) { diff --git a/libraries/eina/src/lib/eina_cpu.c b/libraries/eina/src/lib/eina_cpu.c index 8af550d..5b190e4 100644 --- a/libraries/eina/src/lib/eina_cpu.c +++ b/libraries/eina/src/lib/eina_cpu.c @@ -24,7 +24,7 @@ # ifdef _WIN32 # define WIN32_LEAN_AND_MEAN # include -# elif defined (__SUNPRO_C) || defined(__GNU__) +# elif defined (__sun) || defined(__GNU__) # include # elif defined (__FreeBSD__) || defined (__OpenBSD__) || \ defined (__NetBSD__) || defined (__DragonFly__) || defined (__MacOSX__) || \ @@ -140,7 +140,7 @@ EAPI int eina_cpu_count(void) GetSystemInfo(&sysinfo); return sysinfo.dwNumberOfProcessors; -# elif defined (__SUNPRO_C) || defined(__GNU__) +# elif defined (__sun) || defined(__GNU__) /* * _SC_NPROCESSORS_ONLN: number of processors that are online, that is available when sysconf is called. The number diff --git a/libraries/eina/src/lib/eina_file.c b/libraries/eina/src/lib/eina_file.c index 84b9e78..0b836b3 100644 --- a/libraries/eina/src/lib/eina_file.c +++ b/libraries/eina/src/lib/eina_file.c @@ -38,13 +38,18 @@ extern "C" void *alloca (size_t); #endif +#include #include #include -#include +#ifdef HAVE_DIRENT_H +# include +#endif #include #include #include -#include +#ifdef HAVE_SYS_MMAN_H +# include +#endif #include #define PATH_DELIM '/' @@ -60,6 +65,8 @@ void *alloca (size_t); #include "eina_list.h" #include "eina_lock.h" #include "eina_mmap.h" +#include "eina_log.h" +#include "eina_xattr.h" #ifdef HAVE_ESCAPE_H # include @@ -95,9 +102,8 @@ void *alloca (size_t); #define EINA_SMALL_PAGE 4096 # define EINA_HUGE_PAGE 16 * 1024 * 1024 +#ifdef HAVE_DIRENT_H typedef struct _Eina_File_Iterator Eina_File_Iterator; -typedef struct _Eina_File_Map Eina_File_Map; - struct _Eina_File_Iterator { Eina_Iterator iterator; @@ -107,6 +113,7 @@ struct _Eina_File_Iterator char dir[1]; }; +#endif struct _Eina_File { @@ -132,8 +139,10 @@ struct _Eina_File Eina_Bool shared : 1; Eina_Bool delete_me : 1; + Eina_Bool global_faulty : 1; }; +typedef struct _Eina_File_Map Eina_File_Map; struct _Eina_File_Map { void *map; @@ -144,6 +153,7 @@ struct _Eina_File_Map int refcount; Eina_Bool hugetlb : 1; + Eina_Bool faulty : 1; }; static Eina_Hash *_eina_file_cache = NULL; @@ -156,6 +166,7 @@ static int _eina_file_log_dom = -1; * The code and description of the issue can be found at : * http://womble.decadent.org.uk/readdir_r-advisory.html */ +#ifdef HAVE_DIRENT_H static long _eina_name_max(DIR *dirp) { @@ -390,6 +401,7 @@ _eina_file_stat_ls_iterator_next(Eina_File_Direct_Iterator *it, void **data) return EINA_TRUE; } +#endif static void _eina_file_real_close(Eina_File *file) @@ -511,8 +523,8 @@ slprintf(char *str, size_t size, const char *format, ...) va_end(ap); } -static char* -_eina_file_escape(const char* path, int* length) +static char * +_eina_file_escape(const char *path, int *length) { char *result = strdup(path ? path : ""); char *p = result; @@ -738,6 +750,7 @@ eina_file_split(char *path) EAPI Eina_Iterator * eina_file_ls(const char *dir) { +#ifdef HAVE_DIRENT_H Eina_File_Iterator *it; size_t length; @@ -773,11 +786,16 @@ eina_file_ls(const char *dir) it->iterator.free = FUNC_ITERATOR_FREE(_eina_file_ls_iterator_free); return &it->iterator; +#else + (void) dir; + return NULL; +#endif } EAPI Eina_Iterator * eina_file_direct_ls(const char *dir) { +#ifdef HAVE_DIRENT_H Eina_File_Direct_Iterator *it; size_t length; @@ -825,11 +843,16 @@ eina_file_direct_ls(const char *dir) it->iterator.free = FUNC_ITERATOR_FREE(_eina_file_direct_ls_iterator_free); return &it->iterator; +#else + (void) dir; + return NULL; +#endif } EAPI Eina_Iterator * eina_file_stat_ls(const char *dir) { +#ifdef HAVE_DIRENT_H Eina_File_Direct_Iterator *it; size_t length; @@ -877,6 +900,10 @@ eina_file_stat_ls(const char *dir) it->iterator.free = FUNC_ITERATOR_FREE(_eina_file_direct_ls_iterator_free); return &it->iterator; +#else + (void) dir; + return NULL; +#endif } EAPI Eina_File * @@ -887,7 +914,9 @@ eina_file_open(const char *path, Eina_Bool shared) char *filename; struct stat file_stat; int fd = -1; +#ifdef HAVE_EXECVP int flags; +#endif EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL); @@ -1184,4 +1213,91 @@ eina_file_map_free(Eina_File *file, void *map) eina_lock_release(&file->lock); } +EAPI Eina_Bool +eina_file_map_faulted(Eina_File *file, void *map) +{ + Eina_File_Map *em; + + EINA_SAFETY_ON_NULL_RETURN_VAL(file, EINA_FALSE); + + eina_lock_take(&file->lock); + + if (file->global_map == map) return file->global_faulty; + + em = eina_hash_find(file->rmap, &map); + if (!em) return EINA_FALSE; + + return em->faulty; +} + +EAPI Eina_Iterator * +eina_file_xattr_get(Eina_File *file) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL); + + return eina_xattr_fd_ls(file->fd); +} + +EAPI Eina_Iterator * +eina_file_xattr_value_get(Eina_File *file) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL); + + return eina_xattr_value_fd_ls(file->fd); +} + +void +eina_file_mmap_faulty(void *addr, long page_size) +{ + Eina_File_Map *m; + Eina_File *f; + Eina_Iterator *itf; + Eina_Iterator *itm; + + /* NOTE: I actually don't know if other thread are running, I will try to take the lock. + It may be possible that if other thread are not running and they were in the middle of + accessing an Eina_File this lock are still taken and we will result as a deadlock. */ + eina_lock_take(&_eina_file_lock_cache); + + itf = eina_hash_iterator_data_new(_eina_file_cache); + EINA_ITERATOR_FOREACH(itf, f) + { + Eina_Bool faulty = EINA_FALSE; + + eina_lock_take(&f->lock); + + if (f->global_map) + { + if ((unsigned char *) addr < (((unsigned char *)f->global_map) + f->length) && + (((unsigned char *) addr) + page_size) >= (unsigned char *) f->global_map) + { + f->global_faulty = EINA_TRUE; + faulty = EINA_TRUE; + } + } + + if (!faulty) + { + itm = eina_hash_iterator_data_new(f->map); + EINA_ITERATOR_FOREACH(itm, m) + { + if ((unsigned char *) addr < (((unsigned char *)m->map) + m->length) && + (((unsigned char *) addr) + page_size) >= (unsigned char *) m->map) + { + m->faulty = EINA_TRUE; + faulty = EINA_TRUE; + break; + } + } + eina_iterator_free(itm); + } + + eina_lock_release(&f->lock); + + if (faulty) break; + } + eina_iterator_free(itf); + + eina_lock_release(&_eina_file_lock_cache); +} diff --git a/libraries/eina/src/lib/eina_hash.c b/libraries/eina/src/lib/eina_hash.c index 5df20aa..5196894 100644 --- a/libraries/eina/src/lib/eina_hash.c +++ b/libraries/eina/src/lib/eina_hash.c @@ -854,8 +854,9 @@ eina_hash_free(Eina_Hash *hash) { int i; + if (!hash) return ; + EINA_MAGIC_CHECK_HASH(hash); - EINA_SAFETY_ON_NULL_RETURN(hash); if (hash->buckets) { @@ -871,8 +872,9 @@ eina_hash_free_buckets(Eina_Hash *hash) { int i; + if (!hash) return ; + EINA_MAGIC_CHECK_HASH(hash); - EINA_SAFETY_ON_NULL_RETURN(hash); if (hash->buckets) { diff --git a/libraries/eina/src/lib/eina_inarray.c b/libraries/eina/src/lib/eina_inarray.c new file mode 100644 index 0000000..dc95bc6 --- /dev/null +++ b/libraries/eina/src/lib/eina_inarray.c @@ -0,0 +1,777 @@ +/* EINA - EFL data type library + * Copyright (C) 2012 - ProFUSION embedded systems + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; + * if not, see . + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include + +#include "eina_config.h" +#include "eina_private.h" +#include "eina_error.h" +#include "eina_log.h" + +/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ +#include "eina_safety_checks.h" +#include "eina_inarray.h" + +/*============================================================================* +* Local * +*============================================================================*/ + +/** + * @cond LOCAL + */ + +static const char EINA_MAGIC_INARRAY_STR[] = "Eina Inline Array"; +static const char EINA_MAGIC_INARRAY_ITERATOR_STR[] = "Eina Inline Array Iterator"; +static const char EINA_MAGIC_INARRAY_ACCESSOR_STR[] = "Eina Inline Array Accessor"; + +typedef struct _Eina_Iterator_Inarray Eina_Iterator_Inarray; +typedef struct _Eina_Accessor_Inarray Eina_Accessor_Inarray; + +struct _Eina_Iterator_Inarray +{ + Eina_Iterator iterator; + const Eina_Inarray *array; + unsigned int pos; + EINA_MAGIC +}; + +struct _Eina_Accessor_Inarray +{ + Eina_Accessor accessor; + const Eina_Inarray *array; + EINA_MAGIC +}; + +static int _eina_inarray_log_dom = -1; + +#ifdef ERR +#undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_eina_inarray_log_dom, __VA_ARGS__) + +#ifdef DBG +#undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_eina_inarray_log_dom, __VA_ARGS__) + +#define EINA_MAGIC_CHECK_INARRAY(d, ...) \ + do \ + { \ + if (!EINA_MAGIC_CHECK(d, EINA_MAGIC_INARRAY)) \ + { \ + EINA_MAGIC_FAIL(d, EINA_MAGIC_INARRAY); \ + return __VA_ARGS__; \ + } \ + eina_error_set(0); \ + } \ + while(0) + +#define EINA_MAGIC_CHECK_INARRAY_ITERATOR(d, ...) \ + do \ + { \ + if (!EINA_MAGIC_CHECK(d, EINA_MAGIC_INARRAY_ITERATOR)) \ + { \ + EINA_MAGIC_FAIL(d, EINA_MAGIC_INARRAY_ITERATOR); \ + return __VA_ARGS__; \ + } \ + eina_error_set(0); \ + } \ + while(0) + +#define EINA_MAGIC_CHECK_INARRAY_ACCESSOR(d, ...) \ + do \ + { \ + if (!EINA_MAGIC_CHECK(d, EINA_MAGIC_INARRAY_ACCESSOR)) \ + { \ + EINA_MAGIC_FAIL(d, EINA_MAGIC_INARRAY_ACCESSOR); \ + return __VA_ARGS__; \ + } \ + eina_error_set(0); \ + } \ + while(0) + +static void +_eina_inarray_setup(Eina_Inarray *array, unsigned int member_size, unsigned int step) +{ + EINA_MAGIC_SET(array, EINA_MAGIC_INARRAY); + array->member_size = member_size; + array->len = 0; + array->max = 0; + array->step = (step > 0) ? step : 32; + array->members = NULL; +} + +static Eina_Bool +_eina_inarray_resize(Eina_Inarray *array, unsigned int new_size) +{ + unsigned int new_max; + void *tmp; + + if (new_size < array->max) + return EINA_TRUE; + + if (new_size % array->step == 0) + new_max = new_size; + else + new_max = ((new_size / array->step) + 1) * array->step; + + tmp = realloc(array->members, new_max * array->member_size); + if ((!tmp) && (new_max > 0)) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + + array->members = tmp; + array->max = new_max; + return EINA_TRUE; +} + +static inline void * +_eina_inarray_get(const Eina_Inarray *array, unsigned int position) +{ + unsigned int offset = position * array->member_size; + return (unsigned char *)array->members + offset; +} + +static int +_eina_inarray_search(const Eina_Inarray *array, const void *data, Eina_Compare_Cb compare) +{ + const unsigned char *start, *found; + start = array->members; + found = bsearch(data, start, array->len, array->member_size, compare); + if (!found) + return -1; + return (found - start) / array->member_size; +} + +static unsigned int +_eina_inarray_search_sorted_near(const Eina_Inarray *array, const void *data, Eina_Compare_Cb compare, int *cmp) +{ + unsigned int start, last, middle; + + if (array->len == 0) + { + *cmp = -1; + return 0; + } + else if (array->len == 1) + { + *cmp = compare(data, array->members); + return 0; + } + + start = 0; + last = array->len - 1; /* inclusive */ + do + { + void *p; + middle = start + (last - start) / 2; /* avoid overflow */ + p = _eina_inarray_get(array, middle); + *cmp = compare(data, p); + if (*cmp == 0) + return middle; + else if (*cmp > 0) + start = middle + 1; + else if (middle > 0) + last = middle - 1; + else + break; + } + while (start <= last); + return middle; +} + + +static Eina_Bool +_eina_inarray_iterator_next(Eina_Iterator_Inarray *it, void **data) +{ + EINA_MAGIC_CHECK_INARRAY_ITERATOR(it, EINA_FALSE); + + if (it->pos >= it->array->len) + return EINA_FALSE; + + *data = _eina_inarray_get(it->array, it->pos); + it->pos++; + + return EINA_TRUE; +} + +static Eina_Bool +_eina_inarray_iterator_prev(Eina_Iterator_Inarray *it, void **data) +{ + EINA_MAGIC_CHECK_INARRAY_ITERATOR(it, EINA_FALSE); + + if (it->pos == 0) + return EINA_FALSE; + + it->pos--; + *data = _eina_inarray_get(it->array, it->pos); + + return EINA_TRUE; +} + +static Eina_Inarray * +_eina_inarray_iterator_get_container(Eina_Iterator_Inarray *it) +{ + EINA_MAGIC_CHECK_INARRAY_ITERATOR(it, NULL); + return (Eina_Inarray *)it->array; +} + +static void +_eina_inarray_iterator_free(Eina_Iterator_Inarray *it) +{ + EINA_MAGIC_CHECK_INARRAY_ITERATOR(it); + MAGIC_FREE(it); +} + +static Eina_Bool +_eina_inarray_accessor_get_at(Eina_Accessor_Inarray *it, unsigned int pos, void **data) +{ + EINA_MAGIC_CHECK_INARRAY_ACCESSOR(it, EINA_FALSE); + + if (pos >= it->array->len) + return EINA_FALSE; + + *data = _eina_inarray_get(it->array, pos); + return EINA_TRUE; +} + +static Eina_Inarray * +_eina_inarray_accessor_get_container(Eina_Accessor_Inarray *it) +{ + EINA_MAGIC_CHECK_INARRAY_ACCESSOR(it, NULL); + return (Eina_Inarray *)it->array; +} + +static void +_eina_inarray_accessor_free(Eina_Accessor_Inarray *it) +{ + EINA_MAGIC_CHECK_INARRAY_ACCESSOR(it); + MAGIC_FREE(it); +} + +/** + * @endcond + */ + + +/*============================================================================* +* Global * +*============================================================================*/ + +/** + * @internal + * @brief Initialize the inline array module. + * + * @return #EINA_TRUE on success, #EINA_FALSE on failure. + * + * This function sets up the inline array module of Eina. It is called + * by eina_init(). + * + * @see eina_init() + */ +Eina_Bool +eina_inarray_init(void) +{ + _eina_inarray_log_dom = eina_log_domain_register("eina_inarray", + EINA_LOG_COLOR_DEFAULT); + if (_eina_inarray_log_dom < 0) + { + EINA_LOG_ERR("Could not register log domain: eina_inarray"); + return EINA_FALSE; + } + +#define EMS(n) eina_magic_string_static_set(n, n ## _STR) + EMS(EINA_MAGIC_INARRAY); + EMS(EINA_MAGIC_INARRAY_ITERATOR); + EMS(EINA_MAGIC_INARRAY_ACCESSOR); +#undef EMS + + return EINA_TRUE; +} + +/** + * @internal + * @brief Shut down the inline array module. + * + * @return #EINA_TRUE on success, #EINA_FALSE on failure. + * + * This function shuts down the inline array module set up by + * eina_inarray_init(). It is called by eina_shutdown(). + * + * @see eina_shutdown() + */ +Eina_Bool +eina_inarray_shutdown(void) +{ + eina_log_domain_unregister(_eina_inarray_log_dom); + _eina_inarray_log_dom = -1; + return EINA_TRUE; +} + +/*============================================================================* +* API * +*============================================================================*/ +EAPI Eina_Inarray * +eina_inarray_new(unsigned int member_size, unsigned int step) +{ + Eina_Inarray *ret; + + EINA_SAFETY_ON_TRUE_RETURN_VAL(member_size == 0, NULL); + + ret = malloc(sizeof(*ret)); + if (!ret) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return NULL; + } + eina_error_set(0); + _eina_inarray_setup(ret, member_size, step); + return ret; +} + +EAPI void +eina_inarray_free(Eina_Inarray *array) +{ + EINA_MAGIC_CHECK_INARRAY(array); + free(array->members); + free(array); +} + +EAPI void +eina_inarray_setup(Eina_Inarray *array, unsigned int member_size, unsigned int step) +{ + EINA_SAFETY_ON_NULL_RETURN(array); + EINA_SAFETY_ON_TRUE_RETURN(member_size == 0); + _eina_inarray_setup(array, member_size, step); +} + +EAPI void +eina_inarray_flush(Eina_Inarray *array) +{ + EINA_MAGIC_CHECK_INARRAY(array); + free(array->members); + array->len = 0; + array->max = 0; + array->members = NULL; +} + +EAPI int +eina_inarray_append(Eina_Inarray *array, const void *data) +{ + void *p; + + EINA_MAGIC_CHECK_INARRAY(array, -1); + EINA_SAFETY_ON_NULL_RETURN_VAL(data, -1); + + if (!_eina_inarray_resize(array, array->len + 1)) + return -1; + + p = _eina_inarray_get(array, array->len); + memcpy(p, data, array->member_size); + + array->len++; + return array->len - 1; +} + +EAPI int +eina_inarray_insert(Eina_Inarray *array, const void *data, Eina_Compare_Cb compare) +{ + const unsigned char *itr, *itr_end; + unsigned int sz; + + EINA_MAGIC_CHECK_INARRAY(array, -1); + EINA_SAFETY_ON_NULL_RETURN_VAL(data, -1); + EINA_SAFETY_ON_NULL_RETURN_VAL(compare, -1); + + sz = array->member_size; + itr = array->members; + itr_end = itr + array->len * sz; + for (; itr < itr_end; itr += sz) + { + unsigned int offset, position; + int cmp = compare(itr, data); + if (cmp <= 0) + continue; + + offset = itr - (unsigned char *)array->members; + position = offset / sz; + if (!eina_inarray_insert_at(array, position, data)) + return -1; + return position; + } + return eina_inarray_append(array, data); +} + +EAPI int +eina_inarray_insert_sorted(Eina_Inarray *array, const void *data, Eina_Compare_Cb compare) +{ + unsigned int pos; + int cmp; + + EINA_MAGIC_CHECK_INARRAY(array, -1); + EINA_SAFETY_ON_NULL_RETURN_VAL(data, -1); + EINA_SAFETY_ON_NULL_RETURN_VAL(compare, -1); + + pos = _eina_inarray_search_sorted_near(array, data, compare, &cmp); + if (cmp > 0) + pos++; + + if (!eina_inarray_insert_at(array, pos, data)) + return -1; + return pos; +} + +EAPI int +eina_inarray_remove(Eina_Inarray *array, const void *data) +{ + const unsigned char *itr, *itr_end; + unsigned int position, sz; + + EINA_MAGIC_CHECK_INARRAY(array, -1); + EINA_SAFETY_ON_NULL_RETURN_VAL(data, -1); + + sz = array->member_size; + if ((data >= array->members) && + (data < _eina_inarray_get(array, array->len))) + { + unsigned int offset = ((unsigned char *)data - + (unsigned char *)array->members); + position = offset / sz; + goto found; + } + + itr = array->members; + itr_end = itr + array->len * sz; + for (; itr < itr_end; itr += sz) + { + if (memcmp(data, itr, sz) == 0) + { + unsigned int offset = itr - (unsigned char *)array->members; + position = offset / sz; + goto found; + } + } + return -1; + +found: + if (!eina_inarray_remove_at(array, position)) + return -1; + return position; +} + +EAPI int +eina_inarray_pop(Eina_Inarray *array) +{ + EINA_MAGIC_CHECK_INARRAY(array, -1); + EINA_SAFETY_ON_TRUE_RETURN_VAL(array->len == 0, -1); + if (!_eina_inarray_resize(array, array->len - 1)) + return -1; + array->len--; + return array->len + 1; +} + +EAPI void * +eina_inarray_nth(const Eina_Inarray *array, unsigned int position) +{ + EINA_MAGIC_CHECK_INARRAY(array, NULL); + EINA_SAFETY_ON_TRUE_RETURN_VAL(position >= array->len, NULL); + return _eina_inarray_get(array, position); +} + +EAPI Eina_Bool +eina_inarray_insert_at(Eina_Inarray *array, unsigned int position, const void *data) +{ + unsigned int sz; + unsigned char *p; + + EINA_MAGIC_CHECK_INARRAY(array, EINA_FALSE); + EINA_SAFETY_ON_TRUE_RETURN_VAL(position > array->len, EINA_FALSE); + + if (!_eina_inarray_resize(array, array->len + 1)) + return EINA_FALSE; + + p = _eina_inarray_get(array, position); + sz = array->member_size; + if (array->len > position) + memmove(p + sz, p, (array->len - position) * sz); + memcpy(p, data, sz); + + array->len++; + return EINA_TRUE; +} + +EAPI void * +eina_inarray_alloc_at(Eina_Inarray *array, unsigned int position, unsigned int member_count) +{ + unsigned int sz; + unsigned char *p; + + EINA_MAGIC_CHECK_INARRAY(array, NULL); + EINA_SAFETY_ON_TRUE_RETURN_VAL(position > array->len, NULL); + EINA_SAFETY_ON_TRUE_RETURN_VAL(member_count == 0, NULL); + + if (!_eina_inarray_resize(array, array->len + member_count)) + return NULL; + + p = _eina_inarray_get(array, position); + sz = array->member_size; + if (array->len > position) + memmove(p + member_count * sz, p, (array->len - position) * sz); + + array->len += member_count; + return p; +} + +EAPI Eina_Bool +eina_inarray_replace_at(Eina_Inarray *array, unsigned int position, const void *data) +{ + unsigned char *p; + + EINA_MAGIC_CHECK_INARRAY(array, EINA_FALSE); + EINA_SAFETY_ON_TRUE_RETURN_VAL(position >= array->len, EINA_FALSE); + + p = _eina_inarray_get(array, position); + memcpy(p, data, array->member_size); + + return EINA_TRUE; +} + +EAPI Eina_Bool +eina_inarray_remove_at(Eina_Inarray *array, unsigned int position) +{ + EINA_MAGIC_CHECK_INARRAY(array, EINA_FALSE); + EINA_SAFETY_ON_TRUE_RETURN_VAL(position >= array->len, EINA_FALSE); + + if (position + 1 < array->len) + { + unsigned int sz = array->member_size; + unsigned char *p = _eina_inarray_get(array, position); + memmove(p, p + sz, (array->len - position - 1) * sz); + } + + _eina_inarray_resize(array, array->len - 1); + array->len--; + return EINA_TRUE; +} + +EAPI void +eina_inarray_reverse(Eina_Inarray *array) +{ + size_t sz; + unsigned char *fwd, *rev, *fwd_end; + void *tmp; + + EINA_MAGIC_CHECK_INARRAY(array); + + if (array->len < 2) + return; + + sz = array->member_size; + + tmp = alloca(sz); + EINA_SAFETY_ON_NULL_RETURN(tmp); + + fwd = array->members; + fwd_end = fwd + (array->len / 2) * sz; + + rev = fwd + (array->len - 1) * sz; + + for (; fwd < fwd_end; fwd += sz, rev -= sz) + { + memcpy(tmp, fwd, sz); + memcpy(fwd, rev, sz); + memcpy(rev, tmp, sz); + } +} + +EAPI void +eina_inarray_sort(Eina_Inarray *array, Eina_Compare_Cb compare) +{ + EINA_MAGIC_CHECK_INARRAY(array); + EINA_SAFETY_ON_NULL_RETURN(compare); + qsort(array->members, array->len, array->member_size, compare); +} + +EAPI int +eina_inarray_search(const Eina_Inarray *array, const void *data, Eina_Compare_Cb compare) +{ + EINA_MAGIC_CHECK_INARRAY(array, -1); + EINA_SAFETY_ON_NULL_RETURN_VAL(data, -1); + EINA_SAFETY_ON_NULL_RETURN_VAL(compare, -1); + return _eina_inarray_search(array, data, compare); +} + +EAPI int +eina_inarray_search_sorted(const Eina_Inarray *array, const void *data, Eina_Compare_Cb compare) +{ + unsigned int pos; + int cmp; + + EINA_MAGIC_CHECK_INARRAY(array, -1); + EINA_SAFETY_ON_NULL_RETURN_VAL(data, -1); + EINA_SAFETY_ON_NULL_RETURN_VAL(compare, -1); + + pos = _eina_inarray_search_sorted_near(array, data, compare, &cmp); + if (cmp == 0) + return pos; + return -1; +} + +EAPI Eina_Bool +eina_inarray_foreach(const Eina_Inarray *array, Eina_Each_Cb function, const void *user_data) +{ + unsigned char *itr, *itr_end; + unsigned int sz; + Eina_Bool ret = EINA_TRUE; + + EINA_MAGIC_CHECK_INARRAY(array, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(function, EINA_FALSE); + + sz = array->member_size; + itr = array->members; + itr_end = itr + array->len * sz; + for (; (itr < itr_end) && (ret); itr += sz) + ret = function(array, itr, (void *)user_data); + return ret; +} + +EAPI int +eina_inarray_foreach_remove(Eina_Inarray *array, Eina_Each_Cb match, const void *user_data) +{ + unsigned int i = 0, count = 0; + + EINA_MAGIC_CHECK_INARRAY(array, -1); + EINA_SAFETY_ON_NULL_RETURN_VAL(match, -1); + + while (i < array->len) + { + void *p = _eina_inarray_get(array, i); + if (match(array, p, (void *)user_data) == EINA_FALSE) + { + i++; + continue; + } + + eina_inarray_remove_at(array, i); + count++; + } + + return count; +} + +EAPI unsigned int +eina_inarray_count(const Eina_Inarray *array) +{ + EINA_MAGIC_CHECK_INARRAY(array, 0); + return array->len; +} + +EAPI Eina_Iterator * +eina_inarray_iterator_new(const Eina_Inarray *array) +{ + Eina_Iterator_Inarray *it; + + EINA_MAGIC_CHECK_INARRAY(array, NULL); + + eina_error_set(0); + it = calloc(1, sizeof(Eina_Iterator_Inarray)); + if (!it) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return NULL; + } + + EINA_MAGIC_SET(it, EINA_MAGIC_INARRAY_ITERATOR); + EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); + + it->array = array; + + it->iterator.version = EINA_ITERATOR_VERSION; + it->iterator.next = FUNC_ITERATOR_NEXT(_eina_inarray_iterator_next); + it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER + (_eina_inarray_iterator_get_container); + it->iterator.free = FUNC_ITERATOR_FREE(_eina_inarray_iterator_free); + + return &it->iterator; +} + +EAPI Eina_Iterator * +eina_inarray_iterator_reversed_new(const Eina_Inarray *array) +{ + Eina_Iterator_Inarray *it; + + EINA_MAGIC_CHECK_INARRAY(array, NULL); + + eina_error_set(0); + it = calloc(1, sizeof(Eina_Iterator_Inarray)); + if (!it) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return NULL; + } + + EINA_MAGIC_SET(it, EINA_MAGIC_INARRAY_ITERATOR); + EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); + + it->array = array; + it->pos = array->len; + + it->iterator.version = EINA_ITERATOR_VERSION; + it->iterator.next = FUNC_ITERATOR_NEXT(_eina_inarray_iterator_prev); + it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER + (_eina_inarray_iterator_get_container); + it->iterator.free = FUNC_ITERATOR_FREE(_eina_inarray_iterator_free); + + return &it->iterator; +} + +EAPI Eina_Accessor * +eina_inarray_accessor_new(const Eina_Inarray *array) +{ + Eina_Accessor_Inarray *ac; + + EINA_MAGIC_CHECK_INARRAY(array, NULL); + + eina_error_set(0); + ac = calloc(1, sizeof(Eina_Accessor_Inarray)); + if (!ac) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return NULL; + } + + EINA_MAGIC_SET(ac, EINA_MAGIC_INARRAY_ACCESSOR); + EINA_MAGIC_SET(&ac->accessor, EINA_MAGIC_ACCESSOR); + + ac->array = array; + + ac->accessor.version = EINA_ACCESSOR_VERSION; + ac->accessor.get_at = FUNC_ACCESSOR_GET_AT(_eina_inarray_accessor_get_at); + ac->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER + (_eina_inarray_accessor_get_container); + ac->accessor.free = FUNC_ACCESSOR_FREE(_eina_inarray_accessor_free); + + return &ac->accessor; +} diff --git a/libraries/eina/src/lib/eina_log.c b/libraries/eina/src/lib/eina_log.c index dd772d2..4e2bb6d 100644 --- a/libraries/eina/src/lib/eina_log.c +++ b/libraries/eina/src/lib/eina_log.c @@ -71,6 +71,7 @@ #define EINA_LOG_ENV_FILE_DISABLE "EINA_LOG_FILE_DISABLE" #define EINA_LOG_ENV_FUNCTION_DISABLE "EINA_LOG_FUNCTION_DISABLE" +#ifdef EINA_ENABLE_LOG // Structure for storing domain level settings passed from the command line // that will be matched with application-defined domains. @@ -1294,6 +1295,8 @@ eina_log_print_unlocked(int domain, abort(); } +#endif + /** * @endcond */ @@ -1321,6 +1324,7 @@ eina_log_print_unlocked(int domain, Eina_Bool eina_log_init(void) { +#ifdef EINA_ENABLE_LOG const char *level, *tmp; int color_disable; @@ -1392,6 +1396,7 @@ eina_log_init(void) // Parse pending domains passed through EINA_LOG_LEVELS eina_log_domain_parse_pendings(); +#endif return EINA_TRUE; } @@ -1413,6 +1418,7 @@ eina_log_init(void) Eina_Bool eina_log_shutdown(void) { +#ifdef EINA_ENABLE_LOG Eina_Inlist *tmp; while (_log_domains_count--) @@ -1443,6 +1449,7 @@ eina_log_shutdown(void) free(tmp); } +#endif return EINA_TRUE; } @@ -1460,10 +1467,12 @@ eina_log_shutdown(void) void eina_log_threads_init(void) { +#ifdef EINA_ENABLE_LOG if (_threads_inited) return; _main_thread = SELF(); if (!INIT()) return; _threads_inited = EINA_TRUE; +#endif } /** @@ -1478,11 +1487,13 @@ eina_log_threads_init(void) void eina_log_threads_shutdown(void) { +#ifdef EINA_ENABLE_LOG if (!_threads_inited) return; CHECK_MAIN(); SHUTDOWN(); _threads_enabled = EINA_FALSE; _threads_inited = EINA_FALSE; +#endif } #endif @@ -1504,7 +1515,7 @@ EAPI int EINA_LOG_DOMAIN_GLOBAL = 0; EAPI void eina_log_threads_enable(void) { -#ifdef EFL_HAVE_THREADS +#if defined (EFL_HAVE_THREADS) && defined (EINA_ENABLE_LOG) if (_threads_enabled) return; if (!_threads_inited) eina_log_threads_init(); _threads_enabled = EINA_TRUE; @@ -1515,32 +1526,45 @@ eina_log_threads_enable(void) EAPI void eina_log_print_cb_set(Eina_Log_Print_Cb cb, void *data) { +#ifdef EINA_ENABLE_LOG LOG_LOCK(); _print_cb = cb; _print_cb_data = data; eina_log_print_prefix_update(); LOG_UNLOCK(); +#else + (void) cb; + (void) data; +#endif } EAPI void eina_log_level_set(int level) { +#ifdef EINA_ENABLE_LOG _log_level = level; if (EINA_LIKELY((EINA_LOG_DOMAIN_GLOBAL >= 0) && ((unsigned int)EINA_LOG_DOMAIN_GLOBAL < _log_domains_count))) _log_domains[EINA_LOG_DOMAIN_GLOBAL].level = level; +#else + (void) level; +#endif } EAPI int eina_log_level_get(void) { +#ifdef EINA_ENABLE_LOG return _log_level; +#else + return 0; +#endif } EAPI Eina_Bool eina_log_main_thread_check(void) { -#ifdef EFL_HAVE_THREADS +#if defined (EFL_HAVE_THREADS) && defined (EINA_ENABLE_LOG) return ((!_threads_enabled) || IS_MAIN(SELF())); #else return EINA_TRUE; @@ -1550,66 +1574,107 @@ eina_log_main_thread_check(void) EAPI void eina_log_color_disable_set(Eina_Bool disabled) { +#ifdef EINA_ENABLE_LOG _disable_color = disabled; +#else + (void) disabled; +#endif } EAPI Eina_Bool eina_log_color_disable_get(void) { +#ifdef EINA_ENABLE_LOG return _disable_color; +#else + return EINA_TRUE; +#endif } EAPI void eina_log_file_disable_set(Eina_Bool disabled) { +#ifdef EINA_ENABLE_LOG _disable_file = disabled; +#else + (void) disabled; +#endif } EAPI Eina_Bool eina_log_file_disable_get(void) { +#ifdef EINA_ENABLE_LOG return _disable_file; +#else + return EINA_TRUE; +#endif } EAPI void eina_log_function_disable_set(Eina_Bool disabled) { +#ifdef EINA_ENABLE_LOG _disable_function = disabled; +#else + (void) disabled; +#endif } EAPI Eina_Bool eina_log_function_disable_get(void) { +#ifdef EINA_ENABLE_LOG return _disable_function; +#else + return EINA_TRUE; +#endif } EAPI void eina_log_abort_on_critical_set(Eina_Bool abort_on_critical) { +#ifdef EINA_ENABLE_LOG _abort_on_critical = abort_on_critical; +#else + (void) abort_on_critical; +#endif } EAPI Eina_Bool eina_log_abort_on_critical_get(void) { +#ifdef EINA_ENABLE_LOG return _abort_on_critical; +#else + return EINA_FALSE; +#endif } EAPI void eina_log_abort_on_critical_level_set(int critical_level) { +#ifdef EINA_ENABLE_LOG _abort_level_on_critical = critical_level; +#else + (void) critical_level; +#endif } EAPI int eina_log_abort_on_critical_level_get(void) { +#ifdef EINA_ENABLE_LOG return _abort_level_on_critical; +#else + return 0; +#endif } EAPI int eina_log_domain_register(const char *name, const char *color) { +#ifdef EINA_ENABLE_LOG int r; EINA_SAFETY_ON_NULL_RETURN_VAL(name, -1); @@ -1618,20 +1683,30 @@ eina_log_domain_register(const char *name, const char *color) r = eina_log_domain_register_unlocked(name, color); LOG_UNLOCK(); return r; +#else + (void) name; + (void) color; + return 0; +#endif } EAPI void eina_log_domain_unregister(int domain) { +#ifdef EINA_ENABLE_LOG EINA_SAFETY_ON_FALSE_RETURN(domain >= 0); LOG_LOCK(); eina_log_domain_unregister_unlocked(domain); LOG_UNLOCK(); +#else + (void) domain; +#endif } EAPI void eina_log_domain_level_set(const char *domain_name, int level) { +#ifdef EINA_ENABLE_LOG Eina_Log_Domain_Level_Pending *pending; size_t namelen; unsigned int i; @@ -1672,11 +1747,16 @@ eina_log_domain_level_set(const char *domain_name, int level) memcpy(pending->name, domain_name, namelen + 1); _pending_list = eina_inlist_append(_pending_list, EINA_INLIST_GET(pending)); +#else + (void) domain_name; + (void) level; +#endif } EAPI int eina_log_domain_level_get(const char *domain_name) { +#ifdef EINA_ENABLE_LOG Eina_Log_Domain_Level_Pending *pending; size_t namelen; unsigned int i; @@ -1711,17 +1791,26 @@ eina_log_domain_level_get(const char *domain_name) } return _log_level; +#else + (void) domain_name; + return 0; +#endif } EAPI int eina_log_domain_registered_level_get(int domain) { +#ifdef EINA_ENABLE_LOG EINA_SAFETY_ON_FALSE_RETURN_VAL(domain >= 0, EINA_LOG_LEVEL_UNKNOWN); EINA_SAFETY_ON_FALSE_RETURN_VAL((unsigned int)domain < _log_domains_count, EINA_LOG_LEVEL_UNKNOWN); EINA_SAFETY_ON_TRUE_RETURN_VAL(_log_domains[domain].deleted, EINA_LOG_LEVEL_UNKNOWN); return _log_domains[domain].level; +#else + (void) domain; + return 0; +#endif } EAPI void @@ -1734,9 +1823,20 @@ eina_log_print_cb_stderr(const Eina_Log_Domain *d, __UNUSED__ void *data, va_list args) { +#ifdef EINA_ENABLE_LOG _eina_log_print_prefix(stderr, d, level, file, fnc, line); vfprintf(stderr, fmt, args); putc('\n', stderr); +#else + (void) d; + (void) level; + (void) file; + (void) fnc; + (void) line; + (void) fmt; + (void) data; + (void) args; +#endif } EAPI void @@ -1749,9 +1849,20 @@ eina_log_print_cb_stdout(const Eina_Log_Domain *d, __UNUSED__ void *data, va_list args) { +#ifdef EINA_ENABLE_LOG _eina_log_print_prefix(stdout, d, level, file, fnc, line); vprintf(fmt, args); putchar('\n'); +#else + (void) d; + (void) level; + (void) file; + (void) fnc; + (void) line; + (void) fmt; + (void) data; + (void) args; +#endif } EAPI void @@ -1764,6 +1875,7 @@ eina_log_print_cb_file(const Eina_Log_Domain *d, void *data, va_list args) { +#ifdef EINA_ENABLE_LOG FILE *f = data; #ifdef EFL_HAVE_THREADS if (_threads_enabled) @@ -1787,12 +1899,22 @@ end: #endif vfprintf(f, fmt, args); putc('\n', f); +#else + (void) d; + (void) file; + (void) fnc; + (void) line; + (void) fmt; + (void) data; + (void) args; +#endif } EAPI void eina_log_print(int domain, Eina_Log_Level level, const char *file, const char *fnc, int line, const char *fmt, ...) { +#ifdef EINA_ENABLE_LOG va_list args; #ifdef EINA_SAFETY_CHECKS @@ -1820,12 +1942,22 @@ eina_log_print(int domain, Eina_Log_Level level, const char *file, eina_log_print_unlocked(domain, level, file, fnc, line, fmt, args); LOG_UNLOCK(); va_end(args); +#else + (void) domain; + (void) level; + (void) file; + (void) fnc; + (void) line; + (void) fmt; +#endif } EAPI void eina_log_vprint(int domain, Eina_Log_Level level, const char *file, const char *fnc, int line, const char *fmt, va_list args) { +#ifdef EINA_ENABLE_LOG + #ifdef EINA_SAFETY_CHECKS if (EINA_UNLIKELY(!file)) { @@ -1849,4 +1981,13 @@ eina_log_vprint(int domain, Eina_Log_Level level, const char *file, LOG_LOCK(); eina_log_print_unlocked(domain, level, file, fnc, line, fmt, args); LOG_UNLOCK(); +#else + (void) domain; + (void) level; + (void) file; + (void) fnc; + (void) line; + (void) fmt; + (void) args; +#endif } diff --git a/libraries/eina/src/lib/eina_magic.c b/libraries/eina/src/lib/eina_magic.c index 1adde92..d1f71cc 100644 --- a/libraries/eina/src/lib/eina_magic.c +++ b/libraries/eina/src/lib/eina_magic.c @@ -79,7 +79,7 @@ _eina_magic_strings_sort_cmp(const void *p1, const void *p2) static int _eina_magic_strings_find_cmp(const void *p1, const void *p2) { - Eina_Magic a = (Eina_Magic)p1; + Eina_Magic a = (Eina_Magic)(size_t)p1; const Eina_Magic_String *b = p2; return a - b->magic; } @@ -129,6 +129,10 @@ _eina_magic_strings_alloc(void) * Global * *============================================================================*/ +EAPI Eina_Error EINA_ERROR_MAGIC_FAILED = 0; + +static const char EINA_ERROR_MAGIC_FAILED_STR[] = "Magic check failed."; + /** * @internal * @brief Initialize the magic string module. @@ -150,6 +154,8 @@ eina_magic_string_init(void) EINA_LOG_ERR("Could not register log domain: eina_magic_string"); return EINA_FALSE; } + EINA_ERROR_MAGIC_FAILED = eina_error_msg_static_register( + EINA_ERROR_MAGIC_FAILED_STR); return EINA_TRUE; } @@ -206,7 +212,7 @@ eina_magic_string_get(Eina_Magic magic) _eina_magic_strings_dirty = 0; } - ems = bsearch((void *)magic, _eina_magic_strings, + ems = bsearch((void *)(size_t)magic, _eina_magic_strings, _eina_magic_strings_count, sizeof(Eina_Magic_String), _eina_magic_strings_find_cmp); if (ems) @@ -271,6 +277,7 @@ eina_magic_fail(void *d, const char *fnc, int line) { + eina_error_set(EINA_ERROR_MAGIC_FAILED); if (!d) eina_log_print(EINA_LOG_DOMAIN_GLOBAL, EINA_LOG_LEVEL_CRITICAL, file, fnc, line, diff --git a/libraries/eina/src/lib/eina_main.c b/libraries/eina/src/lib/eina_main.c index 8727f83..79f8a36 100644 --- a/libraries/eina/src/lib/eina_main.c +++ b/libraries/eina/src/lib/eina_main.c @@ -67,6 +67,8 @@ #include "eina_rectangle.h" #include "eina_safety_checks.h" #include "eina_inlist.h" +#include "eina_inarray.h" +#include "eina_value.h" /*============================================================================* * Local * @@ -131,6 +133,7 @@ EAPI Eina_Inlist *_eina_tracking = NULL; S(magic_string); S(iterator); S(accessor); + S(inarray); S(array); S(module); S(mempool); @@ -149,6 +152,7 @@ EAPI Eina_Inlist *_eina_tracking = NULL; S(simple_xml); S(file); S(prefix); + S(value); #undef S struct eina_desc_setup @@ -161,17 +165,18 @@ struct eina_desc_setup static const struct eina_desc_setup _eina_desc_setup[] = { #define S(x) {# x, eina_ ## x ## _init, eina_ ## x ## _shutdown} /* log is a special case as it needs printf */ + S(stringshare), S(error), S(safety_checks), S(magic_string), S(iterator), S(accessor), + S(inarray), S(array), S(module), S(mempool), S(list), S(binshare), - S(stringshare), S(ustringshare), S(matrixsparse), S(convert), @@ -183,7 +188,8 @@ static const struct eina_desc_setup _eina_desc_setup[] = { S(quadtree), S(simple_xml), S(file), - S(prefix) + S(prefix), + S(value) #undef S }; static const size_t _eina_desc_setup_len = sizeof(_eina_desc_setup) / @@ -236,8 +242,8 @@ eina_init(void) _mt_enabled = 1; mtrace(); } -#endif - +#endif + if (!eina_log_init()) { fprintf(stderr, "Could not initialize eina logging system.\n"); @@ -304,7 +310,7 @@ eina_shutdown(void) muntrace(); _mt_enabled = 0; } -#endif +#endif } return _eina_main_count; diff --git a/libraries/eina/src/lib/eina_mmap.c b/libraries/eina/src/lib/eina_mmap.c index fb27bd7..7929f0e 100644 --- a/libraries/eina/src/lib/eina_mmap.c +++ b/libraries/eina/src/lib/eina_mmap.c @@ -110,6 +110,8 @@ _eina_mmap_safe_sigbus(int sig __UNUSED__, errno = perrno; abort(); } + /* Look into mmaped Eina_File if it was one of them, just to remember for later request */ + eina_file_mmap_faulty(addr, _eina_mmap_pagesize); /* restore previous errno */ errno = perrno; } @@ -162,6 +164,9 @@ eina_mmap_safety_enabled_set(Eina_Bool enabled) sa.sa_sigaction = _eina_mmap_safe_sigbus; sa.sa_flags = SA_RESTART | SA_SIGINFO; sigemptyset(&sa.sa_mask); + /* FIXME: This is rubbish. We return EINA_FALSE whether sigaction + * fails or not. And we never set mmap_safe, so we always hit this + * code path. */ if (sigaction(SIGBUS, &sa, NULL) == 0) return EINA_FALSE; /* setup of SIGBUS handler failed, lets close zero page dev and fail */ close(_eina_mmap_zero_fd); diff --git a/libraries/eina/src/lib/eina_module.c b/libraries/eina/src/lib/eina_module.c index 0dd19a6..26df980 100644 --- a/libraries/eina/src/lib/eina_module.c +++ b/libraries/eina/src/lib/eina_module.c @@ -37,6 +37,7 @@ extern "C" void *alloca (size_t); #endif +#include #include #include #include diff --git a/libraries/eina/src/lib/eina_prefix.c b/libraries/eina/src/lib/eina_prefix.c index 9445222..5b4b0c0 100644 --- a/libraries/eina/src/lib/eina_prefix.c +++ b/libraries/eina/src/lib/eina_prefix.c @@ -150,25 +150,24 @@ _fallback(Eina_Prefix *pfx, const char *pkg_bin, const char *pkg_lib, STRDUP_REP(pfx->prefix_path_lib, pkg_lib); STRDUP_REP(pfx->prefix_path_data, pkg_data); STRDUP_REP(pfx->prefix_path_locale, pkg_locale); - fprintf(stderr, - "WARNING: Could not determine its installed prefix for '%s'\n" - " so am falling back on the compiled in default:\n" - " %s\n" - " implied by the following:\n" - " bindir = %s\n" - " libdir = %s\n" - " datadir = %s\n" - " localedir = %s\n" - " Try setting the following environment variables:\n" - " %s_PREFIX - points to the base prefix of install\n" - " or the next 4 variables\n" - " %s_BIN_DIR - provide a specific binary directory\n" - " %s_LIB_DIR - provide a specific library directory\n" - " %s_DATA_DIR - provide a specific data directory\n" - " %s_LOCALE_DIR - provide a specific locale directory\n" - , envprefix, - pfx->prefix_path, pkg_bin, pkg_lib, pkg_data, pkg_locale, - envprefix, envprefix, envprefix, envprefix, envprefix); + WRN("Could not determine its installed prefix for '%s'\n" + " so am falling back on the compiled in default:\n" + " %s\n" + " implied by the following:\n" + " bindir = %s\n" + " libdir = %s\n" + " datadir = %s\n" + " localedir = %s\n" + " Try setting the following environment variables:\n" + " %s_PREFIX - points to the base prefix of install\n" + " or the next 4 variables\n" + " %s_BIN_DIR - provide a specific binary directory\n" + " %s_LIB_DIR - provide a specific library directory\n" + " %s_DATA_DIR - provide a specific data directory\n" + " %s_LOCALE_DIR - provide a specific locale directory", + envprefix, + pfx->prefix_path, pkg_bin, pkg_lib, pkg_data, pkg_locale, + envprefix, envprefix, envprefix, envprefix, envprefix); pfx->fallback = 1; return 1; } diff --git a/libraries/eina/src/lib/eina_private.h b/libraries/eina/src/lib/eina_private.h index d390397..e31ab47 100644 --- a/libraries/eina/src/lib/eina_private.h +++ b/libraries/eina/src/lib/eina_private.h @@ -91,6 +91,10 @@ #define EINA_MAGIC_SIMPLE_XML_DATA 0x98761261 #define EINA_MAGIC_SIMPLE_XML_ATTRIBUTE 0x98761262 +#define EINA_MAGIC_INARRAY 0x98761270 +#define EINA_MAGIC_INARRAY_ITERATOR 0x98761271 +#define EINA_MAGIC_INARRAY_ACCESSOR 0x98761272 + #define EINA_MAGIC_CLASS 0x9877CB30 /* undef the following, we want out version */ @@ -136,5 +140,7 @@ void eina_log_threads_init(void); void eina_log_threads_shutdown(void); #endif +void eina_file_mmap_faulty(void *addr, long page_size); + #endif /* EINA_PRIVATE_H_ */ diff --git a/libraries/eina/src/lib/eina_rbtree.c b/libraries/eina/src/lib/eina_rbtree.c index c0c9f9e..5f1232c 100644 --- a/libraries/eina/src/lib/eina_rbtree.c +++ b/libraries/eina/src/lib/eina_rbtree.c @@ -83,7 +83,7 @@ _eina_rbtree_iterator_list_new(const Eina_Rbtree *tree) static Eina_Rbtree * _eina_rbtree_iterator_get_content(Eina_Iterator_Rbtree *it) { - if (eina_array_count_get(it->stack) <= 0) + if (eina_array_count(it->stack) <= 0) return NULL; return eina_array_data_get(it->stack, 0); @@ -110,10 +110,10 @@ _eina_rbtree_iterator_next(Eina_Iterator_Rbtree *it, void **data) Eina_Iterator_Rbtree_List *new; Eina_Rbtree *tree; - if (eina_array_count_get(it->stack) <= 0) + if (eina_array_count(it->stack) <= 0) return EINA_FALSE; - last = eina_array_data_get(it->stack, eina_array_count_get(it->stack) - 1); + last = eina_array_data_get(it->stack, eina_array_count(it->stack) - 1); tree = last->tree; if (!last->tree || last->up == EINA_TRUE) @@ -128,10 +128,10 @@ _eina_rbtree_iterator_next(Eina_Iterator_Rbtree *it, void **data) { free(last); - if (eina_array_count_get(it->stack) > 0) + if (eina_array_count(it->stack) > 0) { last = eina_array_data_get(it->stack, - eina_array_count_get( + eina_array_count( it-> stack) - 1); diff --git a/libraries/eina/src/lib/eina_simple_xml_parser.c b/libraries/eina/src/lib/eina_simple_xml_parser.c index 08a8259..4e357ba 100644 --- a/libraries/eina/src/lib/eina_simple_xml_parser.c +++ b/libraries/eina/src/lib/eina_simple_xml_parser.c @@ -38,7 +38,10 @@ extern "C" void *alloca (size_t); #endif -#include +#ifdef HAVE_STRINGS_H +# include +#endif +#include #include #include @@ -121,7 +124,7 @@ static inline const char * _eina_simple_xml_whitespace_find(const char *itr, const char *itr_end) { for (; itr < itr_end; itr++) - if (isspace(*itr)) break; + if (isspace((unsigned char)*itr)) break; return itr; } @@ -129,7 +132,7 @@ static inline const char * _eina_simple_xml_whitespace_skip(const char *itr, const char *itr_end) { for (; itr < itr_end; itr++) - if (!isspace(*itr)) break; + if (!isspace((unsigned char)*itr)) break; return itr; } @@ -137,7 +140,7 @@ static inline const char * _eina_simple_xml_whitespace_unskip(const char *itr, const char *itr_start) { for (itr--; itr > itr_start; itr--) - if (!isspace(*itr)) break; + if (!isspace((unsigned char)*itr)) break; return itr + 1; } @@ -309,7 +312,7 @@ eina_simple_xml_parse(const char *buf, unsigned buflen, Eina_Bool strip, Eina_Si (!memcmp(itr + 2, "DOCTYPE", sizeof("DOCTYPE") - 1)) && ((itr[2 + sizeof("DOCTYPE") - 1] == '>') || - (isspace(itr[2 + sizeof("DOCTYPE") - 1])))) + (isspace((unsigned char)itr[2 + sizeof("DOCTYPE") - 1])))) { type = EINA_SIMPLE_XML_DOCTYPE; toff = sizeof("!DOCTYPE") - 1; @@ -455,7 +458,7 @@ eina_simple_xml_tag_attributes_find(const char *buf, unsigned buflen) for (; itr < itr_end; itr++) { - if (!isspace(*itr)) + if (!isspace((unsigned char)*itr)) { /* user skip tagname and already gave it the attributes */ if (*itr == '=') @@ -492,7 +495,7 @@ eina_simple_xml_attributes_parse(const char *buf, unsigned buflen, Eina_Simple_X key = p; for (key_end = key; key_end < itr_end; key_end++) - if ((*key_end == '=') || (isspace(*key_end))) break; + if ((*key_end == '=') || (isspace((unsigned char)*key_end))) break; if (key_end == itr_end) return EINA_FALSE; if (key_end == key) continue; @@ -504,7 +507,7 @@ eina_simple_xml_attributes_parse(const char *buf, unsigned buflen, Eina_Simple_X value++; } for (; value < itr_end; value++) - if (!isspace(*value)) break; + if (!isspace((unsigned char)*value)) break; if (value == itr_end) return EINA_FALSE; if ((*value == '"') || (*value == '\'')) diff --git a/libraries/eina/src/lib/eina_strbuf.c b/libraries/eina/src/lib/eina_strbuf.c index 74b1eb9..828d842 100644 --- a/libraries/eina/src/lib/eina_strbuf.c +++ b/libraries/eina/src/lib/eina_strbuf.c @@ -162,9 +162,9 @@ eina_strbuf_insert_vprintf(Eina_Strbuf *buf, EAPI void eina_strbuf_trim(Eina_Strbuf *buf) { - char *c = buf->buf; + unsigned char *c = buf->buf; - while (buf->len > 0 && isspace(((unsigned char*)(buf->buf))[buf->len - 1])) + while (buf->len > 0 && isspace(c[buf->len - 1])) buf->len--; while (buf->len > 0 && isspace(*c)) { @@ -178,7 +178,7 @@ eina_strbuf_trim(Eina_Strbuf *buf) EAPI void eina_strbuf_ltrim(Eina_Strbuf *buf) { - char *c = buf->buf; + unsigned char *c = buf->buf; while (buf->len > 0 && isspace(*c)) { diff --git a/libraries/eina/src/lib/eina_value.c b/libraries/eina/src/lib/eina_value.c index 554f907..ba8af52 100644 --- a/libraries/eina/src/lib/eina_value.c +++ b/libraries/eina/src/lib/eina_value.c @@ -28,8 +28,4762 @@ # include "config.h" #endif +#ifdef HAVE_ALLOCA_H +# include +#elif defined __GNUC__ +# define alloca __builtin_alloca +#elif defined _AIX +# define alloca __alloca +#elif defined _MSC_VER +# include +# define alloca _alloca +#else +# include +# ifdef __cplusplus +extern "C" +# endif +void *alloca (size_t); +#endif + +#include /* asprintf() */ +#include /* PRId64 and PRIu64 */ +#include /* struct timeval */ + #include "eina_config.h" #include "eina_private.h" +#include "eina_error.h" +#include "eina_log.h" +#include "eina_strbuf.h" +#include "eina_mempool.h" +#include "eina_lock.h" + +/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ +#include "eina_safety_checks.h" +#include "eina_value.h" + +/*============================================================================* +* Local * +*============================================================================*/ + +/** + * @cond LOCAL + */ + +static Eina_Mempool *_eina_value_mp = NULL; +static Eina_Hash *_eina_value_inner_mps = NULL; +static Eina_Lock _eina_value_inner_mps_lock; +static char *_eina_value_mp_choice = NULL; +static int _eina_value_log_dom = -1; + +#ifdef ERR +#undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_eina_value_log_dom, __VA_ARGS__) + +#ifdef DBG +#undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_eina_value_log_dom, __VA_ARGS__) + +static const unsigned char eina_value_uchar_max = 255U; +static const char eina_value_char_max = 127; +static const char eina_value_char_min = -127 - 1; + +static const unsigned short eina_value_ushort_max = 65535U; +static const short eina_value_short_max = 32767; +static const short eina_value_short_min = -32767 - 1; + +static const unsigned int eina_value_uint_max = 4294967295U; +static const int eina_value_int_max = 2147483647; +static const int eina_value_int_min = -2147483647 - 1; + +static const uint64_t eina_value_uint64_max = 18446744073709551615ULL; +static const int64_t eina_value_int64_max = 9223372036854775807LL; +static const int64_t eina_value_int64_min = -9223372036854775807LL - 1LL; + +#if __WORDSIZE == 64 +static const unsigned long eina_value_ulong_max = 18446744073709551615ULL; +static const long eina_value_long_max = 9223372036854775807LL; +static const long eina_value_long_min = -9223372036854775807LL - 1LL; +#else +static const unsigned long eina_value_ulong_max = 4294967295U; +static const long eina_value_long_max = 2147483647; +static const long eina_value_long_min = -2147483647 - 1; +#endif + + +static Eina_Bool +_eina_value_type_uchar_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + unsigned char *tmem = mem; + *tmem = 0; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uchar_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__) +{ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uchar_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const unsigned char *s = src; + unsigned char *d = dst; + *d = *s; + return EINA_TRUE; +} + +static int +_eina_value_type_uchar_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const unsigned char *ta = a, *tb = b; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; +} + +static Eina_Bool +_eina_value_type_uchar_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const unsigned char v = *(const unsigned char *)type_mem; + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem = v; + if (EINA_UNLIKELY(v > (unsigned char)eina_value_char_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const char *other_mem; + char buf[64]; + snprintf(buf, sizeof(buf), "%hhu", v); + other_mem = buf; /* required due &buf == buf */ + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uchar_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + unsigned char *tmem = mem; + *tmem = va_arg(args, unsigned int); /* char is promoted to int for va_arg */ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uchar_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + unsigned char *tmem = mem; + const unsigned char *p = ptr; + *tmem = *p; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uchar_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + const unsigned char *tmem = mem; + unsigned char *p = ptr; + *p = *tmem; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_ushort_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + unsigned short *tmem = mem; + *tmem = 0; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_ushort_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__) +{ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_ushort_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const unsigned short *s = src; + unsigned short *d = dst; + *d = *s; + return EINA_TRUE; +} + +static int +_eina_value_type_ushort_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const unsigned short *ta = a, *tb = b; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; +} + +static Eina_Bool +_eina_value_type_ushort_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const unsigned short v = *(const unsigned short *)type_mem; + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem = v; + if (EINA_UNLIKELY(v > eina_value_uchar_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem = v; + if (EINA_UNLIKELY(v > (unsigned char)eina_value_char_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem = v; + if (EINA_UNLIKELY(v > (unsigned short)eina_value_short_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const char *other_mem; + char buf[64]; + snprintf(buf, sizeof(buf), "%hu", v); + other_mem = buf; /* required due &buf == buf */ + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_ushort_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + unsigned short *tmem = mem; + *tmem = va_arg(args, unsigned int); /* short is promoted to int for va_arg */ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_ushort_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + unsigned short *tmem = mem; + const unsigned short *p = ptr; + *tmem = *p; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_ushort_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + const unsigned short *tmem = mem; + unsigned short *p = ptr; + *p = *tmem; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uint_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + unsigned int *tmem = mem; + *tmem = 0; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uint_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__) +{ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uint_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const unsigned int *s = src; + unsigned int *d = dst; + *d = *s; + return EINA_TRUE; +} + +static int +_eina_value_type_uint_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const unsigned int *ta = a, *tb = b; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; +} + +static Eina_Bool +_eina_value_type_uint_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const unsigned int v = *(const unsigned int *)type_mem; + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem = v; + if (EINA_UNLIKELY(v > eina_value_uchar_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem = v; + if (EINA_UNLIKELY(v > eina_value_ushort_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem = v; + if (EINA_UNLIKELY(v > (unsigned char)eina_value_char_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem = v; + if (EINA_UNLIKELY(v > (unsigned short)eina_value_short_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem = v; + if (EINA_UNLIKELY(v > (unsigned int)eina_value_int_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const char *other_mem; + char buf[64]; + snprintf(buf, sizeof(buf), "%u", v); + other_mem = buf; /* required due &buf == buf */ + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uint_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + unsigned int *tmem = mem; + *tmem = va_arg(args, unsigned int); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uint_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + unsigned int *tmem = mem; + const unsigned int *p = ptr; + *tmem = *p; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uint_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + const unsigned int *tmem = mem; + unsigned int *p = ptr; + *p = *tmem; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_ulong_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + unsigned long *tmem = mem; + *tmem = 0; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_ulong_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__) +{ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_ulong_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const unsigned long *s = src; + unsigned long *d = dst; + *d = *s; + return EINA_TRUE; +} + +static int +_eina_value_type_ulong_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const unsigned long *ta = a, *tb = b; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; +} + +static Eina_Bool +_eina_value_type_ulong_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const unsigned long v = *(const unsigned long *)type_mem; + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem = v; + if (EINA_UNLIKELY(v > eina_value_uchar_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem = v; + if (EINA_UNLIKELY(v > eina_value_ushort_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem = v; + if (EINA_UNLIKELY(v > eina_value_uint_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem = v; + if (EINA_UNLIKELY(v > (unsigned char)eina_value_char_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem = v; + if (EINA_UNLIKELY(v > (unsigned short)eina_value_short_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem = v; + if (EINA_UNLIKELY(v > (unsigned int)eina_value_int_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem = v; + if (EINA_UNLIKELY(v > (unsigned long)eina_value_long_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const char *other_mem; + char buf[64]; + snprintf(buf, sizeof(buf), "%lu", v); + other_mem = buf; /* required due &buf == buf */ + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_ulong_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + unsigned long *tmem = mem; + *tmem = va_arg(args, unsigned long); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_ulong_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + unsigned long *tmem = mem; + const unsigned long *p = ptr; + *tmem = *p; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_ulong_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + const unsigned long *tmem = mem; + unsigned long *p = ptr; + *p = *tmem; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uint64_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + uint64_t *tmem = mem; + *tmem = 0; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uint64_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__) +{ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uint64_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const uint64_t *s = src; + uint64_t *d = dst; + *d = *s; + return EINA_TRUE; +} + +static int +_eina_value_type_uint64_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const uint64_t *ta = a, *tb = b; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; +} + +static Eina_Bool +_eina_value_type_uint64_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const uint64_t v = *(const uint64_t *)type_mem; + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem = v; + if (EINA_UNLIKELY(v > eina_value_uchar_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem = v; + if (EINA_UNLIKELY(v > eina_value_ushort_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem = v; + if (EINA_UNLIKELY(v > eina_value_uint_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem = v; + if (EINA_UNLIKELY((sizeof(other_mem) != sizeof(v)) && + (v > eina_value_ulong_max))) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem = v; + if (EINA_UNLIKELY(v > (unsigned char)eina_value_char_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem = v; + if (EINA_UNLIKELY(v > (unsigned short)eina_value_short_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem = v; + if (EINA_UNLIKELY(v > (unsigned int)eina_value_int_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem = v; + if (EINA_UNLIKELY(v > (unsigned long)eina_value_long_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem = v; + if (EINA_UNLIKELY(v > (uint64_t)eina_value_int64_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const char *other_mem; + char buf[64]; + snprintf(buf, sizeof(buf), "%"PRIu64, v); + other_mem = buf; /* required due &buf == buf */ + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uint64_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + uint64_t *tmem = mem; + *tmem = va_arg(args, uint64_t); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uint64_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + uint64_t *tmem = mem; + const uint64_t *p = ptr; + *tmem = *p; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_uint64_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + const uint64_t *tmem = mem; + uint64_t *p = ptr; + *p = *tmem; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_char_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + char *tmem = mem; + *tmem = 0; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_char_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__) +{ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_char_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const char *s = src; + char *d = dst; + *d = *s; + return EINA_TRUE; +} + +static int +_eina_value_type_char_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const char *ta = a, *tb = b; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; +} + +static Eina_Bool +_eina_value_type_char_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const signed char v = *(const signed char *)type_mem; + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const char *other_mem; + char buf[64]; + snprintf(buf, sizeof(buf), "%hhd", v); + other_mem = buf; /* required due &buf == buf */ + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_char_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + char *tmem = mem; + *tmem = va_arg(args, int); /* char is promoted to int for va_arg */ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_char_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + char *tmem = mem; + const char *p = ptr; + *tmem = *p; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_char_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + const char *tmem = mem; + char *p = ptr; + *p = *tmem; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_short_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + short *tmem = mem; + *tmem = 0; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_short_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__) +{ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_short_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const short *s = src; + short *d = dst; + *d = *s; + return EINA_TRUE; +} + +static int +_eina_value_type_short_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const short *ta = a, *tb = b; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; +} + +static Eina_Bool +_eina_value_type_short_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const short v = *(const short *)type_mem; + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_uchar_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem = v; + if (EINA_UNLIKELY(v < eina_value_char_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_char_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const char *other_mem; + char buf[64]; + snprintf(buf, sizeof(buf), "%hd", v); + other_mem = buf; /* required due &buf == buf */ + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_short_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + short *tmem = mem; + *tmem = va_arg(args, int); /* short int is promoted to int for va_arg */ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_short_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + short *tmem = mem; + const short *p = ptr; + *tmem = *p; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_short_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + const short *tmem = mem; + short *p = ptr; + *p = *tmem; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_int_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + int *tmem = mem; + *tmem = 0; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_int_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__) +{ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_int_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const int *s = src; + int *d = dst; + *d = *s; + return EINA_TRUE; +} + +static int +_eina_value_type_int_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const int *ta = a, *tb = b; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; +} + +static Eina_Bool +_eina_value_type_int_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const int v = *(const int *)type_mem; + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_uchar_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_ushort_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem = v; + if (EINA_UNLIKELY(v < eina_value_char_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_char_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem = v; + if (EINA_UNLIKELY(v < eina_value_short_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_short_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const char *other_mem; + char buf[64]; + snprintf(buf, sizeof(buf), "%d", v); + other_mem = buf; /* required due &buf == buf */ + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_int_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + int *tmem = mem; + *tmem = va_arg(args, int); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_int_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + int *tmem = mem; + const int *p = ptr; + *tmem = *p; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_int_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + const int *tmem = mem; + int *p = ptr; + *p = *tmem; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_long_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + long *tmem = mem; + *tmem = 0; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_long_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__) +{ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_long_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const long *s = src; + long *d = dst; + *d = *s; + return EINA_TRUE; +} + +static int +_eina_value_type_long_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const long *ta = a, *tb = b; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; +} + +static Eina_Bool +_eina_value_type_long_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const long v = *(const long *)type_mem; + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY((unsigned long) v > eina_value_uchar_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY((unsigned long) v > eina_value_ushort_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY((unsigned long) v > eina_value_uint_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem = v; + if (EINA_UNLIKELY(v < eina_value_char_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_char_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem = v; + if (EINA_UNLIKELY(v < eina_value_short_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_short_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem = v; + if (EINA_UNLIKELY(v < eina_value_int_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_int_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const char *other_mem; + char buf[64]; + snprintf(buf, sizeof(buf), "%ld", v); + other_mem = buf; /* required due &buf == buf */ + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_long_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + long *tmem = mem; + *tmem = va_arg(args, long); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_long_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + long *tmem = mem; + const long *p = ptr; + *tmem = *p; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_long_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + const long *tmem = mem; + long *p = ptr; + *p = *tmem; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_int64_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + int64_t *tmem = mem; + *tmem = 0; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_int64_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__) +{ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_int64_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const int64_t *s = src; + int64_t *d = dst; + *d = *s; + return EINA_TRUE; +} + +static int +_eina_value_type_int64_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const int64_t *ta = a, *tb = b; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; +} + +static Eina_Bool +_eina_value_type_int64_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const int64_t v = *(const int64_t *)type_mem; + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_uchar_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_ushort_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_uint_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY((sizeof(other_mem) != sizeof(v)) && + (v > eina_value_ulong_max))) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem = v; + if (EINA_UNLIKELY(v < eina_value_char_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_char_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem = v; + if (EINA_UNLIKELY(v < eina_value_short_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_short_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem = v; + if (EINA_UNLIKELY(v < eina_value_int_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_int_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem = v; + if (EINA_UNLIKELY(v < eina_value_long_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_long_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const char *other_mem; + char buf[64]; + snprintf(buf, sizeof(buf), "%"PRId64, v); + other_mem = buf; /* required due &buf == buf */ + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_int64_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + int64_t *tmem = mem; + *tmem = va_arg(args, int64_t); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_int64_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + int64_t *tmem = mem; + const int64_t *p = ptr; + *tmem = *p; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_int64_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + const int64_t *tmem = mem; + int64_t *p = ptr; + *p = *tmem; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_float_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + float *tmem = mem; + *tmem = 0; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_float_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__) +{ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_float_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const float *s = src; + float *d = dst; + *d = *s; + return EINA_TRUE; +} + +static int +_eina_value_type_float_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const float *ta = a, *tb = b; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; +} + +static Eina_Bool +_eina_value_type_float_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const float v = *(const float *)type_mem; + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_uchar_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_ushort_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_uint_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY((sizeof(other_mem) != sizeof(v)) && + (v > eina_value_ulong_max))) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_uint64_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem = v; + if (EINA_UNLIKELY(v < eina_value_char_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_char_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem = v; + if (EINA_UNLIKELY(v < eina_value_short_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_short_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem = v; + if (EINA_UNLIKELY(v < eina_value_int_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_int_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem = v; + if (EINA_UNLIKELY(v < eina_value_long_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_long_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem = v; + if (EINA_UNLIKELY(v < eina_value_int64_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_int64_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const char *other_mem; + char buf[64]; + snprintf(buf, sizeof(buf), "%f", v); + other_mem = buf; /* required due &buf == buf */ + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_float_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + float *tmem = mem; + *tmem = va_arg(args, double); /* float is promoted to double for va_args */ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_float_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + float *tmem = mem; + const float *p = ptr; + *tmem = *p; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_float_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + const float *tmem = mem; + float *p = ptr; + *p = *tmem; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_double_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + double *tmem = mem; + *tmem = 0; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_double_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__) +{ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_double_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const double *s = src; + double *d = dst; + *d = *s; + return EINA_TRUE; +} + +static int +_eina_value_type_double_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const double *ta = a, *tb = b; + if (*ta < *tb) + return -1; + else if (*ta > *tb) + return 1; + return 0; +} + +static Eina_Bool +_eina_value_type_double_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const double v = *(const double *)type_mem; + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_uchar_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_ushort_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_uint_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY((sizeof(other_mem) != sizeof(v)) && + (v > eina_value_ulong_max))) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem = v; + if (EINA_UNLIKELY(v < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem = v; + if (EINA_UNLIKELY(v < eina_value_char_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_char_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem = v; + if (EINA_UNLIKELY(v < eina_value_short_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_short_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem = v; + if (EINA_UNLIKELY(v < eina_value_int_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_int_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem = v; + if (EINA_UNLIKELY(v < eina_value_long_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v > eina_value_long_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem = v; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const char *other_mem; + char buf[64]; + snprintf(buf, sizeof(buf), "%g", (double)v); + other_mem = buf; /* required due &buf == buf */ + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_double_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + double *tmem = mem; + *tmem = va_arg(args, double); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_double_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + double *tmem = mem; + const double *p = ptr; + *tmem = *p; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_double_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + const double *tmem = mem; + double *p = ptr; + *p = *tmem; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_string_common_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + const char **tmem = mem; + *tmem = NULL; + return EINA_TRUE; +} + +static int +_eina_value_type_string_common_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const char *sa = *(const char **)a; + const char *sb = *(const char **)b; + if (sa == sb) + return 0; + if (sa == NULL) + return -1; + if (sb == NULL) + return 1; + return strcmp(sa, sb); +} + +static Eina_Bool +_eina_value_type_string_common_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const char *v = *(const char **)type_mem; + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem; + if ((sscanf(v, "%hhu", &other_mem) != 1) && + (sscanf(v, "%hhx", &other_mem) != 1) && + (sscanf(v, "%hho", &other_mem) != 1)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem; + if ((sscanf(v, "%hu", &other_mem) != 1) && + (sscanf(v, "%hx", &other_mem) != 1) && + (sscanf(v, "%ho", &other_mem) != 1)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem; + if ((sscanf(v, "%u", &other_mem) != 1) && + (sscanf(v, "%x", &other_mem) != 1) && + (sscanf(v, "%o", &other_mem) != 1)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem; + if ((sscanf(v, "%lu", &other_mem) != 1) && + (sscanf(v, "%lx", &other_mem) != 1) && + (sscanf(v, "%lo", &other_mem) != 1)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem; + if ((sscanf(v, "%"SCNu64, &other_mem) != 1) && + (sscanf(v, "%"SCNx64, &other_mem) != 1) && + (sscanf(v, "%"SCNo64, &other_mem) != 1)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem; + if ((sscanf(v, "%hhd", &other_mem) != 1) && + (sscanf(v, "%hhx", &other_mem) != 1) && + (sscanf(v, "%hho", &other_mem) != 1)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem; + if ((sscanf(v, "%hd", &other_mem) != 1) && + (sscanf(v, "%hx", &other_mem) != 1) && + (sscanf(v, "%ho", &other_mem) != 1)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem; + if ((sscanf(v, "%d", &other_mem) != 1) && + (sscanf(v, "%x", &other_mem) != 1) && + (sscanf(v, "%o", &other_mem) != 1)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem; + if ((sscanf(v, "%ld", &other_mem) != 1) && + (sscanf(v, "%lx", &other_mem) != 1) && + (sscanf(v, "%lo", &other_mem) != 1)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem; + if ((sscanf(v, "%"SCNd64, &other_mem) != 1) && + (sscanf(v, "%"SCNx64, &other_mem) != 1) && + (sscanf(v, "%"SCNo64, &other_mem) != 1)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem; + if (sscanf(v, "%f", &other_mem) != 1) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem; + if (sscanf(v, "%lf", &other_mem) != 1) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + return eina_value_type_pset(convert, convert_mem, &v); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_string_common_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + memcpy(ptr, mem, sizeof(const char *)); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_stringshare_flush(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + const char **tmem = mem; + if (*tmem) eina_stringshare_del(*tmem); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_stringshare_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const char * const*s = src; + const char **d = dst; + *d = *s; + eina_stringshare_ref(*d); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_stringshare_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + const char *str = va_arg(args, const char *); + return eina_stringshare_replace((const char **)mem, str); +} + +static Eina_Bool +_eina_value_type_stringshare_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + const char * const *str = ptr; + return eina_stringshare_replace((const char **)mem, *str); +} + +static Eina_Bool +_eina_value_type_string_flush(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + char **tmem = mem; + if (*tmem) free(*tmem); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_string_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const char * const *s = src; + char **d = dst; + if (*s == NULL) + *d = NULL; + else + { + *d = strdup(*s); + if (*d == NULL) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + } + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_string_vset(const Eina_Value_Type *type __UNUSED__, void *mem, va_list args) +{ + char **tmem = mem; + const char *str = va_arg(args, const char *); + free(*tmem); + if (str == NULL) + *tmem = NULL; + else + { + *tmem = strdup(str); + if (*tmem == NULL) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + } + eina_error_set(0); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_string_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + char **tmem = mem; + const char * const *str = ptr; + free(*tmem); + if (*str == NULL) + *tmem = NULL; + else + { + *tmem = strdup(*str); + if (*tmem == NULL) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + } + eina_error_set(0); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_array_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + memset(mem, 0, sizeof(Eina_Value_Array)); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_array_flush_elements(Eina_Value_Array *tmem) +{ + const Eina_Value_Type *subtype = tmem->subtype; + Eina_Bool ret = EINA_TRUE; + unsigned char sz; + char *ptr, *ptr_end; + + if (!tmem->array) return EINA_TRUE; + + sz = tmem->array->member_size; + ptr = tmem->array->members; + ptr_end = ptr + tmem->array->len * sz; + + for (; ptr < ptr_end; ptr += sz) + ret &= eina_value_type_flush(subtype, ptr); + + eina_inarray_flush(tmem->array); + return ret; +} + +static Eina_Bool +_eina_value_type_array_flush(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + Eina_Value_Array *tmem = mem; + Eina_Bool ret =_eina_value_type_array_flush_elements(tmem); + + if (tmem->array) eina_inarray_free(tmem->array); + tmem->array = NULL; + tmem->subtype = NULL; + return ret; +} + +static Eina_Bool +_eina_value_type_array_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const Eina_Value_Type *subtype; + const Eina_Value_Array *s = src; + Eina_Value_Array *d = dst; + unsigned int i, count, sz; + char *ptr, *ptr_end; + + d->subtype = subtype = s->subtype; + d->step = s->step; + + if ((!s->array) || (!s->subtype)) + { + d->array = NULL; + return EINA_TRUE; + } + + if (!subtype->copy) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + d->array = eina_inarray_new(subtype->value_size, s->step); + if (!d->array) + return EINA_FALSE; + + sz = s->array->member_size; + + count = eina_inarray_count(s->array); + ptr = s->array->members; + ptr_end = ptr + (count * sz); + + for (i = 0; ptr < ptr_end; ptr += sz, i++) + { + void *imem = eina_inarray_alloc_at(d->array, i, 1); + if (!imem) goto error; + if (!subtype->copy(subtype, ptr, imem)) + { + eina_inarray_pop(d->array); + goto error; + } + } + + return EINA_TRUE; + + error: + _eina_value_type_array_flush_elements(d); + return EINA_FALSE; +} + +static int +_eina_value_type_array_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const Eina_Value_Type *subtype; + const Eina_Value_Array *eva_a = a, *eva_b = b; + const char *a_ptr, *a_ptr_end, *b_ptr; + unsigned int count_a, count_b, count, sz; + int cmp = 0; + + if (eva_a->subtype != eva_b->subtype) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return -1; + } + + subtype = eva_a->subtype; + if (!subtype->compare) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return 0; + } + + if ((!eva_a->array) && (!eva_b->array)) + return 0; + else if (!eva_a->array) + return -1; + else if (!eva_b->array) + return 1; + + count_a = eina_inarray_count(eva_a->array); + count_b = eina_inarray_count(eva_b->array); + + if (count_a <= count_b) + count = count_a; + else + count = count_b; + + sz = eva_a->array->member_size; + + a_ptr = eva_a->array->members; + a_ptr_end = a_ptr + (count * sz); + b_ptr = eva_b->array->members; + + for (; (cmp == 0) && (a_ptr < a_ptr_end); a_ptr += sz, b_ptr += sz) + cmp = subtype->compare(subtype, a_ptr, b_ptr); + + if (cmp == 0) + { + if (count_a < count_b) + return -1; + else if (count_a > count_b) + return 1; + return 0; + } + + return cmp; +} + +static Eina_Bool +_eina_value_type_array_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const Eina_Value_Array *tmem = type_mem; + Eina_Bool ret = EINA_FALSE; + + if ((convert == EINA_VALUE_TYPE_STRING) || + (convert == EINA_VALUE_TYPE_STRINGSHARE)) + { + Eina_Strbuf *str = eina_strbuf_new(); + if (!tmem->array) eina_strbuf_append(str, "[]"); + else + { + const Eina_Value_Type *subtype = tmem->subtype; + unsigned char sz; + const char *ptr, *ptr_end; + Eina_Value tmp; + Eina_Bool first = EINA_TRUE; + + eina_value_setup(&tmp, EINA_VALUE_TYPE_STRING); + + eina_strbuf_append_char(str, '['); + + sz = tmem->array->member_size; + ptr = tmem->array->members; + ptr_end = ptr + tmem->array->len * sz; + for (; ptr < ptr_end; ptr += sz) + { + Eina_Bool r = EINA_FALSE; + if (subtype->convert_to) + { + r = subtype->convert_to(subtype, EINA_VALUE_TYPE_STRING, + ptr, tmp.value.buf); + if (r) + { + if (first) first = EINA_FALSE; + else eina_strbuf_append_length(str, ", ", 2); + eina_strbuf_append(str, tmp.value.ptr); + free(tmp.value.ptr); + tmp.value.ptr = NULL; + } + } + + if (!r) + { + if (first) + { + first = EINA_FALSE; + eina_strbuf_append_char(str, '?'); + } + else + eina_strbuf_append_length(str, ", ?", 3); + } + } + + eina_strbuf_append_char(str, ']'); + ptr = eina_strbuf_string_get(str); + ret = eina_value_type_pset(convert, convert_mem, &ptr); + eina_strbuf_free(str); + } + } + else if ((tmem->array) && (tmem->array->len == 1)) + { + const Eina_Value_Type *subtype = tmem->subtype; + void *imem = tmem->array->members; + + if (subtype->convert_to) + ret = subtype->convert_to(subtype, convert, imem, convert_mem); + if ((!ret) && (convert->convert_from)) + ret = convert->convert_from(convert, subtype, convert_mem, imem); + } + + if (!ret) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_array_convert_from(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem) +{ + Eina_Value_Array *tmem = type_mem; + Eina_Value_Array desc = {convert, tmem->step, NULL}; + char *buf; + void *imem; + + if (!eina_value_type_pset(type, tmem, &desc)) + return EINA_FALSE; + + buf = alloca(convert->value_size); + if (!eina_value_type_pget(convert, convert_mem, &buf)) + return EINA_FALSE; + + imem = eina_inarray_alloc_at(tmem->array, 0, 1); + if (!imem) + return EINA_FALSE; + + if (!eina_value_type_setup(convert, imem)) goto error_setup; + if (!eina_value_type_pset(convert, imem, &buf)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(convert, imem); + error_setup: + eina_inarray_remove_at(tmem->array, 0); + return EINA_FALSE; +} + +static Eina_Bool +_eina_value_type_array_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + Eina_Value_Array *tmem = mem; + const Eina_Value_Array *desc = ptr; + Eina_Inarray *desc_array; + + if ((!tmem->subtype) && (!desc->subtype)) + return EINA_TRUE; + + desc_array = desc->array; + if (desc_array) + { + EINA_SAFETY_ON_FALSE_RETURN_VAL + (desc_array->member_size == desc->subtype->value_size, EINA_FALSE); + } + + if (tmem->array) + { + _eina_value_type_array_flush_elements(tmem); + if (desc_array) + eina_inarray_free(tmem->array); + else + eina_inarray_setup(tmem->array, desc->subtype->value_size, + desc->step); + } + else if (!desc_array) + { + tmem->array = eina_inarray_new(desc->subtype->value_size, desc->step); + if (!tmem->array) + return EINA_FALSE; + } + + if (desc_array) + tmem->array = desc_array; + + tmem->subtype = desc->subtype; + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_array_vset(const Eina_Value_Type *type, void *mem, va_list args) +{ + const Eina_Value_Array desc = va_arg(args, Eina_Value_Array); + _eina_value_type_array_pset(type, mem, &desc); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_array_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + memcpy(ptr, mem, sizeof(Eina_Value_Array)); + return EINA_TRUE; +} + +static const Eina_Value_Type _EINA_VALUE_TYPE_ARRAY = { + EINA_VALUE_TYPE_VERSION, + sizeof(Eina_Value_Array), + "Eina_Value_Array", + _eina_value_type_array_setup, + _eina_value_type_array_flush, + _eina_value_type_array_copy, + _eina_value_type_array_compare, + _eina_value_type_array_convert_to, + _eina_value_type_array_convert_from, + _eina_value_type_array_vset, + _eina_value_type_array_pset, + _eina_value_type_array_pget +}; + +static Eina_Bool +_eina_value_type_list_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + memset(mem, 0, sizeof(Eina_Value_List)); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_list_flush_elements(Eina_Value_List *tmem) +{ + const Eina_Value_Type *subtype = tmem->subtype; + Eina_Bool ret = EINA_TRUE; + + if (!tmem->list) return EINA_TRUE; + + while (tmem->list) + { + void *mem = eina_value_list_node_memory_get(tmem->subtype, tmem->list); + ret &= eina_value_type_flush(subtype, mem); + eina_value_list_node_memory_flush(tmem->subtype, tmem->list); + tmem->list = eina_list_remove_list(tmem->list, tmem->list); + } + + return ret; +} + +static Eina_Bool +_eina_value_type_list_flush(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + Eina_Value_List *tmem = mem; + Eina_Bool ret =_eina_value_type_list_flush_elements(tmem); + + if (tmem->list) eina_list_free(tmem->list); + tmem->list = NULL; + tmem->subtype = NULL; + return ret; +} + +static Eina_Bool +_eina_value_type_list_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const Eina_Value_Type *subtype; + const Eina_Value_List *s = src; + Eina_Value_List *d = dst; + const Eina_List *snode; + + d->subtype = subtype = s->subtype; + if ((!s->list) || (!s->subtype)) + { + d->list = NULL; + return EINA_TRUE; + } + + if (!subtype->copy) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + d->list = NULL; + for (snode = s->list; snode != NULL; snode = snode->next) + { + const void *ptr = eina_value_list_node_memory_get(subtype, snode); + Eina_List *dnode; + void *imem; + + d->list = eina_list_append(d->list, (void*)1L); + dnode = eina_list_last(d->list); + EINA_SAFETY_ON_NULL_GOTO(dnode, error); + EINA_SAFETY_ON_FALSE_GOTO(dnode->data == (void*)1L, error); + + imem = eina_value_list_node_memory_setup(subtype, dnode); + if (!subtype->copy(subtype, ptr, imem)) + { + eina_value_list_node_memory_flush(subtype, dnode); + d->list = eina_list_remove_list(d->list, dnode); + goto error; + } + } + return EINA_TRUE; + + error: + _eina_value_type_list_flush_elements(d); + return EINA_FALSE; +} + +static int +_eina_value_type_list_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const Eina_Value_Type *subtype; + const Eina_Value_List *eva_a = a, *eva_b = b; + const Eina_List *anode, *bnode; + int cmp = 0; + + if (eva_a->subtype != eva_b->subtype) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return -1; + } + + subtype = eva_a->subtype; + if (!subtype->compare) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return 0; + } + + if ((!eva_a->list) && (!eva_b->list)) + return 0; + else if (!eva_a->list) + return -1; + else if (!eva_b->list) + return 1; + + for (anode = eva_a->list, bnode = eva_b->list; + (cmp == 0) && (anode) && (bnode); + anode = anode->next, bnode = bnode->next) + { + const void *amem = eina_value_list_node_memory_get(subtype, anode); + const void *bmem = eina_value_list_node_memory_get(subtype, bnode); + cmp = subtype->compare(subtype, amem, bmem); + } + + if (cmp == 0) + { + if ((!anode) && (bnode)) + return -1; + else if ((anode) && (!bnode)) + return 1; + return 0; + } + + return cmp; +} + +static Eina_Bool +_eina_value_type_list_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const Eina_Value_List *tmem = type_mem; + Eina_Bool ret = EINA_FALSE; + + if ((convert == EINA_VALUE_TYPE_STRING) || + (convert == EINA_VALUE_TYPE_STRINGSHARE)) + { + Eina_Strbuf *str = eina_strbuf_new(); + if (!tmem->list) eina_strbuf_append(str, "[]"); + else + { + const Eina_Value_Type *subtype = tmem->subtype; + const Eina_List *node; + Eina_Value tmp; + const char *s; + Eina_Bool first = EINA_TRUE; + + eina_value_setup(&tmp, EINA_VALUE_TYPE_STRING); + + eina_strbuf_append_char(str, '['); + + for (node = tmem->list; node != NULL; node = node->next) + { + Eina_Bool r = EINA_FALSE; + + if (subtype->convert_to) + { + const void *ptr; + ptr = eina_value_list_node_memory_get(subtype, node); + r = subtype->convert_to(subtype, EINA_VALUE_TYPE_STRING, + ptr, tmp.value.buf); + if (r) + { + if (first) first = EINA_FALSE; + else eina_strbuf_append_length(str, ", ", 2); + eina_strbuf_append(str, tmp.value.ptr); + free(tmp.value.ptr); + tmp.value.ptr = NULL; + } + } + + if (!r) + { + if (first) + { + first = EINA_FALSE; + eina_strbuf_append_char(str, '?'); + } + else + eina_strbuf_append_length(str, ", ?", 3); + } + } + + eina_strbuf_append_char(str, ']'); + s = eina_strbuf_string_get(str); + ret = eina_value_type_pset(convert, convert_mem, &s); + eina_strbuf_free(str); + } + } + else if ((tmem->list) && (tmem->list->next == NULL)) + { + const Eina_Value_Type *subtype = tmem->subtype; + void *imem = eina_value_list_node_memory_get(subtype, tmem->list); + + if (subtype->convert_to) + ret = subtype->convert_to(subtype, convert, imem, convert_mem); + if ((!ret) && (convert->convert_from)) + ret = convert->convert_from(convert, subtype, convert_mem, imem); + } + + if (!ret) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_list_convert_from(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem) +{ + Eina_Value_List *tmem = type_mem; + Eina_Value_List desc = {convert, NULL}; + Eina_List *node; + char *buf; + void *imem; + + if (!eina_value_type_pset(type, tmem, &desc)) + return EINA_FALSE; + + buf = alloca(convert->value_size); + if (!eina_value_type_pget(convert, convert_mem, &buf)) + return EINA_FALSE; + + tmem->list = eina_list_append(tmem->list, (void*)1L); + node = eina_list_last(tmem->list); + EINA_SAFETY_ON_NULL_RETURN_VAL(node, EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(node->data == (void*)1L, EINA_FALSE); + + imem = eina_value_list_node_memory_setup(tmem->subtype, node); + if (!imem) + { + tmem->list = eina_list_remove_list(tmem->list, node); + return EINA_FALSE; + } + + if (!eina_value_type_setup(tmem->subtype, imem)) goto error_setup; + if (!eina_value_type_pset(tmem->subtype, imem, &buf)) goto error_set; + return EINA_TRUE; + + error_set: + eina_value_type_flush(tmem->subtype, imem); + error_setup: + eina_value_list_node_memory_flush(tmem->subtype, node); + tmem->list = eina_list_remove_list(tmem->list, node); + return EINA_FALSE; +} + +static Eina_Bool +_eina_value_type_list_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + Eina_Value_List *tmem = mem; + const Eina_Value_List *desc = ptr; + + if ((!tmem->subtype) && (!desc->subtype)) + return EINA_TRUE; + + _eina_value_type_list_flush_elements(tmem); + tmem->subtype = desc->subtype; + tmem->list = desc->list; + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_list_vset(const Eina_Value_Type *type, void *mem, va_list args) +{ + const Eina_Value_List desc = va_arg(args, Eina_Value_List); + _eina_value_type_list_pset(type, mem, &desc); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_list_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + memcpy(ptr, mem, sizeof(Eina_Value_List)); + return EINA_TRUE; +} + +static const Eina_Value_Type _EINA_VALUE_TYPE_LIST = { + EINA_VALUE_TYPE_VERSION, + sizeof(Eina_Value_List), + "Eina_Value_List", + _eina_value_type_list_setup, + _eina_value_type_list_flush, + _eina_value_type_list_copy, + _eina_value_type_list_compare, + _eina_value_type_list_convert_to, + _eina_value_type_list_convert_from, + _eina_value_type_list_vset, + _eina_value_type_list_pset, + _eina_value_type_list_pget +}; + +static Eina_Bool +_eina_value_type_hash_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + memset(mem, 0, sizeof(Eina_Value_Hash)); + return EINA_TRUE; +} + +struct _eina_value_type_hash_flush_each_ctx +{ + const Eina_Value_Type *subtype; + Eina_Bool ret; +}; + +static Eina_Bool +_eina_value_type_hash_flush_each(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *mem, void *user_data) +{ + struct _eina_value_type_hash_flush_each_ctx *ctx = user_data; + ctx->ret &= eina_value_type_flush(ctx->subtype, mem); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_hash_flush_elements(Eina_Value_Hash *tmem) +{ + struct _eina_value_type_hash_flush_each_ctx ctx = { + tmem->subtype, + EINA_TRUE + }; + + if (!tmem->hash) return EINA_TRUE; + + eina_hash_foreach(tmem->hash, _eina_value_type_hash_flush_each, &ctx); + eina_hash_free(tmem->hash); + tmem->hash = NULL; + return ctx.ret; +} + +static Eina_Bool +_eina_value_type_hash_flush(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + Eina_Value_Hash *tmem = mem; + Eina_Bool ret =_eina_value_type_hash_flush_elements(tmem); + tmem->subtype = NULL; + return ret; +} + +static unsigned int +_eina_value_hash_key_length(const void *key) +{ + if (!key) + return 0; + return (int)strlen(key) + 1; +} + +static int +_eina_value_hash_key_cmp(const void *key1, int key1_len, const void *key2, int key2_len) +{ + int r = key1_len - key2_len; + if (r != 0) + return r; + return strcmp(key1, key2); +} + +static Eina_Bool +_eina_value_type_hash_create(Eina_Value_Hash *desc) +{ + if (!desc->buckets_power_size) + desc->buckets_power_size = 5; + + desc->hash = eina_hash_new(_eina_value_hash_key_length, + _eina_value_hash_key_cmp, + EINA_KEY_HASH(eina_hash_superfast), + NULL, desc->buckets_power_size); + return !!desc->hash; +} + +struct _eina_value_type_hash_copy_each_ctx +{ + const Eina_Value_Type *subtype; + Eina_Value_Hash *dest; + Eina_Bool ret; +}; + +static Eina_Bool +_eina_value_type_hash_copy_each(const Eina_Hash *hash __UNUSED__, const void *key, void *_ptr, void *user_data) +{ + struct _eina_value_type_hash_copy_each_ctx *ctx = user_data; + const void *ptr = _ptr; + void *imem = malloc(ctx->subtype->value_size); + if (!imem) + { + ctx->ret = EINA_FALSE; + return EINA_FALSE; + } + if (!ctx->subtype->copy(ctx->subtype, ptr, imem)) + { + free(imem); + ctx->ret = EINA_FALSE; + return EINA_FALSE; + } + if (!eina_hash_add(ctx->dest->hash, key, imem)) + { + eina_value_type_flush(ctx->subtype, imem); + free(imem); + ctx->ret = EINA_FALSE; + return EINA_FALSE; + } + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_hash_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const Eina_Value_Hash *s = src; + Eina_Value_Hash *d = dst; + struct _eina_value_type_hash_copy_each_ctx ctx = {s->subtype, d, EINA_TRUE}; + + d->subtype = s->subtype; + d->buckets_power_size = s->buckets_power_size; + + if ((!s->hash) || (!s->subtype)) + { + d->hash = NULL; + return EINA_TRUE; + } + + if (!s->subtype->copy) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + if (!_eina_value_type_hash_create(d)) + return EINA_FALSE; + + eina_hash_foreach(s->hash, _eina_value_type_hash_copy_each, &ctx); + if (!ctx.ret) + { + _eina_value_type_hash_flush_elements(d); + return EINA_FALSE; + } + return EINA_TRUE; +} + +struct _eina_value_type_hash_compare_each_ctx +{ + const Eina_Value_Type *subtype; + const Eina_Hash *other; + int cmp; +}; + +static Eina_Bool +_eina_value_type_hash_compare_each(const Eina_Hash *hash __UNUSED__, const void *key, void *_ptr, void *user_data) +{ + struct _eina_value_type_hash_compare_each_ctx *ctx = user_data; + const void *self_ptr = _ptr; + const void *other_ptr = eina_hash_find(ctx->other, key); + if (!other_ptr) return EINA_TRUE; + ctx->cmp = ctx->subtype->compare(ctx->subtype, self_ptr, other_ptr); + return ctx->cmp == 0; +} + +static int +_eina_value_type_hash_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const Eina_Value_Hash *eva_a = a, *eva_b = b; + struct _eina_value_type_hash_compare_each_ctx ctx = { + eva_a->subtype, eva_b->hash, 0 + }; + + if (eva_a->subtype != eva_b->subtype) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return -1; + } + + if (!eva_a->subtype->compare) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return 0; + } + + if ((!eva_a->hash) && (!eva_b->hash)) + return 0; + else if (!eva_a->hash) + return -1; + else if (!eva_b->hash) + return 1; + + eina_hash_foreach(eva_a->hash, _eina_value_type_hash_compare_each, &ctx); + if (ctx.cmp == 0) + { + unsigned int count_a = eina_hash_population(eva_a->hash); + unsigned int count_b = eina_hash_population(eva_b->hash); + if (count_a < count_b) + return -1; + else if (count_a > count_b) + return 1; + return 0; + } + + return ctx.cmp; +} + +static Eina_Bool +_eina_value_type_hash_find_first(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *ptr, void *user_data) +{ + void **ret = user_data; + *ret = ptr; + return EINA_FALSE; +} + +struct _eina_value_type_hash_convert_to_string_each_ctx +{ + const Eina_Value_Type *subtype; + Eina_Strbuf *str; + Eina_Value tmp; + Eina_Bool first; +}; + +static Eina_Bool +_eina_value_type_hash_convert_to_string_each(const Eina_Hash *hash __UNUSED__, const void *_key, void *_ptr, void *user_data) +{ + struct _eina_value_type_hash_convert_to_string_each_ctx *ctx = user_data; + const char *key = _key; + const void *ptr = _ptr; + Eina_Bool r = EINA_FALSE; + + if (ctx->first) ctx->first = EINA_FALSE; + else eina_strbuf_append_length(ctx->str, ", ", 2); + + eina_strbuf_append(ctx->str, key); + eina_strbuf_append_length(ctx->str, ": ", 2); + + if (ctx->subtype->convert_to) + { + r = ctx->subtype->convert_to(ctx->subtype, EINA_VALUE_TYPE_STRING, + ptr, ctx->tmp.value.buf); + if (r) + { + eina_strbuf_append(ctx->str, ctx->tmp.value.ptr); + free(ctx->tmp.value.ptr); + ctx->tmp.value.ptr = NULL; + } + } + + if (!r) + eina_strbuf_append_char(ctx->str, '?'); + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_hash_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const Eina_Value_Hash *tmem = type_mem; + Eina_Bool ret = EINA_FALSE; + + if ((convert == EINA_VALUE_TYPE_STRING) || + (convert == EINA_VALUE_TYPE_STRINGSHARE)) + { + Eina_Strbuf *str = eina_strbuf_new(); + if (!tmem->hash) eina_strbuf_append(str, "{}"); + else + { + struct _eina_value_type_hash_convert_to_string_each_ctx ctx; + const char *s; + + ctx.subtype = tmem->subtype; + ctx.str = str; + ctx.first = EINA_TRUE; + eina_value_setup(&ctx.tmp, EINA_VALUE_TYPE_STRING); + + eina_strbuf_append_char(str, '{'); + + eina_hash_foreach(tmem->hash, + _eina_value_type_hash_convert_to_string_each, + &ctx); + + eina_strbuf_append_char(str, '}'); + s = eina_strbuf_string_get(str); + ret = eina_value_type_pset(convert, convert_mem, &s); + eina_strbuf_free(str); + } + } + else if ((tmem->hash) && (eina_hash_population(tmem->hash) == 1)) + { + const Eina_Value_Type *subtype = tmem->subtype; + void *imem = NULL; + + eina_hash_foreach(tmem->hash, _eina_value_type_hash_find_first, &imem); + if (!imem) /* shouldn't happen... */ + ret = EINA_FALSE; + else + { + if (subtype->convert_to) + ret = subtype->convert_to(subtype, convert, imem, convert_mem); + if ((!ret) && (convert->convert_from)) + ret = convert->convert_from(convert, subtype, convert_mem, imem); + } + } + + if (!ret) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_hash_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + Eina_Value_Hash *tmem = mem; + const Eina_Value_Hash *desc = ptr; + + if ((!tmem->subtype) && (!desc->subtype)) + return EINA_TRUE; + + if (tmem->hash) _eina_value_type_hash_flush_elements(tmem); + + if (desc->hash) + tmem->hash = desc->hash; + else if (!_eina_value_type_hash_create(tmem)) + return EINA_FALSE; + + tmem->subtype = desc->subtype; + + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_hash_vset(const Eina_Value_Type *type, void *mem, va_list args) +{ + const Eina_Value_Hash desc = va_arg(args, Eina_Value_Hash); + _eina_value_type_hash_pset(type, mem, &desc); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_hash_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + memcpy(ptr, mem, sizeof(Eina_Value_Hash)); + return EINA_TRUE; +} + +static const Eina_Value_Type _EINA_VALUE_TYPE_HASH = { + EINA_VALUE_TYPE_VERSION, + sizeof(Eina_Value_Hash), + "Eina_Value_Hash", + _eina_value_type_hash_setup, + _eina_value_type_hash_flush, + _eina_value_type_hash_copy, + _eina_value_type_hash_compare, + _eina_value_type_hash_convert_to, + NULL, /* no convert from */ + _eina_value_type_hash_vset, + _eina_value_type_hash_pset, + _eina_value_type_hash_pget +}; + +static Eina_Bool +_eina_value_type_timeval_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + memset(mem, 0, sizeof(struct timeval)); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_timeval_flush(const Eina_Value_Type *type __UNUSED__, void *mem __UNUSED__) +{ + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_timeval_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const struct timeval *s = src; + struct timeval *d = dst; + *d = *s; + return EINA_TRUE; +} + +static inline struct timeval _eina_value_type_timeval_fix(const struct timeval *input) +{ + struct timeval ret = *input; + if (EINA_UNLIKELY(ret.tv_usec < 0)) + { + ret.tv_sec -= 1; + ret.tv_usec += 1e6; + } + return ret; +} + +static int +_eina_value_type_timeval_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + struct timeval va = _eina_value_type_timeval_fix(a); + struct timeval vb = _eina_value_type_timeval_fix(b); + + if (va.tv_sec < vb.tv_sec) + return -1; + else if (va.tv_sec > vb.tv_sec) + return 1; + + if (va.tv_usec < vb.tv_usec) + return -1; + else if (va.tv_usec > vb.tv_usec) + return 1; + + return 0; +} + +static Eina_Bool +_eina_value_type_timeval_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + struct timeval v = _eina_value_type_timeval_fix(type_mem); + + eina_error_set(0); + + if (convert == EINA_VALUE_TYPE_UCHAR) + { + unsigned char other_mem = v.tv_sec; + if (EINA_UNLIKELY(v.tv_sec < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v.tv_sec > eina_value_uchar_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_USHORT) + { + unsigned short other_mem = v.tv_sec; + if (EINA_UNLIKELY(v.tv_sec < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY(v.tv_sec > eina_value_ushort_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT) + { + unsigned int other_mem = v.tv_sec; + if (EINA_UNLIKELY(v.tv_sec < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY((unsigned long) v.tv_sec > eina_value_uint_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_ULONG) + { + unsigned long other_mem = v.tv_sec; + if (EINA_UNLIKELY(v.tv_sec < 0)) + return EINA_FALSE; + if (EINA_UNLIKELY((sizeof(other_mem) != sizeof(v)) && + ((unsigned long)v.tv_sec > eina_value_ulong_max))) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_UINT64) + { + uint64_t other_mem = v.tv_sec; + if (EINA_UNLIKELY(v.tv_sec < 0)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_CHAR) + { + char other_mem = v.tv_sec; + if (EINA_UNLIKELY(v.tv_sec < eina_value_char_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v.tv_sec > eina_value_char_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_SHORT) + { + short other_mem = v.tv_sec; + if (EINA_UNLIKELY(v.tv_sec < eina_value_short_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v.tv_sec > eina_value_short_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT) + { + int other_mem = v.tv_sec; + if (EINA_UNLIKELY(v.tv_sec < eina_value_int_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v.tv_sec > eina_value_int_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_LONG) + { + long other_mem = v.tv_sec; + if (EINA_UNLIKELY(v.tv_sec < eina_value_long_min)) + return EINA_FALSE; + if (EINA_UNLIKELY(v.tv_sec > eina_value_long_max)) + return EINA_FALSE; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_INT64) + { + int64_t other_mem = v.tv_sec; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_FLOAT) + { + float other_mem = (float)v.tv_sec + (float)v.tv_usec / 1.0e6; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_DOUBLE) + { + double other_mem = (double)v.tv_sec + (double)v.tv_usec / 1.0e6; + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const char *other_mem; + char buf[64]; + snprintf(buf, sizeof(buf), "%ld.%06ld", v.tv_sec, v.tv_usec); + other_mem = buf; /* required due &buf == buf */ + return eina_value_type_pset(convert, convert_mem, &other_mem); + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } +} + +static Eina_Bool +_eina_value_type_timeval_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + struct timeval *tmem = mem; + *tmem = _eina_value_type_timeval_fix(ptr); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_timeval_vset(const Eina_Value_Type *type, void *mem, va_list args) +{ + const struct timeval desc = va_arg(args, struct timeval); + _eina_value_type_timeval_pset(type, mem, &desc); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_timeval_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + memcpy(ptr, mem, sizeof(struct timeval)); + return EINA_TRUE; +} + +static const Eina_Value_Type _EINA_VALUE_TYPE_TIMEVAL = { + EINA_VALUE_TYPE_VERSION, + sizeof(struct timeval), + "struct timeval", + _eina_value_type_timeval_setup, + _eina_value_type_timeval_flush, + _eina_value_type_timeval_copy, + _eina_value_type_timeval_compare, + _eina_value_type_timeval_convert_to, + NULL, /* no convert from */ + _eina_value_type_timeval_vset, + _eina_value_type_timeval_pset, + _eina_value_type_timeval_pget +}; + +static Eina_Bool +_eina_value_type_blob_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + memset(mem, 0, sizeof(Eina_Value_Blob)); + return EINA_TRUE; +} + +static inline const Eina_Value_Blob_Operations * +_eina_value_type_blob_ops_get(const Eina_Value_Blob *blob) +{ + if (!blob) return NULL; + if (!blob->ops) return NULL; + EINA_SAFETY_ON_FALSE_RETURN_VAL + (blob->ops->version == EINA_VALUE_BLOB_OPERATIONS_VERSION, NULL); + return blob->ops; +} + +static Eina_Bool +_eina_value_type_blob_flush(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + const Eina_Value_Blob_Operations *ops = _eina_value_type_blob_ops_get(mem); + Eina_Value_Blob *tmem = mem; + if ((ops) && (ops->free)) + ops->free(ops, (void *)tmem->memory, tmem->size); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_blob_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const Eina_Value_Blob_Operations *ops = _eina_value_type_blob_ops_get(src); + const Eina_Value_Blob *s = src; + Eina_Value_Blob *d = dst; + + *d = *s; + + if ((ops) && (ops->copy)) + { + d->memory = ops->copy(ops, s->memory, s->size); + if ((d->memory == NULL) && (s->size > 0)) + return EINA_FALSE; + } + + return EINA_TRUE; +} + +static int +_eina_value_type_blob_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const Eina_Value_Blob_Operations *ops = _eina_value_type_blob_ops_get(a); + const Eina_Value_Blob *ta = a, *tb = b; + size_t minsize; + if (ta->ops != tb->ops) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return -1; + } + if ((ops) && (ops->compare)) + return ops->compare(ops, ta->memory, ta->size, tb->memory, tb->size); + + if (ta->size < tb->size) + minsize = ta->size; + else + minsize = tb->size; + + return memcmp(ta->memory, tb->memory, minsize); +} + +static Eina_Bool +_eina_value_type_blob_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const Eina_Value_Blob *tmem = type_mem; + + eina_error_set(0); + if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + const Eina_Value_Blob_Operations *ops; + Eina_Strbuf *str; + const char *other_mem; + Eina_Bool ret = EINA_FALSE, first = EINA_TRUE; + const unsigned char *ptr, *ptr_end; + + ops = _eina_value_type_blob_ops_get(tmem); + if ((ops) && (ops->to_string)) + { + char *x = ops->to_string(ops, tmem->memory, tmem->size); + if (x) + { + ret = eina_value_type_pset(convert, convert_mem, &x); + free(x); + } + return ret; + } + + str = eina_strbuf_new(); + if (!str) + return EINA_FALSE; + + if (!eina_strbuf_append_printf(str, "BLOB(%u, [", tmem->size)) + goto error; + + ptr = tmem->memory; + ptr_end = ptr + tmem->size; + for (; ptr < ptr_end; ptr++) + { + if (first) + { + first = EINA_FALSE; + if (!eina_strbuf_append_printf(str, "%02hhx", *ptr)) + goto error; + } + else + { + if (!eina_strbuf_append_printf(str, " %02hhx", *ptr)) + goto error; + } + } + + if (!eina_strbuf_append(str, "])")) + goto error; + + other_mem = eina_strbuf_string_get(str); + ret = eina_value_type_pset(convert, convert_mem, &other_mem); + + error: + eina_strbuf_free(str); + return ret; + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } +} + +static Eina_Bool +_eina_value_type_blob_convert_from(const Eina_Value_Type *type, const Eina_Value_Type *convert, void *type_mem, const void *convert_mem) +{ + Eina_Value_Blob desc; + char *buf; + + desc.ops = EINA_VALUE_BLOB_OPERATIONS_MALLOC; + + if ((convert == EINA_VALUE_TYPE_STRING) || + (convert == EINA_VALUE_TYPE_STRINGSHARE)) + { + const char *str = *(const char **)convert_mem; + if (!str) + { + desc.size = 0; + desc.memory = NULL; + } + else + { + desc.size = strlen(str) + 1; + desc.memory = buf = malloc(desc.size); + if (!desc.memory) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + memcpy(buf, str, desc.size); + } + } + else if (convert == EINA_VALUE_TYPE_ARRAY) + { + const Eina_Value_Array *a = convert_mem; + if ((!a->array) || (a->array->len == 0)) + { + desc.size = 0; + desc.memory = NULL; + } + else + { + desc.size = a->array->len * a->array->member_size; + desc.memory = buf = malloc(desc.size); + if (!desc.memory) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + memcpy(buf, a->array->members, desc.size); + } + } + else if (convert == EINA_VALUE_TYPE_BLOB) + { + const Eina_Value_Blob *b = convert_mem; + if (b->size == 0) + { + desc.size = 0; + desc.memory = NULL; + } + else + { + desc.size = b->size; + desc.memory = buf = malloc(desc.size); + if (!desc.memory) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + memcpy(buf, b->memory, desc.size); + } + } + else + { + desc.size = convert->value_size; + desc.memory = buf = malloc(convert->value_size); + if (!desc.memory) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + if (!eina_value_type_pget(convert, convert_mem, buf)) + { + free(buf); + return EINA_FALSE; + } + } + return eina_value_type_pset(type, type_mem, &desc); +} + +static Eina_Bool +_eina_value_type_blob_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + const Eina_Value_Blob_Operations *ops = _eina_value_type_blob_ops_get(mem); + Eina_Value_Blob *tmem = mem; + const Eina_Value_Blob *desc = ptr; + + if ((ops) && (ops->free)) + ops->free(ops, (void *)tmem->memory, tmem->size); + + *tmem = *desc; + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_blob_vset(const Eina_Value_Type *type, void *mem, va_list args) +{ + const Eina_Value_Blob desc = va_arg(args, Eina_Value_Blob); + _eina_value_type_blob_pset(type, mem, &desc); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_blob_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + memcpy(ptr, mem, sizeof(Eina_Value_Blob)); + return EINA_TRUE; +} + +static const Eina_Value_Type _EINA_VALUE_TYPE_BLOB = { + EINA_VALUE_TYPE_VERSION, + sizeof(Eina_Value_Blob), + "Eina_Value_Blob", + _eina_value_type_blob_setup, + _eina_value_type_blob_flush, + _eina_value_type_blob_copy, + _eina_value_type_blob_compare, + _eina_value_type_blob_convert_to, + _eina_value_type_blob_convert_from, + _eina_value_type_blob_vset, + _eina_value_type_blob_pset, + _eina_value_type_blob_pget +}; + +static int +_eina_value_struct_operations_binsearch_cmp(const void *pa, const void *pb) +{ + const Eina_Value_Struct_Member *a = pa, *b = pb; + return strcmp(a->name, b->name); +} + +static const Eina_Value_Struct_Member * +_eina_value_struct_operations_binsearch_find_member(const Eina_Value_Struct_Operations *ops __UNUSED__, const Eina_Value_Struct_Desc *desc, const char *name) +{ + unsigned int count = desc->member_count; + Eina_Value_Struct_Member search; + if (count == 0) + { + const Eina_Value_Struct_Member *itr = desc->members; + for (; itr->name != NULL; itr++) + count++; + } + + search.name = name; + return bsearch(&search, desc->members, count, + sizeof(Eina_Value_Struct_Member), + _eina_value_struct_operations_binsearch_cmp); +} + +static Eina_Value_Struct_Operations _EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH = { + EINA_VALUE_STRUCT_OPERATIONS_VERSION, + NULL, /* default alloc */ + NULL, /* default free */ + NULL, /* default copy */ + NULL, /* default compare */ + _eina_value_struct_operations_binsearch_find_member +}; + +static const Eina_Value_Struct_Member * +_eina_value_struct_operations_stringshare_find_member(const Eina_Value_Struct_Operations *ops __UNUSED__, const Eina_Value_Struct_Desc *desc, const char *name) +{ + const Eina_Value_Struct_Member *itr = desc->members; + + /* assumes name is stringshared. + * + * we do this because it's the recommended usage pattern, moreover + * we expect to find the member, as users shouldn't look for + * non-existent members! + */ + if (desc->member_count > 0) + { + const Eina_Value_Struct_Member *itr_end = itr + desc->member_count; + for (; itr < itr_end; itr++) + if (itr->name == name) + return itr; + } + else + { + for (; itr->name != NULL; itr++) + if (itr->name == name) + return itr; + } + + name = eina_stringshare_add(name); + eina_stringshare_del(name); /* we'll not use the contents, this is fine */ + /* stringshare and look again */ + if (desc->member_count > 0) + { + const Eina_Value_Struct_Member *itr_end = itr + desc->member_count; + for (; itr < itr_end; itr++) + if (itr->name == name) + return itr; + } + else + { + for (; itr->name != NULL; itr++) + if (itr->name == name) + return itr; + } + + return NULL; +} + +static Eina_Value_Struct_Operations _EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE = { + EINA_VALUE_STRUCT_OPERATIONS_VERSION, + NULL, /* default alloc */ + NULL, /* default free */ + NULL, /* default copy */ + NULL, /* default compare */ + _eina_value_struct_operations_stringshare_find_member +}; + +static inline const Eina_Value_Struct_Operations * +_eina_value_type_struct_ops_get(const Eina_Value_Struct *st) +{ + if (!st) return NULL; + if (!st->desc) return NULL; + if (!st->desc->ops) return NULL; + EINA_SAFETY_ON_FALSE_RETURN_VAL + (st->desc->ops->version == EINA_VALUE_STRUCT_OPERATIONS_VERSION, NULL); + return st->desc->ops; +} + +EAPI const Eina_Value_Struct_Member * +eina_value_struct_member_find(const Eina_Value_Struct *st, const char *name) +{ + const Eina_Value_Struct_Operations *ops; + const Eina_Value_Struct_Member *itr; + + EINA_SAFETY_ON_NULL_RETURN_VAL(st, NULL); + EINA_SAFETY_ON_NULL_RETURN_VAL(st->desc, NULL); + + ops = _eina_value_type_struct_ops_get(st); + if ((ops) && (ops->find_member)) + return ops->find_member(ops, st->desc, name); + + itr = st->desc->members; + if (st->desc->member_count) + { + const Eina_Value_Struct_Member *itr_end = itr + st->desc->member_count; + for (; itr < itr_end; itr++) + { + if (strcmp(name, itr->name) == 0) + return itr; + } + return NULL; + } + else + { + for (; itr->name != NULL; itr++) + { + if (strcmp(name, itr->name) == 0) + return itr; + } + return NULL; + } +} + +static Eina_Bool +_eina_value_type_struct_setup(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + memset(mem, 0, sizeof(Eina_Value_Struct)); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_struct_flush_member(const Eina_Value_Struct_Member *member, Eina_Value_Struct *st) +{ + unsigned char *base = st->memory; + return eina_value_type_flush(member->type, base + member->offset); +} + +static Eina_Bool +_eina_value_type_struct_flush(const Eina_Value_Type *type __UNUSED__, void *mem) +{ + const Eina_Value_Struct_Operations *ops; + const Eina_Value_Struct_Member *itr; + Eina_Value_Struct *tmem = mem; + Eina_Bool ret = EINA_TRUE; + + itr = tmem->desc->members; + if (tmem->desc->member_count > 0) + { + const Eina_Value_Struct_Member *itr_end; + itr_end = itr + tmem->desc->member_count; + for (; itr < itr_end; itr++) + ret &= _eina_value_type_struct_flush_member(itr, tmem); + } + else + { + for (; itr->name != NULL; itr++) + ret &= _eina_value_type_struct_flush_member(itr, tmem); + } + + ops = _eina_value_type_struct_ops_get(mem); + if ((ops) && (ops->free)) + ops->free(ops, tmem->desc, tmem->memory); + else + free(tmem->memory); + + return ret; +} + +static Eina_Bool +_eina_value_type_struct_copy_member(const Eina_Value_Struct_Member *member, const Eina_Value_Struct *s, Eina_Value_Struct *d) +{ + const unsigned char *base_s = s->memory; + unsigned char *base_d = d->memory; + return eina_value_type_copy(member->type, + base_s + member->offset, + base_d + member->offset); +} + +static Eina_Bool +_eina_value_type_struct_copy(const Eina_Value_Type *type __UNUSED__, const void *src, void *dst) +{ + const Eina_Value_Struct_Operations *ops; + const Eina_Value_Struct_Member *itr; + const Eina_Value_Struct *s = src; + Eina_Value_Struct *d = dst; + + *d = *s; + + ops = _eina_value_type_struct_ops_get(src); + if ((ops) && (ops->copy)) + { + d->memory = ops->copy(ops, s->desc, s->memory); + if (d->memory == NULL) + return EINA_FALSE; + return EINA_TRUE; + } + + d->memory = malloc(s->desc->size); + if (!d->memory) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + + itr = s->desc->members; + if (s->desc->member_count > 0) + { + const Eina_Value_Struct_Member *itr_end = itr + s->desc->member_count; + for (; itr < itr_end; itr++) + if (!_eina_value_type_struct_copy_member(itr, s, d)) + goto error; + } + else + { + for (; itr->name != NULL; itr++) + if (!_eina_value_type_struct_copy_member(itr, s, d)) + goto error; + } + + + return EINA_TRUE; + + error: + itr--; + for (; itr >= s->desc->members; itr--) + _eina_value_type_struct_flush_member(itr, d); + free(d->memory); + return EINA_FALSE; +} + +static inline int +_eina_value_type_struct_compare_member(const Eina_Value_Struct_Member *member, const Eina_Value_Struct *ta, const Eina_Value_Struct *tb) +{ + const unsigned char *base_a = ta->memory; + const unsigned char *base_b = tb->memory; + return eina_value_type_compare(member->type, + base_a + member->offset, + base_b + member->offset); +} + +static int +_eina_value_type_struct_compare(const Eina_Value_Type *type __UNUSED__, const void *a, const void *b) +{ + const Eina_Value_Struct_Operations *ops = _eina_value_type_struct_ops_get(a); + const Eina_Value_Struct *ta = a, *tb = b; + const Eina_Value_Struct_Member *itr; + int cmp = 0; + + if (ta->desc != tb->desc) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return -1; + } + if (ta->desc->ops != tb->desc->ops) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return -1; + } + if ((!ta->memory) && (!tb->memory)) + return 0; + else if (!ta->memory) + return -1; + else if (!tb->memory) + return 1; + + if ((ops) && (ops->compare)) + return ops->compare(ops, ta->desc, ta->memory, tb->memory); + + itr = ta->desc->members; + if (ta->desc->member_count > 0) + { + const Eina_Value_Struct_Member *itr_end = itr + ta->desc->member_count; + for (; (cmp == 0) && (itr < itr_end); itr++) + cmp = _eina_value_type_struct_compare_member(itr, ta, tb); + } + else + { + for (; (cmp == 0) && (itr->name != NULL); itr++) + cmp = _eina_value_type_struct_compare_member(itr, ta, tb); + } + return cmp; +} + +static void +_eina_value_type_struct_convert_to_string_member(const Eina_Value_Struct *st, const Eina_Value_Struct_Member *member, Eina_Strbuf *str) +{ + const unsigned char *p = st->memory; + Eina_Bool first = st->desc->members == member; + Eina_Bool r = EINA_FALSE; + + if (first) eina_strbuf_append_printf(str, "%s: ", member->name); + else eina_strbuf_append_printf(str, ", %s: ", member->name); + + if ((member->type) && (member->type->convert_to)) + { + const Eina_Value_Type *type = member->type; + char *conv = NULL; + + r = eina_value_type_convert_to(type, EINA_VALUE_TYPE_STRING, + p + member->offset, &conv); + if (r) + { + eina_strbuf_append(str, conv); + free(conv); + } + } + + if (!r) + eina_strbuf_append_char(str, '?'); +} + +static Eina_Bool +_eina_value_type_struct_convert_to(const Eina_Value_Type *type __UNUSED__, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem) +{ + const Eina_Value_Struct *tmem = type_mem; + + eina_error_set(0); + if (convert == EINA_VALUE_TYPE_STRINGSHARE || + convert == EINA_VALUE_TYPE_STRING) + { + Eina_Strbuf *str = eina_strbuf_new(); + const char *s; + Eina_Bool ret; + + if (!tmem->memory) eina_strbuf_append(str, "{}"); + else + { + const Eina_Value_Struct_Member *itr = tmem->desc->members; + + eina_strbuf_append_char(str, '{'); + + if (tmem->desc->member_count > 0) + { + const Eina_Value_Struct_Member *itr_end; + + itr_end = itr + tmem->desc->member_count; + for (; itr < itr_end; itr++) + _eina_value_type_struct_convert_to_string_member + (tmem, itr, str); + } + else + { + for (; itr->name != NULL; itr++) + _eina_value_type_struct_convert_to_string_member + (tmem, itr, str); + } + + eina_strbuf_append_char(str, '}'); + } + s = eina_strbuf_string_get(str); + ret = eina_value_type_pset(convert, convert_mem, &s); + eina_strbuf_free(str); + return ret; + } + else + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } +} + +static Eina_Bool +_eina_value_type_struct_desc_check(const Eina_Value_Struct_Desc *desc) +{ + unsigned int minsize = 0; + const Eina_Value_Struct_Member *itr; + + EINA_SAFETY_ON_NULL_RETURN_VAL(desc, EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL + (desc->version == EINA_VALUE_STRUCT_DESC_VERSION, EINA_FALSE); + + itr = desc->members; + if (desc->member_count > 0) + { + const Eina_Value_Struct_Member *itr_end = itr + desc->member_count; + for (; itr < itr_end; itr++) + { + unsigned int member_end; + + EINA_SAFETY_ON_FALSE_RETURN_VAL + (eina_value_type_check(itr->type), EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL + (itr->type->value_size > 0, EINA_FALSE); + + member_end = itr->offset + itr->type->value_size; + if (minsize < member_end) + minsize = member_end; + } + } + else + { + for (; itr->name != NULL; itr++) + { + unsigned int member_end; + + EINA_SAFETY_ON_FALSE_RETURN_VAL + (eina_value_type_check(itr->type), EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL + (itr->type->value_size > 0, EINA_FALSE); + + member_end = itr->offset + itr->type->value_size; + if (minsize < member_end) + minsize = member_end; + } + } + + EINA_SAFETY_ON_FALSE_RETURN_VAL(minsize > 0, EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(desc->size >= minsize, EINA_FALSE); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_struct_pset(const Eina_Value_Type *type __UNUSED__, void *mem, const void *ptr) +{ + const Eina_Value_Struct_Operations *ops = _eina_value_type_struct_ops_get(mem); + Eina_Value_Struct *tmem = mem; + const Eina_Value_Struct *desc = ptr; + + if (!_eina_value_type_struct_desc_check(desc->desc)) + { + eina_error_set(EINA_ERROR_VALUE_FAILED); + return EINA_FALSE; + } + + if ((ops) && (ops->free)) + ops->free(ops, tmem->desc, tmem->memory); + else + free(tmem->memory); + + *tmem = *desc; + + ops = _eina_value_type_struct_ops_get(desc); + if (!tmem->memory) + { + if ((ops) && (ops->alloc)) + tmem->memory = ops->alloc(ops, tmem->desc); + else + tmem->memory = malloc(tmem->desc->size); + + if (!tmem->memory) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return EINA_FALSE; + } + } + + eina_error_set(0); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_struct_vset(const Eina_Value_Type *type, void *mem, va_list args) +{ + const Eina_Value_Struct desc = va_arg(args, Eina_Value_Struct); + _eina_value_type_struct_pset(type, mem, &desc); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_struct_pget(const Eina_Value_Type *type __UNUSED__, const void *mem, void *ptr) +{ + memcpy(ptr, mem, sizeof(Eina_Value_Struct)); + return EINA_TRUE; +} + +static const Eina_Value_Type _EINA_VALUE_TYPE_STRUCT = { + EINA_VALUE_TYPE_VERSION, + sizeof(Eina_Value_Struct), + "Eina_Value_Struct", + _eina_value_type_struct_setup, + _eina_value_type_struct_flush, + _eina_value_type_struct_copy, + _eina_value_type_struct_compare, + _eina_value_type_struct_convert_to, + NULL, /* no convert from */ + _eina_value_type_struct_vset, + _eina_value_type_struct_pset, + _eina_value_type_struct_pget +}; + +/* keep all basic types inlined in an array so we can compare if it's + * a basic type using pointer arithmetic. + * + * NOTE-1: JUST BASIC TYPES, DO NOT ADD MORE TYPES HERE!!! + * NOTE-2: KEEP ORDER, see eina_value_init() + */ +static const Eina_Value_Type _EINA_VALUE_TYPE_BASICS[] = { + { + EINA_VALUE_TYPE_VERSION, + sizeof(unsigned char), + "unsigned char", + _eina_value_type_uchar_setup, + _eina_value_type_uchar_flush, + _eina_value_type_uchar_copy, + _eina_value_type_uchar_compare, + _eina_value_type_uchar_convert_to, + NULL, /* no convert from */ + _eina_value_type_uchar_vset, + _eina_value_type_uchar_pset, + _eina_value_type_uchar_pget + }, + { + EINA_VALUE_TYPE_VERSION, + sizeof(unsigned short), + "unsigned short", + _eina_value_type_ushort_setup, + _eina_value_type_ushort_flush, + _eina_value_type_ushort_copy, + _eina_value_type_ushort_compare, + _eina_value_type_ushort_convert_to, + NULL, /* no convert from */ + _eina_value_type_ushort_vset, + _eina_value_type_ushort_pset, + _eina_value_type_ushort_pget + }, + { + EINA_VALUE_TYPE_VERSION, + sizeof(unsigned int), + "unsigned int", + _eina_value_type_uint_setup, + _eina_value_type_uint_flush, + _eina_value_type_uint_copy, + _eina_value_type_uint_compare, + _eina_value_type_uint_convert_to, + NULL, /* no convert from */ + _eina_value_type_uint_vset, + _eina_value_type_uint_pset, + _eina_value_type_uint_pget + }, + { + EINA_VALUE_TYPE_VERSION, + sizeof(unsigned long), + "unsigned long", + _eina_value_type_ulong_setup, + _eina_value_type_ulong_flush, + _eina_value_type_ulong_copy, + _eina_value_type_ulong_compare, + _eina_value_type_ulong_convert_to, + NULL, /* no convert from */ + _eina_value_type_ulong_vset, + _eina_value_type_ulong_pset, + _eina_value_type_ulong_pget + }, + { + EINA_VALUE_TYPE_VERSION, + sizeof(uint64_t), + "uint64_t", + _eina_value_type_uint64_setup, + _eina_value_type_uint64_flush, + _eina_value_type_uint64_copy, + _eina_value_type_uint64_compare, + _eina_value_type_uint64_convert_to, + NULL, /* no convert from */ + _eina_value_type_uint64_vset, + _eina_value_type_uint64_pset, + _eina_value_type_uint64_pget + }, + { + EINA_VALUE_TYPE_VERSION, + sizeof(char), + "char", + _eina_value_type_char_setup, + _eina_value_type_char_flush, + _eina_value_type_char_copy, + _eina_value_type_char_compare, + _eina_value_type_char_convert_to, + NULL, /* no convert from */ + _eina_value_type_char_vset, + _eina_value_type_char_pset, + _eina_value_type_char_pget + }, + { + EINA_VALUE_TYPE_VERSION, + sizeof(short), + "short", + _eina_value_type_short_setup, + _eina_value_type_short_flush, + _eina_value_type_short_copy, + _eina_value_type_short_compare, + _eina_value_type_short_convert_to, + NULL, /* no convert from */ + _eina_value_type_short_vset, + _eina_value_type_short_pset, + _eina_value_type_short_pget + }, + { + EINA_VALUE_TYPE_VERSION, + sizeof(int), + "int", + _eina_value_type_int_setup, + _eina_value_type_int_flush, + _eina_value_type_int_copy, + _eina_value_type_int_compare, + _eina_value_type_int_convert_to, + NULL, /* no convert from */ + _eina_value_type_int_vset, + _eina_value_type_int_pset, + _eina_value_type_int_pget + }, + { + EINA_VALUE_TYPE_VERSION, + sizeof(long), + "long", + _eina_value_type_long_setup, + _eina_value_type_long_flush, + _eina_value_type_long_copy, + _eina_value_type_long_compare, + _eina_value_type_long_convert_to, + NULL, /* no convert from */ + _eina_value_type_long_vset, + _eina_value_type_long_pset, + _eina_value_type_long_pget + }, + { + EINA_VALUE_TYPE_VERSION, + sizeof(int64_t), + "int64_t", + _eina_value_type_int64_setup, + _eina_value_type_int64_flush, + _eina_value_type_int64_copy, + _eina_value_type_int64_compare, + _eina_value_type_int64_convert_to, + NULL, /* no convert from */ + _eina_value_type_int64_vset, + _eina_value_type_int64_pset, + _eina_value_type_int64_pget + }, + { + EINA_VALUE_TYPE_VERSION, + sizeof(float), + "float", + _eina_value_type_float_setup, + _eina_value_type_float_flush, + _eina_value_type_float_copy, + _eina_value_type_float_compare, + _eina_value_type_float_convert_to, + NULL, /* no convert from */ + _eina_value_type_float_vset, + _eina_value_type_float_pset, + _eina_value_type_float_pget + }, + { + EINA_VALUE_TYPE_VERSION, + sizeof(double), + "double", + _eina_value_type_double_setup, + _eina_value_type_double_flush, + _eina_value_type_double_copy, + _eina_value_type_double_compare, + _eina_value_type_double_convert_to, + NULL, /* no convert from */ + _eina_value_type_double_vset, + _eina_value_type_double_pset, + _eina_value_type_double_pget + }, + { + EINA_VALUE_TYPE_VERSION, + sizeof(const char *), + "stringshare", + _eina_value_type_string_common_setup, + _eina_value_type_stringshare_flush, + _eina_value_type_stringshare_copy, + _eina_value_type_string_common_compare, + _eina_value_type_string_common_convert_to, + NULL, /* no convert from */ + _eina_value_type_stringshare_vset, + _eina_value_type_stringshare_pset, + _eina_value_type_string_common_pget + }, + { + EINA_VALUE_TYPE_VERSION, + sizeof(char *), + "string", + _eina_value_type_string_common_setup, + _eina_value_type_string_flush, + _eina_value_type_string_copy, + _eina_value_type_string_common_compare, + _eina_value_type_string_common_convert_to, + NULL, /* no convert from */ + _eina_value_type_string_vset, + _eina_value_type_string_pset, + _eina_value_type_string_common_pget + } +}; + +static void +_eina_value_blob_operations_malloc_free(const Eina_Value_Blob_Operations *ops __UNUSED__, void *memory, size_t size __UNUSED__) +{ + free(memory); +} + +static void * +_eina_value_blob_operations_malloc_copy(const Eina_Value_Blob_Operations *ops __UNUSED__, const void *memory, size_t size) +{ + void *ret = malloc(size); + if (!ret) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return NULL; + } + memcpy(ret, memory, size); + return ret; +} + +static const Eina_Value_Blob_Operations _EINA_VALUE_BLOB_OPERATIONS_MALLOC = { + EINA_VALUE_BLOB_OPERATIONS_VERSION, + _eina_value_blob_operations_malloc_free, + _eina_value_blob_operations_malloc_copy, + NULL, + NULL +}; + +typedef struct _Eina_Value_Inner_Mp Eina_Value_Inner_Mp; +struct _Eina_Value_Inner_Mp +{ + Eina_Mempool *mempool; + int references; +}; + +/** + * @endcond + */ + +static const char EINA_ERROR_VALUE_FAILED_STR[] = "Value check failed."; + +/** + */ + +static inline void +_eina_value_inner_mp_dispose(int size, Eina_Value_Inner_Mp *imp) +{ + EINA_SAFETY_ON_FALSE_RETURN(imp->references == 0); + + eina_hash_del_by_key(_eina_value_inner_mps, &size); + eina_mempool_del(imp->mempool); + free(imp); +} + +static inline Eina_Value_Inner_Mp * +_eina_value_inner_mp_get(int size) +{ + Eina_Value_Inner_Mp *imp = eina_hash_find(_eina_value_inner_mps, &size); + if (imp) return imp; + + imp = malloc(sizeof(Eina_Value_Inner_Mp)); + if (!imp) + return NULL; + + imp->references = 0; + + imp->mempool = eina_mempool_add(_eina_value_mp_choice, + "Eina_Value_Inner_Mp", NULL, size, 128); + if (!imp->mempool) + { + free(imp); + return NULL; + } + + if (!eina_hash_add(_eina_value_inner_mps, &size, imp)) + { + eina_mempool_del(imp->mempool); + free(imp); + return NULL; + } + + return imp; +} + +static inline void * +_eina_value_inner_alloc_internal(int size) +{ + Eina_Value_Inner_Mp *imp; + void *mem; + + imp = _eina_value_inner_mp_get(size); + if (!imp) return NULL; + + mem = eina_mempool_malloc(imp->mempool, size); + if (mem) imp->references++; + else if (imp->references == 0) _eina_value_inner_mp_dispose(size, imp); + + return mem; +} + +static inline void +_eina_value_inner_free_internal(int size, void *mem) +{ + Eina_Value_Inner_Mp *imp = eina_hash_find(_eina_value_inner_mps, &size); + EINA_SAFETY_ON_NULL_RETURN(imp); + + eina_mempool_free(imp->mempool, mem); + + imp->references--; + if (imp->references > 0) return; + _eina_value_inner_mp_dispose(size, imp); +} + +EAPI void * +eina_value_inner_alloc(size_t size) +{ + void *mem; + + if (size > 256) return malloc(size); + + eina_lock_take(&_eina_value_inner_mps_lock); + mem = _eina_value_inner_alloc_internal(size); + eina_lock_release(&_eina_value_inner_mps_lock); + + return mem; +} + +EAPI void +eina_value_inner_free(size_t size, void *mem) +{ + if (size > 256) + { + free(mem); + return; + } + + eina_lock_take(&_eina_value_inner_mps_lock); + _eina_value_inner_free_internal(size, mem); + eina_lock_release(&_eina_value_inner_mps_lock); +} + +/** + * @internal + * @brief Initialize the value module. + * + * @return #EINA_TRUE on success, #EINA_FALSE on failure. + * + * This function sets up the value module of Eina. It is called + * by eina_init(). + * + * @see eina_init() + */ +Eina_Bool +eina_value_init(void) +{ + const char *choice, *tmp; + + _eina_value_log_dom = eina_log_domain_register("eina_value", + EINA_LOG_COLOR_DEFAULT); + if (_eina_value_log_dom < 0) + { + EINA_LOG_ERR("Could not register log domain: eina_value"); + return EINA_FALSE; + } + +#ifdef EINA_DEFAULT_MEMPOOL + choice = "pass_through"; +#else + choice = "chained_mempool"; +#endif + tmp = getenv("EINA_MEMPOOL"); + if (tmp && tmp[0]) + choice = tmp; + + if (choice) + _eina_value_mp_choice = strdup(choice); + + _eina_value_mp = eina_mempool_add + (_eina_value_mp_choice, "value", NULL, sizeof(Eina_Value), 320); + if (!_eina_value_mp) + { + ERR("Mempool for value cannot be allocated in value init."); + goto on_init_fail_mp; + } + + if (!eina_lock_new(&_eina_value_inner_mps_lock)) + { + ERR("Cannot create lock in value init."); + goto on_init_fail_lock; + } + _eina_value_inner_mps = eina_hash_int32_new(NULL); + if (!_eina_value_inner_mps) + { + ERR("Cannot create hash for inner mempools in value init."); + goto on_init_fail_hash; + } + + EINA_ERROR_VALUE_FAILED = eina_error_msg_static_register( + EINA_ERROR_VALUE_FAILED_STR); + + EINA_VALUE_TYPE_UCHAR = _EINA_VALUE_TYPE_BASICS + 0; + EINA_VALUE_TYPE_USHORT = _EINA_VALUE_TYPE_BASICS + 1; + EINA_VALUE_TYPE_UINT = _EINA_VALUE_TYPE_BASICS + 2; + EINA_VALUE_TYPE_ULONG = _EINA_VALUE_TYPE_BASICS + 3; + EINA_VALUE_TYPE_UINT64 = _EINA_VALUE_TYPE_BASICS + 4; + EINA_VALUE_TYPE_CHAR = _EINA_VALUE_TYPE_BASICS + 5; + EINA_VALUE_TYPE_SHORT = _EINA_VALUE_TYPE_BASICS + 6; + EINA_VALUE_TYPE_INT = _EINA_VALUE_TYPE_BASICS + 7; + EINA_VALUE_TYPE_LONG = _EINA_VALUE_TYPE_BASICS + 8; + EINA_VALUE_TYPE_INT64 = _EINA_VALUE_TYPE_BASICS + 9; + EINA_VALUE_TYPE_FLOAT = _EINA_VALUE_TYPE_BASICS + 10; + EINA_VALUE_TYPE_DOUBLE = _EINA_VALUE_TYPE_BASICS + 11; + EINA_VALUE_TYPE_STRINGSHARE = _EINA_VALUE_TYPE_BASICS + 12; + EINA_VALUE_TYPE_STRING = _EINA_VALUE_TYPE_BASICS + 13; + + _EINA_VALUE_TYPE_BASICS_START = _EINA_VALUE_TYPE_BASICS + 0; + _EINA_VALUE_TYPE_BASICS_END = _EINA_VALUE_TYPE_BASICS + 13; + + EINA_SAFETY_ON_FALSE_RETURN_VAL((sizeof(_EINA_VALUE_TYPE_BASICS)/sizeof(_EINA_VALUE_TYPE_BASICS[0])) == 14, EINA_FALSE); + + + EINA_VALUE_TYPE_ARRAY = &_EINA_VALUE_TYPE_ARRAY; + EINA_VALUE_TYPE_LIST = &_EINA_VALUE_TYPE_LIST; + EINA_VALUE_TYPE_HASH = &_EINA_VALUE_TYPE_HASH; + EINA_VALUE_TYPE_TIMEVAL = &_EINA_VALUE_TYPE_TIMEVAL; + EINA_VALUE_TYPE_BLOB = &_EINA_VALUE_TYPE_BLOB; + EINA_VALUE_TYPE_STRUCT = &_EINA_VALUE_TYPE_STRUCT; + + EINA_VALUE_BLOB_OPERATIONS_MALLOC = &_EINA_VALUE_BLOB_OPERATIONS_MALLOC; + + EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH = &_EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH; + EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE = &_EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE; + + return EINA_TRUE; + + on_init_fail_hash: + eina_lock_free(&_eina_value_inner_mps_lock); + on_init_fail_lock: + eina_mempool_del(_eina_value_mp); + on_init_fail_mp: + free(_eina_value_mp_choice); + _eina_value_mp_choice = NULL; + eina_log_domain_unregister(_eina_value_log_dom); + _eina_value_log_dom = -1; + return EINA_FALSE; +} + +/** + * @internal + * @brief Shut down the value module. + * + * @return #EINA_TRUE on success, #EINA_FALSE on failure. + * + * This function shuts down the value module set up by + * eina_value_init(). It is called by eina_shutdown(). + * + * @see eina_shutdown() + */ +Eina_Bool +eina_value_shutdown(void) +{ + eina_lock_take(&_eina_value_inner_mps_lock); + if (eina_hash_population(_eina_value_inner_mps) != 0) + ERR("Cannot free eina_value internal memory pools -- still in use!"); + else + eina_hash_free(_eina_value_inner_mps); + eina_lock_release(&_eina_value_inner_mps_lock); + eina_lock_free(&_eina_value_inner_mps_lock); + + free(_eina_value_mp_choice); + _eina_value_mp_choice = NULL; + eina_mempool_del(_eina_value_mp); + eina_log_domain_unregister(_eina_value_log_dom); + _eina_value_log_dom = -1; + return EINA_TRUE; +} /*============================================================================* * Global * @@ -39,9 +4793,232 @@ * API * *============================================================================*/ +EAPI const Eina_Value_Type *_EINA_VALUE_TYPE_BASICS_START = NULL; +EAPI const Eina_Value_Type *_EINA_VALUE_TYPE_BASICS_END = NULL; + +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_UCHAR = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_USHORT = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_UINT = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_ULONG = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_UINT64 = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_CHAR = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_SHORT = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_INT = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_LONG = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_INT64 = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_FLOAT = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_DOUBLE = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_STRINGSHARE = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_STRING = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_ARRAY = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_LIST = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_HASH = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_TIMEVAL = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_BLOB = NULL; +EAPI const Eina_Value_Type *EINA_VALUE_TYPE_STRUCT = NULL; + +EAPI const Eina_Value_Blob_Operations *EINA_VALUE_BLOB_OPERATIONS_MALLOC = NULL; + +EAPI const Eina_Value_Struct_Operations *EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH = NULL; +EAPI const Eina_Value_Struct_Operations *EINA_VALUE_STRUCT_OPERATIONS_STRINGSHARE = NULL; + +EAPI Eina_Error EINA_ERROR_VALUE_FAILED = 0; + EAPI const unsigned int eina_prime_table[] = { 17, 31, 61, 127, 257, 509, 1021, 2053, 4093, 8191, 16381, 32771, 65537, 131071, 262147, 524287, 1048573, 2097143, 4194301, 8388617, 16777213 }; + +EAPI Eina_Value * +eina_value_new(const Eina_Value_Type *type) +{ + Eina_Value *value = eina_mempool_malloc(_eina_value_mp, sizeof(Eina_Value));; + if (!value) + { + eina_error_set(EINA_ERROR_OUT_OF_MEMORY); + return NULL; + } + if (!eina_value_setup(value, type)) + { + free(value); + return NULL; + } + return value; +} + +EAPI void +eina_value_free(Eina_Value *value) +{ + EINA_SAFETY_ON_NULL_RETURN(value); + eina_value_flush(value); + eina_mempool_free(_eina_value_mp, value); +} + + +EAPI Eina_Bool +eina_value_copy(const Eina_Value *value, Eina_Value *copy) +{ + const Eina_Value_Type *type; + const void *src; + void *dst; + Eina_Bool ret; + + EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(value->type), + EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(copy, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(value->type->copy, EINA_FALSE); + + type = value->type; + if (!eina_value_setup(copy, type)) + return EINA_FALSE; + + src = eina_value_memory_get(value); + dst = eina_value_memory_get(copy); + ret = type->copy(type, src, dst); + if (!ret) + eina_value_flush(copy); + + return ret; +} + +EAPI Eina_Bool +eina_value_convert(const Eina_Value *value, Eina_Value *convert) +{ + Eina_Bool ret = EINA_FALSE; + const Eina_Value_Type *type, *convert_type; + const void *type_mem; + void *convert_mem; + + EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(convert, EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(value->type), + EINA_FALSE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(convert->type), + EINA_FALSE); + + type = value->type; + convert_type = convert->type; + + type_mem = eina_value_memory_get(value); + convert_mem = eina_value_memory_get(convert); + + if (type->convert_to) + ret = type->convert_to(type, convert_type, type_mem, convert_mem); + + if ((!ret) && (convert_type->convert_from)) + ret = convert_type->convert_from(convert_type, type, convert_mem, + type_mem); + + return ret; +} + +EAPI char * +eina_value_to_string(const Eina_Value *value) +{ + Eina_Value tmp; + + EINA_SAFETY_ON_NULL_RETURN_VAL(value, NULL); + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(value->type), NULL); + + if (!eina_value_setup(&tmp, EINA_VALUE_TYPE_STRING)) + return NULL; + if (!eina_value_convert(value, &tmp)) + return NULL; + + return tmp.value.ptr; /* steal value */ +} + +EAPI Eina_Value * +eina_value_array_new(const Eina_Value_Type *subtype, unsigned int step) +{ + Eina_Value *value; + + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(subtype), EINA_FALSE); + + value = eina_mempool_malloc(_eina_value_mp, sizeof(Eina_Value));; + if (!value) + return NULL; + + if (!eina_value_array_setup(value, subtype, step)) + { + eina_mempool_free(_eina_value_mp, value); + return NULL; + } + + return value; +} + +EAPI Eina_Value * +eina_value_list_new(const Eina_Value_Type *subtype) +{ + Eina_Value *value; + + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(subtype), EINA_FALSE); + + value = eina_mempool_malloc(_eina_value_mp, sizeof(Eina_Value));; + if (!value) + return NULL; + + if (!eina_value_list_setup(value, subtype)) + { + eina_mempool_free(_eina_value_mp, value); + return NULL; + } + + return value; +} + +EAPI Eina_Value * +eina_value_hash_new(const Eina_Value_Type *subtype, unsigned int buckets_power_size) +{ + Eina_Value *value; + + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(subtype), EINA_FALSE); + + value = eina_mempool_malloc(_eina_value_mp, sizeof(Eina_Value));; + if (!value) + return NULL; + + if (!eina_value_hash_setup(value, subtype, buckets_power_size)) + { + eina_mempool_free(_eina_value_mp, value); + return NULL; + } + + return value; +} + +EAPI Eina_Value * +eina_value_struct_new(const Eina_Value_Struct_Desc *desc) +{ + Eina_Value *value; + + value = eina_mempool_malloc(_eina_value_mp, sizeof(Eina_Value));; + if (!value) + return NULL; + + if (!eina_value_struct_setup(value, desc)) + { + eina_mempool_free(_eina_value_mp, value); + return NULL; + } + + return value; +} + +EAPI Eina_Bool +eina_value_type_check(const Eina_Value_Type *type) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(type, EINA_FALSE); + return type->version == EINA_VALUE_TYPE_VERSION; +} + +EAPI const char * +eina_value_type_name_get(const Eina_Value_Type *type) +{ + EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_value_type_check(type), NULL); + return type->name; +} diff --git a/libraries/eina/src/lib/eina_xattr.c b/libraries/eina/src/lib/eina_xattr.c index bd5b98e..d4ed139 100644 --- a/libraries/eina/src/lib/eina_xattr.c +++ b/libraries/eina/src/lib/eina_xattr.c @@ -20,6 +20,7 @@ # include "config.h" #endif +#include #include #include #include @@ -34,6 +35,7 @@ #include "eina_safety_checks.h" #include "eina_xattr.h" #include "eina_convert.h" +#include "eina_stringshare.h" /*============================================================================* * Local * @@ -49,14 +51,83 @@ struct _Eina_Xattr_Iterator { Eina_Iterator iterator; + const char *file; + Eina_Xattr *attr; + ssize_t length; ssize_t offset; + int fd; + char xattr[1]; }; #ifdef HAVE_XATTR static Eina_Bool +_eina_xattr_value_ls_fd_iterator_next(Eina_Xattr_Iterator *it, void **data) +{ + char *tmp; + + if (it->offset >= it->length) + return EINA_FALSE; + + *data = it->attr; + it->attr->name = it->xattr + it->offset; + + it->attr->length = fgetxattr(it->fd, it->attr->name, NULL, 0); + if (it->attr->length) + { + tmp = realloc((void*) it->attr->value, it->attr->length); + if (!tmp) + { + free((void*) it->attr->value); + it->attr->value = NULL; + it->attr->length = 0; + } + else + { + it->attr->length = fgetxattr(it->fd, it->attr->name, + (void *) it->attr->value, + it->attr->length); + } + } + + return EINA_TRUE; +} + +static Eina_Bool +_eina_xattr_value_ls_iterator_next(Eina_Xattr_Iterator *it, void **data) +{ + char *tmp; + + if (it->offset >= it->length) + return EINA_FALSE; + + *data = it->attr; + it->attr->name = it->xattr + it->offset; + + it->attr->length = getxattr(it->file, it->attr->name, NULL, 0); + if (it->attr->length) + { + tmp = realloc((void*) it->attr->value, it->attr->length); + if (!tmp) + { + free((void*) it->attr->value); + it->attr->value = NULL; + it->attr->length = 0; + } + else + { + it->attr->length = getxattr(it->file, it->attr->name, + (void*) it->attr->value, + it->attr->length); + } + } + + return EINA_TRUE; +} + +static Eina_Bool _eina_xattr_ls_iterator_next(Eina_Xattr_Iterator *it, void **data) { if (it->offset >= it->length) @@ -78,6 +149,9 @@ static void _eina_xattr_ls_iterator_free(Eina_Xattr_Iterator *it) { EINA_MAGIC_SET(&it->iterator, 0); + if (it->attr) free((void *) it->attr->value); + eina_stringshare_del(it->file); + free(it->attr); free(it); } #endif @@ -96,6 +170,85 @@ _eina_xattr_ls_iterator_free(Eina_Xattr_Iterator *it) * API * *============================================================================*/ +EAPI Eina_Iterator * +eina_xattr_value_fd_ls(int fd) +{ +#ifdef HAVE_XATTR + Eina_Xattr_Iterator *it; + ssize_t length; + + if (fd < 0) return NULL; + + length = flistxattr(fd, NULL, 0); + if (length <= 0) return NULL; + + it = calloc(1, sizeof (Eina_Xattr_Iterator) + length - 1); + if (!it) return NULL; + + it->attr = calloc(1, sizeof (Eina_Xattr)); + if (!it->attr) + { + free(it); + return NULL; + } + + EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); + + it->fd = fd; + it->length = flistxattr(fd, it->xattr, length); + if (it->length != length) + { + free(it); + return NULL; + } + + it->iterator.version = EINA_ITERATOR_VERSION; + it->iterator.next = FUNC_ITERATOR_NEXT(_eina_xattr_value_ls_fd_iterator_next); + it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_eina_xattr_ls_iterator_container); + it->iterator.free = FUNC_ITERATOR_FREE(_eina_xattr_ls_iterator_free); + + return &it->iterator; +#else + return NULL; + (void)fd; +#endif +} + +EAPI Eina_Iterator * +eina_xattr_fd_ls(int fd) +{ +#ifdef HAVE_XATTR + Eina_Xattr_Iterator *it; + ssize_t length; + + if (fd < 0) return NULL; + + length = flistxattr(fd, NULL, 0); + if (length <= 0) return NULL; + + it = calloc(1, sizeof (Eina_Xattr_Iterator) + length - 1); + if (!it) return NULL; + + EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); + + it->length = flistxattr(fd, it->xattr, length); + if (it->length != length) + { + free(it); + return NULL; + } + + it->iterator.version = EINA_ITERATOR_VERSION; + it->iterator.next = FUNC_ITERATOR_NEXT(_eina_xattr_ls_iterator_next); + it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_eina_xattr_ls_iterator_container); + it->iterator.free = FUNC_ITERATOR_FREE(_eina_xattr_ls_iterator_free); + + return &it->iterator; +#else + return NULL; + (void)fd; +#endif +} EAPI Eina_Iterator * eina_xattr_ls(const char *file) @@ -133,6 +286,44 @@ eina_xattr_ls(const char *file) #endif } +EAPI Eina_Iterator * +eina_xattr_value_ls(const char *file) +{ +#ifdef HAVE_XATTR + Eina_Xattr_Iterator *it; + ssize_t length; + + EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL); + + length = listxattr(file, NULL, 0); + if (length <= 0) return NULL; + + it = calloc(1, sizeof (Eina_Xattr_Iterator) + length - 1); + if (!it) return NULL; + + EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); + + it->length = listxattr(file, it->xattr, length); + if (it->length != length) + { + free(it); + return NULL; + } + + it->file = eina_stringshare_add(file); + + it->iterator.version = EINA_ITERATOR_VERSION; + it->iterator.next = FUNC_ITERATOR_NEXT(_eina_xattr_value_ls_iterator_next); + it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_eina_xattr_ls_iterator_container); + it->iterator.free = FUNC_ITERATOR_FREE(_eina_xattr_ls_iterator_free); + + return &it->iterator; +#else + return NULL; + (void)file; +#endif +} + EAPI void * eina_xattr_get(const char *file, const char *attribute, ssize_t *size) { diff --git a/libraries/eina/src/modules/Makefile.in b/libraries/eina/src/modules/Makefile.in index f3385f1..1ee8386 100644 --- a/libraries/eina/src/modules/Makefile.in +++ b/libraries/eina/src/modules/Makefile.in @@ -147,7 +147,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -199,8 +201,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/eina/src/modules/mp/Makefile.in b/libraries/eina/src/modules/mp/Makefile.in index d7e67ad..d3a6dd9 100644 --- a/libraries/eina/src/modules/mp/Makefile.in +++ b/libraries/eina/src/modules/mp/Makefile.in @@ -155,7 +155,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -207,8 +209,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/eina/src/modules/mp/buddy/Makefile.in b/libraries/eina/src/modules/mp/buddy/Makefile.in index 64d7fc7..5619b2c 100644 --- a/libraries/eina/src/modules/mp/buddy/Makefile.in +++ b/libraries/eina/src/modules/mp/buddy/Makefile.in @@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/eina/src/modules/mp/buddy/eina_buddy.c b/libraries/eina/src/modules/mp/buddy/eina_buddy.c index f402c6f..7d830db 100644 --- a/libraries/eina/src/modules/mp/buddy/eina_buddy.c +++ b/libraries/eina/src/modules/mp/buddy/eina_buddy.c @@ -133,23 +133,23 @@ static void _free(void *data, void *element) Buddy *b = data; Block *block, *buddy; size_t offset; - size_t index; + size_t idx; offset = (unsigned char *)element - (unsigned char *)b->heap; if (offset > b->size) return; - index = offset >> b->min_order; - block = &b->blocks[index]; + idx = offset >> b->min_order; + block = &b->blocks[idx]; - //printf("free %x index = %d order = %d buddy = %d\n", offset, index, block->order, index ^ (1 << block->order)); + //printf("free %x idx = %d order = %d buddy = %d\n", offset, idx, block->order, idx ^ (1 << block->order)); /* we should always work with the buddy at right */ - if (index & (1 << block->order)) + if (idx & (1 << block->order)) { Block *left; - index = index ^ (1 << block->order); - left = &b->blocks[index]; + idx = idx ^ (1 << block->order); + left = &b->blocks[idx]; if (!left->available) goto end; else @@ -170,7 +170,7 @@ check: } - buddy = &b->blocks[index ^ (1 << block->order)]; + buddy = &b->blocks[idx ^ (1 << block->order)]; if (!buddy->available) { goto end; /* merge two blocks */ @@ -239,7 +239,7 @@ static void _statistics(void *data) printf("Information:\n"); printf( - "size = %li, min_order = %d, max_order = %d, num_order = %d, num_blocks = %d (%luKB)\n", + "size = %zu, min_order = %d, max_order = %d, num_order = %d, num_blocks = %d (%uKB)\n", b->size, b->min_order, b->max_order, @@ -255,7 +255,7 @@ static void _statistics(void *data) printf("\n2^%d:", b->min_order + i); EINA_INLIST_FOREACH(b->areas[i], block) { - printf(" %li", (block - &b->blocks[0])); + printf(" %d", (block - &b->blocks[0])); } } printf("\nBlocks dumping:\n"); diff --git a/libraries/eina/src/modules/mp/chained_pool/Makefile.in b/libraries/eina/src/modules/mp/chained_pool/Makefile.in index b728672..03b639f 100644 --- a/libraries/eina/src/modules/mp/chained_pool/Makefile.in +++ b/libraries/eina/src/modules/mp/chained_pool/Makefile.in @@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/eina/src/modules/mp/chained_pool/eina_chained_mempool.c b/libraries/eina/src/modules/mp/chained_pool/eina_chained_mempool.c index 009b62b..020d0ad 100644 --- a/libraries/eina/src/modules/mp/chained_pool/eina_chained_mempool.c +++ b/libraries/eina/src/modules/mp/chained_pool/eina_chained_mempool.c @@ -31,6 +31,10 @@ # endif #endif +#ifdef EINA_DEBUG_MALLOC +# include +#endif + #ifdef EFL_HAVE_WIN32_THREADS # define WIN32_LEAN_AND_MEAN # include @@ -51,7 +55,7 @@ # include #endif -#ifdef DEBUG +#if defined DEBUG || defined EINA_DEBUG_MALLOC #include #include "eina_log.h" @@ -74,6 +78,9 @@ struct _Chained_Mempool int alloc_size; int group_size; int usage; +#ifdef EINA_DEBUG_MALLOC + int minimal_size; +#endif #ifdef EFL_DEBUG_THREADS pthread_t self; #endif @@ -125,6 +132,20 @@ _eina_chained_mp_pool_new(Chained_Mempool *pool) return NULL; } +#ifdef EINA_DEBUG_MALLOC + { + size_t sz; + + sz = malloc_usable_size(p); + if (sz - pool->minimal_size > 0) + INF("Just allocated %0.2f%% to much memory in '%s' for one block of size %i that means %i bytes to much.", + ((float)(sz - pool->minimal_size) * 100) / (float) (pool->alloc_size), + pool->name, + pool->alloc_size, + sz - pool->minimal_size); + } +#endif + alignof = eina_mempool_alignof(sizeof(Chained_Pool)); ptr = (unsigned char *)p + alignof; p->usage = 0; @@ -444,6 +465,10 @@ eina_chained_mempool_init(const char *context, memcpy((char *)mp->name, context, length); } +#ifdef EINA_DEBUG_MALLOC + mp->minimal_size = item_size * mp->pool_size + sizeof(Chained_Pool); +#endif + mp->item_alloc = eina_mempool_alignof(item_size); mp->group_size = mp->item_alloc * mp->pool_size; mp->alloc_size = mp->group_size + eina_mempool_alignof(sizeof(Chained_Pool)); @@ -517,7 +542,7 @@ static Eina_Mempool_Backend _eina_chained_mp_backend = { Eina_Bool chained_init(void) { -#ifdef DEBUG +#if defined DEBUG || defined EINA_DEBUG_MALLOC _eina_chained_mp_log_dom = eina_log_domain_register("eina_mempool", EINA_LOG_COLOR_DEFAULT); if (_eina_chained_mp_log_dom < 0) @@ -533,7 +558,7 @@ Eina_Bool chained_init(void) void chained_shutdown(void) { eina_mempool_unregister(&_eina_chained_mp_backend); -#ifdef DEBUG +#if defined DEBUG || defined EINA_DEBUG_MALLOC eina_log_domain_unregister(_eina_chained_mp_log_dom); _eina_chained_mp_log_dom = -1; #endif diff --git a/libraries/eina/src/modules/mp/ememoa_fixed/Makefile.in b/libraries/eina/src/modules/mp/ememoa_fixed/Makefile.in index ec97bb1..ccc4f1a 100644 --- a/libraries/eina/src/modules/mp/ememoa_fixed/Makefile.in +++ b/libraries/eina/src/modules/mp/ememoa_fixed/Makefile.in @@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/eina/src/modules/mp/ememoa_unknown/Makefile.in b/libraries/eina/src/modules/mp/ememoa_unknown/Makefile.in index b295c64..8b0ec6e 100644 --- a/libraries/eina/src/modules/mp/ememoa_unknown/Makefile.in +++ b/libraries/eina/src/modules/mp/ememoa_unknown/Makefile.in @@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/eina/src/modules/mp/fixed_bitmap/Makefile.in b/libraries/eina/src/modules/mp/fixed_bitmap/Makefile.in index c1541fc..337f820 100644 --- a/libraries/eina/src/modules/mp/fixed_bitmap/Makefile.in +++ b/libraries/eina/src/modules/mp/fixed_bitmap/Makefile.in @@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/eina/src/modules/mp/one_big/Makefile.in b/libraries/eina/src/modules/mp/one_big/Makefile.in index e999b78..c8560c9 100644 --- a/libraries/eina/src/modules/mp/one_big/Makefile.in +++ b/libraries/eina/src/modules/mp/one_big/Makefile.in @@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/eina/src/modules/mp/pass_through/Makefile.in b/libraries/eina/src/modules/mp/pass_through/Makefile.in index 01e7b51..f5664be 100644 --- a/libraries/eina/src/modules/mp/pass_through/Makefile.in +++ b/libraries/eina/src/modules/mp/pass_through/Makefile.in @@ -163,7 +163,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -215,8 +217,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/eina/src/tests/Makefile.am b/libraries/eina/src/tests/Makefile.am index a413e6e..7e05ba9 100644 --- a/libraries/eina/src/tests/Makefile.am +++ b/libraries/eina/src/tests/Makefile.am @@ -28,7 +28,7 @@ endif if EFL_ENABLE_TESTS -check_PROGRAMS = eina_suite +check_PROGRAMS = eina_suite cxx_compile_test eina_suite_SOURCES = \ eina_suite.c \ @@ -38,6 +38,7 @@ eina_test_ustringshare.c\ eina_test_ustr.c \ eina_test_binshare.c \ eina_test_binbuf.c \ +eina_test_inarray.c \ eina_test_array.c \ eina_test_clist.c \ eina_test_error.c \ @@ -64,10 +65,14 @@ eina_test_tiler.c \ eina_test_strbuf.c \ eina_test_str.c \ eina_test_quadtree.c \ -eina_test_simple_xml_parser.c +eina_test_simple_xml_parser.c \ +eina_test_value.c eina_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libeina.la -lm +cxx_compile_test_SOURCES = cxx_compile_test.cxx +cxx_compile_test_LDADD = $(top_builddir)/src/lib/libeina.la + module_dummydir = $(libdir)/eina/test module_dummy_LTLIBRARIES = module_dummy.la diff --git a/libraries/eina/src/tests/Makefile.in b/libraries/eina/src/tests/Makefile.in index b5983b3..c56211a 100644 --- a/libraries/eina/src/tests/Makefile.in +++ b/libraries/eina/src/tests/Makefile.in @@ -37,7 +37,8 @@ build_triplet = @build@ host_triplet = @host@ @EINA_HAVE_GLIB_TRUE@am__append_1 = -DEINA_BENCH_HAVE_GLIB @EINA_ENABLE_BENCHMARK_E17_TRUE@am__append_2 = -DEINA_ENABLE_BENCH_E17 -@EFL_ENABLE_TESTS_TRUE@check_PROGRAMS = eina_suite$(EXEEXT) +@EFL_ENABLE_TESTS_TRUE@check_PROGRAMS = eina_suite$(EXEEXT) \ +@EFL_ENABLE_TESTS_TRUE@ cxx_compile_test$(EXEEXT) @EFL_ENABLE_BENCHMARK_TRUE@bench_PROGRAMS = eina_bench$(EXEEXT) subdir = src/tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in @@ -107,6 +108,12 @@ module_dummy_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ @EFL_ENABLE_TESTS_TRUE@am_module_dummy_la_rpath = -rpath \ @EFL_ENABLE_TESTS_TRUE@ $(module_dummydir) PROGRAMS = $(bench_PROGRAMS) +am__cxx_compile_test_SOURCES_DIST = cxx_compile_test.cxx +@EFL_ENABLE_TESTS_TRUE@am_cxx_compile_test_OBJECTS = \ +@EFL_ENABLE_TESTS_TRUE@ cxx_compile_test.$(OBJEXT) +cxx_compile_test_OBJECTS = $(am_cxx_compile_test_OBJECTS) +@EFL_ENABLE_TESTS_TRUE@cxx_compile_test_DEPENDENCIES = \ +@EFL_ENABLE_TESTS_TRUE@ $(top_builddir)/src/lib/libeina.la am__eina_bench_SOURCES_DIST = eina_bench.c eina_bench_sort.c \ eina_bench_hash.c eina_bench_stringshare.c \ eina_bench_convert.c eina_bench_mempool.c \ @@ -142,16 +149,17 @@ eina_bench_OBJECTS = $(am_eina_bench_OBJECTS) am__eina_suite_SOURCES_DIST = eina_suite.c eina_test_fp.c \ eina_test_stringshare.c eina_test_ustringshare.c \ eina_test_ustr.c eina_test_binshare.c eina_test_binbuf.c \ - eina_test_array.c eina_test_clist.c eina_test_error.c \ - eina_test_sched.c eina_test_log.c eina_test_magic.c \ - eina_test_inlist.c eina_test_main.c eina_test_counter.c \ - eina_test_lalloc.c eina_test_hash.c eina_test_iterator.c \ - eina_test_accessor.c eina_test_module.c eina_test_convert.c \ - eina_test_rbtree.c eina_test_file.c eina_test_benchmark.c \ - eina_test_mempool.c eina_test_rectangle.c eina_test_list.c \ + eina_test_inarray.c eina_test_array.c eina_test_clist.c \ + eina_test_error.c eina_test_sched.c eina_test_log.c \ + eina_test_magic.c eina_test_inlist.c eina_test_main.c \ + eina_test_counter.c eina_test_lalloc.c eina_test_hash.c \ + eina_test_iterator.c eina_test_accessor.c eina_test_module.c \ + eina_test_convert.c eina_test_rbtree.c eina_test_file.c \ + eina_test_benchmark.c eina_test_mempool.c \ + eina_test_rectangle.c eina_test_list.c \ eina_test_matrixsparse.c eina_test_tiler.c eina_test_strbuf.c \ eina_test_str.c eina_test_quadtree.c \ - eina_test_simple_xml_parser.c + eina_test_simple_xml_parser.c eina_test_value.c @EFL_ENABLE_TESTS_TRUE@am_eina_suite_OBJECTS = eina_suite.$(OBJEXT) \ @EFL_ENABLE_TESTS_TRUE@ eina_test_fp.$(OBJEXT) \ @EFL_ENABLE_TESTS_TRUE@ eina_test_stringshare.$(OBJEXT) \ @@ -159,6 +167,7 @@ am__eina_suite_SOURCES_DIST = eina_suite.c eina_test_fp.c \ @EFL_ENABLE_TESTS_TRUE@ eina_test_ustr.$(OBJEXT) \ @EFL_ENABLE_TESTS_TRUE@ eina_test_binshare.$(OBJEXT) \ @EFL_ENABLE_TESTS_TRUE@ eina_test_binbuf.$(OBJEXT) \ +@EFL_ENABLE_TESTS_TRUE@ eina_test_inarray.$(OBJEXT) \ @EFL_ENABLE_TESTS_TRUE@ eina_test_array.$(OBJEXT) \ @EFL_ENABLE_TESTS_TRUE@ eina_test_clist.$(OBJEXT) \ @EFL_ENABLE_TESTS_TRUE@ eina_test_error.$(OBJEXT) \ @@ -185,7 +194,8 @@ am__eina_suite_SOURCES_DIST = eina_suite.c eina_test_fp.c \ @EFL_ENABLE_TESTS_TRUE@ eina_test_strbuf.$(OBJEXT) \ @EFL_ENABLE_TESTS_TRUE@ eina_test_str.$(OBJEXT) \ @EFL_ENABLE_TESTS_TRUE@ eina_test_quadtree.$(OBJEXT) \ -@EFL_ENABLE_TESTS_TRUE@ eina_test_simple_xml_parser.$(OBJEXT) +@EFL_ENABLE_TESTS_TRUE@ eina_test_simple_xml_parser.$(OBJEXT) \ +@EFL_ENABLE_TESTS_TRUE@ eina_test_value.$(OBJEXT) eina_suite_OBJECTS = $(am_eina_suite_OBJECTS) @EFL_ENABLE_TESTS_TRUE@eina_suite_DEPENDENCIES = \ @EFL_ENABLE_TESTS_TRUE@ $(top_builddir)/src/lib/libeina.la @@ -232,10 +242,11 @@ AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libcity_la_SOURCES) $(module_dummy_la_SOURCES) \ - $(eina_bench_SOURCES) $(nodist_EXTRA_eina_bench_SOURCES) \ - $(eina_suite_SOURCES) + $(cxx_compile_test_SOURCES) $(eina_bench_SOURCES) \ + $(nodist_EXTRA_eina_bench_SOURCES) $(eina_suite_SOURCES) DIST_SOURCES = $(am__libcity_la_SOURCES_DIST) \ $(am__module_dummy_la_SOURCES_DIST) \ + $(am__cxx_compile_test_SOURCES_DIST) \ $(am__eina_bench_SOURCES_DIST) $(am__eina_suite_SOURCES_DIST) ETAGS = etags CTAGS = ctags @@ -282,7 +293,9 @@ EFL_SIMD_FLAGS = @EFL_SIMD_FLAGS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_CONFIGURE_DEFAULT_MEMPOOL = @EINA_CONFIGURE_DEFAULT_MEMPOOL@ +EINA_CONFIGURE_ENABLE_LOG = @EINA_CONFIGURE_ENABLE_LOG@ EINA_CONFIGURE_HAVE_DEBUG_THREADS = @EINA_CONFIGURE_HAVE_DEBUG_THREADS@ +EINA_CONFIGURE_HAVE_DIRENT_H = @EINA_CONFIGURE_HAVE_DIRENT_H@ EINA_CONFIGURE_HAVE_INTTYPES_H = @EINA_CONFIGURE_HAVE_INTTYPES_H@ EINA_CONFIGURE_HAVE_ON_OFF_THREADS = @EINA_CONFIGURE_HAVE_ON_OFF_THREADS@ EINA_CONFIGURE_HAVE_STDINT_H = @EINA_CONFIGURE_HAVE_STDINT_H@ @@ -334,8 +347,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ @@ -426,6 +437,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/include \ @EFL_ENABLE_TESTS_TRUE@eina_test_ustr.c \ @EFL_ENABLE_TESTS_TRUE@eina_test_binshare.c \ @EFL_ENABLE_TESTS_TRUE@eina_test_binbuf.c \ +@EFL_ENABLE_TESTS_TRUE@eina_test_inarray.c \ @EFL_ENABLE_TESTS_TRUE@eina_test_array.c \ @EFL_ENABLE_TESTS_TRUE@eina_test_clist.c \ @EFL_ENABLE_TESTS_TRUE@eina_test_error.c \ @@ -452,9 +464,12 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/include \ @EFL_ENABLE_TESTS_TRUE@eina_test_strbuf.c \ @EFL_ENABLE_TESTS_TRUE@eina_test_str.c \ @EFL_ENABLE_TESTS_TRUE@eina_test_quadtree.c \ -@EFL_ENABLE_TESTS_TRUE@eina_test_simple_xml_parser.c +@EFL_ENABLE_TESTS_TRUE@eina_test_simple_xml_parser.c \ +@EFL_ENABLE_TESTS_TRUE@eina_test_value.c @EFL_ENABLE_TESTS_TRUE@eina_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libeina.la -lm +@EFL_ENABLE_TESTS_TRUE@cxx_compile_test_SOURCES = cxx_compile_test.cxx +@EFL_ENABLE_TESTS_TRUE@cxx_compile_test_LDADD = $(top_builddir)/src/lib/libeina.la @EFL_ENABLE_TESTS_TRUE@module_dummydir = $(libdir)/eina/test @EFL_ENABLE_TESTS_TRUE@module_dummy_LTLIBRARIES = module_dummy.la @EFL_ENABLE_TESTS_TRUE@module_dummy_la_SOURCES = \ @@ -506,7 +521,7 @@ EXTRA_DIST = eina_bench.h \ all: all-am .SUFFIXES: -.SUFFIXES: .c .cc .lo .o .obj +.SUFFIXES: .c .cc .cxx .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -633,6 +648,9 @@ clean-checkPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list +cxx_compile_test$(EXEEXT): $(cxx_compile_test_OBJECTS) $(cxx_compile_test_DEPENDENCIES) + @rm -f cxx_compile_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(cxx_compile_test_OBJECTS) $(cxx_compile_test_LDADD) $(LIBS) eina_bench$(EXEEXT): $(eina_bench_OBJECTS) $(eina_bench_DEPENDENCIES) @rm -f eina_bench$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(eina_bench_OBJECTS) $(eina_bench_LDADD) $(LIBS) @@ -647,6 +665,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/city.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cxx_compile_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_hash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_list.Po@am__quote@ @@ -675,6 +694,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_fp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_hash.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_inarray.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_inlist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_iterator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_lalloc.Po@am__quote@ @@ -696,6 +716,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_tiler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_ustr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_ustringshare.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eina_test_value.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_hash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_mempool.Po@am__quote@ @@ -759,6 +780,30 @@ module_dummy_la-eina_test_module_dummy.lo: eina_test_module_dummy.c @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +.cxx.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cxx.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cxx.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + mostlyclean-libtool: -rm -f *.lo diff --git a/libraries/eina/src/tests/cxx_compile_test.cxx b/libraries/eina/src/tests/cxx_compile_test.cxx new file mode 100644 index 0000000..7d8af76 --- /dev/null +++ b/libraries/eina/src/tests/cxx_compile_test.cxx @@ -0,0 +1,34 @@ +/* EINA - EFL data type library + * Copyright (C) 2012 ProFUSION embedded systems + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; + * if not, see . + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "Eina.h" + +#include +using namespace std; + +int main() +{ + eina_init(); + cout << "Eina compiles with C++!"; + eina_shutdown(); + return 0; +} diff --git a/libraries/eina/src/tests/eina_bench.c b/libraries/eina/src/tests/eina_bench.c index a4eadbe..03aaaf9 100644 --- a/libraries/eina/src/tests/eina_bench.c +++ b/libraries/eina/src/tests/eina_bench.c @@ -73,7 +73,6 @@ int main(int argc, char **argv) { Eina_Benchmark *test; - Eina_Array *ea; unsigned int i; if (argc != 2) @@ -91,7 +90,7 @@ main(int argc, char **argv) etc[i].build(test); - ea = eina_benchmark_run(test); + eina_benchmark_run(test); eina_benchmark_free(test); } diff --git a/libraries/eina/src/tests/eina_bench_hash.c b/libraries/eina/src/tests/eina_bench_hash.c index 5b42318..0429097 100644 --- a/libraries/eina/src/tests/eina_bench_hash.c +++ b/libraries/eina/src/tests/eina_bench_hash.c @@ -139,6 +139,8 @@ eina_bench_lookup_rbtree(int request) EINA_RBTREE_CMP_KEY_CB( _eina_bench_rbtree_key), NULL); + /* Suppress warnings as we really don't want to do anything. */ + (void) tmp; } eina_rbtree_delete(root, EINA_RBTREE_FREE_CB(_eina_bench_rbtree_free), NULL); diff --git a/libraries/eina/src/tests/eina_bench_quad.c b/libraries/eina/src/tests/eina_bench_quad.c index 76d6667..8401fd4 100644 --- a/libraries/eina/src/tests/eina_bench_quad.c +++ b/libraries/eina/src/tests/eina_bench_quad.c @@ -19,6 +19,8 @@ #define WIDTH 720 #define HEIGHT 576 +#include + #include "eina_main.h" #include "eina_mempool.h" #include "eina_rectangle.h" diff --git a/libraries/eina/src/tests/eina_bench_stringshare.c b/libraries/eina/src/tests/eina_bench_stringshare.c index a2c7b38..22d18fa 100644 --- a/libraries/eina/src/tests/eina_bench_stringshare.c +++ b/libraries/eina/src/tests/eina_bench_stringshare.c @@ -64,6 +64,8 @@ eina_bench_stringshare_job(int request) tmp = eina_stringshare_add(build); } + /* Suppress warnings as we really don't want to do anything. */ + (void) tmp; eina_shutdown(); } @@ -125,6 +127,9 @@ eina_bench_evas_job(int request) eina_convert_xtoa(rand() % request, build + 7); tmp = evas_stringshare_add(build); } + + /* Suppress warnings as we really don't want to do anything. */ + (void) tmp; } static void @@ -155,6 +160,9 @@ eina_bench_ecore_job(int request) tmp = ecore_string_instance(build); } + /* Suppress warnings as we really don't want to do anything. */ + (void) tmp; + ecore_string_shutdown(); } diff --git a/libraries/eina/src/tests/eina_suite.c b/libraries/eina/src/tests/eina_suite.c index 9b748fc..648a717 100644 --- a/libraries/eina/src/tests/eina_suite.c +++ b/libraries/eina/src/tests/eina_suite.c @@ -34,6 +34,7 @@ struct _Eina_Test_Case static const Eina_Test_Case etc[] = { { "FixedPoint", eina_test_fp }, + { "Inarray", eina_test_inarray }, { "Array", eina_test_array }, { "Binary Share", eina_test_binshare }, { "String Share", eina_test_stringshare }, @@ -66,6 +67,7 @@ static const Eina_Test_Case etc[] = { { "QuadTree", eina_test_quadtree }, { "Sched", eina_test_sched }, { "Simple Xml Parser", eina_test_simple_xml_parser}, + { "Value", eina_test_value }, { NULL, NULL } }; diff --git a/libraries/eina/src/tests/eina_suite.h b/libraries/eina/src/tests/eina_suite.h index 643d6cc..6eaaec7 100644 --- a/libraries/eina/src/tests/eina_suite.h +++ b/libraries/eina/src/tests/eina_suite.h @@ -24,6 +24,7 @@ void eina_test_stringshare(TCase *tc); void eina_test_ustringshare(TCase *tc); void eina_test_binshare(TCase *tc); +void eina_test_inarray(TCase *tc); void eina_test_array(TCase *tc); void eina_test_log(TCase *tc); void eina_test_error(TCase *tc); @@ -54,5 +55,6 @@ void eina_test_quadtree(TCase *tc); void eina_test_fp(TCase *tc); void eina_test_sched(TCase *tc); void eina_test_simple_xml_parser(TCase *tc); +void eina_test_value(TCase *tc); #endif /* EINA_SUITE_H_ */ diff --git a/libraries/eina/src/tests/eina_test_array.c b/libraries/eina/src/tests/eina_test_array.c index 0b054ea..1929601 100644 --- a/libraries/eina/src/tests/eina_test_array.c +++ b/libraries/eina/src/tests/eina_test_array.c @@ -151,7 +151,7 @@ START_TEST(eina_array_remove_stuff) } fail_if(eina_array_remove(ea, keep_int, NULL) != EINA_TRUE); - fail_if(eina_array_count_get(ea) != 990); + fail_if(eina_array_count(ea) != 990); EINA_ARRAY_ITER_NEXT(ea, i, tmp, it) fail_if(*tmp == 0); @@ -165,7 +165,7 @@ START_TEST(eina_array_remove_stuff) eina_array_remove(ea, keep_int, NULL); // Remove all items - fail_if(eina_array_count_get(ea) != 980); + fail_if(eina_array_count(ea) != 980); EINA_ARRAY_ITER_NEXT(ea, i, tmp, it) { fail_if(*tmp == 0); @@ -174,7 +174,7 @@ START_TEST(eina_array_remove_stuff) eina_array_remove(ea, keep_int, NULL); - fail_if(eina_array_count_get(ea) != 0); + fail_if(eina_array_count(ea) != 0); eina_array_free(ea); diff --git a/libraries/eina/src/tests/eina_test_binbuf.c b/libraries/eina/src/tests/eina_test_binbuf.c index 713e078..d62072e 100644 --- a/libraries/eina/src/tests/eina_test_binbuf.c +++ b/libraries/eina/src/tests/eina_test_binbuf.c @@ -27,8 +27,8 @@ START_TEST(binbuf_simple) { Eina_Binbuf *buf; - char *txt; - const char cbuf[] = "Null in the middle \0 and more text afterwards and \0 anotehr null just there and another one \0 here."; + unsigned char *txt; + const unsigned char cbuf[] = "Null in the middle \0 and more text afterwards and \0 anotehr null just there and another one \0 here."; size_t size = sizeof(cbuf) - 1; /* We don't care about the real NULL */ @@ -69,7 +69,7 @@ END_TEST START_TEST(binbuf_remove) { Eina_Binbuf *buf; - const char cbuf[] = "12\0 456 78\0 abcthis is some more random junk here!"; + const unsigned char cbuf[] = "12\0 456 78\0 abcthis is some more random junk here!"; size_t size = sizeof(cbuf) - 1; /* We don't care about the real NULL */ eina_init(); @@ -98,6 +98,33 @@ START_TEST(binbuf_remove) } END_TEST +START_TEST(binbuf_manage_simple) +{ + Eina_Binbuf *buf; + const char *_cbuf = "12\0 456 78\0 abcthis is some more random junk here!"; + const unsigned char *cbuf = (const unsigned char *) _cbuf; + size_t size = sizeof(cbuf) - 1; /* We don't care about the real NULL */ + unsigned char *alloc_buf = malloc(size); + memcpy(alloc_buf, cbuf, size); + + eina_init(); + + buf = eina_binbuf_manage_new_length(alloc_buf, size); + fail_if(!buf); + + fail_if(memcmp(eina_binbuf_string_get(buf), cbuf, size)); + fail_if(size != eina_binbuf_length_get(buf)); + eina_binbuf_append_length(buf, cbuf, size); + fail_if(memcmp(eina_binbuf_string_get(buf), cbuf, size)); + fail_if(memcmp(eina_binbuf_string_get(buf) + size, cbuf, size)); + fail_if(2 * size != eina_binbuf_length_get(buf)); + + eina_binbuf_free(buf); + + eina_shutdown(); +} +END_TEST + START_TEST(binbuf_insert) { #if 0 @@ -154,7 +181,7 @@ END_TEST START_TEST(binbuf_realloc) { Eina_Binbuf *buf; - char pattern[1024 * 16]; + unsigned char pattern[1024 * 16]; unsigned int i; size_t sz; @@ -232,4 +259,5 @@ eina_test_binbuf(TCase *tc) tcase_add_test(tc, binbuf_remove); tcase_add_test(tc, binbuf_insert); tcase_add_test(tc, binbuf_realloc); + tcase_add_test(tc, binbuf_manage_simple); } diff --git a/libraries/eina/src/tests/eina_test_file.c b/libraries/eina/src/tests/eina_test_file.c index aeb5461..55e9976 100644 --- a/libraries/eina/src/tests/eina_test_file.c +++ b/libraries/eina/src/tests/eina_test_file.c @@ -48,7 +48,7 @@ START_TEST(eina_file_split_simple) #endif fail_if(!ea); - fail_if(eina_array_count_get(ea) != 5); + fail_if(eina_array_count(ea) != 5); fail_if(strcmp(eina_array_data_get(ea, 0), "this")); fail_if(strcmp(eina_array_data_get(ea, 1), "is")); fail_if(strcmp(eina_array_data_get(ea, 2), "a")); @@ -66,7 +66,7 @@ START_TEST(eina_file_split_simple) #endif fail_if(!ea); - fail_if(eina_array_count_get(ea) != 6); + fail_if(eina_array_count(ea) != 6); fail_if(strcmp(eina_array_data_get(ea, 0), "this")); fail_if(strcmp(eina_array_data_get(ea, 1), "is")); fail_if(strcmp(eina_array_data_get(ea, 2), "a ")); diff --git a/libraries/eina/src/tests/eina_test_inarray.c b/libraries/eina/src/tests/eina_test_inarray.c new file mode 100644 index 0000000..22ba763 --- /dev/null +++ b/libraries/eina/src/tests/eina_test_inarray.c @@ -0,0 +1,401 @@ +/* EINA - EFL data type library + * Copyright (C) 2012 ProFUSION embedded systems + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; + * if not, see . + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include "eina_suite.h" +#include "Eina.h" + +START_TEST(eina_inarray_test_simple) +{ + const int test_members = 5; + Eina_Inarray *array; + int i, pos, *member; + const struct spec { + int pos, value; + } *s, specs[] = { + {test_members, 1234}, + {5, 0x1337}, + {0, 0xbeef}, + {-1, -1} + }; + + eina_init(); + + array = eina_inarray_new(sizeof(int), 2); + fail_unless(array != NULL); + + for (i = 0; i < test_members; i++) + { + pos = eina_inarray_append(array, &i); + fail_unless(pos == i); + } + fail_unless(eina_inarray_count(array) == (unsigned)test_members); + + for (i = 0; i < test_members; i++) + { + member = eina_inarray_nth(array, i); + fail_unless(*member == i); + } + + for (s = specs; s->pos >= 0; s++) + { + fail_unless(eina_inarray_insert_at(array, s->pos, &s->value)); + + for (i = 0; i < s->pos; i++) + { + member = eina_inarray_nth(array, i); + fail_unless(*member == i); + } + member = eina_inarray_nth(array, s->pos); + fail_unless(*member == s->value); + for (i = s->pos + 1; i < test_members + 1; i++) + { + member = eina_inarray_nth(array, i); + fail_unless(*member == i - 1); + } + + fail_unless(eina_inarray_remove_at(array, s->pos)); + for (i = 0; i < test_members; i++) + { + member = eina_inarray_nth(array, i); + fail_unless(*member == i); + } + } + + eina_inarray_free(array); + eina_shutdown(); +} +END_TEST + + +START_TEST(eina_inarray_test_alloc_at) +{ + Eina_Inarray *array; + int *member; + int i; + + eina_init(); + + array = eina_inarray_new(sizeof(int), 2); + fail_unless(array != NULL); + + member = eina_inarray_alloc_at(array, 0, 4); + fail_unless(member != NULL); + fail_unless(eina_inarray_count(array) == 4); + + for (i = 0; i < 4; i++) + member[i] = i + 2; + + member = eina_inarray_alloc_at(array, 0, 2); + fail_unless(member != NULL); + fail_unless(eina_inarray_count(array) == 6); + for (i = 0; i < 2; i++) + member[i] = i; + + member = eina_inarray_alloc_at(array, 6, 2); + fail_unless(member != NULL); + fail_unless(eina_inarray_count(array) == 8); + for (i = 0; i < 2; i++) + member[i] = i + 6; + + member = array->members; + for (i = 0; i < 8; i++) + fail_unless(member[i] == i); + + eina_inarray_free(array); + eina_shutdown(); +} +END_TEST + +static const short rand_numbers[] = { + 9, 0, 2, 3, 6, 5, 4, 7, 8, 1, 10 +}; +static const int numbers_count = sizeof(rand_numbers)/sizeof(rand_numbers[0]); + +static void +show_sort_array(const Eina_Inarray *array) +{ + int i, len = eina_inarray_count(array); + printf("array with %d members:\n", len); + for (i = 0; i < len; i++) + { + short *member = eina_inarray_nth(array, i); + printf("\tarray[%2d]=%5hd\n", i, *member); + } +} + +static Eina_Bool +check_short_sorted(const Eina_Inarray *array) +{ + int i; + for (i = 0; i < numbers_count; i++) + { + short *member = eina_inarray_nth(array, i); + if (*member != (short)i) + { + show_sort_array(array); + fprintf(stderr, "not sorted at %d: %hd\n", i, *member); + return EINA_FALSE; + } + } + return EINA_TRUE; +} + +static int +short_cmp(const void *pa, const void *pb) +{ + const short *a = pa, *b = pb; + return *a - *b; +} + +START_TEST(eina_inarray_test_insert_sort) +{ + Eina_Inarray *array; + int i, pos; + + eina_init(); + + array = eina_inarray_new(sizeof(short), 1); + fail_unless(array != NULL); + + /* insert sorted and already sorted sequence */ + for (i = 0; i < numbers_count; i++) + { + short val = i; + pos = eina_inarray_insert(array, &val, short_cmp); + fail_unless(pos == (int)val); + } + fail_unless(check_short_sorted(array)); + eina_inarray_flush(array); + + for (i = 0; i < numbers_count; i++) + { + short val = i; + pos = eina_inarray_insert_sorted(array, &val, short_cmp); + fail_unless(pos == (int)val); + } + fail_unless(check_short_sorted(array)); + eina_inarray_flush(array); + + /* insert sorted the reverse sequence */ + for (i = 0; i < numbers_count; i++) + { + short val = numbers_count - i - 1; + pos = eina_inarray_insert(array, &val, short_cmp); + fail_unless(pos == 0); + } + fail_unless(check_short_sorted(array)); + eina_inarray_flush(array); + + for (i = 0; i < numbers_count; i++) + { + short val = numbers_count - i - 1; + pos = eina_inarray_insert_sorted(array, &val, short_cmp); + fail_unless(pos == 0); + } + fail_unless(check_short_sorted(array)); + eina_inarray_flush(array); + + /* insert sorted random numbers */ + for (i = 0; i < numbers_count; i++) + { + short val = rand_numbers[i]; + eina_inarray_insert(array, &val, short_cmp); + } + fail_unless(check_short_sorted(array)); + eina_inarray_flush(array); + + for (i = 0; i < numbers_count; i++) + { + short val = rand_numbers[i]; + eina_inarray_insert_sorted(array, &val, short_cmp); + } + fail_unless(check_short_sorted(array)); + eina_inarray_flush(array); + + eina_inarray_free(array); + eina_shutdown(); +} +END_TEST + +START_TEST(eina_inarray_test_sort) +{ + Eina_Inarray *array; + int i; + + eina_init(); + + array = eina_inarray_new(sizeof(short), 1); + fail_unless(array != NULL); + + for (i = 0; i < numbers_count; i++) + { + short val = rand_numbers[i]; + eina_inarray_append(array, &val); + } + eina_inarray_sort(array, short_cmp); + fail_unless(check_short_sorted(array)); + eina_inarray_free(array); + eina_shutdown(); +} +END_TEST + +START_TEST(eina_inarray_test_reverse) +{ + Eina_Inarray *array; + int i; + + eina_init(); + + array = eina_inarray_new(sizeof(short), 1); + fail_unless(array != NULL); + + for (i = 0; i < numbers_count; i++) + { + short val = i; + eina_inarray_append(array, &val); + } + eina_inarray_reverse(array); + + for (i = 0; i < numbers_count; i++) + { + short *member = eina_inarray_nth(array, i); + fail_unless(*member == (numbers_count - i - 1)); + } + + eina_inarray_free(array); + eina_shutdown(); +} +END_TEST + +static Eina_Bool +array_foreach(const void *array __UNUSED__, void *p, void *user_data __UNUSED__) +{ + short *member = p; + int *i = user_data; + fail_unless(*i == *member); + (*i)++; + return EINA_TRUE; +} + +static Eina_Bool +array_foreach_stop_2nd(const void *array __UNUSED__, void *p, void *user_data __UNUSED__) +{ + short *member = p; + int *i = user_data; + fail_unless(*i == *member); + if (*i == 1) + return EINA_FALSE; + (*i)++; + return EINA_TRUE; +} + +START_TEST(eina_inarray_test_itr) +{ + Eina_Inarray *array; + Eina_Iterator *it; + Eina_Accessor *ac; + short *member; + int i; + + eina_init(); + + array = eina_inarray_new(sizeof(short), 1); + fail_unless(array != NULL); + + for (i = 0; i < numbers_count; i++) + { + short val = i; + eina_inarray_append(array, &val); + } + i = 0; + EINA_INARRAY_FOREACH(array, member) + { + fail_unless(*member == i); + i++; + } + fail_unless(i == numbers_count); + + i--; + EINA_INARRAY_REVERSE_FOREACH(array, member) + { + fail_unless(*member == i); + i--; + } + fail_unless(i == -1); + + i = 0; + fail_unless(eina_inarray_foreach(array, array_foreach, &i)); + fail_unless(i == numbers_count); + + i = 0; + fail_if(eina_inarray_foreach(array, array_foreach_stop_2nd, &i)); + fail_unless(i == 1); + + it = eina_inarray_iterator_new(array); + fail_unless(it != NULL); + i = 0; + EINA_ITERATOR_FOREACH(it, member) + { + fail_unless(*member == i); + i++; + } + fail_unless(i == numbers_count); + eina_iterator_free(it); + + it = eina_inarray_iterator_reversed_new(array); + fail_unless(it != NULL); + i--; + EINA_ITERATOR_FOREACH(it, member) + { + fail_unless(*member == i); + i--; + } + fail_unless(i == -1); + eina_iterator_free(it); + + ac = eina_inarray_accessor_new(array); + fail_unless(ac != NULL); + for (i = 0; i < numbers_count; i++) + { + fail_unless(eina_accessor_data_get(ac, i, (void **)&member)); + fail_unless(*member == i); + } + fail_unless(i == numbers_count); + eina_accessor_free(ac); + + eina_inarray_free(array); + eina_shutdown(); +} +END_TEST + +void +eina_test_inarray(TCase *tc) +{ + tcase_add_test(tc, eina_inarray_test_simple); + tcase_add_test(tc, eina_inarray_test_alloc_at); + tcase_add_test(tc, eina_inarray_test_insert_sort); + tcase_add_test(tc, eina_inarray_test_sort); + tcase_add_test(tc, eina_inarray_test_reverse); + tcase_add_test(tc, eina_inarray_test_itr); +} diff --git a/libraries/eina/src/tests/eina_test_value.c b/libraries/eina/src/tests/eina_test_value.c new file mode 100644 index 0000000..2d04c2f --- /dev/null +++ b/libraries/eina/src/tests/eina_test_value.c @@ -0,0 +1,1799 @@ +/* EINA - EFL data type library + * Copyright (C) 2012 ProFUSION embedded systems + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; + * if not, see . + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include + +#include "eina_suite.h" +#include "Eina.h" + +#define FP_ERR (0.0000001) +#define CHECK_FP(a, b) ((a - b) < FP_ERR) + +START_TEST(eina_value_test_simple) +{ + Eina_Value *value; + char c; + short s; + int i; + long l; + int64_t i64; + unsigned char uc; + unsigned short us; + unsigned int ui; + unsigned long ul; + uint64_t u64; + float f; + double d; + + eina_init(); + + value = eina_value_new(EINA_VALUE_TYPE_CHAR); + fail_unless(value != NULL); + fail_unless(eina_value_set(value, 'x')); + fail_unless(eina_value_get(value, &c)); + fail_unless(c == 'x'); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_SHORT)); + fail_unless(eina_value_set(value, 300)); + fail_unless(eina_value_get(value, &s)); + fail_unless(s == 300); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_INT)); + fail_unless(eina_value_set(value, -12345)); + fail_unless(eina_value_get(value, &i)); + fail_unless(i == -12345); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_LONG)); + fail_unless(eina_value_set(value, 0xb33f)); + fail_unless(eina_value_get(value, &l)); + fail_unless(l == 0xb33f); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_INT64)); + fail_unless(eina_value_set(value, 0x0011223344556677)); + fail_unless(eina_value_get(value, &i64)); + fail_unless(i64 == 0x0011223344556677); + eina_value_flush(value); + + /* unsigned: */ + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UCHAR)); + fail_unless(eina_value_set(value, 200)); + fail_unless(eina_value_get(value, &uc)); + fail_unless(uc == 200); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_USHORT)); + fail_unless(eina_value_set(value, 65535)); + fail_unless(eina_value_get(value, &us)); + fail_unless(us == 65535); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UINT)); + fail_unless(eina_value_set(value, 4000000000U)); + fail_unless(eina_value_get(value, &ui)); + fail_unless(ui == 4000000000U); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_ULONG)); + fail_unless(eina_value_set(value, 3000000001U)); + fail_unless(eina_value_get(value, &ul)); + fail_unless(ul == 3000000001U); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UINT64)); + fail_unless(eina_value_set(value, 0x1122334455667788)); + fail_unless(eina_value_get(value, &u64)); + fail_unless(u64 == 0x1122334455667788); + eina_value_flush(value); + + /* floating point */ + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_FLOAT)); + fail_unless(eina_value_set(value, 0.1234)); + fail_unless(eina_value_get(value, &f)); + fail_unless(CHECK_FP(0.1234, f)); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_DOUBLE)); + fail_unless(eina_value_set(value, 34567.8)); + fail_unless(eina_value_get(value, &d)); + fail_unless(CHECK_FP(34567.8, d)); + eina_value_flush(value); + + eina_value_free(value); + eina_shutdown(); +} +END_TEST + +START_TEST(eina_value_test_compare) +{ + Eina_Value *a, *b; + + eina_init(); + + a = eina_value_new(EINA_VALUE_TYPE_CHAR); + fail_unless(a != NULL); + b = eina_value_new(EINA_VALUE_TYPE_CHAR); + fail_unless(b != NULL); + + fail_unless(eina_value_set(a, 123)); + fail_unless(eina_value_set(b, 123)); + fail_unless(eina_value_compare(a, b) == 0); + fail_unless(eina_value_set(a, -10)); + fail_unless(eina_value_set(b, 123)); + fail_unless(eina_value_compare(a, b) < 0); + fail_unless(eina_value_set(a, 123)); + fail_unless(eina_value_set(b, 10)); + fail_unless(eina_value_compare(a, b) > 0); + eina_value_flush(a); + eina_value_flush(b); + + fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_SHORT)); + fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_SHORT)); + fail_unless(eina_value_set(a, 1230)); + fail_unless(eina_value_set(b, 1230)); + fail_unless(eina_value_compare(a, b) == 0); + fail_unless(eina_value_set(a, -100)); + fail_unless(eina_value_set(b, 1230)); + fail_unless(eina_value_compare(a, b) < 0); + fail_unless(eina_value_set(a, 1230)); + fail_unless(eina_value_set(b, -100)); + fail_unless(eina_value_compare(a, b) > 0); + eina_value_flush(a); + eina_value_flush(b); + + fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_INT)); + fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_INT)); + fail_unless(eina_value_set(a, 300000)); + fail_unless(eina_value_set(b, 300000)); + fail_unless(eina_value_compare(a, b) == 0); + fail_unless(eina_value_set(a, -100)); + fail_unless(eina_value_set(b, 300000)); + fail_unless(eina_value_compare(a, b) < 0); + fail_unless(eina_value_set(a, 300000)); + fail_unless(eina_value_set(b, -100)); + fail_unless(eina_value_compare(a, b) > 0); + eina_value_flush(a); + eina_value_flush(b); + + fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_LONG)); + fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_LONG)); + fail_unless(eina_value_set(a, 300000L)); + fail_unless(eina_value_set(b, 300000L)); + fail_unless(eina_value_compare(a, b) == 0); + fail_unless(eina_value_set(a, -100L)); + fail_unless(eina_value_set(b, 300000L)); + fail_unless(eina_value_compare(a, b) < 0); + fail_unless(eina_value_set(a, 300000L)); + fail_unless(eina_value_set(b, -100L)); + fail_unless(eina_value_compare(a, b) > 0); + eina_value_flush(a); + eina_value_flush(b); + + fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_INT64)); + fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_INT64)); + fail_unless(eina_value_set(a, (int64_t)800000)); + fail_unless(eina_value_set(b, (int64_t)800000)); + fail_unless(eina_value_compare(a, b) == 0); + fail_unless(eina_value_set(a, (int64_t)-100)); + fail_unless(eina_value_set(b, (int64_t)8000000)); + fail_unless(eina_value_compare(a, b) < 0); + fail_unless(eina_value_set(a, (int64_t)8000000)); + fail_unless(eina_value_set(b, (int64_t)-100)); + fail_unless(eina_value_compare(a, b) > 0); + eina_value_flush(a); + eina_value_flush(b); + + fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_UCHAR)); + fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_UCHAR)); + fail_unless(eina_value_set(a, 123)); + fail_unless(eina_value_set(b, 123)); + fail_unless(eina_value_compare(a, b) == 0); + fail_unless(eina_value_set(a, 10)); + fail_unless(eina_value_set(b, 123)); + fail_unless(eina_value_compare(a, b) < 0); + fail_unless(eina_value_set(a, 123)); + fail_unless(eina_value_set(b, 10)); + fail_unless(eina_value_compare(a, b) > 0); + eina_value_flush(a); + eina_value_flush(b); + + fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_USHORT)); + fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_USHORT)); + fail_unless(eina_value_set(a, 1230)); + fail_unless(eina_value_set(b, 1230)); + fail_unless(eina_value_compare(a, b) == 0); + fail_unless(eina_value_set(a, 100)); + fail_unless(eina_value_set(b, 1230)); + fail_unless(eina_value_compare(a, b) < 0); + fail_unless(eina_value_set(a, 1230)); + fail_unless(eina_value_set(b, 100)); + fail_unless(eina_value_compare(a, b) > 0); + eina_value_flush(a); + eina_value_flush(b); + + fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_UINT)); + fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_UINT)); + fail_unless(eina_value_set(a, 300000)); + fail_unless(eina_value_set(b, 300000)); + fail_unless(eina_value_compare(a, b) == 0); + fail_unless(eina_value_set(a, 100)); + fail_unless(eina_value_set(b, 300000)); + fail_unless(eina_value_compare(a, b) < 0); + fail_unless(eina_value_set(a, 300000)); + fail_unless(eina_value_set(b, 100)); + fail_unless(eina_value_compare(a, b) > 0); + eina_value_flush(a); + eina_value_flush(b); + + fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_ULONG)); + fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_ULONG)); + fail_unless(eina_value_set(a, 300000UL)); + fail_unless(eina_value_set(b, 300000UL)); + fail_unless(eina_value_compare(a, b) == 0); + fail_unless(eina_value_set(a, 100UL)); + fail_unless(eina_value_set(b, 300000UL)); + fail_unless(eina_value_compare(a, b) < 0); + fail_unless(eina_value_set(a, 300000UL)); + fail_unless(eina_value_set(b, 100UL)); + fail_unless(eina_value_compare(a, b) > 0); + eina_value_flush(a); + eina_value_flush(b); + + fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_UINT64)); + fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_UINT64)); + fail_unless(eina_value_set(a, (uint64_t)8000000)); + fail_unless(eina_value_set(b, (uint64_t)8000000)); + fail_unless(eina_value_compare(a, b) == 0); + fail_unless(eina_value_set(a, (uint64_t)100)); + fail_unless(eina_value_set(b, (uint64_t)8000000)); + fail_unless(eina_value_compare(a, b) < 0); + fail_unless(eina_value_set(a, (uint64_t)8000000)); + fail_unless(eina_value_set(b, (uint64_t)100)); + fail_unless(eina_value_compare(a, b) > 0); + eina_value_flush(a); + eina_value_flush(b); + + fail_unless(eina_value_setup(a, EINA_VALUE_TYPE_STRING)); + fail_unless(eina_value_setup(b, EINA_VALUE_TYPE_STRING)); + fail_unless(eina_value_set(a, "aaa")); + fail_unless(eina_value_set(b, "aaa")); + fail_unless(eina_value_compare(a, b) == 0); + fail_unless(eina_value_set(a, "abc")); + fail_unless(eina_value_set(b, "acd")); + fail_unless(eina_value_compare(a, b) < 0); + fail_unless(eina_value_set(a, "acd")); + fail_unless(eina_value_set(b, "abc")); + fail_unless(eina_value_compare(a, b) > 0); + eina_value_flush(a); + eina_value_flush(b); + + fail_unless(eina_value_array_setup(a, EINA_VALUE_TYPE_CHAR, 0)); + fail_unless(eina_value_array_setup(b, EINA_VALUE_TYPE_CHAR, 0)); + fail_unless(eina_value_compare(a, b) == 0); + + fail_unless(eina_value_array_append(a, 1)); + fail_unless(eina_value_array_append(a, 2)); + fail_unless(eina_value_array_append(a, 3)); + + fail_unless(eina_value_array_append(b, 1)); + fail_unless(eina_value_array_append(b, 2)); + fail_unless(eina_value_array_append(b, 3)); + + fail_unless(eina_value_compare(a, b) == 0); + + fail_unless(eina_value_array_set(a, 0, 0)); + fail_unless(eina_value_compare(a, b) < 0); + + fail_unless(eina_value_array_set(a, 0, 10)); + fail_unless(eina_value_compare(a, b) > 0); + + fail_unless(eina_value_array_set(a, 0, 1)); + + fail_unless(eina_value_array_set(b, 0, 0)); + fail_unless(eina_value_compare(a, b) > 0); + + fail_unless(eina_value_array_set(b, 0, 10)); + fail_unless(eina_value_compare(a, b) < 0); + + fail_unless(eina_value_array_set(b, 0, 1)); + fail_unless(eina_value_compare(a, b) == 0); + + /* bigger arrays are greater */ + fail_unless(eina_value_array_append(b, 0)); + fail_unless(eina_value_compare(a, b) < 0); + + fail_unless(eina_value_array_append(a, 0)); + fail_unless(eina_value_array_append(a, 0)); + fail_unless(eina_value_compare(a, b) > 0); + + /* bigger arrays are greater, unless an element says otherwise */ + fail_unless(eina_value_array_set(b, 0, 10)); + fail_unless(eina_value_compare(a, b) < 0); + + eina_value_flush(a); + eina_value_flush(b); + + fail_unless(eina_value_list_setup(a, EINA_VALUE_TYPE_CHAR)); + fail_unless(eina_value_list_setup(b, EINA_VALUE_TYPE_CHAR)); + fail_unless(eina_value_compare(a, b) == 0); + + fail_unless(eina_value_list_append(a, 1)); + fail_unless(eina_value_list_append(a, 2)); + fail_unless(eina_value_list_append(a, 3)); + + fail_unless(eina_value_list_append(b, 1)); + fail_unless(eina_value_list_append(b, 2)); + fail_unless(eina_value_list_append(b, 3)); + + fail_unless(eina_value_compare(a, b) == 0); + + fail_unless(eina_value_list_set(a, 0, 0)); + fail_unless(eina_value_compare(a, b) < 0); + + fail_unless(eina_value_list_set(a, 0, 10)); + fail_unless(eina_value_compare(a, b) > 0); + + fail_unless(eina_value_list_set(a, 0, 1)); + + fail_unless(eina_value_list_set(b, 0, 0)); + fail_unless(eina_value_compare(a, b) > 0); + + fail_unless(eina_value_list_set(b, 0, 10)); + fail_unless(eina_value_compare(a, b) < 0); + + fail_unless(eina_value_list_set(b, 0, 1)); + fail_unless(eina_value_compare(a, b) == 0); + + /* bigger lists are greater */ + fail_unless(eina_value_list_append(b, 0)); + fail_unless(eina_value_compare(a, b) < 0); + + fail_unless(eina_value_list_append(a, 0)); + fail_unless(eina_value_list_append(a, 0)); + fail_unless(eina_value_compare(a, b) > 0); + + /* bigger lists are greater, unless an element says otherwise */ + fail_unless(eina_value_list_set(b, 0, 10)); + fail_unless(eina_value_compare(a, b) < 0); + + eina_value_flush(a); + eina_value_flush(b); + + fail_unless(eina_value_hash_setup(a, EINA_VALUE_TYPE_CHAR, 0)); + fail_unless(eina_value_hash_setup(b, EINA_VALUE_TYPE_CHAR, 0)); + fail_unless(eina_value_compare(a, b) == 0); + + fail_unless(eina_value_hash_set(a, "abc", 1)); + fail_unless(eina_value_hash_set(a, "xyz", 2)); + fail_unless(eina_value_hash_set(a, "hello", 3)); + + fail_unless(eina_value_hash_set(b, "abc", 1)); + fail_unless(eina_value_hash_set(b, "xyz", 2)); + fail_unless(eina_value_hash_set(b, "hello", 3)); + + fail_unless(eina_value_compare(a, b) == 0); + + fail_unless(eina_value_hash_set(a, "abc", 0)); + fail_unless(eina_value_compare(a, b) < 0); + + fail_unless(eina_value_hash_set(a, "abc", 10)); + fail_unless(eina_value_compare(a, b) > 0); + + fail_unless(eina_value_hash_set(a, "abc", 1)); + + fail_unless(eina_value_hash_set(b, "abc", 0)); + fail_unless(eina_value_compare(a, b) > 0); + + fail_unless(eina_value_hash_set(b, "abc", 10)); + fail_unless(eina_value_compare(a, b) < 0); + + fail_unless(eina_value_hash_set(b, "abc", 1)); + fail_unless(eina_value_compare(a, b) == 0); + + /* bigger hashs are greater */ + fail_unless(eina_value_hash_set(b,"newkey", 0)); + fail_unless(eina_value_compare(a, b) < 0); + + fail_unless(eina_value_hash_set(a, "newkey", 0)); + fail_unless(eina_value_hash_set(a, "onemorenewkey", 0)); + fail_unless(eina_value_compare(a, b) > 0); + + /* bigger hashs are greater, unless an element says otherwise */ + fail_unless(eina_value_hash_set(b, "abc", 10)); + fail_unless(eina_value_compare(a, b) < 0); + + eina_value_free(a); + eina_value_free(b); + eina_shutdown(); +} +END_TEST + +START_TEST(eina_value_test_string) +{ + Eina_Value *value; + const char *s; + + eina_init(); + + value = eina_value_new(EINA_VALUE_TYPE_STRING); + fail_unless(value != NULL); + fail_unless(eina_value_set(value, "hello world!")); + fail_unless(eina_value_get(value, &s)); + fail_unless(strcmp(s, "hello world!") == 0); + + fail_unless(eina_value_set(value, "eina-value")); + fail_unless(eina_value_get(value, &s)); + fail_unless(strcmp(s, "eina-value") == 0); + + eina_value_flush(value); + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_STRING)); + + fail_unless(eina_value_set(value, "profusion")); + fail_unless(eina_value_get(value, &s)); + fail_unless(strcmp(s, "profusion") == 0); + + eina_value_free(value); + eina_shutdown(); +} +END_TEST + +START_TEST(eina_value_test_pvariant) +{ + Eina_Value *value; + char c, in_c; + short s, in_s; + int i, in_i; + long l, in_l; + int64_t i64, in_i64; + unsigned char uc, in_uc; + unsigned short us, in_us; + unsigned int ui, in_ui; + unsigned long ul, in_ul; + uint64_t u64, in_u64; + float f, in_f; + double d, in_d; + const char *str, *in_str; + + eina_init(); + + value = eina_value_new(EINA_VALUE_TYPE_CHAR); + fail_unless(value != NULL); + in_c = 'x'; + fail_unless(eina_value_pset(value, &in_c)); + fail_unless(eina_value_pget(value, &c)); + fail_unless(c == 'x'); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_SHORT)); + in_s = 300; + fail_unless(eina_value_pset(value, &in_s)); + fail_unless(eina_value_pget(value, &s)); + fail_unless(s == 300); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_INT)); + in_i = -12345; + fail_unless(eina_value_pset(value, &in_i)); + fail_unless(eina_value_pget(value, &i)); + fail_unless(i == -12345); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_LONG)); + in_l = 0xb33f; + fail_unless(eina_value_pset(value, &in_l)); + fail_unless(eina_value_pget(value, &l)); + fail_unless(l == 0xb33f); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_INT64)); + in_i64 = 0x0011223344556677; + fail_unless(eina_value_pset(value, &in_i64)); + fail_unless(eina_value_pget(value, &i64)); + fail_unless(i64 == 0x0011223344556677); + eina_value_flush(value); + + /* unsigned: */ + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UCHAR)); + in_uc = 200; + fail_unless(eina_value_pset(value, &in_uc)); + fail_unless(eina_value_pget(value, &uc)); + fail_unless(uc == 200); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_USHORT)); + in_us = 65535; + fail_unless(eina_value_pset(value, &in_us)); + fail_unless(eina_value_pget(value, &us)); + fail_unless(us == 65535); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UINT)); + in_ui = 4000000000U; + fail_unless(eina_value_pset(value, &in_ui)); + fail_unless(eina_value_pget(value, &ui)); + fail_unless(ui == 4000000000U); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_ULONG)); + in_ul = 3000000001U; + fail_unless(eina_value_pset(value, &in_ul)); + fail_unless(eina_value_pget(value, &ul)); + fail_unless(ul == 3000000001U); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UINT64)); + in_u64 = 0x1122334455667788; + fail_unless(eina_value_pset(value, &in_u64)); + fail_unless(eina_value_pget(value, &u64)); + fail_unless(u64 == 0x1122334455667788); + eina_value_flush(value); + + /* floating point */ + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_FLOAT)); + in_f = 0.1234; + fail_unless(eina_value_pset(value, &in_f)); + fail_unless(eina_value_pget(value, &f)); + fail_unless(CHECK_FP(0.1234, f)); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_DOUBLE)); + in_d = 34567.8; + fail_unless(eina_value_pset(value, &in_d)); + fail_unless(eina_value_pget(value, &d)); + fail_unless(CHECK_FP(34567.8, d)); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_STRING)); + in_str = "hello world!"; + fail_unless(eina_value_pset(value, &in_str)); + fail_unless(eina_value_pget(value, &str)); + fail_unless(strcmp(str, "hello world!") == 0); + + in_str = "eina-value"; + fail_unless(eina_value_pset(value, &in_str)); + fail_unless(eina_value_pget(value, &str)); + fail_unless(strcmp(str, "eina-value") == 0); + + eina_value_flush(value); + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_STRING)); + + in_str = "profusion"; + fail_unless(eina_value_pset(value, &in_str)); + fail_unless(eina_value_pget(value, &str)); + fail_unless(strcmp(str, "profusion") == 0); + + eina_value_free(value); + eina_shutdown(); +} +END_TEST + +START_TEST(eina_value_test_to_string) +{ + Eina_Value *value; + char c, in_c; + short s, in_s; + int i, in_i; + long l, in_l; + int64_t i64, in_i64; + unsigned char uc, in_uc; + unsigned short us, in_us; + unsigned int ui, in_ui; + unsigned long ul, in_ul; + uint64_t u64, in_u64; + float f, in_f; + double d, in_d; + const char *str, *in_str; + char *out; + char buf[256]; + + eina_init(); + + value = eina_value_new(EINA_VALUE_TYPE_CHAR); + fail_unless(value != NULL); + in_c = 'x'; + fail_unless(eina_value_pset(value, &in_c)); + fail_unless(eina_value_pget(value, &c)); + fail_unless(c == 'x'); + snprintf(buf, sizeof(buf), "%hhd", in_c); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strcmp(buf, out) == 0); + free(out); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_SHORT)); + in_s = 300; + fail_unless(eina_value_pset(value, &in_s)); + fail_unless(eina_value_pget(value, &s)); + fail_unless(s == 300); + snprintf(buf, sizeof(buf), "%hd", in_s); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strcmp(buf, out) == 0); + free(out); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_INT)); + in_i = -12345; + fail_unless(eina_value_pset(value, &in_i)); + fail_unless(eina_value_pget(value, &i)); + fail_unless(i == -12345); + snprintf(buf, sizeof(buf), "%d", in_i); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strcmp(buf, out) == 0); + free(out); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_LONG)); + in_l = 0xb33f; + fail_unless(eina_value_pset(value, &in_l)); + fail_unless(eina_value_pget(value, &l)); + fail_unless(l == 0xb33f); + snprintf(buf, sizeof(buf), "%ld", in_l); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strcmp(buf, out) == 0); + free(out); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_INT64)); + in_i64 = 0x0011223344556677; + fail_unless(eina_value_pset(value, &in_i64)); + fail_unless(eina_value_pget(value, &i64)); + fail_unless(i64 == 0x0011223344556677); + snprintf(buf, sizeof(buf), "%"PRId64, in_i64); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strcmp(buf, out) == 0); + free(out); + eina_value_flush(value); + + /* unsigned: */ + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UCHAR)); + in_uc = 200; + fail_unless(eina_value_pset(value, &in_uc)); + fail_unless(eina_value_pget(value, &uc)); + fail_unless(uc == 200); + snprintf(buf, sizeof(buf), "%hhu", in_uc); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strcmp(buf, out) == 0); + free(out); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_USHORT)); + in_us = 65535; + fail_unless(eina_value_pset(value, &in_us)); + fail_unless(eina_value_pget(value, &us)); + fail_unless(us == 65535); + snprintf(buf, sizeof(buf), "%hu", in_us); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strcmp(buf, out) == 0); + free(out); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UINT)); + in_ui = 4000000000U; + fail_unless(eina_value_pset(value, &in_ui)); + fail_unless(eina_value_pget(value, &ui)); + fail_unless(ui == 4000000000U); + snprintf(buf, sizeof(buf), "%u", in_ui); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strcmp(buf, out) == 0); + free(out); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_ULONG)); + in_ul = 3000000001U; + fail_unless(eina_value_pset(value, &in_ul)); + fail_unless(eina_value_pget(value, &ul)); + fail_unless(ul == 3000000001U); + snprintf(buf, sizeof(buf), "%lu", in_ul); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strcmp(buf, out) == 0); + free(out); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UINT64)); + in_u64 = 0x1122334455667788; + fail_unless(eina_value_pset(value, &in_u64)); + fail_unless(eina_value_pget(value, &u64)); + fail_unless(u64 == 0x1122334455667788); + snprintf(buf, sizeof(buf), "%"PRIu64, in_u64); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strcmp(buf, out) == 0); + free(out); + eina_value_flush(value); + + /* floating point */ + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_FLOAT)); + in_f = 0.1234; + fail_unless(eina_value_pset(value, &in_f)); + fail_unless(eina_value_pget(value, &f)); + fail_unless(CHECK_FP(0.1234, f)); + snprintf(buf, sizeof(buf), "%g", in_f); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strncmp(buf, out, 6) == 0); /* stupid float... */ + free(out); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_DOUBLE)); + in_d = 34567.8; + fail_unless(eina_value_pset(value, &in_d)); + fail_unless(eina_value_pget(value, &d)); + fail_unless(CHECK_FP(34567.8, d)); + snprintf(buf, sizeof(buf), "%g", in_d); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strncmp(buf, out, 7) == 0); /* stupid double... */ + free(out); + eina_value_flush(value); + + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_STRING)); + in_str = "hello world!"; + fail_unless(eina_value_pset(value, &in_str)); + fail_unless(eina_value_pget(value, &str)); + fail_unless(strcmp(str, "hello world!") == 0); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strcmp(in_str, out) == 0); + free(out); + + in_str = "eina-value"; + fail_unless(eina_value_pset(value, &in_str)); + fail_unless(eina_value_pget(value, &str)); + fail_unless(strcmp(str, "eina-value") == 0); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strcmp(in_str, out) == 0); + free(out); + + eina_value_flush(value); + fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_STRING)); + + in_str = "profusion"; + fail_unless(eina_value_pset(value, &in_str)); + fail_unless(eina_value_pget(value, &str)); + fail_unless(strcmp(str, "profusion") == 0); + out = eina_value_to_string(value); + fail_unless(out != NULL); + fail_unless(strcmp(in_str, out) == 0); + free(out); + + eina_value_free(value); + eina_shutdown(); +} +END_TEST + +START_TEST(eina_value_test_convert_char) +{ + Eina_Value *value, conv; + char c; + short s; + int i; + long l; + int64_t i64; + unsigned char uc; + unsigned short us; + unsigned int ui; + unsigned long ul; + uint64_t u64; + float f; + double d; + const char *str; + + eina_init(); + + value = eina_value_new(EINA_VALUE_TYPE_CHAR); + fail_unless(value != NULL); + + fail_unless(eina_value_set(value, 123)); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UCHAR)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &uc)); + fail_unless(uc == 123); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_USHORT)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &us)); + fail_unless(us == 123); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UINT)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &ui)); + fail_unless(ui == 123); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_ULONG)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &ul)); + fail_unless(ul == 123); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UINT64)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &u64)); + fail_unless(u64 == 123); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_CHAR)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &c)); + fail_unless(c == 123); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_SHORT)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &s)); + fail_unless(s == 123); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_INT)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &i)); + fail_unless(i == 123); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_LONG)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &l)); + fail_unless(l == 123); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_INT64)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &i64)); + fail_unless(i64 == 123); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_FLOAT)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &f)); + fail_unless(CHECK_FP(f, 123)); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_DOUBLE)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &d)); + fail_unless(CHECK_FP(d, 123)); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_STRING)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &str)); + fail_unless(str != NULL); + fail_unless(strcmp(str, "123") == 0); + eina_value_flush(&conv); + + /* negative tests */ + fail_unless(eina_value_set(value, -123)); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UCHAR)); + fail_if(eina_value_convert(value, &conv)); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_USHORT)); + fail_if(eina_value_convert(value, &conv)); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UINT)); + fail_if(eina_value_convert(value, &conv)); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_ULONG)); + fail_if(eina_value_convert(value, &conv)); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UINT64)); + fail_if(eina_value_convert(value, &conv)); + eina_value_flush(&conv); + + eina_value_free(value); + eina_shutdown(); +} +END_TEST + +START_TEST(eina_value_test_convert_uchar) +{ + Eina_Value *value, conv; + char c; + short s; + int i; + long l; + int64_t i64; + unsigned char uc; + unsigned short us; + unsigned int ui; + unsigned long ul; + uint64_t u64; + float f; + double d; + const char *str; + + eina_init(); + + value = eina_value_new(EINA_VALUE_TYPE_UCHAR); + fail_unless(value != NULL); + + fail_unless(eina_value_set(value, 31)); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UCHAR)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &uc)); + fail_unless(uc == 31); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_USHORT)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &us)); + fail_unless(us == 31); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UINT)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &ui)); + fail_unless(ui == 31); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_ULONG)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &ul)); + fail_unless(ul == 31); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_UINT64)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &u64)); + fail_unless(u64 == 31); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_CHAR)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &c)); + fail_unless(c == 31); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_SHORT)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &s)); + fail_unless(s == 31); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_INT)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &i)); + fail_unless(i == 31); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_LONG)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &l)); + fail_unless(l == 31); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_INT64)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &i64)); + fail_unless(i64 == 31); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_FLOAT)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &f)); + fail_unless(CHECK_FP(f, 31)); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_DOUBLE)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &d)); + fail_unless(CHECK_FP(d, 31)); + eina_value_flush(&conv); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_STRING)); + fail_unless(eina_value_convert(value, &conv)); + fail_unless(eina_value_get(&conv, &str)); + fail_unless(str != NULL); + fail_unless(strcmp(str, "31") == 0); + eina_value_flush(&conv); + + /* negative tests */ + fail_unless(eina_value_set(value, 200)); + + fail_unless(eina_value_setup(&conv, EINA_VALUE_TYPE_CHAR)); + fail_if(eina_value_convert(value, &conv)); + eina_value_flush(&conv); + + eina_value_free(value); + eina_shutdown(); +} +END_TEST + + +START_TEST(eina_value_test_array) +{ + Eina_Value *value, other; + Eina_Value_Array desc; + Eina_Inarray *inarray; + char c; + char buf[1024]; + char *str; + + eina_init(); + + value = eina_value_array_new(EINA_VALUE_TYPE_CHAR, 0); + fail_unless(value != NULL); + + fail_unless(eina_value_array_append(value, 'k')); + fail_unless(eina_value_array_append(value, '-')); + fail_unless(eina_value_array_append(value, 's')); + + fail_unless(eina_value_array_get(value, 0, &c)); + fail_unless(c == 'k'); + fail_unless(eina_value_array_get(value, 1, &c)); + fail_unless(c == '-'); + fail_unless(eina_value_array_get(value, 2, &c)); + fail_unless(c == 's'); + + fail_unless(eina_value_array_insert(value, 0, '!')); + fail_unless(eina_value_array_get(value, 0, &c)); + fail_unless(c == '!'); + fail_unless(eina_value_array_get(value, 1, &c)); + fail_unless(c == 'k'); + fail_unless(eina_value_array_get(value, 2, &c)); + fail_unless(c == '-'); + fail_unless(eina_value_array_get(value, 3, &c)); + fail_unless(c == 's'); + + fail_unless(eina_value_array_set(value, 0, '*')); + fail_unless(eina_value_array_get(value, 0, &c)); + fail_unless(c == '*'); + fail_unless(eina_value_array_get(value, 1, &c)); + fail_unless(c == 'k'); + fail_unless(eina_value_array_get(value, 2, &c)); + fail_unless(c == '-'); + fail_unless(eina_value_array_get(value, 3, &c)); + fail_unless(c == 's'); + + snprintf(buf, sizeof(buf), "[%hhd, %hhd, %hhd, %hhd]", + '*', 'k', '-', 's'); + + str = eina_value_to_string(value); + fail_unless(str != NULL); + fail_unless(strcmp(str, buf) == 0); + free(str); + + eina_value_flush(value); + fail_unless(eina_value_array_setup(value, EINA_VALUE_TYPE_STRINGSHARE, 2)); + + fail_unless(eina_value_array_append(value, "Enlightenment.org")); + fail_unless(eina_value_array_append(value, "X11")); + fail_unless(eina_value_array_append(value, "Pants")); + fail_unless(eina_value_array_append(value, "on!!!")); + fail_unless(eina_value_array_append(value, "k-s")); + + str = eina_value_to_string(value); + fail_unless(str != NULL); + fail_unless(strcmp(str, "[Enlightenment.org, X11, Pants, on!!!, k-s]") == 0); + free(str); + + eina_value_flush(value); + fail_unless(eina_value_array_setup(value, EINA_VALUE_TYPE_CHAR, 0)); + fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_CHAR)); + + fail_unless(eina_value_set(&other, 100)); + fail_unless(eina_value_get(&other, &c)); + fail_unless(c == 100); + + fail_unless(eina_value_convert(&other, value)); + str = eina_value_to_string(value); + fail_unless(str != NULL); + fail_unless(strcmp(str, "[100]") == 0); + free(str); + + fail_unless(eina_value_array_set(value, 0, 33)); + fail_unless(eina_value_convert(value, &other)); + fail_unless(eina_value_get(&other, &c)); + fail_unless(c == 33); + + inarray = eina_inarray_new(sizeof(char), 0); + fail_unless(inarray != NULL); + c = 11; + fail_unless(eina_inarray_append(inarray, &c) >= 0); + c = 21; + fail_unless(eina_inarray_append(inarray, &c) >= 0); + c = 31; + fail_unless(eina_inarray_append(inarray, &c) >= 0); + desc.subtype = EINA_VALUE_TYPE_CHAR; + desc.step = 0; + desc.array = inarray; /* will be adopted and freed by value */ + fail_unless(eina_value_set(value, desc)); /* manually configure */ + fail_unless(eina_value_array_get(value, 0, &c)); + fail_unless(c == 11); + fail_unless(eina_value_array_get(value, 1, &c)); + fail_unless(c == 21); + fail_unless(eina_value_array_get(value, 2, &c)); + fail_unless(c == 31); + + eina_value_free(value); + eina_shutdown(); +} +END_TEST + +START_TEST(eina_value_test_list) +{ + Eina_Value *value, other; + Eina_Value_List desc; + char c; + char buf[1024]; + char *str; + const char *s; + + eina_init(); + + value = eina_value_list_new(EINA_VALUE_TYPE_CHAR); + fail_unless(value != NULL); + + fail_unless(eina_value_list_append(value, 'k')); + fail_unless(eina_value_list_append(value, '-')); + fail_unless(eina_value_list_append(value, 's')); + + fail_unless(eina_value_list_get(value, 0, &c)); + fail_unless(c == 'k'); + fail_unless(eina_value_list_get(value, 1, &c)); + fail_unless(c == '-'); + fail_unless(eina_value_list_get(value, 2, &c)); + fail_unless(c == 's'); + + fail_unless(eina_value_list_insert(value, 0, '!')); + fail_unless(eina_value_list_get(value, 0, &c)); + fail_unless(c == '!'); + fail_unless(eina_value_list_get(value, 1, &c)); + fail_unless(c == 'k'); + fail_unless(eina_value_list_get(value, 2, &c)); + fail_unless(c == '-'); + fail_unless(eina_value_list_get(value, 3, &c)); + fail_unless(c == 's'); + + fail_unless(eina_value_list_set(value, 0, '*')); + fail_unless(eina_value_list_get(value, 0, &c)); + fail_unless(c == '*'); + fail_unless(eina_value_list_get(value, 1, &c)); + fail_unless(c == 'k'); + fail_unless(eina_value_list_get(value, 2, &c)); + fail_unless(c == '-'); + fail_unless(eina_value_list_get(value, 3, &c)); + fail_unless(c == 's'); + + snprintf(buf, sizeof(buf), "[%hhd, %hhd, %hhd, %hhd]", + '*', 'k', '-', 's'); + + str = eina_value_to_string(value); + fail_unless(str != NULL); + fail_unless(strcmp(str, buf) == 0); + free(str); + + eina_value_flush(value); + fail_unless(eina_value_list_setup(value, EINA_VALUE_TYPE_STRINGSHARE)); + + fail_unless(eina_value_list_append(value, "Enlightenment.org")); + fail_unless(eina_value_list_append(value, "X11")); + fail_unless(eina_value_list_append(value, "Pants")); + fail_unless(eina_value_list_append(value, "on!!!")); + fail_unless(eina_value_list_append(value, "k-s")); + + str = eina_value_to_string(value); + fail_unless(str != NULL); + fail_unless(strcmp(str, "[Enlightenment.org, X11, Pants, on!!!, k-s]") == 0); + free(str); + + eina_value_flush(value); + fail_unless(eina_value_list_setup(value, EINA_VALUE_TYPE_CHAR)); + fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_CHAR)); + + fail_unless(eina_value_set(&other, 100)); + fail_unless(eina_value_get(&other, &c)); + fail_unless(c == 100); + + fail_unless(eina_value_convert(&other, value)); + str = eina_value_to_string(value); + fail_unless(str != NULL); + fail_unless(strcmp(str, "[100]") == 0); + free(str); + + fail_unless(eina_value_list_set(value, 0, 33)); + fail_unless(eina_value_convert(value, &other)); + fail_unless(eina_value_get(&other, &c)); + fail_unless(c == 33); + + desc.subtype = EINA_VALUE_TYPE_STRING; + desc.list = NULL; + desc.list = eina_list_append(desc.list, strdup("hello")); + desc.list = eina_list_append(desc.list, strdup("world")); + desc.list = eina_list_append(desc.list, strdup("eina")); + fail_unless(eina_list_count(desc.list) == 3); + fail_unless(eina_value_set(value, desc)); + fail_unless(eina_value_list_get(value, 0, &s)); + fail_unless(s != NULL); + fail_unless(strcmp(s, "hello") == 0); + fail_unless(eina_value_list_get(value, 1, &s)); + fail_unless(s != NULL); + fail_unless(strcmp(s, "world") == 0); + fail_unless(eina_value_list_get(value, 2, &s)); + fail_unless(s != NULL); + fail_unless(strcmp(s, "eina") == 0); + + eina_value_free(value); + eina_shutdown(); +} +END_TEST + +START_TEST(eina_value_test_hash) +{ + Eina_Value *value, other; + Eina_Value_Hash desc; + char c; + char buf[1024]; + char **ptr; + char *str; + const char *s; + + eina_init(); + + value = eina_value_hash_new(EINA_VALUE_TYPE_CHAR, 0); + fail_unless(value != NULL); + + fail_unless(eina_value_hash_set(value, "first", 'k')); + fail_unless(eina_value_hash_set(value, "second", '-')); + fail_unless(eina_value_hash_set(value, "third", 's')); + + fail_unless(eina_value_hash_get(value, "first", &c)); + fail_unless(c == 'k'); + fail_unless(eina_value_hash_get(value, "second", &c)); + fail_unless(c == '-'); + fail_unless(eina_value_hash_get(value, "third", &c)); + fail_unless(c == 's'); + + fail_unless(eina_value_hash_set(value, "first", '!')); + fail_unless(eina_value_hash_get(value, "first", &c)); + fail_unless(c == '!'); + fail_unless(eina_value_hash_get(value, "second", &c)); + fail_unless(c == '-'); + fail_unless(eina_value_hash_get(value, "third", &c)); + fail_unless(c == 's'); + + puts("testing hash to string -- may fail due hash algorithm changes!"); + + /* watchout, this is the order I got -- hash algorithm changes may change + * the order! + */ + snprintf(buf, sizeof(buf), "{first: %hhd, second: %hhd, third: %hhd}", + '!', '-', 's'); + + str = eina_value_to_string(value); + fail_unless(str != NULL); + printf("want: %s\n", buf); + printf("got.: %s\n", str); + fail_unless(strcmp(str, buf) == 0); + free(str); + + eina_value_flush(value); + fail_unless(eina_value_hash_setup(value, EINA_VALUE_TYPE_STRINGSHARE, 0)); + + fail_unless(eina_value_hash_set(value, "a", "Enlightenment.org")); + fail_unless(eina_value_hash_set(value, "b", "X11")); + fail_unless(eina_value_hash_set(value, "c", "Pants")); + fail_unless(eina_value_hash_set(value, "d", "on!!!")); + fail_unless(eina_value_hash_set(value, "e", "k-s")); + + /* watchout, this is the order I got -- hash algorithm changes may change + * the order! + */ + strcpy(buf, "{e: k-s, d: on!!!, a: Enlightenment.org, b: X11, c: Pants}"); + + str = eina_value_to_string(value); + fail_unless(str != NULL); + printf("want: %s\n", buf); + printf("got.: %s\n", str); + fail_unless(strcmp(str, buf) == 0); + free(str); + + eina_value_flush(value); + fail_unless(eina_value_hash_setup(value, EINA_VALUE_TYPE_CHAR, 0)); + fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_CHAR)); + + fail_unless(eina_value_set(&other, 100)); + fail_unless(eina_value_get(&other, &c)); + fail_unless(c == 100); + + fail_unless(eina_value_hash_set(value, "first", 33)); + fail_unless(eina_value_convert(value, &other)); + fail_unless(eina_value_get(&other, &c)); + fail_unless(c == 33); + + desc.subtype = EINA_VALUE_TYPE_STRING; + desc.buckets_power_size = 0; + desc.hash = eina_hash_string_small_new(NULL); + fail_unless(desc.hash != NULL); + /* watch out hash pointer is to a size of subtype->value_size! */ + ptr = malloc(sizeof(char *)); + *ptr = strdup("there"); + fail_unless(eina_hash_add(desc.hash, "hi", ptr)); + ptr = malloc(sizeof(char *)); + *ptr = strdup("y"); + fail_unless(eina_hash_add(desc.hash, "x", ptr)); + + fail_unless(eina_value_set(value, desc)); + + fail_unless(eina_value_hash_get(value, "hi", &s)); + fail_unless(s != NULL); + fail_unless(strcmp(s, "there") == 0); + + fail_unless(eina_value_hash_get(value, "x", &s)); + fail_unless(s != NULL); + fail_unless(strcmp(s, "y") == 0); + + eina_value_free(value); + eina_shutdown(); +} +END_TEST + + +START_TEST(eina_value_test_timeval) +{ + Eina_Value *value, other; + struct timeval itv, otv; + char c; + char *str; + + eina_init(); + + value = eina_value_new(EINA_VALUE_TYPE_TIMEVAL); + fail_unless(value != NULL); + + itv.tv_sec = 1; + itv.tv_usec = 123; + fail_unless(eina_value_set(value, itv)); + fail_unless(eina_value_get(value, &otv)); + fail_unless(memcmp(&itv, &otv, sizeof(struct timeval)) == 0); + + itv.tv_sec = 3; + itv.tv_usec = -1; + fail_unless(eina_value_set(value, itv)); + fail_unless(eina_value_get(value, &otv)); + itv.tv_sec = 2; + itv.tv_usec = 999999; + fail_unless(memcmp(&itv, &otv, sizeof(struct timeval)) == 0); + + fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_CHAR)); + fail_unless(eina_value_convert(value, &other)); + fail_unless(eina_value_get(&other, &c)); + fail_unless(c == 2); + eina_value_flush(&other); + + itv.tv_sec = 12345; + itv.tv_usec = 6789; + fail_unless(eina_value_set(value, itv)); + str = eina_value_to_string(value); + fail_unless(str != NULL); + fail_unless(strcmp(str, "12345.006789") == 0); + free(str); + + fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_TIMEVAL)); + fail_unless(eina_value_set(&other, itv)); + fail_unless(eina_value_compare(value, &other) == 0); + + itv.tv_sec++; + fail_unless(eina_value_set(&other, itv)); + fail_unless(eina_value_compare(value, &other) < 0); + + itv.tv_sec -= 2; + fail_unless(eina_value_set(&other, itv)); + fail_unless(eina_value_compare(value, &other) > 0); + + itv.tv_sec++; + fail_unless(eina_value_set(&other, itv)); + fail_unless(eina_value_compare(value, &other) == 0); + + itv.tv_usec++; + fail_unless(eina_value_set(&other, itv)); + fail_unless(eina_value_compare(value, &other) < 0); + + itv.tv_usec -= 2; + fail_unless(eina_value_set(&other, itv)); + fail_unless(eina_value_compare(value, &other) > 0); + + itv.tv_usec++; + fail_unless(eina_value_set(&other, itv)); + fail_unless(eina_value_compare(value, &other) == 0); + + eina_value_flush(&other); + + + eina_value_free(value); + eina_shutdown(); +} +END_TEST + + +START_TEST(eina_value_test_blob) +{ + Eina_Value *value, other; + Eina_Value_Blob in, out; + unsigned char blob[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; + int i = 0x11223344; + char *str; + + eina_init(); + + value = eina_value_new(EINA_VALUE_TYPE_BLOB); + fail_unless(value != NULL); + + in.ops = NULL; + in.memory = blob; + in.size = sizeof(blob); + fail_unless(eina_value_set(value, in)); + fail_unless(eina_value_get(value, &out)); + fail_unless(out.memory == blob); + fail_unless(out.size == sizeof(blob)); + fail_unless(memcmp(&in, &out, sizeof(Eina_Value_Blob)) == 0); + + str = eina_value_to_string(value); + fail_unless(str != NULL); + fail_unless(strcmp(str, "BLOB(10, [01 02 03 04 05 06 07 08 09 0a])") == 0); + free(str); + + fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_INT)); + fail_unless(eina_value_set(&other, i)); + fail_unless(eina_value_convert(&other, value)); + fail_unless(eina_value_get(value, &out)); + + fail_unless(out.memory != NULL); + fail_unless(out.size == sizeof(int)); + fail_unless(memcmp(&i, out.memory, sizeof(int)) == 0); + + eina_value_flush(&other); + + fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_STRING)); + fail_unless(eina_value_set(&other, "hi there!")); + fail_unless(eina_value_convert(&other, value)); + fail_unless(eina_value_get(value, &out)); + fail_unless(out.memory != NULL); + fail_unless(out.size == sizeof("hi there!")); + fail_unless(strcmp(out.memory, "hi there!") == 0); + + str = eina_value_to_string(value); + fail_unless(str != NULL); + fail_unless(strcmp(str, "BLOB(10, [68 69 20 74 68 65 72 65 21 00])") == 0); + free(str); + + eina_value_flush(&other); + + fail_unless(eina_value_array_setup(&other, EINA_VALUE_TYPE_CHAR, 0)); + fail_unless(eina_value_array_append(&other, 0xa)); + fail_unless(eina_value_array_append(&other, 0xb)); + fail_unless(eina_value_array_append(&other, 0xc)); + fail_unless(eina_value_convert(&other, value)); + fail_unless(eina_value_get(value, &out)); + fail_unless(out.memory != NULL); + fail_unless(out.size == 3); + + str = eina_value_to_string(value); + fail_unless(str != NULL); + fail_unless(strcmp(str, "BLOB(3, [0a 0b 0c])") == 0); + free(str); + + eina_value_flush(&other); + + fail_unless(eina_value_setup(&other, EINA_VALUE_TYPE_BLOB)); + fail_unless(eina_value_set(&other, in)); + fail_unless(eina_value_convert(value, &other)); + fail_unless(eina_value_get(&other, &out)); + fail_unless(out.memory != NULL); + fail_unless(out.size == 3); + + str = eina_value_to_string(&other); + fail_unless(str != NULL); + fail_unless(strcmp(str, "BLOB(3, [0a 0b 0c])") == 0); + free(str); + + eina_value_flush(&other); + + eina_value_free(value); + eina_shutdown(); +} +END_TEST + + +START_TEST(eina_value_test_struct) +{ + struct mybigst { + int a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, x; + }; + const Eina_Value_Struct_Member mybigst_members[] = { + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, a), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, b), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, c), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, d), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, e), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, f), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, g), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, h), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, i), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, j), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, k), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, l), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, m), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, n), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, o), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, p), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, q), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, r), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, s), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, t), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, u), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, v), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct mybigst, x), + EINA_VALUE_STRUCT_MEMBER_SENTINEL + }; + const Eina_Value_Struct_Desc mybigst_desc = { + EINA_VALUE_STRUCT_DESC_VERSION, + EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH, + mybigst_members, 23, sizeof(struct mybigst) + }; + struct myst { + int i; + char c; + }; + const Eina_Value_Struct_Member myst_members[] = { + {"i", EINA_VALUE_TYPE_INT, 0}, + {"c", EINA_VALUE_TYPE_CHAR, 4}, + {NULL, NULL, 0} + }; + const Eina_Value_Struct_Desc myst_desc = { + EINA_VALUE_STRUCT_DESC_VERSION, + NULL, myst_members, 2, sizeof(struct myst) + }; + Eina_Value *value, other; + int i; + char c; + char *str; + + eina_init(); + + value = eina_value_struct_new(&myst_desc); + fail_unless(value != NULL); + + fail_unless(eina_value_struct_set(value, "i", 5678)); + fail_unless(eina_value_struct_set(value, "c", 0xf)); + + fail_unless(eina_value_struct_get(value, "i", &i)); + fail_unless(i == 5678); + fail_unless(eina_value_struct_get(value, "c", &c)); + fail_unless(c == 0xf); + + str = eina_value_to_string(value); + fail_unless(str != NULL); + fail_unless(strcmp(str, "{i: 5678, c: 15}") == 0); + free(str); + + fail_if(eina_value_struct_get(value, "x", 1234)); + + i = 0x11223344; + fail_unless(eina_value_struct_pset(value, "i", &i)); + i = -1; + fail_unless(eina_value_struct_pget(value, "i", &i)); + fail_unless(i == 0x11223344); + + fail_unless(eina_value_copy(value, &other)); + str = eina_value_to_string(&other); + fail_unless(str != NULL); + fail_unless(strcmp(str, "{i: 287454020, c: 15}") == 0); + free(str); + + eina_value_flush(&other); + + fail_unless(eina_value_struct_setup(&other, &mybigst_desc)); + fail_unless(eina_value_struct_set(&other, "a", 1) ); + fail_unless(eina_value_struct_set(&other, "b", 2)); + fail_unless(eina_value_struct_set(&other, "c", 3)); + fail_unless(eina_value_struct_set(&other, "d", 4)); + fail_unless(eina_value_struct_set(&other, "e", 5)); + fail_unless(eina_value_struct_set(&other, "f", 6)); + fail_unless(eina_value_struct_set(&other, "g", 7)); + fail_unless(eina_value_struct_set(&other, "h", 8)); + fail_unless(eina_value_struct_set(&other, "i", 9)); + fail_unless(eina_value_struct_set(&other, "j", 10)); + fail_unless(eina_value_struct_set(&other, "k", 12)); + fail_unless(eina_value_struct_set(&other, "l", 13)); + fail_unless(eina_value_struct_set(&other, "m", 14)); + fail_unless(eina_value_struct_set(&other, "n", 15)); + fail_unless(eina_value_struct_set(&other, "o", 16)); + fail_unless(eina_value_struct_set(&other, "p", 17)); + fail_unless(eina_value_struct_set(&other, "q", 18)); + fail_unless(eina_value_struct_set(&other, "r", 19)); + fail_unless(eina_value_struct_set(&other, "s", 20)); + fail_unless(eina_value_struct_set(&other, "t", 21)); + fail_unless(eina_value_struct_set(&other, "u", 22)); + fail_unless(eina_value_struct_set(&other, "v", 23)); + fail_unless(eina_value_struct_set(&other, "x", 24)); + + fail_unless(eina_value_struct_get(&other, "a", &i)); + fail_unless(i == 1); + fail_unless(eina_value_struct_get(&other, "b", &i)); + fail_unless(i == 2); + fail_unless(eina_value_struct_get(&other, "c", &i)); + fail_unless(i == 3); + fail_unless(eina_value_struct_get(&other, "d", &i)); + fail_unless(i == 4); + fail_unless(eina_value_struct_get(&other, "e", &i)); + fail_unless(i == 5); + fail_unless(eina_value_struct_get(&other, "f", &i)); + fail_unless(i == 6); + fail_unless(eina_value_struct_get(&other, "g", &i)); + fail_unless(i == 7); + fail_unless(eina_value_struct_get(&other, "h", &i)); + fail_unless(i == 8); + fail_unless(eina_value_struct_get(&other, "i", &i)); + fail_unless(i == 9); + fail_unless(eina_value_struct_get(&other, "j", &i)); + fail_unless(i == 10); + fail_unless(eina_value_struct_get(&other, "k", &i)); + fail_unless(i == 12); + fail_unless(eina_value_struct_get(&other, "l", &i)); + fail_unless(i == 13); + fail_unless(eina_value_struct_get(&other, "m", &i)); + fail_unless(i == 14); + fail_unless(eina_value_struct_get(&other, "n", &i)); + fail_unless(i == 15); + fail_unless(eina_value_struct_get(&other, "o", &i)); + fail_unless(i == 16); + fail_unless(eina_value_struct_get(&other, "p", &i)); + fail_unless(i == 17); + fail_unless(eina_value_struct_get(&other, "q", &i)); + fail_unless(i == 18); + fail_unless(eina_value_struct_get(&other, "r", &i)); + fail_unless(i == 19); + fail_unless(eina_value_struct_get(&other, "s", &i)); + fail_unless(i == 20); + fail_unless(eina_value_struct_get(&other, "t", &i)); + fail_unless(i == 21); + fail_unless(eina_value_struct_get(&other, "u", &i)); + fail_unless(i == 22); + fail_unless(eina_value_struct_get(&other, "v", &i)); + fail_unless(i == 23); + fail_unless(eina_value_struct_get(&other, "x", &i)); + fail_unless(i == 24); + + str = eina_value_to_string(&other); + fail_unless(str != NULL); + fail_unless(strcmp(str, "{a: 1, b: 2, c: 3, d: 4, e: 5, f: 6, g: 7, h: 8, i: 9, j: 10, k: 12, l: 13, m: 14, n: 15, o: 16, p: 17, q: 18, r: 19, s: 20, t: 21, u: 22, v: 23, x: 24}") == 0); + free(str); + + eina_value_free(value); + eina_shutdown(); +} +END_TEST + + +START_TEST(eina_value_test_array_of_struct) +{ + struct myst { + int a, b, c; + const char *s; + }; + const Eina_Value_Struct_Member myst_members[] = { + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct myst, a), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct myst, b), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_INT, struct myst, c), + EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_STRING, struct myst, s), + EINA_VALUE_STRUCT_MEMBER_SENTINEL + }; + const Eina_Value_Struct_Desc myst_desc = { + EINA_VALUE_STRUCT_DESC_VERSION, + EINA_VALUE_STRUCT_OPERATIONS_BINSEARCH, + myst_members, 4, sizeof(struct myst) + }; + Eina_Value *value; + char *str; + int i; + + eina_init(); + + value = eina_value_array_new(EINA_VALUE_TYPE_STRUCT, 0); + fail_unless(value != NULL); + + for (i = 0; i < 10; i++) + { + Eina_Value_Struct desc; + struct myst *st; + char buf[64]; + + snprintf(buf, sizeof(buf), "item%02d", i); + st = malloc(sizeof(struct myst)); + fail_unless(st != NULL); + st->a = i; + st->b = i * 10; + st->c = i * 100; + st->s = strdup(buf); + fail_unless(st->s != NULL); + + desc.desc = &myst_desc; + desc.memory = st; + fail_unless(eina_value_array_append(value, desc)); + } + + str = eina_value_to_string(value); + fail_unless(str != NULL); + fail_unless(strcmp(str, "[" + "{a: 0, b: 0, c: 0, s: item00}, " + "{a: 1, b: 10, c: 100, s: item01}, " + "{a: 2, b: 20, c: 200, s: item02}, " + "{a: 3, b: 30, c: 300, s: item03}, " + "{a: 4, b: 40, c: 400, s: item04}, " + "{a: 5, b: 50, c: 500, s: item05}, " + "{a: 6, b: 60, c: 600, s: item06}, " + "{a: 7, b: 70, c: 700, s: item07}, " + "{a: 8, b: 80, c: 800, s: item08}, " + "{a: 9, b: 90, c: 900, s: item09}" + "]") == 0); + free(str); + + eina_value_free(value); + eina_shutdown(); +} +END_TEST + +void +eina_test_value(TCase *tc) +{ + tcase_add_test(tc, eina_value_test_simple); + tcase_add_test(tc, eina_value_test_string); + tcase_add_test(tc, eina_value_test_pvariant); + tcase_add_test(tc, eina_value_test_compare); + tcase_add_test(tc, eina_value_test_to_string); + tcase_add_test(tc, eina_value_test_convert_char); + tcase_add_test(tc, eina_value_test_convert_uchar); + // TODO: other converters... + tcase_add_test(tc, eina_value_test_array); + tcase_add_test(tc, eina_value_test_list); + tcase_add_test(tc, eina_value_test_hash); + tcase_add_test(tc, eina_value_test_timeval); + tcase_add_test(tc, eina_value_test_blob); + tcase_add_test(tc, eina_value_test_struct); + tcase_add_test(tc, eina_value_test_array_of_struct); +} diff --git a/libraries/eina/src/tests/evas_list.c b/libraries/eina/src/tests/evas_list.c index 55e301f..3df15ed 100644 --- a/libraries/eina/src/tests/evas_list.c +++ b/libraries/eina/src/tests/evas_list.c @@ -962,7 +962,7 @@ evas_list_sort(Evas_List *list, int size, int (*func)(void *, void *)) Evas_List *last; unsigned int list_number; unsigned int middle; - int list_size; + unsigned int list_size; if (!list || !func) return NULL; diff --git a/libraries/eina/src/tests/evas_mempool.c b/libraries/eina/src/tests/evas_mempool.c index fbc48fa..7098214 100644 --- a/libraries/eina/src/tests/evas_mempool.c +++ b/libraries/eina/src/tests/evas_mempool.c @@ -56,7 +56,7 @@ _evas_mp_pool_free(Pool *p) } void * -evas_mempool_malloc(Evas_Mempool *pool, int size) +evas_mempool_malloc(Evas_Mempool *pool, int size __UNUSED__) { #ifdef NOPOOL return malloc(size); diff --git a/libraries/embryo/ChangeLog b/libraries/embryo/ChangeLog index 4a46661..a9a410a 100644 --- a/libraries/embryo/ChangeLog +++ b/libraries/embryo/ChangeLog @@ -14,3 +14,7 @@ * use fseek() instead of rewind() as the latter does not exist on Windows CE and fix compilation with Evil. + +2011-12-02 Carsten Haitzler (The Rasterman) + + 1.1.0 release diff --git a/libraries/embryo/Makefile.in b/libraries/embryo/Makefile.in index dfa4287..4652fe5 100644 --- a/libraries/embryo/Makefile.in +++ b/libraries/embryo/Makefile.in @@ -206,8 +206,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/embryo/aclocal.m4 b/libraries/embryo/aclocal.m4 index 8eedd0f..14faac2 100644 --- a/libraries/embryo/aclocal.m4 +++ b/libraries/embryo/aclocal.m4 @@ -13,14 +13,13 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. 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 . # @@ -48,10 +47,7 @@ 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]) -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]) - +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -64,6 +60,7 @@ if test -n "$PKG_CONFIG"; then AC_MSG_RESULT([no]) PKG_CONFIG="" fi + fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -72,31 +69,34 @@ 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. # -# 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 +# +# 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 # -------------------------------------------------------------- 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_default([$2], [:]) + m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) + # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[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 +[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 fi[]dnl ])# _PKG_CONFIG @@ -138,17 +138,16 @@ 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 --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - m4_default([$4], [AC_MSG_ERROR( + ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -156,24 +155,25 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT])[]dnl - ]) +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( + ifelse([$4], , [AC_MSG_FAILURE(dnl [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 .])[]dnl - ]) +To get pkg-config, see .])], + [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - $3 + ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES diff --git a/libraries/embryo/configure b/libraries/embryo/configure index 466326f..88e889b 100755 --- a/libraries/embryo/configure +++ b/libraries/embryo/configure @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for embryo 1.1.0. +# Generated by GNU Autoconf 2.65 for embryo 1.1.99.67344. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error 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=$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 + 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 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&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, old GNU/Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, 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='embryo' PACKAGE_TARNAME='embryo' -PACKAGE_VERSION='1.1.0' -PACKAGE_STRING='embryo 1.1.0' +PACKAGE_VERSION='1.1.99.67344' +PACKAGE_STRING='embryo 1.1.99.67344' PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net' PACKAGE_URL='' @@ -760,8 +760,6 @@ EFL_EMBRYO_BUILD EVIL_LIBS EVIL_CFLAGS pkgconfig_requires_private -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH PKG_CONFIG EFL_BUILD_DOC_FALSE EFL_BUILD_DOC_TRUE @@ -907,8 +905,6 @@ LIBS CPPFLAGS CPP PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR EVIL_CFLAGS EVIL_LIBS EINA_CFLAGS @@ -975,9 +971,8 @@ do fi case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1022,7 +1017,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 @@ -1048,7 +1043,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 @@ -1252,7 +1247,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 @@ -1268,7 +1263,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 @@ -1298,8 +1293,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." ;; *=*) @@ -1307,7 +1302,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 ;; @@ -1325,13 +1320,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 @@ -1354,7 +1349,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' @@ -1368,8 +1363,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 @@ -1384,9 +1379,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. @@ -1425,11 +1420,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 @@ -1455,7 +1450,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 embryo 1.1.0 to adapt to many kinds of systems. +\`configure' configures embryo 1.1.99.67344 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1469,7 +1464,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 @@ -1525,7 +1520,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of embryo 1.1.0:";; + short | recursive ) echo "Configuration of embryo 1.1.99.67344:";; esac cat <<\_ACEOF @@ -1563,10 +1558,6 @@ Some influential environment variables: you have headers in a nonstandard directory CPP 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 EINA_CFLAGS C compiler flags for EINA, overriding pkg-config @@ -1638,10 +1629,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -embryo configure 1.1.0 -generated by GNU Autoconf 2.67 +embryo configure 1.1.99.67344 +generated by GNU Autoconf 2.65 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1745,7 +1736,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1788,7 +1779,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; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1854,7 +1845,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1921,10 +1912,10 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1960,7 +1951,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -1983,15 +1974,17 @@ $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;} -( $as_echo "## -------------------------------------------------------- ## +( cat <<\_ASBOX +## -------------------------------------------------------- ## ## 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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2007,8 +2000,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 embryo $as_me 1.1.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +It was created by embryo $as_me 1.1.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2118,9 +2111,11 @@ trap 'exit_status=$? { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -2154,9 +2149,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do @@ -2169,9 +2166,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + cat <<\_ASBOX +## ------------------- ## ## File substitutions. ## -## ------------------- ##" +## ------------------- ## +_ASBOX echo for ac_var in $ac_subst_files do @@ -2185,9 +2184,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo cat confdefs.h echo @@ -2242,12 +2243,7 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # 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 + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2262,11 +2258,7 @@ 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" \ - || { { $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 ; } + . "$ac_site_file" fi done @@ -2342,7 +2334,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. ## @@ -2368,22 +2360,16 @@ am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - 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 + 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 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, @@ -2499,11 +2485,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 @@ -2525,7 +2511,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 @@ -2535,7 +2521,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 @@ -2773,7 +2759,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 eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2781,7 +2767,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;; @@ -2815,7 +2801,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 @@ -2831,7 +2817,7 @@ fi # Define the identity of the package. PACKAGE='embryo' - VERSION='1.1.0' + VERSION='1.1.99.67344' cat >>confdefs.h <<_ACEOF @@ -2886,7 +2872,7 @@ AM_BACKSLASH='\' # 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; } @@ -2897,16 +2883,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='-' @@ -2931,7 +2917,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 @@ -2939,7 +2925,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='-' @@ -3645,8 +3631,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 @@ -3760,8 +3746,9 @@ 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 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +{ as_fn_set_status 77 +as_fn_error "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; } @@ -3803,8 +3790,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 @@ -3861,9 +3848,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 @@ -3914,8 +3901,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 @@ -4319,7 +4306,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 @@ -4395,7 +4382,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 @@ -4461,7 +4448,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 @@ -4528,7 +4515,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 @@ -4644,7 +4631,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 : @@ -4846,13 +4833,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:4849: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4836: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4852: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4839: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4855: output\"" >&5) + (eval echo "\"\$as_me:4842: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6055,7 +6042,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6058 "configure"' > conftest.$ac_ext + echo '#line 6045 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6844,7 +6831,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6860,11 +6847,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -6903,7 +6890,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6919,18 +6906,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f 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 @@ -7059,7 +7046,8 @@ 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 " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7582,11 +7570,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:7585: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7573: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7589: \$? = $ac_status" >&5 + echo "$as_me:7577: \$? = $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. @@ -7921,11 +7909,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:7924: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7912: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7928: \$? = $ac_status" >&5 + echo "$as_me:7916: \$? = $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. @@ -8026,11 +8014,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:8029: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8017: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8033: \$? = $ac_status" >&5 + echo "$as_me:8021: \$? = $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 @@ -8081,11 +8069,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:8084: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8072: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8088: \$? = $ac_status" >&5 + echo "$as_me:8076: \$? = $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 @@ -10465,7 +10453,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10468 "configure" +#line 10456 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10561,7 +10549,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10564 "configure" +#line 10552 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10805,15 +10793,15 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define VMIC 0 +#define VMIC 99 _ACEOF cat >>confdefs.h <<_ACEOF -#define VREV 0 +#define VREV 67344 _ACEOF -version_info="2:0:1" +version_info="2:99:1" release_info="" @@ -11179,8 +11167,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 @@ -11711,10 +11699,6 @@ fi - - - - 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. @@ -11827,6 +11811,7 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } PKG_CONFIG="" fi + fi # Check whether pkg-config supports Requires.private @@ -11850,10 +11835,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVIL" >&5 $as_echo_n "checking for EVIL... " >&6; } -if test -n "$EVIL_CFLAGS"; then - pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_CFLAGS"; then + pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" + else + 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=$? @@ -11863,13 +11849,15 @@ if test -n "$EVIL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EVIL_LIBS"; then - pkg_cv_EVIL_LIBS="$EVIL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_LIBS"; then + pkg_cv_EVIL_LIBS="$EVIL_LIBS" + else + 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=$? @@ -11879,15 +11867,14 @@ if test -n "$EVIL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -11895,14 +11882,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evil >= 1.0.0"` else - EVIL_PKG_ERRORS=`$PKG_CONFIG --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evil >= 1.0.0"` 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 @@ -11911,13 +11898,12 @@ 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. @@ -11926,13 +11912,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 @@ -11949,10 +11935,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EINA" >&5 $as_echo_n "checking for EINA... " >&6; } -if test -n "$EINA_CFLAGS"; then - pkg_cv_EINA_CFLAGS="$EINA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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 ac_status=$? @@ -11962,13 +11949,15 @@ if test -n "$EINA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EINA_LIBS"; then - pkg_cv_EINA_LIBS="$EINA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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 ac_status=$? @@ -11978,15 +11967,14 @@ if test -n "$EINA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -11994,14 +11982,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eina >= 1.1.0" 2>&1` + EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eina >= 1.1.0"` else - EINA_PKG_ERRORS=`$PKG_CONFIG --print-errors "eina >= 1.1.0" 2>&1` + EINA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eina >= 1.1.0"` 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.1.0) were not met: $EINA_PKG_ERRORS @@ -12010,13 +11998,12 @@ 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. @@ -12025,13 +12012,13 @@ 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 ### Checks for header files @@ -12328,8 +12315,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 if test "x$CC" != xcc; then @@ -12341,7 +12328,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : +if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13249,7 +13236,8 @@ 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" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -13396,7 +13384,7 @@ fi if test "x$_efl_have_fnmatch" = "xyes"; then : else - as_fn_error $? "Cannot find fnmatch()" "$LINENO" 5 + as_fn_error "Cannot find fnmatch()" "$LINENO" 5 fi @@ -13511,7 +13499,6 @@ 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$//' @@ -13535,23 +13522,23 @@ 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 "${BUILD_EMBRYO_CC_TRUE}" && test -z "${BUILD_EMBRYO_CC_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EMBRYO_CC\" was never defined. + as_fn_error "conditional \"BUILD_EMBRYO_CC\" 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 @@ -13702,19 +13689,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error 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=$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 + 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 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -13910,7 +13897,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 @@ -13963,8 +13950,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 embryo $as_me 1.1.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +This file was extended by embryo $as_me 1.1.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -14029,11 +14016,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="\\ -embryo config.status 1.1.0 -configured by $0, generated by GNU Autoconf 2.67, +embryo config.status 1.1.99.67344 +configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -14051,16 +14038,11 @@ 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 @@ -14082,7 +14064,6 @@ 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;; @@ -14095,7 +14076,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 ;; @@ -14104,7 +14085,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" @@ -14428,7 +14409,7 @@ do "src/bin/Makefile") CONFIG_FILES="$CONFIG_FILES src/bin/Makefile" ;; "embryo.spec") CONFIG_FILES="$CONFIG_FILES embryo.spec" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -14466,7 +14447,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. @@ -14483,7 +14464,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 @@ -14497,18 +14478,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 @@ -14597,28 +14578,20 @@ 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 sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ 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[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// s/^[^=]*=[ ]*$// }' fi @@ -14646,7 +14619,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 @@ -14731,7 +14704,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" @@ -14744,7 +14717,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 @@ -14772,7 +14745,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error "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'" @@ -14799,7 +14772,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 @@ -14936,22 +14909,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) # @@ -14962,19 +14935,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" @@ -15765,7 +15738,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. @@ -15786,7 +15759,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 1 + $ac_cs_success || as_fn_exit $? 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 diff --git a/libraries/embryo/configure.ac b/libraries/embryo/configure.ac index 721a9c1..61c50b8 100644 --- a/libraries/embryo/configure.ac +++ b/libraries/embryo/configure.ac @@ -2,11 +2,11 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [1]) -m4_define([v_mic], [0]) -m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) +m4_define([v_mic], [99]) +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'])) 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 -m4_undefine([v_rev]) +dnl 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 ver-pre-svn-07]) diff --git a/libraries/embryo/doc/Makefile.in b/libraries/embryo/doc/Makefile.in index 4b53f1d..102cd2f 100644 --- a/libraries/embryo/doc/Makefile.in +++ b/libraries/embryo/doc/Makefile.in @@ -126,8 +126,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/embryo/doc/img/e.png b/libraries/embryo/doc/img/e.png old mode 100644 new mode 100755 diff --git a/libraries/embryo/doc/img/e_big.png b/libraries/embryo/doc/img/e_big.png old mode 100644 new mode 100755 diff --git a/libraries/embryo/doc/img/edoxy.css b/libraries/embryo/doc/img/edoxy.css old mode 100644 new mode 100755 diff --git a/libraries/embryo/doc/img/foot_bg.png b/libraries/embryo/doc/img/foot_bg.png old mode 100644 new mode 100755 diff --git a/libraries/embryo/doc/img/head_bg.png b/libraries/embryo/doc/img/head_bg.png old mode 100644 new mode 100755 diff --git a/libraries/embryo/doc/img/menu_bg.png b/libraries/embryo/doc/img/menu_bg.png old mode 100644 new mode 100755 diff --git a/libraries/embryo/doc/img/menu_bg_current.png b/libraries/embryo/doc/img/menu_bg_current.png old mode 100644 new mode 100755 diff --git a/libraries/embryo/doc/img/menu_bg_hover.png b/libraries/embryo/doc/img/menu_bg_hover.png old mode 100644 new mode 100755 diff --git a/libraries/embryo/doc/img/menu_bg_last.png b/libraries/embryo/doc/img/menu_bg_last.png old mode 100644 new mode 100755 diff --git a/libraries/embryo/doc/img/menu_bg_unsel.png b/libraries/embryo/doc/img/menu_bg_unsel.png old mode 100644 new mode 100755 diff --git a/libraries/embryo/embryo.spec b/libraries/embryo/embryo.spec index aba0f0e..834f792 100644 --- a/libraries/embryo/embryo.spec +++ b/libraries/embryo/embryo.spec @@ -4,7 +4,7 @@ Summary: A small virtual machine engine (in a library) and bytecode compiler Name: embryo -Version: 1.1.0 +Version: 1.1.99.67344 Release: %{_rel} License: BSD Group: System Environment/Libraries diff --git a/libraries/embryo/include/Makefile.in b/libraries/embryo/include/Makefile.in index a5456cd..0a96acd 100644 --- a/libraries/embryo/include/Makefile.in +++ b/libraries/embryo/include/Makefile.in @@ -149,8 +149,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/embryo/ltmain.sh b/libraries/embryo/ltmain.sh index fa4b1e1..7ed280b 100755 --- a/libraries/embryo/ltmain.sh +++ b/libraries/embryo/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-2ubuntu3 +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,7 +73,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" +VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" TIMESTAMP="" package_revision=1.3017 diff --git a/libraries/embryo/sha1-for-source.txt b/libraries/embryo/sha1-for-source.txt deleted file mode 100644 index 16ae5f0..0000000 --- a/libraries/embryo/sha1-for-source.txt +++ /dev/null @@ -1 +0,0 @@ -f76404fa37f1580cbad2bbc747be9c6d68b7bef3 diff --git a/libraries/embryo/src/Makefile.in b/libraries/embryo/src/Makefile.in index 7eb44dd..ff3d123 100644 --- a/libraries/embryo/src/Makefile.in +++ b/libraries/embryo/src/Makefile.in @@ -165,8 +165,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/embryo/src/bin/Makefile.in b/libraries/embryo/src/bin/Makefile.in index 40d0ef9..a6551be 100644 --- a/libraries/embryo/src/bin/Makefile.in +++ b/libraries/embryo/src/bin/Makefile.in @@ -170,8 +170,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/embryo/src/bin/embryo_cc_sc5.scp b/libraries/embryo/src/bin/embryo_cc_sc5.scp index af3f352..8005f79 100644 --- a/libraries/embryo/src/bin/embryo_cc_sc5.scp +++ b/libraries/embryo/src/bin/embryo_cc_sc5.scp @@ -18,7 +18,7 @@ * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * - * Version: $Id: embryo_cc_sc5.scp 35497 2008-08-17 07:44:18Z raster $ + * Version: $Id: embryo_cc_sc5.scp 14177 2005-04-13 19:37:01Z tsauerbeck $ */ int strexpand(char *dest, unsigned char *source, int maxlen, diff --git a/libraries/embryo/src/bin/embryo_cc_sc7.scp b/libraries/embryo/src/bin/embryo_cc_sc7.scp index 15c80ac..83d49a1 100644 --- a/libraries/embryo/src/bin/embryo_cc_sc7.scp +++ b/libraries/embryo/src/bin/embryo_cc_sc7.scp @@ -19,7 +19,7 @@ * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * - * Version: $Id: embryo_cc_sc7.scp 35497 2008-08-17 07:44:18Z raster $ + * Version: $Id: embryo_cc_sc7.scp 14177 2005-04-13 19:37:01Z tsauerbeck $ */ int strexpand(char *dest, unsigned char *source, int maxlen, diff --git a/libraries/embryo/src/lib/Embryo.h b/libraries/embryo/src/lib/Embryo.h index ea273cf..74c872b 100644 --- a/libraries/embryo/src/lib/Embryo.h +++ b/libraries/embryo/src/lib/Embryo.h @@ -341,7 +341,7 @@ extern "C" { #endif #define EMBRYO_VERSION_MAJOR 1 -#define EMBRYO_VERSION_MINOR 0 +#define EMBRYO_VERSION_MINOR 2 typedef struct _Embryo_Version { diff --git a/libraries/embryo/src/lib/Makefile.in b/libraries/embryo/src/lib/Makefile.in index 56e9f26..3fb5591 100644 --- a/libraries/embryo/src/lib/Makefile.in +++ b/libraries/embryo/src/lib/Makefile.in @@ -186,8 +186,6 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ diff --git a/libraries/evas/AUTHORS b/libraries/evas/AUTHORS index 52f8f93..470dd6a 100644 --- a/libraries/evas/AUTHORS +++ b/libraries/evas/AUTHORS @@ -31,3 +31,4 @@ Seungsoo Woo Youness Alaoui Jim Kukunas Nicolas Aguirre +Rafal Krypa diff --git a/libraries/evas/ChangeLog b/libraries/evas/ChangeLog index ac0f3d2..fa77400 100644 --- a/libraries/evas/ChangeLog +++ b/libraries/evas/ChangeLog @@ -503,7 +503,7 @@ * JPEG encode and decode in eet now uses ISLOW (not IFAST) due to noticable quality losses in the chase for speed. It will use - IFAST for quality less than 60 when encoding + IFAST for quality less than 60 when encoding 2011-11-20 Carsten Haitzler (The Rasterman) @@ -515,3 +515,132 @@ * Fix repeat event inheritance from parent smart just like pass events are inherited. This was inconsistent. + +2011-12-02 Carsten Haitzler (The Rasterman) + + 1.1.0 release + +2011-12-07 Carsten Haitzler (The Rasterman) + + * Fix build if gcc too old - if immintrin.h doesn't exist, + don't enable SSE3. + +2011-12-08 Tom Hacohen (TAsn) + + * Textblock markup: Support self closing format tags, i.e
. + You should use
and not
. The latter still works but it's use + is discouraged. + * Textblock: Added evas_textblock_text_markup_to_utf8. + This lets you convert textblock markup to plain text. + This converts formats and everything correctly. + +2011-12-12 Carsten Haitzler (The Rasterman) + + * Fix rounding error in map clip bounds calculation + +2011-12-12 Tom Hacohen (TAsn) + + * Textblock: Added evas_textblock_cursor_word_start/end. + Those functions let you jump to the start/end of the word under the + cursor. + +2011-12-13 Carsten Haitzler (The Rasterman) + + * Fix grab count negative values if you do weird combinations of + press and release with multiple fingers or multiple mouse + buttons. + +2011-12-14 Cedric BAIL + + * Use Eina_File when loading bmp, ico, pmaps and wbmp files. + * Fix potential race condition in wbmp loader code. + +2011-12-14 Tom Hacohen (TAsn) + + * Textblock: Made "br" and "tab" default tags for newline and tab. + * Textblock: Added "b" and "i" as default tags that can be overridden + by style, and added the infra to support this. + * Textblock: Added evas_textblock_text_utf8_to_markup + +2011-12-16 Carsten Haitzler (The Rasterman) + + * Fix clip bug that shows up in buffer engine + * Fix SSE3 routines with buggy output - disable + * Add new api to set and get default event flags. + +2011-12-19 Carsten Haitzler (The Rasterman) + + * Add new canvas events called just before and after evas rendering + starts and stops. + +2011-12-21 ChunEon Park (Hermet) + + * Events: repeat events should not be affected by children. + Fixed to object passes events to the next object in the same layer + if the repeat_events is enabled. + +2011-12-23 Sanghee Park + + * Extend pixman support to allow other operations to use + pixman when doing software rendering. On x86 this isn't useful + but on ARMv7 with NEON pixman happens to do better with image + blending and nearest scale blending. + * Add tiled rotator for 32bit display as an option. + +2011-12-26 Christopher Michael (devilhorns) + + * Add functions to get/set if an object is a 'frame_object' + +2011-12-27 Carsten Haitzler (The Rasterman) + + * Add feature to get number of pressed devices (help fix + ecore-evas bug). + +2011-12-28 Carsten Haitzler (The Rasterman) + + * Add recursive name find function - evas_object_name_child_find() + +2012-01-01 Carsten Haitzler (The Rasterman) + + * Improve CPU use on nvidia drivers when vsyncing. It was + actually glXWaitGL() spinning, not glXSwapBuffers(), so this + points to a bug in the nvidia drivers where the sleep logic + in glXSwapBuffers() hasn't been transferred to glXWaitGL(). + Avoid use of glXWaitGL() to avoid the nvidia bug. + +2012-01-02 Cedric Bail + + * Fix unitialized value when running generic loader without any + application found to open the file. + * Use Eina_File when openning XPM file. + +2012-01-03 Cedric Bail + + * Use Eina_File for PSD file to. + +2012-01-06 Sung W. Park (sung_) + + * Add EvasGL support to software backend using OSMesa. Requires OSMesa + library. Due to caveats in OSMesa, surface config stays with a + context rather than with a surface. So for now, the config of a + surface remains with the first context that it binds to. May need + to come up with a different solution in the near future. + +2012-01-12 Sung W. Park (sung_) + + * Add new api evas_gl_config_new/free() to ensure backward compatibility. + Previously, the user simply declared a Evas_GL_Config object but this + can cause issues if new configs are added. Now we have evas allocate it + for you. + +2012-01-16 Raphael Kubo da Costa (rakuco) + + * Add evas_object_smart_callback_del_full() to allow users to + unregister a specific smart event callback instead of all + callbacks matching a given type and function pointer. + +2012-01-17 Carsten Haitzler (The Rasterman) + + * Add EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN pointer mode + for some very specific behavior needed for accessibility. + diff --git a/libraries/evas/Makefile.am b/libraries/evas/Makefile.am index 665f988..b42e7f9 100644 --- a/libraries/evas/Makefile.am +++ b/libraries/evas/Makefile.am @@ -45,6 +45,8 @@ evas-direct3d.pc.in \ evas-software-16-wince.pc.in \ evas-software-sdl.pc.in \ evas-psl1ght.pc.in \ +evas-wayland-shm.pc.in \ +evas-wayland-egl.pc.in \ evas.spec.in \ evas.spec \ m4/efl_attribute.m4 \ @@ -127,6 +129,14 @@ if BUILD_ENGINE_PSL1GHT pkgconfig_DATA += evas-psl1ght.pc endif +if BUILD_ENGINE_WAYLAND_SHM +pkgconfig_DATA += evas-wayland-shm.pc +endif + +if BUILD_ENGINE_WAYLAND_EGL +pkgconfig_DATA += evas-wayland-egl.pc +endif + .PHONY: doc coverage doc: diff --git a/libraries/evas/Makefile.in b/libraries/evas/Makefile.in index 6fb0d12..8fe20cb 100644 --- a/libraries/evas/Makefile.in +++ b/libraries/evas/Makefile.in @@ -51,6 +51,8 @@ host_triplet = @host@ @BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@am__append_14 = evas-software-16-wince.pc @BUILD_ENGINE_SOFTWARE_SDL_TRUE@am__append_15 = evas-software-sdl.pc @BUILD_ENGINE_PSL1GHT_TRUE@am__append_16 = evas-psl1ght.pc +@BUILD_ENGINE_WAYLAND_SHM_TRUE@am__append_17 = evas-wayland-shm.pc +@BUILD_ENGINE_WAYLAND_EGL_TRUE@am__append_18 = evas-wayland-egl.pc subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ @@ -66,10 +68,12 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/evas-software-ddraw.pc.in \ $(srcdir)/evas-software-gdi.pc.in \ $(srcdir)/evas-software-sdl.pc.in \ - $(srcdir)/evas-software-x11.pc.in $(srcdir)/evas.pc.in \ + $(srcdir)/evas-software-x11.pc.in \ + $(srcdir)/evas-wayland-egl.pc.in \ + $(srcdir)/evas-wayland-shm.pc.in $(srcdir)/evas.pc.in \ $(srcdir)/evas.spec.in $(top_srcdir)/configure ABOUT-NLS \ - AUTHORS COPYING ChangeLog INSTALL NEWS compile config.guess \ - config.sub depcomp install-sh ltmain.sh missing + AUTHORS COPYING ChangeLog INSTALL NEWS config.guess config.sub \ + depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ @@ -97,7 +101,7 @@ CONFIG_CLEAN_FILES = evas-directfb.pc evas-fb.pc evas-opengl-x11.pc \ evas-software-gdi.pc evas-software-ddraw.pc \ evas-software-16-ddraw.pc evas-direct3d.pc \ evas-software-16-wince.pc evas-software-sdl.pc evas-psl1ght.pc \ - evas.pc evas.spec + evas-wayland-shm.pc evas-wayland-egl.pc evas.pc evas.spec CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -284,8 +288,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -302,6 +304,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -383,6 +387,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ @@ -501,6 +509,8 @@ evas-direct3d.pc.in \ evas-software-16-wince.pc.in \ evas-software-sdl.pc.in \ evas-psl1ght.pc.in \ +evas-wayland-shm.pc.in \ +evas-wayland-egl.pc.in \ evas.spec.in \ evas.spec \ m4/efl_attribute.m4 \ @@ -522,7 +532,8 @@ pkgconfig_DATA = evas.pc $(am__append_1) $(am__append_2) \ $(am__append_6) $(am__append_7) $(am__append_8) \ $(am__append_9) $(am__append_10) $(am__append_11) \ $(am__append_12) $(am__append_13) $(am__append_14) \ - $(am__append_15) $(am__append_16) + $(am__append_15) $(am__append_16) $(am__append_17) \ + $(am__append_18) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -610,6 +621,10 @@ evas-software-sdl.pc: $(top_builddir)/config.status $(srcdir)/evas-software-sdl. cd $(top_builddir) && $(SHELL) ./config.status $@ evas-psl1ght.pc: $(top_builddir)/config.status $(srcdir)/evas-psl1ght.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ +evas-wayland-shm.pc: $(top_builddir)/config.status $(srcdir)/evas-wayland-shm.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +evas-wayland-egl.pc: $(top_builddir)/config.status $(srcdir)/evas-wayland-egl.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ evas.pc: $(top_builddir)/config.status $(srcdir)/evas.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas.spec: $(top_builddir)/config.status $(srcdir)/evas.spec.in diff --git a/libraries/evas/NEWS b/libraries/evas/NEWS index afddb46..945fd96 100644 --- a/libraries/evas/NEWS +++ b/libraries/evas/NEWS @@ -1,3 +1,18 @@ +Evas 1.2.0 + +Changes since Evas 1.1.0: +------------------------- + +Additions: + + * Textblock now supports self-closing tags, i.e
. Those should be used instead of the old
way. + * Shm engine for drawing in Wayland. + * evas_object_smart_callback_del_full API. + +Improvements: + + * Use Eina_File mmap infrastructure for bmp, ico, pmaps, psd, wbmp and xpm file access. + Evas 1.1.0 Changes since Evas 1.0.0: diff --git a/libraries/evas/aclocal.m4 b/libraries/evas/aclocal.m4 index f74cf11..a816a9b 100644 --- a/libraries/evas/aclocal.m4 +++ b/libraries/evas/aclocal.m4 @@ -13,14 +13,13 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. 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 . # @@ -48,10 +47,7 @@ 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]) -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]) - +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi @@ -64,6 +60,7 @@ if test -n "$PKG_CONFIG"; then AC_MSG_RESULT([no]) PKG_CONFIG="" fi + fi[]dnl ])# PKG_PROG_PKG_CONFIG @@ -72,31 +69,34 @@ 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. # -# 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 +# +# 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 # -------------------------------------------------------------- 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_default([$2], [:]) + m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) + # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[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 +[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 fi[]dnl ])# _PKG_CONFIG @@ -138,17 +138,16 @@ 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 --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - m4_default([$4], [AC_MSG_ERROR( + ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -156,24 +155,25 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT])[]dnl - ]) +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( + ifelse([$4], , [AC_MSG_FAILURE(dnl [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 .])[]dnl - ]) +To get pkg-config, see .])], + [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) - $3 + ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES diff --git a/libraries/evas/compile b/libraries/evas/compile deleted file mode 100755 index 1b1d232..0000000 --- a/libraries/evas/compile +++ /dev/null @@ -1,142 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand `-c -o'. - -scriptversion=2005-05-14.22 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; -esac - -ofile= -cfile= -eat= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` - -# Create the lock directory. -# Note: use `[/.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/libraries/evas/config.h.in b/libraries/evas/config.h.in index 95bb668..84f6c88 100644 --- a/libraries/evas/config.h.in +++ b/libraries/evas/config.h.in @@ -182,6 +182,12 @@ /* Build software Xlib backend */ #undef BUILD_ENGINE_SOFTWARE_XLIB +/* Wayland Egl rendering backend */ +#undef BUILD_ENGINE_WAYLAND_EGL + +/* Wayland Shm rendering backend */ +#undef BUILD_ENGINE_WAYLAND_SHM + /* EET Font Loader Support */ #undef BUILD_FONT_LOADER_EET @@ -410,6 +416,12 @@ /* Build Tiff image loader inside libevas */ #undef EVAS_STATIC_BUILD_TIFF +/* Build wayland-egl engine inside libevas */ +#undef EVAS_STATIC_BUILD_WAYLAND_EGL + +/* Build wayland-shm engine inside libevas */ +#undef EVAS_STATIC_BUILD_WAYLAND_SHM + /* Build WBMP image loader inside libevas */ #undef EVAS_STATIC_BUILD_WBMP @@ -510,6 +522,9 @@ /* Define to 1 if the system has the type `struct sigaction'. */ #undef HAVE_STRUCT_SIGACTION +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MMAN_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H @@ -565,6 +580,24 @@ /* default value since PATH_MAX is not defined */ #undef PATH_MAX +/* Allow pixman to render fonts */ +#undef PIXMAN_FONT + +/* Allow pixman to render images */ +#undef PIXMAN_IMAGE + +/* Allow pixman to render image sampled scaling */ +#undef PIXMAN_IMAGE_SCALE_SAMPLE + +/* Allow pixman to render lines */ +#undef PIXMAN_LINE + +/* Allow pixman to render polys */ +#undef PIXMAN_POLY + +/* Allow pixman to render rects */ +#undef PIXMAN_RECT + /* The size of `Eina_Unicode', as computed by sizeof. */ #undef SIZEOF_EINA_UNICODE @@ -582,6 +615,9 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Enable tiled rotate algorithm */ +#undef TILE_ROTATE + /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE diff --git a/libraries/evas/configure b/libraries/evas/configure index df1fca7..8ab6964 100755 --- a/libraries/evas/configure +++ b/libraries/evas/configure @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for evas 1.1.0. +# Generated by GNU Autoconf 2.65 for evas 1.1.99.67344. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error 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=$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 + 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 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&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, old GNU/Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, 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='evas' PACKAGE_TARNAME='evas' -PACKAGE_VERSION='1.1.0' -PACKAGE_STRING='evas 1.1.0' +PACKAGE_VERSION='1.1.99.67344' +PACKAGE_STRING='evas 1.1.99.67344' PACKAGE_BUGREPORT='enlightenment-devel@lists.sourceforge.net' PACKAGE_URL='' @@ -937,6 +937,20 @@ evas_engine_software_xcb_libs evas_engine_software_xcb_cflags EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE +EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE +EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE +BUILD_ENGINE_WAYLAND_EGL_FALSE +BUILD_ENGINE_WAYLAND_EGL_TRUE +evas_engine_wayland_egl_libs +evas_engine_wayland_egl_cflags +WAYLAND_EGL_LIBS +WAYLAND_EGL_CFLAGS +EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE +EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE +BUILD_ENGINE_WAYLAND_SHM_FALSE +BUILD_ENGINE_WAYLAND_SHM_TRUE +evas_engine_wayland_shm_libs +evas_engine_wayland_shm_cflags EVAS_STATIC_BUILD_SOFTWARE_16_SDL_FALSE EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE BUILD_ENGINE_SOFTWARE_16_SDL_FALSE @@ -1072,8 +1086,6 @@ EFL_BUILD_DOC_TRUE efl_doxygen efl_have_doxygen pkgconfig_requires_private -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH PKG_CONFIG CXXCPP am__fastdepCXX_FALSE @@ -1221,6 +1233,13 @@ enable_liblinebreak enable_fribidi enable_harfbuzz enable_pixman +enable_pixman_font +enable_pixman_rect +enable_pixman_line +enable_pixman_poly +enable_pixman_image +enable_pixman_image_scale_sample +enable_tile_rotate enable_evas_cserve enable_gl_flavor_gles enable_gles_variety_sgx @@ -1241,6 +1260,8 @@ with_x enable_software_16_ddraw enable_software_16_wince enable_software_16_sdl +enable_wayland_shm +enable_wayland_egl enable_sdl_primitive enable_static_software_generic enable_software_xcb @@ -1338,8 +1359,6 @@ CXXFLAGS CCC CXXCPP PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR EVIL_CFLAGS EVIL_LIBS EINA_CFLAGS @@ -1363,6 +1382,8 @@ DIRECTFB_LIBS XCB_CFLAGS XCB_LIBS XMKMF +WAYLAND_EGL_CFLAGS +WAYLAND_EGL_LIBS XCB_GL_CFLAGS XCB_GL_LIBS EDB_CFLAGS @@ -1445,9 +1466,8 @@ do fi case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1492,7 +1512,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 @@ -1518,7 +1538,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 @@ -1722,7 +1742,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 @@ -1738,7 +1758,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 @@ -1768,8 +1788,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." ;; *=*) @@ -1777,7 +1797,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 ;; @@ -1795,13 +1815,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 @@ -1824,7 +1844,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' @@ -1838,8 +1858,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 @@ -1854,9 +1874,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. @@ -1895,11 +1915,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 @@ -1925,7 +1945,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 evas 1.1.0 to adapt to many kinds of systems. +\`configure' configures evas 1.1.99.67344 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1939,7 +1959,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 @@ -1999,7 +2019,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of evas 1.1.0:";; + short | recursive ) echo "Configuration of evas 1.1.99.67344:";; esac cat <<\_ACEOF @@ -2027,8 +2047,16 @@ Optional Features: [default=enabled] --disable-harfbuzz disable complex text shaping and layouting support. [default=enabled] - --disable-pixman disable pixman for software rendering. + --enable-pixman enable pixman for software rendering. [default=enabled] + --enable-pixman-font Allow pixman to render fonts + --enable-pixman-rect Allow pixman to render rects + --enable-pixman-line Allow pixman to render lines + --enable-pixman-poly Allow pixman to render polys + --enable-pixman-image Allow pixman to render images + --enable-pixman-image-scale-sample + Allow pixman to render sampled scaled images + --enable-tile-rotate Enable tiled rotate algorithm --disable-evas-cserve disable shared cache server support. [default=enabled] --enable-gl-flavor-gles enable gles falvor of gl instead of standard @@ -2056,6 +2084,8 @@ Optional Features: enable Software Windows CE 16 bits rendering backend --enable-software-16-sdl enable Software SDL 16 bits rendering backend + --enable-wayland-shm enable Wayland Shm rendering backend + --enable-wayland-egl enable Wayland Egl rendering backend --enable-sdl-primitive --enable-static-software-generic Build software generic engine as part of libevas @@ -2229,10 +2259,6 @@ Some influential environment variables: 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 EINA_CFLAGS C compiler flags for EINA, overriding pkg-config @@ -2268,6 +2294,10 @@ Some influential environment variables: XCB_CFLAGS C compiler flags for XCB, overriding pkg-config XCB_LIBS linker flags for XCB, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System + WAYLAND_EGL_CFLAGS + C compiler flags for WAYLAND_EGL, overriding pkg-config + WAYLAND_EGL_LIBS + linker flags for WAYLAND_EGL, overriding pkg-config XCB_GL_CFLAGS C compiler flags for XCB_GL, overriding pkg-config XCB_GL_LIBS linker flags for XCB_GL, overriding pkg-config @@ -2361,10 +2391,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -evas configure 1.1.0 -generated by GNU Autoconf 2.67 +evas configure 1.1.99.67344 +generated by GNU Autoconf 2.65 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -2434,7 +2464,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; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -2458,10 +2488,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2497,7 +2527,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2520,15 +2550,17 @@ $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;} -( $as_echo "## -------------------------------------------------------- ## +( cat <<\_ASBOX +## -------------------------------------------------------- ## ## 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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2592,7 +2624,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2668,7 +2700,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2870,7 +2902,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; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : @@ -3119,7 +3151,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 eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -3164,18 +3196,15 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_type -# 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 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_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 "$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 @@ -3184,12 +3213,8 @@ $4 int main () { -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif +#ifndef $2 + (void) $2; #endif ; @@ -3213,8 +3238,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 evas $as_me 1.1.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +It was created by evas $as_me 1.1.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -3324,9 +3349,11 @@ trap 'exit_status=$? { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -3360,9 +3387,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do @@ -3375,9 +3404,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + cat <<\_ASBOX +## ------------------- ## ## File substitutions. ## -## ------------------- ##" +## ------------------- ## +_ASBOX echo for ac_var in $ac_subst_files do @@ -3391,9 +3422,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo cat confdefs.h echo @@ -3448,12 +3481,7 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # 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 + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -3468,11 +3496,7 @@ 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" \ - || { { $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 ; } + . "$ac_site_file" fi done @@ -3548,7 +3572,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. ## @@ -3574,22 +3598,16 @@ am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - 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 + 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 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, @@ -3705,11 +3723,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 @@ -3731,7 +3749,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 @@ -3741,7 +3759,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 @@ -3979,7 +3997,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 eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3987,7 +4005,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;; @@ -4021,7 +4039,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 @@ -4037,7 +4055,7 @@ fi # Define the identity of the package. PACKAGE='evas' - VERSION='1.1.0' + VERSION='1.1.99.67344' cat >>confdefs.h <<_ACEOF @@ -4452,8 +4470,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 @@ -4567,8 +4585,9 @@ 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 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +{ as_fn_set_status 77 +as_fn_error "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; } @@ -4610,8 +4629,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 @@ -4668,9 +4687,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 @@ -4721,8 +4740,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 @@ -5112,7 +5131,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5128,11 +5147,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -5171,7 +5190,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5187,18 +5206,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f 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 @@ -5259,7 +5278,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 @@ -5325,7 +5344,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 @@ -5457,7 +5476,8 @@ 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 " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -5532,7 +5552,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; } @@ -5543,16 +5563,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='-' @@ -5577,7 +5597,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 @@ -5585,7 +5605,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='-' @@ -5986,7 +6006,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 @@ -6065,7 +6085,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 @@ -6181,7 +6201,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 : @@ -6383,13 +6403,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:6386: $ac_compile\"" >&5) + (eval echo "\"\$as_me:6406: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:6389: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:6409: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:6392: output\"" >&5) + (eval echo "\"\$as_me:6412: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -7591,7 +7611,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7594 "configure"' > conftest.$ac_ext + echo '#line 7614 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8851,11 +8871,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:8854: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8874: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8858: \$? = $ac_status" >&5 + echo "$as_me:8878: \$? = $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. @@ -9190,11 +9210,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:9193: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9213: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9197: \$? = $ac_status" >&5 + echo "$as_me:9217: \$? = $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. @@ -9295,11 +9315,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:9298: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9318: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9302: \$? = $ac_status" >&5 + echo "$as_me:9322: \$? = $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 @@ -9350,11 +9370,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:9353: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9373: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9357: \$? = $ac_status" >&5 + echo "$as_me:9377: \$? = $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 @@ -11734,7 +11754,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11737 "configure" +#line 11757 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11830,7 +11850,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11833 "configure" +#line 11853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12074,15 +12094,15 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define VMIC 0 +#define VMIC 99 _ACEOF cat >>confdefs.h <<_ACEOF -#define VREV 0 +#define VREV 67344 _ACEOF -version_info="2:0:1" +version_info="2:99:1" release_info="" @@ -12101,7 +12121,7 @@ case "$host_os" in MODULE_ARCH="$host_os-$host_cpu" ;; *) - MODULE_ARCH="$host_os-$host_cpu-1.1.0" + MODULE_ARCH="$host_os-$host_cpu-1.1.99" ;; esac @@ -12136,6 +12156,8 @@ want_evas_engine_direct3d="no" want_evas_engine_fb="no" want_evas_engine_directfb="no" want_evas_engine_psl1ght="no" +want_evas_engine_wayland_shm="no" +want_evas_engine_wayland_egl="no" want_evas_image_loader_edb="yes" want_evas_image_loader_eet="yes" @@ -12182,6 +12204,8 @@ case "$host_os" in want_evas_engine_software_xcb="no" want_evas_engine_gl_xcb="no" want_evas_engine_fb="auto" + want_evas_engine_wayland_shm="auto" + want_evas_engine_wayland_egl="auto" ### no - not ready/usable/complete # want_evas_engine_software_8_x11="auto" # want_evas_engine_software_16_x11="auto" @@ -13582,7 +13606,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -13598,11 +13622,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -13641,7 +13665,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -13657,11 +13681,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else @@ -13890,7 +13914,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 : @@ -15431,11 +15455,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:15434: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15458: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15438: \$? = $ac_status" >&5 + echo "$as_me:15462: \$? = $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. @@ -15530,11 +15554,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:15533: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15557: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15537: \$? = $ac_status" >&5 + echo "$as_me:15561: \$? = $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 @@ -15582,11 +15606,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:15585: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15609: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15589: \$? = $ac_status" >&5 + echo "$as_me:15613: \$? = $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 @@ -16830,8 +16854,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 @@ -17201,10 +17225,6 @@ fi # pkg-config - - - - 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. @@ -17317,6 +17337,7 @@ $as_echo "yes" >&6; } $as_echo "no" >&6; } PKG_CONFIG="" fi + fi # Check whether pkg-config supports Requires.private @@ -17498,10 +17519,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVIL" >&5 $as_echo_n "checking for EVIL... " >&6; } -if test -n "$EVIL_CFLAGS"; then - pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_CFLAGS"; then + pkg_cv_EVIL_CFLAGS="$EVIL_CFLAGS" + else + 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=$? @@ -17511,13 +17533,15 @@ if test -n "$EVIL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EVIL_LIBS"; then - pkg_cv_EVIL_LIBS="$EVIL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EVIL_LIBS"; then + pkg_cv_EVIL_LIBS="$EVIL_LIBS" + else + 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=$? @@ -17527,15 +17551,14 @@ if test -n "$EVIL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -17543,14 +17566,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evil >= 1.0.0"` else - EVIL_PKG_ERRORS=`$PKG_CONFIG --print-errors "evil >= 1.0.0" 2>&1` + EVIL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evil >= 1.0.0"` 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 @@ -17559,13 +17582,12 @@ 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. @@ -17574,13 +17596,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 @@ -17597,10 +17619,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EINA" >&5 $as_echo_n "checking for EINA... " >&6; } -if test -n "$EINA_CFLAGS"; then - pkg_cv_EINA_CFLAGS="$EINA_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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 ac_status=$? @@ -17610,13 +17633,15 @@ if test -n "$EINA_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EINA_LIBS"; then - pkg_cv_EINA_LIBS="$EINA_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +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 ac_status=$? @@ -17626,15 +17651,14 @@ if test -n "$EINA_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -17642,14 +17666,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eina >= 1.1.0" 2>&1` + EINA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eina >= 1.1.0"` else - EINA_PKG_ERRORS=`$PKG_CONFIG --print-errors "eina >= 1.1.0" 2>&1` + EINA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eina >= 1.1.0"` 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.1.0) were not met: $EINA_PKG_ERRORS @@ -17658,13 +17682,12 @@ 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. @@ -17673,13 +17696,13 @@ 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 CPPFLAGS_SAVE="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $EINA_CFLAGS" @@ -17699,8 +17722,9 @@ else if test "$ac_cv_type_Eina_Unicode" = 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_error 77 "cannot compute sizeof (Eina_Unicode) -See \`config.log' for more details" "$LINENO" 5 ; } +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (Eina_Unicode) +See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_Eina_Unicode=0 fi @@ -17725,10 +17749,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5 $as_echo_n "checking for FREETYPE... " >&6; } -if test -n "$FREETYPE_CFLAGS"; then - pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FREETYPE_CFLAGS"; then + pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 9.3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "freetype2 >= 9.3.0") 2>&5 ac_status=$? @@ -17738,13 +17763,15 @@ if test -n "$FREETYPE_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$FREETYPE_LIBS"; then - pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FREETYPE_LIBS"; then + pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2 >= 9.3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "freetype2 >= 9.3.0") 2>&5 ac_status=$? @@ -17754,15 +17781,14 @@ if test -n "$FREETYPE_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -17770,14 +17796,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2 >= 9.3.0" 2>&1` + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "freetype2 >= 9.3.0"` else - FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2 >= 9.3.0" 2>&1` + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2 >= 9.3.0"` fi # Put the nasty error message in config.log where it belongs echo "$FREETYPE_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (freetype2 >= 9.3.0) were not met: + as_fn_error "Package requirements (freetype2 >= 9.3.0) were not met: $FREETYPE_PKG_ERRORS @@ -17786,13 +17812,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables FREETYPE_CFLAGS and FREETYPE_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. @@ -17801,13 +17826,13 @@ and FREETYPE_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 FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - + : fi requirement_evas="freetype2 eina >= 1.1.0 ${requirement_evas}" @@ -17835,10 +17860,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FONTCONFIG" >&5 $as_echo_n "checking for FONTCONFIG... " >&6; } -if test -n "$FONTCONFIG_CFLAGS"; then - pkg_cv_FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FONTCONFIG_CFLAGS"; then + pkg_cv_FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.5.0") 2>&5 ac_status=$? @@ -17848,13 +17874,15 @@ if test -n "$FONTCONFIG_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$FONTCONFIG_LIBS"; then - pkg_cv_FONTCONFIG_LIBS="$FONTCONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FONTCONFIG_LIBS"; then + pkg_cv_FONTCONFIG_LIBS="$FONTCONFIG_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fontconfig >= 2.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "fontconfig >= 2.5.0") 2>&5 ac_status=$? @@ -17864,15 +17892,14 @@ if test -n "$FONTCONFIG_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -17880,24 +17907,24 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fontconfig >= 2.5.0" 2>&1` + FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "fontconfig >= 2.5.0"` else - FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors "fontconfig >= 2.5.0" 2>&1` + FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$FONTCONFIG_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if test "x${want_fontconfig}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Fontconfig not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Fontconfig 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_fontconfig}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Fontconfig not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Fontconfig not found (strict dependencies checking)" "$LINENO" 5 fi else @@ -17972,10 +17999,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FRIBIDI" >&5 $as_echo_n "checking for FRIBIDI... " >&6; } -if test -n "$FRIBIDI_CFLAGS"; then - pkg_cv_FRIBIDI_CFLAGS="$FRIBIDI_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FRIBIDI_CFLAGS"; then + pkg_cv_FRIBIDI_CFLAGS="$FRIBIDI_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fribidi >= 0.19.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "fribidi >= 0.19.2") 2>&5 ac_status=$? @@ -17985,13 +18013,15 @@ if test -n "$FRIBIDI_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$FRIBIDI_LIBS"; then - pkg_cv_FRIBIDI_LIBS="$FRIBIDI_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$FRIBIDI_LIBS"; then + pkg_cv_FRIBIDI_LIBS="$FRIBIDI_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fribidi >= 0.19.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "fribidi >= 0.19.2") 2>&5 ac_status=$? @@ -18001,15 +18031,14 @@ if test -n "$FRIBIDI_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -18017,24 +18046,24 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - FRIBIDI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fribidi >= 0.19.2" 2>&1` + FRIBIDI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "fribidi >= 0.19.2"` else - FRIBIDI_PKG_ERRORS=`$PKG_CONFIG --print-errors "fribidi >= 0.19.2" 2>&1` + FRIBIDI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fribidi >= 0.19.2"` fi # Put the nasty error message in config.log where it belongs echo "$FRIBIDI_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if test "x$want_fribidi" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Fribidi not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Fribidi 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_fribidi" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Fribidi not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Fribidi not found (strict dependencies checking)" "$LINENO" 5 fi else @@ -18066,8 +18095,9 @@ else if test "$ac_cv_type_FriBidiChar" = 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_error 77 "cannot compute sizeof (FriBidiChar) -See \`config.log' for more details" "$LINENO" 5 ; } +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (FriBidiChar) +See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_FriBidiChar=0 fi @@ -18114,10 +18144,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HARFBUZZ" >&5 $as_echo_n "checking for HARFBUZZ... " >&6; } -if test -n "$HARFBUZZ_CFLAGS"; then - pkg_cv_HARFBUZZ_CFLAGS="$HARFBUZZ_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$HARFBUZZ_CFLAGS"; then + pkg_cv_HARFBUZZ_CFLAGS="$HARFBUZZ_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"harfbuzz >= 0.6.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "harfbuzz >= 0.6.0") 2>&5 ac_status=$? @@ -18127,13 +18158,15 @@ if test -n "$HARFBUZZ_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$HARFBUZZ_LIBS"; then - pkg_cv_HARFBUZZ_LIBS="$HARFBUZZ_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$HARFBUZZ_LIBS"; then + pkg_cv_HARFBUZZ_LIBS="$HARFBUZZ_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"harfbuzz >= 0.6.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "harfbuzz >= 0.6.0") 2>&5 ac_status=$? @@ -18143,15 +18176,14 @@ if test -n "$HARFBUZZ_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -18159,24 +18191,24 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "harfbuzz >= 0.6.0" 2>&1` + HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "harfbuzz >= 0.6.0"` else - HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --print-errors "harfbuzz >= 0.6.0" 2>&1` + HARFBUZZ_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "harfbuzz >= 0.6.0"` fi # Put the nasty error message in config.log where it belongs echo "$HARFBUZZ_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if test "x$want_harfbuzz" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Harfbuzz not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Harfbuzz 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_harfbuzz" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Harfbuzz not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Harfbuzz not found (strict dependencies checking)" "$LINENO" 5 fi else @@ -18207,7 +18239,7 @@ $as_echo "#define HAVE_HARFBUZZ 1" >>confdefs.h else if test "x$want_harfbuzz" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Harfbuzz-ft not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Harfbuzz-ft not found (strict dependencies checking)" "$LINENO" 5 fi have_harfbuzz="no" @@ -18243,10 +18275,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIXMAN" >&5 $as_echo_n "checking for PIXMAN... " >&6; } -if test -n "$PIXMAN_CFLAGS"; then - pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PIXMAN_CFLAGS"; then + pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS" + else + 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=$? @@ -18256,13 +18289,15 @@ if test -n "$PIXMAN_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$PIXMAN_LIBS"; then - pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PIXMAN_LIBS"; then + pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS" + else + 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=$? @@ -18272,15 +18307,14 @@ if test -n "$PIXMAN_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -18288,24 +18322,24 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pixman-1" 2>&1` + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pixman-1"` else - PIXMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors "pixman-1" 2>&1` + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pixman-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 @@ -18323,6 +18357,97 @@ $as_echo "#define HAVE_PIXMAN 1" >>confdefs.h fi fi +have_pixman_font="no" +# Check whether --enable-pixman-font was given. +if test "${enable_pixman_font+set}" = set; then : + enableval=$enable_pixman_font; + have_pixman_font="yes" + +$as_echo "#define PIXMAN_FONT 1" >>confdefs.h + + + +fi + + +have_pixman_rect="no" +# Check whether --enable-pixman-rect was given. +if test "${enable_pixman_rect+set}" = set; then : + enableval=$enable_pixman_rect; + have_pixman_rect="yes" + +$as_echo "#define PIXMAN_RECT 1" >>confdefs.h + + + +fi + + +have_pixman_line="no" +# Check whether --enable-pixman-line was given. +if test "${enable_pixman_line+set}" = set; then : + enableval=$enable_pixman_line; + have_pixman_line="yes" + +$as_echo "#define PIXMAN_LINE 1" >>confdefs.h + + + +fi + + +have_pixman_poly="no" +# Check whether --enable-pixman-poly was given. +if test "${enable_pixman_poly+set}" = set; then : + enableval=$enable_pixman_poly; + have_pixman_poly="yes" + +$as_echo "#define PIXMAN_POLY 1" >>confdefs.h + + + +fi + + +have_pixman_image="no" +# Check whether --enable-pixman-image was given. +if test "${enable_pixman_image+set}" = set; then : + enableval=$enable_pixman_image; + have_pixman_image="yes" + +$as_echo "#define PIXMAN_IMAGE 1" >>confdefs.h + + + +fi + + +have_pixman_image_scale_sample="no" +# Check whether --enable-pixman-image-scale-sample was given. +if test "${enable_pixman_image_scale_sample+set}" = set; then : + enableval=$enable_pixman_image_scale_sample; + have_pixman_image_scale_sample="yes" + +$as_echo "#define PIXMAN_IMAGE_SCALE_SAMPLE 1" >>confdefs.h + + + +fi + + +have_tile_rotate="no" +# Check whether --enable-tile-rotate was given. +if test "${enable_tile_rotate+set}" = set; then : + enableval=$enable_tile_rotate; + have_tile_rotate="yes" + +$as_echo "#define TILE_ROTATE 1" >>confdefs.h + + + +fi + + ### Checks for header files { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } @@ -18436,11 +18561,12 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi -for ac_header in unistd.h stdint.h sys/param.h netinet/in.h +for ac_header in unistd.h stdint.h sys/param.h netinet/in.h sys/mman.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" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -18501,7 +18627,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - ### Checks for types ac_fn_c_check_type "$LINENO" "struct sigaction" "ac_cv_type_struct_sigaction" "#include " @@ -18820,8 +18945,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 case $ac_cv_prog_cc_stdc in #( @@ -19494,7 +19619,8 @@ 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" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -19641,7 +19767,7 @@ fi if test "x$_efl_have_fnmatch" = "xyes"; then : else - as_fn_error $? "Cannot find fnmatch()" "$LINENO" 5 + as_fn_error "Cannot find fnmatch()" "$LINENO" 5 fi @@ -19988,7 +20114,7 @@ if test "x$gl_flavor_gles" = "xyes"; then if test "x$eng" = "xx"; then eng="" else - as_fn_error $? "Please enable just 1 OpenGL-ES flavor. Choices are: + as_fn_error "Please enable just 1 OpenGL-ES flavor. Choices are: --enable-gles-variety-sgx (Most GL-ES2 GPUs with shader compiler) --enable-gles-variety-s3c6410 (s3c6410 with offline shader compiler) You will also need to enable the OpenGL engine for X11 with: @@ -20049,7 +20175,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Buffer dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Buffer dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Buffer rendering backend will be built" >&5 @@ -20162,7 +20288,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software GDI dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software GDI dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software GDI rendering backend will be built" >&5 @@ -20275,7 +20401,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software DirectDraw dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software DirectDraw dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software DirectDraw rendering backend will be built" >&5 @@ -20367,7 +20493,8 @@ for ac_header in d3d9.h d3dx9.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" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -20396,7 +20523,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Direct3D dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Direct3D dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Direct3D rendering backend will be built" >&5 @@ -20491,10 +20618,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5 $as_echo_n "checking for SDL... " >&6; } -if test -n "$SDL_CFLAGS"; then - pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_CFLAGS"; then + pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" + else + 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=$? @@ -20504,13 +20632,15 @@ if test -n "$SDL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$SDL_LIBS"; then - pkg_cv_SDL_LIBS="$SDL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_LIBS"; then + pkg_cv_SDL_LIBS="$SDL_LIBS" + else + 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=$? @@ -20520,15 +20650,14 @@ if test -n "$SDL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -20536,14 +20665,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sdl >= 1.2.0"` else - SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sdl >= 1.2.0"` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (sdl >= 1.2.0) were not met: + as_fn_error "Package requirements (sdl >= 1.2.0) were not met: $SDL_PKG_ERRORS @@ -20552,13 +20681,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables SDL_CFLAGS and SDL_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. @@ -20567,7 +20695,7 @@ and SDL_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 SDL_CFLAGS=$pkg_cv_SDL_CFLAGS SDL_LIBS=$pkg_cv_SDL_LIBS @@ -20599,7 +20727,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software SDL dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software SDL dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software SDL rendering backend will be built" >&5 @@ -20708,7 +20836,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "PSL1GHT dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "PSL1GHT dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PSL1GHT rendering backend will be built" >&5 @@ -20803,10 +20931,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5 $as_echo_n "checking for SDL... " >&6; } -if test -n "$SDL_CFLAGS"; then - pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_CFLAGS"; then + pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" + else + 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=$? @@ -20816,13 +20945,15 @@ if test -n "$SDL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$SDL_LIBS"; then - pkg_cv_SDL_LIBS="$SDL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_LIBS"; then + pkg_cv_SDL_LIBS="$SDL_LIBS" + else + 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=$? @@ -20832,15 +20963,14 @@ if test -n "$SDL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -20848,14 +20978,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sdl >= 1.2.0"` else - SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sdl >= 1.2.0"` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (sdl >= 1.2.0) were not met: + as_fn_error "Package requirements (sdl >= 1.2.0) were not met: $SDL_PKG_ERRORS @@ -20864,13 +20994,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables SDL_CFLAGS and SDL_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. @@ -20879,7 +21008,7 @@ and SDL_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 SDL_CFLAGS=$pkg_cv_SDL_CFLAGS SDL_LIBS=$pkg_cv_SDL_LIBS @@ -21040,7 +21169,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "OpenGL SDL dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "OpenGL SDL dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenGL SDL rendering backend will be built" >&5 @@ -21184,10 +21313,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL_EET" >&5 $as_echo_n "checking for GL_EET... " >&6; } -if test -n "$GL_EET_CFLAGS"; then - pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_CFLAGS"; then + pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -21197,13 +21327,15 @@ if test -n "$GL_EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$GL_EET_LIBS"; then - pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_LIBS"; then + pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -21213,15 +21345,14 @@ if test -n "$GL_EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21229,17 +21360,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - GL_EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$GL_EET_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else GL_EET_CFLAGS=$pkg_cv_GL_EET_CFLAGS @@ -21263,7 +21394,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "OpenGL Cocoa dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "OpenGL Cocoa dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenGL Cocoa rendering backend will be built" >&5 @@ -21372,7 +21503,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Framebuffer dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Framebuffer dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Framebuffer rendering backend will be built" >&5 @@ -21467,10 +21598,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRECTFB" >&5 $as_echo_n "checking for DIRECTFB... " >&6; } -if test -n "$DIRECTFB_CFLAGS"; then - pkg_cv_DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$DIRECTFB_CFLAGS"; then + pkg_cv_DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS" + else + 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=$? @@ -21480,13 +21612,15 @@ if test -n "$DIRECTFB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$DIRECTFB_LIBS"; then - pkg_cv_DIRECTFB_LIBS="$DIRECTFB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$DIRECTFB_LIBS"; then + pkg_cv_DIRECTFB_LIBS="$DIRECTFB_LIBS" + else + 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=$? @@ -21496,15 +21630,14 @@ if test -n "$DIRECTFB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21512,14 +21645,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "directfb >= 0.9.16" 2>&1` + DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "directfb >= 0.9.16"` else - DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --print-errors "directfb >= 0.9.16" 2>&1` + DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "directfb >= 0.9.16"` fi # Put the nasty error message in config.log where it belongs echo "$DIRECTFB_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (directfb >= 0.9.16) were not met: + as_fn_error "Package requirements (directfb >= 0.9.16) were not met: $DIRECTFB_PKG_ERRORS @@ -21528,13 +21661,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables DIRECTFB_CFLAGS and DIRECTFB_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. @@ -21543,7 +21675,7 @@ and DIRECTFB_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 DIRECTFB_CFLAGS=$pkg_cv_DIRECTFB_CFLAGS DIRECTFB_LIBS=$pkg_cv_DIRECTFB_LIBS @@ -21575,7 +21707,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "DirectFB dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "DirectFB dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DirectFB rendering backend will be built" >&5 @@ -21669,10 +21801,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB" >&5 $as_echo_n "checking for XCB... " >&6; } -if test -n "$XCB_CFLAGS"; then - pkg_cv_XCB_CFLAGS="$XCB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XCB_CFLAGS"; then + pkg_cv_XCB_CFLAGS="$XCB_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb xcb-shm xcb-image >= 0.2.1 pixman-1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1") 2>&5 ac_status=$? @@ -21682,13 +21815,15 @@ if test -n "$XCB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$XCB_LIBS"; then - pkg_cv_XCB_LIBS="$XCB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XCB_LIBS"; then + pkg_cv_XCB_LIBS="$XCB_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb xcb-shm xcb-image >= 0.2.1 pixman-1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1") 2>&5 ac_status=$? @@ -21698,15 +21833,14 @@ if test -n "$XCB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -21714,20 +21848,20 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1" 2>&1` + XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1"` else - XCB_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1" 2>&1` + XCB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_dep="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } have_dep="no" @@ -21762,7 +21896,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software X11 8 bits grayscale dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software X11 8 bits grayscale dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software X11 8 bits grayscale rendering backend will be built" >&5 @@ -21866,7 +22000,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 @@ -21884,7 +22018,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 @@ -21970,7 +22104,7 @@ else fi done fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -22657,7 +22791,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software X11 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software X11 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software X11 16 bits rendering backend will be built" >&5 @@ -22770,7 +22904,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software DirectDraw 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software DirectDraw 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software DirectDraw 16 bits rendering backend will be built" >&5 @@ -22872,7 +23006,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software Windows CE 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software Windows CE 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software Windows CE 16 bits rendering backend will be built" >&5 @@ -22967,10 +23101,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5 $as_echo_n "checking for SDL... " >&6; } -if test -n "$SDL_CFLAGS"; then - pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_CFLAGS"; then + pkg_cv_SDL_CFLAGS="$SDL_CFLAGS" + else + 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=$? @@ -22980,13 +23115,15 @@ if test -n "$SDL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$SDL_LIBS"; then - pkg_cv_SDL_LIBS="$SDL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SDL_LIBS"; then + pkg_cv_SDL_LIBS="$SDL_LIBS" + else + 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=$? @@ -22996,15 +23133,14 @@ if test -n "$SDL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -23012,14 +23148,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sdl >= 1.2.0"` else - SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors "sdl >= 1.2.0" 2>&1` + SDL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sdl >= 1.2.0"` fi # Put the nasty error message in config.log where it belongs echo "$SDL_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (sdl >= 1.2.0) were not met: + as_fn_error "Package requirements (sdl >= 1.2.0) were not met: $SDL_PKG_ERRORS @@ -23028,13 +23164,12 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables SDL_CFLAGS and SDL_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. @@ -23043,7 +23178,7 @@ and SDL_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 SDL_CFLAGS=$pkg_cv_SDL_CFLAGS SDL_LIBS=$pkg_cv_SDL_LIBS @@ -23075,7 +23210,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software SDL 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software SDL 16 bits dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software SDL 16 bits rendering backend will be built" >&5 @@ -23128,6 +23263,386 @@ fi + + + +want_engine="${want_evas_engine_wayland_shm}" +want_static_engine="no" +have_engine="no" +have_evas_engine_wayland_shm="no" + +# Check whether --enable-wayland-shm was given. +if test "${enable_wayland_shm+set}" = set; then : + enableval=$enable_wayland_shm; + if test "x${enableval}" = "xyes" ; then + want_engine="yes" + else + if test "x${enableval}" = "xstatic" ; then + want_engine="static" + else + want_engine="no" + fi + fi + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Wayland Shm rendering backend" >&5 +$as_echo_n "checking whether to enable Wayland Shm rendering backend... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_engine}" >&5 +$as_echo "${want_engine}" >&6; } + +if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic" -o "x${want_engine}" = "xauto" ; then + + +have_dep="yes" +evas_engine_wayland_shm_cflags="" +evas_engine_wayland_shm_libs="" + + + + +if test "x${have_dep}" = "xyes" ; then + have_engine="yes" +else + have_engine="no" +fi + + +fi + +if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then + as_fn_error "Wayland Shm dependencies not found (strict dependencies checking)" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Wayland Shm rendering backend will be built" >&5 +$as_echo_n "checking whether Wayland Shm rendering backend will be built... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_engine}" >&5 +$as_echo "${have_engine}" >&6; } + +if test "x${have_engine}" = "xyes" ; then + if test "x${want_engine}" = "xstatic" ; then + have_evas_engine_wayland_shm="static" + want_static_engine="yes" + else + have_evas_engine_wayland_shm="yes" + fi +fi + +if test "x${have_engine}" = "xyes" ; then + +$as_echo "#define BUILD_ENGINE_WAYLAND_SHM 1" >>confdefs.h + +fi + + if test "x${have_engine}" = "xyes"; then + BUILD_ENGINE_WAYLAND_SHM_TRUE= + BUILD_ENGINE_WAYLAND_SHM_FALSE='#' +else + BUILD_ENGINE_WAYLAND_SHM_TRUE='#' + BUILD_ENGINE_WAYLAND_SHM_FALSE= +fi + + +if test "x${want_static_engine}" = "xyes" ; then + +$as_echo "#define EVAS_STATIC_BUILD_WAYLAND_SHM 1" >>confdefs.h + + have_static_module="yes" +fi + + if test "x${want_static_engine}" = "xyes"; then + EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE= + EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE='#' +else + EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE='#' + EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE= +fi + + + + + + + + + + +want_engine="${want_evas_engine_wayland_egl}" +want_static_engine="no" +have_engine="no" +have_evas_engine_wayland_egl="no" + +# Check whether --enable-wayland-egl was given. +if test "${enable_wayland_egl+set}" = set; then : + enableval=$enable_wayland_egl; + if test "x${enableval}" = "xyes" ; then + want_engine="yes" + else + if test "x${enableval}" = "xstatic" ; then + want_engine="static" + else + want_engine="no" + fi + fi + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Wayland Egl rendering backend" >&5 +$as_echo_n "checking whether to enable Wayland Egl rendering backend... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${want_engine}" >&5 +$as_echo "${want_engine}" >&6; } + +if test "x${want_engine}" = "xyes" -o "x${want_engine}" = "xstatic" -o "x${want_engine}" = "xauto" ; then + + +requirement="" +have_dep="no" +evas_engine_wayland_egl_cflags="" +evas_engine_wayland_egl_libs="" + + +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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"egl >= 7.10 glesv2 gl wayland-client wayland-egl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "egl >= 7.10 glesv2 gl wayland-client wayland-egl") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_WAYLAND_EGL_CFLAGS=`$PKG_CONFIG --cflags "egl >= 7.10 glesv2 gl wayland-client wayland-egl" 2>/dev/null` +else + pkg_failed=yes +fi + fi +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" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"egl >= 7.10 glesv2 gl wayland-client wayland-egl\""; } >&5 + ($PKG_CONFIG --exists --print-errors "egl >= 7.10 glesv2 gl wayland-client wayland-egl") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_WAYLAND_EGL_LIBS=`$PKG_CONFIG --libs "egl >= 7.10 glesv2 gl wayland-client wayland-egl" 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 + WAYLAND_EGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "egl >= 7.10 glesv2 gl wayland-client wayland-egl"` + else + WAYLAND_EGL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "egl >= 7.10 glesv2 gl wayland-client wayland-egl"` + 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_dep="no" + + +elif test $pkg_failed = untried; then + + have_dep="no" + + +else + WAYLAND_EGL_CFLAGS=$pkg_cv_WAYLAND_EGL_CFLAGS + WAYLAND_EGL_LIBS=$pkg_cv_WAYLAND_EGL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + have_dep="yes" + requirement="egl >= 7.10 glesv2 gl wayland-client wayland-egl" + evas_engine_wayland_egl_cflags="${WAYLAND_EGL_CFLAGS}" + evas_engine_wayland_egl_libs="${WAYLAND_EGL_LIBS}" + +fi + +if test "x${have_dep}" = "xyes" ; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL_EET" >&5 +$as_echo_n "checking for GL_EET... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_CFLAGS"; then + pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GL_EET_CFLAGS=`$PKG_CONFIG --cflags "eet >= 1.5.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_LIBS"; then + pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GL_EET_LIBS=`$PKG_CONFIG --libs "eet >= 1.5.0" 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 + GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` + else + GL_EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GL_EET_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then + have_dep="no" +else + GL_EET_CFLAGS=$pkg_cv_GL_EET_CFLAGS + GL_EET_LIBS=$pkg_cv_GL_EET_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_dep="yes" +fi + ac_fn_c_check_header_compile "$LINENO" "GLES2/gl2.h" "ac_cv_header_GLES2_gl2_h" " + +" +if test "x$ac_cv_header_GLES2_gl2_h" = x""yes; then : + have_egl="yes" +else + have_egl="no" +fi + + + if test "x${have_egl}" = "xyes" ; then + evas_engine_wayland_egl_cflags="${WAYLAND_EGL_CFLAGS}" + evas_engine_wayland_egl_libs="${WAYLAND_EGL_LIBS} -lGL -lGLESv2 -lEGL" + fi +fi + + + + +if test "x${want_engine}" = "xstatic" ; then + requirement_evas="${requirement} ${requirement_evas}" +fi + +if test "x${have_dep}" = "xyes" ; then + have_engine="yes" +else + have_engine="no" +fi + + +fi + +if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then + as_fn_error "Wayland Egl dependencies not found (strict dependencies checking)" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Wayland Egl rendering backend will be built" >&5 +$as_echo_n "checking whether Wayland Egl rendering backend will be built... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_engine}" >&5 +$as_echo "${have_engine}" >&6; } + +if test "x${have_engine}" = "xyes" ; then + if test "x${want_engine}" = "xstatic" ; then + have_evas_engine_wayland_egl="static" + want_static_engine="yes" + else + have_evas_engine_wayland_egl="yes" + fi +fi + +if test "x${have_engine}" = "xyes" ; then + +$as_echo "#define BUILD_ENGINE_WAYLAND_EGL 1" >>confdefs.h + +fi + + if test "x${have_engine}" = "xyes"; then + BUILD_ENGINE_WAYLAND_EGL_TRUE= + BUILD_ENGINE_WAYLAND_EGL_FALSE='#' +else + BUILD_ENGINE_WAYLAND_EGL_TRUE='#' + BUILD_ENGINE_WAYLAND_EGL_FALSE= +fi + + +if test "x${want_static_engine}" = "xyes" ; then + +$as_echo "#define EVAS_STATIC_BUILD_WAYLAND_EGL 1" >>confdefs.h + + have_static_module="yes" +fi + + if test "x${want_static_engine}" = "xyes"; then + EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE= + EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE='#' +else + EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE='#' + EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE= +fi + + + + + + + # SDL primitive sdl_primitive="no" @@ -23241,10 +23756,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB" >&5 $as_echo_n "checking for XCB... " >&6; } -if test -n "$XCB_CFLAGS"; then - pkg_cv_XCB_CFLAGS="$XCB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XCB_CFLAGS"; then + pkg_cv_XCB_CFLAGS="$XCB_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb xcb-shm xcb-image >= 0.2.1 pixman-1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1") 2>&5 ac_status=$? @@ -23254,13 +23770,15 @@ if test -n "$XCB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$XCB_LIBS"; then - pkg_cv_XCB_LIBS="$XCB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XCB_LIBS"; then + pkg_cv_XCB_LIBS="$XCB_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb xcb-shm xcb-image >= 0.2.1 pixman-1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1") 2>&5 ac_status=$? @@ -23270,15 +23788,14 @@ if test -n "$XCB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -23286,20 +23803,20 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1" 2>&1` + XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1"` else - XCB_PKG_ERRORS=`$PKG_CONFIG --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1" 2>&1` + XCB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb xcb-shm xcb-image >= 0.2.1 pixman-1"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_dep="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } have_dep="no" @@ -23334,7 +23851,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software XCB dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software XCB dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software XCB rendering backend will be built" >&5 @@ -23460,7 +23977,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 @@ -23478,7 +23995,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 @@ -23564,7 +24081,7 @@ else fi done fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -24251,7 +24768,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Software Xlib dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Software Xlib dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Software Xlib rendering backend will be built" >&5 @@ -24451,7 +24968,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 @@ -24469,7 +24986,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 @@ -24555,7 +25072,7 @@ else fi done fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -25314,10 +25831,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB_GL" >&5 $as_echo_n "checking for XCB_GL... " >&6; } -if test -n "$XCB_GL_CFLAGS"; then - pkg_cv_XCB_GL_CFLAGS="$XCB_GL_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XCB_GL_CFLAGS"; then + pkg_cv_XCB_GL_CFLAGS="$XCB_GL_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb xcb-glx xcb-render xcb-renderutil\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb xcb xcb-glx xcb-render xcb-renderutil") 2>&5 ac_status=$? @@ -25327,13 +25845,15 @@ if test -n "$XCB_GL_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$XCB_GL_LIBS"; then - pkg_cv_XCB_GL_LIBS="$XCB_GL_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XCB_GL_LIBS"; then + pkg_cv_XCB_GL_LIBS="$XCB_GL_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb xcb-glx xcb-render xcb-renderutil\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb xcb xcb-glx xcb-render xcb-renderutil") 2>&5 ac_status=$? @@ -25343,15 +25863,14 @@ if test -n "$XCB_GL_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -25359,20 +25878,20 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11-xcb xcb xcb-glx xcb-render xcb-renderutil" 2>&1` + XCB_GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11-xcb xcb xcb-glx xcb-render xcb-renderutil"` else - XCB_GL_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11-xcb xcb xcb-glx xcb-render xcb-renderutil" 2>&1` + XCB_GL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11-xcb xcb xcb-glx xcb-render xcb-renderutil"` fi # Put the nasty error message in config.log where it belongs echo "$XCB_GL_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_dep="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } have_dep="no" @@ -25400,10 +25919,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL_EET" >&5 $as_echo_n "checking for GL_EET... " >&6; } -if test -n "$GL_EET_CFLAGS"; then - pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_CFLAGS"; then + pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -25413,13 +25933,15 @@ if test -n "$GL_EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$GL_EET_LIBS"; then - pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_LIBS"; then + pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -25429,15 +25951,14 @@ if test -n "$GL_EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -25445,17 +25966,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - GL_EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$GL_EET_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else GL_EET_CFLAGS=$pkg_cv_GL_EET_CFLAGS @@ -25544,10 +26065,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL_EET" >&5 $as_echo_n "checking for GL_EET... " >&6; } -if test -n "$GL_EET_CFLAGS"; then - pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_CFLAGS"; then + pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -25557,13 +26079,15 @@ if test -n "$GL_EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$GL_EET_LIBS"; then - pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_LIBS"; then + pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -25573,15 +26097,14 @@ if test -n "$GL_EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -25589,17 +26112,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - GL_EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$GL_EET_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else GL_EET_CFLAGS=$pkg_cv_GL_EET_CFLAGS @@ -25636,7 +26159,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "OpenGL XCB dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "OpenGL XCB dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenGL XCB rendering backend will be built" >&5 @@ -25763,7 +26286,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 @@ -25781,7 +26304,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 @@ -25867,7 +26390,7 @@ else fi done fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -26636,10 +27159,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL_EET" >&5 $as_echo_n "checking for GL_EET... " >&6; } -if test -n "$GL_EET_CFLAGS"; then - pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_CFLAGS"; then + pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -26649,13 +27173,15 @@ if test -n "$GL_EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$GL_EET_LIBS"; then - pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_LIBS"; then + pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -26665,15 +27191,14 @@ if test -n "$GL_EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -26681,17 +27206,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - GL_EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$GL_EET_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else GL_EET_CFLAGS=$pkg_cv_GL_EET_CFLAGS @@ -26785,10 +27310,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL_EET" >&5 $as_echo_n "checking for GL_EET... " >&6; } -if test -n "$GL_EET_CFLAGS"; then - pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_CFLAGS"; then + pkg_cv_GL_EET_CFLAGS="$GL_EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -26798,13 +27324,15 @@ if test -n "$GL_EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$GL_EET_LIBS"; then - pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$GL_EET_LIBS"; then + pkg_cv_GL_EET_LIBS="$GL_EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -26814,15 +27342,14 @@ if test -n "$GL_EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -26830,17 +27357,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - GL_EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + GL_EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$GL_EET_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else GL_EET_CFLAGS=$pkg_cv_GL_EET_CFLAGS @@ -26878,7 +27405,7 @@ fi fi if test "x${have_engine}" = "xno" -a "x${want_engine}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "OpenGL XLib dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "OpenGL XLib dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenGL XLib rendering backend will be built" >&5 @@ -27013,13 +27540,15 @@ have_static_evas_engine_gl_common="no" if test "x$have_evas_engine_gl_xlib" = "xyes" \ || test "x$have_evas_engine_gl_xcb" = "xyes" \ || test "x$have_evas_engine_gl_sdl" = "xyes" \ - || test "x$have_evas_engine_gl_cocoa" = "xyes"; then + || test "x$have_evas_engine_gl_cocoa" = "xyes" \ + || test "x$have_evas_engine_wayland_egl" = "xyes"; then have_evas_engine_gl_common="yes" fi if test "x$have_evas_engine_gl_xlib" = "xstatic" \ || test "x$have_evas_engine_gl_xcb" = "xstatic" \ || test "x$have_evas_engine_gl_sdl" = "xstatic" \ - || test "x$have_evas_engine_gl_cocoa" = "xstatic"; then + || test "x$have_evas_engine_gl_cocoa" = "xstatic" \ + || test "x$have_evas_engine_wayland_egl" = "xstatic"; then have_evas_engine_gl_common="yes" have_static_evas_engine_gl_common="yes" fi @@ -27220,10 +27749,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EDB" >&5 $as_echo_n "checking for EDB... " >&6; } -if test -n "$EDB_CFLAGS"; then - pkg_cv_EDB_CFLAGS="$EDB_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDB_CFLAGS"; then + pkg_cv_EDB_CFLAGS="$EDB_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"edb\""; } >&5 ($PKG_CONFIG --exists --print-errors "edb") 2>&5 ac_status=$? @@ -27233,13 +27763,15 @@ if test -n "$EDB_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EDB_LIBS"; then - pkg_cv_EDB_LIBS="$EDB_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDB_LIBS"; then + pkg_cv_EDB_LIBS="$EDB_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"edb\""; } >&5 ($PKG_CONFIG --exists --print-errors "edb") 2>&5 ac_status=$? @@ -27249,15 +27781,14 @@ if test -n "$EDB_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -27265,17 +27796,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "edb" 2>&1` + EDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "edb"` else - EDB_PKG_ERRORS=`$PKG_CONFIG --print-errors "edb" 2>&1` + EDB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "edb"` fi # Put the nasty error message in config.log where it belongs echo "$EDB_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else EDB_CFLAGS=$pkg_cv_EDB_CFLAGS @@ -27304,7 +27835,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Edb dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Edb dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Edb image loader will be built" >&5 @@ -27402,10 +27933,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EET" >&5 $as_echo_n "checking for EET... " >&6; } -if test -n "$EET_CFLAGS"; then - pkg_cv_EET_CFLAGS="$EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EET_CFLAGS"; then + pkg_cv_EET_CFLAGS="$EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -27415,13 +27947,15 @@ if test -n "$EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EET_LIBS"; then - pkg_cv_EET_LIBS="$EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EET_LIBS"; then + pkg_cv_EET_LIBS="$EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -27431,15 +27965,14 @@ if test -n "$EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -27447,17 +27980,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$EET_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else EET_CFLAGS=$pkg_cv_EET_CFLAGS @@ -27486,7 +28019,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Eet dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Eet dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Eet image loader will be built" >&5 @@ -27562,10 +28095,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EET" >&5 $as_echo_n "checking for EET... " >&6; } -if test -n "$EET_CFLAGS"; then - pkg_cv_EET_CFLAGS="$EET_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EET_CFLAGS"; then + pkg_cv_EET_CFLAGS="$EET_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -27575,13 +28109,15 @@ if test -n "$EET_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EET_LIBS"; then - pkg_cv_EET_LIBS="$EET_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EET_LIBS"; then + pkg_cv_EET_LIBS="$EET_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"eet >= 1.5.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "eet >= 1.5.0") 2>&5 ac_status=$? @@ -27591,15 +28127,14 @@ if test -n "$EET_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -27607,17 +28142,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "eet >= 1.5.0" 2>&1` + EET_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "eet >= 1.5.0"` else - EET_PKG_ERRORS=`$PKG_CONFIG --print-errors "eet >= 1.5.0" 2>&1` + EET_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "eet >= 1.5.0"` fi # Put the nasty error message in config.log where it belongs echo "$EET_PKG_ERRORS" >&5 - have_evas_font_loader_eet="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_evas_font_loader_eet="no" +elif test $pkg_failed = untried; then have_evas_font_loader_eet="no" else EET_CFLAGS=$pkg_cv_EET_CFLAGS @@ -27629,7 +28164,7 @@ fi fi if test "x${have_evas_font_loader_eet}" = "xno" -a "x$want_loader" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Eet dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Eet dependencies not found (strict dependencies checking)" "$LINENO" 5 fi if test "x$have_evas_font_loader_eet" = "xyes" ; then @@ -27798,7 +28333,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Gif dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Gif dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Gif image loader will be built" >&5 @@ -27988,7 +28523,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Jpeg dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Jpeg dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Jpeg image loader will be built" >&5 @@ -28114,7 +28649,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "PMAPS dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "PMAPS dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PMAPS image loader will be built" >&5 @@ -28212,10 +28747,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 $as_echo_n "checking for PNG... " >&6; } -if test -n "$PNG_CFLAGS"; then - pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_CFLAGS"; then + pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng >= 1.2.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng >= 1.2.10") 2>&5 ac_status=$? @@ -28225,13 +28761,15 @@ if test -n "$PNG_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$PNG_LIBS"; then - pkg_cv_PNG_LIBS="$PNG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_LIBS"; then + pkg_cv_PNG_LIBS="$PNG_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng >= 1.2.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng >= 1.2.10") 2>&5 ac_status=$? @@ -28241,15 +28779,14 @@ if test -n "$PNG_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -28257,17 +28794,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng >= 1.2.10" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpng >= 1.2.10"` else - PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng >= 1.2.10" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng >= 1.2.10"` fi # Put the nasty error message in config.log where it belongs echo "$PNG_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else PNG_CFLAGS=$pkg_cv_PNG_CFLAGS @@ -28283,10 +28820,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 $as_echo_n "checking for PNG... " >&6; } -if test -n "$PNG_CFLAGS"; then - pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_CFLAGS"; then + pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng15\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng15") 2>&5 ac_status=$? @@ -28296,13 +28834,15 @@ if test -n "$PNG_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$PNG_LIBS"; then - pkg_cv_PNG_LIBS="$PNG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_LIBS"; then + pkg_cv_PNG_LIBS="$PNG_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng15\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng15") 2>&5 ac_status=$? @@ -28312,15 +28852,14 @@ if test -n "$PNG_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -28328,17 +28867,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng15" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpng15"` else - PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng15" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng15"` fi # Put the nasty error message in config.log where it belongs echo "$PNG_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else PNG_CFLAGS=$pkg_cv_PNG_CFLAGS @@ -28355,10 +28894,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 $as_echo_n "checking for PNG... " >&6; } -if test -n "$PNG_CFLAGS"; then - pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_CFLAGS"; then + pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng14\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng14") 2>&5 ac_status=$? @@ -28368,13 +28908,15 @@ if test -n "$PNG_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$PNG_LIBS"; then - pkg_cv_PNG_LIBS="$PNG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_LIBS"; then + pkg_cv_PNG_LIBS="$PNG_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng14\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng14") 2>&5 ac_status=$? @@ -28384,15 +28926,14 @@ if test -n "$PNG_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -28400,17 +28941,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng14" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpng14"` else - PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng14" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng14"` fi # Put the nasty error message in config.log where it belongs echo "$PNG_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else PNG_CFLAGS=$pkg_cv_PNG_CFLAGS @@ -28427,10 +28968,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 $as_echo_n "checking for PNG... " >&6; } -if test -n "$PNG_CFLAGS"; then - pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_CFLAGS"; then + pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng12 >= 1.2.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng12 >= 1.2.10") 2>&5 ac_status=$? @@ -28440,13 +28982,15 @@ if test -n "$PNG_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$PNG_LIBS"; then - pkg_cv_PNG_LIBS="$PNG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$PNG_LIBS"; then + pkg_cv_PNG_LIBS="$PNG_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng12 >= 1.2.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "libpng12 >= 1.2.10") 2>&5 ac_status=$? @@ -28456,15 +29000,14 @@ if test -n "$PNG_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -28472,17 +29015,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng12 >= 1.2.10" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libpng12 >= 1.2.10"` else - PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng12 >= 1.2.10" 2>&1` + PNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng12 >= 1.2.10"` fi # Put the nasty error message in config.log where it belongs echo "$PNG_PKG_ERRORS" >&5 - have_dep="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + have_dep="no" +elif test $pkg_failed = untried; then have_dep="no" else PNG_CFLAGS=$pkg_cv_PNG_CFLAGS @@ -28513,7 +29056,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "PNG dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "PNG dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PNG image loader will be built" >&5 @@ -28611,10 +29154,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SVG" >&5 $as_echo_n "checking for SVG... " >&6; } -if test -n "$SVG_CFLAGS"; then - pkg_cv_SVG_CFLAGS="$SVG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SVG_CFLAGS"; then + pkg_cv_SVG_CFLAGS="$SVG_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"librsvg-2.0 >= 2.14.0 cairo >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "librsvg-2.0 >= 2.14.0 @@ -28627,13 +29171,15 @@ if test -n "$SVG_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$SVG_LIBS"; then - pkg_cv_SVG_LIBS="$SVG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$SVG_LIBS"; then + pkg_cv_SVG_LIBS="$SVG_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"librsvg-2.0 >= 2.14.0 cairo >= 1.0.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "librsvg-2.0 >= 2.14.0 @@ -28646,15 +29192,14 @@ if test -n "$SVG_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -28662,20 +29207,20 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SVG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "librsvg-2.0 >= 2.14.0 - cairo >= 1.0.0" 2>&1` + SVG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "librsvg-2.0 >= 2.14.0 + cairo >= 1.0.0"` else - SVG_PKG_ERRORS=`$PKG_CONFIG --print-errors "librsvg-2.0 >= 2.14.0 - cairo >= 1.0.0" 2>&1` + SVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "librsvg-2.0 >= 2.14.0 + cairo >= 1.0.0"` fi # Put the nasty error message in config.log where it belongs echo "$SVG_PKG_ERRORS" >&5 - have_svg="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_svg="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } have_svg="no" else @@ -28708,7 +29253,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "SVG dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "SVG dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SVG image loader will be built" >&5 @@ -28962,7 +29507,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "Tiff dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Tiff dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Tiff image loader will be built" >&5 @@ -29067,7 +29612,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "XPM dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "XPM dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether XPM image loader will be built" >&5 @@ -29172,7 +29717,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "BMP dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "BMP dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BMP image loader will be built" >&5 @@ -29277,7 +29822,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "TGA dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "TGA dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TGA image loader will be built" >&5 @@ -29382,7 +29927,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "WBMP dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "WBMP dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WBMP image loader will be built" >&5 @@ -29487,7 +30032,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "ICO dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "ICO dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ICO image loader will be built" >&5 @@ -29592,7 +30137,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "PSD dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "PSD dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PSD image loader will be built" >&5 @@ -29697,7 +30242,7 @@ fi fi if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then - as_fn_error $? "GENERIC dependencies not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "GENERIC dependencies not found (strict dependencies checking)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GENERIC image loader will be built" >&5 @@ -29780,7 +30325,8 @@ for ac_header in pthread.h sched.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" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -29846,7 +30392,7 @@ $as_echo "#define BUILD_PTHREAD 1" >>confdefs.h need_pthreads="yes" else if "x$use_strict" = "xyes"; then - as_fn_error $? "pthreads headers or functions not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "pthreads headers or functions not found (strict dependencies checking)" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: pthread headers or functions not found" >&5 $as_echo "no: pthread headers or functions not found" >&6; } @@ -29939,10 +30485,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEXT" >&5 $as_echo_n "checking for XEXT... " >&6; } -if test -n "$XEXT_CFLAGS"; then - pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XEXT_CFLAGS"; then + pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xext < 1.1.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xext < 1.1.1") 2>&5 ac_status=$? @@ -29952,13 +30499,15 @@ if test -n "$XEXT_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$XEXT_LIBS"; then - pkg_cv_XEXT_LIBS="$XEXT_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$XEXT_LIBS"; then + pkg_cv_XEXT_LIBS="$XEXT_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xext < 1.1.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xext < 1.1.1") 2>&5 ac_status=$? @@ -29968,15 +30517,14 @@ if test -n "$XEXT_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -29984,18 +30532,18 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xext < 1.1.1" 2>&1` + XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext < 1.1.1"` else - XEXT_PKG_ERRORS=`$PKG_CONFIG --print-errors "xext < 1.1.1" 2>&1` + XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext < 1.1.1"` fi # Put the nasty error message in config.log where it belongs echo "$XEXT_PKG_ERRORS" >&5 - build_avoid_libXext_bug=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + build_avoid_libXext_bug=no elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } build_avoid_libXext_bug=no else @@ -30201,12 +30749,25 @@ $as_echo_n "checking whether to build sse3 code... " >&6; } if test "${enable_cpu_sse3+set}" = set; then : enableval=$enable_cpu_sse3; if test "x$enableval" = "xyes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + ac_fn_c_check_header_mongrel "$LINENO" "immintrin.h" "ac_cv_header_immintrin_h" "$ac_includes_default" +if test "x$ac_cv_header_immintrin_h" = x""yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define BUILD_SSE3 1" >>confdefs.h - build_cpu_sse3="yes" + build_cpu_sse3="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + build_cpu_sse3="no" + +fi + + else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -30218,9 +30779,25 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $build_cpu_sse3" >&5 $as_echo "$build_cpu_sse3" >&6; } if test "x$build_cpu_sse3" = "xyes" ; then + ac_fn_c_check_header_mongrel "$LINENO" "immintrin.h" "ac_cv_header_immintrin_h" "$ac_includes_default" +if test "x$ac_cv_header_immintrin_h" = x""yes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } $as_echo "#define BUILD_SSE3 1" >>confdefs.h + build_cpu_sse3="yes" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + build_cpu_sse3="no" + +fi + + fi @@ -30309,7 +30886,7 @@ $as_echo "#define HAVE_ALTIVEC_H 1" >>confdefs.h else if test "x$build_cpu_altivec" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Altivec not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Altivec not found (strict dependencies checking)" "$LINENO" 5 fi build_cpu_altivec="no" @@ -31777,10 +32354,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND" >&5 $as_echo_n "checking for VALGRIND... " >&6; } -if test -n "$VALGRIND_CFLAGS"; then - pkg_cv_VALGRIND_CFLAGS="$VALGRIND_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$VALGRIND_CFLAGS"; then + pkg_cv_VALGRIND_CFLAGS="$VALGRIND_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind >= 2.4.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "valgrind >= 2.4.0") 2>&5 ac_status=$? @@ -31790,13 +32368,15 @@ if test -n "$VALGRIND_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$VALGRIND_LIBS"; then - pkg_cv_VALGRIND_LIBS="$VALGRIND_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$VALGRIND_LIBS"; then + pkg_cv_VALGRIND_LIBS="$VALGRIND_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"valgrind >= 2.4.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "valgrind >= 2.4.0") 2>&5 ac_status=$? @@ -31806,15 +32386,14 @@ if test -n "$VALGRIND_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -31822,25 +32401,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - VALGRIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "valgrind >= 2.4.0" 2>&1` + VALGRIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "valgrind >= 2.4.0"` else - VALGRIND_PKG_ERRORS=`$PKG_CONFIG --print-errors "valgrind >= 2.4.0" 2>&1` + VALGRIND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "valgrind >= 2.4.0"` fi # Put the nasty error message in config.log where it belongs echo "$VALGRIND_PKG_ERRORS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } if test "x$want_valgrind" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Valgrind not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Valgrind 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_valgrind" = "xyes" -a "x$use_strict" = "xyes" ; then - as_fn_error $? "Valgrind not found (strict dependencies checking)" "$LINENO" 5 + as_fn_error "Valgrind not found (strict dependencies checking)" "$LINENO" 5 fi @@ -31898,10 +32477,11 @@ pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECORE_EVAS" >&5 $as_echo_n "checking for ECORE_EVAS... " >&6; } -if test -n "$ECORE_EVAS_CFLAGS"; then - pkg_cv_ECORE_EVAS_CFLAGS="$ECORE_EVAS_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$ECORE_EVAS_CFLAGS"; then + pkg_cv_ECORE_EVAS_CFLAGS="$ECORE_EVAS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas ecore\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-evas ecore") 2>&5 ac_status=$? @@ -31911,13 +32491,15 @@ if test -n "$ECORE_EVAS_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$ECORE_EVAS_LIBS"; then - pkg_cv_ECORE_EVAS_LIBS="$ECORE_EVAS_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$ECORE_EVAS_LIBS"; then + pkg_cv_ECORE_EVAS_LIBS="$ECORE_EVAS_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ecore-evas ecore\""; } >&5 ($PKG_CONFIG --exists --print-errors "ecore-evas ecore") 2>&5 ac_status=$? @@ -31927,15 +32509,14 @@ if test -n "$ECORE_EVAS_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -31943,34 +32524,35 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ecore-evas ecore" 2>&1` + ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ecore-evas ecore"` else - ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --print-errors "ecore-evas ecore" 2>&1` + ECORE_EVAS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ecore-evas ecore"` fi # Put the nasty error message in config.log where it belongs echo "$ECORE_EVAS_PKG_ERRORS" >&5 - build_examples="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + build_examples="no" +elif test $pkg_failed = untried; then build_examples="no" else ECORE_EVAS_CFLAGS=$pkg_cv_ECORE_EVAS_CFLAGS ECORE_EVAS_LIBS=$pkg_cv_ECORE_EVAS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - + : fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EDJE" >&5 $as_echo_n "checking for EDJE... " >&6; } -if test -n "$EDJE_CFLAGS"; then - pkg_cv_EDJE_CFLAGS="$EDJE_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_CFLAGS"; then + pkg_cv_EDJE_CFLAGS="$EDJE_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"edje\""; } >&5 ($PKG_CONFIG --exists --print-errors "edje") 2>&5 ac_status=$? @@ -31980,13 +32562,15 @@ if test -n "$EDJE_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + fi +else + pkg_failed=untried fi -if test -n "$EDJE_LIBS"; then - pkg_cv_EDJE_LIBS="$EDJE_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ +if test -n "$PKG_CONFIG"; then + if test -n "$EDJE_LIBS"; then + pkg_cv_EDJE_LIBS="$EDJE_LIBS" + else + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"edje\""; } >&5 ($PKG_CONFIG --exists --print-errors "edje") 2>&5 ac_status=$? @@ -31996,15 +32580,14 @@ if test -n "$EDJE_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -32012,17 +32595,17 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EDJE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "edje" 2>&1` + EDJE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "edje"` else - EDJE_PKG_ERRORS=`$PKG_CONFIG --print-errors "edje" 2>&1` + EDJE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "edje"` fi # Put the nasty error message in config.log where it belongs echo "$EDJE_PKG_ERRORS" >&5 - build_examples="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + build_examples="no" +elif test $pkg_failed = untried; then build_examples="no" else EDJE_CFLAGS=$pkg_cv_EDJE_CFLAGS @@ -32081,10 +32664,11 @@ 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" && \ +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=$? @@ -32094,13 +32678,15 @@ if test -n "$CHECK_CFLAGS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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" && \ +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=$? @@ -32110,15 +32696,14 @@ if test -n "$CHECK_LIBS"; then else pkg_failed=yes fi - else - pkg_failed=untried + 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 @@ -32126,17 +32711,17 @@ 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` + CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "check >= 0.9.5"` else - CHECK_PKG_ERRORS=`$PKG_CONFIG --print-errors "check >= 0.9.5" 2>&1` + 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 - _efl_enable_tests="no" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&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 @@ -32289,7 +32874,7 @@ fi ##################################################################### ## Output -ac_config_files="$ac_config_files Makefile evas-directfb.pc evas-fb.pc evas-opengl-x11.pc evas-opengl-sdl.pc evas-opengl-cocoa.pc evas-software-buffer.pc evas-software-x11.pc evas-software-8-x11.pc evas-software-16-x11.pc evas-software-gdi.pc evas-software-ddraw.pc evas-software-16-ddraw.pc evas-direct3d.pc evas-software-16-wince.pc evas-software-sdl.pc evas-psl1ght.pc evas.pc doc/evas.dox doc/Makefile doc/Doxyfile src/Makefile src/bin/Makefile src/lib/Makefile src/lib/canvas/Makefile src/lib/file/Makefile src/lib/cache/Makefile src/lib/cserve/Makefile src/lib/engines/Makefile src/lib/engines/common/Makefile src/lib/engines/common/evas_op_add/Makefile src/lib/engines/common/evas_op_blend/Makefile src/lib/engines/common/evas_op_copy/Makefile src/lib/engines/common/evas_op_mask/Makefile src/lib/engines/common/evas_op_mul/Makefile src/lib/engines/common/evas_op_sub/Makefile src/lib/engines/common_8/Makefile src/lib/engines/common_16/Makefile src/modules/Makefile src/modules/engines/Makefile src/modules/engines/software_generic/Makefile src/modules/engines/software_gdi/Makefile src/modules/engines/software_ddraw/Makefile src/modules/engines/direct3d/Makefile src/modules/engines/software_16_wince/Makefile src/modules/engines/software_x11/Makefile src/modules/engines/fb/Makefile src/modules/engines/buffer/Makefile src/modules/engines/directfb/Makefile src/modules/engines/gl_common/Makefile src/modules/engines/gl_x11/Makefile src/modules/engines/gl_sdl/Makefile src/modules/engines/gl_cocoa/Makefile src/modules/engines/psl1ght/Makefile src/modules/engines/software_sdl/Makefile src/modules/engines/software_8/Makefile src/modules/engines/software_8_x11/Makefile src/modules/engines/software_16/Makefile src/modules/engines/software_16_x11/Makefile src/modules/engines/software_16_ddraw/Makefile src/modules/engines/software_16_sdl/Makefile src/modules/loaders/Makefile src/modules/loaders/edb/Makefile src/modules/loaders/eet/Makefile src/modules/loaders/gif/Makefile src/modules/loaders/jpeg/Makefile src/modules/loaders/png/Makefile src/modules/loaders/tiff/Makefile src/modules/loaders/xpm/Makefile src/modules/loaders/bmp/Makefile src/modules/loaders/ico/Makefile src/modules/loaders/tga/Makefile src/modules/loaders/svg/Makefile src/modules/loaders/pmaps/Makefile src/modules/loaders/wbmp/Makefile src/modules/loaders/psd/Makefile src/modules/loaders/generic/Makefile src/modules/savers/Makefile src/modules/savers/edb/Makefile src/modules/savers/eet/Makefile src/modules/savers/jpeg/Makefile src/modules/savers/png/Makefile src/modules/savers/tiff/Makefile src/static_deps/Makefile src/static_deps/liblinebreak/Makefile src/lib/include/Makefile src/examples/Makefile src/tests/Makefile evas.spec" +ac_config_files="$ac_config_files Makefile evas-directfb.pc evas-fb.pc evas-opengl-x11.pc evas-opengl-sdl.pc evas-opengl-cocoa.pc evas-software-buffer.pc evas-software-x11.pc evas-software-8-x11.pc evas-software-16-x11.pc evas-software-gdi.pc evas-software-ddraw.pc evas-software-16-ddraw.pc evas-direct3d.pc evas-software-16-wince.pc evas-software-sdl.pc evas-psl1ght.pc evas-wayland-shm.pc evas-wayland-egl.pc evas.pc doc/evas.dox doc/Makefile doc/Doxyfile src/Makefile src/bin/Makefile src/lib/Makefile src/lib/canvas/Makefile src/lib/file/Makefile src/lib/cache/Makefile src/lib/cserve/Makefile src/lib/engines/Makefile src/lib/engines/common/Makefile src/lib/engines/common/evas_op_add/Makefile src/lib/engines/common/evas_op_blend/Makefile src/lib/engines/common/evas_op_copy/Makefile src/lib/engines/common/evas_op_mask/Makefile src/lib/engines/common/evas_op_mul/Makefile src/lib/engines/common/evas_op_sub/Makefile src/lib/engines/common_8/Makefile src/lib/engines/common_16/Makefile src/modules/Makefile src/modules/engines/Makefile src/modules/engines/software_generic/Makefile src/modules/engines/software_gdi/Makefile src/modules/engines/software_ddraw/Makefile src/modules/engines/direct3d/Makefile src/modules/engines/software_16_wince/Makefile src/modules/engines/software_x11/Makefile src/modules/engines/fb/Makefile src/modules/engines/buffer/Makefile src/modules/engines/directfb/Makefile src/modules/engines/gl_common/Makefile src/modules/engines/gl_x11/Makefile src/modules/engines/gl_sdl/Makefile src/modules/engines/gl_cocoa/Makefile src/modules/engines/psl1ght/Makefile src/modules/engines/software_sdl/Makefile src/modules/engines/software_8/Makefile src/modules/engines/software_8_x11/Makefile src/modules/engines/software_16/Makefile src/modules/engines/software_16_x11/Makefile src/modules/engines/software_16_ddraw/Makefile src/modules/engines/software_16_sdl/Makefile src/modules/engines/wayland_shm/Makefile src/modules/engines/wayland_egl/Makefile src/modules/loaders/Makefile src/modules/loaders/edb/Makefile src/modules/loaders/eet/Makefile src/modules/loaders/gif/Makefile src/modules/loaders/jpeg/Makefile src/modules/loaders/png/Makefile src/modules/loaders/tiff/Makefile src/modules/loaders/xpm/Makefile src/modules/loaders/bmp/Makefile src/modules/loaders/ico/Makefile src/modules/loaders/tga/Makefile src/modules/loaders/svg/Makefile src/modules/loaders/pmaps/Makefile src/modules/loaders/wbmp/Makefile src/modules/loaders/psd/Makefile src/modules/loaders/generic/Makefile src/modules/savers/Makefile src/modules/savers/edb/Makefile src/modules/savers/eet/Makefile src/modules/savers/jpeg/Makefile src/modules/savers/png/Makefile src/modules/savers/tiff/Makefile src/static_deps/Makefile src/static_deps/liblinebreak/Makefile src/lib/include/Makefile src/examples/Makefile src/tests/Makefile evas.spec" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -32374,7 +32959,6 @@ 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$//' @@ -32398,424 +32982,440 @@ 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 "${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 "${EVAS_USE_LINEBREAK_TRUE}" && test -z "${EVAS_USE_LINEBREAK_FALSE}"; then - as_fn_error $? "conditional \"EVAS_USE_LINEBREAK\" was never defined. + as_fn_error "conditional \"EVAS_USE_LINEBREAK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_CSERVE_TRUE}" && test -z "${EVAS_CSERVE_FALSE}"; then - as_fn_error $? "conditional \"EVAS_CSERVE\" was never defined. + as_fn_error "conditional \"EVAS_CSERVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_BUFFER_TRUE}" && test -z "${BUILD_ENGINE_BUFFER_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_BUFFER\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_BUFFER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_BUFFER_TRUE}" && test -z "${EVAS_STATIC_BUILD_BUFFER_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_BUFFER\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_BUFFER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_GDI_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_GDI_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_GDI\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_GDI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_GDI\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_GDI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_DDRAW_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_DDRAW_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_DDRAW\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_DDRAW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_DDRAW\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_DDRAW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_DIRECT3D_TRUE}" && test -z "${BUILD_ENGINE_DIRECT3D_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_DIRECT3D\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_DIRECT3D\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_DIRECT3D_TRUE}" && test -z "${EVAS_STATIC_BUILD_DIRECT3D_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_DIRECT3D\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_DIRECT3D\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_SDL_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_SDL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_SDL\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_SDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_SDL_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_SDL_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_SDL\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_SDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_PSL1GHT_TRUE}" && test -z "${BUILD_ENGINE_PSL1GHT_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_PSL1GHT\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_PSL1GHT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_PSL1GHT_TRUE}" && test -z "${EVAS_STATIC_BUILD_PSL1GHT_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_PSL1GHT\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_PSL1GHT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_SDL_TRUE}" && test -z "${BUILD_ENGINE_GL_SDL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_SDL\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_SDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_SDL_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_SDL_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_SDL\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_SDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_COCOA_TRUE}" && test -z "${BUILD_ENGINE_GL_COCOA_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_COCOA\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_COCOA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_COCOA_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_COCOA_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_COCOA\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_COCOA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_FB_TRUE}" && test -z "${BUILD_ENGINE_FB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_FB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_FB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_FB_TRUE}" && test -z "${EVAS_STATIC_BUILD_FB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_FB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_FB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_DIRECTFB_TRUE}" && test -z "${BUILD_ENGINE_DIRECTFB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_DIRECTFB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_DIRECTFB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_DIRECTFB_TRUE}" && test -z "${EVAS_STATIC_BUILD_DIRECTFB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_DIRECTFB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_DIRECTFB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_8_X11_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_8_X11_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_8_X11\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_8_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_8_X11_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_8_X11\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_8_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_16_X11_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_16_X11_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_16_X11\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_16_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_X11_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_X11\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_16_DDRAW_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_16_DDRAW_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_16_DDRAW\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_16_DDRAW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_16_WINCE_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_16_WINCE\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_16_WINCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_WINCE\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_WINCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_16_SDL_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_16_SDL_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_16_SDL\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_16_SDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_SDL_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_SDL\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16_SDL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ENGINE_WAYLAND_SHM_TRUE}" && test -z "${BUILD_ENGINE_WAYLAND_SHM_FALSE}"; then + as_fn_error "conditional \"BUILD_ENGINE_WAYLAND_SHM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE}" && test -z "${EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE}"; then + as_fn_error "conditional \"EVAS_STATIC_BUILD_WAYLAND_SHM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_ENGINE_WAYLAND_EGL_TRUE}" && test -z "${BUILD_ENGINE_WAYLAND_EGL_FALSE}"; then + as_fn_error "conditional \"BUILD_ENGINE_WAYLAND_EGL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE}" && test -z "${EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE}"; then + as_fn_error "conditional \"EVAS_STATIC_BUILD_WAYLAND_EGL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_GENERIC_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_GENERIC\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_GENERIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_XCB_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_XCB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_XCB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_XCB_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_XCB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XCB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_XLIB_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_XLIB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_XLIB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_XLIB_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_XLIB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XLIB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_XLIB_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_XLIB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_XLIB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_XCB_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_XCB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_XCB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_X11_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_X11_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_X11\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_X11\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_XLIB_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_XLIB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XLIB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_XCB_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_XCB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XCB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_XCB_TRUE}" && test -z "${BUILD_ENGINE_GL_XCB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_XCB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_XCB_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_XCB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_XCB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_XLIB_TRUE}" && test -z "${BUILD_ENGINE_GL_XLIB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_XLIB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_XLIB_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_XLIB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_XLIB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_XLIB_TRUE}" && test -z "${BUILD_ENGINE_GL_XLIB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_XLIB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_XCB_TRUE}" && test -z "${BUILD_ENGINE_GL_XCB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_XCB\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_X11_TRUE}" && test -z "${BUILD_ENGINE_GL_X11_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_X11\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_X11_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_X11_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_X11\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_X11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_XLIB_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_XLIB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_XLIB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_XLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_XCB_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_XCB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_XCB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_XCB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_GL_COMMON_TRUE}" && test -z "${BUILD_ENGINE_GL_COMMON_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_GL_COMMON\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_GL_COMMON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GL_COMMON_TRUE}" && test -z "${EVAS_STATIC_BUILD_GL_COMMON_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GL_COMMON\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GL_COMMON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_16_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_16_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_16\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_16\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_16_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_16\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ENGINE_SOFTWARE_8_TRUE}" && test -z "${BUILD_ENGINE_SOFTWARE_8_FALSE}"; then - as_fn_error $? "conditional \"BUILD_ENGINE_SOFTWARE_8\" was never defined. + as_fn_error "conditional \"BUILD_ENGINE_SOFTWARE_8\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SOFTWARE_8_TRUE}" && test -z "${EVAS_STATIC_BUILD_SOFTWARE_8_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SOFTWARE_8\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SOFTWARE_8\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_EDB_TRUE}" && test -z "${BUILD_LOADER_EDB_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_EDB\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_EDB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_EDB_TRUE}" && test -z "${EVAS_STATIC_BUILD_EDB_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_EDB\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_EDB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_EET_TRUE}" && test -z "${BUILD_LOADER_EET_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_EET\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_EET\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_EET_TRUE}" && test -z "${EVAS_STATIC_BUILD_EET_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_EET\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_EET\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_GIF_TRUE}" && test -z "${BUILD_LOADER_GIF_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_GIF\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_GIF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GIF_TRUE}" && test -z "${EVAS_STATIC_BUILD_GIF_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GIF\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GIF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_JPEG_TRUE}" && test -z "${BUILD_LOADER_JPEG_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_JPEG\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_JPEG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_JPEG_TRUE}" && test -z "${EVAS_STATIC_BUILD_JPEG_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_JPEG\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_JPEG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_SAVER_JPEG_TRUE}" && test -z "${BUILD_SAVER_JPEG_FALSE}"; then - as_fn_error $? "conditional \"BUILD_SAVER_JPEG\" was never defined. + as_fn_error "conditional \"BUILD_SAVER_JPEG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_PMAPS_TRUE}" && test -z "${BUILD_LOADER_PMAPS_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_PMAPS\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_PMAPS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_PMAPS_TRUE}" && test -z "${EVAS_STATIC_BUILD_PMAPS_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_PMAPS\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_PMAPS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_PNG_TRUE}" && test -z "${BUILD_LOADER_PNG_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_PNG\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_PNG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_PNG_TRUE}" && test -z "${EVAS_STATIC_BUILD_PNG_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_PNG\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_PNG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_SVG_TRUE}" && test -z "${BUILD_LOADER_SVG_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_SVG\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_SVG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_SVG_TRUE}" && test -z "${EVAS_STATIC_BUILD_SVG_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_SVG\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_SVG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_TIFF_TRUE}" && test -z "${BUILD_LOADER_TIFF_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_TIFF\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_TIFF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_TIFF_TRUE}" && test -z "${EVAS_STATIC_BUILD_TIFF_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_TIFF\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_TIFF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_XPM_TRUE}" && test -z "${BUILD_LOADER_XPM_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_XPM\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_XPM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_XPM_TRUE}" && test -z "${EVAS_STATIC_BUILD_XPM_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_XPM\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_XPM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_BMP_TRUE}" && test -z "${BUILD_LOADER_BMP_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_BMP\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_BMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_BMP_TRUE}" && test -z "${EVAS_STATIC_BUILD_BMP_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_BMP\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_BMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_TGA_TRUE}" && test -z "${BUILD_LOADER_TGA_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_TGA\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_TGA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_TGA_TRUE}" && test -z "${EVAS_STATIC_BUILD_TGA_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_TGA\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_TGA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_WBMP_TRUE}" && test -z "${BUILD_LOADER_WBMP_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_WBMP\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_WBMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_WBMP_TRUE}" && test -z "${EVAS_STATIC_BUILD_WBMP_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_WBMP\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_WBMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_ICO_TRUE}" && test -z "${BUILD_LOADER_ICO_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_ICO\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_ICO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_ICO_TRUE}" && test -z "${EVAS_STATIC_BUILD_ICO_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_ICO\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_ICO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_PSD_TRUE}" && test -z "${BUILD_LOADER_PSD_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_PSD\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_PSD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_PSD_TRUE}" && test -z "${EVAS_STATIC_BUILD_PSD_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_PSD\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_PSD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_LOADER_GENERIC_TRUE}" && test -z "${BUILD_LOADER_GENERIC_FALSE}"; then - as_fn_error $? "conditional \"BUILD_LOADER_GENERIC\" was never defined. + as_fn_error "conditional \"BUILD_LOADER_GENERIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_STATIC_BUILD_GENERIC_TRUE}" && test -z "${EVAS_STATIC_BUILD_GENERIC_FALSE}"; then - as_fn_error $? "conditional \"EVAS_STATIC_BUILD_GENERIC\" was never defined. + as_fn_error "conditional \"EVAS_STATIC_BUILD_GENERIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EVAS_MAGIC_DEBUG_TRUE}" && test -z "${EVAS_MAGIC_DEBUG_FALSE}"; then - as_fn_error $? "conditional \"EVAS_MAGIC_DEBUG\" was never defined. + as_fn_error "conditional \"EVAS_MAGIC_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WORD_CACHE_TRUE}" && test -z "${WORD_CACHE_FALSE}"; then - as_fn_error $? "conditional \"WORD_CACHE\" was never defined. + as_fn_error "conditional \"WORD_CACHE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${METRIC_CACHE_TRUE}" && test -z "${METRIC_CACHE_FALSE}"; then - as_fn_error $? "conditional \"METRIC_CACHE\" was never defined. + as_fn_error "conditional \"METRIC_CACHE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_EXAMPLES_TRUE}" && test -z "${INSTALL_EXAMPLES_FALSE}"; then - as_fn_error $? "conditional \"INSTALL_EXAMPLES\" was never defined. + as_fn_error "conditional \"INSTALL_EXAMPLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EXAMPLES_TRUE}" && test -z "${BUILD_EXAMPLES_FALSE}"; then - as_fn_error $? "conditional \"BUILD_EXAMPLES\" was never defined. + as_fn_error "conditional \"BUILD_EXAMPLES\" 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 \"EFL_ENABLE_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${EFL_ENABLE_COVERAGE_TRUE}" && test -z "${EFL_ENABLE_COVERAGE_FALSE}"; then - as_fn_error $? "conditional \"EFL_ENABLE_COVERAGE\" was never defined. + as_fn_error "conditional \"EFL_ENABLE_COVERAGE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -32965,19 +33565,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error 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=$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 + 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 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -33173,7 +33773,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 @@ -33226,8 +33826,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 evas $as_me 1.1.0, which was -generated by GNU Autoconf 2.67. Invocation command line was +This file was extended by evas $as_me 1.1.99.67344, which was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -33292,11 +33892,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="\\ -evas config.status 1.1.0 -configured by $0, generated by GNU Autoconf 2.67, +evas config.status 1.1.99.67344 +configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -33314,16 +33914,11 @@ 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 @@ -33345,7 +33940,6 @@ 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;; @@ -33358,7 +33952,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 ;; @@ -33367,7 +33961,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" @@ -33793,6 +34387,8 @@ do "evas-software-16-wince.pc") CONFIG_FILES="$CONFIG_FILES evas-software-16-wince.pc" ;; "evas-software-sdl.pc") CONFIG_FILES="$CONFIG_FILES evas-software-sdl.pc" ;; "evas-psl1ght.pc") CONFIG_FILES="$CONFIG_FILES evas-psl1ght.pc" ;; + "evas-wayland-shm.pc") CONFIG_FILES="$CONFIG_FILES evas-wayland-shm.pc" ;; + "evas-wayland-egl.pc") CONFIG_FILES="$CONFIG_FILES evas-wayland-egl.pc" ;; "evas.pc") CONFIG_FILES="$CONFIG_FILES evas.pc" ;; "doc/evas.dox") CONFIG_FILES="$CONFIG_FILES doc/evas.dox" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; @@ -33837,6 +34433,8 @@ do "src/modules/engines/software_16_x11/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/engines/software_16_x11/Makefile" ;; "src/modules/engines/software_16_ddraw/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/engines/software_16_ddraw/Makefile" ;; "src/modules/engines/software_16_sdl/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/engines/software_16_sdl/Makefile" ;; + "src/modules/engines/wayland_shm/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/engines/wayland_shm/Makefile" ;; + "src/modules/engines/wayland_egl/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/engines/wayland_egl/Makefile" ;; "src/modules/loaders/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/loaders/Makefile" ;; "src/modules/loaders/edb/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/loaders/edb/Makefile" ;; "src/modules/loaders/eet/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/loaders/eet/Makefile" ;; @@ -33866,7 +34464,7 @@ do "src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;; "evas.spec") CONFIG_FILES="$CONFIG_FILES evas.spec" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -33904,7 +34502,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. @@ -33921,7 +34519,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 @@ -33935,18 +34533,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 @@ -34035,28 +34633,20 @@ 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 sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ 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[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// s/^[^=]*=[ ]*$// }' fi @@ -34084,7 +34674,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 @@ -34169,7 +34759,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" @@ -34182,7 +34772,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 @@ -34210,7 +34800,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error "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'" @@ -34237,7 +34827,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 @@ -34374,22 +34964,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) # @@ -34400,19 +34990,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" @@ -35370,7 +35960,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. @@ -35391,7 +35981,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 1 + $ac_cs_success || as_fn_exit $? 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 @@ -35465,6 +36055,8 @@ echo " Software 16bit X11.........: $have_evas_engine_software_16_x11" echo " Software 16bit Directdraw..: $have_evas_engine_software_16_ddraw" echo " Software 16bit WinCE.......: $have_evas_engine_software_16_wince" echo " Software 16bit SDL.........: $have_evas_engine_software_16_sdl (primitive: $sdl_primitive)" +echo " Wayland Shm................: $have_evas_engine_wayland_shm" +echo " Wayland Egl................: $have_evas_engine_wayland_egl" echo echo "Image Loaders:" echo " BMP.....................: $have_evas_image_loader_bmp" @@ -35517,6 +36109,16 @@ echo echo " Word Cache..............: $want_word_cache" echo " Metric Cache............: $want_metric_cache" echo +echo " Pixman..................: $have_pixman" +echo " Pixman Fonts............: $have_pixman_font" +echo " Pixman Rects............: $have_pixman_rect" +echo " Pixman Lines............: $have_pixman_line" +echo " Pixman Polygons.........: $have_pixman_poly" +echo " Pixman Images...........: $have_pixman_image" +echo " Pixman Image ScaleSample: $have_pixman_image_scale_sample" +echo +echo " Tiled 32BPP rotate......: $have_tile_rotate" +echo echo "ARGB Software Engine Options:" echo " Sampling Scaler.........: $scaler_sample" echo " Smooth Scaler...........: $scaler_smooth" diff --git a/libraries/evas/configure.ac b/libraries/evas/configure.ac index 0b56053..5424e31 100644 --- a/libraries/evas/configure.ac +++ b/libraries/evas/configure.ac @@ -2,11 +2,11 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [1]) -m4_define([v_mic], [0]) -m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n'])) +m4_define([v_mic], [99]) +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'])) 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 -m4_undefine([v_rev]) +dnl 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]) @@ -112,6 +112,8 @@ want_evas_engine_direct3d="no" want_evas_engine_fb="no" want_evas_engine_directfb="no" want_evas_engine_psl1ght="no" +want_evas_engine_wayland_shm="no" +want_evas_engine_wayland_egl="no" want_evas_image_loader_edb="yes" want_evas_image_loader_eet="yes" @@ -158,6 +160,8 @@ case "$host_os" in want_evas_engine_software_xcb="no" want_evas_engine_gl_xcb="no" want_evas_engine_fb="auto" + want_evas_engine_wayland_shm="auto" + want_evas_engine_wayland_egl="auto" ### no - not ready/usable/complete # want_evas_engine_software_8_x11="auto" # want_evas_engine_software_16_x11="auto" @@ -403,8 +407,8 @@ fi # Pixman have_pixman="no" AC_ARG_ENABLE([pixman], - AC_HELP_STRING([--disable-pixman], - [disable pixman for software rendering. @<:@default=enabled@:>@]), + AC_HELP_STRING([--enable-pixman], + [enable pixman for software rendering. @<:@default=enabled@:>@]), [ if test "x${enableval}" = "xyes" ; then want_pixman="yes" @@ -429,12 +433,74 @@ if test "x${want_pixman}" = "xyes" -o "x${want_pixman}" = "xauto" ; then ]) fi +have_pixman_font="no" +AC_ARG_ENABLE(pixman-font, + AC_HELP_STRING([--enable-pixman-font], [Allow pixman to render fonts]), + [ + have_pixman_font="yes" + AC_DEFINE(PIXMAN_FONT, 1, [Allow pixman to render fonts]) + ] +) + +have_pixman_rect="no" +AC_ARG_ENABLE(pixman-rect, + AC_HELP_STRING([--enable-pixman-rect], [Allow pixman to render rects]), + [ + have_pixman_rect="yes" + AC_DEFINE(PIXMAN_RECT, 1, [Allow pixman to render rects]) + ] +) + +have_pixman_line="no" +AC_ARG_ENABLE(pixman-line, + AC_HELP_STRING([--enable-pixman-line], [Allow pixman to render lines]), + [ + have_pixman_line="yes" + AC_DEFINE(PIXMAN_LINE, 1, [Allow pixman to render lines]) + ] +) + +have_pixman_poly="no" +AC_ARG_ENABLE(pixman-poly, + AC_HELP_STRING([--enable-pixman-poly], [Allow pixman to render polys]), + [ + have_pixman_poly="yes" + AC_DEFINE(PIXMAN_POLY, 1, [Allow pixman to render polys]) + ] +) + +have_pixman_image="no" +AC_ARG_ENABLE(pixman-image, + AC_HELP_STRING([--enable-pixman-image], [Allow pixman to render images]), + [ + have_pixman_image="yes" + AC_DEFINE(PIXMAN_IMAGE, 1, [Allow pixman to render images]) + ] +) + +have_pixman_image_scale_sample="no" +AC_ARG_ENABLE(pixman-image-scale-sample, + AC_HELP_STRING([--enable-pixman-image-scale-sample], [Allow pixman to render sampled scaled images]), + [ + have_pixman_image_scale_sample="yes" + AC_DEFINE(PIXMAN_IMAGE_SCALE_SAMPLE, 1, [Allow pixman to render image sampled scaling]) + ] +) + +have_tile_rotate="no" +AC_ARG_ENABLE(tile-rotate, + AC_HELP_STRING([--enable-tile-rotate], [Enable tiled rotate algorithm]), + [ + have_tile_rotate="yes" + AC_DEFINE(TILE_ROTATE, 1, [Enable tiled rotate algorithm]) + ] +) + ### Checks for header files AC_HEADER_STDC -AC_CHECK_HEADERS([unistd.h stdint.h sys/param.h netinet/in.h]) +AC_CHECK_HEADERS([unistd.h stdint.h sys/param.h netinet/in.h sys/mman.h]) EFL_CHECK_PATH_MAX - ### Checks for types AC_CHECK_TYPES([struct sigaction], [], [], [[#include ]]) @@ -704,6 +770,10 @@ EVAS_CHECK_ENGINE([software-16-wince], [${want_evas_engine_software_16_wince}], EVAS_CHECK_ENGINE([software-16-sdl], [${want_evas_engine_software_16_sdl}], [no], [Software SDL 16 bits]) +EVAS_CHECK_ENGINE([wayland-shm], [${want_evas_engine_wayland_shm}], [no], [Wayland Shm]) + +EVAS_CHECK_ENGINE([wayland-egl], [${want_evas_engine_wayland_egl}], [no], [Wayland Egl]) + # SDL primitive sdl_primitive="no" @@ -856,13 +926,15 @@ have_static_evas_engine_gl_common="no" if test "x$have_evas_engine_gl_xlib" = "xyes" \ || test "x$have_evas_engine_gl_xcb" = "xyes" \ || test "x$have_evas_engine_gl_sdl" = "xyes" \ - || test "x$have_evas_engine_gl_cocoa" = "xyes"; then + || test "x$have_evas_engine_gl_cocoa" = "xyes" \ + || test "x$have_evas_engine_wayland_egl" = "xyes"; then have_evas_engine_gl_common="yes" fi if test "x$have_evas_engine_gl_xlib" = "xstatic" \ || test "x$have_evas_engine_gl_xcb" = "xstatic" \ || test "x$have_evas_engine_gl_sdl" = "xstatic" \ - || test "x$have_evas_engine_gl_cocoa" = "xstatic"; then + || test "x$have_evas_engine_gl_cocoa" = "xstatic" \ + || test "x$have_evas_engine_wayland_egl" = "xstatic"; then have_evas_engine_gl_common="yes" have_static_evas_engine_gl_common="yes" fi @@ -1272,9 +1344,16 @@ AC_ARG_ENABLE(cpu-sse3, AS_HELP_STRING([--enable-cpu-sse3], [enable sse3 code]), [ if test "x$enableval" = "xyes" ; then - AC_MSG_RESULT(yes) - AC_DEFINE(BUILD_SSE3, 1, [Build SSE3 Code]) - build_cpu_sse3="yes" + AC_CHECK_HEADER(immintrin.h, + [ + AC_MSG_RESULT(yes) + AC_DEFINE(BUILD_SSE3, 1, [Build SSE3 Code]) + build_cpu_sse3="yes" + ], + [ + AC_MSG_RESULT(no) + build_cpu_sse3="no" + ]) else AC_MSG_RESULT(no) build_cpu_sse3="no" @@ -1283,7 +1362,16 @@ AC_ARG_ENABLE(cpu-sse3, [ AC_MSG_RESULT($build_cpu_sse3) if test "x$build_cpu_sse3" = "xyes" ; then - AC_DEFINE(BUILD_SSE3, 1, [Build SSE3 Code]) + AC_CHECK_HEADER(immintrin.h, + [ + AC_MSG_RESULT(yes) + AC_DEFINE(BUILD_SSE3, 1, [Build SSE3 Code]) + build_cpu_sse3="yes" + ], + [ + AC_MSG_RESULT(no) + build_cpu_sse3="no" + ]) fi ] ) @@ -1805,6 +1893,8 @@ evas-direct3d.pc evas-software-16-wince.pc evas-software-sdl.pc evas-psl1ght.pc +evas-wayland-shm.pc +evas-wayland-egl.pc evas.pc doc/evas.dox doc/Makefile @@ -1849,6 +1939,8 @@ src/modules/engines/software_16/Makefile src/modules/engines/software_16_x11/Makefile src/modules/engines/software_16_ddraw/Makefile src/modules/engines/software_16_sdl/Makefile +src/modules/engines/wayland_shm/Makefile +src/modules/engines/wayland_egl/Makefile src/modules/loaders/Makefile src/modules/loaders/edb/Makefile src/modules/loaders/eet/Makefile @@ -1945,6 +2037,8 @@ echo " Software 16bit X11.........: $have_evas_engine_software_16_x11" echo " Software 16bit Directdraw..: $have_evas_engine_software_16_ddraw" echo " Software 16bit WinCE.......: $have_evas_engine_software_16_wince" echo " Software 16bit SDL.........: $have_evas_engine_software_16_sdl (primitive: $sdl_primitive)" +echo " Wayland Shm................: $have_evas_engine_wayland_shm" +echo " Wayland Egl................: $have_evas_engine_wayland_egl" echo echo "Image Loaders:" echo " BMP.....................: $have_evas_image_loader_bmp" @@ -2002,6 +2096,16 @@ echo echo " Word Cache..............: $want_word_cache" echo " Metric Cache............: $want_metric_cache" echo +echo " Pixman..................: $have_pixman" +echo " Pixman Fonts............: $have_pixman_font" +echo " Pixman Rects............: $have_pixman_rect" +echo " Pixman Lines............: $have_pixman_line" +echo " Pixman Polygons.........: $have_pixman_poly" +echo " Pixman Images...........: $have_pixman_image" +echo " Pixman Image ScaleSample: $have_pixman_image_scale_sample" +echo +echo " Tiled 32BPP rotate......: $have_tile_rotate" +echo echo "ARGB Software Engine Options:" echo " Sampling Scaler.........: $scaler_sample" echo " Smooth Scaler...........: $scaler_smooth" diff --git a/libraries/evas/doc/Makefile.in b/libraries/evas/doc/Makefile.in index e9a343d..20f2693 100644 --- a/libraries/evas/doc/Makefile.in +++ b/libraries/evas/doc/Makefile.in @@ -167,8 +167,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -185,6 +183,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -266,6 +266,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/doc/img/e_big.png b/libraries/evas/doc/img/e_big.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/foot_bg.png b/libraries/evas/doc/img/foot_bg.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/head_bg.png b/libraries/evas/doc/img/head_bg.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/menu_bg.png b/libraries/evas/doc/img/menu_bg.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/menu_bg_current.png b/libraries/evas/doc/img/menu_bg_current.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/menu_bg_hover.png b/libraries/evas/doc/img/menu_bg_hover.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/menu_bg_last.png b/libraries/evas/doc/img/menu_bg_last.png old mode 100644 new mode 100755 diff --git a/libraries/evas/doc/img/menu_bg_unsel.png b/libraries/evas/doc/img/menu_bg_unsel.png old mode 100644 new mode 100755 diff --git a/libraries/evas/evas-wayland-egl.pc.in b/libraries/evas/evas-wayland-egl.pc.in new file mode 100644 index 0000000..a770c42 --- /dev/null +++ b/libraries/evas/evas-wayland-egl.pc.in @@ -0,0 +1,3 @@ +Name: evas-wayland-egl +Description: Evas Wayland Egl engine +Version: @VERSION@ diff --git a/libraries/evas/evas-wayland-shm.pc.in b/libraries/evas/evas-wayland-shm.pc.in new file mode 100644 index 0000000..5576681 --- /dev/null +++ b/libraries/evas/evas-wayland-shm.pc.in @@ -0,0 +1,3 @@ +Name: evas-wayland-shm +Description: Evas Wayland Shm engine +Version: @VERSION@ diff --git a/libraries/evas/evas.spec b/libraries/evas/evas.spec index f3ebad3..fe04f2e 100644 --- a/libraries/evas/evas.spec +++ b/libraries/evas/evas.spec @@ -85,7 +85,7 @@ Summary: Multi-platform Canvas Library Name: evas -Version: 1.1.0 +Version: 1.1.99.67344 Release: %{_rel} License: BSD Group: System Environment/Libraries diff --git a/libraries/evas/ltmain.sh b/libraries/evas/ltmain.sh index fa4b1e1..7ed280b 100755 --- a/libraries/evas/ltmain.sh +++ b/libraries/evas/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-2ubuntu3 +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,7 +73,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2ubuntu3" +VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" TIMESTAMP="" package_revision=1.3017 diff --git a/libraries/evas/m4/evas_check_engine.m4 b/libraries/evas/m4/evas_check_engine.m4 index 5294100..4fc13a9 100644 --- a/libraries/evas/m4/evas_check_engine.m4 +++ b/libraries/evas/m4/evas_check_engine.m4 @@ -873,6 +873,79 @@ fi ]) + +dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) + +AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_SHM], +[ + +have_dep="yes" +evas_engine_[]$1[]_cflags="" +evas_engine_[]$1[]_libs="" + +AC_SUBST([evas_engine_$1_cflags]) +AC_SUBST([evas_engine_$1_libs]) + +if test "x${have_dep}" = "xyes" ; then + m4_default([$4], [:]) +else + m4_default([$5], [:]) +fi + +]) + + +dnl use: EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL(engine, simple, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) + +AC_DEFUN([EVAS_CHECK_ENGINE_DEP_WAYLAND_EGL], +[ + +requirement="" +have_dep="no" +evas_engine_[]$1[]_cflags="" +evas_engine_[]$1[]_libs="" + +PKG_CHECK_MODULES([WAYLAND_EGL], + [egl >= 7.10 glesv2 gl wayland-client wayland-egl], + [ + have_dep="yes" + requirement="egl >= 7.10 glesv2 gl wayland-client wayland-egl" + evas_engine_[]$1[]_cflags="${WAYLAND_EGL_CFLAGS}" + evas_engine_[]$1[]_libs="${WAYLAND_EGL_LIBS}" + ],[ + have_dep="no" + ] +) + +if test "x${have_dep}" = "xyes" ; then + PKG_CHECK_MODULES([GL_EET], [eet >= 1.5.0], [have_dep="yes"], [have_dep="no"]) + AC_CHECK_HEADER([GLES2/gl2.h], + [have_egl="yes"], + [have_egl="no"], + [ + ]) + if test "x${have_egl}" = "xyes" ; then + evas_engine_[]$1[]_cflags="${WAYLAND_EGL_CFLAGS}" + evas_engine_[]$1[]_libs="${WAYLAND_EGL_LIBS} -lGL -lGLESv2 -lEGL" + fi +fi + +AC_SUBST([evas_engine_$1_cflags]) +AC_SUBST([evas_engine_$1_libs]) + +if test "x$3" = "xstatic" ; then + requirement_evas="${requirement} ${requirement_evas}" +fi + +if test "x${have_dep}" = "xyes" ; then + m4_default([$4], [:]) +else + m4_default([$5], [:]) +fi + +]) + + dnl use: EVAS_CHECK_ENGINE(engine, want_engine, simple, description) diff --git a/libraries/evas/sha1-for-source.txt b/libraries/evas/sha1-for-source.txt deleted file mode 100644 index 36d8a4c..0000000 --- a/libraries/evas/sha1-for-source.txt +++ /dev/null @@ -1 +0,0 @@ -c4cc1315c6fe6096e822f8dbf2c099a541b07962 diff --git a/libraries/evas/src/Makefile.in b/libraries/evas/src/Makefile.in index 9b729e1..68cdb12 100644 --- a/libraries/evas/src/Makefile.in +++ b/libraries/evas/src/Makefile.in @@ -206,8 +206,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -224,6 +222,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -305,6 +305,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/bin/Makefile.in b/libraries/evas/src/bin/Makefile.in index 885bfc4..136b34c 100644 --- a/libraries/evas/src/bin/Makefile.in +++ b/libraries/evas/src/bin/Makefile.in @@ -212,8 +212,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -230,6 +228,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -311,6 +311,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/examples/Makefile.am b/libraries/evas/src/examples/Makefile.am index f748c12..ffa9274 100644 --- a/libraries/evas/src/examples/Makefile.am +++ b/libraries/evas/src/examples/Makefile.am @@ -1,6 +1,6 @@ MAINTAINERCLEANFILES = Makefile.in -pkglibdir = $(datadir)/$(PACKAGE)/examples +examplesdir = $(datadir)/$(PACKAGE)/examples #put here all EDCs one needs to the tests EDCS = aspect.edc @@ -28,68 +28,68 @@ AM_CPPFLAGS = \ AM_CFLAGS = @WIN32_CFLAGS@ -pkglib_PROGRAMS = +examples_PROGRAMS = if BUILD_ENGINE_BUFFER AM_CPPFLAGS += -I$(top_srcdir)/src/modules/engines/buffer -pkglib_PROGRAMS += evas_buffer_simple +examples_PROGRAMS += evas_buffer_simple evas_buffer_simple_SOURCES = evas-buffer-simple.c evas_buffer_simple_LDADD = $(top_builddir)/src/lib/libevas.la endif -pkglib_PROGRAMS += evas_init_shutdown +examples_PROGRAMS += evas_init_shutdown evas_init_shutdown_SOURCES = evas-init-shutdown.c evas_init_shutdown_LDADD = $(top_builddir)/src/lib/libevas.la #the ones using ecore_evas follow AM_CPPFLAGS += @ECORE_EVAS_CFLAGS@ -pkglib_PROGRAMS += evas_images +examples_PROGRAMS += evas_images evas_images_SOURCES = evas-images.c evas_images_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_events +examples_PROGRAMS += evas_events evas_events_SOURCES = evas-events.c evas_events_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_object_manipulation +examples_PROGRAMS += evas_object_manipulation evas_object_manipulation_SOURCES = evas-object-manipulation.c evas_object_manipulation_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_hints +examples_PROGRAMS += evas_hints evas_hints_SOURCES = evas-hints.c evas_hints_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_stacking +examples_PROGRAMS += evas_stacking evas_stacking_SOURCES = evas-stacking.c evas_stacking_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_images2 +examples_PROGRAMS += evas_images2 evas_images2_SOURCES = evas-images2.c evas_images2_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_text +examples_PROGRAMS += evas_text evas_text_SOURCES = evas-text.c evas_text_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_smart_object +examples_PROGRAMS += evas_smart_object evas_smart_object_SOURCES = evas-smart-object.c evas_smart_object_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ -pkglib_PROGRAMS += evas_box +examples_PROGRAMS += evas_box evas_box_SOURCES = evas-box.c evas_box_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ @EINA_LIBS@ #the ones using ecore_evas and edje follow AM_CPPFLAGS += @EDJE_CFLAGS@ -pkglib_PROGRAMS += evas_aspect_hints +examples_PROGRAMS += evas_aspect_hints evas_aspect_hints_DEPS = $(srcdir)/aspect.edc evas_aspect_hints_SOURCES = evas-aspect-hints.c evas_aspect_hints_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ @EDJE_LIBS@ -pkglib_PROGRAMS += evas_map_utils +examples_PROGRAMS += evas_map_utils evas_map_utils_SOURCES = evas-map-utils.c evas_map_utils_LDADD = $(top_builddir)/src/lib/libevas.la @ECORE_EVAS_LIBS@ diff --git a/libraries/evas/src/examples/Makefile.in b/libraries/evas/src/examples/Makefile.in index 5332650..f58d297 100644 --- a/libraries/evas/src/examples/Makefile.in +++ b/libraries/evas/src/examples/Makefile.in @@ -19,6 +19,7 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 @@ -34,7 +35,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@BUILD_EXAMPLES_TRUE@pkglib_PROGRAMS = $(am__EXEEXT_1) \ +@BUILD_EXAMPLES_TRUE@examples_PROGRAMS = $(am__EXEEXT_1) \ @BUILD_EXAMPLES_TRUE@ evas_init_shutdown$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ evas_images$(EXEEXT) evas_events$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ evas_object_manipulation$(EXEEXT) \ @@ -89,8 +90,8 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @BUILD_ENGINE_BUFFER_TRUE@@BUILD_EXAMPLES_TRUE@am__EXEEXT_1 = evas_buffer_simple$(EXEEXT) -am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)" -PROGRAMS = $(pkglib_PROGRAMS) +am__installdirs = "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)" +PROGRAMS = $(examples_PROGRAMS) am__evas_aspect_hints_SOURCES_DIST = evas-aspect-hints.c @BUILD_EXAMPLES_TRUE@am_evas_aspect_hints_OBJECTS = \ @BUILD_EXAMPLES_TRUE@ evas-aspect-hints.$(OBJEXT) @@ -236,7 +237,6 @@ DATA = $(files_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -pkglibdir = $(datadir)/$(PACKAGE)/examples ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ @@ -339,8 +339,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -357,6 +355,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -438,6 +438,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ @@ -513,6 +517,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in +examplesdir = $(datadir)/$(PACKAGE)/examples #put here all EDCs one needs to the tests EDCS = aspect.edc @@ -616,10 +621,10 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-pkglibPROGRAMS: $(pkglib_PROGRAMS) +install-examplesPROGRAMS: $(examples_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" - @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" + @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -636,23 +641,23 @@ install-pkglibPROGRAMS: $(pkglib_PROGRAMS) while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(examplesdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(examplesdir)$$dir" || exit $$?; \ } \ ; done -uninstall-pkglibPROGRAMS: +uninstall-examplesPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(pkglib_PROGRAMS)'; test -n "$(pkglibdir)" || list=; \ + @list='$(examples_PROGRAMS)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files + echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(examplesdir)" && rm -f $$files -clean-pkglibPROGRAMS: - @list='$(pkglib_PROGRAMS)'; test -n "$$list" || exit 0; \ +clean-examplesPROGRAMS: + @list='$(examples_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ @@ -855,7 +860,7 @@ check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(filesdir)"; do \ + for dir in "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(filesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -886,7 +891,7 @@ maintainer-clean-generic: -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am -clean-am: clean-generic clean-libtool clean-pkglibPROGRAMS \ +clean-am: clean-examplesPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am @@ -907,13 +912,13 @@ info: info-am info-am: -install-data-am: install-filesDATA +install-data-am: install-examplesPROGRAMS install-filesDATA install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-pkglibPROGRAMS +install-exec-am: install-html: install-html-am @@ -953,24 +958,25 @@ ps: ps-am ps-am: -uninstall-am: uninstall-filesDATA uninstall-pkglibPROGRAMS +uninstall-am: uninstall-examplesPROGRAMS uninstall-filesDATA .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkglibPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-filesDATA \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-pkglibPROGRAMS \ +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-examplesPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am \ + install-examplesPROGRAMS install-exec install-exec-am \ + install-filesDATA install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-filesDATA \ - uninstall-pkglibPROGRAMS + tags uninstall uninstall-am uninstall-examplesPROGRAMS \ + uninstall-filesDATA @BUILD_EXAMPLES_TRUE@aspect.edj: ${evas_aspect_hints_DEPS} diff --git a/libraries/evas/src/lib/Evas.h b/libraries/evas/src/lib/Evas.h index 5898290..b85bbeb 100644 --- a/libraries/evas/src/lib/Evas.h +++ b/libraries/evas/src/lib/Evas.h @@ -5,6 +5,7 @@ @date 2000-2011 Please see the @ref authors page for contact details. + @link Evas.h Evas API @endlink @section toc Table of Contents @@ -342,7 +343,7 @@ extern "C" { #endif #define EVAS_VERSION_MAJOR 1 -#define EVAS_VERSION_MINOR 0 +#define EVAS_VERSION_MINOR 2 typedef struct _Evas_Version { @@ -432,6 +433,9 @@ typedef enum _Evas_Callback_Type */ EVAS_CALLBACK_IMAGE_UNLOADED, /**< Image data has been unloaded (by some mechanims in Evas that throw out original image data) */ + EVAS_CALLBACK_RENDER_PRE, /**< Called just before rendering starts on the canvas target @since 1.2 */ + EVAS_CALLBACK_RENDER_POST, /**< Called just after rendering stops on the canvas target @since 1.2 */ + EVAS_CALLBACK_LAST /**< kept as last element/sentinel -- not really an event */ } Evas_Callback_Type; /**< The types of events triggering a callback */ @@ -1061,7 +1065,8 @@ struct _Evas_Event_Hold /** Hold change event */ typedef enum _Evas_Object_Pointer_Mode { EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */ - EVAS_OBJECT_POINTER_MODE_NOGRAB /**< pointer always bound to the object right below it */ + EVAS_OBJECT_POINTER_MODE_NOGRAB, /**< pointer always bound to the object right below it */ + EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN /**< useful on object with "repeat events" enabled, where mouse/touch up and down events WONT be repeated to objects and these objects wont be auto-grabbed. @since 1.2 */ } Evas_Object_Pointer_Mode; /**< How the mouse pointer should be handled by Evas. */ typedef void (*Evas_Smart_Cb) (void *data, Evas_Object *obj, void *event_info); /**< Evas smart objects' "smart callback" function signature */ @@ -1220,7 +1225,7 @@ EAPI Evas_Alloc_Error evas_alloc_error (void); * * @ingroup Evas_Group */ -EAPI int evas_async_events_fd_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE; +EAPI int evas_async_events_fd_get (void) EINA_WARN_UNUSED_RESULT; /** * @brief Trigger the processing of all events waiting on the file @@ -1339,7 +1344,7 @@ EAPI void evas_focus_out (Evas *e); * @param e The evas to query information. * @ingroup Evas_Canvas */ -EAPI Eina_Bool evas_focus_state_get (const Evas *e) EINA_PURE; +EAPI Eina_Bool evas_focus_state_get (const Evas *e); /** * Push the nochange flag up 1 @@ -1380,7 +1385,7 @@ EAPI void evas_data_attach_set (Evas *e, void *data) E * @return The pointer attached * @ingroup Evas_Canvas */ -EAPI void *evas_data_attach_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI void *evas_data_attach_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -1747,7 +1752,7 @@ EAPI void evas_output_method_set (Evas *e, int render_me * returned if there is an error. * @ingroup Evas_Output_Method */ -EAPI int evas_output_method_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_output_method_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -1764,7 +1769,7 @@ EAPI int evas_output_method_get (const Evas *e) EINA_WA * an engine has not yet been assigned. * @ingroup Evas_Output_Method */ -EAPI Evas_Engine_Info *evas_engine_info_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Engine_Info *evas_engine_info_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Applies the engine settings for the given evas from the given @c @@ -1876,6 +1881,38 @@ EAPI void evas_output_viewport_set (Evas *e, Evas_Coord x, EAPI void evas_output_viewport_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); /** + * Sets the output framespace size of the render engine of the given evas. + * + * The framespace size is used in the Wayland engines to denote space where + * the output is not drawn. This is mainly used in ecore_evas to draw borders + * + * The units used for @p w and @p h depend on the engine used by the + * evas. + * + * @param e The given evas. + * @param x The left coordinate in output units, usually pixels. + * @param y The top coordinate in output units, usually pixels. + * @param w The width in output units, usually pixels. + * @param h The height in output units, usually pixels. + * @ingroup Evas_Output_Size + * @since 1.1.0 + */ +EAPI void evas_output_framespace_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); + +/** + * Get the render engine's output framespace co-ordinates in canvas units. + * + * @param e The pointer to the Evas Canvas + * @param x The pointer to a x variable to be filled in + * @param y The pointer to a y variable to be filled in + * @param w The pointer to a width variable to be filled in + * @param h The pointer to a height variable to be filled in + * @ingroup Evas_Output_Size + * @since 1.1.0 + */ +EAPI void evas_output_framespace_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); + +/** * @defgroup Evas_Coord_Mapping_Group Coordinate Mapping Functions * * Functions that are used to map coordinates from the canvas to the @@ -2342,6 +2379,33 @@ EAPI void evas_post_event_callback_remove_full (Evas *e, Evas_Objec */ /** + * Set the default set of flags an event begins with + * + * @param e The canvas to set the default event flags of + * @param flags The default flags to use + * + * Events in evas can have an event_flags member. This starts out with + * and initial value (no flags). this lets you set the default flags that + * an event begins with to be @p flags + * + * @since 1.2 + */ +EAPI void evas_event_default_flags_set (Evas *e, Evas_Event_Flags flags) EINA_ARG_NONNULL(1); + +/** + * Get the defaulty set of flags an event begins with + * + * @param e The canvas to get the default event flags from + * @return The default event flags for that canvas + * + * This gets the default event flags events are produced with when fed in. + * + * @see evas_event_default_flags_set() + * @since 1.2 + */ +EAPI Evas_Event_Flags evas_event_default_flags_get (const Evas *e) EINA_ARG_NONNULL(1); + +/** * Freeze all input events processing. * * @param e The canvas to freeze input events processing on. @@ -2407,7 +2471,7 @@ EAPI void evas_event_thaw (Evas *e) EINA_ARG_NONN * @endcode * */ -EAPI int evas_event_freeze_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_event_freeze_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * After thaw of a canvas, re-evaluate the state of objects and call callbacks @@ -2448,6 +2512,16 @@ EAPI void evas_event_thaw_eval (Evas *e) EINA_ARG_NONN */ /** + * Get the number of mouse or multi presses currently active + * + * @p e The given canvas pointer. + * @return The numer of presses (0 if none active). + * + * @since 1.2 + */ +EAPI int evas_event_down_count_get (const Evas *e) EINA_ARG_NONNULL(1); + +/** * Mouse down event feed. * * @param e The given canvas pointer. @@ -2679,7 +2753,7 @@ EAPI void evas_image_cache_set (Evas *e, int size) EIN * This function returns the image cache size of canvas in bytes. * */ -EAPI int evas_image_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_image_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the maximum image size evas can possibly handle @@ -2728,7 +2802,7 @@ EAPI void evas_font_hinting_set (Evas *e, Evas_Font_H * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. * @ingroup Evas_Font_Group */ -EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Checks if the font hinting is supported by the given evas. @@ -2739,7 +2813,7 @@ EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e) EINA_ * @return @c EINA_TRUE if it is supported, @c EINA_FALSE otherwise. * @ingroup Evas_Font_Group */ -EAPI Eina_Bool evas_font_hinting_can_hint (const Evas *e, Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_font_hinting_can_hint (const Evas *e, Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -2768,7 +2842,7 @@ EAPI void evas_font_cache_set (Evas *e, int size) E * * @ingroup Evas_Font_Group */ -EAPI int evas_font_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_font_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -2785,7 +2859,7 @@ EAPI int evas_font_cache_get (const Evas *e) EINA_ * * @ingroup Evas_Font_Group */ -EAPI Eina_List *evas_font_available_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_List *evas_font_available_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Free list of font descriptions returned by evas_font_dir_available_list(). @@ -2834,7 +2908,7 @@ EAPI void evas_font_path_prepend (Evas *e, const char *p * @return The list of font paths used. * @ingroup Evas_Font_Path_Group */ -EAPI const Eina_List *evas_font_path_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Eina_List *evas_font_path_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @defgroup Evas_Object_Group Generic Object Functions @@ -2958,7 +3032,7 @@ EAPI void evas_object_clip_set (Evas_Object *obj, Evas * * See the full @ref Example_Evas_Object_Manipulation "example". */ -EAPI Evas_Object *evas_object_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Disable/cease clipping on a clipped @p obj object. @@ -3015,7 +3089,7 @@ EAPI void evas_object_clip_unset (Evas_Object *obj); * } * @endcode */ -EAPI const Eina_List *evas_object_clipees_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Eina_List *evas_object_clipees_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -3068,7 +3142,7 @@ EAPI void evas_object_focus_set (Evas_Object *obj, Eina * @see evas_object_key_grab * @see evas_object_key_ungrab */ -EAPI Eina_Bool evas_object_focus_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_focus_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -3104,7 +3178,7 @@ EAPI void evas_object_layer_set (Evas_Object *obj, shor * * @see evas_object_layer_set() */ -EAPI short evas_object_layer_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI short evas_object_layer_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -3139,7 +3213,7 @@ EAPI void evas_object_name_set (Evas_Object *obj, cons * * See the full @ref Example_Evas_Events "example". */ -EAPI const char *evas_object_name_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_object_name_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -3382,7 +3456,7 @@ EAPI void evas_object_hide (Evas_Object *obj) EINA * * @ingroup Evas_Object_Group_Basic */ -EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -3455,7 +3529,7 @@ EAPI void evas_object_color_get (const Evas_Object *obj * * @ingroup Evas_Object_Group_Basic */ -EAPI Evas *evas_object_evas_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas *evas_object_evas_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieves the type of the given Evas object. @@ -3485,7 +3559,7 @@ EAPI Evas *evas_object_evas_get (const Evas_Object *obj * * See the full @ref Example_Evas_Object_Manipulation "example". */ -EAPI const char *evas_object_type_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_object_type_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Raise @p obj to the top of its layer. @@ -3586,7 +3660,7 @@ EAPI void evas_object_stack_below (Evas_Object *obj, Evas * @see evas_object_below_get() * */ -EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the Evas object stacked right below @p obj @@ -3602,7 +3676,7 @@ EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj * @see evas_object_layer_set() * @see evas_object_below_get() */ -EAPI Evas_Object *evas_object_below_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_below_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @} @@ -3946,7 +4020,7 @@ EAPI void evas_object_pass_events_set (Evas_Object *obj, Ein * @see evas_object_propagate_events_get() * @see evas_object_freeze_events_get() */ -EAPI Eina_Bool evas_object_pass_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_pass_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether an Evas object is to repeat events. @@ -3988,7 +4062,7 @@ EAPI void evas_object_repeat_events_set (Evas_Object *obj, Ein * @see evas_object_propagate_events_get() * @see evas_object_freeze_events_get() */ -EAPI Eina_Bool evas_object_repeat_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_repeat_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether events on a smart object's member should get propagated @@ -4026,7 +4100,7 @@ EAPI void evas_object_propagate_events_set (Evas_Object *obj, Ein * @see evas_object_pass_events_get() * @see evas_object_freeze_events_get() */ -EAPI Eina_Bool evas_object_propagate_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_propagate_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether an Evas object is to freeze (discard) events. @@ -4064,7 +4138,7 @@ EAPI void evas_object_freeze_events_set(Evas_Object *obj, Eina_Bool * @see evas_object_propagate_events_get() * @since 1.1.0 */ -EAPI Eina_Bool evas_object_freeze_events_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_freeze_events_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @} @@ -5028,7 +5102,7 @@ EAPI void evas_object_size_hint_min_get (const Evas_Object *obj * @skip evas_object_size_hint_min_set * @until return * - * In this example the minimum size hints change de behavior of an + * In this example the minimum size hints change the behavior of an * Evas box when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * @@ -5072,7 +5146,7 @@ EAPI void evas_object_size_hint_max_get (const Evas_Object *obj * @skip evas_object_size_hint_max_set * @until return * - * In this example the maximum size hints change de behavior of an + * In this example the maximum size hints change the behavior of an * Evas box when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * @@ -5247,7 +5321,7 @@ EAPI void evas_object_size_hint_align_get (const Evas_Object *obj * @skip evas_object_size_hint_align_set * @until return * - * In this example the alignment hints change de behavior of an Evas + * In this example the alignment hints change the behavior of an Evas * box when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * @@ -5306,7 +5380,7 @@ EAPI void evas_object_size_hint_weight_get (const Evas_Object *obj * @skip evas_object_size_hint_weight_set * @until return * - * In this example the weight hints change de behavior of an Evas box + * In this example the weight hints change the behavior of an Evas box * when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * @@ -5342,7 +5416,7 @@ EAPI void evas_object_size_hint_weight_set (Evas_Object *obj, doub * @skip evas_object_size_hint_padding_set * @until return * - * In this example the padding hints change de behavior of an Evas box + * In this example the padding hints change the behavior of an Evas box * when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * @@ -5456,7 +5530,7 @@ EAPI void evas_object_data_set (Evas_Object *ob * else printf("No data was stored on the object\n"); * @endcode */ -EAPI void *evas_object_data_get (const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI void *evas_object_data_get (const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Delete an attached data pointer from an object. @@ -5510,7 +5584,7 @@ EAPI void evas_object_pointer_mode_set (Evas_Object *ob * @return pointer behavior. * @ingroup Evas_Object_Group_Extras */ -EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -5528,7 +5602,7 @@ EAPI void evas_object_anti_alias_set (Evas_Object *ob * @return @c 1 if the object is to be anti_aliased. @c 0 otherwise. * @ingroup Evas_Object_Group_Extras */ -EAPI Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -5562,7 +5636,7 @@ EAPI void evas_object_scale_set (Evas_Object *ob * * @see evas_object_scale_set() */ -EAPI double evas_object_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI double evas_object_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -5579,7 +5653,7 @@ EAPI void evas_object_render_op_set (Evas_Object *ob * @return one of the enumerated values in Evas_Render_Op. * @ingroup Evas_Object_Group_Extras */ -EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether to use precise (usually expensive) point collision @@ -5621,7 +5695,7 @@ EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Obje * * @ingroup Evas_Object_Group_Extras */ - EAPI Eina_Bool evas_object_precise_is_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Eina_Bool evas_object_precise_is_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set a hint flag on the given Evas object that it's used as a "static @@ -5653,7 +5727,7 @@ EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Obje * * @ingroup Evas_Object_Group_Extras */ - EAPI Eina_Bool evas_object_static_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Eina_Bool evas_object_static_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @} @@ -5710,7 +5784,7 @@ EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Obje * * @ingroup Evas_Object_Group_Find */ -EAPI Evas_Object *evas_focus_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_focus_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieves the object on the given evas with the given name. @@ -5718,9 +5792,36 @@ EAPI Evas_Object *evas_focus_get (const Evas *e) EINA_WA * @param name The given name. * @return If successful, the Evas object with the given name. Otherwise, * @c NULL. + * + * This looks for the evas object given a name by evas_object_name_set(). If + * the name is not unique canvas-wide, then which one of the many objects + * with that name is returned is undefined, so only use this if you can ensure + * the object name is unique. + * + * @ingroup Evas_Object_Group_Find + */ +EAPI Evas_Object *evas_object_name_find (const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * Retrieves the object from children of the given object with the given name. + * @param obj The parent (smart) object whose children to search. + * @param name The given name. + * @param recurse Set to the number of child levels to recurse (0 == don't recurse, 1 == only look at the children of @p obj or their immediate children, but no further etc.). + * @return If successful, the Evas object with the given name. Otherwise, + * @c NULL. + * + * This looks for the evas object given a name by evas_object_name_set(), but + * it ONLY looks at the children of the object *p obj, and will only recurse + * into those children if @p recurse is greater than 0. If the name is not + * unique within immediate children (or the whole child tree) then it is not + * defined which child object will be returned. If @p recurse is set to -1 then + * it will recurse without limit. + * + * @since 1.2 + * * @ingroup Evas_Object_Group_Find */ -EAPI Evas_Object *evas_object_name_find (const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_name_child_find (const Evas_Object *obj, const char *name, int recurse) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve the Evas object stacked at the top of a given position in @@ -5745,7 +5846,7 @@ EAPI Evas_Object *evas_object_name_find (const Evas *e, const c * objects, acting only on the ones at the "top level", with regard to * object parenting. */ -EAPI Evas_Object *evas_object_top_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_top_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve the Evas object stacked at the top at the position of the @@ -5763,7 +5864,7 @@ EAPI Evas_Object *evas_object_top_at_xy_get (const Evas *e, Evas_Co * objects, acting only on the ones at the "top level", with regard to * object parenting. */ -EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve the Evas object stacked at the top of a given rectangular @@ -5793,7 +5894,7 @@ EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WA * objects, acting only on the ones at the "top level", with regard to * object parenting. */ -EAPI Evas_Object *evas_object_top_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_top_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve a list of Evas objects lying over a given position in @@ -5818,8 +5919,8 @@ EAPI Evas_Object *evas_object_top_in_rectangle_get (const Evas *e, Evas_Co * objects, acting only on the ones at the "top level", with regard to * object parenting. */ -EAPI Eina_List *evas_objects_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Eina_List *evas_objects_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_List *evas_objects_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Eina_List *evas_objects_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the lowest (stacked) Evas object on the canvas @p @@ -5840,7 +5941,7 @@ EAPI Eina_List *evas_objects_at_xy_get (const Evas *e, Evas_Co * objects, acting only on the ones at the "top level", with regard to * object parenting. */ -EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the highest (stacked) Evas object on the canvas @p @@ -5862,7 +5963,7 @@ EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WA * objects, acting only on the ones at the "top level", with regard to * object parenting. */ -EAPI Evas_Object *evas_object_top_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_top_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @} @@ -6502,7 +6603,7 @@ EAPI void evas_object_image_border_center_fill_set (Evas_Obj * * See @ref evas_object_image_fill_set() for more details. */ -EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether the image object's fill property should track the @@ -6532,7 +6633,7 @@ EAPI void evas_object_image_filled_set (Evas_Obj * * @see evas_object_image_filled_set() for more information */ -EAPI Eina_Bool evas_object_image_filled_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_image_filled_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the scaling factor (multiplier) for the borders of an image @@ -6633,7 +6734,7 @@ EAPI void evas_object_image_fill_spread_set (Evas_Obj * @param obj The given evas image object. * @return The current spread mode of the image object. */ -EAPI Evas_Fill_Spread evas_object_image_fill_spread_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Fill_Spread evas_object_image_fill_spread_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the size of the given image object. @@ -6670,7 +6771,7 @@ EAPI void evas_object_image_size_get (const Ev * The row stride is the number of bytes between the start of a row * and the start of the next row for image data. */ -EAPI int evas_object_image_stride_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_object_image_stride_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieves a number representing any error that occurred during the @@ -6681,7 +6782,7 @@ EAPI int evas_object_image_stride_get (const Ev * one of the #Evas_Load_Error values. #EVAS_LOAD_ERROR_NONE * is returned if there was no error. */ -EAPI Evas_Load_Error evas_object_image_load_error_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Load_Error evas_object_image_load_error_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the raw image data of the given image object. @@ -6730,7 +6831,7 @@ EAPI void evas_object_image_data_set (Evas_Obj * * @see evas_object_image_data_set() */ -EAPI void *evas_object_image_data_get (const Evas_Object *obj, Eina_Bool for_writing) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI void *evas_object_image_data_get (const Evas_Object *obj, Eina_Bool for_writing) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Converts the raw image data of the given image object to the @@ -6748,7 +6849,7 @@ EAPI void *evas_object_image_data_get (const Ev * @param to_cspace The colorspace to which the image raw data will be converted. * @return data A newly allocated data in the format specified by to_cspace. */ -EAPI void *evas_object_image_data_convert (Evas_Object *obj, Evas_Colorspace to_cspace) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI void *evas_object_image_data_convert (Evas_Object *obj, Evas_Colorspace to_cspace) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Replaces the raw image data of the given image object. @@ -6819,7 +6920,7 @@ EAPI void evas_object_image_alpha_set (Evas_Obj * * See @ref evas_object_image_alpha_set() for more details. */ -EAPI Eina_Bool evas_object_image_alpha_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_image_alpha_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets whether to use high-quality image scaling algorithm on the @@ -6849,7 +6950,7 @@ EAPI void evas_object_image_smooth_scale_set (Evas_Obj * * See @ref evas_object_image_smooth_scale_set() for more details. */ -EAPI Eina_Bool evas_object_image_smooth_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_image_smooth_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Preload an image object's image data in the background @@ -6947,7 +7048,7 @@ EAPI void evas_object_image_pixels_dirty_set (Evas_Obj * @param obj The given image object. * @return Whether the image is dirty. */ -EAPI Eina_Bool evas_object_image_pixels_dirty_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_image_pixels_dirty_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the DPI resolution of an image object's source image. @@ -6972,7 +7073,7 @@ EAPI void evas_object_image_load_dpi_set (Evas_Obj * * @see evas_object_image_load_dpi_set() for more details */ -EAPI double evas_object_image_load_dpi_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI double evas_object_image_load_dpi_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the size of a given image object's source image, when loading @@ -7026,7 +7127,7 @@ EAPI void evas_object_image_load_scale_down_set (Evas_Obj * * @see evas_object_image_load_scale_down_set() for more details */ -EAPI int evas_object_image_load_scale_down_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_object_image_load_scale_down_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Inform a given image object to load a selective region of its @@ -7103,7 +7204,18 @@ EAPI void evas_object_image_colorspace_set (Evas_Obj * This function returns the colorspace of given canvas image. * */ -EAPI Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + +/** + * Get the support state of a given image + * + * @param obj The given image object pointer + * @return The region support state + * @since 1.2.0 + * + * This function returns the state of the region support of given image + */ +EAPI Eina_Bool evas_object_image_region_support_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the native surface of a given image of the canvas @@ -7125,7 +7237,7 @@ EAPI void evas_object_image_native_surface_set (Evas_Obj * This function returns the native surface of a given canvas image. * */ -EAPI Evas_Native_Surface *evas_object_image_native_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Native_Surface *evas_object_image_native_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the video surface linked to a given image of the canvas @@ -7149,7 +7261,7 @@ EAPI void evas_object_image_video_surface_set (Evas_Obj * This function returns the video surface linked to a given canvas image. * */ -EAPI const Evas_Video_Surface *evas_object_image_video_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Evas_Video_Surface *evas_object_image_video_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the scale hint of a given image of the canvas. @@ -7178,7 +7290,7 @@ EAPI void evas_object_image_scale_hint_set (Evas_Obj * * @see evas_object_image_scale_hint_set() for more details. */ -EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the content hint setting of a given image object of the canvas. @@ -7210,7 +7322,7 @@ EAPI void evas_object_image_content_hint_set (Evas_Obj * * @see evas_object_image_content_hint_set() */ -EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -7563,7 +7675,7 @@ EAPI void evas_object_text_font_source_set (Evas_Object *obj, cons * * @see evas_object_text_font_get() for more details */ -EAPI const char *evas_object_text_font_source_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_object_text_font_source_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the font family and size on a given text object. @@ -7620,7 +7732,7 @@ EAPI void evas_object_text_text_set (Evas_Object *obj, cons * * @see evas_object_text_text_set() */ -EAPI const char *evas_object_text_text_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_object_text_text_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @brief Sets the BiDi delimiters used in the textblock. @@ -7648,13 +7760,13 @@ EAPI void evas_object_text_bidi_delimiters_set(Evas_Object *obj, co */ EAPI const char *evas_object_text_bidi_delimiters_get(const Evas_Object *obj); - EAPI Evas_Coord evas_object_text_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Coord evas_object_text_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Coord evas_object_text_max_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Coord evas_object_text_max_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Coord evas_object_text_horiz_advance_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Coord evas_object_text_vert_advance_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI Evas_Coord evas_object_text_inset_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; + EAPI Evas_Coord evas_object_text_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Evas_Coord evas_object_text_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Evas_Coord evas_object_text_max_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Evas_Coord evas_object_text_max_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Evas_Coord evas_object_text_horiz_advance_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Evas_Coord evas_object_text_vert_advance_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); + EAPI Evas_Coord evas_object_text_inset_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve position and dimension information of a character within a text @c Evas_Object. @@ -7692,7 +7804,7 @@ EAPI int evas_object_text_last_up_to_pos (const Evas_Object *obj * * @see evas_object_text_style_set() for more details. */ -EAPI Evas_Text_Style_Type evas_object_text_style_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Text_Style_Type evas_object_text_style_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the style to apply on the given text object. @@ -7742,7 +7854,7 @@ EAPI void evas_object_text_style_set (Evas_Object *obj, Evas * - #EVAS_TEXT_STYLE_SOFT_SHADOW * - #EVAS_TEXT_STYLE_FAR_SOFT_SHADOW * - * One can also change de direction the shadow grows to, with + * One can also change the direction where the shadow grows to, with * evas_object_text_style_set(). * * @see evas_object_text_shadow_color_get() @@ -8081,7 +8193,7 @@ EAPI Evas_Object *evas_object_textblock_add(Evas *e) EINA_WARN_U * @param escape the string to be escaped * @return the unescaped version of escape */ -EAPI const char *evas_textblock_escape_string_get(const char *escape) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_textblock_escape_string_get(const char *escape) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Returns the escaped version of the string. @@ -8089,7 +8201,7 @@ EAPI const char *evas_textblock_escape_string_get(const char *e * @param len_ret the len of the part of the string that was used. * @return the escaped string. */ -EAPI const char *evas_textblock_string_escape_get(const char *string, int *len_ret) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_textblock_string_escape_get(const char *string, int *len_ret) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Return the unescaped version of the string between start and end. @@ -8098,8 +8210,35 @@ EAPI const char *evas_textblock_string_escape_get(const char *s * @param escape_end the end of the string. * @return the unescaped version of the range */ -EAPI const char *evas_textblock_escape_string_range_get(const char *escape_start, const char *escape_end) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI const char *evas_textblock_escape_string_range_get(const char *escape_start, const char *escape_end) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); +/** + * Return the plain version of the markup. + * + * Works as if you set the markup to a textblock and then retrieve the plain + * version of the text. i.e:
and <\n> will be replaced with \n, &...; with + * the actual char and etc. + * + * @param obj the textblock object to work with. (if NULL, tries the default) + * @param text the markup text (if NULL, return NULL) + * @return an allocated plain text version of the markup + * @since 1.2.0 + */ +EAPI char *evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC; + +/** + * Return the markup version of the plain text. + * + * Replaces \n ->
\t -> and etc. Generally needed before you pass + * plain text to be set in a textblock. + * + * @param obj the textblock object to work with (if NULL, it just does the + * default behaviour, i.e with no extra object information). + * @param text the markup text (if NULL, return NULL) + * @return an allocated plain text version of the markup + * @since 1.2.0 + */ +EAPI char *evas_textblock_text_utf8_to_markup(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC; /** * Creates a new textblock style. @@ -8128,7 +8267,7 @@ EAPI void evas_textblock_style_set(Evas_Textblock_Style * @param ts the style to get it's text. * @return the text of the style or null on error. */ -EAPI const char *evas_textblock_style_get(const Evas_Textblock_Style *ts) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_textblock_style_get(const Evas_Textblock_Style *ts) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -8144,7 +8283,7 @@ EAPI void evas_object_textblock_style_set(Evas_Object *o * @param obj the object to get the style from. * @return the style of the object. */ -EAPI const Evas_Textblock_Style *evas_object_textblock_style_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Evas_Textblock_Style *evas_object_textblock_style_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @brief Set the "replacement character" to use for the given textblock object. @@ -8161,7 +8300,7 @@ EAPI void evas_object_textblock_replace_char_set(Evas_Ob * @param obj The given textblock object * @return replacement character or @c NULL */ -EAPI const char *evas_object_textblock_replace_char_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_object_textblock_replace_char_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @brief Sets the vertical alignment of text within the textblock object @@ -8230,7 +8369,7 @@ EAPI void evas_object_textblock_legacy_newline_set(Evas_ * @return EINA_TRUE if in legacy mode, EINA_FALSE otherwise. * @since 1.1.0 */ -EAPI Eina_Bool evas_object_textblock_legacy_newline_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_textblock_legacy_newline_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -8270,7 +8409,7 @@ EAPI const char *evas_object_textblock_text_markup_get(const Ev * @param obj the object. * @return the obj's main cursor. */ -EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Create a new cursor, associate it to the obj and init it to point @@ -8421,7 +8560,7 @@ EAPI void evas_textblock_cursor_at_format_set(Evas_Textb * @return #EINA_TRUE if the cursor points to a visible format, #EINA_FALSE otherwise. * @see evas_textblock_cursor_format_get() */ -EAPI Eina_Bool evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Advances to the next format node @@ -8464,6 +8603,24 @@ EAPI Eina_Bool evas_textblock_cursor_char_next(Evas_Textblock EAPI Eina_Bool evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** + * Moves the cursor to the start of the word under the cursor. + * + * @param cur the cursor to move. + * @return #EINA_TRUE on success #EINA_FALSE otherwise. + * @since 1.2.0 + */ +EAPI Eina_Bool evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** + * Moves the cursor to the end of the word under the cursor. + * + * @param cur the cursor to move. + * @return #EINA_TRUE on success #EINA_FALSE otherwise. + * @since 1.2.0 + */ +EAPI Eina_Bool evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); + +/** * Go to the first char in the node the cursor is pointing on. * * @param cur the cursor to update. @@ -8501,7 +8658,7 @@ EAPI void evas_textblock_cursor_line_char_last(Evas_Text * @param cur the cursor to take the position from. * @return the position or -1 on error */ -EAPI int evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the cursor pos. @@ -8527,7 +8684,7 @@ EAPI Eina_Bool evas_textblock_cursor_line_set(Evas_Textblock_ * @param cur2 the second cursor. * @return -1 if cur1 < cur2, 0 if cur1 == cur2 and 1 otherwise. */ -EAPI int evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI int evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Make cur_dest point to the same place as cur. Does not work if they don't @@ -8630,7 +8787,7 @@ EAPI void evas_textblock_cursor_range_delete(Evas_Textbl * @param cur the cursor pointing to the paragraph. * @return the text on success, NULL otherwise. */ -EAPI const char *evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Return the length of the paragraph, cheaper the eina_unicode_strlen() @@ -8638,7 +8795,7 @@ EAPI const char *evas_textblock_cursor_paragraph_text_get(const * @param cur the position of the paragraph. * @return the length of the paragraph on success, -1 otehrwise. */ -EAPI int evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Return the currently visible range. @@ -8648,7 +8805,7 @@ EAPI int evas_textblock_cursor_paragraph_text_length_ge * @return EINA_TRUE on success. EINA_FALSE otherwise. * @since 1.1.0 */ -Eina_Bool evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) EINA_ARG_NONNULL(1, 2); /** * Return the format nodes in the range between cur1 and cur2. @@ -8658,7 +8815,7 @@ Eina_Bool evas_textblock_cursor_visible_range_get(Evas_T * @return the foramt nodes in the range. You have to free it. * @since 1.1.0 */ -EAPI Eina_List * evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Eina_List * evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Return the text in the range between cur1 and cur2 @@ -8669,13 +8826,15 @@ EAPI Eina_List * evas_textblock_cursor_range_formats_get(const E * @return the text in the range * @see elm_entry_markup_to_utf8() */ -EAPI char *evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI char *evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Return the content of the cursor. * + * Free the returned string pointer when done (if it is not NULL). + * * @param cur the cursor - * @return the text in the range + * @return the text in the range, terminated by a nul byte (may be utf8). */ EAPI char *evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; @@ -8766,7 +8925,7 @@ EAPI int evas_textblock_cursor_line_coord_set(Evas_Text * @param cur2 other side of the range. * @return a list of Rectangles representing the geometry of the range. */ -EAPI Eina_List *evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Eina_List *evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); EAPI Eina_Bool evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); @@ -8776,7 +8935,7 @@ EAPI Eina_List *evas_textblock_cursor_range_geometry_get(const * @param cur the cursor to check. * @return #EINA_TRUE if true, #EINA_FALSE otherwise. */ -EAPI Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -8931,6 +9090,12 @@ EAPI void evas_object_polygon_points_clear (Evas_Object *obj) EINA * @} */ +/* @since 1.2.0 */ +EAPI void evas_object_is_frame_object_set(Evas_Object *obj, Eina_Bool is_frame); + +/* @since 1.2.0 */ +EAPI Eina_Bool evas_object_is_frame_object_get(Evas_Object *obj); + /** * @defgroup Evas_Smart_Group Smart Functions * @@ -9273,7 +9438,7 @@ EAPI Evas_Smart *evas_smart_class_new (const * @param s a valid #Evas_Smart pointer * @return the #Evas_Smart_Class in it */ -EAPI const Evas_Smart_Class *evas_smart_class_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Evas_Smart_Class *evas_smart_class_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -9284,7 +9449,7 @@ EAPI const Evas_Smart_Class *evas_smart_class_get (const * This data pointer is set as the data field in the #Evas_Smart_Class * passed in to evas_smart_class_new(). */ -EAPI void *evas_smart_data_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI void *evas_smart_data_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the smart callbacks known by this #Evas_Smart handle's smart @@ -9338,7 +9503,7 @@ EAPI const Evas_Smart_Cb_Description **evas_smart_callbacks_descriptions_get(con * * @see evas_smart_callbacks_descriptions_get() */ -EAPI const Evas_Smart_Cb_Description *evas_smart_callback_description_find(const Evas_Smart *s, const char *name) EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI const Evas_Smart_Cb_Description *evas_smart_callback_description_find(const Evas_Smart *s, const char *name) EINA_ARG_NONNULL(1, 2); /** @@ -9507,7 +9672,7 @@ EAPI void evas_object_smart_member_del (Evas_Object *obj) EINA * @see evas_object_smart_member_add() * @see evas_object_smart_member_del() */ -EAPI Eina_List *evas_object_smart_members_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_List *evas_object_smart_members_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Gets the parent smart object of a given Evas object, if it has one. @@ -9519,7 +9684,7 @@ EAPI Eina_List *evas_object_smart_members_get (const Evas_Object *obj * * @ingroup Evas_Smart_Object_Group */ -EAPI Evas_Object *evas_object_smart_parent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_smart_parent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Checks whether a given smart object or any of its smart object @@ -9546,7 +9711,7 @@ EAPI Evas_Object *evas_object_smart_parent_get (const Evas_Object *obj * * @ingroup Evas_Smart_Object_Group */ -EAPI Eina_Bool evas_object_smart_type_check (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Eina_Bool evas_object_smart_type_check (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Checks whether a given smart object or any of its smart object @@ -9561,7 +9726,7 @@ EAPI Eina_Bool evas_object_smart_type_check (const Evas_Object *obj * * @ingroup Evas_Smart_Object_Group */ -EAPI Eina_Bool evas_object_smart_type_check_ptr (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Eina_Bool evas_object_smart_type_check_ptr (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Get the #Evas_Smart from which @p obj smart object was created. @@ -9571,7 +9736,7 @@ EAPI Eina_Bool evas_object_smart_type_check_ptr (const Evas_Object *obj * * @ingroup Evas_Smart_Object_Group */ -EAPI Evas_Smart *evas_object_smart_smart_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Smart *evas_object_smart_smart_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve user data stored on a given smart object. @@ -9585,7 +9750,7 @@ EAPI Evas_Smart *evas_object_smart_smart_get (const Evas_Object *obj * * @ingroup Evas_Smart_Object_Group */ -EAPI void *evas_object_smart_data_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI void *evas_object_smart_data_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Store a pointer to user data for a given smart object. @@ -9683,6 +9848,34 @@ EAPI void evas_object_smart_callback_priority_add(Evas_Object *obj, EAPI void *evas_object_smart_callback_del (Evas_Object *obj, const char *event, Evas_Smart_Cb func) EINA_ARG_NONNULL(1, 2, 3); /** + * Delete (unregister) a callback function from the smart event + * specified by @p event on the smart object @p obj. + * + * @param obj a smart object + * @param event the event's name string + * @param func the callback function + * @param data the data pointer that was passed to the callback + * @return the data pointer + * + * This function removes the first added smart callback on the + * object @p obj matching the event name @p event, the registered + * function pointer @p func and the callback data pointer @p data. If + * the removal is successful it will also return the data pointer that + * was passed to evas_object_smart_callback_add() (that will be the same + * as the parameter) when the callback(s) was(were) added to the canvas. + * If not successful @c NULL will be returned. A common use would be to + * remove an exact match of a callback + * + * @see evas_object_smart_callback_add() for more details. + * @since 1.2.0 + * @ingroup Evas_Smart_Object_Group + * + * @note To delete all smart event callbacks which match @p type and @p func, + * use evas_object_smart_callback_del(). + */ +EAPI void *evas_object_smart_callback_del_full(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2, 3); + +/** * Call a given smart callback on the smart object @p obj. * * @param obj the smart object @@ -9856,7 +10049,7 @@ EAPI void evas_object_smart_need_recalculate_set(Evas_Object *obj, * * @ingroup Evas_Smart_Object_Group */ -EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Call the @b calculate() smart function immediataly on a given smart @@ -9977,7 +10170,7 @@ EAPI void evas_object_smart_move_children_relative(Evas_Objec * * @see evas_object_smart_clipped_smart_add() */ -EAPI Evas_Object *evas_object_smart_clipped_clipper_get (Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object *evas_object_smart_clipped_clipper_get (Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set a given smart class' callbacks so it implements the clipped smart @@ -10885,7 +11078,7 @@ EAPI Eina_List *evas_object_box_children_get * _Evas_Object_Box_Api::property_name_get smart class function of the * box, which is originally set to @c NULL. */ -EAPI const char *evas_object_box_option_property_name_get (Evas_Object *o, int property) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const char *evas_object_box_option_property_name_get (Evas_Object *o, int property) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the numerical identifier of the property of the child elements @@ -10904,7 +11097,7 @@ EAPI const char *evas_object_box_option_property_name_get * _Evas_Object_Box_Api::property_id_get smart class function of the * box, which is originally set to @c NULL. */ -EAPI int evas_object_box_option_property_id_get (Evas_Object *o, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI int evas_object_box_option_property_id_get (Evas_Object *o, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Set a property value (by its given numerical identifier), on a @@ -11081,7 +11274,7 @@ EAPI void evas_object_table_homogeneous_set (Evas * * @see evas_object_table_homogeneous_set() */ -EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set padding between cells. @@ -11455,7 +11648,7 @@ EAPI Eina_List *evas_object_grid_children_get (const * @return @c EINA_TRUE if it wants, @c EINA_FALSE otherwise. * @ingroup Evas_Cserve */ -EAPI Eina_Bool evas_cserve_want_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE; +EAPI Eina_Bool evas_cserve_want_get (void) EINA_WARN_UNUSED_RESULT; /** * Retrieves if the system is connected to the server used to share @@ -11482,7 +11675,7 @@ EAPI Eina_Bool evas_cserve_stats_get (Evas_Cserve_Stats * * @param cache A handle to the given images cache. */ -EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache) EINA_PURE; +EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache); /** * Retrieves the current configuration of the Evas image caching @@ -11501,7 +11694,7 @@ EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image * * @ingroup Evas_Cserve */ -EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE; +EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT; /** * Changes the configurations of the Evas image caching server. @@ -11515,7 +11708,7 @@ EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Confi * * @ingroup Evas_Cserve */ -EAPI Eina_Bool evas_cserve_config_set (const Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE; +EAPI Eina_Bool evas_cserve_config_set (const Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT; /** * Force the system to disconnect from the bitmap caching server. @@ -11711,7 +11904,7 @@ EAPI int evas_string_char_prev_get (const char *str, int p * @return The length in characters (not bytes) * @ingroup Evas_Utils */ -EAPI int evas_string_char_len_get (const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI int evas_string_char_len_get (const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @defgroup Evas_Keys Key Input Functions @@ -11769,7 +11962,7 @@ EAPI int evas_string_char_len_get (const char *str) EINA_ * @return An ::Evas_Modifier handle to query Evas' keys subsystem * with evas_key_modifier_is_set(), or @c NULL on error. */ -EAPI const Evas_Modifier *evas_key_modifier_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Evas_Modifier *evas_key_modifier_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Returns a handle to the list of lock keys registered in the canvas @@ -11787,7 +11980,7 @@ EAPI const Evas_Modifier *evas_key_modifier_get (const Evas *e) EINA_WA * @return An ::Evas_Lock handle to query Evas' keys subsystem with * evas_key_lock_is_set(), or @c NULL on error. */ -EAPI const Evas_Lock *evas_key_lock_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; +EAPI const Evas_Lock *evas_key_lock_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** @@ -11808,7 +12001,7 @@ EAPI const Evas_Lock *evas_key_lock_get (const Evas *e) EINA_WA * @see evas_key_modifier_on * @see evas_key_modifier_off */ -EAPI Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** @@ -11828,7 +12021,7 @@ EAPI Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m * @see evas_key_lock_on * @see evas_key_lock_off */ -EAPI Eina_Bool evas_key_lock_is_set (const Evas_Lock *l, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Eina_Bool evas_key_lock_is_set (const Evas_Lock *l, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** @@ -12012,7 +12205,7 @@ EAPI void evas_key_lock_off (Evas *e, const char *k * @see evas_object_key_grab * @see evas_object_key_ungrab */ -EAPI Evas_Modifier_Mask evas_key_modifier_mask_get (const Evas *e, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE; +EAPI Evas_Modifier_Mask evas_key_modifier_mask_get (const Evas *e, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** diff --git a/libraries/evas/src/lib/Evas_GL.h b/libraries/evas/src/lib/Evas_GL.h index 04bedea..fdfbaad 100644 --- a/libraries/evas/src/lib/Evas_GL.h +++ b/libraries/evas/src/lib/Evas_GL.h @@ -28,7 +28,7 @@ typedef enum _Evas_GL_Depth_Bits EVAS_GL_DEPTH_BIT_8 = 1, EVAS_GL_DEPTH_BIT_16 = 2, EVAS_GL_DEPTH_BIT_24 = 3, - EVAS_GL_DEPTH_BIT_32 = 4, + EVAS_GL_DEPTH_BIT_32 = 4 } Evas_GL_Depth_Bits; typedef enum _Evas_GL_Stencil_Bits @@ -38,14 +38,21 @@ typedef enum _Evas_GL_Stencil_Bits EVAS_GL_STENCIL_BIT_2 = 2, EVAS_GL_STENCIL_BIT_4 = 3, EVAS_GL_STENCIL_BIT_8 = 4, - EVAS_GL_STENCIL_BIT_16 = 5, + EVAS_GL_STENCIL_BIT_16 = 5 } Evas_GL_Stencil_Bits; +typedef enum _Evas_GL_Options_Bits +{ + EVAS_GL_OPTIONS_NONE = 0, + EVAS_GL_OPTIONS_DIRECT = (1<<0) +} Evas_GL_Options_Bits; + struct _Evas_GL_Config { - Evas_GL_Color_Format color_format; - Evas_GL_Depth_Bits depth_bits; - Evas_GL_Stencil_Bits stencil_bits; + Evas_GL_Color_Format color_format; + Evas_GL_Depth_Bits depth_bits; + Evas_GL_Stencil_Bits stencil_bits; + Evas_GL_Options_Bits options_bits; }; #define EVAS_GL_EXTENSIONS 1 @@ -73,6 +80,7 @@ typedef struct _GLData { Evas_GL_Context *ctx; Evas_GL_Surface *sfc; + Evas_GL_Config *cfg; Evas_GL *evasgl; Evas_GL_API *glapi; GLuint program; @@ -93,13 +101,6 @@ static GLuint load_shader (GLData *gld, GLenum type, const char *shader_src) int main(int argc, char **argv) { - // config for the surface for evas_gl - Evas_GL_Config config = - { - EVAS_GL_RGBA_8888, - EVAS_GL_DEPTH_NONE, - EVAS_GL_STENCIL_NONE - }; // a size by default int w = 256, h = 256; // some variables we will use @@ -124,8 +125,16 @@ main(int argc, char **argv) // get the evas gl handle for doing gl things gld->evasgl = evas_gl_new(canvas); gld->glapi = evas_gl_api_get(gld->evasgl); + + // Set a surface config + gld->cfg = evas_gl_config_new(); + gld->cfg->color_format = EVAS_GL_RGBA_8888; + //gld->cfg->depth_bits = EVAS_GL_DEPTH_NONE; // Othe config options + //gld->cfg->stencil_bits = EVAS_GL_STENCIL_NONE; + //gld->cfg->options_bits = EVAS_GL_OPTIONS_NONE; + // create a surface and context - gld->sfc = evas_gl_surface_create(gld->evasgl, &config, w, h); + gld->sfc = evas_gl_surface_create(gld->evasgl, gld->cfg, w, h); gld->ctx = evas_gl_context_create(gld->evasgl, NULL); //-// //-//-//-// END GL INIT BLOB @@ -207,6 +216,7 @@ on_del(void *data, Evas *e, Evas_Object *obj, void *event_info) evas_gl_surface_destroy(gld->evasgl, gld->sfc); evas_gl_context_destroy(gld->evasgl, gld->ctx); + evas_gl_config_free(gld->cfg); evas_gl_free(gld->evasgl); free(gld); } @@ -389,6 +399,22 @@ EAPI Evas_GL *evas_gl_new (Evas *e) EINA_WARN_UNU EAPI void evas_gl_free (Evas_GL *evas_gl) EINA_ARG_NONNULL(1); /** + * Allocates a new config object for the user to fill out. + * + * As long as the Evas creates a config object for the user, it takes care + * of the backward compatibility issue. + */ +EAPI Evas_GL_Config *evas_gl_config_new (); + +/** + * Frees a config object created from evas_gl_config_new. + * + * As long as the Evas creates a config object for the user, it takes care + * of the backward compatibility issue. + */ +EAPI void evas_gl_config_free (Evas_GL_Config *cfg) EINA_ARG_NONNULL(1); + +/** * Creates and returns new Evas_GL_Surface object for GL Rendering. * * @param evas_gl The given Evas_GL object. diff --git a/libraries/evas/src/lib/Makefile.am b/libraries/evas/src/lib/Makefile.am index 6b1011a..2a1a92d 100644 --- a/libraries/evas/src/lib/Makefile.am +++ b/libraries/evas/src/lib/Makefile.am @@ -100,6 +100,11 @@ SUBDIRS += ../modules/engines/software_x11/ EVAS_STATIC_MODULE += ../modules/engines/software_x11/libevas_engine_software_x11.la EVAS_STATIC_LIBADD += @evas_engine_software_xlib_libs@ @evas_engine_software_xcb_libs@ endif +if EVAS_STATIC_BUILD_WAYLAND_SHM +SUBDIRS += ../modules/engines/wayland_shm/ +EVAS_STATIC_MODULE += ../modules/engines/wayland_shm/libevas_engine_wayland_shm.la +EVAS_STATIC_LIBADD += @evas_engine_wayland_shm_libs@ +endif if EVAS_STATIC_BUILD_BMP SUBDIRS += ../modules/loaders/bmp EVAS_STATIC_MODULE += ../modules/loaders/bmp/libevas_loader_bmp.la @@ -200,9 +205,7 @@ AM_CFLAGS = @WIN32_CFLAGS@ lib_LTLIBRARIES = libevas.la -### Evas_GL disabled for 1.1 -#includes_HEADERS = Evas.h Evas_GL.h -includes_HEADERS = Evas.h +includes_HEADERS = Evas.h Evas_GL.h includesdir = $(includedir)/evas-@VMAJ@ libevas_la_SOURCES = main.c diff --git a/libraries/evas/src/lib/Makefile.in b/libraries/evas/src/lib/Makefile.in index 87bbaac..ffe71d1 100644 --- a/libraries/evas/src/lib/Makefile.in +++ b/libraries/evas/src/lib/Makefile.in @@ -101,57 +101,60 @@ host_triplet = @host@ @EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_48 = ../modules/engines/software_x11/ @EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_49 = ../modules/engines/software_x11/libevas_engine_software_x11.la @EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_50 = @evas_engine_software_xlib_libs@ @evas_engine_software_xcb_libs@ -@EVAS_STATIC_BUILD_BMP_TRUE@am__append_51 = ../modules/loaders/bmp -@EVAS_STATIC_BUILD_BMP_TRUE@am__append_52 = ../modules/loaders/bmp/libevas_loader_bmp.la -@EVAS_STATIC_BUILD_BMP_TRUE@am__append_53 = @evas_image_loader_bmp_libs@ -@EVAS_STATIC_BUILD_EDB_TRUE@am__append_54 = ../modules/savers/edb ../modules/loaders/edb -@EVAS_STATIC_BUILD_EDB_TRUE@am__append_55 = ../modules/savers/edb/libevas_saver_edb.la ../modules/loaders/edb/libevas_loader_edb.la -@EVAS_STATIC_BUILD_EDB_TRUE@am__append_56 = @evas_image_loader_edb_libs@ -@EVAS_STATIC_BUILD_EET_TRUE@am__append_57 = ../modules/savers/eet ../modules/loaders/eet -@EVAS_STATIC_BUILD_EET_TRUE@am__append_58 = ../modules/savers/eet/libevas_saver_eet.la ../modules/loaders/eet/libevas_loader_eet.la -@EVAS_STATIC_BUILD_EET_TRUE@am__append_59 = @evas_image_loader_eet_libs@ -@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_60 = ../modules/loaders/generic -@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_61 = ../modules/loaders/generic/libevas_loader_generic.la -@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_62 = @evas_image_loader_generic_libs@ -@EVAS_STATIC_BUILD_GIF_TRUE@am__append_63 = ../modules/loaders/gif -@EVAS_STATIC_BUILD_GIF_TRUE@am__append_64 = ../modules/loaders/gif/libevas_loader_gif.la -@EVAS_STATIC_BUILD_GIF_TRUE@am__append_65 = @evas_image_loader_gif_libs@ -@EVAS_STATIC_BUILD_ICO_TRUE@am__append_66 = ../modules/loaders/ico -@EVAS_STATIC_BUILD_ICO_TRUE@am__append_67 = ../modules/loaders/ico/libevas_loader_ico.la -@EVAS_STATIC_BUILD_ICO_TRUE@am__append_68 = @evas_image_loader_ico_libs@ -@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_69 = ../modules/loaders/jpeg -@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_70 = ../modules/loaders/jpeg/libevas_loader_jpeg.la -@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_71 = ../modules/savers/jpeg -@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_72 = ../modules/savers/jpeg/libevas_saver_jpeg.la -@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_73 = @evas_image_loader_jpeg_libs@ -@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_74 = ../modules/loaders/pmaps -@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_75 = ../modules/loaders/pmaps/libevas_loader_pmaps.la -@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_76 = @evas_image_loader_pmaps_libs@ -@EVAS_STATIC_BUILD_PNG_TRUE@am__append_77 = ../modules/savers/png ../modules/loaders/png -@EVAS_STATIC_BUILD_PNG_TRUE@am__append_78 = ../modules/savers/png/libevas_saver_png.la ../modules/loaders/png/libevas_loader_png.la -@EVAS_STATIC_BUILD_PNG_TRUE@am__append_79 = @evas_image_loader_png_libs@ -@EVAS_STATIC_BUILD_PSD_TRUE@am__append_80 = ../modules/loaders/psd -@EVAS_STATIC_BUILD_PSD_TRUE@am__append_81 = ../modules/loaders/psd/libevas_loader_psd.la -@EVAS_STATIC_BUILD_PSD_TRUE@am__append_82 = @evas_image_loader_psd_libs@ -@EVAS_STATIC_BUILD_SVG_TRUE@am__append_83 = ../modules/loaders/svg -@EVAS_STATIC_BUILD_SVG_TRUE@am__append_84 = ../modules/loaders/svg/libevas_loader_svg.la -@EVAS_STATIC_BUILD_SVG_TRUE@am__append_85 = @evas_image_loader_svg_libs@ -@EVAS_STATIC_BUILD_TGA_TRUE@am__append_86 = ../modules/loaders/tga -@EVAS_STATIC_BUILD_TGA_TRUE@am__append_87 = ../modules/loaders/tga/libevas_loader_tga.la -@EVAS_STATIC_BUILD_TGA_TRUE@am__append_88 = @evas_image_loader_tga_libs@ -@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_89 = ../modules/savers/tiff ../modules/loaders/tiff -@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_90 = ../modules/savers/tiff/libevas_saver_tiff.la ../modules/loaders/tiff/libevas_loader_tiff.la -@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_91 = @evas_image_loader_tiff_libs@ -@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_92 = ../modules/loaders/wbmp -@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_93 = ../modules/loaders/wbmp/libevas_loader_wbmp.la -@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_94 = @evas_image_loader_wbmp_libs@ -@EVAS_STATIC_BUILD_XPM_TRUE@am__append_95 = ../modules/loaders/xpm -@EVAS_STATIC_BUILD_XPM_TRUE@am__append_96 = ../modules/loaders/xpm/libevas_loader_xpm.la -@EVAS_STATIC_BUILD_XPM_TRUE@am__append_97 = @evas_image_loader_xpm_libs@ -@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_98 = engines/common_16/libevas_engine_common_16.la -@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_99 = engines/common_16/libevas_engine_common_16.la -@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_100 = engines/common_8/libevas_engine_common_8.la -@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_101 = engines/common_8/libevas_engine_common_8.la +@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_51 = ../modules/engines/wayland_shm/ +@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_52 = ../modules/engines/wayland_shm/libevas_engine_wayland_shm.la +@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_53 = @evas_engine_wayland_shm_libs@ +@EVAS_STATIC_BUILD_BMP_TRUE@am__append_54 = ../modules/loaders/bmp +@EVAS_STATIC_BUILD_BMP_TRUE@am__append_55 = ../modules/loaders/bmp/libevas_loader_bmp.la +@EVAS_STATIC_BUILD_BMP_TRUE@am__append_56 = @evas_image_loader_bmp_libs@ +@EVAS_STATIC_BUILD_EDB_TRUE@am__append_57 = ../modules/savers/edb ../modules/loaders/edb +@EVAS_STATIC_BUILD_EDB_TRUE@am__append_58 = ../modules/savers/edb/libevas_saver_edb.la ../modules/loaders/edb/libevas_loader_edb.la +@EVAS_STATIC_BUILD_EDB_TRUE@am__append_59 = @evas_image_loader_edb_libs@ +@EVAS_STATIC_BUILD_EET_TRUE@am__append_60 = ../modules/savers/eet ../modules/loaders/eet +@EVAS_STATIC_BUILD_EET_TRUE@am__append_61 = ../modules/savers/eet/libevas_saver_eet.la ../modules/loaders/eet/libevas_loader_eet.la +@EVAS_STATIC_BUILD_EET_TRUE@am__append_62 = @evas_image_loader_eet_libs@ +@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_63 = ../modules/loaders/generic +@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_64 = ../modules/loaders/generic/libevas_loader_generic.la +@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_65 = @evas_image_loader_generic_libs@ +@EVAS_STATIC_BUILD_GIF_TRUE@am__append_66 = ../modules/loaders/gif +@EVAS_STATIC_BUILD_GIF_TRUE@am__append_67 = ../modules/loaders/gif/libevas_loader_gif.la +@EVAS_STATIC_BUILD_GIF_TRUE@am__append_68 = @evas_image_loader_gif_libs@ +@EVAS_STATIC_BUILD_ICO_TRUE@am__append_69 = ../modules/loaders/ico +@EVAS_STATIC_BUILD_ICO_TRUE@am__append_70 = ../modules/loaders/ico/libevas_loader_ico.la +@EVAS_STATIC_BUILD_ICO_TRUE@am__append_71 = @evas_image_loader_ico_libs@ +@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_72 = ../modules/loaders/jpeg +@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_73 = ../modules/loaders/jpeg/libevas_loader_jpeg.la +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_74 = ../modules/savers/jpeg +@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_75 = ../modules/savers/jpeg/libevas_saver_jpeg.la +@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_76 = @evas_image_loader_jpeg_libs@ +@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_77 = ../modules/loaders/pmaps +@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_78 = ../modules/loaders/pmaps/libevas_loader_pmaps.la +@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_79 = @evas_image_loader_pmaps_libs@ +@EVAS_STATIC_BUILD_PNG_TRUE@am__append_80 = ../modules/savers/png ../modules/loaders/png +@EVAS_STATIC_BUILD_PNG_TRUE@am__append_81 = ../modules/savers/png/libevas_saver_png.la ../modules/loaders/png/libevas_loader_png.la +@EVAS_STATIC_BUILD_PNG_TRUE@am__append_82 = @evas_image_loader_png_libs@ +@EVAS_STATIC_BUILD_PSD_TRUE@am__append_83 = ../modules/loaders/psd +@EVAS_STATIC_BUILD_PSD_TRUE@am__append_84 = ../modules/loaders/psd/libevas_loader_psd.la +@EVAS_STATIC_BUILD_PSD_TRUE@am__append_85 = @evas_image_loader_psd_libs@ +@EVAS_STATIC_BUILD_SVG_TRUE@am__append_86 = ../modules/loaders/svg +@EVAS_STATIC_BUILD_SVG_TRUE@am__append_87 = ../modules/loaders/svg/libevas_loader_svg.la +@EVAS_STATIC_BUILD_SVG_TRUE@am__append_88 = @evas_image_loader_svg_libs@ +@EVAS_STATIC_BUILD_TGA_TRUE@am__append_89 = ../modules/loaders/tga +@EVAS_STATIC_BUILD_TGA_TRUE@am__append_90 = ../modules/loaders/tga/libevas_loader_tga.la +@EVAS_STATIC_BUILD_TGA_TRUE@am__append_91 = @evas_image_loader_tga_libs@ +@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_92 = ../modules/savers/tiff ../modules/loaders/tiff +@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_93 = ../modules/savers/tiff/libevas_saver_tiff.la ../modules/loaders/tiff/libevas_loader_tiff.la +@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_94 = @evas_image_loader_tiff_libs@ +@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_95 = ../modules/loaders/wbmp +@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_96 = ../modules/loaders/wbmp/libevas_loader_wbmp.la +@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_97 = @evas_image_loader_wbmp_libs@ +@EVAS_STATIC_BUILD_XPM_TRUE@am__append_98 = ../modules/loaders/xpm +@EVAS_STATIC_BUILD_XPM_TRUE@am__append_99 = ../modules/loaders/xpm/libevas_loader_xpm.la +@EVAS_STATIC_BUILD_XPM_TRUE@am__append_100 = @evas_image_loader_xpm_libs@ +@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_101 = engines/common_16/libevas_engine_common_16.la +@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_102 = engines/common_16/libevas_engine_common_16.la +@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_103 = engines/common_8/libevas_engine_common_8.la +@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_104 = engines/common_8/libevas_engine_common_8.la subdir = src/lib DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -213,7 +216,7 @@ am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libevas_la_OBJECTS = main.lo libevas_la_OBJECTS = $(am_libevas_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) @@ -393,8 +396,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -411,6 +412,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -492,6 +495,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ @@ -576,9 +583,10 @@ SUBDIRS = canvas cache cserve file engines include $(am__append_1) \ $(am__append_45) $(am__append_48) $(am__append_51) \ $(am__append_54) $(am__append_57) $(am__append_60) \ $(am__append_63) $(am__append_66) $(am__append_69) \ - $(am__append_71) $(am__append_74) $(am__append_77) \ + $(am__append_72) $(am__append_74) $(am__append_77) \ $(am__append_80) $(am__append_83) $(am__append_86) \ - $(am__append_89) $(am__append_92) $(am__append_95) + $(am__append_89) $(am__append_92) $(am__append_95) \ + $(am__append_98) EVAS_STATIC_MODULE = $(am__append_2) $(am__append_4) $(am__append_6) \ $(am__append_9) $(am__append_12) $(am__append_15) \ $(am__append_18) $(am__append_21) $(am__append_24) \ @@ -587,20 +595,20 @@ EVAS_STATIC_MODULE = $(am__append_2) $(am__append_4) $(am__append_6) \ $(am__append_43) $(am__append_46) $(am__append_49) \ $(am__append_52) $(am__append_55) $(am__append_58) \ $(am__append_61) $(am__append_64) $(am__append_67) \ - $(am__append_70) $(am__append_72) $(am__append_75) \ + $(am__append_70) $(am__append_73) $(am__append_75) \ $(am__append_78) $(am__append_81) $(am__append_84) \ $(am__append_87) $(am__append_90) $(am__append_93) \ - $(am__append_96) + $(am__append_96) $(am__append_99) EVAS_STATIC_LIBADD = $(am__append_7) $(am__append_10) $(am__append_13) \ $(am__append_16) $(am__append_19) $(am__append_22) \ $(am__append_27) $(am__append_30) $(am__append_33) \ $(am__append_38) $(am__append_41) $(am__append_44) \ $(am__append_47) $(am__append_50) $(am__append_53) \ $(am__append_56) $(am__append_59) $(am__append_62) \ - $(am__append_65) $(am__append_68) $(am__append_73) \ + $(am__append_65) $(am__append_68) $(am__append_71) \ $(am__append_76) $(am__append_79) $(am__append_82) \ $(am__append_85) $(am__append_88) $(am__append_91) \ - $(am__append_94) $(am__append_97) + $(am__append_94) $(am__append_97) $(am__append_100) AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ @@ -619,10 +627,7 @@ AM_CPPFLAGS = \ AM_CFLAGS = @WIN32_CFLAGS@ lib_LTLIBRARIES = libevas.la - -### Evas_GL disabled for 1.1 -#includes_HEADERS = Evas.h Evas_GL.h -includes_HEADERS = Evas.h +includes_HEADERS = Evas.h Evas_GL.h includesdir = $(includedir)/evas-@VMAJ@ libevas_la_SOURCES = main.c @EVAS_CSERVE_TRUE@libevas_cserve_la = cserve/libevas_cserve.la @@ -631,12 +636,12 @@ libevas_la_LIBADD = canvas/libevas_canvas.la file/libevas_file.la \ engines/common/libevas_engine_common.la @FREETYPE_LIBS@ \ @FRIBIDI_LIBS@ @HARFBUZZ_LIBS@ @EET_LIBS@ @FONTCONFIG_LIBS@ \ @pthread_libs@ @EINA_LIBS@ $(EVAS_STATIC_MODULE) \ - $(EVAS_STATIC_LIBADD) @PIXMAN_LIBS@ -lm $(am__append_98) \ - $(am__append_100) + $(EVAS_STATIC_LIBADD) @PIXMAN_LIBS@ -lm $(am__append_101) \ + $(am__append_103) libevas_la_DEPENDENCIES = canvas/libevas_canvas.la \ file/libevas_file.la cache/libevas_cache.la \ $(libevas_cserve_la) engines/common/libevas_engine_common.la \ - $(EVAS_STATIC_MODULE) $(am__append_99) $(am__append_101) + $(EVAS_STATIC_MODULE) $(am__append_102) $(am__append_104) libevas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ ### Evas_GL we are still using it in our code, so just don't install it. diff --git a/libraries/evas/src/lib/cache/Makefile.in b/libraries/evas/src/lib/cache/Makefile.in index b024731..2b50c81 100644 --- a/libraries/evas/src/lib/cache/Makefile.in +++ b/libraries/evas/src/lib/cache/Makefile.in @@ -197,8 +197,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -215,6 +213,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -296,6 +296,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/cache/evas_cache_engine_image.c b/libraries/evas/src/lib/cache/evas_cache_engine_image.c index 8ae4392..5ec1af2 100644 --- a/libraries/evas/src/lib/cache/evas_cache_engine_image.c +++ b/libraries/evas/src/lib/cache/evas_cache_engine_image.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include "evas_common.h" diff --git a/libraries/evas/src/lib/cache/evas_cache_image.c b/libraries/evas/src/lib/cache/evas_cache_image.c index d52c64e..73e4f8a 100644 --- a/libraries/evas/src/lib/cache/evas_cache_image.c +++ b/libraries/evas/src/lib/cache/evas_cache_image.c @@ -918,12 +918,8 @@ evas_cache_image_drop(Image_Entry *im) EAPI void evas_cache_image_data_not_needed(Image_Entry *im) { - Evas_Cache_Image *cache; int references; - /* FIXME: no one uses this api... well evas_cache_engine_parent_not_needed() - * does, but nothing uses that! */ - cache = im->cache; #ifdef EVAS_FRAME_QUEUING LKL(im->lock_references); #endif @@ -941,11 +937,12 @@ evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned { Image_Entry *im_dirty = im; Evas_Cache_Image *cache; - int references; cache = im->cache; if (!(im->flags.dirty)) { +#ifndef EVAS_CSERVE + int references; #ifdef EVAS_FRAME_QUEUING LKL(im->lock_references); #endif @@ -953,21 +950,18 @@ evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned #ifdef EVAS_FRAME_QUEUING LKU(im->lock_references); #endif -#ifndef EVAS_CSERVE // if ref 1 also copy if using shared cache as its read-only if (references == 1) im_dirty = im; else #endif { - int error; - im_dirty = evas_cache_image_copied_data(cache, im->w, im->h, evas_cache_image_pixels(im), im->flags.alpha, im->space); if (!im_dirty) goto on_error; if (cache->func.debug) cache->func.debug("dirty-src", im); - error = cache->func.dirty(im_dirty, im); + cache->func.dirty(im_dirty, im); if (cache->func.debug) cache->func.debug("dirty-out", im_dirty); #ifdef EVAS_FRAME_QUEUING LKL(im_dirty->lock_references); @@ -1014,15 +1008,13 @@ evas_cache_image_alone(Image_Entry *im) } else { - int error; - im_dirty = evas_cache_image_copied_data(cache, im->w, im->h, evas_cache_image_pixels(im), im->flags.alpha, im->space); if (!im_dirty) goto on_error; if (cache->func.debug) cache->func.debug("dirty-src", im); - error = cache->func.dirty(im_dirty, im); + cache->func.dirty(im_dirty, im); if (cache->func.debug) cache->func.debug("dirty-out", im_dirty); #ifdef EVAS_FRAME_QUEUING LKL(im_dirty->lock_references); @@ -1296,6 +1288,7 @@ evas_cache_image_preload_cancel(Image_Entry *im, const void *target) _evas_cache_image_entry_preload_remove(im, target); #else (void)im; + (void)target; #endif } diff --git a/libraries/evas/src/lib/cache/evas_preload.c b/libraries/evas/src/lib/cache/evas_preload.c index 6e0412a..5eebaed 100644 --- a/libraries/evas/src/lib/cache/evas_preload.c +++ b/libraries/evas/src/lib/cache/evas_preload.c @@ -225,6 +225,7 @@ evas_preload_thread_run(void (*func_heavy) (void *data), If no thread and as we don't want to break app that rely on this facility, we will lock the interface until we are done. */ + (void)func_cancel; func_heavy((void *)data); func_end((void *)data); return (void *)1; @@ -253,12 +254,13 @@ evas_preload_thread_cancel(Evas_Preload_Pthread *thread) } } LKU(_mutex); - + /* Delay the destruction */ work = (Evas_Preload_Pthread_Worker *)thread; work->cancel = EINA_TRUE; return EINA_FALSE; #else + (void) thread; return EINA_TRUE; #endif } diff --git a/libraries/evas/src/lib/canvas/Makefile.in b/libraries/evas/src/lib/canvas/Makefile.in index 0b4e15d..75da67a 100644 --- a/libraries/evas/src/lib/canvas/Makefile.in +++ b/libraries/evas/src/lib/canvas/Makefile.in @@ -211,8 +211,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -229,6 +227,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -310,6 +310,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/canvas/evas_callbacks.c b/libraries/evas/src/lib/canvas/evas_callbacks.c index 33b93bc..93f34f2 100644 --- a/libraries/evas/src/lib/canvas/evas_callbacks.c +++ b/libraries/evas/src/lib/canvas/evas_callbacks.c @@ -23,7 +23,7 @@ _evas_post_event_callback_call(Evas *e) { if (!pc->func((void*)pc->data, e)) skip = 1; } - EVAS_MEMPOOL_FREE(_mp_pc, pc); + EVAS_MEMPOOL_FREE(_mp_pc, pc); } _evas_unwalk(e); } @@ -32,10 +32,10 @@ void _evas_post_event_callback_free(Evas *e) { Evas_Post_Callback *pc; - + EINA_LIST_FREE(e->post_events, pc) { - EVAS_MEMPOOL_FREE(_mp_pc, pc); + EVAS_MEMPOOL_FREE(_mp_pc, pc); } _evas_unwalk(e); } @@ -48,15 +48,15 @@ evas_event_callback_list_post_free(Eina_Inlist **list) /* MEM OK */ for (l = *list; l;) { - Evas_Func_Node *fn; + Evas_Func_Node *fn; - fn = (Evas_Func_Node *)l; - l = l->next; - if (fn->delete_me) - { + fn = (Evas_Func_Node *)l; + l = l->next; + if (fn->delete_me) + { *list = eina_inlist_remove(*list, EINA_INLIST_GET(fn)); EVAS_MEMPOOL_FREE(_mp_fn, fn); - } + } } } @@ -70,7 +70,7 @@ evas_object_event_callback_clear(Evas_Object *obj) if (!obj->callbacks->callbacks) { EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks); - obj->callbacks = NULL; + obj->callbacks = NULL; } } @@ -84,7 +84,7 @@ evas_event_callback_clear(Evas *e) if (!e->callbacks->callbacks) { EVAS_MEMPOOL_FREE(_mp_cb, e->callbacks); - e->callbacks = NULL; + e->callbacks = NULL; } } @@ -95,7 +95,7 @@ evas_object_event_callback_all_del(Evas_Object *obj) if (!obj->callbacks) return; EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) - fn->delete_me = 1; + fn->delete_me = 1; } void @@ -115,7 +115,7 @@ evas_event_callback_all_del(Evas *e) if (!e->callbacks) return; EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) - fn->delete_me = 1; + fn->delete_me = 1; } void @@ -136,25 +136,25 @@ evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info) _evas_walk(e); if (e->callbacks) { - l_mod = &e->callbacks->callbacks; + l_mod = &e->callbacks->callbacks; e->callbacks->walking_list++; for (l = *l_mod; l; l = l->next) { - Evas_Func_Node *fn; - - fn = (Evas_Func_Node *)l; - if ((fn->type == type) && (!fn->delete_me)) - { - Evas_Event_Cb func = fn->func; - if (func) - func(fn->data, e, event_info); - } - if (e->delete_me) break; + Evas_Func_Node *fn; + + fn = (Evas_Func_Node *)l; + if ((fn->type == type) && (!fn->delete_me)) + { + Evas_Event_Cb func = fn->func; + if (func) + func(fn->data, e, event_info); + } + if (e->delete_me) break; } e->callbacks->walking_list--; if (!e->callbacks->walking_list) { - evas_event_callback_clear(e); + evas_event_callback_clear(e); l_mod = NULL; } } @@ -162,7 +162,7 @@ evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info) } void -evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info) +evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id) { /* MEM OK */ Eina_Inlist **l_mod = NULL, *l; @@ -170,67 +170,67 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void Evas *e; if ((obj->delete_me) || (!obj->layer)) return; - if ((obj->last_event == _evas_event_counter) && + if ((obj->last_event == event_id) && (obj->last_event_type == type)) return; - obj->last_event = _evas_event_counter; + obj->last_event = event_id; obj->last_event_type = type; if (!(e = obj->layer->evas)) return; _evas_walk(e); if (obj->callbacks) { - l_mod = &obj->callbacks->callbacks; + l_mod = &obj->callbacks->callbacks; switch (type) { - case EVAS_CALLBACK_MOUSE_DOWN: - { - Evas_Event_Mouse_Down *ev = event_info; - - flags = ev->flags; - if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) - { - if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1)) - ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); - } - obj->last_mouse_down_counter = e->last_mouse_down_counter; - break; - } - case EVAS_CALLBACK_MOUSE_UP: - { - Evas_Event_Mouse_Up *ev = event_info; - - flags = ev->flags; - if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) - { - if (obj->last_mouse_up_counter < (e->last_mouse_up_counter - 1)) - ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); - } - obj->last_mouse_up_counter = e->last_mouse_up_counter; - break; - } - default: - break; + case EVAS_CALLBACK_MOUSE_DOWN: + { + Evas_Event_Mouse_Down *ev = event_info; + + flags = ev->flags; + if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) + { + if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1)) + ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); + } + obj->last_mouse_down_counter = e->last_mouse_down_counter; + break; + } + case EVAS_CALLBACK_MOUSE_UP: + { + Evas_Event_Mouse_Up *ev = event_info; + + flags = ev->flags; + if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) + { + if (obj->last_mouse_up_counter < (e->last_mouse_up_counter - 1)) + ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); + } + obj->last_mouse_up_counter = e->last_mouse_up_counter; + break; + } + default: + break; } obj->callbacks->walking_list++; for (l = *l_mod; l; l = l->next) { - Evas_Func_Node *fn; - - fn = (Evas_Func_Node *)l; - if ((fn->type == type) && (!fn->delete_me)) - { - Evas_Object_Event_Cb func = fn->func; - if (func) - func(fn->data, obj->layer->evas, obj, event_info); - } - if (obj->delete_me) break; + Evas_Func_Node *fn; + + fn = (Evas_Func_Node *)l; + if ((fn->type == type) && (!fn->delete_me)) + { + Evas_Object_Event_Cb func = fn->func; + if (func) + func(fn->data, obj->layer->evas, obj, event_info); + } + if (obj->delete_me) break; } obj->callbacks->walking_list--; if (!obj->callbacks->walking_list) - { - evas_object_event_callback_clear(obj); - l_mod = NULL; - } + { + evas_object_event_callback_clear(obj); + l_mod = NULL; + } if (type == EVAS_CALLBACK_MOUSE_DOWN) { @@ -246,12 +246,12 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void if (!((obj->no_propagate) && (l_mod) && (*l_mod))) { - if (!obj->no_propagate) - { - if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) && - (type <= EVAS_CALLBACK_KEY_UP)) - evas_object_event_callback_call(obj->smart.parent, type, event_info); - } + if (!obj->no_propagate) + { + if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) && + (type <= EVAS_CALLBACK_KEY_UP)) + evas_object_event_callback_call(obj->smart.parent, type, event_info, event_id); + } } _evas_unwalk(e); } @@ -263,16 +263,16 @@ _callback_priority_cmp(const void *_a, const void *_b) a = EINA_INLIST_CONTAINER_GET(_a, Evas_Func_Node); b = EINA_INLIST_CONTAINER_GET(_b, Evas_Func_Node); if (a->priority < b->priority) - return -1; + return -1; else - return 1; + return 1; } EAPI void evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) { evas_object_event_callback_priority_add(obj, type, - EVAS_CALLBACK_PRIORITY_DEFAULT, func, data); + EVAS_CALLBACK_PRIORITY_DEFAULT, func, data); } EAPI void @@ -294,7 +294,7 @@ evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type typ if (!obj->callbacks) return; EVAS_MEMPOOL_PREP(_mp_cb, obj->callbacks, Evas_Callbacks); } - + EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, ); fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); if (!fn) return; @@ -305,8 +305,8 @@ evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type typ fn->priority = priority; obj->callbacks->callbacks = - eina_inlist_sorted_insert(obj->callbacks->callbacks, EINA_INLIST_GET(fn), - _callback_priority_cmp); + eina_inlist_sorted_insert(obj->callbacks->callbacks, EINA_INLIST_GET(fn), + _callback_priority_cmp); } EAPI void * @@ -325,17 +325,17 @@ evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_O EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) { - if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) - { - void *tmp; - - tmp = fn->data; - fn->delete_me = 1; - obj->callbacks->deletions_waiting = 1; - if (!obj->callbacks->walking_list) - evas_object_event_callback_clear(obj); - return tmp; - } + if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) + { + void *tmp; + + tmp = fn->data; + fn->delete_me = 1; + obj->callbacks->deletions_waiting = 1; + if (!obj->callbacks->walking_list) + evas_object_event_callback_clear(obj); + return tmp; + } } return NULL; } @@ -356,17 +356,17 @@ evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, E EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) { - if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) - { - void *tmp; - - tmp = fn->data; - fn->delete_me = 1; - obj->callbacks->deletions_waiting = 1; - if (!obj->callbacks->walking_list) - evas_object_event_callback_clear(obj); - return tmp; - } + if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) + { + void *tmp; + + tmp = fn->data; + fn->delete_me = 1; + obj->callbacks->deletions_waiting = 1; + if (!obj->callbacks->walking_list) + evas_object_event_callback_clear(obj); + return tmp; + } } return NULL; } @@ -375,7 +375,7 @@ EAPI void evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) { evas_event_callback_priority_add(e, type, EVAS_CALLBACK_PRIORITY_DEFAULT, - func, data); + func, data); } EAPI void @@ -397,7 +397,7 @@ evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback if (!e->callbacks) return; EVAS_MEMPOOL_PREP(_mp_cb, e->callbacks, Evas_Callbacks); } - + EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, ); fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); if (!fn) return; @@ -408,7 +408,7 @@ evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback fn->priority = priority; e->callbacks->callbacks = eina_inlist_sorted_insert(e->callbacks->callbacks, - EINA_INLIST_GET(fn), _callback_priority_cmp); + EINA_INLIST_GET(fn), _callback_priority_cmp); } EAPI void * @@ -427,17 +427,17 @@ evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) { - if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) - { - void *data; - - data = fn->data; - fn->delete_me = 1; - e->callbacks->deletions_waiting = 1; - if (!e->callbacks->walking_list) - evas_event_callback_clear(e); - return data; - } + if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) + { + void *data; + + data = fn->data; + fn->delete_me = 1; + e->callbacks->deletions_waiting = 1; + if (!e->callbacks->walking_list) + evas_event_callback_clear(e); + return data; + } } return NULL; } @@ -458,17 +458,17 @@ evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb fun EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) { - if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) - { - void *tmp; - - tmp = fn->data; - fn->delete_me = 1; - e->callbacks->deletions_waiting = 1; - if (!e->callbacks->walking_list) - evas_event_callback_clear(e); - return tmp; - } + if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) + { + void *tmp; + + tmp = fn->data; + fn->delete_me = 1; + e->callbacks->deletions_waiting = 1; + if (!e->callbacks->walking_list) + evas_event_callback_clear(e); + return tmp; + } } return NULL; } @@ -477,17 +477,17 @@ EAPI void evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data) { Evas_Post_Callback *pc; - + MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); - + EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, ); pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback); if (!pc) return; EVAS_MEMPOOL_PREP(_mp_pc, pc, Evas_Post_Callback); if (e->delete_me) return; - + pc->func = func; pc->data = data; e->post_events = eina_list_prepend(e->post_events, pc); @@ -498,11 +498,11 @@ evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func) { Evas_Post_Callback *pc; Eina_List *l; - + MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); - + EINA_LIST_FOREACH(e->post_events, l, pc) { if (pc->func == func) @@ -518,11 +518,11 @@ evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, co { Evas_Post_Callback *pc; Eina_List *l; - + MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); - + EINA_LIST_FOREACH(e->post_events, l, pc) { if ((pc->func == func) && (pc->data == data)) diff --git a/libraries/evas/src/lib/canvas/evas_events.c b/libraries/evas/src/lib/canvas/evas_events.c index 99ecf8c..9b7077e 100644 --- a/libraries/evas/src/lib/canvas/evas_events.c +++ b/libraries/evas/src/lib/canvas/evas_events.c @@ -1,6 +1,11 @@ #include "evas_common.h" #include "evas_private.h" +static Eina_List * +_evas_event_object_list_in_get(Evas *e, Eina_List *in, + const Eina_Inlist *list, Evas_Object *stop, + int x, int y, int *no_rep); + static void _evas_event_havemap_adjust(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Eina_Bool mouse_grabbed) { @@ -16,13 +21,17 @@ _evas_event_havemap_adjust(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Eina_ } static Eina_List * -_evas_event_object_list_in_get(Evas *e, Eina_List *in, - const Eina_Inlist *list, Evas_Object *stop, - int x, int y, int *no_rep) +_evas_event_object_list_raw_in_get(Evas *e, Eina_List *in, + const Eina_Inlist *list, Evas_Object *stop, + int x, int y, int *no_rep) { Evas_Object *obj; + int inside; + if (!list) return in; - EINA_INLIST_REVERSE_FOREACH(list, obj) + for (obj = _EINA_INLIST_CONTAINER(obj, list); + obj; + obj = _EINA_INLIST_CONTAINER(obj, EINA_INLIST_GET(obj)->prev)) { if (obj == stop) { @@ -37,9 +46,9 @@ _evas_event_object_list_in_get(Evas *e, Eina_List *in, if (obj->smart.smart) { int norep = 0; - int inside; - if (((obj->cur.usemap) && (obj->cur.map) && (obj->cur.map->count == 4))) + if ((obj->cur.usemap) && (obj->cur.map) && + (obj->cur.map->count == 4)) { inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); if (inside) @@ -57,7 +66,8 @@ _evas_event_object_list_in_get(Evas *e, Eina_List *in, evas_object_smart_members_get_direct(obj), stop, obj->cur.geometry.x + obj->cur.map->mx, - obj->cur.geometry.y + obj->cur.map->my, &norep); + obj->cur.geometry.y + obj->cur.map->my, + &norep); } } } @@ -69,19 +79,24 @@ _evas_event_object_list_in_get(Evas *e, Eina_List *in, } if (norep) { - if (!obj->repeat_events) *no_rep = 1; - return in; + if (!obj->repeat_events) + { + *no_rep = 1; + return in; + } } } else { - int inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); + inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); - if (((obj->cur.usemap) && (obj->cur.map) && (obj->cur.map->count == 4))) + if ((obj->cur.usemap) && (obj->cur.map) && + (obj->cur.map->count == 4)) { - if ((inside) && (!evas_map_coords_get(obj->cur.map, x, y, - &(obj->cur.map->mx), - &(obj->cur.map->my), 0))) + if ((inside) && + (!evas_map_coords_get(obj->cur.map, x, y, + &(obj->cur.map->mx), + &(obj->cur.map->my), 0))) { inside = 0; } @@ -105,6 +120,16 @@ _evas_event_object_list_in_get(Evas *e, Eina_List *in, return in; } +static Eina_List * +_evas_event_object_list_in_get(Evas *e, Eina_List *in, + const Eina_Inlist *list, Evas_Object *stop, + int x, int y, int *no_rep) +{ + if (!list) return NULL; + return _evas_event_object_list_raw_in_get(e, in, list->last, stop, + x, y, no_rep); +} + Eina_List * evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y) { @@ -136,6 +161,24 @@ evas_event_list_copy(Eina_List *list) /* public functions */ EAPI void +evas_event_default_flags_set(Evas *e, Evas_Event_Flags flags) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + e->default_event_flags = flags; +} + +EAPI Evas_Event_Flags +evas_event_default_flags_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return EVAS_EVENT_FLAG_ON_HOLD; + MAGIC_CHECK_END(); + return e->default_event_flags; +} + +EAPI void evas_event_freeze(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); @@ -197,6 +240,8 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int Eina_List *l, *copy; Evas_Event_Mouse_Down ev; Evas_Object *obj; + int addgrab = 0; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; @@ -205,12 +250,14 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int if ((b < 1) || (b > 32)) return; e->pointer.button |= (1 << (b - 1)); + e->pointer.downs++; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_object_event_new(); + event_id = _evas_event_counter; ev.button = b; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; @@ -221,7 +268,7 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int ev.locks = &(e->locks); ev.flags = flags; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); /* append new touch point to the touch point list */ @@ -238,14 +285,23 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int e->pointer.object.in = eina_list_free(e->pointer.object.in); /* and set up the new one */ e->pointer.object.in = ins; + /* adjust grabbed count by the nuymber of currently held down + * fingers/buttons */ + if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1; } copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { - if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) + if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) || + (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)) { - obj->mouse_grabbed++; - e->pointer.mouse_grabbed++; + obj->mouse_grabbed += addgrab + 1; + e->pointer.mouse_grabbed += addgrab + 1; + if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) + { + e->pointer.nogrep++; + break; + } } } EINA_LIST_FOREACH(copy, l, obj) @@ -256,8 +312,10 @@ evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev, event_id); if (e->delete_me) break; + if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) + break; } if (copy) eina_list_free(copy); e->last_mouse_down_counter++; @@ -274,9 +332,11 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data) Evas_Event_Mouse_Out ev; Evas_Object *obj; int post_called = 0; + int event_id = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; @@ -286,7 +346,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data) ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; /* get new list of ins */ ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y); @@ -304,7 +364,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data) { obj->mouse_in = 0; if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); } } if (e->delete_me) break; @@ -319,6 +379,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data) _evas_object_event_new(); + event_id = _evas_event_counter; ev_in.buttons = e->pointer.button; ev_in.output.x = e->pointer.x; ev_in.output.y = e->pointer.y; @@ -328,7 +389,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data) ev_in.modifiers = &(e->modifiers); ev_in.locks = &(e->locks); ev_in.timestamp = timestamp; - ev_in.event_flags = EVAS_EVENT_FLAG_NONE; + ev_in.event_flags = e->default_event_flags; EINA_LIST_FOREACH(ins, l, obj_itr) { @@ -341,7 +402,7 @@ _post_up_handle(Evas *e, unsigned int timestamp, const void *data) { obj_itr->mouse_in = 1; if (e->events_frozen <= 0) - evas_object_event_callback_call(obj_itr, EVAS_CALLBACK_MOUSE_IN, &ev_in); + evas_object_event_callback_call(obj_itr, EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id); } } if (e->delete_me) break; @@ -383,6 +444,7 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t if ((b < 1) || (b > 32)) return; e->pointer.button &= ~(1 << (b - 1)); + e->pointer.downs--; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; @@ -390,9 +452,11 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t { Evas_Event_Mouse_Up ev; Evas_Object *obj; + int event_id = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.button = b; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; @@ -403,7 +467,7 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t ev.locks = &(e->locks); ev.flags = flags; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); /* update released touch point */ @@ -414,7 +478,7 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); - if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) && + if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) && (obj->mouse_grabbed > 0)) { obj->mouse_grabbed--; @@ -423,9 +487,14 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t if (!obj->delete_me) { if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev, event_id); } if (e->delete_me) break; + if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) + { + if (e->pointer.nogrep > 0) e->pointer.nogrep--; + break; + } } if (copy) copy = eina_list_free(copy); e->last_mouse_up_counter++; @@ -442,9 +511,9 @@ evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int t ERR("BUG? e->pointer.mouse_grabbed (=%d) < 0!", e->pointer.mouse_grabbed); } - /* remove released touch point from the touch point list */ + /* remove released touch point from the touch point list */ _evas_touch_point_remove(e, 0); - + _evas_unwalk(e); } @@ -465,6 +534,7 @@ evas_event_feed_mouse_cancel(Evas *e, unsigned int timestamp, const void *data) if ((e->pointer.button & (1 << i))) evas_event_feed_mouse_up(e, i + 1, 0, timestamp, data); } + // FIXME: multi cancel too? _evas_unwalk(e); } @@ -474,6 +544,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam Eina_List *l, *copy; Evas_Event_Mouse_Wheel ev; Evas_Object *obj; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; @@ -484,6 +555,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam _evas_object_event_new(); + event_id = _evas_event_counter; ev.direction = direction; ev.z = z; ev.output.x = e->pointer.x; @@ -494,7 +566,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); copy = evas_event_list_copy(e->pointer.object.in); @@ -505,7 +577,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam ev.canvas.y = e->pointer.y; _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj)) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev, event_id); if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); @@ -517,6 +589,7 @@ evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestam EAPI void evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const void *data) { + Evas_Object *nogrep_obj = NULL; int px, py; //// Evas_Coord pcx, pcy; @@ -553,9 +626,11 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const { Evas_Event_Mouse_Move ev; Evas_Object *obj; + int event_id = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.cur.output.x = e->pointer.x; ev.cur.output.y = e->pointer.y; @@ -569,7 +644,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { @@ -586,19 +661,28 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const (!obj->clip.clipees)) { if ((px != x) || (py != y)) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); } else outs = eina_list_append(outs, obj); + if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) && + (e->pointer.nogrep > 0)) + { + eina_list_free(copy); + nogrep_obj = obj; + goto nogrep; + } if (e->delete_me) break; } _evas_post_event_callback_call(e); } { Evas_Event_Mouse_Out ev; + int event_id = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; @@ -608,7 +692,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; if (copy) eina_list_free(copy); while (outs) @@ -629,7 +713,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const if (!obj->delete_me) { if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); } } } @@ -645,9 +729,11 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const Evas_Event_Mouse_Out ev2; Evas_Event_Mouse_In ev3; Evas_Object *obj; + int event_id = 0, event_id2 = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.cur.output.x = e->pointer.x; ev.cur.output.y = e->pointer.y; @@ -661,7 +747,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; ev2.buttons = e->pointer.button; ev2.output.x = e->pointer.x; @@ -672,7 +758,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev2.modifiers = &(e->modifiers); ev2.locks = &(e->locks); ev2.timestamp = timestamp; - ev2.event_flags = EVAS_EVENT_FLAG_NONE; + ev2.event_flags = e->default_event_flags; ev3.buttons = e->pointer.button; ev3.output.x = e->pointer.x; @@ -683,7 +769,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev3.modifiers = &(e->modifiers); ev3.locks = &(e->locks); ev3.timestamp = timestamp; - ev3.event_flags = EVAS_EVENT_FLAG_NONE; + ev3.event_flags = e->default_event_flags; /* get all new in objects */ ins = evas_event_objects_event_list(e, NULL, x, y); @@ -711,7 +797,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev.cur.canvas.x = e->pointer.x; ev.cur.canvas.y = e->pointer.y; _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); } } /* otherwise it has left the object */ @@ -724,7 +810,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const ev2.canvas.y = e->pointer.y; _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed); if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); } } if (e->delete_me) break; @@ -733,6 +819,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const _evas_object_event_new(); + event_id2 = _evas_event_counter; if (copy) copy = eina_list_free(copy); /* go thru our current list of ins */ EINA_LIST_FOREACH(ins, l, obj) @@ -747,7 +834,7 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const { obj->mouse_in = 1; if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); } } if (e->delete_me) break; @@ -766,6 +853,160 @@ evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const } _evas_post_event_callback_call(e); } + _evas_unwalk(e); + return; +nogrep: + { + Eina_List *ins = NULL; + Eina_List *newin = NULL; + Eina_List *l, *copy, *lst = NULL; + Evas_Event_Mouse_Move ev; + Evas_Event_Mouse_Out ev2; + Evas_Event_Mouse_In ev3; + Evas_Object *obj, *below_obj; + int event_id = 0, event_id2 = 0; + int norep = 0, breaknext = 0; + + _evas_object_event_new(); + + event_id = _evas_event_counter; + ev.buttons = e->pointer.button; + ev.cur.output.x = e->pointer.x; + ev.cur.output.y = e->pointer.y; + ev.cur.canvas.x = e->pointer.x; + ev.cur.canvas.y = e->pointer.y; + ev.prev.output.x = px; + ev.prev.output.y = py; + ev.prev.canvas.x = px; + ev.prev.canvas.y = py; + ev.data = (void *)data; + ev.modifiers = &(e->modifiers); + ev.locks = &(e->locks); + ev.timestamp = timestamp; + ev.event_flags = e->default_event_flags; + + ev2.buttons = e->pointer.button; + ev2.output.x = e->pointer.x; + ev2.output.y = e->pointer.y; + ev2.canvas.x = e->pointer.x; + ev2.canvas.y = e->pointer.y; + ev2.data = (void *)data; + ev2.modifiers = &(e->modifiers); + ev2.locks = &(e->locks); + ev2.timestamp = timestamp; + ev2.event_flags = e->default_event_flags; + + ev3.buttons = e->pointer.button; + ev3.output.x = e->pointer.x; + ev3.output.y = e->pointer.y; + ev3.canvas.x = e->pointer.x; + ev3.canvas.y = e->pointer.y; + ev3.data = (void *)data; + ev3.modifiers = &(e->modifiers); + ev3.locks = &(e->locks); + ev3.timestamp = timestamp; + ev3.event_flags = e->default_event_flags; + + /* go thru old list of in objects */ + copy = evas_event_list_copy(e->pointer.object.in); + EINA_LIST_FOREACH(copy, l, obj) + { + if (breaknext) + { + lst = l; + break; + } + if (obj == nogrep_obj) breaknext = 1; + } + + /* get all new in objects */ + below_obj = evas_object_below_get(nogrep_obj); + if (below_obj) + ins = _evas_event_object_list_raw_in_get(e, NULL, + EINA_INLIST_GET(below_obj), NULL, + e->pointer.x, e->pointer.y, + &norep); + EINA_LIST_FOREACH(copy, l, obj) + { + newin = eina_list_append(newin, obj); + if (obj == nogrep_obj) break; + } + EINA_LIST_FOREACH(ins, l, obj) + { + newin = eina_list_append(newin, obj); + } + + EINA_LIST_FOREACH(lst, l, obj) + { + /* if its under the pointer and its visible and its in the new */ + /* in list */ + // FIXME: i don't think we need this + // evas_object_clip_recalc(obj); + if ((e->events_frozen <= 0) && + evas_object_is_in_output_rect(obj, x, y, 1, 1) && + (evas_object_clippers_is_visible(obj) || + obj->mouse_grabbed) && + eina_list_data_find(newin, obj) && + (!evas_event_passes_through(obj)) && + (!evas_event_freezes_through(obj)) && + (!obj->clip.clipees) && + ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y)) + ) + { + if ((px != x) || (py != y)) + { + ev.cur.canvas.x = e->pointer.x; + ev.cur.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); + } + } + /* otherwise it has left the object */ + else + { + if (obj->mouse_in) + { + obj->mouse_in = 0; + ev2.canvas.x = e->pointer.x; + ev2.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed); + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); + } + } + if (e->delete_me) break; + } + _evas_post_event_callback_call(e); + + _evas_object_event_new(); + + event_id2 = _evas_event_counter; + if (copy) copy = eina_list_free(copy); + /* go thru our current list of ins */ + EINA_LIST_FOREACH(newin, l, obj) + { + ev3.canvas.x = e->pointer.x; + ev3.canvas.y = e->pointer.y; + _evas_event_havemap_adjust(obj, &ev3.canvas.x, &ev3.canvas.y, obj->mouse_grabbed); + /* if its not in the old list of ins send an enter event */ + if (!eina_list_data_find(e->pointer.object.in, obj)) + { + if (!obj->mouse_in) + { + obj->mouse_in = 1; + if (e->events_frozen <= 0) + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); + } + } + if (e->delete_me) break; + } + /* free our old list of ins */ + eina_list_free(e->pointer.object.in); + /* and set up the new one */ + e->pointer.object.in = newin; + + _evas_post_event_callback_call(e); + } _evas_unwalk(e); } @@ -776,6 +1017,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data) Eina_List *l; Evas_Event_Mouse_In ev; Evas_Object *obj; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; @@ -789,6 +1031,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data) _evas_object_event_new(); + event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; @@ -798,7 +1041,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data) ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); /* get new list of ins */ @@ -814,7 +1057,7 @@ evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data) { obj->mouse_in = 1; if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev, event_id); } } if (e->delete_me) break; @@ -832,6 +1075,7 @@ EAPI void evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) { Evas_Event_Mouse_Out ev; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; @@ -843,6 +1087,7 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) _evas_object_event_new(); + event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; @@ -852,11 +1097,10 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); - /* if our mouse button is grabbed to any objects */ - if (e->pointer.mouse_grabbed == 0) + /* if our mouse button is inside any objects */ { /* go thru old list of in objects */ Eina_List *l, *copy; @@ -874,14 +1118,16 @@ evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) if (!obj->delete_me) { if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); } + obj->mouse_grabbed = 0; } if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); /* free our old list of ins */ e->pointer.object.in = eina_list_free(e->pointer.object.in); + e->pointer.mouse_grabbed = 0; _evas_post_event_callback_call(e); } _evas_unwalk(e); @@ -899,16 +1145,20 @@ evas_event_feed_multi_down(Evas *e, Eina_List *l, *copy; Evas_Event_Multi_Down ev; Evas_Object *obj; + int addgrab = 0; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); + e->pointer.downs++; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_object_event_new(); + event_id = _evas_event_counter; ev.device = d; ev.output.x = x; ev.output.y = y; @@ -926,18 +1176,22 @@ evas_event_feed_multi_down(Evas *e, ev.locks = &(e->locks); ev.flags = flags; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); /* append new touch point to the touch point list */ _evas_touch_point_append(e, d, x, y); + if (e->pointer.mouse_grabbed == 0) + { + if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1; + } copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) { - obj->mouse_grabbed++; - e->pointer.mouse_grabbed++; + obj->mouse_grabbed += addgrab + 1; + e->pointer.mouse_grabbed += addgrab + 1; } } EINA_LIST_FOREACH(copy, l, obj) @@ -952,7 +1206,7 @@ evas_event_feed_multi_down(Evas *e, if (y != ev.canvas.y) ev.canvas.ysub = ev.canvas.y; // fixme - lost precision if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev, event_id); if (e->delete_me) break; } if (copy) eina_list_free(copy); @@ -974,16 +1228,19 @@ evas_event_feed_multi_up(Evas *e, Eina_List *l, *copy; Evas_Event_Multi_Up ev; Evas_Object *obj; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); + e->pointer.downs--; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_object_event_new(); + event_id = _evas_event_counter; ev.device = d; ev.output.x = x; ev.output.y = y; @@ -1001,7 +1258,7 @@ evas_event_feed_multi_up(Evas *e, ev.locks = &(e->locks); ev.flags = flags; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); /* update released touch point */ @@ -1025,7 +1282,7 @@ evas_event_feed_multi_up(Evas *e, e->pointer.mouse_grabbed--; } if (e->events_frozen <= 0) - evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev, event_id); if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); @@ -1051,7 +1308,7 @@ evas_event_feed_multi_move(Evas *e, if (e->events_frozen > 0) return; e->last_timestamp = timestamp; - if (!e->pointer.inside) return; + if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return; _evas_walk(e); /* update moved touch point */ @@ -1063,9 +1320,11 @@ evas_event_feed_multi_move(Evas *e, Eina_List *l, *copy; Evas_Event_Multi_Move ev; Evas_Object *obj; + int event_id = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.device = d; ev.cur.output.x = x; ev.cur.output.y = y; @@ -1082,7 +1341,7 @@ evas_event_feed_multi_move(Evas *e, ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) @@ -1102,7 +1361,7 @@ evas_event_feed_multi_move(Evas *e, ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision if (y != ev.cur.canvas.y) ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision - evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); } if (e->delete_me) break; } @@ -1114,9 +1373,11 @@ evas_event_feed_multi_move(Evas *e, Eina_List *l, *copy; Evas_Event_Multi_Move ev; Evas_Object *obj; + int event_id = 0; _evas_object_event_new(); + event_id = _evas_event_counter; ev.device = d; ev.cur.output.x = x; ev.cur.output.y = y; @@ -1133,7 +1394,7 @@ evas_event_feed_multi_move(Evas *e, ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; /* get all new in objects */ ins = evas_event_objects_event_list(e, NULL, x, y); @@ -1165,7 +1426,7 @@ evas_event_feed_multi_move(Evas *e, ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision if (y != ev.cur.canvas.y) ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision - evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); } if (e->delete_me) break; } @@ -1190,6 +1451,7 @@ evas_event_feed_multi_move(Evas *e, EAPI void evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) { + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); @@ -1204,6 +1466,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch _evas_object_event_new(); + event_id = _evas_event_counter; exclusive = EINA_FALSE; ev.keyname = (char *)keyname; ev.data = (void *)data; @@ -1213,7 +1476,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch ev.string = string; ev.compose = compose; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; if (e->grabs) { @@ -1239,7 +1502,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch !evas_event_freezes_through(g->object)) evas_object_event_callback_call(g->object, EVAS_CALLBACK_KEY_DOWN, - &ev); + &ev, event_id); if (g->exclusive) exclusive = EINA_TRUE; } } @@ -1266,7 +1529,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch { if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused)) evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_DOWN, - &ev); + &ev, event_id); } _evas_post_event_callback_call(e); _evas_unwalk(e); @@ -1275,6 +1538,7 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const ch EAPI void evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) { + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); @@ -1288,6 +1552,7 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char _evas_object_event_new(); + event_id = _evas_event_counter; exclusive = EINA_FALSE; ev.keyname = (char *)keyname; ev.data = (void *)data; @@ -1297,7 +1562,7 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char ev.string = string; ev.compose = compose; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; if (e->grabs) { @@ -1322,7 +1587,7 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char if (e->events_frozen <= 0 && !evas_event_freezes_through(g->object)) evas_object_event_callback_call(g->object, - EVAS_CALLBACK_KEY_UP, &ev); + EVAS_CALLBACK_KEY_UP, &ev, event_id); if (g->exclusive) exclusive = EINA_TRUE; } if (e->delete_me) break; @@ -1349,7 +1614,7 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char { if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused)) evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_UP, - &ev); + &ev, event_id); } _evas_post_event_callback_call(e); _evas_unwalk(e); @@ -1361,6 +1626,7 @@ evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data Eina_List *l, *copy; Evas_Event_Hold ev; Evas_Object *obj; + int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; @@ -1371,17 +1637,18 @@ evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data _evas_object_event_new(); + event_id = _evas_event_counter; ev.hold = hold; ev.data = (void *)data; ev.timestamp = timestamp; - ev.event_flags = EVAS_EVENT_FLAG_NONE; + ev.event_flags = e->default_event_flags; _evas_walk(e); copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj)) - evas_object_event_callback_call(obj, EVAS_CALLBACK_HOLD, &ev); + evas_object_event_callback_call(obj, EVAS_CALLBACK_HOLD, &ev, event_id); if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); @@ -1528,75 +1795,84 @@ evas_object_pointer_mode_get(const Evas_Object *obj) EAPI void evas_event_refeed_event(Evas *e, void *event_copy, Evas_Callback_Type event_type) { - switch(event_type) + switch (event_type) { case EVAS_CALLBACK_MOUSE_IN: - { - Evas_Event_Mouse_In *ev = event_copy; - evas_event_feed_mouse_in(e, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Mouse_In *ev = event_copy; + evas_event_feed_mouse_in(e, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_MOUSE_OUT: - { - Evas_Event_Mouse_Out *ev = event_copy; - evas_event_feed_mouse_out(e, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Mouse_Out *ev = event_copy; + evas_event_feed_mouse_out(e, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_MOUSE_DOWN: - { - Evas_Event_Mouse_Down *ev = event_copy; - evas_event_feed_mouse_down(e, ev->button, ev->flags, ev-> timestamp, ev->data); - break; - } + { + Evas_Event_Mouse_Down *ev = event_copy; + evas_event_feed_mouse_down(e, ev->button, ev->flags, ev-> timestamp, ev->data); + break; + } case EVAS_CALLBACK_MOUSE_UP: - { - Evas_Event_Mouse_Up *ev = event_copy; - evas_event_feed_mouse_up(e, ev->button, ev->flags, ev-> timestamp, ev->data); - break; - } + { + Evas_Event_Mouse_Up *ev = event_copy; + evas_event_feed_mouse_up(e, ev->button, ev->flags, ev-> timestamp, ev->data); + break; + } case EVAS_CALLBACK_MOUSE_MOVE: - { - Evas_Event_Mouse_Move *ev = event_copy; - evas_event_feed_mouse_move(e, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Mouse_Move *ev = event_copy; + evas_event_feed_mouse_move(e, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_MOUSE_WHEEL: - { - Evas_Event_Mouse_Wheel *ev = event_copy; - evas_event_feed_mouse_wheel(e, ev->direction, ev-> z, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Mouse_Wheel *ev = event_copy; + evas_event_feed_mouse_wheel(e, ev->direction, ev-> z, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_MULTI_DOWN: - { - Evas_Event_Multi_Down *ev = event_copy; - evas_event_feed_multi_down(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Multi_Down *ev = event_copy; + evas_event_feed_multi_down(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_MULTI_UP: - { - Evas_Event_Multi_Up *ev = event_copy; - evas_event_feed_multi_up(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Multi_Up *ev = event_copy; + evas_event_feed_multi_up(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_MULTI_MOVE: - { - Evas_Event_Multi_Move *ev = event_copy; - evas_event_feed_multi_move(e, ev->device, ev->cur.canvas.x, ev->cur.canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->cur.canvas.xsub, ev->cur.canvas.ysub, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Multi_Move *ev = event_copy; + evas_event_feed_multi_move(e, ev->device, ev->cur.canvas.x, ev->cur.canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->cur.canvas.xsub, ev->cur.canvas.ysub, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_KEY_DOWN: - { - Evas_Event_Key_Down *ev = event_copy; - evas_event_feed_key_down(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Key_Down *ev = event_copy; + evas_event_feed_key_down(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); + break; + } case EVAS_CALLBACK_KEY_UP: - { - Evas_Event_Key_Up *ev = event_copy; - evas_event_feed_key_up(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); - break; - } + { + Evas_Event_Key_Up *ev = event_copy; + evas_event_feed_key_up(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); + break; + } default: /* All non-input events are not handeled */ - break; + break; } } + +EAPI int +evas_event_down_count_get(const Evas *e) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return 0; + MAGIC_CHECK_END(); + return e->pointer.downs; +} diff --git a/libraries/evas/src/lib/canvas/evas_focus.c b/libraries/evas/src/lib/canvas/evas_focus.c index a1a3bca..29da7e7 100644 --- a/libraries/evas/src/lib/canvas/evas_focus.c +++ b/libraries/evas/src/lib/canvas/evas_focus.c @@ -10,29 +10,31 @@ EAPI void evas_object_focus_set(Evas_Object *obj, Eina_Bool focus) { + int event_id = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); _evas_object_event_new(); + event_id = _evas_event_counter; if (focus) { - if (obj->focused) goto end; - if (obj->layer->evas->focused) - evas_object_focus_set(obj->layer->evas->focused, 0); - obj->focused = 1; - obj->layer->evas->focused = obj; - evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_IN, NULL); + if (obj->focused) goto end; + if (obj->layer->evas->focused) + evas_object_focus_set(obj->layer->evas->focused, 0); + obj->focused = 1; + obj->layer->evas->focused = obj; + evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_IN, NULL, event_id); evas_event_callback_call(obj->layer->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, obj); } else { - if (!obj->focused) goto end; - obj->focused = 0; - obj->layer->evas->focused = NULL; - evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL); + if (!obj->focused) goto end; + obj->focused = 0; + obj->layer->evas->focused = NULL; + evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL, event_id); evas_event_callback_call(obj->layer->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, obj); } diff --git a/libraries/evas/src/lib/canvas/evas_gl.c b/libraries/evas/src/lib/canvas/evas_gl.c index 47bb583..85ed851 100644 --- a/libraries/evas/src/lib/canvas/evas_gl.c +++ b/libraries/evas/src/lib/canvas/evas_gl.c @@ -37,6 +37,13 @@ evas_gl_new(Evas *e) evas_gl->magic = MAGIC_EVAS_GL; evas_gl->evas = e; + if (!evas_gl->evas->engine.func->gl_context_create) + { + ERR("GL engine not available\n"); + free(evas_gl); + return NULL; + } + return evas_gl; } @@ -60,6 +67,24 @@ evas_gl_free(Evas_GL *evas_gl) free(evas_gl); } +EAPI Evas_GL_Config * +evas_gl_config_new() +{ + Evas_GL_Config *cfg; + + cfg = calloc(1, sizeof(Evas_GL_Config)); + + if (!cfg) return NULL; + + return cfg; +} + +EAPI void +evas_gl_config_free(Evas_GL_Config *cfg) +{ + if (cfg) free(cfg); +} + EAPI Evas_GL_Surface * evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int height) { @@ -77,6 +102,8 @@ evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int surf = calloc(1, sizeof(Evas_GL_Surface)); + if (!surf) return NULL; + surf->data = evas_gl->evas->engine.func->gl_surface_create(evas_gl->evas->engine.data.output, config, width, height); if (!surf->data) diff --git a/libraries/evas/src/lib/canvas/evas_main.c b/libraries/evas/src/lib/canvas/evas_main.c index 0a37b2c..687744f 100644 --- a/libraries/evas/src/lib/canvas/evas_main.c +++ b/libraries/evas/src/lib/canvas/evas_main.c @@ -118,12 +118,16 @@ evas_new(void) e->output.render_method = RENDER_METHOD_INVALID; e->viewport.w = 1; e->viewport.h = 1; + e->framespace.x = 0; + e->framespace.y = 0; + e->framespace.w = 0; + e->framespace.h = 0; e->hinting = EVAS_FONT_HINTING_BYTECODE; e->name_hash = eina_hash_string_superfast_new(NULL); eina_clist_init(&e->calc_list); eina_clist_init(&e->calc_done); -#define EVAS_ARRAY_SET(E, Array) \ +#define EVAS_ARRAY_SET(E, Array) \ eina_array_step_set(&E->Array, sizeof (E->Array), 4096); EVAS_ARRAY_SET(e, delete_objects); @@ -408,6 +412,41 @@ evas_output_viewport_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord if (h) *h = e->viewport.h; } +EAPI void +evas_output_framespace_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + return; + MAGIC_CHECK_END(); + + if ((x == e->framespace.x) && (y == e->framespace.y) && + (w == e->framespace.w) && (h == e->framespace.h)) return; + e->framespace.x = x; + e->framespace.y = y; + e->framespace.w = w; + e->framespace.h = h; + e->framespace.changed = 1; + e->output_validity++; + e->changed = 1; +} + +EAPI void +evas_output_framespace_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +{ + MAGIC_CHECK(e, Evas, MAGIC_EVAS); + if (x) *x = 0; + if (y) *y = 0; + if (w) *w = 0; + if (h) *h = 0; + return; + MAGIC_CHECK_END(); + + if (x) *x = e->framespace.x; + if (y) *y = e->framespace.y; + if (w) *w = e->framespace.w; + if (h) *h = e->framespace.h; +} + EAPI Evas_Coord evas_coord_screen_x_to_world(const Evas *e, int x) { diff --git a/libraries/evas/src/lib/canvas/evas_map.c b/libraries/evas/src/lib/canvas/evas_map.c index fca8b3a..2359d5a 100644 --- a/libraries/evas/src/lib/canvas/evas_map.c +++ b/libraries/evas/src/lib/canvas/evas_map.c @@ -81,17 +81,19 @@ _evas_map_calc_map_geometry(Evas_Object *obj) p = obj->cur.map->points; p_end = p + obj->cur.map->count; - x1 = lround(p->x); - x2 = lround(p->x); - y1 = lround(p->y); - y2 = lround(p->y); + x1 = x2 = lround(p->x); + y1 = y2 = lround(p->y); p++; for (; p < p_end; p++) { - if (p->x < x1) x1 = p->x; - if (p->x > x2) x2 = p->x; - if (p->y < y1) y1 = p->y; - if (p->y > y2) y2 = p->y; + Evas_Coord x, y; + + x = lround(p->x); + y = lround(p->y); + if (x < x1) x1 = x; + if (x > x2) x2 = x; + if (y < y1) y1 = y; + if (y > y2) y2 = y; } // this causes clip-out bugs now mapped objs canbe opaque!!! // // add 1 pixel of fuzz around the map region to ensure updates are correct diff --git a/libraries/evas/src/lib/canvas/evas_name.c b/libraries/evas/src/lib/canvas/evas_name.c index c42f941..1a9d20f 100644 --- a/libraries/evas/src/lib/canvas/evas_name.c +++ b/libraries/evas/src/lib/canvas/evas_name.c @@ -38,3 +38,35 @@ evas_object_name_find(const Evas *e, const char *name) if (!name) return NULL; return (Evas_Object *)eina_hash_find(e->name_hash, name); } + +static Evas_Object * +_evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse) +{ + const Eina_Inlist *lst; + Evas_Object *child; + + if (!obj->smart.smart) return NULL; + lst = evas_object_smart_members_get_direct(obj); + EINA_INLIST_FOREACH(lst, child) + { + if (child->delete_me) continue; + if (!child->name) continue; + if (!strcmp(name, child->name)) return child; + if (recurse != 0) + { + if ((obj = _evas_object_name_child_find(child, name, recurse - 1))) + return (Evas_Object *)obj; + } + } + return NULL; +} + +EAPI Evas_Object * +evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + if (!name) return NULL; + return _evas_object_name_child_find(obj, name, recurse); +} diff --git a/libraries/evas/src/lib/canvas/evas_object_box.c b/libraries/evas/src/lib/canvas/evas_object_box.c index ab2f222..228d37c 100644 --- a/libraries/evas/src/lib/canvas/evas_object_box.c +++ b/libraries/evas/src/lib/canvas/evas_object_box.c @@ -1363,7 +1363,7 @@ _evas_object_box_layout_flow_horizontal_row_info_collect(Evas_Object_Box_Data *p EAPI void evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) { - int n_children, v_justify; + int n_children; int r, row_count = 0; int min_w = 0, min_h = 0; int max_h, inc_y; @@ -1398,7 +1398,6 @@ evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *pri (priv, w, &row_count, row_max_h, row_break, row_width, &offset_y, &max_h); inc_y = 0; - v_justify = 0; remain_y = h - (offset_y + max_h); if (remain_y > 0) diff --git a/libraries/evas/src/lib/canvas/evas_object_grid.c b/libraries/evas/src/lib/canvas/evas_object_grid.c index ac96f04..db0f43d 100644 --- a/libraries/evas/src/lib/canvas/evas_object_grid.c +++ b/libraries/evas/src/lib/canvas/evas_object_grid.c @@ -1,5 +1,5 @@ -#include #include "evas_common.h" +#include typedef struct _Evas_Object_Grid_Data Evas_Object_Grid_Data; typedef struct _Evas_Object_Grid_Option Evas_Object_Grid_Option; diff --git a/libraries/evas/src/lib/canvas/evas_object_image.c b/libraries/evas/src/lib/canvas/evas_object_image.c index 7f757a6..d9f6378 100644 --- a/libraries/evas/src/lib/canvas/evas_object_image.c +++ b/libraries/evas/src/lib/canvas/evas_object_image.c @@ -1,7 +1,13 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" /* so that EAPI in Evas.h is correctly defined */ +#endif + #include #include #include -#include +#ifdef HAVE_SYS_MMAN_H +# include +#endif #include #include "evas_common.h" @@ -192,8 +198,9 @@ evas_object_image_filled_add(Evas *e) static void _cleanup_tmpf(Evas_Object *obj) { +#ifdef HAVE_SYS_MMAN_H Evas_Object_Image *o; - + o = (Evas_Object_Image *)(obj->object_data); if (!o->tmpf) return; #ifdef __linux__ @@ -204,11 +211,15 @@ _cleanup_tmpf(Evas_Object *obj) eina_stringshare_del(o->tmpf); o->tmpf_fd = -1; o->tmpf = NULL; +#else + (void) obj; +#endif } static void _create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__) { +#ifdef HAVE_SYS_MMAN_H Evas_Object_Image *o; char buf[4096]; void *dst; @@ -253,6 +264,12 @@ _create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__) o->tmpf = eina_stringshare_add(buf); memcpy(dst, data, size); munmap(dst, size); +#else + (void) obj; + (void) data; + (void) size; + (void) format; +#endif } EAPI void @@ -1917,6 +1934,24 @@ evas_object_image_content_hint_get(const Evas_Object *obj) return o->content_hint; } +EAPI Eina_Bool +evas_object_image_region_support_get(const Evas_Object *obj) +{ + Evas_Object_Image *o; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + o = (Evas_Object_Image *) (obj->object_data); + MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); + return EINA_FALSE; + MAGIC_CHECK_END(); + + return obj->layer->evas->engine.func->image_can_region_get( + obj->layer->evas->engine.data.output, + o->engine_data); +} + /* animated feature */ EAPI Eina_Bool evas_object_image_animated_get(const Evas_Object *obj) @@ -3770,8 +3805,7 @@ evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_C to_cspace); break; case EVAS_COLORSPACE_YCBCR422601_PL: - fprintf(stderr, "EVAS_COLORSPACE_YCBCR422601_PL:\n"); - out = evas_common_convert_yuv_422_601_to(data, + out = evas_common_convert_yuv_422_601_to(data, o->cur.image.w, o->cur.image.h, to_cspace); @@ -3795,7 +3829,7 @@ evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_C to_cspace); break; default: - fprintf(stderr, "unknow colorspace: %i\n", o->cur.cspace); + WRN("unknow colorspace: %i\n", o->cur.cspace); break; } @@ -3806,9 +3840,7 @@ static void evas_object_image_filled_resize_listener(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *einfo __UNUSED__) { Evas_Coord w, h; - Evas_Object_Image *o; - o = obj->object_data; evas_object_geometry_get(obj, NULL, NULL, &w, &h); evas_object_image_fill_set(obj, 0, 0, w, h); } diff --git a/libraries/evas/src/lib/canvas/evas_object_inform.c b/libraries/evas/src/lib/canvas/evas_object_inform.c index bc09eb9..302da42 100644 --- a/libraries/evas/src/lib/canvas/evas_object_inform.c +++ b/libraries/evas/src/lib/canvas/evas_object_inform.c @@ -8,7 +8,7 @@ evas_object_inform_call_show(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_SHOW, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_SHOW, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -17,7 +17,7 @@ evas_object_inform_call_hide(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_HIDE, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_HIDE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -26,7 +26,7 @@ evas_object_inform_call_move(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_MOVE, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_MOVE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -35,7 +35,7 @@ evas_object_inform_call_resize(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_RESIZE, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_RESIZE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -44,7 +44,7 @@ evas_object_inform_call_restack(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_RESTACK, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_RESTACK, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -53,7 +53,7 @@ evas_object_inform_call_changed_size_hints(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -65,7 +65,7 @@ evas_object_inform_call_image_preloaded(Evas_Object *obj) _evas_object_image_preloading_set(obj, 0); _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } @@ -74,6 +74,6 @@ evas_object_inform_call_image_unloaded(Evas_Object *obj) { _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } diff --git a/libraries/evas/src/lib/canvas/evas_object_intercept.c b/libraries/evas/src/lib/canvas/evas_object_intercept.c index c3e5e24..54f7265 100644 --- a/libraries/evas/src/lib/canvas/evas_object_intercept.c +++ b/libraries/evas/src/lib/canvas/evas_object_intercept.c @@ -9,7 +9,6 @@ static void evas_object_intercept_deinit(Evas_Object *obj); static void evas_object_intercept_init(Evas_Object *obj) { - /* MEM OK */ if (!obj->interceptors) obj->interceptors = evas_mem_calloc(sizeof(Evas_Intercept_Func)); } @@ -17,7 +16,6 @@ evas_object_intercept_init(Evas_Object *obj) static void evas_object_intercept_deinit(Evas_Object *obj) { - /* MEM OK */ if (!obj->interceptors) return; if ((obj->interceptors->show.func) || (obj->interceptors->hide.func) || @@ -41,199 +39,186 @@ evas_object_intercept_deinit(Evas_Object *obj) void evas_object_intercept_cleanup(Evas_Object *obj) { - /* MEM OK */ if (obj->interceptors) free(obj->interceptors); } int evas_object_intercept_call_show(Evas_Object *obj) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->show.func); - if (obj->interceptors->show.func) + if (ret) obj->interceptors->show.func(obj->interceptors->show.data, obj); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_hide(Evas_Object *obj) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->hide.func); - if (obj->interceptors->hide.func) + if (ret) obj->interceptors->hide.func(obj->interceptors->hide.data, obj); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->move.func); - if (obj->interceptors->move.func) + if (ret) obj->interceptors->move.func(obj->interceptors->move.data, obj, x, y); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->resize.func); - if (obj->interceptors->resize.func) + if (ret) obj->interceptors->resize.func(obj->interceptors->resize.data, obj, w, h); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_raise(Evas_Object *obj) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->raise.func); - if (obj->interceptors->raise.func) + if (ret) obj->interceptors->raise.func(obj->interceptors->raise.data, obj); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_lower(Evas_Object *obj) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->lower.func); - if (obj->interceptors->lower.func) + if (ret) obj->interceptors->lower.func(obj->interceptors->lower.data, obj); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->stack_above.func); - if (obj->interceptors->stack_above.func) + if (ret) obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, obj, above); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->stack_below.func); - if (obj->interceptors->stack_below.func) + if (ret) obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, obj, below); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_layer_set(Evas_Object *obj, int l) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->layer_set.func); - if (obj->interceptors->layer_set.func) + if (ret) obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, obj, l); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->color_set.func); - if (obj->interceptors->color_set.func) + if (ret) obj->interceptors->color_set.func(obj->interceptors->color_set.data, obj, r, g, b, a); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->clip_set.func); - if (obj->interceptors->clip_set.func) + if (ret) obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, obj, clip); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_clip_unset(Evas_Object *obj) { - /* MEM OK */ int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; - obj->intercepted = 1; + obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->clip_unset.func); - if (obj->interceptors->clip_unset.func) + if (ret) obj->interceptors->clip_unset.func(obj->interceptors->clip_unset.data, obj); - obj->intercepted = 0; + obj->intercepted = EINA_FALSE; return ret; } @@ -242,8 +227,6 @@ evas_object_intercept_call_clip_unset(Evas_Object *obj) EAPI void evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data) { - /* MEM OK */ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -257,7 +240,6 @@ evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_ EAPI void * evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -275,7 +257,6 @@ evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_ EAPI void evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -289,7 +270,6 @@ evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_ EAPI void * evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -307,7 +287,6 @@ evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_ EAPI void evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -321,7 +300,6 @@ evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_ EAPI void * evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -339,7 +317,6 @@ evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_ EAPI void evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -353,7 +330,6 @@ evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercep EAPI void * evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -371,7 +347,6 @@ evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercep EAPI void evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -385,7 +360,6 @@ evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept EAPI void * evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -403,7 +377,6 @@ evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept EAPI void evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -417,7 +390,6 @@ evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept EAPI void * evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -435,7 +407,6 @@ evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept EAPI void evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -449,7 +420,6 @@ evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Int EAPI void * evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -467,7 +437,6 @@ evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Int EAPI void evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -481,7 +450,6 @@ evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Int EAPI void * evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -499,7 +467,6 @@ evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Int EAPI void evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -513,7 +480,6 @@ evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Inter EAPI void * evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -531,7 +497,6 @@ evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Inter EAPI void evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -545,7 +510,6 @@ evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Inter EAPI void * evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -563,7 +527,6 @@ evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Inter EAPI void evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -577,7 +540,6 @@ evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Interc EAPI void * evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); @@ -595,7 +557,6 @@ evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Interc EAPI void evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data) { - /* MEM OK */ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); @@ -609,7 +570,6 @@ evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Inte EAPI void * evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) { - /* MEM OK */ void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); diff --git a/libraries/evas/src/lib/canvas/evas_object_main.c b/libraries/evas/src/lib/canvas/evas_object_main.c index 3eaded9..86ab498 100644 --- a/libraries/evas/src/lib/canvas/evas_object_main.c +++ b/libraries/evas/src/lib/canvas/evas_object_main.c @@ -25,6 +25,7 @@ evas_object_new(Evas *e __UNUSED__) obj->magic = MAGIC_OBJ; obj->cur.scale = 1.0; obj->prev.scale = 1.0; + obj->is_frame = EINA_FALSE; return obj; } @@ -99,7 +100,8 @@ evas_object_change(Evas_Object *obj) /* set changed flag on all objects this one clips too */ if (!((movch) && (obj->is_static_clip))) { - EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) evas_object_change(obj2); + EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) + evas_object_change(obj2); } EINA_LIST_FOREACH(obj->proxy.proxies, l, obj2) { @@ -111,8 +113,8 @@ evas_object_change(Evas_Object *obj) void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v) { - if (obj->smart.smart) return ; - if (is_v == was_v) return ; + if (obj->smart.smart) return; + if (is_v == was_v) return; if (is_v) { evas_add_rect(rects, @@ -134,8 +136,8 @@ evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int i void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj) { - if (obj->smart.smart) return ; - if (obj->cur.clipper == obj->prev.clipper) return ; + if (obj->smart.smart) return; + if (obj->cur.clipper == obj->prev.clipper) return; if ((obj->cur.clipper) && (obj->prev.clipper)) { /* get difference rects between clippers */ @@ -223,7 +225,8 @@ evas_object_clip_changes_clean(Evas_Object *obj) { Eina_Rectangle *r; - EINA_LIST_FREE(obj->clip.changes, r) eina_rectangle_free(r); + EINA_LIST_FREE(obj->clip.changes, r) + eina_rectangle_free(r); } void @@ -408,11 +411,11 @@ evas_object_del(Evas_Object *obj) obj->focused = 0; obj->layer->evas->focused = NULL; _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_DEL, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_DEL, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); if (obj->mouse_grabbed > 0) obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed; @@ -426,9 +429,6 @@ evas_object_del(Evas_Object *obj) evas_object_free(obj, 1); return; } - obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed; - obj->mouse_grabbed = 0; - obj->mouse_in = 0; evas_object_grabs_cleanup(obj); while (obj->clip.clipees) evas_object_clip_unset(obj->clip.clipees->data); @@ -438,7 +438,7 @@ evas_object_del(Evas_Object *obj) if (obj->smart.smart) evas_object_smart_del(obj); evas_object_map_set(obj, NULL); _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_FREE, NULL); + evas_object_event_callback_call(obj, EVAS_CALLBACK_FREE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); evas_object_smart_cleanup(obj); obj->delete_me = 1; @@ -449,18 +449,38 @@ EAPI void evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) { int is, was = 0, pass = 0, freeze = 0; + int nx = 0, ny = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; - if (evas_object_intercept_call_move(obj, x, y)) return; + + nx = x; + ny = y; + + if (!obj->is_frame) + { + int fx, fy; + + evas_output_framespace_get(obj->layer->evas, &fx, &fy, NULL, NULL); + if (!obj->smart.parent) + { + nx += fx; + ny += fy; + } + } + + if (evas_object_intercept_call_move(obj, nx, ny)) return; + if (obj->doing.in_move > 0) { WRN("evas_object_move() called on object %p when in the middle of moving the same object", obj); return; } - if ((obj->cur.geometry.x == x) && (obj->cur.geometry.y == y)) return; + + if ((obj->cur.geometry.x == nx) && (obj->cur.geometry.y == ny)) return; + if (obj->layer->evas->events_frozen <= 0) { pass = evas_event_passes_through(obj); @@ -471,13 +491,16 @@ evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) obj->layer->evas->pointer.y, 1, 1); } obj->doing.in_move++; + if (obj->smart.smart) { if (obj->smart.smart->smart_class->move) - obj->smart.smart->smart_class->move(obj, x, y); + obj->smart.smart->smart_class->move(obj, nx, ny); } - obj->cur.geometry.x = x; - obj->cur.geometry.y = y; + + obj->cur.geometry.x = nx; + obj->cur.geometry.y = ny; + //// obj->cur.cache.geometry.validity = 0; obj->changed_move = 1; evas_object_change(obj); @@ -509,19 +532,40 @@ EAPI void evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) { int is, was = 0, pass = 0, freeze =0; + int nw = 0, nh = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; if (w < 0) w = 0; if (h < 0) h = 0; - if (evas_object_intercept_call_resize(obj, w, h)) return; + + nw = w; + nh = h; + if (!obj->is_frame) + { + int fw, fh; + + evas_output_framespace_get(obj->layer->evas, NULL, NULL, &fw, &fh); + if (!obj->smart.parent) + { + nw = w - fw; + nh = h - fh; + if (nw < 0) nw = 0; + if (nh < 0) nh = 0; + } + } + + if (evas_object_intercept_call_resize(obj, nw, nh)) return; + if (obj->doing.in_resize > 0) { WRN("evas_object_resize() called on object %p when in the middle of resizing the same object", obj); return; } - if ((obj->cur.geometry.w == w) && (obj->cur.geometry.h == h)) return; + + if ((obj->cur.geometry.w == nw) && (obj->cur.geometry.h == nh)) return; + if (obj->layer->evas->events_frozen <= 0) { pass = evas_event_passes_through(obj); @@ -532,13 +576,16 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) obj->layer->evas->pointer.y, 1, 1); } obj->doing.in_resize++; + if (obj->smart.smart) { if (obj->smart.smart->smart_class->resize) - obj->smart.smart->smart_class->resize(obj, w, h); + obj->smart.smart->smart_class->resize(obj, nw, nh); } - obj->cur.geometry.w = w; - obj->cur.geometry.h = h; + + obj->cur.geometry.w = nw; + obj->cur.geometry.h = nh; + //// obj->cur.cache.geometry.validity = 0; evas_object_change(obj); evas_object_clip_dirty(obj); @@ -581,6 +628,7 @@ evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, E if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; return; } + if (x) *x = obj->cur.geometry.x; if (y) *y = obj->cur.geometry.y; if (w) *w = obj->cur.geometry.w; @@ -1084,8 +1132,7 @@ evas_object_render_op_set(Evas_Object *obj, Evas_Render_Op render_op) return; MAGIC_CHECK_END(); if (obj->delete_me) return; - if ((Evas_Render_Op)obj->cur.render_op == render_op) - return; + if (obj->cur.render_op == render_op) return; obj->cur.render_op = render_op; evas_object_change(obj); } @@ -1317,3 +1364,20 @@ evas_object_static_clip_get(const Evas_Object *obj) return obj->is_static_clip; } +EAPI void +evas_object_is_frame_object_set(Evas_Object *obj, Eina_Bool is_frame) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return; + MAGIC_CHECK_END(); + obj->is_frame = is_frame; +} + +EAPI Eina_Bool +evas_object_is_frame_object_get(Evas_Object *obj) +{ + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return EINA_FALSE; + MAGIC_CHECK_END(); + return obj->is_frame; +} diff --git a/libraries/evas/src/lib/canvas/evas_object_smart.c b/libraries/evas/src/lib/canvas/evas_object_smart.c index a7dfcdf..69d7f3b 100644 --- a/libraries/evas/src/lib/canvas/evas_object_smart.c +++ b/libraries/evas/src/lib/canvas/evas_object_smart.c @@ -402,6 +402,37 @@ evas_object_smart_callback_del(Evas_Object *obj, const char *event, Evas_Smart_C return NULL; } +EAPI void * +evas_object_smart_callback_del_full(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) +{ + Evas_Object_Smart *o; + Eina_List *l; + Evas_Smart_Callback *cb; + + MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); + return NULL; + MAGIC_CHECK_END(); + o = (Evas_Object_Smart *)(obj->object_data); + MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART); + return NULL; + MAGIC_CHECK_END(); + if (!event) return NULL; + EINA_LIST_FOREACH(o->callbacks, l, cb) + { + if ((!strcmp(cb->event, event)) && (cb->func == func) && (cb->func_data == data)) + { + void *ret; + + ret = cb->func_data; + cb->delete_me = 1; + o->deletions_waiting = 1; + evas_object_smart_callbacks_clear(obj); + return ret; + } + } + return NULL; +} + EAPI void evas_object_smart_callback_call(Evas_Object *obj, const char *event, void *event_info) { diff --git a/libraries/evas/src/lib/canvas/evas_object_table.c b/libraries/evas/src/lib/canvas/evas_object_table.c index 6e28fce..cdfa07f 100644 --- a/libraries/evas/src/lib/canvas/evas_object_table.c +++ b/libraries/evas/src/lib/canvas/evas_object_table.c @@ -1,5 +1,5 @@ -#include #include "evas_common.h" +#include typedef struct _Evas_Object_Table_Data Evas_Object_Table_Data; typedef struct _Evas_Object_Table_Option Evas_Object_Table_Option; diff --git a/libraries/evas/src/lib/canvas/evas_object_text.c b/libraries/evas/src/lib/canvas/evas_object_text.c index 6c30fcc..dbe5e08 100644 --- a/libraries/evas/src/lib/canvas/evas_object_text.c +++ b/libraries/evas/src/lib/canvas/evas_object_text.c @@ -531,8 +531,9 @@ _evas_object_text_layout(Evas_Object *obj, Evas_Object_Text *o, const Eina_Unico { EvasBiDiStrIndex *v_to_l = NULL; size_t pos, visual_pos; - int len = eina_unicode_strlen(text), par_len; + int len = eina_unicode_strlen(text); #ifdef BIDI_SUPPORT + int par_len = len; int *segment_idxs = NULL; if (o->bidi_delimiters) segment_idxs = evas_bidi_segment_idxs_get(text, o->bidi_delimiters); @@ -543,7 +544,6 @@ _evas_object_text_layout(Evas_Object *obj, Evas_Object_Text *o, const Eina_Unico #endif visual_pos = pos = 0; - par_len = len; while (len > 0) { Evas_Font_Instance *script_fi = NULL; diff --git a/libraries/evas/src/lib/canvas/evas_object_textblock.c b/libraries/evas/src/lib/canvas/evas_object_textblock.c index 7941a45..568911c 100644 --- a/libraries/evas/src/lib/canvas/evas_object_textblock.c +++ b/libraries/evas/src/lib/canvas/evas_object_textblock.c @@ -61,13 +61,13 @@ * @subsection textblock_layout The layout system * @todo write @ref textblock_layout */ -#include - #include "evas_common.h" #include "evas_private.h" +#include #ifdef HAVE_LINEBREAK #include "linebreak.h" +#include "wordbreak.h" #endif /* save typing */ @@ -78,12 +78,19 @@ static const char o_type[] = "textblock"; /* The char to be inserted instead of visible formats */ -#define EVAS_TEXTBLOCK_REPLACEMENT_CHAR 0xFFFC +#define _REPLACEMENT_CHAR 0xFFFC #define _PARAGRAPH_SEPARATOR 0x2029 +#define _NEWLINE '\n' +#define _TAB '\t' + +#define _REPLACEMENT_CHAR_UTF8 "\xEF\xBF\xBC" +#define _PARAGRAPH_SEPARATOR_UTF8 "\xE2\x80\xA9" +#define _NEWLINE_UTF8 "\n" +#define _TAB_UTF8 "\t" #define EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(ch) \ - (((ch) == EVAS_TEXTBLOCK_REPLACEMENT_CHAR) || \ - ((ch) == '\n') || \ - ((ch) == '\t') || \ + (((ch) == _REPLACEMENT_CHAR) || \ + ((ch) == _NEWLINE) || \ + ((ch) == _TAB) || \ ((ch) == _PARAGRAPH_SEPARATOR)) /* private struct for textblock object internal data */ @@ -101,6 +108,12 @@ typedef struct _Evas_Object_Textblock Evas_Object_Textblock; typedef struct _Evas_Object_Style_Tag Evas_Object_Style_Tag; /** * @internal + * @typedef Evas_Object_Style_Tag + * The structure used for finding style tags. + */ +typedef struct _Evas_Object_Style_Tag_Base Evas_Object_Style_Tag_Base; +/** + * @internal * @typedef Evas_Object_Textblock_Node_Text * A text node. */ @@ -195,21 +208,26 @@ typedef struct _Evas_Object_Textblock_Format Evas_Object_Textblock_Format; * Returns true if closer is the closer of base. */ #define _FORMAT_IS_CLOSER_OF(base, closer, closer_len) \ - (!strncmp(base + 1, closer, closer_len) && \ - (!base[closer_len + 1] || \ - (base[closer_len + 1] == '=') || \ - _is_white(base[closer_len + 1]))) + (!strncmp(base, closer, closer_len) && \ + (!base[closer_len] || \ + (base[closer_len] == '=') || \ + _is_white(base[closer_len]))) /*FIXME: document the structs and struct items. */ -struct _Evas_Object_Style_Tag +struct _Evas_Object_Style_Tag_Base { - EINA_INLIST; char *tag; char *replace; size_t tag_len; size_t replace_len; }; +struct _Evas_Object_Style_Tag +{ + EINA_INLIST; + Evas_Object_Style_Tag_Base tag; +}; + struct _Evas_Object_Textblock_Node_Text { EINA_INLIST; @@ -229,11 +247,18 @@ struct _Evas_Object_Textblock_Node_Format Evas_Object_Textblock_Node_Text *text_node; size_t offset; unsigned char anchor : 2; + Eina_Bool opener : 1; + Eina_Bool own_closer : 1; Eina_Bool visible : 1; Eina_Bool format_change : 1; Eina_Bool is_new : 1; }; +/* The default tags to use */ +static const Evas_Object_Style_Tag_Base default_tags[] = { + { "b", "+ font_weight=Bold", 1, 18 }, + { "i", "+ font_style=Italic", 1, 19 }}; + #define ANCHOR_NONE 0 #define ANCHOR_A 1 #define ANCHOR_ITEM 2 @@ -538,8 +563,8 @@ _style_replace(Evas_Textblock_Style *ts, const char *style_text) tag = (Evas_Object_Style_Tag *)ts->tags; ts->tags = (Evas_Object_Style_Tag *)eina_inlist_remove(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag)); - free(tag->tag); - free(tag->replace); + free(tag->tag.tag); + free(tag->tag.replace); free(tag); } ts->default_tag = NULL; @@ -567,19 +592,38 @@ _style_clear(Evas_Textblock_Style *ts) * @return The replacement string found. */ static inline const char * -_style_match_tag(Evas_Textblock_Style *ts, const char *s, size_t tag_len, size_t *replace_len) +_style_match_tag(const Evas_Textblock_Style *ts, const char *s, size_t tag_len, size_t *replace_len) { Evas_Object_Style_Tag *tag; + /* Try the style tags */ EINA_INLIST_FOREACH(ts->tags, tag) { - if (tag->tag_len != tag_len) continue; - if (!strncmp(tag->tag, s, tag_len)) + if (tag->tag.tag_len != tag_len) continue; + if (!strncmp(tag->tag.tag, s, tag_len)) { - *replace_len = tag->replace_len; - return tag->replace; + *replace_len = tag->tag.replace_len; + return tag->tag.replace; } } + + /* Try the default tags */ + { + size_t i; + const Evas_Object_Style_Tag_Base *btag; + for (btag = default_tags, i = 0 ; + i < (sizeof(default_tags) / sizeof(default_tags[0])) ; + btag++, i++) + { + if (btag->tag_len != tag_len) continue; + if (!strncmp(btag->tag, s, tag_len)) + { + *replace_len = btag->replace_len; + return btag->replace; + } + } + } + *replace_len = 0; return NULL; } @@ -1689,8 +1733,8 @@ _format_fill(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char *st s = str; - /* get rid of anything +s or -s off the start of the string */ - while ((*s == ' ') || (*s == '+') || (*s == '-')) s++; + /* get rid of any spaces at the start of the string */ + while (*s == ' ') s++; while ((item = _format_parse(&s))) { @@ -2131,7 +2175,6 @@ _layout_format_pop(Ctxt *c, const char *format) if ((c->format_stack) && (c->format_stack->next)) { Eina_List *redo_nodes = NULL; - format++; /* Skip the '-' */ /* Generic pop, should just pop. */ if (((format[0] == ' ') && !format[1]) || @@ -2994,21 +3037,29 @@ _format_finalize(Evas_Object *obj, Evas_Object_Textblock_Format *fmt) * @def _IS_TAB(item) */ #define _IS_TAB(item) \ - (!strcmp(item, "\t") || !strcmp(item, "\\t")) + (!strcmp(item, "tab") || !strcmp(item, "\t") || !strcmp(item, "\\t")) /** * @internal * Returns true if the item is a line spearator, false otherwise * @def _IS_LINE_SEPARATOR(item) */ #define _IS_LINE_SEPARATOR(item) \ - (!strcmp(item, "\n") || !strcmp(item, "\\n")) + (!strcmp(item, "br") || !strcmp(item, "\n") || !strcmp(item, "\\n")) /** * @internal * Returns true if the item is a paragraph separator, false otherwise * @def _IS_PARAGRAPH_SEPARATOR(item) */ +#define _IS_PARAGRAPH_SEPARATOR_SIMPLE(item) \ + (!strcmp(item, "ps")) +/** + * @internal + * Returns true if the item is a paragraph separator, false otherwise + * takes legacy mode into account. + * @def _IS_PARAGRAPH_SEPARATOR(item) + */ #define _IS_PARAGRAPH_SEPARATOR(o, item) \ - (!strcmp(item, "ps") || \ + (_IS_PARAGRAPH_SEPARATOR_SIMPLE(item) || \ (o->legacy_newline && _IS_LINE_SEPARATOR(item))) /* Paragraph separator */ /** @@ -3041,7 +3092,7 @@ _layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c, int handled = 0; s = n->format; - if (!strncmp(s, "+ item ", 7)) + if (!strncmp(s, "item ", 5)) { // one of: // item size=20x10 href=name @@ -3133,16 +3184,14 @@ _layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c, if (!handled) { Eina_Bool push_fmt = EINA_FALSE; - if (s[0] == '+') + if (n->opener && !n->own_closer) { fmt = _layout_format_push(c, fmt, n); - s++; push_fmt = EINA_TRUE; } - else if (s[0] == '-') + else if (!n->opener) { fmt = _layout_format_pop(c, n->orig_format); - s++; } while ((item = _format_parse(&s))) { @@ -3166,7 +3215,7 @@ _layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c, fi->parent.w = fi->parent.adv = 0; } - else if ((!strcmp(item, "\t")) || (!strcmp(item, "\\t"))) + else if (_IS_TAB(item)) { Evas_Object_Textblock_Format_Item *fi; @@ -3215,28 +3264,33 @@ _layout_update_par(Ctxt *c) /* -1 means no wrap */ static int _layout_get_charwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, - const Evas_Object_Textblock_Text_Item *ti, size_t line_start, + const Evas_Object_Textblock_Item *it, size_t line_start, const char *breaks) { int wrap; size_t uwrap; - size_t len = eina_ustrbuf_length_get(ti->parent.text_node->unicode); + size_t len = eina_ustrbuf_length_get(it->text_node->unicode); /* Currently not being used, because it doesn't contain relevant * information */ (void) breaks; { - wrap = _layout_text_cutoff_get(c, fmt, ti); + if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) + wrap = 0; + else + wrap = _layout_text_cutoff_get(c, fmt, _ITEM_TEXT(it)); + if (wrap < 0) return -1; - uwrap = (size_t) wrap + ti->parent.text_pos; + uwrap = (size_t) wrap + it->text_pos; } - if (uwrap == line_start) + if ((uwrap == line_start) && (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)) { - uwrap = ti->parent.text_pos + - (size_t) evas_common_text_props_cluster_next(&ti->text_props, wrap); + uwrap = it->text_pos + + (size_t) evas_common_text_props_cluster_next( + &_ITEM_TEXT(it)->text_props, wrap); } if ((uwrap <= line_start) || (uwrap > len)) return -1; @@ -3259,16 +3313,16 @@ _layout_get_charwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, #endif static int _layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt, - const Evas_Object_Textblock_Text_Item *ti, Eina_Bool mixed_wrap, + const Evas_Object_Textblock_Item *it, Eina_Bool mixed_wrap, size_t line_start, const char *breaks) { Eina_Bool wrap_after = EINA_FALSE; size_t wrap; size_t orig_wrap; const Eina_Unicode *str = eina_ustrbuf_string_get( - ti->parent.text_node->unicode); - int item_start = ti->parent.text_pos; - size_t len = eina_ustrbuf_length_get(ti->parent.text_node->unicode); + it->text_node->unicode); + int item_start = it->text_pos; + size_t len = eina_ustrbuf_length_get(it->text_node->unicode); #ifndef HAVE_LINEBREAK /* Not used without liblinebreak ATM. */ (void) breaks; @@ -3276,7 +3330,10 @@ _layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt, { int swrap = -1; - swrap = _layout_text_cutoff_get(c, fmt, ti); + if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) + swrap = 0; + else + swrap = _layout_text_cutoff_get(c, fmt, _ITEM_TEXT(it)); /* Avoiding too small textblocks to even contain one char. * FIXME: This can cause breaking inside ligatures. */ @@ -3331,7 +3388,7 @@ _layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt, { if (mixed_wrap) { - return _layout_get_charwrap(c, fmt, ti, + return _layout_get_charwrap(c, fmt, it, line_start, breaks); } else @@ -3362,20 +3419,20 @@ _layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt, /* -1 means no wrap */ static int _layout_get_wordwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, - const Evas_Object_Textblock_Text_Item *ti, size_t line_start, + const Evas_Object_Textblock_Item *it, size_t line_start, const char *breaks) { - return _layout_get_word_mixwrap_common(c, fmt, ti, EINA_FALSE, line_start, + return _layout_get_word_mixwrap_common(c, fmt, it, EINA_FALSE, line_start, breaks); } /* -1 means no wrap */ static int _layout_get_mixedwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt, - const Evas_Object_Textblock_Text_Item *ti, size_t line_start, + const Evas_Object_Textblock_Item *it, size_t line_start, const char *breaks) { - return _layout_get_word_mixwrap_common(c, fmt, ti, EINA_TRUE, line_start, + return _layout_get_word_mixwrap_common(c, fmt, it, EINA_TRUE, line_start, breaks); } @@ -3503,7 +3560,7 @@ _layout_paragraph_reorder_lines(Evas_Object_Textblock_Paragraph *par) static void _layout_paragraph_render(Evas_Object_Textblock *o, - Evas_Object_Textblock_Paragraph *par) + Evas_Object_Textblock_Paragraph *par) { if (par->rendered) return; @@ -3521,6 +3578,8 @@ _layout_paragraph_render(Evas_Object_Textblock *o, par->bidi_props = NULL; } } +#else + (void) o; #endif } @@ -3656,120 +3715,127 @@ _layout_par(Ctxt *c) else if ((it->format->wrap_word || it->format->wrap_char || it->format->wrap_mixed) && it->text_node) { - if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) + size_t line_start; + size_t it_len; + + it_len = (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) ? + 1 : _ITEM_TEXT(it)->text_props.text_len; + + +#ifdef HAVE_LINEBREAK + /* If we haven't calculated the linebreaks yet, + * do */ + if (!line_breaks) { - /* Don't wrap if it's the only item */ - if (c->ln->items) + /* Only relevant in those cases */ + if (it->format->wrap_word || it->format->wrap_mixed) { - /*FIXME: I should handle format correctly, - i.e verify we are allowed to break here */ - _layout_line_advance(c, it->format); - wrap = -1; + const char *lang; + lang = (it->format->font.fdesc) ? + it->format->font.fdesc->lang : ""; + size_t len = + eina_ustrbuf_length_get( + it->text_node->unicode); + line_breaks = malloc(len); + set_linebreaks_utf32((const utf32_t *) + eina_ustrbuf_string_get( + it->text_node->unicode), + len, lang, line_breaks); } } +#endif + if (c->ln->items) + line_start = c->ln->items->text_pos; else - { - Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); - size_t line_start; + line_start = it->text_pos; -#ifdef HAVE_LINEBREAK - /* If we haven't calculated the linebreaks yet, - * do */ - if (!line_breaks) - { - /* Only relevant in those cases */ - if (it->format->wrap_word || it->format->wrap_mixed) - { - const char *lang; - lang = (it->format->font.fdesc) ? - it->format->font.fdesc->lang : ""; - size_t len = - eina_ustrbuf_length_get( - it->text_node->unicode); - line_breaks = malloc(len); - set_linebreaks_utf32((const utf32_t *) - eina_ustrbuf_string_get( - it->text_node->unicode), - len, lang, line_breaks); - } - } -#endif - if (c->ln->items) - line_start = c->ln->items->text_pos; + adv_line = 1; + /* If we don't already have a wrap point from before */ + if (wrap < 0) + { + if (it->format->wrap_word) + wrap = _layout_get_wordwrap(c, it->format, it, + line_start, line_breaks); + else if (it->format->wrap_char) + wrap = _layout_get_charwrap(c, it->format, it, + line_start, line_breaks); + else if (it->format->wrap_mixed) + wrap = _layout_get_mixedwrap(c, it->format, it, + line_start, line_breaks); else - line_start = ti->parent.text_pos; - - adv_line = 1; - /* If we don't already have a wrap point from before */ - if (wrap < 0) - { - if (it->format->wrap_word) - wrap = _layout_get_wordwrap(c, it->format, ti, - line_start, line_breaks); - else if (it->format->wrap_char) - wrap = _layout_get_charwrap(c, it->format, ti, - line_start, line_breaks); - else if (it->format->wrap_mixed) - wrap = _layout_get_mixedwrap(c, it->format, ti, - line_start, line_breaks); - else - wrap = -1; - } + wrap = -1; + } - /* If it's before the item, rollback and apply. - if it's in the item, cut. - If it's after the item, delay the cut */ - if (wrap > 0) + /* If it's before the item, rollback and apply. + if it's in the item, cut. + If it's after the item, delay the cut */ + if (wrap > 0) + { + size_t uwrap = (size_t) wrap; + if (uwrap < it->text_pos) { - size_t uwrap = (size_t) wrap; - if (uwrap < ti->parent.text_pos) + /* Rollback latest additions, and cut that + item */ + i = eina_list_prev(i); + it = eina_list_data_get(i); + while (uwrap < it->text_pos) { - /* Rollback latest additions, and cut that - item */ - i = eina_list_prev(i); - it = eina_list_data_get(i); - while (uwrap < it->text_pos) - { - c->ln->items = _ITEM( - eina_inlist_remove( - EINA_INLIST_GET(c->ln->items), - EINA_INLIST_GET(it))); - i = eina_list_prev(i); - it = eina_list_data_get(i); - } - c->x = it->x; c->ln->items = _ITEM( eina_inlist_remove( EINA_INLIST_GET(c->ln->items), EINA_INLIST_GET(it))); - continue; + i = eina_list_prev(i); + it = eina_list_data_get(i); } - /* If it points to the end, it means the previous - * char is a whitespace we should remove, so this - * is a wanted cutting point. */ - else if (uwrap > ti->parent.text_pos + - ti->text_props.text_len) - wrap = -1; /* Delay the cut in a smart way - i.e use the item_pos as the line_start, because - there's already no cut before*/ - else - wrap -= ti->parent.text_pos; /* Cut here */ + c->x = it->x; + c->ln->items = _ITEM( + eina_inlist_remove( + EINA_INLIST_GET(c->ln->items), + EINA_INLIST_GET(it))); + continue; } - - if (wrap > 0) + /* If it points to the end, it means the previous + * char is a whitespace we should remove, so this + * is a wanted cutting point. */ + else if (uwrap > it->text_pos + it_len) { - _layout_item_text_split_strip_white(c, ti, i, wrap); - } - else if (wrap == 0) + /* FIXME: Should redo the ellipsis handling. + * If we can do ellipsis, just cut here. */ + if (it->format->ellipsis == 1.0) + { + _layout_handle_ellipsis(c, it, i); + ret = 1; + goto end; + } + else + { + /* Delay the cut in a smart way i.e use the + item_pos as the line_start, because + there's already no cut before*/ + wrap = -1; + } + } + else + wrap -= it->text_pos; /* Cut here */ + } + + if (wrap > 0) + { + if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) { - /* Should wrap before the item */ - adv_line = 0; - redo_item = 1; - _layout_line_advance(c, it->format); + _layout_item_text_split_strip_white(c, + _ITEM_TEXT(it), i, wrap); } - /* Reset wrap */ - wrap = -1; } + else if (wrap == 0) + { + /* Should wrap before the item */ + adv_line = 0; + redo_item = 1; + _layout_line_advance(c, it->format); + } + /* Reset wrap */ + wrap = -1; } } @@ -3844,18 +3910,16 @@ _format_changes_invalidate_text_nodes(Ctxt *c) const char *fstr = fnode->orig_format; /* balance < 0 means we gave up and everything should be * invalidated */ - if (*fstr == '+') + if (fnode->opener && !fnode->own_closer) { balance++; if (!fstack) start_n = fnode->text_node; fstack = eina_list_prepend(fstack, fnode); } - else if (*fstr == '-') + else if (!fnode->opener) { size_t fstr_len; - /* Skip the '-' */ - fstr++; fstr_len = strlen(fstr); /* Generic popper, just pop */ if (((fstr[0] == ' ') && !fstr[1]) || !fstr[0]) @@ -4429,12 +4493,12 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) { if (!key_start) { - if (!isspace(*p)) + if (!isspace((unsigned char)(*p))) key_start = p; } else if (!key_stop) { - if ((*p == '=') || (isspace(*p))) + if ((*p == '=') || (isspace((unsigned char)(*p)))) key_stop = p; } else if (!val_start) @@ -4479,10 +4543,10 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) tag = calloc(1, sizeof(Evas_Object_Style_Tag)); if (tag) { - tag->tag = tags; - tag->replace = replaces; - tag->tag_len = tag_len; - tag->replace_len = replace_len; + tag->tag.tag = tags; + tag->tag.replace = replaces; + tag->tag.tag_len = tag_len; + tag->tag.replace_len = replace_len; ts->tags = (Evas_Object_Style_Tag *)eina_inlist_append(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag)); } else @@ -4689,7 +4753,11 @@ _escaped_char_match(const char *s, int *adv) while ((*mc) && (*sc)) { if ((unsigned char)*sc < (unsigned char)*mc) return NULL; - if (*sc != *mc) match = 0; + if (*sc != *mc) + { + match = 0; + break; + } mc++; sc++; } @@ -4723,7 +4791,7 @@ _escaped_char_get(const char *s, const char *s_end) int base = 10; s += 2; /* Skip "&#" */ - if (tolower(*s) == 'x') + if (tolower((unsigned char)(*s)) == 'x') { s++; base = 16; @@ -4876,6 +4944,7 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char * NULL is reached. */ for (;;) { + size_t text_len; /* If we got to the end of string or just finished/started tag * or escape sequence handling. */ if ((*p == 0) || @@ -4953,14 +5022,22 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char } } /* Unicode object replcament char */ - else if (!strncmp("\xEF\xBF\xBC", p, 3)) + else if (!strncmp(_REPLACEMENT_CHAR_UTF8, p, + text_len = strlen(_REPLACEMENT_CHAR_UTF8)) || + !strncmp(_NEWLINE_UTF8, p, + text_len = strlen(_NEWLINE_UTF8)) || + !strncmp(_TAB_UTF8, p, + text_len = strlen(_TAB_UTF8)) || + !strncmp(_PARAGRAPH_SEPARATOR_UTF8, p, + text_len = strlen(_PARAGRAPH_SEPARATOR_UTF8))) { /*FIXME: currently just remove them, maybe do something * fancier in the future, atm it breaks if this char * is inside <> */ _prepend_text_run(cur, s, p); - p += 2; /* it's also advanced later in this loop need +3 - * in total*/ + /* it's also advanced later in this loop need +text_len + in total*/ + p += text_len - 1; s = p + 1; /* One after the end of the replacement char */ } p++; @@ -4979,19 +5056,19 @@ evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char * @param fnode the format node to process. */ static void -_markup_get_format_append(Evas_Object_Textblock *o __UNUSED__, Eina_Strbuf *txt, Evas_Object_Textblock_Node_Format *fnode) +_markup_get_format_append(Eina_Strbuf *txt, Evas_Object_Textblock_Node_Format *fnode) { eina_strbuf_append_char(txt, '<'); { const char *s; - int pop = 0; // FIXME: need to escape s = fnode->orig_format; - if (*s == '-') pop = 1; - while ((*s == ' ') || (*s == '+') || (*s == '-')) s++; - if (pop) eina_strbuf_append_char(txt, '/'); + if (!fnode->opener && !fnode->own_closer) + eina_strbuf_append_char(txt, '/'); eina_strbuf_append(txt, s); + if (fnode->own_closer) + eina_strbuf_append_char(txt, '/'); } eina_strbuf_append_char(txt, '>'); } @@ -5061,7 +5138,7 @@ evas_object_textblock_text_markup_get(const Evas_Object *obj) tmp_ch = text[off]; text[off] = 0; /* Null terminate the part of the string */ _markup_get_text_append(txt, text); - _markup_get_format_append(o, txt, fnode); + _markup_get_format_append(txt, fnode); text[off] = tmp_ch; /* Restore the char */ text += off; if (fnode->visible) @@ -5086,6 +5163,190 @@ evas_object_textblock_text_markup_get(const Evas_Object *obj) return o->markup_text; } +EAPI char * +evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) +{ + /* FIXME: Redundant and awful, should be merged with markup_prepend */ + Eina_Strbuf *sbuf; + char *s, *p, *ret; + char *tag_start, *tag_end, *esc_start, *esc_end; + + if (!text) return NULL; + + + tag_start = tag_end = esc_start = esc_end = NULL; + sbuf = eina_strbuf_new(); + p = (char *)text; + s = p; + /* This loop goes through all of the mark up text until it finds format + * tags, escape sequences or the terminating NULL. When it finds either + * of those, it appends the text found up until that point to the textblock + * proccesses whatever found. It repeats itself until the termainating + * NULL is reached. */ + for (;;) + { + /* If we got to the end of string or just finished/started tag + * or escape sequence handling. */ + if ((*p == 0) || + (tag_end) || (esc_end) || + (tag_start) || (esc_start)) + { + if (tag_end) + { + /* If we reached to a tag ending, analyze the tag */ + char *ttag; + size_t ttag_len; + + tag_start++; /* Skip the < */ + tag_end--; /* Skip the > */ + if ((tag_end > tag_start) && (*(tag_end - 1) == '/')) + { + tag_end --; /* Skip the terminating '/' */ + while (*(tag_end - 1) == ' ') + tag_end--; /* skip trailing ' ' */ + } + + ttag_len = tag_end - tag_start; + + ttag = malloc(ttag_len + 1); + if (ttag) + { + const char *match = NULL; + size_t replace_len; + memcpy(ttag, tag_start, ttag_len); + ttag[ttag_len] = 0; + + + if (obj) + { + match = _style_match_tag( + evas_object_textblock_style_get(obj), + ttag, ttag_len, &replace_len); + } + + if (!match) match = ttag; + + if (_IS_PARAGRAPH_SEPARATOR_SIMPLE(match)) + eina_strbuf_append(sbuf, _PARAGRAPH_SEPARATOR_UTF8); + else if (_IS_LINE_SEPARATOR(match)) + eina_strbuf_append(sbuf, _NEWLINE_UTF8); + else if (_IS_TAB(match)) + eina_strbuf_append(sbuf, _TAB_UTF8); + else if (!strncmp(match, "item", 4)) + eina_strbuf_append(sbuf, _REPLACEMENT_CHAR_UTF8); + + free(ttag); + } + tag_start = tag_end = NULL; + } + else if (esc_end) + { + const char *escape; + + escape = _escaped_char_get(esc_start, esc_end + 1); + eina_strbuf_append(sbuf, escape); + esc_start = esc_end = NULL; + } + else if (*p == 0) + { + eina_strbuf_append_length(sbuf, s, p - s); + s = NULL; + } + if (*p == 0) + break; + } + if (*p == '<') + { + if (!esc_start) + { + /* Append the text prior to this to the textblock and + * mark the start of the tag */ + tag_start = p; + tag_end = NULL; + eina_strbuf_append_length(sbuf, s, p - s); + s = NULL; + } + } + else if (*p == '>') + { + if (tag_start) + { + tag_end = p + 1; + s = p + 1; + } + } + else if (*p == '&') + { + if (!tag_start) + { + /* Append the text prior to this to the textblock and mark + * the start of the escape sequence */ + esc_start = p; + esc_end = NULL; + eina_strbuf_append_length(sbuf, s, p - s); + s = NULL; + } + } + else if (*p == ';') + { + if (esc_start) + { + esc_end = p; + s = p + 1; + } + } + p++; + } + + ret = eina_strbuf_string_steal(sbuf); + eina_strbuf_free(sbuf); + return ret; +} + +EAPI char * +evas_textblock_text_utf8_to_markup(const Evas_Object *obj, const char *text) +{ + Eina_Strbuf *sbuf; + char *str = NULL; + int ch, pos = 0, pos2 = 0; + + (void) obj; + + if (!text) return NULL; + + sbuf = eina_strbuf_new(); + + for (;;) + { + pos = pos2; + pos2 = evas_string_char_next_get(text, pos2, &ch); + if ((ch <= 0) || (pos2 <= 0)) break; + + if (ch == _NEWLINE) + eina_strbuf_append(sbuf, "
"); + else if (ch == _TAB) + eina_strbuf_append(sbuf, ""); + else if (ch == '<') + eina_strbuf_append(sbuf, "<"); + else if (ch == '>') + eina_strbuf_append(sbuf, ">"); + else if (ch == '&') + eina_strbuf_append(sbuf, "&"); + else if (ch == _PARAGRAPH_SEPARATOR) + eina_strbuf_append(sbuf, ""); + else if (ch == _REPLACEMENT_CHAR) + eina_strbuf_append(sbuf, ""); + else + { + eina_strbuf_append_length(sbuf, text + pos, pos2 - pos); + } + } + str = eina_strbuf_string_steal(sbuf); + eina_strbuf_free(sbuf); + return str; + +} + /* cursors */ /** @@ -5453,15 +5714,13 @@ evas_textblock_node_format_remove_pair(Evas_Object *obj, { const char *fstr = fmt->orig_format; - if (fstr && (*fstr == '+')) + if (fmt->opener && !fmt->own_closer) { fstack = eina_list_prepend(fstack, fmt); } - else if (fstr && (*fstr == '-')) + else if (fstr && !fmt->opener) { size_t fstr_len; - /* Skip the '-' */ - fstr++; fstr_len = strlen(fstr); /* Generic popper, just pop */ if (((fstr[0] == ' ') && !fstr[1]) || !fstr[0]) @@ -5708,6 +5967,111 @@ evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) return EINA_FALSE; } +#ifdef HAVE_LINEBREAK + +/* BREAK_AFTER: true if we can break after the current char. + * Both macros assume str[i] is not the terminating nul */ +#define BREAK_AFTER(i) \ + (breaks[i] == WORDBREAK_BREAK) + +#else + +#define BREAK_AFTER(i) \ + ((!str[i + 1]) || \ + (_is_white(str[i]) && !_is_white(str[i + 1])) || \ + (!_is_white(str[i]) && _is_white(str[i + 1]))) + +#endif + +EAPI Eina_Bool +evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur) +{ + const Eina_Unicode *text; + size_t i; +#ifdef HAVE_LINEBREAK + char *breaks; +#endif + + if (!cur) return EINA_FALSE; + if (!cur->node) return EINA_FALSE; + + text = eina_ustrbuf_string_get(cur->node->unicode); + +#ifdef HAVE_LINEBREAK + { + const char *lang = ""; /* FIXME: get lang */ + size_t len = eina_ustrbuf_length_get(cur->node->unicode); + breaks = malloc(len); + set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks); + } +#endif + + i = cur->pos; + + /* Skip the first one. This ensures we don't point to the nul, and also + * we just don't care about it anyway. */ + if (i > 0) i--; + + for ( ; i > 0 ; i--) + { + if (BREAK_AFTER(i)) + { + /* Advance to the current char */ + i++; + break; + } + } + + cur->pos = i; + +#ifdef HAVE_LINEBREAK + free(breaks); +#endif + return EINA_TRUE; +} + +EAPI Eina_Bool +evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur) +{ + const Eina_Unicode *text; + size_t i; +#ifdef HAVE_LINEBREAK + char *breaks; +#endif + + if (!cur) return EINA_FALSE; + if (!cur->node) return EINA_FALSE; + + text = eina_ustrbuf_string_get(cur->node->unicode); + +#ifdef HAVE_LINEBREAK + { + const char *lang = ""; /* FIXME: get lang */ + size_t len = eina_ustrbuf_length_get(cur->node->unicode); + breaks = malloc(len); + set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks); + } +#endif + + i = cur->pos; + + for ( ; text[i] ; i++) + { + if (BREAK_AFTER(i)) + { + /* This is the one to break after. */ + break; + } + } + + cur->pos = i; + +#ifdef HAVE_LINEBREAK + free(breaks); +#endif + return EINA_TRUE;; +} + EAPI Eina_Bool evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur) { @@ -5887,10 +6251,9 @@ _evas_textblock_format_is_visible(Evas_Object_Textblock_Node_Format *fnode, fnode->anchor = ANCHOR_NONE; if (!s) return; - if (s[0] == '+' || s[0] == '-') + if (!fnode->own_closer) { - is_opener = (s[0] == '+'); - s++; + is_opener = fnode->opener; fnode->format_change = EINA_TRUE; } @@ -5902,6 +6265,8 @@ _evas_textblock_format_is_visible(Evas_Object_Textblock_Node_Format *fnode, * closing */ if ((!strncmp(item, "\n", itlen) || !strncmp(item, "\\n", itlen)) || (!strncmp(item, "\t", itlen) || !strncmp(item, "\\t", itlen)) || + (!strncmp(item, "br", itlen) && (itlen >= 2)) || + (!strncmp(item, "tab", itlen) && (itlen >= 3)) || (!strncmp(item, "ps", itlen) && (itlen >= 2)) || (!strncmp(item, "item", itlen) && (itlen >= 4) && is_opener)) { @@ -5986,19 +6351,17 @@ _evas_textblock_node_format_remove_matching(Evas_Object_Textblock *o, } - if (fstr && (*fstr == '+')) + if (fmt->opener && !fmt->own_closer) { formats = eina_list_prepend(formats, fmt); } - else if (fstr && (*fstr == '-')) + else if (fstr && !fmt->opener) { Evas_Object_Textblock_Node_Format *fnode; size_t fstr_len; - /* Skip the '-' */ - fstr++; fstr_len = strlen(fstr); - /* Generic popper, just pop */ - if (((fstr[0] == ' ') && !fstr[1]) || !fstr[0]) + /* Generic popper, just pop (if there's anything to pop). */ + if (formats && (((fstr[0] == ' ') && !fstr[1]) || !fstr[0])) { fnode = eina_list_data_get(formats); formats = eina_list_remove_list(formats, formats); @@ -6855,6 +7218,7 @@ _evas_textblock_node_format_new(Evas_Object_Textblock *o, const char *_format) { Evas_Object_Textblock_Node_Format *n; const char *format = _format; + const char *pre_stripped_format = NULL; n = calloc(1, sizeof(Evas_Object_Textblock_Node_Format)); /* Create orig_format and format */ @@ -6866,62 +7230,80 @@ _evas_textblock_node_format_new(Evas_Object_Textblock *o, const char *_format) format++; /* Advance after '<' */ format_len = strlen(format); - if (format[format_len - 1] == '>') - format_len--; /* We don't care about '>' */ + if ((format_len > 0) && format[format_len - 1] == '>') + { + format_len--; /* We don't care about '>' */ + /* Check if it closes itself. Skip the case. */ + if ((format_len > 1) && format[format_len - 1] == '/') + { + format_len--; /* We don't care about '/' */ + n->own_closer = EINA_TRUE; + } + } match = _style_match_tag(o->style, format, format_len, &replace_len); if (match) { - if ((match[0] == '+') || (match[0] == '-')) - { - char *norm_format; - norm_format = malloc(format_len + 2 + 1); - memcpy(norm_format, match, 2); - memcpy(norm_format + 2, format, format_len); - norm_format[format_len + 2] = '\0'; - n->orig_format = - eina_stringshare_add_length(norm_format, format_len + 2); - free(norm_format); - } - else + if (match[0] != '-') { - n->orig_format = - eina_stringshare_add_length(format, format_len); + n->opener = EINA_TRUE; + if (match[0] != '+') + { + n->own_closer = EINA_TRUE; + } } - n->format = eina_stringshare_add(match); + + pre_stripped_format = match; } else { - char *norm_format; - - norm_format = malloc(format_len + 2 + 1); - if (norm_format) + if (format[0] == '/') { - if (format[0] == '/') - { - memcpy(norm_format, "- ", 2); - memcpy(norm_format + 2, format + 1, format_len - 1); - norm_format[format_len + 2 - 1] = '\0'; - } - else - { - memcpy(norm_format, "+ ", 2); - memcpy(norm_format + 2, format, format_len); - norm_format[format_len + 2] = '\0'; - } - n->orig_format = eina_stringshare_add(norm_format); - free(norm_format); + format++; + format_len--; + } + else + { + n->opener = EINA_TRUE; } - n->format = eina_stringshare_ref(n->orig_format); } + + n->orig_format = eina_stringshare_add_length(format, format_len); + + if (!pre_stripped_format) + pre_stripped_format = n->orig_format; } /* Just use as is, it's a special format. */ else { - n->orig_format = eina_stringshare_add(format); - n->format = eina_stringshare_ref(n->orig_format); + const char *tmp = format; + if (format[0] != '-') + { + n->opener = EINA_TRUE; + if (format[0] != '+') + { + n->own_closer = EINA_TRUE; + } + } + if ((*tmp == '+') || (*tmp == '-')) + { + tmp++; + while (*tmp == ' ') tmp++; + } + n->orig_format = eina_stringshare_add(tmp); + pre_stripped_format = n->orig_format; } + /* Strip format */ + { + const char *tmp = pre_stripped_format; + if ((*tmp == '+') || (*tmp == '-')) + { + tmp++; + while (*tmp == ' ') tmp++; + } + n->format = eina_stringshare_add(tmp); + } format = n->format; _evas_textblock_format_is_visible(n, format); @@ -7051,11 +7433,11 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form if (_IS_PARAGRAPH_SEPARATOR(o, format)) insert_char = _PARAGRAPH_SEPARATOR; else if (_IS_LINE_SEPARATOR(format)) - insert_char = '\n'; + insert_char = _NEWLINE; else if (_IS_TAB(format)) - insert_char = '\t'; + insert_char = _TAB; else - insert_char = EVAS_TEXTBLOCK_REPLACEMENT_CHAR; + insert_char = _REPLACEMENT_CHAR; eina_ustrbuf_insert_char(cur->node->unicode, insert_char, cur->pos); @@ -7142,7 +7524,7 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) should_merge = EINA_TRUE; } /* If a singnular, mark as invisible, so we'll delete it. */ - if (!format || ((*format != '+') && (*format != '-'))) + if (!format || last_fmt->own_closer) { last_fmt->visible = EINA_FALSE; } @@ -7271,60 +7653,40 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C EAPI char * evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) { - const Eina_Unicode *ustr; - Eina_Unicode buf[2]; - char *s; if (!cur || !cur->node) return NULL; if (evas_textblock_cursor_format_is_visible_get(cur)) { - size_t len; - const char *fstr; + Eina_Strbuf *buf; + Evas_Object_Textblock_Node_Format *fnode; char *ret; - int pop = 0; - fstr = evas_textblock_node_format_text_get( - _evas_textblock_node_visible_at_pos_get( - evas_textblock_cursor_format_get(cur))); - - if (!fstr) - return NULL; + fnode = _evas_textblock_node_visible_at_pos_get( + evas_textblock_cursor_format_get(cur)); - if (*fstr == '-') pop = 1; - while ((*fstr == ' ') || (*fstr == '+') || (*fstr == '-')) fstr++; - len = strlen(fstr); - - { - char *tmp; - if (pop) - { - ret = tmp = malloc(len + 3 + 1); /* and the null */ - memcpy(tmp, " and the null */ - *tmp = '<'; - tmp++; - } - memcpy(tmp, fstr, len); - memcpy(tmp + len, ">", 2); /* Including the null */ - } + buf = eina_strbuf_new(); + _markup_get_format_append(buf, fnode); + ret = eina_strbuf_string_steal(buf); + eina_strbuf_free(buf); return ret; } + else + { + const Eina_Unicode *ustr; + Eina_Unicode buf[2]; + char *s; - ustr = eina_ustrbuf_string_get(cur->node->unicode); - buf[0] = ustr[cur->pos]; - buf[1] = 0; - s = eina_unicode_unicode_to_utf8(buf, NULL); + ustr = eina_ustrbuf_string_get(cur->node->unicode); + buf[0] = ustr[cur->pos]; + buf[1] = 0; + s = eina_unicode_unicode_to_utf8(buf, NULL); - return s; + return s; + } } static char * _evas_textblock_cursor_range_text_markup_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *_cur2) { - Evas_Object_Textblock *o; Evas_Object_Textblock_Node_Text *tnode; Eina_Strbuf *buf; Evas_Textblock_Cursor *cur2; @@ -7333,7 +7695,6 @@ _evas_textblock_cursor_range_text_markup_get(const Evas_Textblock_Cursor *cur1, if (!cur1 || !cur1->node) return NULL; if (!_cur2 || !_cur2->node) return NULL; if (cur1->obj != _cur2->obj) return NULL; - o = (Evas_Object_Textblock *)(cur1->obj->object_data); if (evas_textblock_cursor_compare(cur1, _cur2) > 0) { const Evas_Textblock_Cursor *tc; @@ -7401,7 +7762,7 @@ _evas_textblock_cursor_range_text_markup_get(const Evas_Textblock_Cursor *cur1, tmp_ch = text[off]; text[off] = 0; /* Null terminate the part of the string */ _markup_get_text_append(buf, text); - _markup_get_format_append(o, buf, fnode); + _markup_get_format_append(buf, fnode); text[off] = tmp_ch; /* Restore the char */ text += off; if (fnode->visible) @@ -7623,8 +7984,27 @@ evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur) EAPI const char * evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *fmt) { + static char *ret = NULL; + char *tmp; + if (!fmt) return NULL; - return fmt->orig_format; + + if (ret) free(ret); + ret = malloc(strlen(fmt->orig_format) + 2 + 1); + tmp = ret; + + if (fmt->opener && !fmt->own_closer) + { + *(tmp++) = '+'; + *(tmp++) = ' '; + } + else if (!fmt->opener) + { + *(tmp++) = '-'; + *(tmp++) = ' '; + } + strcpy(tmp, fmt->orig_format); + return ret; } EAPI void @@ -7673,7 +8053,9 @@ evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord * the position of the previous */ if ((cur->pos > 0) && !_evas_textblock_cursor_is_at_the_end(cur)) { +#ifdef BIDI_SUPPORT Eina_Bool before_char = EINA_FALSE; +#endif cur2.obj = cur->obj; evas_textblock_cursor_copy(cur, &cur2); evas_textblock_cursor_char_prev(&cur2); @@ -7683,12 +8065,16 @@ evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord if (!fmt || !_IS_LINE_SEPARATOR(fmt->format)) { dir_cur = &cur2; +#ifdef BIDI_SUPPORT before_char = EINA_FALSE; +#endif } +#ifdef BIDI_SUPPORT else { before_char = EINA_TRUE; } +#endif ret = evas_textblock_cursor_pen_geometry_get( dir_cur, &x, &y, &w, &h); #ifdef BIDI_SUPPORT @@ -8788,6 +9174,7 @@ evas_object_textblock_init(Evas_Object *obj) { linebreak_init = EINA_TRUE; init_linebreak(); + init_wordbreak(); } #endif diff --git a/libraries/evas/src/lib/canvas/evas_render.c b/libraries/evas/src/lib/canvas/evas_render.c index 0abee97..cdedaec 100644 --- a/libraries/evas/src/lib/canvas/evas_render.c +++ b/libraries/evas/src/lib/canvas/evas_render.c @@ -1139,7 +1139,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, } } } - if (surface == e->engine.data.output) +// if (surface == e->engine.data.output) e->engine.func->context_clip_clip(e->engine.data.output, e->engine.data.context, ecx, ecy, ecw, ech); @@ -1360,6 +1360,8 @@ evas_render_updates_internal(Evas *e, RD("[--- RENDER EVAS (size: %ix%i)\n", e->viewport.w, e->viewport.h); + evas_event_callback_call(e, EVAS_CALLBACK_RENDER_PRE, NULL); + /* Check if the modified object mean recalculating every thing */ if (!e->invalidate) _evas_render_check_pending_objects(&e->pending_objects, e); @@ -1399,6 +1401,7 @@ evas_render_updates_internal(Evas *e, _evas_render_prev_cur_clip_cache_add(e, obj); } eina_array_clean(&e->restack_objects); + /* phase 3. add exposes */ EINA_LIST_FREE(e->damages, r) { @@ -1406,7 +1409,20 @@ evas_render_updates_internal(Evas *e, r->x, r->y, r->w, r->h); eina_rectangle_free(r); } - /* phase 4. output & viewport changes */ + + /* phase 4. framespace, output & viewport changes */ + if (e->framespace.changed) + { + int fx, fy, fw, fh; + + fx = e->viewport.x - e->framespace.x; + fy = e->viewport.y - e->framespace.y; + fw = e->viewport.w + e->framespace.w; + fh = e->viewport.h + e->framespace.h; + e->engine.func->output_redraws_rect_add(e->engine.data.output, + fx, fy, fw, fh); + } + if (e->viewport.changed) { e->engine.func->output_redraws_rect_add(e->engine.data.output, @@ -1431,6 +1447,7 @@ evas_render_updates_internal(Evas *e, 0, 0, e->output.w, e->output.h); } + /* phase 5. add obscures */ EINA_LIST_FOREACH(e->obscures, ll, r) { @@ -1562,13 +1579,6 @@ evas_render_updates_internal(Evas *e, else e->engine.func->context_mask_unset(e->engine.data.output, e->engine.data.context); - if (obj->cur.clipper) - e->engine.func->context_clip_set(e->engine.data.output, - e->engine.data.context, - x, y, w, h); - else - e->engine.func->context_clip_unset(e->engine.data.output, - e->engine.data.context); #if 1 /* FIXME: this can slow things down... figure out optimum... coverage */ for (j = offset; j < e->temporary_objects.count; ++j) { @@ -1671,6 +1681,7 @@ evas_render_updates_internal(Evas *e, e->changed = 0; e->viewport.changed = 0; e->output.changed = 0; + e->framespace.changed = 0; e->invalidate = 0; /* If their are some object to restack or some object to delete, @@ -1686,6 +1697,8 @@ evas_render_updates_internal(Evas *e, } evas_module_clean(); + + evas_event_callback_call(e, EVAS_CALLBACK_RENDER_POST, NULL); RD("---]\n"); diff --git a/libraries/evas/src/lib/cserve/Makefile.in b/libraries/evas/src/lib/cserve/Makefile.in index 74b5ff9..7599ca2 100644 --- a/libraries/evas/src/lib/cserve/Makefile.in +++ b/libraries/evas/src/lib/cserve/Makefile.in @@ -198,8 +198,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -216,6 +214,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -297,6 +297,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/Makefile.in b/libraries/evas/src/lib/engines/Makefile.in index 12e28c1..4c3c1da 100644 --- a/libraries/evas/src/lib/engines/Makefile.in +++ b/libraries/evas/src/lib/engines/Makefile.in @@ -208,8 +208,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -226,6 +224,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -307,6 +307,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/Makefile.in b/libraries/evas/src/lib/engines/common/Makefile.in index b0162df..7d1f20a 100644 --- a/libraries/evas/src/lib/engines/common/Makefile.in +++ b/libraries/evas/src/lib/engines/common/Makefile.in @@ -252,8 +252,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -270,6 +268,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -351,6 +351,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c index b30ec1e..796ff17 100644 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c @@ -117,7 +117,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int sr } #endif return; - pal = 0; + (void)pal; #else DATA16 *d = (DATA16 *)dst; int w0 = w; @@ -144,7 +144,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int sr d += dst_jump; } return; - pal = 0; + (void)pal; #endif } #endif @@ -216,7 +216,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src } #endif return; - pal = 0; + (void)pal; #else DATA16 *d = (DATA16 *)dst; int w0 = w; @@ -233,7 +233,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src d += dst_jump; } return; - pal = 0; + (void)pal; #endif } #endif @@ -295,7 +295,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -333,7 +333,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -394,7 +394,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -432,7 +432,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -493,7 +493,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -531,7 +531,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -592,7 +592,7 @@ evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int sr CONVERT_LOOP2_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -630,7 +630,7 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src CONVERT_LOOP_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -691,7 +691,7 @@ evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -731,7 +731,7 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -792,7 +792,7 @@ evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -830,7 +830,7 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -891,7 +891,7 @@ evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -929,7 +929,7 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -988,7 +988,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int sr CONVERT_LOOP2_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1025,7 +1025,7 @@ evas_common_convert_rgba_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src CONVERT_LOOP_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1084,7 +1084,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1121,7 +1121,7 @@ evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1180,7 +1180,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1217,7 +1217,7 @@ evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1276,7 +1276,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1313,7 +1313,7 @@ evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1372,7 +1372,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int CONVERT_LOOP2_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1409,7 +1409,7 @@ evas_common_convert_rgba_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int CONVERT_LOOP_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1468,7 +1468,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 * CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1505,7 +1505,7 @@ evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *d CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1565,7 +1565,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 * CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1602,7 +1602,7 @@ evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *d CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1661,7 +1661,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *d CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1698,7 +1698,7 @@ evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *ds CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1757,7 +1757,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int sr CONVERT_LOOP2_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1794,7 +1794,7 @@ evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src CONVERT_LOOP_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1853,7 +1853,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1890,7 +1890,7 @@ evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1949,7 +1949,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1986,7 +1986,7 @@ evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -2045,7 +2045,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -2082,7 +2082,7 @@ evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c index 41dac6f..0401a4a 100644 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c @@ -48,15 +48,167 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int #endif #endif +#ifdef TILE_ROTATE +#define FAST_SIMPLE_ROTATE(suffix, pix_type) \ + static void \ + blt_rotated_90_trivial_##suffix(pix_type *dst, \ + int dst_stride, \ + const pix_type *src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, y; \ + for (y = 0; y < h; y++) \ + { \ + const pix_type *s = src + (h - y - 1); \ + pix_type *d = dst + (dst_stride * y); \ + for (x = 0; x < w; x++) \ + { \ + *d++ = *s; \ + s += src_stride; \ + } \ + } \ + } \ + static void \ + blt_rotated_270_trivial_##suffix(pix_type *dst, \ + int dst_stride, \ + const pix_type *src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, y; \ + for (y = 0; y < h; y++) \ + { \ + const pix_type *s = src + (src_stride * (w - 1)) + y; \ + pix_type *d = dst + (dst_stride * y); \ + for (x = 0; x < w; x++) \ + { \ + *d++ = *s; \ + s -= src_stride; \ + } \ + } \ + } \ + static void \ + blt_rotated_90_##suffix(pix_type *dst, \ + int dst_stride, \ + const pix_type *src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, leading_pixels = 0, trailing_pixels = 0; \ + const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \ + if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \ + { \ + leading_pixels = TILE_SIZE - \ + (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (leading_pixels > w) \ + leading_pixels = w; \ + blt_rotated_90_trivial_##suffix(dst, \ + dst_stride, \ + src, \ + src_stride, \ + leading_pixels, \ + h); \ + dst += leading_pixels; \ + src += leading_pixels * src_stride; \ + w -= leading_pixels; \ + } \ + if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \ + { \ + trailing_pixels = (((uintptr_t)(dst + w) & \ + (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (trailing_pixels > w) \ + trailing_pixels = w; \ + w -= trailing_pixels; \ + } \ + for (x = 0; x < w; x += TILE_SIZE) \ + { \ + blt_rotated_90_trivial_##suffix(dst + x, \ + dst_stride, \ + src + (src_stride * x), \ + src_stride, \ + TILE_SIZE, \ + h); \ + } \ + if (trailing_pixels) \ + blt_rotated_90_trivial_##suffix(dst + w, \ + dst_stride, \ + src + (w * src_stride), \ + src_stride, \ + trailing_pixels, \ + h); \ + } \ + static void \ + blt_rotated_270_##suffix(pix_type *dst, \ + int dst_stride, \ + const pix_type *src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, leading_pixels = 0, trailing_pixels = 0; \ + const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \ + if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \ + { \ + leading_pixels = TILE_SIZE - \ + (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (leading_pixels > w) \ + leading_pixels = w; \ + blt_rotated_270_trivial_##suffix(dst, \ + dst_stride, \ + src + (src_stride * (w - leading_pixels)), \ + src_stride, \ + leading_pixels, \ + h); \ + dst += leading_pixels; \ + w -= leading_pixels; \ + } \ + if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \ + { \ + trailing_pixels = (((uintptr_t)(dst + w) & \ + (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (trailing_pixels > w) \ + trailing_pixels = w; \ + w -= trailing_pixels; \ + src += trailing_pixels * src_stride; \ + } \ + for (x = 0; x < w; x += TILE_SIZE) \ + { \ + blt_rotated_270_trivial_##suffix(dst + x, \ + dst_stride, \ + src + (src_stride * (w - x - TILE_SIZE)), \ + src_stride, \ + TILE_SIZE, \ + h); \ + } \ + if (trailing_pixels) \ + blt_rotated_270_trivial_##suffix(dst + w, \ + dst_stride, \ + src - (trailing_pixels * src_stride), \ + src_stride, \ + trailing_pixels, \ + h); \ + } + +FAST_SIMPLE_ROTATE(8888, DATA8) +#endif + + #ifdef BUILD_CONVERT_32_RGB_8888 #ifdef BUILD_CONVERT_32_RGB_ROT270 void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { +#ifdef TILE_ROTATE + blt_rotated_270_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; +#else DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; - + dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_270(); @@ -64,6 +216,7 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int *dst_ptr = *src_ptr; CONVERT_LOOP_END_ROT_270(); +#endif return; } #endif @@ -74,106 +227,118 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { -#ifndef BUILD_NEON +# ifndef BUILD_NEON +# ifdef TILE_ROTATE + blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; +# else DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; - + dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_90(); *dst_ptr = *src_ptr; CONVERT_LOOP_END_ROT_90(); -#else +# endif + +# else + +# ifdef TILE_ROTATE + blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; +# else if ((w & 1) || (h & 1)) { - /* Rarely (if ever) if ever: so slow path is fine */ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - CONVERT_LOOP_START_ROT_90(); - - *dst_ptr = *src_ptr; - - CONVERT_LOOP_END_ROT_90(); - } else { -#define AP "convert_rgba32_rot_90_" - asm volatile ( - ".fpu neon \n\t" - " mov %[s1], %[src] \n\t" - " add %[s1], %[h],lsl #2 \n\t" - " sub %[s1], #8 \n\t" - - " mov %[s2], %[src] \n\t" - " add %[s2], %[h], lsl #3 \n\t" - " add %[s2], %[sjmp], lsr #1 \n\t" - " sub %[s2], #8 \n\t" - - " mov %[d1], %[dst] \n\t" - - " add %[d2], %[d1], %[djmp] \n\t" - " add %[d2], %[w], lsl #2 \n\t" - - " mov %[sadv], %[h], lsl #3 \n\t" - " add %[sadv], %[sjmp], lsl #1 \n\t" - - " mov %[y], #0 \n\t" - " mov %[x], #0 \n\t" - AP"loop: \n\t" - " vld1.u32 d0, [%[s1]] \n\t" - " vld1.u32 d1, [%[s2]] \n\t" - " add %[x], #2 \n\t" - " add %[s1], %[sadv] \n\t" - " add %[s2], %[sadv] \n\t" - " vtrn.u32 d0, d1 \n\t" - " cmp %[x], %[w] \n\t" - " vst1.u32 d1, [%[d1]]! \n\t" - " vst1.u32 d0, [%[d2]]! \n\t" - " blt "AP"loop \n\t" - - " mov %[x], #0 \n\t" - " add %[d1], %[djmp] \n\t" - " add %[d1], %[w], lsl #2 \n\t" - " add %[d2], %[djmp] \n\t" - " add %[d2], %[w], lsl #2 \n\t" - - " mov %[s1], %[src] \n\t" - " add %[s1], %[h], lsl #2 \n\t" - " sub %[s1], %[y], lsl #2 \n\t" - " sub %[s1], #16 \n\t" - - " add %[s2], %[s1], %[h], lsl #2 \n\t" - " add %[s2], %[sjmp], lsl #2 \n\t" - - " add %[y], #2 \n\t" - - " cmp %[y], %[h] \n\t" - " blt "AP"loop \n\t" - - : // Out - : [s1] "r" (1), - [s2] "r" (11), - [d1] "r" (2), - [d2] "r" (12), - [src] "r" (src), - [dst] "r" (dst), - [x] "r" (3), - [y] "r" (4), - [w] "r" (w), - [h] "r" (h), - [sadv] "r" (5), - [sjmp] "r" (src_jump * 4), - [djmp] "r" (dst_jump * 4 * 2) - : "d0", "d1", "memory", "cc"// Clober - - - ); - } -#undef AP -#endif + /* Rarely (if ever) if ever: so slow path is fine */ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + CONVERT_LOOP_START_ROT_90(); + + *dst_ptr = *src_ptr; + + CONVERT_LOOP_END_ROT_90(); + } + else + { +# define AP "convert_rgba32_rot_90_" + asm volatile ( + ".fpu neon \n\t" + " mov %[s1], %[src] \n\t" + " add %[s1], %[s1], %[h],lsl #2 \n\t" + " sub %[s1], #8 \n\t" + + " mov %[s2], %[src] \n\t" + " add %[s2], %[s2], %[h], lsl #3 \n\t" + " add %[s2], %[s2], %[sjmp], lsr #1 \n\t" + " sub %[s2], #8 \n\t" + + " mov %[d1], %[dst] \n\t" + + " add %[d2], %[d1], %[djmp] \n\t" + " add %[d2], %[d2], %[w], lsl #2 \n\t" + + " mov %[sadv], %[h], lsl #3 \n\t" + " add %[sadv], %[sadv], %[sjmp], lsl #1\n\t" + + " mov %[y], #0 \n\t" + " mov %[x], #0 \n\t" + AP"loop: \n\t" + " vld1.u32 d0, [%[s1]] \n\t" + " vld1.u32 d1, [%[s2]] \n\t" + " add %[x], #2 \n\t" + " add %[s1], %[sadv] \n\t" + " add %[s2], %[sadv] \n\t" + " vtrn.u32 d0, d1 \n\t" + " cmp %[x], %[w] \n\t" + " vst1.u32 d1, [%[d1]]! \n\t" + " vst1.u32 d0, [%[d2]]! \n\t" + " blt "AP"loop \n\t" + + " mov %[x], #0 \n\t" + " add %[d1], %[djmp] \n\t" + " add %[d1], %[d1], %[w], lsl #2 \n\t" + " add %[d2], %[djmp] \n\t" + " add %[d2], %[d2], %[w], lsl #2 \n\t" + + " mov %[s1], %[src] \n\t" + " add %[s1], %[s1], %[h], lsl #2 \n\t" + " sub %[s1], %[s1], %[y], lsl #2 \n\t" + " sub %[s1], #16 \n\t" + + " add %[s2], %[s1], %[h], lsl #2 \n\t" + " add %[s2], %[s2], %[sjmp], lsl #2 \n\t" + + " add %[y], #2 \n\t" + + " cmp %[y], %[h] \n\t" + " blt "AP"loop \n\t" + + : // Out + : [s1] "r" (1), + [s2] "r" (11), + [d1] "r" (2), + [d2] "r" (12), + [src] "r" (src), + [dst] "r" (dst), + [x] "r" (3), + [y] "r" (4), + [w] "r" (w), + [h] "r" (h), + [sadv] "r" (5), + [sjmp] "r" (src_jump * 4), + [djmp] "r" (dst_jump * 4 * 2) + : "d0", "d1", "memory", "cc"// Clober + + + ); + } +# undef AP +# endif +# endif return; } #endif @@ -448,7 +613,7 @@ evas_common_convert_rgba_to_32bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump, CONVERT_LOOP_START_ROT_0(); - *dst_ptr = + *dst_ptr = (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) | ((G_VAL(src_ptr) << 4) & 0x000fc0); diff --git a/libraries/evas/src/lib/engines/common/evas_convert_yuv.c b/libraries/evas/src/lib/engines/common/evas_convert_yuv.c index a0d155c..000cb01 100644 --- a/libraries/evas/src/lib/engines/common/evas_convert_yuv.c +++ b/libraries/evas/src/lib/engines/common/evas_convert_yuv.c @@ -1091,7 +1091,7 @@ _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int const int offset_value[2] = { 0, 64 * 16 }; int mb_x, mb_y, mb_w, mb_h; int base_h; - int uv_x, uv_y, uv_step; + int uv_x, uv_step; int stride; /* Idea iterate over each macroblock and convert each of them using _evas_nv12torgb_raster */ @@ -1128,7 +1128,7 @@ _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int base_h = (mb_h >> 1) + (mb_h & 0x1); stride = w * sizeof (int); - uv_x = 0; uv_y = 0; + uv_x = 0; /* In this format we linearize macroblock on two line to form a Z and it's invert */ for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) diff --git a/libraries/evas/src/lib/engines/common/evas_cpu.c b/libraries/evas/src/lib/engines/common/evas_cpu.c index cff8b2b..fe90c5b 100644 --- a/libraries/evas/src/lib/engines/common/evas_cpu.c +++ b/libraries/evas/src/lib/engines/common/evas_cpu.c @@ -74,6 +74,7 @@ evas_common_cpu_sse3_test(void) #endif } +#ifdef BUILD_ALTIVEC void evas_common_cpu_altivec_test(void) { @@ -85,6 +86,7 @@ evas_common_cpu_altivec_test(void) #endif /* __VEC__ */ #endif /* __POWERPC__ */ } +#endif /* BUILD_ALTIVEC */ void evas_common_cpu_neon_test(void) @@ -177,6 +179,7 @@ evas_common_cpu_init(void) #endif /* BUILD_SSE3 */ #endif /* BUILD_SSE */ #endif /* BUILD_MMX */ +#ifdef BUILD_ALTIVEC #ifdef __POWERPC__ #ifdef __VEC__ cpu_feature_mask |= CPU_FEATURE_ALTIVEC * @@ -186,6 +189,7 @@ evas_common_cpu_init(void) cpu_feature_mask &= ~CPU_FEATURE_ALTIVEC; #endif /* __VEC__ */ #endif /* __POWERPC__ */ +#endif /* BUILD_ALTIVEC */ #ifdef __SPARC__ cpu_feature_mask |= CPU_FEATURE_VIS * evas_common_cpu_feature_test(evas_common_cpu_vis_test); diff --git a/libraries/evas/src/lib/engines/common/evas_draw_main.c b/libraries/evas/src/lib/engines/common/evas_draw_main.c index 7652708..def19a8 100644 --- a/libraries/evas/src/lib/engines/common/evas_draw_main.c +++ b/libraries/evas/src/lib/engines/common/evas_draw_main.c @@ -75,6 +75,14 @@ evas_common_draw_context_free(RGBA_Draw_Context *dc) { if (!dc) return; +#ifdef HAVE_PIXMAN + if (dc->col.pixman_color_image) + { + pixman_image_unref(dc->col.pixman_color_image); + dc->col.pixman_color_image = NULL; + } +#endif + evas_common_draw_context_apply_clean_cutouts(&dc->cutout); free(dc); } @@ -133,6 +141,20 @@ evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, i G_VAL(&(dc->col.col)) = (DATA8)g; B_VAL(&(dc->col.col)) = (DATA8)b; A_VAL(&(dc->col.col)) = (DATA8)a; +#ifdef HAVE_PIXMAN + if (dc && dc->col.pixman_color_image) + pixman_image_unref(dc->col.pixman_color_image); + + pixman_color_t pixman_color; + + pixman_color.alpha = (dc->col.col & 0xff000000) >> 16; + pixman_color.red = (dc->col.col & 0x00ff0000) >> 8; + pixman_color.green = (dc->col.col & 0x0000ff00); + pixman_color.blue = (dc->col.col & 0x000000ff) << 8; + + dc->col.pixman_color_image = pixman_image_create_solid_fill(&pixman_color); +#endif + } EAPI void @@ -159,12 +181,42 @@ evas_common_draw_context_set_mask(RGBA_Draw_Context *dc, RGBA_Image *mask, int x dc->mask.y = y; dc->mask.w = w; dc->mask.h = h; + +#ifdef HAVE_PIXMAN + if (mask->pixman.im) + pixman_image_unref(mask->pixman.im); + + if (mask->cache_entry.flags.alpha) + { + mask->pixman.im = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h, + (uint32_t *)mask->mask.mask, + w * 4); + } + else + { + mask->pixman.im = pixman_image_create_bits(PIXMAN_x8r8g8b8, w, h, + (uint32_t *)mask->mask.mask, + w * 4); + } +#endif + } EAPI void evas_common_draw_context_unset_mask(RGBA_Draw_Context *dc) { dc->mask.mask = NULL; + +#ifdef HAVE_PIXMAN + RGBA_Image *mask; + mask = (RGBA_Image *)dc->mask.mask; + + if (mask && mask->pixman.im) + { + pixman_image_unref(mask->pixman.im); + mask->pixman.im = NULL; + } +#endif } @@ -179,32 +231,32 @@ evas_common_draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w, { #if 1 // this is a bit faster int xa1, xa2, xb1, xb2; - + xa1 = x; xa2 = xa1 + w - 1; xb1 = dc->clip.x; if (xa2 < xb1) return; xb2 = xb1 + dc->clip.w - 1; if (xa1 >= xb2) return; - if (xa2 > xb2) xa2 = xb2; + if (xa2 > xb2) xa2 = xb2; if (xb1 > xa1) xa1 = xb1; x = xa1; w = xa2 - xa1 + 1; - + xa1 = y; xa2 = xa1 + h - 1; xb1 = dc->clip.y; if (xa2 < xb1) return; - xb2 = xb1 + dc->clip.h - 1; + xb2 = xb1 + dc->clip.h - 1; if (xa1 >= xb2) return; - if (xa2 > xb2) xa2 = xb2; + if (xa2 > xb2) xa2 = xb2; if (xb1 > xa1) xa1 = xb1; y = xa1; h = xa2 - xa1 + 1; -#else +#else RECTS_CLIP_TO_RECT(x, y, w, h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); -#endif +#endif if ((w < 1) || (h < 1)) return; } evas_common_draw_context_cutouts_add(&dc->cutout, x, y, w, h); @@ -513,7 +565,7 @@ evas_common_draw_context_apply_cutouts(RGBA_Draw_Context *dc) if (!dc->clip.use) return NULL; if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) return NULL; - + res = evas_common_draw_context_cutouts_new(); evas_common_draw_context_cutouts_add(res, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); diff --git a/libraries/evas/src/lib/engines/common/evas_font_draw.c b/libraries/evas/src/lib/engines/common/evas_font_draw.c index 94aa085..638cdfe 100644 --- a/libraries/evas/src/lib/engines/common/evas_font_draw.c +++ b/libraries/evas/src/lib/engines/common/evas_font_draw.c @@ -22,7 +22,7 @@ static int max_cached_words = WORD_CACHE_NWORDS; -struct prword +struct prword { EINA_INLIST; struct cinfo *cinfo; @@ -34,16 +34,16 @@ struct prword int baseline; }; -struct cinfo +struct cinfo { FT_UInt index; - struct + struct { int x, y; } pos; int posx; RGBA_Font_Glyph *fg; - struct + struct { int w,h; int rows; @@ -77,11 +77,11 @@ evas_common_font_draw_init(void) #ifdef EVAS_FRAME_QUEUING EAPI void evas_common_font_draw_finish(void) -{ +{ } #endif -/* +/* * BiDi handling: We receive the shaped string + other props from text_props, * we need to reorder it so we'll have the visual string (the way we draw) * and then for kerning we have to switch the order of the kerning query (as the prev @@ -89,7 +89,7 @@ evas_common_font_draw_finish(void) */ static void evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn __UNUSED__, int x, int y, - const Evas_Text_Props *text_props, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w, + const Evas_Text_Props *text_props, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w, int ext_h, int im_w, int im_h __UNUSED__) { DATA32 *im; @@ -136,7 +136,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font { xrun -= x + xrun - ext_x - ext_w; } - if (x < ext_x) + if (x < ext_x) { int excess = ext_x - x; xstart = excess - 1; @@ -244,10 +244,29 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font if (j < w) j = w; h = fg->glyph_out->bitmap.rows; /* - if ((fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays) - && (fg->glyph_out->bitmap.num_grays == 256) - ) - */ + if ((fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays) + && (fg->glyph_out->bitmap.num_grays == 256) + ) + */ + +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_FONT + int index; + DATA32 *font_alpha_buffer; + pixman_image_t *font_mask_image; + + font_alpha_buffer = alloca(w * h * sizeof(DATA32)); + for (index = 0; index < (w * h); index++) + font_alpha_buffer[index] = data[index] << 24; + + font_mask_image = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h, + font_alpha_buffer, + w * sizeof(DATA32)); + + if (!font_mask_image) return; +# endif +#endif + { if ((j > 0) && (chr_x + w > ext_x)) { @@ -255,44 +274,63 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font { /* ext glyph draw */ dc->font_ext.func.gl_draw(dc->font_ext.data, - (void *)dst, - dc, fg, chr_x, - y - (chr_y - y)); + (void *)dst, + dc, fg, chr_x, + y - (chr_y - y)); } else { if ((fg->glyph_out->bitmap.num_grays == 256) && - (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY)) + (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY)) { - for (i = 0; i < h; i++) +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_FONT + if ((dst->pixman.im) && + (dc->col.pixman_color_image)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + font_mask_image, + dst->pixman.im, + chr_x, + y - (chr_y - y), + 0, 0, + chr_x, + y - (chr_y - y), + w, h); + else +# endif +#endif { - int dx, dy; - int in_x, in_w; - - in_x = 0; - in_w = 0; - dx = chr_x; - dy = y - (chr_y - i - y); + for (i = 0; i < h; i++) + { + int dx, dy; + int in_x, in_w; + + in_x = 0; + in_w = 0; + dx = chr_x; + dy = y - (chr_y - i - y); #ifdef EVAS_SLI - if (((dy) % dc->sli.h) == dc->sli.y) + if (((dy) % dc->sli.h) == dc->sli.y) #endif - { - if ((dx < (ext_x + ext_w)) && - (dy >= (ext_y)) && - (dy < (ext_y + ext_h))) { - if (dx + w > (ext_x + ext_w)) - in_w += (dx + w) - (ext_x + ext_w); - if (dx < ext_x) + if ((dx < (ext_x + ext_w)) && + (dy >= (ext_y)) && + (dy < (ext_y + ext_h))) { - in_w += ext_x - dx; - in_x = ext_x - dx; - dx = ext_x; - } - if (in_w < w) - { - func(NULL, data + (i * j) + in_x, dc->col.col, - im + (dy * im_w) + dx, w - in_w); + if (dx + w > (ext_x + ext_w)) + in_w += (dx + w) - (ext_x + ext_w); + if (dx < ext_x) + { + in_w += ext_x - dx; + in_x = ext_x - dx; + dx = ext_x; + } + if (in_w < w) + { + func(NULL, data + (i * j) + in_x, dc->col.col, + im + (dy * im_w) + dx, w - in_w); + } } } } @@ -309,7 +347,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font { int dx, dy; int in_x, in_w, end; - + in_x = 0; in_w = 0; dx = chr_x; @@ -333,8 +371,8 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font dp++; } if ((dx < (ext_x + ext_w)) && - (dy >= (ext_y)) && - (dy < (ext_y + ext_h))) + (dy >= (ext_y)) && + (dy < (ext_y + ext_h))) { if (dx + w > (ext_x + ext_w)) in_w += (dx + w) - (ext_x + ext_w); @@ -347,7 +385,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font if (in_w < w) { func(NULL, tmpbuf + in_x, dc->col.col, - im + (dy * im_w) + dx, w - in_w); + im + (dy * im_w) + dx, w - in_w); } } } @@ -356,6 +394,11 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font } } } +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_FONT + pixman_image_unref(font_mask_image); +# endif +#endif } else break; @@ -573,7 +616,7 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_prop } } } - else + else { im = NULL; } @@ -599,7 +642,7 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_prop { struct prword *last = (struct prword *)(words->last); - if (last) + if (last) { if (last->im) free(last->im); if (last->cinfo) free(last->cinfo); diff --git a/libraries/evas/src/lib/engines/common/evas_font_main.c b/libraries/evas/src/lib/engines/common/evas_font_main.c index 64b1d5e..7b3dabe 100644 --- a/libraries/evas/src/lib/engines/common/evas_font_main.c +++ b/libraries/evas/src/lib/engines/common/evas_font_main.c @@ -39,8 +39,6 @@ evas_common_font_init(void) EAPI void evas_common_font_shutdown(void) { - int error; - if (initialised < 1) return; initialised--; if (initialised != 0) return; @@ -53,7 +51,7 @@ evas_common_font_shutdown(void) evas_common_font_cache_set(0); evas_common_font_flush(); - error = FT_Done_FreeType(evas_ft_lib); + FT_Done_FreeType(evas_ft_lib); #ifdef EVAS_FRAME_QUEUING evas_common_font_draw_finish(); #endif diff --git a/libraries/evas/src/lib/engines/common/evas_image_data.c b/libraries/evas/src/lib/engines/common/evas_image_data.c index 10b3988..2815ff8 100644 --- a/libraries/evas/src/lib/engines/common/evas_image_data.c +++ b/libraries/evas/src/lib/engines/common/evas_image_data.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include "evas_common.h" diff --git a/libraries/evas/src/lib/engines/common/evas_image_load.c b/libraries/evas/src/lib/engines/common/evas_image_load.c index c7eff3f..21ac5d4 100644 --- a/libraries/evas/src/lib/engines/common/evas_image_load.c +++ b/libraries/evas/src/lib/engines/common/evas_image_load.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include diff --git a/libraries/evas/src/lib/engines/common/evas_image_main.c b/libraries/evas/src/lib/engines/common/evas_image_main.c index d4d847c..d2f8c0b 100644 --- a/libraries/evas/src/lib/engines/common/evas_image_main.c +++ b/libraries/evas/src/lib/engines/common/evas_image_main.c @@ -145,7 +145,7 @@ _evas_common_rgba_image_new(void) #endif evas_common_rgba_image_scalecache_init(&im->cache_entry); - + return &im->cache_entry; } @@ -161,7 +161,7 @@ _evas_common_rgba_image_delete(Image_Entry *ie) LKD(im->cache_entry.ref_fq_del); eina_condition_free(&(im->cache_entry.cond_fq_del)); # endif -#endif +#endif evas_common_rgba_image_scalecache_shutdown(&im->cache_entry); if (ie->info.module) evas_module_unref((Evas_Module *)ie->info.module); /* memset the image to 0x99 because i recently saw a segv where an @@ -173,13 +173,13 @@ _evas_common_rgba_image_delete(Image_Entry *ie) // memset(im, 0x99, sizeof(im)); #ifdef EVAS_CSERVE if (ie->data1) evas_cserve_image_free(ie); -#endif +#endif /* * FIXME: This doesn't seem to be needed... But I'm not sure why. * -- nash { Filtered_Image *fi; - + EINA_LIST_FREE(im->filtered, fi) { free(fi->key); @@ -249,8 +249,8 @@ evas_common_rgba_image_unload(Image_Entry *ie) #endif return; } -#endif - +#endif + if (im->image.data && !im->image.no_free) free(im->image.data); im->image.data = NULL; @@ -266,18 +266,19 @@ void _evas_common_rgba_image_post_surface(Image_Entry *ie) { #ifdef HAVE_PIXMAN - RGBA_Image *im = (RGBA_Image *) ie; - +# ifdef PIXMAN_IMAGE + RGBA_Image *im = (RGBA_Image *)ie; + if (im->pixman.im) pixman_image_unref(im->pixman.im); if (im->cache_entry.flags.alpha) { im->pixman.im = pixman_image_create_bits ( -// FIXME: endianess determines this +// FIXME: endianess determines this PIXMAN_a8r8g8b8, -// PIXMAN_b8g8r8a8, +// PIXMAN_b8g8r8a8, im->cache_entry.w, im->cache_entry.h, - im->image.data, + im->image.data, im->cache_entry.w * 4 ); } @@ -285,16 +286,19 @@ _evas_common_rgba_image_post_surface(Image_Entry *ie) { im->pixman.im = pixman_image_create_bits ( -// FIXME: endianess determines this +// FIXME: endianess determines this PIXMAN_x8r8g8b8, // PIXMAN_b8g8r8x8, im->cache_entry.w, im->cache_entry.h, - im->image.data, + im->image.data, im->cache_entry.w * 4 ); } +# else + (void)ie; +# endif #else - ie = NULL; + (void)ie; #endif } @@ -306,7 +310,7 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned #ifdef EVAS_CSERVE if (ie->data1) return 0; -#endif +#endif if (im->image.no_free) return 0; if (im->flags & RGBA_IMAGE_ALPHA_ONLY) @@ -328,7 +332,7 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned # endif #endif _evas_common_rgba_image_post_surface(ie); - + return 0; } @@ -338,12 +342,14 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie) RGBA_Image *im = (RGBA_Image *) ie; #ifdef HAVE_PIXMAN +# ifdef PIXMAN_IMAGE if (im->pixman.im) { pixman_image_unref(im->pixman.im); im->pixman.im = NULL; } -#endif +# endif +#endif if (ie->file) DBG("unload: [%p] %s %s", ie, ie->file, ie->key); if ((im->cs.data) && (im->image.data)) @@ -364,7 +370,7 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie) #ifdef EVAS_CSERVE else if (ie->data1) evas_cserve_image_free(ie); -#endif +#endif im->image.data = NULL; ie->allocated.w = 0; @@ -391,7 +397,7 @@ _evas_common_rgba_image_dirty_region(Image_Entry* ie, unsigned int x __UNUSED__, #ifdef EVAS_CSERVE if (ie->data1) evas_cserve_image_free(ie); -#endif +#endif im->flags |= RGBA_IMAGE_IS_DIRTY; evas_common_rgba_image_scalecache_dirty(&im->cache_entry); } @@ -411,13 +417,13 @@ _evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src) { #ifdef EVAS_CSERVE if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); -#endif +#endif return 1; } #ifdef EVAS_CSERVE if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); -#endif +#endif evas_common_image_colorspace_normalize(src); evas_common_image_colorspace_normalize(dst); /* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ @@ -431,18 +437,18 @@ _evas_common_rgba_image_ram_usage(Image_Entry *ie) { RGBA_Image *im = (RGBA_Image *)ie; int size = sizeof(struct _RGBA_Image); - + if (ie->cache_key) size += strlen(ie->cache_key); if (ie->file) size += strlen(ie->file); if (ie->key) size += strlen(ie->key); - + if (im->image.data) { #ifdef EVAS_CSERVE if ((!im->image.no_free) || (ie->data1)) #else if ((!im->image.no_free)) -#endif +#endif size += im->cache_entry.w * im->cache_entry.h * sizeof(DATA32); } size += evas_common_rgba_image_scalecache_usage_get(&im->cache_entry); @@ -590,7 +596,7 @@ evas_common_image_colorspace_normalize(RGBA_Image *im) { #ifdef EVAS_CSERVE if (((Image_Entry *)im)->data1) evas_cserve_image_free(&im->cache_entry); -#endif +#endif if (!im->image.no_free) free(im->image.data); im->image.data = im->cs.data; im->cs.no_free = im->image.no_free; diff --git a/libraries/evas/src/lib/engines/common/evas_image_scalecache.c b/libraries/evas/src/lib/engines/common/evas_image_scalecache.c index 24a4f2d..e4e4790 100644 --- a/libraries/evas/src/lib/engines/common/evas_image_scalecache.c +++ b/libraries/evas/src/lib/engines/common/evas_image_scalecache.c @@ -48,9 +48,7 @@ struct _Scaleitem #ifdef SCALECACHE static unsigned long long use_counter = 0; -#ifdef BUILD_PTHREAD static LK(cache_lock); -#endif static Eina_Inlist *cache_list = NULL; static unsigned int cache_size = 0; static int init = 0; diff --git a/libraries/evas/src/lib/engines/common/evas_line_main.c b/libraries/evas/src/lib/engines/common/evas_line_main.c index 04401cb..aacf805 100644 --- a/libraries/evas/src/lib/engines/common/evas_line_main.c +++ b/libraries/evas/src/lib/engines/common/evas_line_main.c @@ -109,9 +109,24 @@ _evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y) return; if ((dc->clip.use) && (!IN_RECT(x, y, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h))) return; - pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op); - if (pfunc) - pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_op_t op = PIXMAN_OP_SRC; + + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + + if ((dst->pixman.im) && (dc->col.pixman_color_image)) + pixman_image_composite(op, dc->col.pixman_color_image, NULL, + dst->pixman.im, x, y, 0, 0, x, y, 1, 1); + else +# endif +#endif + { + pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op); + if (pfunc) + pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x); + } } /* @@ -130,6 +145,14 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i RGBA_Gfx_Pt_Func pfunc; RGBA_Gfx_Func sfunc; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; +# endif +#endif + dstw = dst->cache_entry.w; color = dc->col.col; @@ -172,12 +195,30 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i len = x1 - x0 + 1; p = dst->image.data + (dstw * y0) + x0; - sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op); - if (sfunc) - sfunc(NULL, NULL, color, p, len); - } - } - return; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + x0, y0, 0, 0, x0, y0, len, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + x0, y0, 0, 0, x0, y0, len, 1); + else +# endif +#endif + { + sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op); + if (sfunc) + sfunc(NULL, NULL, color, p, len); + } + } + } + return; } pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op); @@ -192,17 +233,34 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i len = y1 - y0 + 1; p = dst->image.data + (dstw * y0) + x0; - while (len--) - { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + x0, y0, 0, 0, x0, y0, 1, len); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, dst->pixman.im, + x0, y0, 0, 0, x0, y0, 1, len); + else +# endif +#endif + { + while (len--) + { #ifdef EVAS_SLI - if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) + if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) #endif - { - pfunc(0, 255, color, p); - } - p += dstw; - } - } + { + pfunc(0, 255, color, p); + } + p += dstw; + } + } + } return; } @@ -281,16 +339,52 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i if (dx > 0) dstw--; else dstw++; } - +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + int pixman_x_position = x0; + int pixman_y_position = y0; + int x_unit = dstw - dst->cache_entry.w; +# endif +#endif + + while (len--) { #ifdef EVAS_SLI if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) #endif { - pfunc(0, 255, color, p); - } - p += dstw; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + pixman_x_position, + pixman_y_position, + 0, 0, pixman_x_position, + pixman_y_position, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pixman_x_position, + pixman_y_position, 0, 0, + pixman_x_position, + pixman_y_position, 1, 1); + else +# endif +#endif + pfunc(0, 255, color, p); + } +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_x_position += x_unit; + pixman_y_position += 1; +# endif +#endif + p += dstw; } } } @@ -456,6 +550,31 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, dx = x1 - x0; dy = y1 - y0; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + int pix_x; + int pix_y; + int pix_x_unit; + int pix_y_unit; + + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + pix_x = x0; + pix_y = y0; + + if (dx < 0) + pix_x_unit = -1; + else + pix_x_unit = 1; + + if (dy < 0) + pix_y_unit = -1; + else + pix_y_unit = 1; +# endif +#endif + if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) ) { _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); @@ -494,6 +613,11 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, prev_y = y; p += dh; py += dely; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_y += pix_y_unit; +# endif +#endif } if (!p1_in) { @@ -509,12 +633,37 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, #endif { if (IN_RANGE(px, py, clw, clh)) - pfunc(0, 255, color, p); - } - next_x: - yy += dyy; - px++; - p++; + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, 255, color, p); + } + } +next_x: + yy += dyy; + px++; + p++; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_x += pix_x_unit; +# endif +#endif } return; } @@ -529,9 +678,14 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, x += ((xx - (x << 16)) >> 15); if (prev_x != x) { - prev_x = x; - px += delx; - p += delx; + prev_x = x; + px += delx; + p += delx; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_x += pix_x_unit; +# endif +#endif } if (!p1_in) { @@ -547,12 +701,38 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, #endif { if (IN_RANGE(px, py, clw, clh)) - pfunc(0, 255, color, p); - } - next_y: + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, 255, color, p); + } + } +next_y: xx += dxx; py++; p += dstw; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_y += pix_y_unit; +# endif +#endif + } } @@ -568,12 +748,43 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x DATA32 *p, *data, color; RGBA_Gfx_Pt_Func pfunc; + dx = x1 - x0; + dy = y1 - y0; + +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + int pix_x; + int pix_y; + int pix_x_unit; + int pix_y_unit; + + pixman_image_t *aa_mask_image; + int alpha_data_buffer; + + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + pix_x = x0; + pix_y = y0; + + if (dx < 0) + pix_x_unit = -1; + else + pix_x_unit = 1; + + if (dy < 0) + pix_y_unit = -1; + else + pix_y_unit = 1; +# endif +#endif if (y0 > y1) EXCHANGE_POINTS(x0, y0, x1, y1); + dx = x1 - x0; dy = y1 - y0; - if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) ) + if ((dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy)) { _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); return; @@ -609,9 +820,14 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x y = (yy >> 16); if (prev_y != y) { - prev_y = y; - p += dh; - py += dely; + prev_y = y; + p += dh; + py += dely; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_y += pix_y_unit; +# endif +#endif } if (!p1_in) { @@ -624,39 +840,109 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x } if (px < clw) { - aa = ((yy - (y << 16)) >> 8); - if ((py) < clh) - pfunc(0, 255 - aa, color, p); - if ((py + 1) < clh) - pfunc(0, aa, color, p + dstw); - } - - next_x: - yy += dyy; - px++; - p++; + aa = ((yy - (y << 16)) >> 8); + if ((py) < clh) + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + alpha_data_buffer = 255 - aa; + aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, + (uint32_t *)&alpha_data_buffer, 4); + + if ((dst->pixman.im) && (dc->col.pixman_color_image ) && + (!dc->mask.mask)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + aa_mask_image, dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask) ) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, 255 - aa, color, p); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_image_unref(aa_mask_image); +# endif +#endif + } + if ((py + 1) < clh) + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + alpha_data_buffer = aa; + aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, + (uint32_t *)&alpha_data_buffer, 4); + + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + aa_mask_image, dst->pixman.im, + pix_x, pix_y + 1, 0, 0, + pix_x, pix_y + 1, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y + 1, 0, 0, + pix_x, pix_y + 1, 1, 1); + else +# endif +#endif + pfunc(0, aa, color, p + dstw); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_image_unref(aa_mask_image); +# endif +#endif + } + } + +next_x: + yy += dyy; + px++; + p++; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_x += pix_x_unit; +# endif +#endif } return; } - + /* steep: y-parametric */ SETUP_LINE_STEEP; while (py < by) { DATA8 aa; - + x = (xx >> 16); if (prev_x != x) { - prev_x = x; - px += delx; - p += delx; + prev_x = x; + px += delx; + p += delx; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_x += pix_x_unit; +# endif +#endif } if (!p1_in) { - if ((px < 0) && (delx < 0)) return; - if ((px > rx) && (delx > 0)) return; + if ((px < 0) && (delx < 0)) return; + if ((px > rx) && (delx > 0)) return; } if (!p0_in) { @@ -664,15 +950,80 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x } if (py < clh) { - aa = ((xx - (x << 16)) >> 8); - if ((px) < clw) - pfunc(0, 255 - aa, color, p); - if ((px + 1) < clw) - pfunc(0, aa, color, p + 1); - } + aa = ((xx - (x << 16)) >> 8); + if ((px) < clw) + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + alpha_data_buffer = 255 - aa; + aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, (uint32_t *)&alpha_data_buffer, 4); + + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + aa_mask_image, dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, 255 - aa, color, p); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_image_unref(aa_mask_image); +# endif +#endif + + } + if ((px + 1) < clw) + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + alpha_data_buffer = aa; + aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, + (uint32_t *)&alpha_data_buffer, 4); + + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + aa_mask_image, dst->pixman.im, + pix_x + 1, pix_y, 0, 0, + pix_x + 1, pix_y, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x + 1, pix_y, 0, 0, + pix_x + 1, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, aa, color, p + 1); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_image_unref(aa_mask_image); +# endif +#endif + } + } next_y: xx += dxx; py++; p += dstw; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_y += pix_y_unit; +# endif +#endif } } diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in index 4c721f9..78e893d 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in @@ -166,8 +166,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in index e796ef2..e00dac8 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in @@ -203,8 +203,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -221,6 +219,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -302,6 +302,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c index 64d5a86..1843265 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c @@ -53,7 +53,8 @@ _op_blend_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 static void init_blend_color_span_funcs_sse3(void) { - op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_c_dp_sse3; +// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) +// op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_c_dp_sse3; op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_caa_dp_sse3; // FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c index 83230e5..5883d15 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c @@ -168,7 +168,8 @@ _op_blend_mas_can_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, i static void init_blend_mask_color_span_funcs_sse3(void) { - op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_mas_c_dp_sse3; +// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) +// op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_mas_c_dp_sse3; op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_mas_cn_dp_sse3; op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_mas_can_dp_sse3; op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_mas_caa_dp_sse3; diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c index 2e72fec..69c597c 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c @@ -146,7 +146,6 @@ init_blend_pixel_span_funcs_sse3(void) op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pas_dp_sse3; op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pan_dp_sse3; - // FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) // op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_p_dpan_sse3; op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pas_dpan_sse3; diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in index 52658a4..40536c0 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in @@ -166,8 +166,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in index 0ccd7f3..d5764b1 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in @@ -166,8 +166,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in index f239cf7..d5452fe 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in @@ -166,8 +166,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in index b68ed3b..4b93b1b 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in @@ -166,8 +166,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_polygon_main.c b/libraries/evas/src/lib/engines/common/evas_polygon_main.c index bca3f83..ea0bf13 100644 --- a/libraries/evas/src/lib/engines/common/evas_polygon_main.c +++ b/libraries/evas/src/lib/engines/common/evas_polygon_main.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include "evas_common.h" @@ -133,6 +137,14 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po int ext_x, ext_y, ext_w, ext_h; int *sorted_index; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_POLY + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; +# endif +#endif + ext_x = 0; ext_y = 0; ext_w = dst->cache_entry.w; @@ -279,10 +291,30 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po if (((span->y) % dc->sli.h) == dc->sli.y) #endif { - ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x; - func(NULL, NULL, dc->col.col, ptr, span->w); - } - } +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_POLY + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + span->x, span->y, 0, 0, + span->x, span->y, span->w, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + span->x, span->y, 0, 0, + span->x, span->y, span->w, 1); + else +# endif +#endif + { + ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x; + func(NULL, NULL, dc->col.col, ptr, span->w); + } + } + } while (spans) { span = (RGBA_Span *)spans; diff --git a/libraries/evas/src/lib/engines/common/evas_rectangle_main.c b/libraries/evas/src/lib/engines/common/evas_rectangle_main.c index 28aaf16..fc25fd0 100644 --- a/libraries/evas/src/lib/engines/common/evas_rectangle_main.c +++ b/libraries/evas/src/lib/engines/common/evas_rectangle_main.c @@ -58,16 +58,34 @@ rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, in RECTS_CLIP_TO_RECT(x, y, w, h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); if ((w <= 0) || (h <= 0)) return; - func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op); - ptr = dst->image.data + (y * dst->cache_entry.w) + x; - for (yy = 0; yy < h; yy++) +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_RECT + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + + if ((dst->pixman.im) && (dc->col.pixman_color_image)) { + pixman_image_composite(op, dc->col.pixman_color_image, NULL, + dst->pixman.im, x, y, 0, 0, + x, y, w, h); + } + else +# endif +#endif + { + func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op); + ptr = dst->image.data + (y * dst->cache_entry.w) + x; + for (yy = 0; yy < h; yy++) + { #ifdef EVAS_SLI - if (((yy + y) % dc->sli.h) == dc->sli.y) + if (((yy + y) % dc->sli.h) == dc->sli.y) #endif - { - func(NULL, NULL, dc->col.col, ptr, w); - } - ptr += dst->cache_entry.w; + { + func(NULL, NULL, dc->col.col, ptr, w); + } + ptr += dst->cache_entry.w; + } } } diff --git a/libraries/evas/src/lib/engines/common/evas_scale_sample.c b/libraries/evas/src/lib/engines/common/evas_scale_sample.c index 54b8e92..a8951b8 100644 --- a/libraries/evas/src/lib/engines/common/evas_scale_sample.c +++ b/libraries/evas/src/lib/engines/common/evas_scale_sample.c @@ -154,7 +154,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, dst_clip_w = m_clip_w; dst_clip_h = m_clip_h; } - + if (dst_clip_x < dst_region_x) { dst_clip_w += dst_clip_x - dst_region_x; @@ -258,7 +258,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, func = evas_common_gfx_func_composite_pixel_mask_span_get(src, dst, dst_clip_w, dc->render_op); maskobj = dc->mask.mask; mask = maskobj->mask.mask; -/* +/* if (1 || dst_region_w > src_region_w || dst_region_h > src_region_h){ printf("Mask w/h: %d/%d\n",maskobj->cache_entry.w, maskobj->cache_entry.h); @@ -276,26 +276,47 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h)) { #ifdef HAVE_PIXMAN - if ((1) && - (src->pixman.im) && (dst->pixman.im) && +# ifdef PIXMAN_IMAGE_SCALE_SAMPLE + if ((src->pixman.im) && (dst->pixman.im) && (!dc->mask.mask) && ((!dc->mul.use) || ((dc->mul.use) && (dc->mul.col == 0xffffffff))) && ((dc->render_op == _EVAS_RENDER_COPY) || - (dc->render_op == _EVAS_RENDER_BLEND)) - ) + (dc->render_op == _EVAS_RENDER_BLEND))) { pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY - if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER; + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + pixman_image_composite(op, src->pixman.im, NULL, dst->pixman.im, (dst_clip_x - dst_region_x) + src_region_x, - (dst_clip_y - dst_region_y) + src_region_y, + (dst_clip_y - dst_region_y) + src_region_y, 0, 0, - dst_clip_x, dst_clip_y, + dst_clip_x, dst_clip_y, + dst_clip_w, dst_clip_h); + } + else if ((src->pixman.im) && (dst->pixman.im) && + (dc->mask.mask) && (dc->mask.mask->pixman.im) && + ((dc->render_op == _EVAS_RENDER_COPY) || + (dc->render_op == _EVAS_RENDER_BLEND))) + { + // In case of pixel and color operation. + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + + pixman_image_composite(op, + src->pixman.im, dc->mask.mask->pixman.im, + dst->pixman.im, + (dst_clip_x - dst_region_x) + src_region_x, + (dst_clip_y - dst_region_y) + src_region_y, + 0, 0, + dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h); } else +# endif #endif { ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x; @@ -322,59 +343,59 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, } else { - /* fill scale tables */ + /* fill scale tables */ for (x = 0; x < dst_clip_w; x++) - lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x; + lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x; for (y = 0; y < dst_clip_h; y++) - row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h) - + src_region_y) * src_w); + row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h) + + src_region_y) * src_w); /* scale to dst */ dptr = dst_ptr; #ifdef DIRECT_SCALE if ((!src->cache_entry.flags.alpha) && - (!dst->cache_entry.flags.alpha) && - (!dc->mul.use)) + (!dst->cache_entry.flags.alpha) && + (!dc->mul.use)) { for (y = 0; y < dst_clip_h; y++) { -#ifdef EVAS_SLI - if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) -#endif - { - dst_ptr = dptr; - for (x = 0; x < dst_clip_w; x++) - { - ptr = row_ptr[y] + lin_ptr[x]; - *dst_ptr = *ptr; - dst_ptr++; - } - } - dptr += dst_w; - } +# ifdef EVAS_SLI + if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) +# endif + { + dst_ptr = dptr; + for (x = 0; x < dst_clip_w; x++) + { + ptr = row_ptr[y] + lin_ptr[x]; + *dst_ptr = *ptr; + dst_ptr++; + } + } + dptr += dst_w; + } } else #endif { /* a scanline buffer */ - buf = alloca(dst_clip_w * sizeof(DATA32)); - for (y = 0; y < dst_clip_h; y++) - { + buf = alloca(dst_clip_w * sizeof(DATA32)); + for (y = 0; y < dst_clip_h; y++) + { #ifdef EVAS_SLI - if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) + if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) #endif - { - dst_ptr = buf; - for (x = 0; x < dst_clip_w; x++) - { - ptr = row_ptr[y] + lin_ptr[x]; - *dst_ptr = *ptr; - dst_ptr++; - } - /* * blend here [clip_w *] buf -> dptr * */ - func(buf, NULL, dc->mul.col, dptr, dst_clip_w); - } - dptr += dst_w; - } + { + dst_ptr = buf; + for (x = 0; x < dst_clip_w; x++) + { + ptr = row_ptr[y] + lin_ptr[x]; + *dst_ptr = *ptr; + dst_ptr++; + } + /* * blend here [clip_w *] buf -> dptr * */ + func(buf, NULL, dc->mul.col, dptr, dst_clip_w); + } + dptr += dst_w; + } } } } diff --git a/libraries/evas/src/lib/engines/common/evas_tiler.c b/libraries/evas/src/lib/engines/common/evas_tiler.c index 0bbe811..ff359a4 100644 --- a/libraries/evas/src/lib/engines/common/evas_tiler.c +++ b/libraries/evas/src/lib/engines/common/evas_tiler.c @@ -19,7 +19,9 @@ static inline list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t static inline void rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error); static inline void rect_list_add_split_fuzzy_and_merge(list_t *rects, list_node_t *node, int split_accepted_error, int merge_accepted_error); static inline void rect_print(const rect_t r); +#if 0 static inline void rect_list_print(const list_t rects); +#endif static const list_node_t list_node_zeroed = { NULL }; static const list_t list_zeroed = { NULL, NULL }; @@ -117,6 +119,7 @@ rect_print(const rect_t r) INF("", r.left, r.top, r.width, r.height); } +#if 0 static inline void rect_list_print(const list_t rects) { @@ -143,6 +146,7 @@ rect_list_print(const list_t rects) } putchar(']'); } +#endif static inline void rect_list_append_node(list_t *rects, list_node_t *node) diff --git a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c index 9f7859b..002cfbe 100644 --- a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c +++ b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include diff --git a/libraries/evas/src/lib/engines/common/language/evas_language_utils.c b/libraries/evas/src/lib/engines/common/language/evas_language_utils.c index 9c9b3e3..b362f10 100644 --- a/libraries/evas/src/lib/engines/common/language/evas_language_utils.c +++ b/libraries/evas/src/lib/engines/common/language/evas_language_utils.c @@ -13,6 +13,12 @@ * * @{ */ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + #include #include "evas_language_utils.h" diff --git a/libraries/evas/src/lib/engines/common_16/Makefile.in b/libraries/evas/src/lib/engines/common_16/Makefile.in index 9097a8d..313cbda 100644 --- a/libraries/evas/src/lib/engines/common_16/Makefile.in +++ b/libraries/evas/src/lib/engines/common_16/Makefile.in @@ -201,8 +201,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -219,6 +217,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -300,6 +300,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common_8/Makefile.in b/libraries/evas/src/lib/engines/common_8/Makefile.in index 06c13de..7fa4fbb 100644 --- a/libraries/evas/src/lib/engines/common_8/Makefile.in +++ b/libraries/evas/src/lib/engines/common_8/Makefile.in @@ -200,8 +200,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -218,6 +216,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -299,6 +299,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/file/Makefile.in b/libraries/evas/src/lib/file/Makefile.in index 599d980..2ac89b1 100644 --- a/libraries/evas/src/lib/file/Makefile.in +++ b/libraries/evas/src/lib/file/Makefile.in @@ -196,8 +196,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -214,6 +212,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -295,6 +295,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/file/evas_module.c b/libraries/evas/src/lib/file/evas_module.c index 6b4d4f6..21d5cd0 100644 --- a/libraries/evas/src/lib/file/evas_module.c +++ b/libraries/evas/src/lib/file/evas_module.c @@ -285,7 +285,7 @@ evas_module_register(const Evas_Module_Api *module, Evas_Module_Type type) if (type == EVAS_MODULE_TYPE_ENGINE) { eina_array_push(evas_engines, em); - em->id_engine = eina_array_count_get(evas_engines); + em->id_engine = eina_array_count(evas_engines); } eina_hash_direct_add(evas_modules[type], module->name, em); @@ -398,7 +398,7 @@ Evas_Module * evas_module_engine_get(int render_method) { if ((render_method <= 0) || - ((unsigned int)render_method > eina_array_count_get(evas_engines))) + ((unsigned int)render_method > eina_array_count(evas_engines))) return NULL; return eina_array_data_get(evas_engines, render_method - 1); } diff --git a/libraries/evas/src/lib/file/evas_path.c b/libraries/evas/src/lib/file/evas_path.c index ff13e20..c663c16 100644 --- a/libraries/evas/src/lib/file/evas_path.c +++ b/libraries/evas/src/lib/file/evas_path.c @@ -123,7 +123,7 @@ evas_file_path_list(char *path, const char *match, int match_case) else files = eina_list_append(files, strdup(info->path + info->name_start)); } - eina_iterator_free(it); + if (it) eina_iterator_free(it); return files; } diff --git a/libraries/evas/src/lib/include/Makefile.in b/libraries/evas/src/lib/include/Makefile.in index 9d5c371..21f0099 100644 --- a/libraries/evas/src/lib/include/Makefile.in +++ b/libraries/evas/src/lib/include/Makefile.in @@ -166,8 +166,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/include/evas_common.h b/libraries/evas/src/lib/include/evas_common.h index f817202..a9063e6 100644 --- a/libraries/evas/src/lib/include/evas_common.h +++ b/libraries/evas/src/lib/include/evas_common.h @@ -1,9 +1,9 @@ #ifndef EVAS_COMMON_H #define EVAS_COMMON_H -#ifdef HAVE_CONFIG_H -# include "config.h" /* so that EAPI in Evas.h is correctly defined */ -#endif +//#ifdef HAVE_CONFIG_H +#include "config.h" /* so that EAPI in Evas.h is correctly defined */ +//#endif #ifdef HAVE_EVIL # include @@ -138,8 +138,6 @@ extern EAPI int _evas_log_dom_global; # define BUILD_PTHREAD #endif -#ifdef BUILD_PTHREAD - #define LK(x) Eina_Lock x #define LKI(x) eina_lock_new(&(x)) #define LKD(x) eina_lock_free(&(x)) @@ -148,42 +146,28 @@ extern EAPI int _evas_log_dom_global; #define LKU(x) eina_lock_release(&(x)) #define LKDBG(x) eina_lock_debug(&(x)) +/* for rwlocks */ +#define RWLK(x) Eina_RWLock x +#define RWLKI(x) eina_rwlock_new(&(x)) +#define RWLKD(x) eina_rwlock_free(&(x)) +#define RDLKL(x) eina_rwlock_take_read(&(x)) +#define WRLKL(x) eina_rwlock_take_write(&(x)) +#define RWLKU(x) eina_rwlock_release(&(x)) + +#ifdef BUILD_PTHREAD + # define TH(x) pthread_t x # define THI(x) int x # define TH_MAX 8 -/* for rwlocks */ -#define RWLK(x) pthread_rwlock_t x -#define RWLKI(x) pthread_rwlock_init(&(x), NULL) -#define RWLKD(x) pthread_rwlock_destroy(&(x)) -#define RDLKL(x) pthread_rwlock_rdlock(&(x)) -#define WRLKL(x) pthread_rwlock_wrlock(&(x)) -#define RWLKU(x) pthread_rwlock_unlock(&(x)) - - // even though in theory having every Nth rendered line done by a different // thread might even out load across threads - it actually slows things down. //#define EVAS_SLI 1 #else -# define LK(x) -# define LKI(x) -# define LKD(x) -# define LKL(x) -# define LKT(x) 1 -# define LKU(x) # define TH(x) # define THI(x) # define TH_MAX 0 -# define LKDBG(x) - -/* for rwlocks */ -#define RWLK(x) -#define RWLKI(x) -#define RWLKD(x) -#define RDLKL(x) -#define WRLKL(x) -#define RWLKU(x) #endif @@ -338,6 +322,21 @@ void *alloca (size_t); #define pld(addr, off) #endif /* __ARMEL__ */ +// these here are in config.h - just here for documentation +//#ifdef __ARM_ARCH__ +// *IF* you enable pixman, this determines which things pixman will do +////#define PIXMAN_FONT 1 +////#define PIXMAN_RECT 1 +////#define PIXMAN_LINE 1 +////#define PIXMAN_POLY 1 +//#define PIXMAN_IMAGE 1 +//#define PIXMAN_IMAGE_SCALE_SAMPLE 1 +//#endif +// not related to pixman but an alternate rotate code +//#define TILE_ROTATE 1 + +#define TILE_CACHE_LINE_SIZE 64 + /*****************************************************************************/ #define UNROLL2(op...) op op @@ -678,6 +677,9 @@ struct _RGBA_Draw_Context DATA32 col; } mul; struct { +#ifdef HAVE_PIXMAN + pixman_image_t *pixman_color_image; +#endif DATA32 col; } col; struct RGBA_Draw_Context_clip { @@ -1032,14 +1034,14 @@ struct _Tilebuf int x, y, w, h; } prev_add, prev_del; #ifdef RECTUPDATE -/* +/* Regionbuf *rb; */ #elif defined(EVAS_RECT_SPLIT) int need_merge; list_t rects; #else -/* +/* struct { int w, h; Tilebuf_Tile *tiles; diff --git a/libraries/evas/src/lib/include/evas_private.h b/libraries/evas/src/lib/include/evas_private.h index 90498d0..84c1d36 100644 --- a/libraries/evas/src/lib/include/evas_private.h +++ b/libraries/evas/src/lib/include/evas_private.h @@ -301,12 +301,13 @@ struct _Evas struct { unsigned char inside : 1; int mouse_grabbed; + int downs; DATA32 button; Evas_Coord x, y; + int nogrep; struct { Eina_List *in; } object; - } pointer; struct { @@ -320,6 +321,12 @@ struct _Evas unsigned char changed : 1; } output; + struct + { + Evas_Coord x, y, w, h; + Eina_Bool changed : 1; + } framespace; + Eina_List *damages; Eina_List *obscures; @@ -331,6 +338,7 @@ struct _Evas int walking_list; int events_frozen; + Evas_Event_Flags default_event_flags; struct { Evas_Module *module; @@ -577,7 +585,7 @@ struct _Evas_Object unsigned char recalculate_cycle; Eina_Clist calc_entry; - Evas_Object_Pointer_Mode pointer_mode : 1; + Evas_Object_Pointer_Mode pointer_mode : 2; Eina_Bool store : 1; Eina_Bool pass_events : 1; @@ -608,6 +616,8 @@ struct _Evas_Object Eina_Bool changed_move_only : 1; Eina_Bool changed_nomove : 1; Eina_Bool del_ref : 1; + + Eina_Bool is_frame : 1; }; struct _Evas_Func_Node @@ -772,6 +782,7 @@ struct _Evas_Func char *(*image_format_get) (void *data, void *image); void (*image_colorspace_set) (void *data, void *image, int cspace); int (*image_colorspace_get) (void *data, void *image); + Eina_Bool (*image_can_region_get) (void *data, void *image); void (*image_mask_create) (void *data, void *image); void *(*image_native_set) (void *data, void *image, void *native); void *(*image_native_get) (void *data, void *image); @@ -861,6 +872,7 @@ struct _Evas_Image_Load_Func Eina_Bool (*file_head) (Image_Entry *ie, const char *file, const char *key, int *error); Eina_Bool (*file_data) (Image_Entry *ie, const char *file, const char *key, int *error); double (*frame_duration) (Image_Entry *ie, const char *file, const int start, const int frame_num); + Eina_Bool do_region; }; struct _Evas_Image_Save_Func @@ -904,7 +916,7 @@ void evas_object_clip_across_check(Evas_Object *obj); void evas_object_clip_across_clippees_check(Evas_Object *obj); void evas_object_mapped_clip_across_mark(Evas_Object *obj); void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info); -void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info); +void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id); Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y); int evas_mem_free(int mem_required); int evas_mem_degrade(int mem_required); diff --git a/libraries/evas/src/modules/Makefile.in b/libraries/evas/src/modules/Makefile.in index 9cd0201..e4f1cbc 100644 --- a/libraries/evas/src/modules/Makefile.in +++ b/libraries/evas/src/modules/Makefile.in @@ -206,8 +206,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -224,6 +222,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -305,6 +305,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/Makefile.am b/libraries/evas/src/modules/engines/Makefile.am index 7d870a1..42585cc 100644 --- a/libraries/evas/src/modules/engines/Makefile.am +++ b/libraries/evas/src/modules/engines/Makefile.am @@ -68,4 +68,9 @@ endif if !EVAS_STATIC_BUILD_SOFTWARE_X11 SUBDIRS += software_x11 endif - +if !EVAS_STATIC_BUILD_WAYLAND_SHM +SUBDIRS += wayland_shm +endif +if !EVAS_STATIC_BUILD_WAYLAND_EGL +SUBDIRS += wayland_egl +endif diff --git a/libraries/evas/src/modules/engines/Makefile.in b/libraries/evas/src/modules/engines/Makefile.in index 3994fca..5820026 100644 --- a/libraries/evas/src/modules/engines/Makefile.in +++ b/libraries/evas/src/modules/engines/Makefile.in @@ -54,6 +54,8 @@ host_triplet = @host@ @EVAS_STATIC_BUILD_SOFTWARE_DDRAW_FALSE@am__append_19 = software_ddraw @EVAS_STATIC_BUILD_SOFTWARE_GDI_FALSE@am__append_20 = software_gdi @EVAS_STATIC_BUILD_SOFTWARE_X11_FALSE@am__append_21 = software_x11 +@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@am__append_22 = wayland_shm +@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@am__append_23 = wayland_egl subdir = src/modules/engines DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -102,7 +104,7 @@ DIST_SUBDIRS = software_generic buffer direct3d directfb fb psl1ght \ gl_common gl_x11 gl_sdl gl_cocoa software_8 software_8_x11 \ software_16 software_16_ddraw software_16_wince \ software_16_x11 software_sdl software_16_sdl software_ddraw \ - software_gdi software_x11 + software_gdi software_x11 wayland_shm wayland_egl DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -231,8 +233,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +249,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +332,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ @@ -411,7 +417,8 @@ SUBDIRS = $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_10) $(am__append_11) $(am__append_12) \ $(am__append_13) $(am__append_14) $(am__append_15) \ $(am__append_16) $(am__append_17) $(am__append_18) \ - $(am__append_19) $(am__append_20) $(am__append_21) + $(am__append_19) $(am__append_20) $(am__append_21) \ + $(am__append_22) $(am__append_23) all: all-recursive .SUFFIXES: diff --git a/libraries/evas/src/modules/engines/buffer/Makefile.in b/libraries/evas/src/modules/engines/buffer/Makefile.in index 2311344..ec9c0b8 100644 --- a/libraries/evas/src/modules/engines/buffer/Makefile.in +++ b/libraries/evas/src/modules/engines/buffer/Makefile.in @@ -240,8 +240,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -258,6 +256,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -339,6 +339,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/direct3d/Makefile.in b/libraries/evas/src/modules/engines/direct3d/Makefile.in index 03d892e..85baff8 100644 --- a/libraries/evas/src/modules/engines/direct3d/Makefile.in +++ b/libraries/evas/src/modules/engines/direct3d/Makefile.in @@ -293,8 +293,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -311,6 +309,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -392,6 +392,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/directfb/Makefile.in b/libraries/evas/src/modules/engines/directfb/Makefile.in index cd5651a..df2f63b 100644 --- a/libraries/evas/src/modules/engines/directfb/Makefile.in +++ b/libraries/evas/src/modules/engines/directfb/Makefile.in @@ -240,8 +240,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -258,6 +256,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -339,6 +339,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/fb/Makefile.in b/libraries/evas/src/modules/engines/fb/Makefile.in index aec24ff..1e82b34 100644 --- a/libraries/evas/src/modules/engines/fb/Makefile.in +++ b/libraries/evas/src/modules/engines/fb/Makefile.in @@ -244,8 +244,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -262,6 +260,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -343,6 +343,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/gl_cocoa/Makefile.in b/libraries/evas/src/modules/engines/gl_cocoa/Makefile.in index ceea03d..6e616f4 100644 --- a/libraries/evas/src/modules/engines/gl_cocoa/Makefile.in +++ b/libraries/evas/src/modules/engines/gl_cocoa/Makefile.in @@ -258,8 +258,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -276,6 +274,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -357,6 +357,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/gl_common/Makefile.in b/libraries/evas/src/modules/engines/gl_common/Makefile.in index 61ed478..27284f9 100644 --- a/libraries/evas/src/modules/engines/gl_common/Makefile.in +++ b/libraries/evas/src/modules/engines/gl_common/Makefile.in @@ -245,8 +245,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -263,6 +261,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -344,6 +344,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h b/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h index a088748..051fb3b 100644 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_common.h @@ -15,7 +15,7 @@ #define GL_GLEXT_PROTOTYPES -#ifdef BUILD_ENGINE_GL_QUARTZ +#ifdef BUILD_ENGINE_GL_COCOA # include # include #else diff --git a/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c b/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c index c99f4bd..8162cd1 100644 --- a/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c +++ b/libraries/evas/src/modules/engines/gl_common/evas_gl_texture.c @@ -109,7 +109,9 @@ _tex_format_index(GLuint format) static void _tex_2d(int intfmt, int w, int h, int fmt, int type) { +#ifdef GL_TEXTURE_INTERNAL_FORMAT int intfmtret = -1; +#endif glTexImage2D(GL_TEXTURE_2D, 0, intfmt, w, h, 0, fmt, type, NULL); GLERR(__FUNCTION__, __FILE__, __LINE__, ""); #ifdef GL_TEXTURE_INTERNAL_FORMAT @@ -479,7 +481,6 @@ _pool_tex_dynamic_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, i #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) int fmt; // EGL_MAP_GL_TEXTURE_RGBA_SEC or EGL_MAP_GL_TEXTURE_RGB_SEC or bust int pixtype; // EGL_MAP_GL_TEXTURE_UNSIGNED_BYTE_SEC or bust - int glformat; int attr[] = { EGL_MAP_GL_TEXTURE_WIDTH_SEC, 32, @@ -914,7 +915,7 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im) tpix = alloca(im->cache_entry.h * sizeof(DATA32)); pd = tpix; ps = im->image.data; - for (i = 0; i < im->cache_entry.h; i++) + for (i = 0; i < (int)im->cache_entry.h; i++) { *pd = *ps; pd++; @@ -929,7 +930,7 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im) tpix); pd = tpix; ps = im->image.data + (im->cache_entry.w - 1); - for (i = 0; i < im->cache_entry.h; i++) + for (i = 0; i < (int)im->cache_entry.h; i++) { *pd = *ps; pd++; diff --git a/libraries/evas/src/modules/engines/gl_sdl/Makefile.in b/libraries/evas/src/modules/engines/gl_sdl/Makefile.in index 5d4135d..bfb29ac 100644 --- a/libraries/evas/src/modules/engines/gl_sdl/Makefile.in +++ b/libraries/evas/src/modules/engines/gl_sdl/Makefile.in @@ -239,8 +239,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -257,6 +255,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -338,6 +338,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/gl_x11/Makefile.in b/libraries/evas/src/modules/engines/gl_x11/Makefile.in index f589e61..ad4944e 100644 --- a/libraries/evas/src/modules/engines/gl_x11/Makefile.in +++ b/libraries/evas/src/modules/engines/gl_x11/Makefile.in @@ -242,8 +242,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -260,6 +258,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -341,6 +341,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/gl_x11/evas_engine.c b/libraries/evas/src/modules/engines/gl_x11/evas_engine.c index 38e0c13..fbbd1a2 100644 --- a/libraries/evas/src/modules/engines/gl_x11/evas_engine.c +++ b/libraries/evas/src/modules/engines/gl_x11/evas_engine.c @@ -584,25 +584,30 @@ _extensions_init(Render_Engine *re) #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) // EGL Extensions - evasglexts = glsym_eglQueryString(re->win->egl_disp, EGL_EXTENSIONS); + if (glsym_eglQueryString) + { + evasglexts = glsym_eglQueryString(re->win->egl_disp, EGL_EXTENSIONS); #else - evasglexts = glXQueryExtensionsString(re->info->info.display, - re->info->info.screen); + if (glsym_glXQueryExtensionsString) + { + evasglexts = glXQueryExtensionsString(re->info->info.display, + re->info->info.screen); #endif - DBG("--------EvasGL Extensions----------"); - for (i = 0; _evasgl_ext_entries[i].name != NULL; i++) - { - if ( (strstr(evasglexts, _evasgl_ext_entries[i].name) != NULL) || - (strstr(evasglexts, _evasgl_ext_entries[i].real_name) != NULL) ) + DBG("--------EvasGL Extensions----------"); + for (i = 0; _evasgl_ext_entries[i].name != NULL; i++) { - _evasgl_ext_entries[i].supported = 1; - strcat(_evasgl_ext_string, _evasgl_ext_entries[i].name); - strcat(_evasgl_ext_string, " "); - DBG("\t%s", _evasgl_ext_entries[i].name); + if ( (strstr(evasglexts, _evasgl_ext_entries[i].name) != NULL) || + (strstr(evasglexts, _evasgl_ext_entries[i].real_name) != NULL) ) + { + _evasgl_ext_entries[i].supported = 1; + strcat(_evasgl_ext_string, _evasgl_ext_entries[i].name); + strcat(_evasgl_ext_string, " "); + DBG("\t%s", _evasgl_ext_entries[i].name); + } } + DBG(" "); } - DBG(" "); } int _evas_engine_GL_X11_log_dom = -1; @@ -1125,12 +1130,12 @@ eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) eng_window_use(re->win); evas_gl_common_context_resize(re->win->gl_context, re->win->w, re->win->h, re->win->rot); evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); -/* + RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, re->win->w, re->win->h); if ((w <= 0) || (h <= 0)) return; if (!re->win->draw.redraw) { -#if 0 +#if 1 re->win->draw.x1 = x; re->win->draw.y1 = y; re->win->draw.x2 = x + w - 1; @@ -1150,11 +1155,10 @@ eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) if ((y + h - 1) > re->win->draw.y2) re->win->draw.y2 = y + h - 1; } re->win->draw.redraw = 1; - */ } static void -eng_output_redraws_rect_del(void *data __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__) +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) { Render_Engine *re; @@ -1244,10 +1248,10 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i //#define FRAMECOUNT 1 #ifdef FRAMECOUNT -double +static double get_time(void) { - struct timeval timev; + struct timeval timev; gettimeofday(&timev, NULL); return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000); @@ -1391,44 +1395,46 @@ eng_output_flush(void *data) { re->info->callback.pre_swap(re->info->callback.data, re->evas); } -/* - if ((1) -// (re->win->draw.x1 == 0) && -// (re->win->draw.y1 == 0) && -// (re->win->draw.x2 == (re->win->w - 1)) && -// (re->win->draw.y2 == (re->win->h - 1)) - ) - */ +#if 1 + if (1) +#else + if ((re->win->draw.x1 == 0) && (re->win->draw.y1 == 0) && (re->win->draw.x2 == (re->win->w - 1)) && (re->win->draw.y2 == (re->win->h - 1))) +#endif { +// double t, t2 = 0.0; +// t = get_time(); glXSwapBuffers(re->win->disp, re->win->win); - if (!safe_native) glXWaitGL(); +// t = get_time() - t; +// if (!safe_native) +// { +// t2 = get_time(); +// glXWaitGL(); +// t2 = get_time() - t2; +// } +// printf("swap: %3.5f (%3.5fms), x wait gl: %3.5f (%3.5fms)\n", +// t, t * 1000.0, t2, t2 * 1000.0); } -/* else { // FIXME: this doesn't work.. why oh why? int sx, sy, sw, sh; - // fimxe - reset when done -// glEnable(GL_SCISSOR_TEST); - glDrawBuffer(GL_FRONT); - sx = re->win->draw.x1; sy = re->win->draw.y1; sw = (re->win->draw.x2 - re->win->draw.x1) + 1; sh = (re->win->draw.y2 - re->win->draw.y1) + 1; sy = re->win->h - sy - sh; - -// glScissor(sx, sy, sw, sh); - glRasterPos2i(sx, re->win->h - sy); + + glBitmap(0, 0, 0, 0, sx, re->win->h - sy, NULL); + glEnable(GL_SCISSOR_TEST); + glScissor(sx, sy, sw, sh); + glDrawBuffer(GL_FRONT); glCopyPixels(sx, sy, sw, sh, GL_COLOR); - glRasterPos2i(0, 0); - -// glDisable(GL_SCISSOR_TEST); glDrawBuffer(GL_BACK); + glDisable(GL_SCISSOR_TEST); + glBitmap(0, 0, 0, 0, 0, 0, NULL); glFlush(); } - */ if (re->info->callback.post_swap) { re->info->callback.post_swap(re->info->callback.data, re->evas); @@ -3469,7 +3475,10 @@ evgl_evasglCreateImage(int target, void* buffer, int *attrib_list) attrib_list); } else - ERR("Invalid Engine... (Can't acccess EGL Display)\n"); + { + ERR("Invalid Engine... (Can't acccess EGL Display)\n"); + return NULL; + } } static void @@ -3826,6 +3835,18 @@ eng_image_animated_frame_set(void *data __UNUSED__, void *image, int frame_index return EINA_TRUE; } +static Eina_Bool +eng_image_can_region_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + if (!gim) return EINA_FALSE; + im = (Image_Entry *)gim->im; + if (!im) return EINA_FALSE; + return ((Evas_Image_Load_Func*) im->info.loader)->do_region; +} + + static void eng_image_max_size_get(void *data, int *maxw, int *maxh) { @@ -3903,6 +3924,7 @@ module_open(Evas_Module *em) ORD(image_format_get); ORD(image_colorspace_set); ORD(image_colorspace_get); + ORD(image_can_region_get); ORD(image_mask_create); ORD(image_native_set); ORD(image_native_get); diff --git a/libraries/evas/src/modules/engines/gl_x11/evas_x_main.c b/libraries/evas/src/modules/engines/gl_x11/evas_x_main.c index 323c976..c29ab67 100644 --- a/libraries/evas/src/modules/engines/gl_x11/evas_x_main.c +++ b/libraries/evas/src/modules/engines/gl_x11/evas_x_main.c @@ -531,13 +531,13 @@ eng_window_free(Evas_GL_X11_Window *gw) #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) if (gw->egl_surface[0] != EGL_NO_SURFACE) eglDestroySurface(gw->egl_disp, gw->egl_surface[0]); + eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); if (ref == 0) { if (context) eglDestroyContext(gw->egl_disp, context); eglTerminate(gw->egl_disp); context = EGL_NO_CONTEXT; } - eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); #else if (gw->glxwin) glXDestroyWindow(gw->disp, gw->glxwin); if (ref == 0) diff --git a/libraries/evas/src/modules/engines/psl1ght/Makefile.in b/libraries/evas/src/modules/engines/psl1ght/Makefile.in index 6b553ac..f8524a4 100644 --- a/libraries/evas/src/modules/engines/psl1ght/Makefile.in +++ b/libraries/evas/src/modules/engines/psl1ght/Makefile.in @@ -240,8 +240,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -258,6 +256,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -339,6 +339,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_16/Makefile.in b/libraries/evas/src/modules/engines/software_16/Makefile.in index 1fc95cf..88164e1 100644 --- a/libraries/evas/src/modules/engines/software_16/Makefile.in +++ b/libraries/evas/src/modules/engines/software_16/Makefile.in @@ -235,8 +235,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -253,6 +251,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -334,6 +334,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.in b/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.in index f588c4f..0039410 100644 --- a/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.in +++ b/libraries/evas/src/modules/engines/software_16_ddraw/Makefile.in @@ -265,8 +265,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -283,6 +281,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -364,6 +364,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_16_sdl/Makefile.in b/libraries/evas/src/modules/engines/software_16_sdl/Makefile.in index 219e392..6ebf0db 100644 --- a/libraries/evas/src/modules/engines/software_16_sdl/Makefile.in +++ b/libraries/evas/src/modules/engines/software_16_sdl/Makefile.in @@ -238,8 +238,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -256,6 +254,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -337,6 +337,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_16_wince/Makefile.in b/libraries/evas/src/modules/engines/software_16_wince/Makefile.in index 571891e..95c484e 100644 --- a/libraries/evas/src/modules/engines/software_16_wince/Makefile.in +++ b/libraries/evas/src/modules/engines/software_16_wince/Makefile.in @@ -271,8 +271,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -289,6 +287,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -370,6 +370,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_16_x11/Makefile.in b/libraries/evas/src/modules/engines/software_16_x11/Makefile.in index be43dad..3232681 100644 --- a/libraries/evas/src/modules/engines/software_16_x11/Makefile.in +++ b/libraries/evas/src/modules/engines/software_16_x11/Makefile.in @@ -244,8 +244,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -262,6 +260,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -343,6 +343,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_8/Makefile.in b/libraries/evas/src/modules/engines/software_8/Makefile.in index bf16fcf..3ee42fd 100644 --- a/libraries/evas/src/modules/engines/software_8/Makefile.in +++ b/libraries/evas/src/modules/engines/software_8/Makefile.in @@ -234,8 +234,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -252,6 +250,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -333,6 +333,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_8_x11/Makefile.in b/libraries/evas/src/modules/engines/software_8_x11/Makefile.in index fa88a4d..22577af 100644 --- a/libraries/evas/src/modules/engines/software_8_x11/Makefile.in +++ b/libraries/evas/src/modules/engines/software_8_x11/Makefile.in @@ -244,8 +244,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -262,6 +260,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -343,6 +343,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_ddraw/Makefile.in b/libraries/evas/src/modules/engines/software_ddraw/Makefile.in index be4c977..da65f92 100644 --- a/libraries/evas/src/modules/engines/software_ddraw/Makefile.in +++ b/libraries/evas/src/modules/engines/software_ddraw/Makefile.in @@ -266,8 +266,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -284,6 +282,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -365,6 +365,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_gdi/Makefile.in b/libraries/evas/src/modules/engines/software_gdi/Makefile.in index 5dea632..a2421ef 100644 --- a/libraries/evas/src/modules/engines/software_gdi/Makefile.in +++ b/libraries/evas/src/modules/engines/software_gdi/Makefile.in @@ -249,8 +249,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -267,6 +265,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -348,6 +348,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_generic/Makefile.in b/libraries/evas/src/modules/engines/software_generic/Makefile.in index 6d75f23..4f66536 100644 --- a/libraries/evas/src/modules/engines/software_generic/Makefile.in +++ b/libraries/evas/src/modules/engines/software_generic/Makefile.in @@ -236,8 +236,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -254,6 +252,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -335,6 +335,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_generic/evas_engine.c b/libraries/evas/src/modules/engines/software_generic/evas_engine.c index b2c53c5..48944dd 100644 --- a/libraries/evas/src/modules/engines/software_generic/evas_engine.c +++ b/libraries/evas/src/modules/engines/software_generic/evas_engine.c @@ -1,6 +1,275 @@ #include "evas_common.h" /* Also includes international specific stuff */ #include "evas_private.h" +#ifdef HAVE_DLSYM +# include /* dlopen,dlclose,etc */ + +# define EVAS_GL 1 +# define EVAS_GL_NO_GL_H_CHECK 1 +# include "Evas_GL.h" + +#else +# warning software_generic will not be able to have Evas_GL API. +#endif + +#ifdef EVAS_GL +//----------------------------------// +// OSMesa... + +#define OSMESA_MAJOR_VERSION 6 +#define OSMESA_MINOR_VERSION 5 +#define OSMESA_PATCH_VERSION 0 + +/* + * Values for the format parameter of OSMesaCreateContext() + * New in version 2.0. + */ +#define OSMESA_COLOR_INDEX GL_COLOR_INDEX +#define OSMESA_RGBA GL_RGBA +#define OSMESA_BGRA 0x1 +#define OSMESA_ARGB 0x2 +#define OSMESA_RGB GL_RGB +#define OSMESA_BGR 0x4 +#define OSMESA_RGB_565 0x5 + + +/* + * OSMesaPixelStore() parameters: + * New in version 2.0. + */ +#define OSMESA_ROW_LENGTH 0x10 +#define OSMESA_Y_UP 0x11 + + +/* + * Accepted by OSMesaGetIntegerv: + */ +#define OSMESA_WIDTH 0x20 +#define OSMESA_HEIGHT 0x21 +#define OSMESA_FORMAT 0x22 +#define OSMESA_TYPE 0x23 +#define OSMESA_MAX_WIDTH 0x24 /* new in 4.0 */ +#define OSMESA_MAX_HEIGHT 0x25 /* new in 4.0 */ + + +typedef void (*OSMESAproc)(); +typedef struct osmesa_context *OSMesaContext; +#endif + +typedef struct _Render_Engine_GL_Surface Render_Engine_GL_Surface; +typedef struct _Render_Engine_GL_Context Render_Engine_GL_Context; + +struct _Render_Engine_GL_Surface +{ + int initialized; + int w, h; + +#ifdef EVAS_GL + GLenum internal_fmt; +#endif + int internal_cpp; // Component per pixel. ie. RGB = 3 + + int depth_bits; + int stencil_bits; + + // Data + void *buffer; + + Render_Engine_GL_Context *current_ctx; +}; + +#ifdef EVAS_GL +struct _Render_Engine_GL_Context +{ + int initialized; + + OSMesaContext context; + + Render_Engine_GL_Context *share_ctx; + + Render_Engine_GL_Surface *current_sfc; +}; + +//------------------------------------------------------// +typedef void (*_eng_fn) (void ); +typedef _eng_fn (*glsym_func_eng_fn) (); +typedef void (*glsym_func_void) (); +typedef unsigned int (*glsym_func_uint) (); +typedef int (*glsym_func_int) (); +typedef unsigned char (*glsym_func_uchar) (); +typedef unsigned char *(*glsym_func_uchar_ptr) (); +typedef const unsigned char *(*glsym_func_const_uchar_ptr) (); +typedef char const *(*glsym_func_char_const_ptr) (); +typedef GLboolean (*glsym_func_bool) (); +typedef OSMesaContext (*glsym_func_osm_ctx) (); +//------------------------------------------------------// + +/* Function table for GL APIs */ +static Evas_GL_API gl_funcs; +static void *gl_lib_handle; +static int gl_lib_is_gles = 0; +static Evas_GL_API gl_funcs; + +//------------------------------------------------------// +// OSMesa APIS... +static OSMesaContext (*_sym_OSMesaCreateContextExt) (GLenum format, GLint depthBits, GLint stencilBits, GLint accumBits, OSMesaContext sharelist) = NULL; +static void (*_sym_OSMesaDestroyContext) (OSMesaContext ctx) = NULL; +static GLboolean (*_sym_OSMesaMakeCurrent) (OSMesaContext ctx, void *buffer, GLenum type, GLsizei width, GLsizei height) = NULL; +static void (*_sym_OSMesaPixelStore) (GLint pname, GLint value) = NULL; +static OSMESAproc (*_sym_OSMesaGetProcAddress) (const char *funcName); + + +//------------------------------------------------------// +// GLES 2.0 APIs... +static void (*_sym_glActiveTexture) (GLenum texture) = NULL; +static void (*_sym_glAttachShader) (GLuint program, GLuint shader) = NULL; +static void (*_sym_glBindAttribLocation) (GLuint program, GLuint index, const char* name) = NULL; +static void (*_sym_glBindBuffer) (GLenum target, GLuint buffer) = NULL; +static void (*_sym_glBindFramebuffer) (GLenum target, GLuint framebuffer) = NULL; +static void (*_sym_glBindRenderbuffer) (GLenum target, GLuint renderbuffer) = NULL; +static void (*_sym_glBindTexture) (GLenum target, GLuint texture) = NULL; +static void (*_sym_glBlendColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) = NULL; +static void (*_sym_glBlendEquation) (GLenum mode) = NULL; +static void (*_sym_glBlendEquationSeparate) (GLenum modeRGB, GLenum modeAlpha) = NULL; +static void (*_sym_glBlendFunc) (GLenum sfactor, GLenum dfactor) = NULL; +static void (*_sym_glBlendFuncSeparate) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) = NULL; +static void (*_sym_glBufferData) (GLenum target, GLsizeiptr size, const void* data, GLenum usage) = NULL; +static void (*_sym_glBufferSubData) (GLenum target, GLintptr offset, GLsizeiptr size, const void* data) = NULL; +static GLenum (*_sym_glCheckFramebufferStatus) (GLenum target) = NULL; +static void (*_sym_glClear) (GLbitfield mask) = NULL; +static void (*_sym_glClearColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) = NULL; +static void (*_sym_glClearDepthf) (GLclampf depth) = NULL; +static void (*_sym_glClearStencil) (GLint s) = NULL; +static void (*_sym_glColorMask) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) = NULL; +static void (*_sym_glCompileShader) (GLuint shader) = NULL; +static void (*_sym_glCompressedTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) = NULL; +static void (*_sym_glCompressedTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) = NULL; +static void (*_sym_glCopyTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) = NULL; +static void (*_sym_glCopyTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) = NULL; +static GLuint (*_sym_glCreateProgram) (void) = NULL; +static GLuint (*_sym_glCreateShader) (GLenum type) = NULL; +static void (*_sym_glCullFace) (GLenum mode) = NULL; +static void (*_sym_glDeleteBuffers) (GLsizei n, const GLuint* buffers) = NULL; +static void (*_sym_glDeleteFramebuffers) (GLsizei n, const GLuint* framebuffers) = NULL; +static void (*_sym_glDeleteProgram) (GLuint program) = NULL; +static void (*_sym_glDeleteRenderbuffers) (GLsizei n, const GLuint* renderbuffers) = NULL; +static void (*_sym_glDeleteShader) (GLuint shader) = NULL; +static void (*_sym_glDeleteTextures) (GLsizei n, const GLuint* textures) = NULL; +static void (*_sym_glDepthFunc) (GLenum func) = NULL; +static void (*_sym_glDepthMask) (GLboolean flag) = NULL; +static void (*_sym_glDepthRangef) (GLclampf zNear, GLclampf zFar) = NULL; +static void (*_sym_glDetachShader) (GLuint program, GLuint shader) = NULL; +static void (*_sym_glDisable) (GLenum cap) = NULL; +static void (*_sym_glDisableVertexAttribArray) (GLuint index) = NULL; +static void (*_sym_glDrawArrays) (GLenum mode, GLint first, GLsizei count) = NULL; +static void (*_sym_glDrawElements) (GLenum mode, GLsizei count, GLenum type, const void* indices) = NULL; +static void (*_sym_glEnable) (GLenum cap) = NULL; +static void (*_sym_glEnableVertexAttribArray) (GLuint index) = NULL; +static void (*_sym_glFinish) (void) = NULL; +static void (*_sym_glFlush) (void) = NULL; +static void (*_sym_glFramebufferRenderbuffer) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) = NULL; +static void (*_sym_glFramebufferTexture2D) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) = NULL; +static void (*_sym_glFrontFace) (GLenum mode) = NULL; +static void (*_sym_glGenBuffers) (GLsizei n, GLuint* buffers) = NULL; +static void (*_sym_glGenerateMipmap) (GLenum target) = NULL; +static void (*_sym_glGenFramebuffers) (GLsizei n, GLuint* framebuffers) = NULL; +static void (*_sym_glGenRenderbuffers) (GLsizei n, GLuint* renderbuffers) = NULL; +static void (*_sym_glGenTextures) (GLsizei n, GLuint* textures) = NULL; +static void (*_sym_glGetActiveAttrib) (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) = NULL; +static void (*_sym_glGetActiveUniform) (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) = NULL; +static void (*_sym_glGetAttachedShaders) (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) = NULL; +static int (*_sym_glGetAttribLocation) (GLuint program, const char* name) = NULL; +static void (*_sym_glGetBooleanv) (GLenum pname, GLboolean* params) = NULL; +static void (*_sym_glGetBufferParameteriv) (GLenum target, GLenum pname, GLint* params) = NULL; +static GLenum (*_sym_glGetError) (void) = NULL; +static void (*_sym_glGetFloatv) (GLenum pname, GLfloat* params) = NULL; +static void (*_sym_glGetFramebufferAttachmentParameteriv) (GLenum target, GLenum attachment, GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetIntegerv) (GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetProgramiv) (GLuint program, GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetProgramInfoLog) (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) = NULL; +static void (*_sym_glGetRenderbufferParameteriv) (GLenum target, GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetShaderiv) (GLuint shader, GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetShaderInfoLog) (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) = NULL; +static void (*_sym_glGetShaderPrecisionFormat) (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) = NULL; +static void (*_sym_glGetShaderSource) (GLuint shader, GLsizei bufsize, GLsizei* length, char* source) = NULL; +static const GLubyte *(*_sym_glGetString) (GLenum name) = NULL; +static void (*_sym_glGetTexParameterfv) (GLenum target, GLenum pname, GLfloat* params) = NULL; +static void (*_sym_glGetTexParameteriv) (GLenum target, GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetUniformfv) (GLuint program, GLint location, GLfloat* params) = NULL; +static void (*_sym_glGetUniformiv) (GLuint program, GLint location, GLint* params) = NULL; +static int (*_sym_glGetUniformLocation) (GLuint program, const char* name) = NULL; +static void (*_sym_glGetVertexAttribfv) (GLuint index, GLenum pname, GLfloat* params) = NULL; +static void (*_sym_glGetVertexAttribiv) (GLuint index, GLenum pname, GLint* params) = NULL; +static void (*_sym_glGetVertexAttribPointerv) (GLuint index, GLenum pname, void** pointer) = NULL; +static void (*_sym_glHint) (GLenum target, GLenum mode) = NULL; +static GLboolean (*_sym_glIsBuffer) (GLuint buffer) = NULL; +static GLboolean (*_sym_glIsEnabled) (GLenum cap) = NULL; +static GLboolean (*_sym_glIsFramebuffer) (GLuint framebuffer) = NULL; +static GLboolean (*_sym_glIsProgram) (GLuint program) = NULL; +static GLboolean (*_sym_glIsRenderbuffer) (GLuint renderbuffer) = NULL; +static GLboolean (*_sym_glIsShader) (GLuint shader) = NULL; +static GLboolean (*_sym_glIsTexture) (GLuint texture) = NULL; +static void (*_sym_glLineWidth) (GLfloat width) = NULL; +static void (*_sym_glLinkProgram) (GLuint program) = NULL; +static void (*_sym_glPixelStorei) (GLenum pname, GLint param) = NULL; +static void (*_sym_glPolygonOffset) (GLfloat factor, GLfloat units) = NULL; +static void (*_sym_glReadPixels) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels) = NULL; +static void (*_sym_glReleaseShaderCompiler) (void) = NULL; +static void (*_sym_glRenderbufferStorage) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height) = NULL; +static void (*_sym_glSampleCoverage) (GLclampf value, GLboolean invert) = NULL; +static void (*_sym_glScissor) (GLint x, GLint y, GLsizei width, GLsizei height) = NULL; +static void (*_sym_glShaderBinary) (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) = NULL; +static void (*_sym_glShaderSource) (GLuint shader, GLsizei count, const char** string, const GLint* length) = NULL; +static void (*_sym_glStencilFunc) (GLenum func, GLint ref, GLuint mask) = NULL; +static void (*_sym_glStencilFuncSeparate) (GLenum face, GLenum func, GLint ref, GLuint mask) = NULL; +static void (*_sym_glStencilMask) (GLuint mask) = NULL; +static void (*_sym_glStencilMaskSeparate) (GLenum face, GLuint mask) = NULL; +static void (*_sym_glStencilOp) (GLenum fail, GLenum zfail, GLenum zpass) = NULL; +static void (*_sym_glStencilOpSeparate) (GLenum face, GLenum fail, GLenum zfail, GLenum zpass) = NULL; +static void (*_sym_glTexImage2D) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels) = NULL; +static void (*_sym_glTexParameterf) (GLenum target, GLenum pname, GLfloat param) = NULL; +static void (*_sym_glTexParameterfv) (GLenum target, GLenum pname, const GLfloat* params) = NULL; +static void (*_sym_glTexParameteri) (GLenum target, GLenum pname, GLint param) = NULL; +static void (*_sym_glTexParameteriv) (GLenum target, GLenum pname, const GLint* params) = NULL; +static void (*_sym_glTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) = NULL; +static void (*_sym_glUniform1f) (GLint location, GLfloat x) = NULL; +static void (*_sym_glUniform1fv) (GLint location, GLsizei count, const GLfloat* v) = NULL; +static void (*_sym_glUniform1i) (GLint location, GLint x) = NULL; +static void (*_sym_glUniform1iv) (GLint location, GLsizei count, const GLint* v) = NULL; +static void (*_sym_glUniform2f) (GLint location, GLfloat x, GLfloat y) = NULL; +static void (*_sym_glUniform2fv) (GLint location, GLsizei count, const GLfloat* v) = NULL; +static void (*_sym_glUniform2i) (GLint location, GLint x, GLint y) = NULL; +static void (*_sym_glUniform2iv) (GLint location, GLsizei count, const GLint* v) = NULL; +static void (*_sym_glUniform3f) (GLint location, GLfloat x, GLfloat y, GLfloat z) = NULL; +static void (*_sym_glUniform3fv) (GLint location, GLsizei count, const GLfloat* v) = NULL; +static void (*_sym_glUniform3i) (GLint location, GLint x, GLint y, GLint z) = NULL; +static void (*_sym_glUniform3iv) (GLint location, GLsizei count, const GLint* v) = NULL; +static void (*_sym_glUniform4f) (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) = NULL; +static void (*_sym_glUniform4fv) (GLint location, GLsizei count, const GLfloat* v) = NULL; +static void (*_sym_glUniform4i) (GLint location, GLint x, GLint y, GLint z, GLint w) = NULL; +static void (*_sym_glUniform4iv) (GLint location, GLsizei count, const GLint* v) = NULL; +static void (*_sym_glUniformMatrix2fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = NULL; +static void (*_sym_glUniformMatrix3fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = NULL; +static void (*_sym_glUniformMatrix4fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = NULL; +static void (*_sym_glUseProgram) (GLuint program) = NULL; +static void (*_sym_glValidateProgram) (GLuint program) = NULL; +static void (*_sym_glVertexAttrib1f) (GLuint indx, GLfloat x) = NULL; +static void (*_sym_glVertexAttrib1fv) (GLuint indx, const GLfloat* values) = NULL; +static void (*_sym_glVertexAttrib2f) (GLuint indx, GLfloat x, GLfloat y) = NULL; +static void (*_sym_glVertexAttrib2fv) (GLuint indx, const GLfloat* values) = NULL; +static void (*_sym_glVertexAttrib3f) (GLuint indx, GLfloat x, GLfloat y, GLfloat z) = NULL; +static void (*_sym_glVertexAttrib3fv) (GLuint indx, const GLfloat* values) = NULL; +static void (*_sym_glVertexAttrib4f) (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) = NULL; +static void (*_sym_glVertexAttrib4fv) (GLuint indx, const GLfloat* values) = NULL; +static void (*_sym_glVertexAttribPointer) (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr) = NULL; +static void (*_sym_glViewport) (GLint x, GLint y, GLsizei width, GLsizei height) = NULL; + +// GLES Extensions... +/* static void (*_sym_glGetProgramBinary) (GLuint a, GLsizei b, GLsizei* c, GLenum* d, void* e) = NULL; */ +/* static void (*_sym_glProgramBinary) (GLuint a, GLenum b, const void* c, GLint d) = NULL; */ +/* static void (*_sym_glProgramParameteri) (GLuint a, GLuint b, GLint d) = NULL; */ +#endif + /* ***** ** @@ -258,6 +527,15 @@ eng_image_colorspace_get(void *data __UNUSED__, void *image) return im->space; } +static Eina_Bool +eng_image_can_region_get(void *data __UNUSED__, void *image) +{ + Image_Entry *im; + if (!image) return EINA_FALSE; + im = image; + return ((Evas_Image_Load_Func*) im->info.loader)->do_region; +} + static void eng_image_mask_create(void *data __UNUSED__, void *image) { @@ -349,7 +627,37 @@ eng_image_colorspace_set(void *data __UNUSED__, void *image, int cspace) static void * eng_image_native_set(void *data __UNUSED__, void *image, void *native __UNUSED__) { - return image; + //return image; + Evas_Native_Surface *ns = native; + Image_Entry *im = image, *im2 = NULL; + + if (!im) + { + if ((!ns) && (ns->data.x11.visual)) + { + im = evas_cache_image_data(evas_common_image_cache_get(), + im->w, im->h, + ns->data.x11.visual, 1, + EVAS_COLORSPACE_ARGB8888); + return im; + } + else + return NULL; + } + + if ((!ns) && (!im)) return im; + + if (!ns) return im; + + im2 = evas_cache_image_data(evas_common_image_cache_get(), + im->w, im->h, + ns->data.x11.visual, 1, + EVAS_COLORSPACE_ARGB8888); + evas_cache_image_drop(im); + im = im2; + + return im; + } static void * @@ -1035,6 +1343,311 @@ eng_image_load_error_get(void *data __UNUSED__, void *image) return im->cache_entry.load_error; } +//------------ Evas GL engine code ---------------// +static void * +eng_gl_surface_create(void *data __UNUSED__, void *config, int w, int h) +{ +#ifdef EVAS_GL + Render_Engine_GL_Surface *sfc; + Evas_GL_Config *cfg; + + sfc = calloc(1, sizeof(Render_Engine_GL_Surface)); + if (!sfc) return NULL; + + cfg = (Evas_GL_Config *)config; + + sfc->initialized = 0; + sfc->w = w; + sfc->h = h; + + // Color Format + switch (cfg->color_format) + { + + case EVAS_GL_RGB_888: + sfc->internal_fmt = OSMESA_RGB; + sfc->internal_cpp = 3; + break; + case EVAS_GL_RGBA_8888: + sfc->internal_fmt = OSMESA_BGRA; + sfc->internal_cpp = 4; + break; + default: + sfc->internal_fmt = OSMESA_RGBA; + sfc->internal_cpp = 4; + break; + } + + // Depth Bits + switch (cfg->depth_bits) + { + case EVAS_GL_DEPTH_BIT_8: + sfc->depth_bits = 8; + break; + case EVAS_GL_DEPTH_BIT_16: + sfc->depth_bits = 16; + break; + case EVAS_GL_DEPTH_BIT_24: + sfc->depth_bits = 24; + break; + case EVAS_GL_DEPTH_BIT_32: + sfc->depth_bits = 32; + break; + case EVAS_GL_DEPTH_NONE: + default: + sfc->depth_bits = 0; + break; + } + + // Stencil Bits + switch (cfg->stencil_bits) + { + case EVAS_GL_STENCIL_BIT_1: + sfc->stencil_bits = 1; + break; + case EVAS_GL_STENCIL_BIT_2: + sfc->stencil_bits = 2; + break; + case EVAS_GL_STENCIL_BIT_4: + sfc->stencil_bits = 4; + break; + case EVAS_GL_STENCIL_BIT_8: + sfc->stencil_bits = 8; + break; + case EVAS_GL_STENCIL_BIT_16: + sfc->stencil_bits = 16; + break; + case EVAS_GL_STENCIL_NONE: + default: + sfc->stencil_bits = 0; + break; + } + + sfc->buffer = malloc(sizeof(unsigned char)*sfc->internal_cpp*w*h); + + if (!sfc->buffer) + { + free(sfc); + return NULL; + } + + return sfc; +#else + (void) config; + (void) w; + (void) h; + return NULL; +#endif +} + +static int +eng_gl_surface_destroy(void *data __UNUSED__, void *surface) +{ +#ifdef EVAS_GL + Render_Engine_GL_Surface *sfc; + + sfc = (Render_Engine_GL_Surface*)surface; + + if (!sfc) return 0; + + if (sfc->buffer) free(sfc->buffer); + + free(sfc); + + surface = NULL; + + return 1; +#else + (void) surface; + return 1; +#endif +} + +static void * +eng_gl_context_create(void *data __UNUSED__, void *share_context) +{ +#ifdef EVAS_GL + Render_Engine_GL_Context *ctx; + Render_Engine_GL_Context *share_ctx; + + ctx = calloc(1, sizeof(Render_Engine_GL_Context)); + + if (!ctx) return NULL; + + share_ctx = (Render_Engine_GL_Context *)share_context; + + ctx->share_ctx = share_ctx; + + /* + if (share_ctx) + ctx->context = OSMesaCreateContextExt( OSMESA_RGBA, 8, 0, 0, share_ctx->context ); + else + ctx->context = OSMesaCreateContextExt( OSMESA_RGBA, 8, 0, 0, NULL ); + + + if (!ctx->context) + { + ERR("Error creating OSMesa Context."); + free(ctx); + return NULL; + } + */ + + ctx->initialized = 0; + + return ctx; +#else + (void) share_context; + return NULL; +#endif +} + +static int +eng_gl_context_destroy(void *data __UNUSED__, void *context) +{ +#ifdef EVAS_GL + Render_Engine_GL_Context *ctx; + + ctx = (Render_Engine_GL_Context*)context; + + if (!ctx) return 0; + + _sym_OSMesaDestroyContext(ctx->context); + + free(ctx); + context = NULL; + + return 1; +#else + (void) context; + return 0; +#endif +} + +static int +eng_gl_make_current(void *data __UNUSED__, void *surface, void *context) +{ +#ifdef EVAS_GL + Render_Engine_GL_Surface *sfc; + Render_Engine_GL_Context *ctx; + OSMesaContext share_ctx; + GLboolean ret; + + sfc = (Render_Engine_GL_Surface*)surface; + ctx = (Render_Engine_GL_Context*)context; + + // Unset surface/context + if ((!sfc) || (!ctx)) + { + if (ctx) ctx->current_sfc = NULL; + if (sfc) sfc->current_ctx = NULL; + return 1; + } + + // Initialize Context if it hasn't been. + if (!ctx->initialized) + { + if (ctx->share_ctx) + share_ctx = ctx->share_ctx->context; + else + share_ctx = NULL; + + ctx->context = _sym_OSMesaCreateContextExt(sfc->internal_fmt, + sfc->depth_bits, + sfc->stencil_bits, + 0, + share_ctx); + if (!ctx->context) + { + ERR("Error initializing context."); + return 0; + } + + ctx->initialized = 1; + } + + + // Call MakeCurrent + ret = _sym_OSMesaMakeCurrent(ctx->context, sfc->buffer, GL_UNSIGNED_BYTE, + sfc->w, sfc->h); + + if (ret == GL_FALSE) + { + ERR("Error doing MakeCurrent."); + return 0; + } + + _sym_OSMesaPixelStore(OSMESA_Y_UP, 0); + + // Set the current surface/context + ctx->current_sfc = sfc; + sfc->current_ctx = ctx; + + return 1; +#else + (void) surface; + (void) context; + return 1; +#endif +} + +// FIXME!!! Implement later +static void * +eng_gl_string_query(void *data __UNUSED__, int name __UNUSED__) +{ + return NULL; +} + +static void * +eng_gl_proc_address_get(void *data __UNUSED__, const char *name) +{ +#ifdef EVAS_GL + if (_sym_OSMesaGetProcAddress) return _sym_OSMesaGetProcAddress(name); + return dlsym(RTLD_DEFAULT, name); +#else + (void) name; + return NULL; +#endif +} + +static int +eng_gl_native_surface_get(void *data __UNUSED__, void *surface, void *native_surface) +{ +#ifdef EVAS_GL + Render_Engine_GL_Surface *sfc; + Evas_Native_Surface *ns; + + sfc = (Render_Engine_GL_Surface*)surface; + ns = (Evas_Native_Surface*)native_surface; + + if (!sfc) return 0; + + ns->type = EVAS_NATIVE_SURFACE_OPENGL; + ns->version = EVAS_NATIVE_SURFACE_VERSION; + ns->data.x11.visual = sfc->buffer; + + return 1; +#else + (void) surface; + (void) native_surface; + return 1; +#endif +} + + +static void * +eng_gl_api_get(void *data __UNUSED__) +{ +#ifdef EVAS_GL + return &gl_funcs; +#else + return NULL; +#endif +} + +//------------------------------------------------// + + /* ***** ** @@ -1112,6 +1725,7 @@ static Evas_Func func = eng_image_format_get, eng_image_colorspace_set, eng_image_colorspace_get, + eng_image_can_region_get, eng_image_mask_create, eng_image_native_set, eng_image_native_get, @@ -1161,15 +1775,15 @@ static Evas_Func func = eng_image_filtered_save, eng_image_filtered_free, #endif - NULL, // FIXME: need software mesa for gl rendering <- gl_surface_create - NULL, // FIXME: need software mesa for gl rendering <- gl_surface_destroy - NULL, // FIXME: need software mesa for gl rendering <- gl_context_create - NULL, // FIXME: need software mesa for gl rendering <- gl_context_destroy - NULL, // FIXME: need software mesa for gl rendering <- gl_make_current - NULL, // FIXME: need software mesa for gl rendering <- gl_string_query - NULL, // FIXME: need software mesa for gl rendering <- gl_proc_address_get - NULL, // FIXME: need software mesa for gl rendering <- gl_native_surface_get - NULL, // FIXME: need software mesa for gl rendering <- gl_api_get + NULL, // need software mesa for gl rendering <- gl_surface_create + NULL, // need software mesa for gl rendering <- gl_surface_destroy + NULL, // need software mesa for gl rendering <- gl_context_create + NULL, // need software mesa for gl rendering <- gl_context_destroy + NULL, // need software mesa for gl rendering <- gl_make_current + NULL, // need software mesa for gl rendering <- gl_string_query + NULL, // need software mesa for gl rendering <- gl_proc_address_get + NULL, // need software mesa for gl rendering <- gl_native_surface_get + NULL, // need software mesa for gl rendering <- gl_api_get eng_image_load_error_get, eng_font_run_font_end_get, eng_image_animated_get, @@ -1182,6 +1796,981 @@ static Evas_Func func = /* FUTURE software generic calls go here */ }; + +//----------------------------------------------------------------// +// // +// Load Symbols // +// // +//----------------------------------------------------------------// +#ifdef EVAS_GL +static void +sym_missing(void) +{ + ERR("GL symbols missing!\n"); +} + +static int +glue_sym_init(void) +{ + //------------------------------------------------// + // Use eglGetProcAddress +#define FINDSYM(dst, sym, typ) \ + if (!dst) dst = (typeof(dst))dlsym(gl_lib_handle, sym); \ + if (!dst) \ + { \ + ERR("Symbol not found %s\n", sym); \ + return 0; \ + } +#define FALLBAK(dst, typ) if (!dst) dst = (typeof(dst))sym_missing; + + //------------------------------------------------------// + // OSMesa APIs... + FINDSYM(_sym_OSMesaCreateContextExt, "OSMesaCreateContextExt", glsym_func_osm_ctx); + FALLBAK(_sym_OSMesaCreateContextExt, glsym_func_void); + + FINDSYM(_sym_OSMesaDestroyContext, "OSMesaDestroyContext", glsym_func_void); + FALLBAK(_sym_OSMesaDestroyContext, glsym_func_void); + + FINDSYM(_sym_OSMesaMakeCurrent, "OSMesaMakeCurrent", glsym_func_bool); + FALLBAK(_sym_OSMesaMakeCurrent, glsym_func_void); + + FINDSYM(_sym_OSMesaPixelStore, "OSMesaPixelStore", glsym_func_void); + FALLBAK(_sym_OSMesaPixelStore, glsym_func_void); + + FINDSYM(_sym_OSMesaGetProcAddress, "OSMesaGetProcAddress", glsym_func_eng_fn); + FALLBAK(_sym_OSMesaGetProcAddress, glsym_func_void); + +#undef FINDSYM +#undef FALLBAK + + return 1; +} + +static int +gl_sym_init(void) +{ + //------------------------------------------------// +#define FINDSYM(dst, sym, typ) \ + if (!dst) dst = (typeof(dst))dlsym(gl_lib_handle, sym); \ + if (!dst) DBG("Symbol not found %s\n", sym); +#define FALLBAK(dst, typ) if (!dst) dst = (typeof(dst))sym_missing; + + + //------------------------------------------------------// + // GLES 2.0 APIs... + FINDSYM(_sym_glActiveTexture, "glActiveTexture", glsym_func_void); + FALLBAK(_sym_glActiveTexture, glsym_func_void); + + FINDSYM(_sym_glAttachShader, "glAttachShader", glsym_func_void); + FALLBAK(_sym_glAttachShader, glsym_func_void); + + FINDSYM(_sym_glBindAttribLocation, "glBindAttribLocation", glsym_func_void); + FALLBAK(_sym_glBindAttribLocation, glsym_func_void); + + FINDSYM(_sym_glBindBuffer, "glBindBuffer", glsym_func_void); + FALLBAK(_sym_glBindBuffer, glsym_func_void); + + FINDSYM(_sym_glBindFramebuffer, "glBindFramebuffer", glsym_func_void); + FALLBAK(_sym_glBindFramebuffer, glsym_func_void); + + FINDSYM(_sym_glBindRenderbuffer, "glBindRenderbuffer", glsym_func_void); + FALLBAK(_sym_glBindRenderbuffer, glsym_func_void); + + FINDSYM(_sym_glBindTexture, "glBindTexture", glsym_func_void); + FALLBAK(_sym_glBindTexture, glsym_func_void); + + FINDSYM(_sym_glBlendColor, "glBlendColor", glsym_func_void); + FALLBAK(_sym_glBlendColor, glsym_func_void); + + FINDSYM(_sym_glBlendEquation, "glBlendEquation", glsym_func_void); + FALLBAK(_sym_glBlendEquation, glsym_func_void); + + FINDSYM(_sym_glBlendEquationSeparate, "glBlendEquationSeparate", glsym_func_void); + FALLBAK(_sym_glBlendEquationSeparate, glsym_func_void); + + FINDSYM(_sym_glBlendFunc, "glBlendFunc", glsym_func_void); + FALLBAK(_sym_glBlendFunc, glsym_func_void); + + FINDSYM(_sym_glBlendFuncSeparate, "glBlendFuncSeparate", glsym_func_void); + FALLBAK(_sym_glBlendFuncSeparate, glsym_func_void); + + FINDSYM(_sym_glBufferData, "glBufferData", glsym_func_void); + FALLBAK(_sym_glBufferData, glsym_func_void); + + FINDSYM(_sym_glBufferSubData, "glBufferSubData", glsym_func_void); + FALLBAK(_sym_glBufferSubData, glsym_func_void); + + FINDSYM(_sym_glCheckFramebufferStatus, "glCheckFramebufferStatus", glsym_func_uint); + FALLBAK(_sym_glCheckFramebufferStatus, glsym_func_uint); + + FINDSYM(_sym_glClear, "glClear", glsym_func_void); + FALLBAK(_sym_glClear, glsym_func_void); + + FINDSYM(_sym_glClearColor, "glClearColor", glsym_func_void); + FALLBAK(_sym_glClearColor, glsym_func_void); + + FINDSYM(_sym_glClearDepthf, "glClearDepthf", glsym_func_void); + FINDSYM(_sym_glClearDepthf, "glClearDepth", glsym_func_void); + FALLBAK(_sym_glClearDepthf, glsym_func_void); + + FINDSYM(_sym_glClearStencil, "glClearStencil", glsym_func_void); + FALLBAK(_sym_glClearStencil, glsym_func_void); + + FINDSYM(_sym_glColorMask, "glColorMask", glsym_func_void); + FALLBAK(_sym_glColorMask, glsym_func_void); + + FINDSYM(_sym_glCompileShader, "glCompileShader", glsym_func_void); + FALLBAK(_sym_glCompileShader, glsym_func_void); + + FINDSYM(_sym_glCompressedTexImage2D, "glCompressedTexImage2D", glsym_func_void); + FALLBAK(_sym_glCompressedTexImage2D, glsym_func_void); + + FINDSYM(_sym_glCompressedTexSubImage2D, "glCompressedTexSubImage2D", glsym_func_void); + FALLBAK(_sym_glCompressedTexSubImage2D, glsym_func_void); + + FINDSYM(_sym_glCopyTexImage2D, "glCopyTexImage2D", glsym_func_void); + FALLBAK(_sym_glCopyTexImage2D, glsym_func_void); + + FINDSYM(_sym_glCopyTexSubImage2D, "glCopyTexSubImage2D", glsym_func_void); + FALLBAK(_sym_glCopyTexSubImage2D, glsym_func_void); + + FINDSYM(_sym_glCreateProgram, "glCreateProgram", glsym_func_uint); + FALLBAK(_sym_glCreateProgram, glsym_func_uint); + + FINDSYM(_sym_glCreateShader, "glCreateShader", glsym_func_uint); + FALLBAK(_sym_glCreateShader, glsym_func_uint); + + FINDSYM(_sym_glCullFace, "glCullFace", glsym_func_void); + FALLBAK(_sym_glCullFace, glsym_func_void); + + FINDSYM(_sym_glDeleteBuffers, "glDeleteBuffers", glsym_func_void); + FALLBAK(_sym_glDeleteBuffers, glsym_func_void); + + FINDSYM(_sym_glDeleteFramebuffers, "glDeleteFramebuffers", glsym_func_void); + FALLBAK(_sym_glDeleteFramebuffers, glsym_func_void); + + FINDSYM(_sym_glDeleteProgram, "glDeleteProgram", glsym_func_void); + FALLBAK(_sym_glDeleteProgram, glsym_func_void); + + FINDSYM(_sym_glDeleteRenderbuffers, "glDeleteRenderbuffers", glsym_func_void); + FALLBAK(_sym_glDeleteRenderbuffers, glsym_func_void); + + FINDSYM(_sym_glDeleteShader, "glDeleteShader", glsym_func_void); + FALLBAK(_sym_glDeleteShader, glsym_func_void); + + FINDSYM(_sym_glDeleteTextures, "glDeleteTextures", glsym_func_void); + FALLBAK(_sym_glDeleteTextures, glsym_func_void); + + FINDSYM(_sym_glDepthFunc, "glDepthFunc", glsym_func_void); + FALLBAK(_sym_glDepthFunc, glsym_func_void); + + FINDSYM(_sym_glDepthMask, "glDepthMask", glsym_func_void); + FALLBAK(_sym_glDepthMask, glsym_func_void); + + FINDSYM(_sym_glDepthRangef, "glDepthRangef", glsym_func_void); + FINDSYM(_sym_glDepthRangef, "glDepthRange", glsym_func_void); + FALLBAK(_sym_glDepthRangef, glsym_func_void); + + FINDSYM(_sym_glDetachShader, "glDetachShader", glsym_func_void); + FALLBAK(_sym_glDetachShader, glsym_func_void); + + FINDSYM(_sym_glDisable, "glDisable", glsym_func_void); + FALLBAK(_sym_glDisable, glsym_func_void); + + FINDSYM(_sym_glDisableVertexAttribArray, "glDisableVertexAttribArray", glsym_func_void); + FALLBAK(_sym_glDisableVertexAttribArray, glsym_func_void); + + FINDSYM(_sym_glDrawArrays, "glDrawArrays", glsym_func_void); + FALLBAK(_sym_glDrawArrays, glsym_func_void); + + FINDSYM(_sym_glDrawElements, "glDrawElements", glsym_func_void); + FALLBAK(_sym_glDrawElements, glsym_func_void); + + FINDSYM(_sym_glEnable, "glEnable", glsym_func_void); + FALLBAK(_sym_glEnable, glsym_func_void); + + FINDSYM(_sym_glEnableVertexAttribArray, "glEnableVertexAttribArray", glsym_func_void); + FALLBAK(_sym_glEnableVertexAttribArray, glsym_func_void); + + FINDSYM(_sym_glFinish, "glFinish", glsym_func_void); + FALLBAK(_sym_glFinish, glsym_func_void); + + FINDSYM(_sym_glFlush, "glFlush", glsym_func_void); + FALLBAK(_sym_glFlush, glsym_func_void); + + FINDSYM(_sym_glFramebufferRenderbuffer, "glFramebufferRenderbuffer", glsym_func_void); + FALLBAK(_sym_glFramebufferRenderbuffer, glsym_func_void); + + FINDSYM(_sym_glFramebufferTexture2D, "glFramebufferTexture2D", glsym_func_void); + FALLBAK(_sym_glFramebufferTexture2D, glsym_func_void); + + FINDSYM(_sym_glFrontFace, "glFrontFace", glsym_func_void); + FALLBAK(_sym_glFrontFace, glsym_func_void); + + FINDSYM(_sym_glGenBuffers, "glGenBuffers", glsym_func_void); + FALLBAK(_sym_glGenBuffers, glsym_func_void); + + FINDSYM(_sym_glGenerateMipmap, "glGenerateMipmap", glsym_func_void); + FALLBAK(_sym_glGenerateMipmap, glsym_func_void); + + FINDSYM(_sym_glGenFramebuffers, "glGenFramebuffers", glsym_func_void); + FALLBAK(_sym_glGenFramebuffers, glsym_func_void); + + FINDSYM(_sym_glGenRenderbuffers, "glGenRenderbuffers", glsym_func_void); + FALLBAK(_sym_glGenRenderbuffers, glsym_func_void); + + FINDSYM(_sym_glGenTextures, "glGenTextures", glsym_func_void); + FALLBAK(_sym_glGenTextures, glsym_func_void); + + FINDSYM(_sym_glGetActiveAttrib, "glGetActiveAttrib", glsym_func_void); + FALLBAK(_sym_glGetActiveAttrib, glsym_func_void); + + FINDSYM(_sym_glGetActiveUniform, "glGetActiveUniform", glsym_func_void); + FALLBAK(_sym_glGetActiveUniform, glsym_func_void); + + FINDSYM(_sym_glGetAttachedShaders, "glGetAttachedShaders", glsym_func_void); + FALLBAK(_sym_glGetAttachedShaders, glsym_func_void); + + FINDSYM(_sym_glGetAttribLocation, "glGetAttribLocation", glsym_func_int); + FALLBAK(_sym_glGetAttribLocation, glsym_func_int); + + FINDSYM(_sym_glGetBooleanv, "glGetBooleanv", glsym_func_void); + FALLBAK(_sym_glGetBooleanv, glsym_func_void); + + FINDSYM(_sym_glGetBufferParameteriv, "glGetBufferParameteriv", glsym_func_void); + FALLBAK(_sym_glGetBufferParameteriv, glsym_func_void); + + FINDSYM(_sym_glGetError, "glGetError", glsym_func_uint); + FALLBAK(_sym_glGetError, glsym_func_uint); + + FINDSYM(_sym_glGetFloatv, "glGetFloatv", glsym_func_void); + FALLBAK(_sym_glGetFloatv, glsym_func_void); + + FINDSYM(_sym_glGetFramebufferAttachmentParameteriv, "glGetFramebufferAttachmentParameteriv", glsym_func_void); + FALLBAK(_sym_glGetFramebufferAttachmentParameteriv, glsym_func_void); + + FINDSYM(_sym_glGetIntegerv, "glGetIntegerv", glsym_func_void); + FALLBAK(_sym_glGetIntegerv, glsym_func_void); + + FINDSYM(_sym_glGetProgramiv, "glGetProgramiv", glsym_func_void); + FALLBAK(_sym_glGetProgramiv, glsym_func_void); + + FINDSYM(_sym_glGetProgramInfoLog, "glGetProgramInfoLog", glsym_func_void); + FALLBAK(_sym_glGetProgramInfoLog, glsym_func_void); + + FINDSYM(_sym_glGetRenderbufferParameteriv, "glGetRenderbufferParameteriv", glsym_func_void); + FALLBAK(_sym_glGetRenderbufferParameteriv, glsym_func_void); + + FINDSYM(_sym_glGetShaderiv, "glGetShaderiv", glsym_func_void); + FALLBAK(_sym_glGetShaderiv, glsym_func_void); + + FINDSYM(_sym_glGetShaderInfoLog, "glGetShaderInfoLog", glsym_func_void); + FALLBAK(_sym_glGetShaderInfoLog, glsym_func_void); + + FINDSYM(_sym_glGetShaderPrecisionFormat, "glGetShaderPrecisionFormat", glsym_func_void); + FALLBAK(_sym_glGetShaderPrecisionFormat, glsym_func_void); + + FINDSYM(_sym_glGetShaderSource, "glGetShaderSource", glsym_func_void); + FALLBAK(_sym_glGetShaderSource, glsym_func_void); + + FINDSYM(_sym_glGetString, "glGetString", glsym_func_uchar_ptr); + FALLBAK(_sym_glGetString, glsym_func_const_uchar_ptr); + + FINDSYM(_sym_glGetTexParameterfv, "glGetTexParameterfv", glsym_func_void); + FALLBAK(_sym_glGetTexParameterfv, glsym_func_void); + + FINDSYM(_sym_glGetTexParameteriv, "glGetTexParameteriv", glsym_func_void); + FALLBAK(_sym_glGetTexParameteriv, glsym_func_void); + + FINDSYM(_sym_glGetUniformfv, "glGetUniformfv", glsym_func_void); + FALLBAK(_sym_glGetUniformfv, glsym_func_void); + + FINDSYM(_sym_glGetUniformiv, "glGetUniformiv", glsym_func_void); + FALLBAK(_sym_glGetUniformiv, glsym_func_void); + + FINDSYM(_sym_glGetUniformLocation, "glGetUniformLocation", glsym_func_int); + FALLBAK(_sym_glGetUniformLocation, glsym_func_int); + + FINDSYM(_sym_glGetVertexAttribfv, "glGetVertexAttribfv", glsym_func_void); + FALLBAK(_sym_glGetVertexAttribfv, glsym_func_void); + + FINDSYM(_sym_glGetVertexAttribiv, "glGetVertexAttribiv", glsym_func_void); + FALLBAK(_sym_glGetVertexAttribiv, glsym_func_void); + + FINDSYM(_sym_glGetVertexAttribPointerv, "glGetVertexAttribPointerv", glsym_func_void); + FALLBAK(_sym_glGetVertexAttribPointerv, glsym_func_void); + + FINDSYM(_sym_glHint, "glHint", glsym_func_void); + FALLBAK(_sym_glHint, glsym_func_void); + + FINDSYM(_sym_glIsBuffer, "glIsBuffer", glsym_func_uchar); + FALLBAK(_sym_glIsBuffer, glsym_func_uchar); + + FINDSYM(_sym_glIsEnabled, "glIsEnabled", glsym_func_uchar); + FALLBAK(_sym_glIsEnabled, glsym_func_uchar); + + FINDSYM(_sym_glIsFramebuffer, "glIsFramebuffer", glsym_func_uchar); + FALLBAK(_sym_glIsFramebuffer, glsym_func_uchar); + + FINDSYM(_sym_glIsProgram, "glIsProgram", glsym_func_uchar); + FALLBAK(_sym_glIsProgram, glsym_func_uchar); + + FINDSYM(_sym_glIsRenderbuffer, "glIsRenderbuffer", glsym_func_uchar); + FALLBAK(_sym_glIsRenderbuffer, glsym_func_uchar); + + FINDSYM(_sym_glIsShader, "glIsShader", glsym_func_uchar); + FALLBAK(_sym_glIsShader, glsym_func_uchar); + + FINDSYM(_sym_glIsTexture, "glIsTexture", glsym_func_uchar); + FALLBAK(_sym_glIsTexture, glsym_func_uchar); + + FINDSYM(_sym_glLineWidth, "glLineWidth", glsym_func_void); + FALLBAK(_sym_glLineWidth, glsym_func_void); + + FINDSYM(_sym_glLinkProgram, "glLinkProgram", glsym_func_void); + FALLBAK(_sym_glLinkProgram, glsym_func_void); + + FINDSYM(_sym_glPixelStorei, "glPixelStorei", glsym_func_void); + FALLBAK(_sym_glPixelStorei, glsym_func_void); + + FINDSYM(_sym_glPolygonOffset, "glPolygonOffset", glsym_func_void); + FALLBAK(_sym_glPolygonOffset, glsym_func_void); + + FINDSYM(_sym_glReadPixels, "glReadPixels", glsym_func_void); + FALLBAK(_sym_glReadPixels, glsym_func_void); + + FINDSYM(_sym_glReleaseShaderCompiler, "glReleaseShaderCompiler", glsym_func_void); + FALLBAK(_sym_glReleaseShaderCompiler, glsym_func_void); + + FINDSYM(_sym_glRenderbufferStorage, "glRenderbufferStorage", glsym_func_void); + FALLBAK(_sym_glRenderbufferStorage, glsym_func_void); + + FINDSYM(_sym_glSampleCoverage, "glSampleCoverage", glsym_func_void); + FALLBAK(_sym_glSampleCoverage, glsym_func_void); + + FINDSYM(_sym_glScissor, "glScissor", glsym_func_void); + FALLBAK(_sym_glScissor, glsym_func_void); + + FINDSYM(_sym_glShaderBinary, "glShaderBinary", glsym_func_void); + FALLBAK(_sym_glShaderBinary, glsym_func_void); + + FINDSYM(_sym_glShaderSource, "glShaderSource", glsym_func_void); + FALLBAK(_sym_glShaderSource, glsym_func_void); + + FINDSYM(_sym_glStencilFunc, "glStencilFunc", glsym_func_void); + FALLBAK(_sym_glStencilFunc, glsym_func_void); + + FINDSYM(_sym_glStencilFuncSeparate, "glStencilFuncSeparate", glsym_func_void); + FALLBAK(_sym_glStencilFuncSeparate, glsym_func_void); + + FINDSYM(_sym_glStencilMask, "glStencilMask", glsym_func_void); + FALLBAK(_sym_glStencilMask, glsym_func_void); + + FINDSYM(_sym_glStencilMaskSeparate, "glStencilMaskSeparate", glsym_func_void); + FALLBAK(_sym_glStencilMaskSeparate, glsym_func_void); + + FINDSYM(_sym_glStencilOp, "glStencilOp", glsym_func_void); + FALLBAK(_sym_glStencilOp, glsym_func_void); + + FINDSYM(_sym_glStencilOpSeparate, "glStencilOpSeparate", glsym_func_void); + FALLBAK(_sym_glStencilOpSeparate, glsym_func_void); + + FINDSYM(_sym_glTexImage2D, "glTexImage2D", glsym_func_void); + FALLBAK(_sym_glTexImage2D, glsym_func_void); + + FINDSYM(_sym_glTexParameterf, "glTexParameterf", glsym_func_void); + FALLBAK(_sym_glTexParameterf, glsym_func_void); + + FINDSYM(_sym_glTexParameterfv, "glTexParameterfv", glsym_func_void); + FALLBAK(_sym_glTexParameterfv, glsym_func_void); + + FINDSYM(_sym_glTexParameteri, "glTexParameteri", glsym_func_void); + FALLBAK(_sym_glTexParameteri, glsym_func_void); + + FINDSYM(_sym_glTexParameteriv, "glTexParameteriv", glsym_func_void); + FALLBAK(_sym_glTexParameteriv, glsym_func_void); + + FINDSYM(_sym_glTexSubImage2D, "glTexSubImage2D", glsym_func_void); + FALLBAK(_sym_glTexSubImage2D, glsym_func_void); + + FINDSYM(_sym_glUniform1f, "glUniform1f", glsym_func_void); + FALLBAK(_sym_glUniform1f, glsym_func_void); + + FINDSYM(_sym_glUniform1fv, "glUniform1fv", glsym_func_void); + FALLBAK(_sym_glUniform1fv, glsym_func_void); + + FINDSYM(_sym_glUniform1i, "glUniform1i", glsym_func_void); + FALLBAK(_sym_glUniform1i, glsym_func_void); + + FINDSYM(_sym_glUniform1iv, "glUniform1iv", glsym_func_void); + FALLBAK(_sym_glUniform1iv, glsym_func_void); + + FINDSYM(_sym_glUniform2f, "glUniform2f", glsym_func_void); + FALLBAK(_sym_glUniform2f, glsym_func_void); + + FINDSYM(_sym_glUniform2fv, "glUniform2fv", glsym_func_void); + FALLBAK(_sym_glUniform2fv, glsym_func_void); + + FINDSYM(_sym_glUniform2i, "glUniform2i", glsym_func_void); + FALLBAK(_sym_glUniform2i, glsym_func_void); + + FINDSYM(_sym_glUniform2iv, "glUniform2iv", glsym_func_void); + FALLBAK(_sym_glUniform2iv, glsym_func_void); + + FINDSYM(_sym_glUniform3f, "glUniform3f", glsym_func_void); + FALLBAK(_sym_glUniform3f, glsym_func_void); + + FINDSYM(_sym_glUniform3fv, "glUniform3fv", glsym_func_void); + FALLBAK(_sym_glUniform3fv, glsym_func_void); + + FINDSYM(_sym_glUniform3i, "glUniform3i", glsym_func_void); + FALLBAK(_sym_glUniform3i, glsym_func_void); + + FINDSYM(_sym_glUniform3iv, "glUniform3iv", glsym_func_void); + FALLBAK(_sym_glUniform3iv, glsym_func_void); + + FINDSYM(_sym_glUniform4f, "glUniform4f", glsym_func_void); + FALLBAK(_sym_glUniform4f, glsym_func_void); + + FINDSYM(_sym_glUniform4fv, "glUniform4fv", glsym_func_void); + FALLBAK(_sym_glUniform4fv, glsym_func_void); + + FINDSYM(_sym_glUniform4i, "glUniform4i", glsym_func_void); + FALLBAK(_sym_glUniform4i, glsym_func_void); + + FINDSYM(_sym_glUniform4iv, "glUniform4iv", glsym_func_void); + FALLBAK(_sym_glUniform4iv, glsym_func_void); + + FINDSYM(_sym_glUniformMatrix2fv, "glUniformMatrix2fv", glsym_func_void); + FALLBAK(_sym_glUniformMatrix2fv, glsym_func_void); + + FINDSYM(_sym_glUniformMatrix3fv, "glUniformMatrix3fv", glsym_func_void); + FALLBAK(_sym_glUniformMatrix3fv, glsym_func_void); + + FINDSYM(_sym_glUniformMatrix4fv, "glUniformMatrix4fv", glsym_func_void); + FALLBAK(_sym_glUniformMatrix4fv, glsym_func_void); + + FINDSYM(_sym_glUseProgram, "glUseProgram", glsym_func_void); + FALLBAK(_sym_glUseProgram, glsym_func_void); + + FINDSYM(_sym_glValidateProgram, "glValidateProgram", glsym_func_void); + FALLBAK(_sym_glValidateProgram, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib1f, "glVertexAttrib1f", glsym_func_void); + FALLBAK(_sym_glVertexAttrib1f, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib1fv, "glVertexAttrib1fv", glsym_func_void); + FALLBAK(_sym_glVertexAttrib1fv, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib2f, "glVertexAttrib2f", glsym_func_void); + FALLBAK(_sym_glVertexAttrib2f, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib2fv, "glVertexAttrib2fv", glsym_func_void); + FALLBAK(_sym_glVertexAttrib2fv, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib3f, "glVertexAttrib3f", glsym_func_void); + FALLBAK(_sym_glVertexAttrib3f, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib3fv, "glVertexAttrib3fv", glsym_func_void); + FALLBAK(_sym_glVertexAttrib3fv, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib4f, "glVertexAttrib4f", glsym_func_void); + FALLBAK(_sym_glVertexAttrib4f, glsym_func_void); + + FINDSYM(_sym_glVertexAttrib4fv, "glVertexAttrib4fv", glsym_func_void); + FALLBAK(_sym_glVertexAttrib4fv, glsym_func_void); + + FINDSYM(_sym_glVertexAttribPointer, "glVertexAttribPointer", glsym_func_void); + FALLBAK(_sym_glVertexAttribPointer, glsym_func_void); + + FINDSYM(_sym_glViewport, "glViewport", glsym_func_void); + FALLBAK(_sym_glViewport, glsym_func_void); + +#undef FINDSYM +#undef FALLBAK + + // Checking to see if this function exists is a poor but reasonable way to + // check if it's gles but it works for now + if (_sym_glGetShaderPrecisionFormat != (typeof(_sym_glGetShaderPrecisionFormat))sym_missing ) + { + DBG("GL Library is GLES."); + gl_lib_is_gles = 1; + } + + return 1; +} + +//--------------------------------------------------------------// +// Wrapped GL APIs to handle desktop compatibility + +// Stripping precision code from GLES shader for desktop compatibility +// Code adopted from Meego GL code. Temporary Fix. +static const char * +opengl_strtok(const char *s, int *n, char **saveptr, char *prevbuf) +{ + char *start; + char *ret; + char *p; + int retlen; + static const char *delim = " \t\n\r/"; + + if (prevbuf) free(prevbuf); + + if (s) + *saveptr = (char *)s; + else + { + if (!(*saveptr) || !(*n)) + return NULL; + s = *saveptr; + } + + for (; *n && strchr(delim, *s); s++, (*n)--) + { + if (*s == '/' && *n > 1) + { + if (s[1] == '/') + { + do + { + s++, (*n)--; + } + while (*n > 1 && s[1] != '\n' && s[1] != '\r'); + } + else if (s[1] == '*') + { + do + { + s++, (*n)--; + } + while (*n > 2 && (s[1] != '*' || s[2] != '/')); + s++, (*n)--; + } + } + } + + start = (char *)s; + for (; *n && *s && !strchr(delim, *s); s++, (*n)--); + if (*n > 0) s++, (*n)--; + + *saveptr = (char *)s; + + retlen = s - start; + ret = malloc(retlen + 1); + p = ret; + + while (retlen > 0) + { + if (*start == '/' && retlen > 1) + { + if (start[1] == '/') + { + do + { + start++, retlen--; + } + while (retlen > 1 && start[1] != '\n' && start[1] != '\r'); + start++, retlen--; + continue; + } + else if (start[1] == '*') + { + do + { + start++, retlen--; + } + while (retlen > 2 && (start[1] != '*' || start[2] != '/')); + start += 3, retlen -= 3; + continue; + } + } + *(p++) = *(start++), retlen--; + } + + *p = 0; + return ret; +} + +static char * +patch_gles_shader(const char *source, int length, int *patched_len) +{ + char *saveptr = NULL; + char *sp; + char *p = NULL; + + if (!length) length = strlen(source); + + *patched_len = 0; + int patched_size = length; + char *patched = malloc(patched_size + 1); + + if (!patched) return NULL; + + p = (char *)opengl_strtok(source, &length, &saveptr, NULL); + for (; p; p = (char *)opengl_strtok(0, &length, &saveptr, p)) + { + if (!strncmp(p, "lowp", 4) || !strncmp(p, "mediump", 7) || !strncmp(p, "highp", 5)) + { + continue; + } + else if (!strncmp(p, "precision", 9)) + { + while ((p = (char *)opengl_strtok(0, &length, &saveptr, p)) && !strchr(p, ';')); + } + else + { + if (!strncmp(p, "gl_MaxVertexUniformVectors", 26)) + { + p = "(gl_MaxVertexUniformComponents / 4)"; + } + else if (!strncmp(p, "gl_MaxFragmentUniformVectors", 28)) + { + p = "(gl_MaxFragmentUniformComponents / 4)"; + } + else if (!strncmp(p, "gl_MaxVaryingVectors", 20)) + { + p = "(gl_MaxVaryingFloats / 4)"; + } + + int new_len = strlen(p); + if (*patched_len + new_len > patched_size) + { + patched_size *= 2; + patched = realloc(patched, patched_size + 1); + + if (!patched) + return NULL; + } + + memcpy(patched + *patched_len, p, new_len); + *patched_len += new_len; + } + } + + patched[*patched_len] = 0; + /* check that we don't leave dummy preprocessor lines */ + for (sp = patched; *sp;) + { + for (; *sp == ' ' || *sp == '\t'; sp++); + if (!strncmp(sp, "#define", 7)) + { + for (p = sp + 7; *p == ' ' || *p == '\t'; p++); + if (*p == '\n' || *p == '\r' || *p == '/') + { + memset(sp, 0x20, 7); + } + } + for (; *sp && *sp != '\n' && *sp != '\r'; sp++); + for (; *sp == '\n' || *sp == '\r'; sp++); + } + return patched; +} + +static void +evgl_glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length) +{ + int i = 0, len = 0; + + char **s = malloc(count * sizeof(char*)); + GLint *l = malloc(count * sizeof(GLint)); + + memset(s, 0, count * sizeof(char*)); + memset(l, 0, count * sizeof(GLint)); + + for (i = 0; i < count; ++i) + { + if (length) + { + len = length[i]; + if (len < 0) + len = string[i] ? strlen(string[i]) : 0; + } + else + len = string[i] ? strlen(string[i]) : 0; + + if (string[i]) + { + s[i] = patch_gles_shader(string[i], len, &l[i]); + if (!s[i]) + { + while(i) + free(s[--i]); + free(l); + free(s); + + DBG("Patching Shader Failed."); + return; + } + } + else + { + s[i] = NULL; + l[i] = 0; + } + } + + _sym_glShaderSource(shader, count, (const char **)s, l); + + while(i) + free(s[--i]); + free(l); + free(s); +} + + +static void +evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) +{ + if (range) + { + range[0] = -126; // floor(log2(FLT_MIN)) + range[1] = 127; // floor(log2(FLT_MAX)) + } + if (precision) + { + precision[0] = 24; // floor(-log2((1.0/16777218.0))); + } + return; + shadertype = precisiontype = 0; +} + +static void +evgl_glReleaseShaderCompiler(void) +{ + DBG("Not supported in Desktop GL"); + return; +} + +static void +evgl_glShaderBinary(GLsizei n __UNUSED__, const GLuint* shaders __UNUSED__, GLenum binaryformat __UNUSED__, const void* binary __UNUSED__, GLsizei length __UNUSED__) +{ + // FIXME: need to dlsym/getprocaddress for this + DBG("Not supported in Desktop GL"); + return; + //n = binaryformat = length = 0; + //shaders = binary = 0; +} +#endif +//--------------------------------------------------------------// + + +#ifdef EVAS_GL +static void +override_gl_apis(Evas_GL_API *api) +{ + + api->version = EVAS_GL_API_VERSION; + +#define ORD(f) EVAS_API_OVERRIDE(f, api, _sym_) + // GLES 2.0 + ORD(glActiveTexture); + ORD(glAttachShader); + ORD(glBindAttribLocation); + ORD(glBindBuffer); + ORD(glBindTexture); + ORD(glBlendColor); + ORD(glBlendEquation); + ORD(glBlendEquationSeparate); + ORD(glBlendFunc); + ORD(glBlendFuncSeparate); + ORD(glBufferData); + ORD(glBufferSubData); + ORD(glCheckFramebufferStatus); + ORD(glClear); + ORD(glClearColor); + ORD(glClearDepthf); + ORD(glClearStencil); + ORD(glColorMask); + ORD(glCompileShader); + ORD(glCompressedTexImage2D); + ORD(glCompressedTexSubImage2D); + ORD(glCopyTexImage2D); + ORD(glCopyTexSubImage2D); + ORD(glCreateProgram); + ORD(glCreateShader); + ORD(glCullFace); + ORD(glDeleteBuffers); + ORD(glDeleteFramebuffers); + ORD(glDeleteProgram); + ORD(glDeleteRenderbuffers); + ORD(glDeleteShader); + ORD(glDeleteTextures); + ORD(glDepthFunc); + ORD(glDepthMask); + ORD(glDepthRangef); + ORD(glDetachShader); + ORD(glDisable); + ORD(glDisableVertexAttribArray); + ORD(glDrawArrays); + ORD(glDrawElements); + ORD(glEnable); + ORD(glEnableVertexAttribArray); + ORD(glFinish); + ORD(glFlush); + ORD(glFramebufferRenderbuffer); + ORD(glFramebufferTexture2D); + ORD(glFrontFace); + ORD(glGenBuffers); + ORD(glGenerateMipmap); + ORD(glGenFramebuffers); + ORD(glGenRenderbuffers); + ORD(glGenTextures); + ORD(glGetActiveAttrib); + ORD(glGetActiveUniform); + ORD(glGetAttachedShaders); + ORD(glGetAttribLocation); + ORD(glGetBooleanv); + ORD(glGetBufferParameteriv); + ORD(glGetError); + ORD(glGetFloatv); + ORD(glGetFramebufferAttachmentParameteriv); + ORD(glGetIntegerv); + ORD(glGetProgramiv); + ORD(glGetProgramInfoLog); + ORD(glGetRenderbufferParameteriv); + ORD(glGetShaderiv); + ORD(glGetShaderInfoLog); + ORD(glGetShaderPrecisionFormat); + ORD(glGetShaderSource); + ORD(glGetString); // FIXME + ORD(glGetTexParameterfv); + ORD(glGetTexParameteriv); + ORD(glGetUniformfv); + ORD(glGetUniformiv); + ORD(glGetUniformLocation); + ORD(glGetVertexAttribfv); + ORD(glGetVertexAttribiv); + ORD(glGetVertexAttribPointerv); + ORD(glHint); + ORD(glIsBuffer); + ORD(glIsEnabled); + ORD(glIsFramebuffer); + ORD(glIsProgram); + ORD(glIsRenderbuffer); + ORD(glIsShader); + ORD(glIsTexture); + ORD(glLineWidth); + ORD(glLinkProgram); + ORD(glPixelStorei); + ORD(glPolygonOffset); + ORD(glReadPixels); + ORD(glReleaseShaderCompiler); + ORD(glRenderbufferStorage); + ORD(glSampleCoverage); + ORD(glScissor); + ORD(glShaderBinary); + ORD(glShaderSource); + ORD(glStencilFunc); + ORD(glStencilFuncSeparate); + ORD(glStencilMask); + ORD(glStencilMaskSeparate); + ORD(glStencilOp); + ORD(glStencilOpSeparate); + ORD(glTexImage2D); + ORD(glTexParameterf); + ORD(glTexParameterfv); + ORD(glTexParameteri); + ORD(glTexParameteriv); + ORD(glTexSubImage2D); + ORD(glUniform1f); + ORD(glUniform1fv); + ORD(glUniform1i); + ORD(glUniform1iv); + ORD(glUniform2f); + ORD(glUniform2fv); + ORD(glUniform2i); + ORD(glUniform2iv); + ORD(glUniform3f); + ORD(glUniform3fv); + ORD(glUniform3i); + ORD(glUniform3iv); + ORD(glUniform4f); + ORD(glUniform4fv); + ORD(glUniform4i); + ORD(glUniform4iv); + ORD(glUniformMatrix2fv); + ORD(glUniformMatrix3fv); + ORD(glUniformMatrix4fv); + ORD(glUseProgram); + ORD(glValidateProgram); + ORD(glVertexAttrib1f); + ORD(glVertexAttrib1fv); + ORD(glVertexAttrib2f); + ORD(glVertexAttrib2fv); + ORD(glVertexAttrib3f); + ORD(glVertexAttrib3fv); + ORD(glVertexAttrib4f); + ORD(glVertexAttrib4fv); + ORD(glVertexAttribPointer); + ORD(glViewport); +#undef ORD + +#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, evgl_) + if (!gl_lib_is_gles) + { + // Override functions wrapped by Evas_GL + // GLES2.0 API compat on top of desktop gl + ORD(glGetShaderPrecisionFormat); + ORD(glReleaseShaderCompiler); + ORD(glShaderBinary); + } + + ORD(glShaderSource); // Do precision stripping in both cases +#undef ORD +} +#endif + +//-------------------------------------------// +static int +gl_lib_init(void) +{ +#ifdef EVAS_GL + // dlopen OSMesa + gl_lib_handle = dlopen("libOSMesa.so.1", RTLD_NOW); + if (!gl_lib_handle) gl_lib_handle = dlopen("libOSMesa.so", RTLD_NOW); + if (!gl_lib_handle) + { + DBG("Unable to open libOSMesa: %s", dlerror()); + return 0; + } + + //------------------------------------------------// + if (!glue_sym_init()) return 0; + if (!gl_sym_init()) return 0; + + override_gl_apis(&gl_funcs); + + return 1; +#else + return 0; +#endif +} + + +static void +init_gl(void) +{ + DBG("Initializing Software OpenGL APIs...\n"); + + if (!gl_lib_init()) + DBG("Unable to support EvasGL in this engine module. Install OSMesa to get it running"); + else + { +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(gl_surface_create); + ORD(gl_surface_destroy); + ORD(gl_context_create); + ORD(gl_context_destroy); + ORD(gl_make_current); + ORD(gl_string_query); // FIXME: Need to implement + ORD(gl_proc_address_get); // FIXME: Need to implement + ORD(gl_native_surface_get); + ORD(gl_api_get); +#undef ORD + } +} + + /* ***** ** @@ -1201,6 +2790,9 @@ module_open(Evas_Module *em) EINA_LOG_ERR("Can not create a module log domain."); return 0; } + + init_gl(); + em->functions = (void *)(&func); cpunum = eina_cpu_count(); return 1; diff --git a/libraries/evas/src/modules/engines/software_sdl/Makefile.in b/libraries/evas/src/modules/engines/software_sdl/Makefile.in index d1052c1..f63f3eb 100644 --- a/libraries/evas/src/modules/engines/software_sdl/Makefile.in +++ b/libraries/evas/src/modules/engines/software_sdl/Makefile.in @@ -241,8 +241,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -259,6 +257,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -340,6 +340,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_x11/Makefile.in b/libraries/evas/src/modules/engines/software_x11/Makefile.in index f5c73af..5fd2971 100644 --- a/libraries/evas/src/modules/engines/software_x11/Makefile.in +++ b/libraries/evas/src/modules/engines/software_x11/Makefile.in @@ -282,8 +282,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -300,6 +298,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -381,6 +381,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c b/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c index 1b1d3d9..24c45df 100644 --- a/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c +++ b/libraries/evas/src/modules/engines/software_x11/evas_xlib_outbuf.c @@ -579,6 +579,8 @@ evas_software_xlib_outbuf_new_region_for_update(Outbuf *buf, int x, int y, int w free(obr); return NULL; } + im->cache_entry.w = w; + im->cache_entry.h = h; im->cache_entry.flags.alpha |= alpha ? 1 : 0; evas_cache_image_surface_alloc(&im->cache_entry, w, h); im->extended_info = obr; diff --git a/libraries/evas/src/modules/engines/wayland_egl/Evas_Engine_Wayland_Egl.h b/libraries/evas/src/modules/engines/wayland_egl/Evas_Engine_Wayland_Egl.h new file mode 100644 index 0000000..92ffe25 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_egl/Evas_Engine_Wayland_Egl.h @@ -0,0 +1,42 @@ +#ifndef _EVAS_ENGINE_WAYLAND_EGL_H +#define _EVAS_ENGINE_WAYLAND_EGL_H + +#include + +typedef struct _Evas_Engine_Info_Wayland_Egl Evas_Engine_Info_Wayland_Egl; + +struct _Evas_Engine_Info_Wayland_Egl +{ + /* PRIVATE - don't mess with this baby or evas will poke its tongue out */ + /* at you and make nasty noises */ + Evas_Engine_Info magic; + + /* engine specific data & parameters it needs to set up */ + struct { + struct wl_display *display; + struct wl_surface *surface; + int depth; + int screen; + int rotation; + unsigned int destination_alpha : 1; + } info; + /* engine specific function calls to query stuff about the destination */ + /* engine (what visual & colormap & depth to use, performance info etc. */ + struct { + int (*best_depth_get) (Evas_Engine_Info_Wayland_Egl *einfo); + } func; + + struct { + void (*pre_swap) (void *data, Evas *e); + void (*post_swap) (void *data, Evas *e); + + void *data; // data for callback calls + } callback; + + /* non-blocking or blocking mode */ + Evas_Engine_Render_Mode render_mode; + + unsigned char vsync : 1; // does nothing right now + unsigned char indirect : 1; // use indirect rendering +}; +#endif diff --git a/libraries/evas/src/modules/engines/wayland_egl/Makefile.am b/libraries/evas/src/modules/engines/wayland_egl/Makefile.am new file mode 100644 index 0000000..100614f --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_egl/Makefile.am @@ -0,0 +1,47 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines/gl_common \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@GL_EET_CFLAGS@ \ +@evas_engine_wayland_egl_cflags@ + +if BUILD_ENGINE_WAYLAND_EGL + +WAYLAND_EGL_SOURCES = \ +evas_engine.c \ +evas_wl_main.c + +WAYLAND_EGL_LIBADD = @FREETYPE_LIBS@ @GL_EET_LIBS@ @EINA_LIBS@ @evas_engine_wayland_egl_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la + +includes_HEADERS = Evas_Engine_Wayland_Egl.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_WAYLAND_EGL + +pkgdir = $(libdir)/evas/modules/engines/wayland_egl/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(WAYLAND_EGL_SOURCES) +module_la_LIBADD = $(WAYLAND_EGL_LIBADD) $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + + +else + +noinst_LTLIBRARIES = libevas_engine_wayland_egl.la + +libevas_engine_wayland_egl_la_SOURCES = $(WAYLAND_EGL_SOURCES) +libevas_engine_wayland_egl_la_LIBADD = $(WAYLAND_EGL_LIBADD) + +endif +endif + +EXTRA_DIST = evas_engine.h diff --git a/libraries/evas/src/modules/engines/wayland_egl/Makefile.in b/libraries/evas/src/modules/engines/wayland_egl/Makefile.in new file mode 100644 index 0000000..0df0c63 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_egl/Makefile.in @@ -0,0 +1,816 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/wayland_egl +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.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)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +@BUILD_ENGINE_WAYLAND_EGL_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE@libevas_engine_wayland_egl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_wayland_egl_la_SOURCES_DIST = evas_engine.c \ + evas_wl_main.c +@BUILD_ENGINE_WAYLAND_EGL_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@ evas_wl_main.lo +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE@am_libevas_engine_wayland_egl_la_OBJECTS = $(am__objects_1) +libevas_engine_wayland_egl_la_OBJECTS = \ + $(am_libevas_engine_wayland_egl_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE@am_libevas_engine_wayland_egl_la_rpath = +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@ $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c evas_wl_main.c +@BUILD_ENGINE_WAYLAND_EGL_TRUE@am__objects_2 = \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@ module_la-evas_engine.lo \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@ module_la-evas_wl_main.lo +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_wayland_egl_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_wayland_egl_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_Wayland_Egl.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines/gl_common \ +@FREETYPE_CFLAGS@ \ +@PIXMAN_CFLAGS@ \ +@EINA_CFLAGS@ \ +@GL_EET_CFLAGS@ \ +@evas_engine_wayland_egl_cflags@ + +@BUILD_ENGINE_WAYLAND_EGL_TRUE@WAYLAND_EGL_SOURCES = \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@evas_engine.c \ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@evas_wl_main.c + +@BUILD_ENGINE_WAYLAND_EGL_TRUE@WAYLAND_EGL_LIBADD = @FREETYPE_LIBS@ @GL_EET_LIBS@ @EINA_LIBS@ @evas_engine_wayland_egl_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la +@BUILD_ENGINE_WAYLAND_EGL_TRUE@includes_HEADERS = Evas_Engine_Wayland_Egl.h +@BUILD_ENGINE_WAYLAND_EGL_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@pkgdir = $(libdir)/evas/modules/engines/wayland_egl/$(MODULE_ARCH) +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@module_la_SOURCES = $(WAYLAND_EGL_SOURCES) +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@module_la_LIBADD = $(WAYLAND_EGL_LIBADD) $(top_builddir)/src/lib/libevas.la +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@module_la_LDFLAGS = -no-undefined -module -avoid-version +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE@noinst_LTLIBRARIES = libevas_engine_wayland_egl.la +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE@libevas_engine_wayland_egl_la_SOURCES = $(WAYLAND_EGL_SOURCES) +@BUILD_ENGINE_WAYLAND_EGL_TRUE@@EVAS_STATIC_BUILD_WAYLAND_EGL_TRUE@libevas_engine_wayland_egl_la_LIBADD = $(WAYLAND_EGL_LIBADD) +EXTRA_DIST = evas_engine.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/wayland_egl/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/wayland_egl/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_wayland_egl.la: $(libevas_engine_wayland_egl_la_OBJECTS) $(libevas_engine_wayland_egl_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_wayland_egl_la_rpath) $(libevas_engine_wayland_egl_la_OBJECTS) $(libevas_engine_wayland_egl_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_wl_main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_wl_main.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-evas_wl_main.lo: evas_wl_main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_wl_main.lo -MD -MP -MF $(DEPDIR)/module_la-evas_wl_main.Tpo -c -o module_la-evas_wl_main.lo `test -f 'evas_wl_main.c' || echo '$(srcdir)/'`evas_wl_main.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_wl_main.Tpo $(DEPDIR)/module_la-evas_wl_main.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_wl_main.c' object='module_la-evas_wl_main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_wl_main.lo `test -f 'evas_wl_main.c' || echo '$(srcdir)/'`evas_wl_main.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/wayland_egl/evas_engine.c b/libraries/evas/src/modules/engines/wayland_egl/evas_engine.c new file mode 100644 index 0000000..d2a6a0d --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_egl/evas_engine.c @@ -0,0 +1,3174 @@ +#include "evas_common.h" /* Also includes international specific stuff */ +#include "evas_engine.h" + +#ifdef HAVE_DLSYM +# include /* dlopen,dlclose,etc */ +#else +# error gl_x11 should not get compiled if dlsym is not found on the system! +#endif + +#define EVAS_GL_NO_GL_H_CHECK 1 +#include "Evas_GL.h" + +typedef struct _Render_Engine Render_Engine; +typedef struct _Render_Engine_GL_Surface Render_Engine_GL_Surface; +typedef struct _Render_Engine_GL_Context Render_Engine_GL_Context; +typedef struct _Render_Engine_GL_Resource Render_Engine_GL_Resource; +typedef struct _Extension_Entry Extension_Entry; + +struct _Render_Engine +{ + Evas_GL_Wl_Window *win; + Evas_Engine_Info_Wayland_Egl *info; + Evas *evas; + Tilebuf *tb; + int end; + int w, h; + int vsync; + +}; + +struct _Render_Engine_GL_Surface +{ + int initialized; + int fbo_attached; + int w, h; + int depth_bits; + int stencil_bits; + + // Render target texture/buffers + GLuint rt_tex; + GLint rt_internal_fmt; + GLenum rt_fmt; + GLuint rb_depth; + GLenum rb_depth_fmt; + GLuint rb_stencil; + GLenum rb_stencil_fmt; + + Render_Engine_GL_Context *current_ctx; +}; + +struct _Render_Engine_GL_Context +{ + int initialized; + EGLContext context; + GLuint context_fbo; + GLuint current_fbo; + + Render_Engine_GL_Surface *current_sfc; +}; + +// Resources used per thread +struct _Render_Engine_GL_Resource +{ + // Resource context/surface per Thread in TLS for evasgl use + EGLContext context; + EGLSurface surface; +}; + +// Extension Handling +struct _Extension_Entry +{ + const char *name; + const char *real_name; + int supported; +}; + +static int initted = 0; +static int gl_wins = 0; +static Render_Engine_GL_Context *current_evgl_ctx; +static Render_Engine *current_engine; + +static char _gl_ext_string[1024]; +static char _evasgl_ext_string[1024]; + +// Resource context/surface per Thread in TLS for evasgl use +static Eina_TLS resource_key; +static Eina_List *resource_list; +LK(resource_lock); + +typedef void (*_eng_fn) (void); +typedef _eng_fn (*glsym_func_eng_fn) (); +typedef void (*glsym_func_void) (); +typedef void *(*glsym_func_void_ptr) (); +typedef int (*glsym_func_int) (); +typedef unsigned int (*glsym_func_uint) (); +typedef unsigned char (*glsym_func_uchar) (); +typedef unsigned char *(*glsym_func_uchar_ptr) (); +typedef const char *(*glsym_func_const_char_ptr) (); + +#ifndef EGL_NATIVE_PIXMAP_KHR +# define EGL_NATIVE_PIXMAP_KHR 0x30b0 +#endif +_eng_fn (*glsym_eglGetProcAddress) (const char *a) = NULL; +void (*glsym_eglBindTexImage) (EGLDisplay a, EGLSurface b, int c) = NULL; +void (*glsym_eglReleaseTexImage) (EGLDisplay a, EGLSurface b, int c) = NULL; +void *(*glsym_eglCreateImage) (EGLDisplay a, EGLContext b, EGLenum c, EGLClientBuffer d, const int *e) = NULL; +void (*glsym_eglDestroyImage) (EGLDisplay a, void *b) = NULL; +void (*glsym_glEGLImageTargetTexture2DOES) (int a, void *b) = NULL; +void (*glsym_glEGLImageTargetRenderbufferStorageOES) (int a, void *b) = NULL; +void *(*glsym_eglMapImageSEC) (void *a, void *b) = NULL; +unsigned int (*glsym_eglUnmapImageSEC) (void *a, void *b) = NULL; +const char *(*glsym_eglQueryString) (EGLDisplay a, int name) = NULL; + +unsigned int (*glsym_eglLockSurface) (EGLDisplay a, EGLSurface b, const int *attrib_list) = NULL; +unsigned int (*glsym_eglUnlockSurface) (EGLDisplay a, EGLSurface b) = NULL; + +// GLES2 Extensions +void (*glsym_glGetProgramBinaryOES) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary) = NULL; +void (*glsym_glProgramBinaryOES) (GLuint program, GLenum binaryFormat, const void *binary, GLint length) = NULL; +void* (*glsym_glMapBufferOES) (GLenum target, GLenum access) = NULL; +unsigned char (*glsym_glUnmapBufferOES) (GLenum target) = NULL; +void (*glsym_glGetBufferPointervOES) (GLenum target, GLenum pname, void** params) = NULL; +void (*glsym_glTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) = NULL; +void (*glsym_glTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) = NULL; +void (*glsym_glCopyTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) = NULL; +void (*glsym_glCompressedTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data) = NULL; +void (*glsym_glCompressedTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) = NULL; +void (*glsym_glFramebufferTexture3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) = NULL; +void (*glsym_glGetPerfMonitorGroupsAMD) (GLint* numGroups, GLsizei groupsSize, GLuint* groups) = NULL; +void (*glsym_glGetPerfMonitorCountersAMD) (GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters) = NULL; +void (*glsym_glGetPerfMonitorGroupStringAMD) (GLuint group, GLsizei bufSize, GLsizei* length, char* groupString) = NULL; +void (*glsym_glGetPerfMonitorCounterStringAMD) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, char* counterString) = NULL; +void (*glsym_glGetPerfMonitorCounterInfoAMD) (GLuint group, GLuint counter, GLenum pname, void* data) = NULL; +void (*glsym_glGenPerfMonitorsAMD) (GLsizei n, GLuint* monitors) = NULL; +void (*glsym_glDeletePerfMonitorsAMD) (GLsizei n, GLuint* monitors) = NULL; +void (*glsym_glSelectPerfMonitorCountersAMD) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* countersList) = NULL; +void (*glsym_glBeginPerfMonitorAMD) (GLuint monitor) = NULL; +void (*glsym_glEndPerfMonitorAMD) (GLuint monitor) = NULL; +void (*glsym_glGetPerfMonitorCounterDataAMD) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten) = NULL; +void (*glsym_glDiscardFramebufferEXT) (GLenum target, GLsizei numAttachments, const GLenum* attachments) = NULL; +void (*glsym_glMultiDrawArraysEXT) (GLenum mode, GLint* first, GLsizei* count, GLsizei primcount) = NULL; +void (*glsym_glMultiDrawElementsEXT) (GLenum mode, const GLsizei* count, GLenum type, const GLvoid** indices, GLsizei primcount) = NULL; +void (*glsym_glDeleteFencesNV) (GLsizei n, const GLuint* fences) = NULL; +void (*glsym_glGenFencesNV) (GLsizei n, GLuint* fences) = NULL; +unsigned char (*glsym_glIsFenceNV) (GLuint fence) = NULL; +unsigned char (*glsym_glTestFenceNV) (GLuint fence) = NULL; +void (*glsym_glGetFenceivNV) (GLuint fence, GLenum pname, GLint* params) = NULL; +void (*glsym_glFinishFenceNV) (GLuint fence) = NULL; +void (*glsym_glSetFenceNV) (GLuint, GLenum) = NULL; +void (*glsym_glGetDriverControlsQCOM) (GLint* num, GLsizei size, GLuint* driverControls) = NULL; +void (*glsym_glGetDriverControlStringQCOM) (GLuint driverControl, GLsizei bufSize, GLsizei* length, char* driverControlString) = NULL; +void (*glsym_glEnableDriverControlQCOM) (GLuint driverControl) = NULL; +void (*glsym_glDisableDriverControlQCOM) (GLuint driverControl) = NULL; +void (*glsym_glExtGetTexturesQCOM) (GLuint* textures, GLint maxTextures, GLint* numTextures) = NULL; +void (*glsym_glExtGetBuffersQCOM) (GLuint* buffers, GLint maxBuffers, GLint* numBuffers) = NULL; +void (*glsym_glExtGetRenderbuffersQCOM) (GLuint* renderbuffers, GLint maxRenderbuffers, GLint* numRenderbuffers) = NULL; +void (*glsym_glExtGetFramebuffersQCOM) (GLuint* framebuffers, GLint maxFramebuffers, GLint* numFramebuffers) = NULL; +void (*glsym_glExtGetTexLevelParameterivQCOM) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint* params) = NULL; +void (*glsym_glExtTexObjectStateOverrideiQCOM) (GLenum target, GLenum pname, GLint param) = NULL; +void (*glsym_glExtGetTexSubImageQCOM) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void* texels) = NULL; +void (*glsym_glExtGetBufferPointervQCOM) (GLenum target, void** params) = NULL; +void (*glsym_glExtGetShadersQCOM) (GLuint* shaders, GLint maxShaders, GLint* numShaders) = NULL; +void (*glsym_glExtGetProgramsQCOM) (GLuint* programs, GLint maxPrograms, GLint* numPrograms) = NULL; +unsigned char (*glsym_glExtIsProgramBinaryQCOM) (GLuint program) = NULL; +void (*glsym_glExtGetProgramBinarySourceQCOM) (GLuint program, GLenum shadertype, char* source, GLint* length) = NULL; + + +//------ GLES 2.0 Extensions supported in EvasGL -----// +static Extension_Entry _gl_ext_entries[] = { + //--- Function Extensions ---// + { "GL_OES_get_program_binary", "get_program_binary", 0 }, + { "GL_OES_mapbuffer", "mapbuffer", 0 }, + { "GL_OES_texture_3D", "texture_3D", 0 }, + { "AMD_performance_monitor", "AMD_performance_monitor", 0 }, + { "GL_EXT_discard_framebuffer", "discard_framebuffer", 0 }, + { "GL_EXT_multi_draw_arrays", "multi_draw_arrays", 0 }, + { "GL_NV_fence", "NV_fence", 0 }, + { "GL_QCOM_driver_control", "QCOM_driver_control", 0 }, + { "GL_QCOM_extended_get", "QCOM_extended_get", 0 }, + { "GL_QCOM_extended_get2", "QCOM_extended_get2", 0 }, + + //--- Define Extensions ---// + { "GL_OES_compressed_ETC1_RGB8_texture", "compressed_ETC1_RGB8_texture", 0 }, + { "GL_OES_compressed_paletted_texture", "compressed_paletted_texture", 0 }, + { "GL_OES_depth24", "depth24", 0 }, + { "GL_OES_depth32", "depth32", 0 }, + { "GL_OES_EvasGL_image", "EGL_image", 0 }, + { "GL_OES_packed_depth_stencil", "packed_depth_stencil", 0 }, + { "GL_OES_rgb8_rgba8", "rgb8_rgba8", 0 }, + { "GL_OES_standard_derivatives", "standard_derivatives", 0 }, + { "GL_OES_stencil1", "stencil1", 0 }, + { "GL_OES_stencil4", "stencil4", 0 }, + { "GL_OES_texture_float", "texture_float", 0 }, + { "GL_OES_texture_half_float", "texture_half_float", 0 }, + { "GL_OES_texture_half_float_linear", "texture_half_float_linear", 0 }, + { "GL_OES_texture_npot", "texture_npot", 0 }, + { "GL_OES_vertex_half_float", "vertex_half_float", 0 }, + { "GL_OES_vertex_type_10_10_10_2", "vertex_type_10_10_10_2", 0 }, + { "GL_AMD_compressed_3DC_texture", "compressed_3DC_texture", 0 }, + { "GL_AMD_compressed_ATC_texture", "compressed_ATC_texture", 0 }, + { "GL_AMD_program_binary_Z400", "program_binary_Z400", 0 }, + { "GL_EXT_blend_minmax", "blend_minmax", 0 }, + { "GL_EXT_read_format_bgra", "read_format_bgra", 0 }, + { "GL_EXT_texture_filter_anisotropic", "texture_filter_anisotrophic", 0 }, + { "GL_EXT_texture_format_BGRA8888", "texture_format_BGRA8888", 0 }, + { "GL_EXT_texture_type_2_10_10_10_REV", "texture_type_2_10_10_10_rev", 0 }, + { "GL_IMG_program_binary", "IMG_program_binary", 0 }, + { "GL_IMG_read_format", "IMG_read_format", 0 }, + { "GL_IMG_shader_binary", "IMG_shader_binary", 0 }, + { "GL_IMG_texture_compression_pvrtc", "IMG_texture_compression_pvrtc", 0 }, + { "GL_QCOM_perfmon_global_mode", "QCOM_perfmon_global_mode", 0 }, + { "GL_QCOM_writeonly_rendering", "QCOM_writeonly_rendering", 0 }, + { NULL, NULL, 0} +}; + +//------ Extensions supported in EvasGL -----// +static Extension_Entry _evasgl_ext_entries[] = { + { "EvasGL_KHR_image", "EGL_KHR_image", 0 }, + { "EvasGL_KHR_vg_parent_image", "EGL_KHR_vg_parent_image", 0 }, + { "EvasGL_KHR_gl_texture_2D_image", "EGL_KHR_gl_texture_2D_image", 0 }, + { "EvasGL_KHR_gl_texture_cubemap_image", "EGL_KHR_gl_texture_cubemap_image", 0 }, + { "EvasGL_KHR_gl_texture_3D_image", "EGL_KHR_gl_texture_3D_image", 0 }, + { "EvasGL_KHR_gl_renderbuffer_image", "EGL_KHR_gl_renderbuffer_image", 0 }, + { NULL, NULL, 0 } +}; + +static void +_sym_init(void) +{ + static int done = 0; + + if (done) return; + +#define FINDSYM(dst, sym, typ) \ + if ((!dst) && (glsym_eglGetProcAddress)) dst = (typ)glsym_eglGetProcAddress(sym); \ + if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym) + + FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddress", glsym_func_eng_fn); + FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressEXT", glsym_func_eng_fn); + FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressARB", glsym_func_eng_fn); + FINDSYM(glsym_eglGetProcAddress, "eglGetProcAddressKHR", glsym_func_eng_fn); + + FINDSYM(glsym_eglBindTexImage, "eglBindTexImage", glsym_func_void); + FINDSYM(glsym_eglBindTexImage, "eglBindTexImageEXT", glsym_func_void); + FINDSYM(glsym_eglBindTexImage, "eglBindTexImageARB", glsym_func_void); + FINDSYM(glsym_eglBindTexImage, "eglBindTexImageKHR", glsym_func_void); + + FINDSYM(glsym_eglReleaseTexImage, "eglReleaseTexImage", glsym_func_void); + FINDSYM(glsym_eglReleaseTexImage, "eglReleaseTexImageEXT", glsym_func_void); + FINDSYM(glsym_eglReleaseTexImage, "eglReleaseTexImageARB", glsym_func_void); + FINDSYM(glsym_eglReleaseTexImage, "eglReleaseTexImageKHR", glsym_func_void); + + FINDSYM(glsym_eglCreateImage, "eglCreateImage", glsym_func_void_ptr); + FINDSYM(glsym_eglCreateImage, "eglCreateImageEXT", glsym_func_void_ptr); + FINDSYM(glsym_eglCreateImage, "eglCreateImageARB", glsym_func_void_ptr); + FINDSYM(glsym_eglCreateImage, "eglCreateImageKHR", glsym_func_void_ptr); + + FINDSYM(glsym_eglDestroyImage, "eglDestroyImage", glsym_func_void); + FINDSYM(glsym_eglDestroyImage, "eglDestroyImageEXT", glsym_func_void); + FINDSYM(glsym_eglDestroyImage, "eglDestroyImageARB", glsym_func_void); + FINDSYM(glsym_eglDestroyImage, "eglDestroyImageKHR", glsym_func_void); + + FINDSYM(glsym_glEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES", glsym_func_void); + + FINDSYM(glsym_glEGLImageTargetRenderbufferStorageOES, "glEGLImageTargetRenderbufferStorageOES", glsym_func_void); + + FINDSYM(glsym_eglMapImageSEC, "eglMapImageSEC", glsym_func_void_ptr); + FINDSYM(glsym_eglUnmapImageSEC, "eglUnmapImageSEC", glsym_func_uint); + + FINDSYM(glsym_eglQueryString, "eglQueryString", glsym_func_const_char_ptr); + + FINDSYM(glsym_eglLockSurface, "eglLockSurface", glsym_func_uint); + FINDSYM(glsym_eglLockSurface, "eglLockSurfaceEXT", glsym_func_uint); + FINDSYM(glsym_eglLockSurface, "eglLockSurfaceARB", glsym_func_uint); + FINDSYM(glsym_eglLockSurface, "eglLockSurfaceKHR", glsym_func_uint); + + FINDSYM(glsym_eglUnlockSurface, "eglUnlockSurface", glsym_func_uint); + FINDSYM(glsym_eglUnlockSurface, "eglUnlockSurfaceEXT", glsym_func_uint); + FINDSYM(glsym_eglUnlockSurface, "eglUnlockSurfaceARB", glsym_func_uint); + FINDSYM(glsym_eglUnlockSurface, "eglUnlockSurfaceKHR", glsym_func_uint); + + //----------- GLES 2.0 Extensions ------------// + // If the symbol's not found, they get set to NULL + // If one of the functions in the extension exists, the extension in supported + /* GL_OES_get_program_binary */ + FINDSYM(glsym_glGetProgramBinaryOES, "glGetProgramBinary", glsym_func_void); + FINDSYM(glsym_glGetProgramBinaryOES, "glGetProgramBinaryEXT", glsym_func_void); + FINDSYM(glsym_glGetProgramBinaryOES, "glGetProgramBinaryARB", glsym_func_void); + FINDSYM(glsym_glGetProgramBinaryOES, "glGetProgramBinaryOES", glsym_func_void); + + FINDSYM(glsym_glProgramBinaryOES, "glProgramBinary", glsym_func_void); + FINDSYM(glsym_glProgramBinaryOES, "glProgramBinaryEXT", glsym_func_void); + FINDSYM(glsym_glProgramBinaryOES, "glProgramBinaryARB", glsym_func_void); + FINDSYM(glsym_glProgramBinaryOES, "glProgramBinaryOES", glsym_func_void); + + // Check the first function to see if the extension is supported... + if (glsym_glGetProgramBinaryOES) _gl_ext_entries[0].supported = 1; + + /* GL_OES_mapbuffer */ + FINDSYM(glsym_glMapBufferOES, "glMapBuffer", glsym_func_void_ptr); + FINDSYM(glsym_glMapBufferOES, "glMapBufferEXT", glsym_func_void_ptr); + FINDSYM(glsym_glMapBufferOES, "glMapBufferARB", glsym_func_void_ptr); + FINDSYM(glsym_glMapBufferOES, "glMapBufferOES", glsym_func_void_ptr); + + FINDSYM(glsym_glUnmapBufferOES, "glUnmapBuffer", glsym_func_uchar); + FINDSYM(glsym_glUnmapBufferOES, "glUnmapBufferEXT", glsym_func_uchar); + FINDSYM(glsym_glUnmapBufferOES, "glUnmapBufferARB", glsym_func_uchar); + FINDSYM(glsym_glUnmapBufferOES, "glUnmapBufferOES", glsym_func_uchar); + + FINDSYM(glsym_glGetBufferPointervOES, "glGetBufferPointerv", glsym_func_void); + FINDSYM(glsym_glGetBufferPointervOES, "glGetBufferPointervEXT", glsym_func_void); + FINDSYM(glsym_glGetBufferPointervOES, "glGetBufferPointervARB", glsym_func_void); + FINDSYM(glsym_glGetBufferPointervOES, "glGetBufferPointervOES", glsym_func_void); + + if (glsym_glMapBufferOES) _gl_ext_entries[1].supported = 1; + + /* GL_OES_texture_3D */ + FINDSYM(glsym_glTexImage3DOES, "glTexImage3D", glsym_func_void); + FINDSYM(glsym_glTexImage3DOES, "glTexImage3DEXT", glsym_func_void); + FINDSYM(glsym_glTexImage3DOES, "glTexImage3DARB", glsym_func_void); + FINDSYM(glsym_glTexImage3DOES, "glTexImage3DOES", glsym_func_void); + + FINDSYM(glsym_glTexSubImage3DOES, "glTexSubImage3D", glsym_func_void); + FINDSYM(glsym_glTexSubImage3DOES, "glTexSubImage3DEXT", glsym_func_void); + FINDSYM(glsym_glTexSubImage3DOES, "glTexSubImage3DARB", glsym_func_void); + FINDSYM(glsym_glTexSubImage3DOES, "glTexSubImage3DOES", glsym_func_void); + + FINDSYM(glsym_glCopyTexSubImage3DOES, "glCopyTexSubImage3D", glsym_func_void); + FINDSYM(glsym_glCopyTexSubImage3DOES, "glCopyTexSubImage3DARB", glsym_func_void); + FINDSYM(glsym_glCopyTexSubImage3DOES, "glCopyTexSubImage3DEXT", glsym_func_void); + FINDSYM(glsym_glCopyTexSubImage3DOES, "glCopyTexSubImage3DOES", glsym_func_void); + + FINDSYM(glsym_glCompressedTexImage3DOES, "glCompressedTexImage3D", glsym_func_void); + FINDSYM(glsym_glCompressedTexImage3DOES, "glCompressedTexImage3DARB", glsym_func_void); + FINDSYM(glsym_glCompressedTexImage3DOES, "glCompressedTexImage3DEXT", glsym_func_void); + FINDSYM(glsym_glCompressedTexImage3DOES, "glCompressedTexImage3DOES", glsym_func_void); + + FINDSYM(glsym_glCompressedTexSubImage3DOES, "glCompressedTexSubImage3D", glsym_func_void); + FINDSYM(glsym_glCompressedTexSubImage3DOES, "glCompressedTexSubImage3DARB", glsym_func_void); + FINDSYM(glsym_glCompressedTexSubImage3DOES, "glCompressedTexSubImage3DEXT", glsym_func_void); + FINDSYM(glsym_glCompressedTexSubImage3DOES, "glCompressedTexSubImage3DOES", glsym_func_void); + + FINDSYM(glsym_glFramebufferTexture3DOES, "glFramebufferTexture3D", glsym_func_void); + FINDSYM(glsym_glFramebufferTexture3DOES, "glFramebufferTexture3DARB", glsym_func_void); + FINDSYM(glsym_glFramebufferTexture3DOES, "glFramebufferTexture3DEXT", glsym_func_void); + FINDSYM(glsym_glFramebufferTexture3DOES, "glFramebufferTexture3DOES", glsym_func_void); + + if (glsym_glTexSubImage3DOES) _gl_ext_entries[2].supported = 1; + + /* AMD_performance_monitor */ + FINDSYM(glsym_glGetPerfMonitorGroupsAMD, "glGetPerfMonitorGroupsAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorCountersAMD, "glGetPerfMonitorCountersAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorGroupStringAMD, "glGetPerfMonitorGroupStringAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorCounterStringAMD, "glGetPerfMonitorCounterStringAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorCounterInfoAMD, "glGetPerfMonitorCounterInfoAMD", glsym_func_void); + FINDSYM(glsym_glGenPerfMonitorsAMD, "glGenPerfMonitorsAMD", glsym_func_void); + FINDSYM(glsym_glDeletePerfMonitorsAMD, "glDeletePerfMonitorsAMD", glsym_func_void); + FINDSYM(glsym_glSelectPerfMonitorCountersAMD, "glSelectPerfMonitorCountersAMD", glsym_func_void); + FINDSYM(glsym_glBeginPerfMonitorAMD, "glBeginPerfMonitorAMD", glsym_func_void); + FINDSYM(glsym_glEndPerfMonitorAMD, "glEndPerfMonitorAMD", glsym_func_void); + FINDSYM(glsym_glGetPerfMonitorCounterDataAMD, "glGetPerfMonitorCounterDataAMD", glsym_func_void); + + if (glsym_glGetPerfMonitorGroupsAMD) _gl_ext_entries[3].supported = 1; + + /* GL_EXT_discard_framebuffer */ + FINDSYM(glsym_glDiscardFramebufferEXT, "glDiscardFramebuffer", glsym_func_void); + FINDSYM(glsym_glDiscardFramebufferEXT, "glDiscardFramebufferARB", glsym_func_void); + FINDSYM(glsym_glDiscardFramebufferEXT, "glDiscardFramebufferEXT", glsym_func_void); + + if (glsym_glDiscardFramebufferEXT) _gl_ext_entries[4].supported = 1; + + /* GL_EXT_multi_draw_arrays */ + FINDSYM(glsym_glMultiDrawArraysEXT, "glMultiDrawArrays", glsym_func_void); + FINDSYM(glsym_glMultiDrawArraysEXT, "glMultiDrawArraysARB", glsym_func_void); + FINDSYM(glsym_glMultiDrawArraysEXT, "glMultiDrawArraysEXT", glsym_func_void); + + FINDSYM(glsym_glMultiDrawElementsEXT, "glMultiDrawElements", glsym_func_void); + FINDSYM(glsym_glMultiDrawElementsEXT, "glMultiDrawElementsARB", glsym_func_void); + FINDSYM(glsym_glMultiDrawElementsEXT, "glMultiDrawElementsEXT", glsym_func_void); + + if (glsym_glMultiDrawArraysEXT) _gl_ext_entries[5].supported = 1; + + /* GL_NV_fence */ + FINDSYM(glsym_glDeleteFencesNV, "glDeleteFencesNV", glsym_func_void); + FINDSYM(glsym_glGenFencesNV, "glGenFencesNV", glsym_func_void); + FINDSYM(glsym_glIsFenceNV, "glIsFenceNV", glsym_func_uchar); + FINDSYM(glsym_glTestFenceNV, "glTestFenceNV", glsym_func_uchar); + FINDSYM(glsym_glGetFenceivNV, "glGetFenceivNV", glsym_func_void); + FINDSYM(glsym_glFinishFenceNV, "glFinishFenceNV", glsym_func_void); + FINDSYM(glsym_glSetFenceNV, "glSetFenceNV", glsym_func_void); + + if (glsym_glDeleteFencesNV) _gl_ext_entries[6].supported = 1; + + /* GL_QCOM_driver_control */ + FINDSYM(glsym_glGetDriverControlsQCOM, "glGetDriverControlsQCOM", glsym_func_void); + FINDSYM(glsym_glGetDriverControlStringQCOM, "glGetDriverControlStringQCOM", glsym_func_void); + FINDSYM(glsym_glEnableDriverControlQCOM, "glEnableDriverControlQCOM", glsym_func_void); + FINDSYM(glsym_glDisableDriverControlQCOM, "glDisableDriverControlQCOM", glsym_func_void); + + if (glsym_glGetDriverControlsQCOM) _gl_ext_entries[7].supported = 1; + + /* GL_QCOM_extended_get */ + FINDSYM(glsym_glExtGetTexturesQCOM, "glExtGetTexturesQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetBuffersQCOM, "glExtGetBuffersQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetRenderbuffersQCOM, "glExtGetRenderbuffersQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetFramebuffersQCOM, "glExtGetFramebuffersQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetTexLevelParameterivQCOM, "glExtGetTexLevelParameterivQCOM", glsym_func_void); + FINDSYM(glsym_glExtTexObjectStateOverrideiQCOM, "glExtTexObjectStateOverrideiQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetTexSubImageQCOM, "glExtGetTexSubImageQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetBufferPointervQCOM, "glExtGetBufferPointervQCOM", glsym_func_void); + + if (glsym_glExtGetTexturesQCOM) _gl_ext_entries[8].supported = 1; + + /* GL_QCOM_extended_get2 */ + FINDSYM(glsym_glExtGetShadersQCOM, "glExtGetShadersQCOM", glsym_func_void); + FINDSYM(glsym_glExtGetProgramsQCOM, "glExtGetProgramsQCOM", glsym_func_void); + FINDSYM(glsym_glExtIsProgramBinaryQCOM, "glExtIsProgramBinaryQCOM", glsym_func_uchar); + FINDSYM(glsym_glExtGetProgramBinarySourceQCOM, "glExtGetProgramBinarySourceQCOM", glsym_func_void); + + if (glsym_glExtGetShadersQCOM) _gl_ext_entries[9].supported = 1; +} + +static void +_extensions_init(Render_Engine *re) +{ + int i; + const char *glexts, *evasglexts; + + memset(_gl_ext_string, 0, 1024); + memset(_evasgl_ext_string, 0, 1024); + + // GLES 2.0 Extensions + glexts = (const char*)glGetString(GL_EXTENSIONS); + + DBG("--------GLES 2.0 Extensions--------"); + for (i = 0; _gl_ext_entries[i].name != NULL; i++) + { + if ( (strstr(glexts, _gl_ext_entries[i].name) != NULL) || + (strstr(glexts, _gl_ext_entries[i].real_name) != NULL) ) + { + _gl_ext_entries[i].supported = 1; + strcat(_gl_ext_string, _gl_ext_entries[i].name); + strcat(_gl_ext_string, " "); + DBG("\t%s", _gl_ext_entries[i].name); + } + + } + DBG(" "); + + // EGL Extensions + evasglexts = glsym_eglQueryString(re->win->egl_disp, EGL_EXTENSIONS); + + DBG("--------EvasGL Extensions----------"); + for (i = 0; _evasgl_ext_entries[i].name != NULL; i++) + { + if ( (strstr(evasglexts, _evasgl_ext_entries[i].name) != NULL) || + (strstr(evasglexts, _evasgl_ext_entries[i].real_name) != NULL) ) + { + _evasgl_ext_entries[i].supported = 1; + strcat(_evasgl_ext_string, _evasgl_ext_entries[i].name); + strcat(_evasgl_ext_string, " "); + DBG("\t%s", _evasgl_ext_entries[i].name); + } + } + DBG(" "); +} + +int _evas_engine_wl_egl_log_dom = -1; + +/* function tables - filled in later (func and parent func) */ +static Evas_Func func, pfunc; + +/* Function table for GL APIs */ +static Evas_GL_API gl_funcs; + +static void * +eng_info(Evas *e) +{ + Evas_Engine_Info_Wayland_Egl *info; + + info = calloc(1, sizeof(Evas_Engine_Info_Wayland_Egl)); + info->magic.magic = rand(); + info->func.best_depth_get = eng_best_depth_get; + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + return info; + e = NULL; +} + +static void +eng_info_free(Evas *e __UNUSED__, void *info) +{ + Evas_Engine_Info_Wayland_Egl *in; +// dont free! why bother? its not worth it +// eina_log_domain_unregister(_evas_engine_GL_X11_log_dom); + in = (Evas_Engine_Info_Wayland_Egl *)info; + free(in); +} + +static int +_re_wincheck(Render_Engine *re) +{ + if (!re) return 0; + if (re->win->surf) return 1; + eng_window_resurf(re->win); + if (!re->win->surf) + { + ERR("GL engine can't re-create window surface!"); + } + return 0; +} + +static void +_re_winfree(Render_Engine *re) +{ + if (!re->win->surf) return; + eng_window_unsurf(re->win); +} + +static Render_Engine_GL_Resource * +_create_internal_glue_resources(void *data) +{ + Render_Engine *re; + Render_Engine_GL_Resource *rsc; + + if (!(re = (Render_Engine *)data)) return NULL; + + rsc = calloc(1, sizeof(Render_Engine_GL_Resource)); + if (!rsc) return NULL; + + // EGL + int context_attrs[3]; + context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; + context_attrs[1] = 2; + context_attrs[2] = EGL_NONE; + + // Create resource surface for EGL + rsc->surface = + eglCreateWindowSurface(re->win->egl_disp, re->win->egl_config, + (EGLNativeWindowType)re->win->win, NULL); + if (!rsc->surface) + { + ERR("Creating internal resource surface failed."); + free(rsc); + return NULL; + } + + // Create a resource context for EGL + rsc->context = + eglCreateContext(re->win->egl_disp, re->win->egl_config, + re->win->egl_context[0], context_attrs); + if (!rsc->context) + { + ERR("Internal Resource Context Creations Failed."); + free(rsc); + return NULL; + } + + // Add to the resource resource list for cleanup + LKL(resource_lock); + resource_list = eina_list_prepend(resource_list, rsc); + LKU(resource_lock); + + // Set the resource in TLS + if (eina_tls_set(resource_key, (void*)rsc) == EINA_FALSE) + { + ERR("Failed setting TLS Resource"); + free(rsc); + return NULL; + } + + return rsc; +} + +static int +_destroy_internal_glue_resources(void *data) +{ + Render_Engine *re = (Render_Engine *)data; + Eina_List *l; + Render_Engine_GL_Resource *rsc; + + // EGL + // Delete the Resources + LKL(resource_lock); + EINA_LIST_FOREACH(resource_list, l, rsc) + { + if (rsc->surface) eglDestroySurface(re->win->egl_disp, rsc->surface); + if (rsc->context) eglDestroyContext(re->win->egl_disp, rsc->context); + free(rsc); + } + eina_list_free(resource_list); + LKU(resource_lock); + + // Destroy TLS + eina_tls_free(resource_key); + + return 1; +} + +static int +eng_setup(Evas *e, void *in) +{ + Render_Engine *re; + Evas_Engine_Info_Wayland_Egl *info; + + info = (Evas_Engine_Info_Wayland_Egl *)in; + if (!e->engine.data.output) + { + re = calloc(1, sizeof(Render_Engine)); + if (!re) return 0; + re->info = info; + re->evas = e; + e->engine.data.output = re; + re->w = e->output.w; + re->h = e->output.h; + + re->win = eng_window_new(re->info->info.display, + re->info->info.surface, + re->info->info.screen, + re->info->info.depth, re->w, re->h, + re->info->indirect, + re->info->info.destination_alpha, + re->info->info.rotation); + if (!re->win) + { + free(re); + e->engine.data.output = NULL; + return 0; + } + + gl_wins++; + if (!initted) + { + evas_common_cpu_init(); + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + + // Initialize TLS + if (eina_tls_new(&resource_key) == EINA_FALSE) + ERR("Error creating tls key"); + + DBG("TLS KEY create... %d", resource_key); + + initted = 1; + } + } + else + { + if (!(re = e->engine.data.output)) return 0; + if (_re_wincheck(re)) + { + if ((re->info->info.display != re->win->disp) || + (re->info->info.surface != re->win->surface) || + (re->info->info.screen != re->win->screen) || + (re->info->info.depth != re->win->depth) || + (re->info->info.destination_alpha != re->win->alpha) || + (re->info->info.rotation != re->win->rot)) + { + int inc = 0; + + /* if we already have a window surface, check for NULL input surface. + * this will mean we are hiding the window and should destroy + * things properly */ + if ((re->win->surface) && (re->info->info.surface = NULL)) + { + if (re->win) + { + eng_window_free(re->win); + gl_wins--; + } + free(re); + e->engine.data.output = NULL; + return 0; + } + + if (re->win) + { + re->win->gl_context->references++; + eng_window_free(re->win); + inc = 1; + gl_wins--; + } + re->w = e->output.w; + re->h = e->output.h; + re->win = eng_window_new(re->info->info.display, + re->info->info.surface, + re->info->info.screen, + re->info->info.depth, + re->w, re->h, + re->info->indirect, + re->info->info.destination_alpha, + re->info->info.rotation); + eng_window_use(re->win); + if (re->win) gl_wins++; + if ((re->win) && (inc)) + re->win->gl_context->references--; + } + else if ((re->win->w != e->output.w) || + (re->win->h != e->output.h)) + { + re->w = e->output.w; + re->h = e->output.h; + re->win->w = e->output.w; + re->win->h = e->output.h; + eng_window_use(re->win); + evas_gl_common_context_resize(re->win->gl_context, + re->win->w, re->win->h, + re->win->rot); + } + } + } + + if (!re->win) + { + free(re); + e->engine.data.output = NULL; + return 0; + } + + if (!e->engine.data.output) + { + if (re->win) + { + eng_window_free(re->win); + gl_wins--; + } + free(re); + e->engine.data.output = NULL; + return 0; + } + re->tb = evas_common_tilebuf_new(re->win->w, re->win->h); + if (!re->tb) + { + if (re->win) + { + eng_window_free(re->win); + gl_wins--; + } + free(re); + e->engine.data.output = NULL; + return 0; + } + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + + if (!e->engine.data.context) + { + e->engine.data.context = + e->engine.func->context_new(e->engine.data.output); + } + + eng_window_use(re->win); + + re->vsync = 0; + _sym_init(); + _extensions_init(re); + + // This is used in extensions. Not pretty but can't get display otherwise. + current_engine = re; + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + + if (re) + { +#if 0 + // Destroy the resource surface + // Only required for EGL case + if (re->surface) + eglDestroySurface(re->win->egl_disp, re->surface); + + // Destroy the resource context + _destroy_internal_context(re, context); +#endif + if (re->win) + { + if ((initted == 1) && (gl_wins == 1)) + _destroy_internal_glue_resources(re); + eng_window_free(re->win); + gl_wins--; + } + evas_common_tilebuf_free(re->tb); + free(re); + } + if ((initted == 1) && (gl_wins == 0)) + { + evas_common_image_shutdown(); + evas_common_font_shutdown(); + initted = 0; + } +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + re->win->w = w; + re->win->h = h; + eng_window_use(re->win); + + if (re->win->win) + wl_egl_window_resize(re->win->win, w, h, 0, 0); + + evas_gl_common_context_resize(re->win->gl_context, w, h, re->win->rot); + evas_common_tilebuf_free(re->tb); + re->tb = evas_common_tilebuf_new(w, h); + if (re->tb) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_resize(re->win->gl_context, re->win->w, re->win->h, re->win->rot); + evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); + + RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, re->win->w, re->win->h); + if ((w <= 0) || (h <= 0)) return; + if (!re->win->draw.redraw) + { +#if 1 + re->win->draw.x1 = x; + re->win->draw.y1 = y; + re->win->draw.x2 = x + w - 1; + re->win->draw.y2 = y + h - 1; +#else + re->win->draw.x1 = 0; + re->win->draw.y1 = 0; + re->win->draw.x2 = re->win->w - 1; + re->win->draw.y2 = re->win->h - 1; +#endif + } + else + { + if (x < re->win->draw.x1) re->win->draw.x1 = x; + if (y < re->win->draw.y1) re->win->draw.y1 = y; + if ((x + w - 1) > re->win->draw.x2) re->win->draw.x2 = x + w - 1; + if ((y + h - 1) > re->win->draw.y2) re->win->draw.y2 = y + h - 1; + } + re->win->draw.redraw = 1; +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_tilebuf_clear(re->tb); +/* re->win->draw.redraw = 0;*/ +// INF("GL: finish update cycle!"); +} + +/* vsync games - not for now though */ +#define VSYNC_TO_SCREEN 1 + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re; + Tilebuf_Rect *rects; + + re = (Render_Engine *)data; + /* get the upate rect surface - return engine data as dummy */ + rects = evas_common_tilebuf_get_render_rects(re->tb); + if (rects) + { + evas_common_tilebuf_free_render_rects(rects); + evas_common_tilebuf_clear(re->tb); + eng_window_use(re->win); + if (!_re_wincheck(re)) return NULL; + evas_gl_common_context_flush(re->win->gl_context); + evas_gl_common_context_newframe(re->win->gl_context); + if (x) *x = 0; + if (y) *y = 0; + if (w) *w = re->win->w; + if (h) *h = re->win->h; + if (cx) *cx = 0; + if (cy) *cy = 0; + if (cw) *cw = re->win->w; + if (ch) *ch = re->win->h; + return re->win->gl_context->def_surface; + } + return NULL; +} + +//#define FRAMECOUNT 1 + +#ifdef FRAMECOUNT +static double +get_time(void) +{ + struct timeval timev; + + gettimeofday(&timev, NULL); + return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000); +} +#endif + +static int safe_native = -1; + +static void +eng_output_redraws_next_update_push(void *data, void *surface __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__) +{ + Render_Engine *re; +#ifdef FRAMECOUNT + static double pt = 0.0; + double ta, tb; +#endif + + re = (Render_Engine *)data; + /* put back update surface.. in this case just unflag redraw */ + if (!_re_wincheck(re)) return; + re->win->draw.redraw = 0; + re->win->draw.drew = 1; + evas_gl_common_context_flush(re->win->gl_context); + if (safe_native == -1) + { + const char *s; + + s = getenv("EVAS_GL_SAFE_NATIVE"); + safe_native = 0; + if (s) + safe_native = atoi(s); + else + { + s = (const char *)glGetString(GL_RENDERER); + if (s) + { + if (strstr(s, "PowerVR SGX 540") || strstr(s, "Mali-400 MP")) + safe_native = 1; + } + } + } + // this is needed to make sure all previous rendering is flushed to + // buffers/surfaces +# ifdef FRAMECOUNT + double t0 = get_time(); + ta = t0 - pt; + pt = t0; +# endif + // previous rendering should be done and swapped + if (!safe_native) eglWaitNative(EGL_CORE_NATIVE_ENGINE); +# ifdef FRAMECOUNT + double t1 = get_time(); + tb = t1 - t0; + printf("... %1.5f -> %1.5f | ", ta, tb); +# endif + if (eglGetError() != EGL_SUCCESS) + { + printf("Error: eglWaitNative(EGL_CORE_NATIVE_ENGINE) fail.\n"); + } +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!_re_wincheck(re)) return; + if (!re->win->draw.drew) return; +//x// printf("frame -> flush\n"); + re->win->draw.drew = 0; + eng_window_use(re->win); + +# ifdef FRAMECOUNT + double t0 = get_time(); +# endif + + if (!re->vsync) + { + if (re->info->vsync) eglSwapInterval(re->win->egl_disp, 1); + else eglSwapInterval(re->win->egl_disp, 0); + re->vsync = 1; + } + + if (re->info->callback.pre_swap) + re->info->callback.pre_swap(re->info->callback.data, re->evas); + + eglSwapBuffers(re->win->egl_disp, re->win->egl_surface[0]); + if (!safe_native) eglWaitGL(); + + if (re->info->callback.post_swap) + re->info->callback.post_swap(re->info->callback.data, re->evas); + + if (eglGetError() != EGL_SUCCESS) + printf("Error: eglSwapBuffers() fail.\n"); + +# ifdef FRAMECOUNT + double t1 = get_time(); + printf("%1.5f\n", t1 - t0); +# endif +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; +} + +static void +eng_output_dump(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_image_image_all_unload(); + evas_common_font_font_all_unload(); + evas_gl_common_image_all_unload(re->win->gl_context); + _re_winfree(re); +} + +static void +eng_context_cutout_add(void *data __UNUSED__, void *context, int x, int y, int w, int h) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +// re->win->gl_context->dc = context; + evas_common_draw_context_add_cutout(context, x, y, w, h); +} + +static void +eng_context_cutout_clear(void *data __UNUSED__, void *context) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +// re->win->gl_context->dc = context; + evas_common_draw_context_clear_cutouts(context); +} + +static void +eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_rect_draw(re->win->gl_context, x, y, w, h); +} + +static void +eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_line_draw(re->win->gl_context, x1, y1, x2, y2); +} + +static void * +eng_polygon_point_add(void *data, void *context __UNUSED__, void *polygon, int x, int y) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_poly_point_add(polygon, x, y); +} + +static void * +eng_polygon_points_clear(void *data, void *context __UNUSED__, void *polygon) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_poly_points_clear(polygon); +} + +static void +eng_polygon_draw(void *data, void *context, void *surface __UNUSED__, void *polygon, int x, int y) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_poly_draw(re->win->gl_context, polygon, x, y); +} + +static int +eng_image_alpha_get(void *data __UNUSED__, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return 1; + im = image; + return im->alpha; +} + +static int +eng_image_colorspace_get(void *data __UNUSED__, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return EVAS_COLORSPACE_ARGB8888; + im = image; + return im->cs.space; +} + +static void +eng_image_mask_create(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *im; + + if (!image) return; + im = image; + if (!im->im->image.data) + evas_cache_image_load_data(&im->im->cache_entry); + if (!im->tex) + im->tex = evas_gl_common_texture_new(im->gc, im->im); +} + + +static void * +eng_image_alpha_set(void *data, void *image, int has_alpha) +{ + Render_Engine *re; + Evas_GL_Image *im; + + re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (im->alpha == has_alpha) return image; + if (im->native.data) + { + im->alpha = has_alpha; + return image; + } + eng_window_use(re->win); + if ((im->tex) && (im->tex->pt->dyn.img)) + { + im->alpha = has_alpha; + im->tex->alpha = im->alpha; + return image; + } + /* FIXME: can move to gl_common */ + if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return im; + if ((has_alpha) && (im->im->cache_entry.flags.alpha)) return image; + else if ((!has_alpha) && (!im->im->cache_entry.flags.alpha)) return image; + if (im->references > 1) + { + Evas_GL_Image *im_new; + + im_new = evas_gl_common_image_new_from_copied_data + (im->gc, im->im->cache_entry.w, im->im->cache_entry.h, + im->im->image.data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im_new) return im; + evas_gl_common_image_free(im); + im = im_new; + } + else + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + return evas_gl_common_image_alpha_set(im, has_alpha ? 1 : 0); +// im->im->cache_entry.flags.alpha = has_alpha ? 1 : 0; +// return image; +} + +static void * +eng_image_border_set(void *data __UNUSED__, void *image, int l __UNUSED__, int r __UNUSED__, int t __UNUSED__, int b __UNUSED__) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; + return image; +} + +static void +eng_image_border_get(void *data __UNUSED__, void *image __UNUSED__, int *l __UNUSED__, int *r __UNUSED__, int *t __UNUSED__, int *b __UNUSED__) +{ +// Render_Engine *re; +// +// re = (Render_Engine *)data; +} + +static char * +eng_image_comment_get(void *data __UNUSED__, void *image, char *key __UNUSED__) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (!im->im) return NULL; + return im->im->info.comment; +} + +static char * +eng_image_format_get(void *data __UNUSED__, void *image) +{ +// Render_Engine *re; + Evas_GL_Image *im; + +// re = (Render_Engine *)data; + im = image; + return NULL; +} + +static void +eng_image_colorspace_set(void *data, void *image, int cspace) +{ + Render_Engine *re; + Evas_GL_Image *im; + + re = (Render_Engine *)data; + if (!image) return; + im = image; + if (im->native.data) return; + /* FIXME: can move to gl_common */ + if (im->cs.space == cspace) return; + eng_window_use(re->win); + evas_cache_image_colorspace(&im->im->cache_entry, cspace); + switch (cspace) + { + case EVAS_COLORSPACE_ARGB8888: + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + im->cs.data = NULL; + im->cs.no_free = 0; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + if (im->tex) evas_gl_common_texture_free(im->tex); + im->tex = NULL; + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + if (im->im->cache_entry.h > 0) + im->cs.data = + calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) * 2); + else + im->cs.data = NULL; + im->cs.no_free = 0; + break; + default: + abort(); + break; + } + im->cs.space = cspace; +} + +///////////////////////////////////////////////////////////////////////// +// +// +typedef struct _Native Native; + +struct _Native +{ + Evas_Native_Surface ns; + struct wl_egl_pixmap *pixmap; + + void *egl_surface; +}; + +// FIXME: this is enabled so updates happen - but its SLOOOOOOOOOOOOOOOW +// (i am sure this is the reason) not to mention seemingly superfluous. but +// i need to enable it for it to work on fglrx at least. havent tried nvidia. +// +// why is this the case? does anyone know? has anyone tried it on other gfx +// drivers? +// +//#define GLX_TEX_PIXMAP_RECREATE 1 + +static void +_native_bind_cb(void *data, void *image) +{ + Evas_GL_Image *im = image; + Native *n = im->native.data; + + if (n->egl_surface) + { + if (glsym_glEGLImageTargetTexture2DOES) + { + glsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, n->egl_surface); + if (eglGetError() != EGL_SUCCESS) + ERR("glEGLImageTargetTexture2DOES() failed."); + } + else + ERR("Try glEGLImageTargetTexture2DOES on EGL with no support"); + } + return; + data = NULL; +} + +static void +_native_unbind_cb(void *data, void *image) +{ + Evas_GL_Image *im = image; + /* Native *n = im->native.data; */ + + /* if (n->ns.type == EVAS_NATIVE_SURFACE_X11) */ + /* { */ + /* // nothing */ + /* } */ + /* else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL) */ + /* { */ + /* glBindTexture(GL_TEXTURE_2D, 0); */ + /* GLERR(__FUNCTION__, __FILE__, __LINE__, ""); */ + /* } */ + return; + data = NULL; +} + +static void +_native_free_cb(void *data, void *image) +{ + Render_Engine *re = data; + Evas_GL_Image *im = image; + Native *n = im->native.data; + uint32_t texid; +// uint32_t pmid, texid; + + /* eina_hash_del(re->win->gl_context->shared->native_pm_hash, &pmid, im); */ + if (n->egl_surface) + { + if (glsym_eglDestroyImage) + { + glsym_eglDestroyImage(re->win->egl_disp, n->egl_surface); + if (eglGetError() != EGL_SUCCESS) + ERR("eglDestroyImage() failed."); + } + else + ERR("Try eglDestroyImage on EGL with no support"); + } + + im->native.data = NULL; + im->native.func.data = NULL; + im->native.func.bind = NULL; + im->native.func.unbind = NULL; + im->native.func.free = NULL; + free(n); +} + +static void * +eng_image_native_set(void *data, void *image, void *native) +{ + Render_Engine *re = (Render_Engine *)data; + Evas_Native_Surface *ns = native; + Evas_GL_Image *im = image, *im2 = NULL; + Native *n = NULL; +// uint32_t pmid; +// uint32_t texid; + unsigned int tex = 0; + unsigned int fbo = 0; + + if (!im) + { + if ((!ns) && (ns->type == EVAS_NATIVE_SURFACE_OPENGL)) + { + im = evas_gl_common_image_new_from_data(re->win->gl_context, + ns->data.opengl.w, + ns->data.opengl.h, + NULL, 1, + EVAS_COLORSPACE_ARGB8888); + } + else + return NULL; + } + + if (ns) + { + /* vis = ns->data.x11.visual; */ + /* pm = ns->data.x11.pixmap; */ + if (im->native.data) + { + Evas_Native_Surface *ens = im->native.data; + /* if ((ens->data.x11.visual == vis) && */ + /* (ens->data.x11.pixmap == pm)) */ + return im; + } + } + if ((!ns) && (!im->native.data)) return im; + + eng_window_use(re->win); + + if (im->native.data) + { + if (im->native.func.free) + im->native.func.free(im->native.func.data, im); + evas_gl_common_image_native_disable(im); + } + + if (!ns) return im; + + /* if (ns->type == EVAS_NATIVE_SURFACE_X11) */ + /* { */ + /* pmid = pm; */ + /* im2 = eina_hash_find(re->win->gl_context->shared->native_pm_hash, &pmid); */ + if (im2 == im) return im; + if (im2) + { + n = im2->native.data; + if (n) + { + evas_gl_common_image_ref(im2); + evas_gl_common_image_free(im); + return im2; + } + } + + im2 = evas_gl_common_image_new_from_data(re->win->gl_context, + im->w, im->h, NULL, im->alpha, + EVAS_COLORSPACE_ARGB8888); + evas_gl_common_image_free(im); + im = im2; + /* if (native) */ + /* { */ + /* n = calloc(1, sizeof(Native)); */ + /* if (n) */ + /* { */ + /* EGLConfig egl_config; */ + /* int config_attrs[20]; */ + /* int num_config, i = 0; */ + + /* eina_hash_add(re->win->gl_context->shared->native_pm_hash, &pmid, im); */ + + /* config_attrs[i++] = EGL_RED_SIZE; */ + /* config_attrs[i++] = 8; */ + /* config_attrs[i++] = EGL_GREEN_SIZE; */ + /* config_attrs[i++] = 8; */ + /* config_attrs[i++] = EGL_BLUE_SIZE; */ + /* config_attrs[i++] = 8; */ + /* config_attrs[i++] = EGL_ALPHA_SIZE; */ + /* config_attrs[i++] = 8; */ + /* config_attrs[i++] = EGL_DEPTH_SIZE; */ + /* config_attrs[i++] = 0; */ + /* config_attrs[i++] = EGL_STENCIL_SIZE; */ + /* config_attrs[i++] = 0; */ + /* config_attrs[i++] = EGL_RENDERABLE_TYPE; */ + /* config_attrs[i++] = EGL_OPENGL_ES2_BIT; */ + /* config_attrs[i++] = EGL_SURFACE_TYPE; */ + /* config_attrs[i++] = EGL_PIXMAP_BIT; */ + /* config_attrs[i++] = EGL_NONE; */ + + /* if (!eglChooseConfig(re->win->egl_disp, config_attrs, */ + /* &egl_config, 1, &num_config)) */ + /* ERR("eglChooseConfig() failed for, num_config = %i", num_config); */ + /* memcpy(&(n->ns), ns, sizeof(Evas_Native_Surface)); */ + /* n->pixmap = pm; */ + /* if (glsym_eglCreateImage) */ + /* n->egl_surface = glsym_eglCreateImage(re->win->egl_disp, */ + /* EGL_NO_CONTEXT, */ + /* EGL_NATIVE_PIXMAP_KHR, */ + /* (void *)pm, */ + /* NULL); */ + /* else */ + /* ERR("Try eglCreateImage on EGL with no support"); */ + /* if (!n->egl_surface) */ + /* ERR("eglCreatePixmapSurface() for 0x%x failed", (unsigned int)pm); */ + /* im->native.yinvert = 1; */ + /* im->native.loose = 0; */ + /* im->native.data = n; */ + /* im->native.func.data = re; */ + /* im->native.func.bind = _native_bind_cb; */ + /* im->native.func.unbind = _native_unbind_cb; */ + /* im->native.func.free = _native_free_cb; */ + /* im->native.target = GL_TEXTURE_2D; */ + /* im->native.mipmap = 0; */ + /* evas_gl_common_image_native_enable(im); */ + /* } */ + /* } */ + return im; +} + +static void * +eng_image_native_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *im = image; + Native *n; + if (!im) return NULL; + n = im->native.data; + if (!n) return NULL; + return &(n->ns); +} + +#if 0 // filtering disabled +static void +eng_image_draw_filtered(void *data, void *context, void *surface, + void *image, Evas_Filter_Info *filter) +{ + Render_Engine *re = data; + + if (!image) return; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + + evas_gl_common_filter_draw(re->win->gl_context, image, filter); +} + +static Filtered_Image * +eng_image_filtered_get(void *im, uint8_t *key, size_t keylen) +{ + return evas_gl_common_image_filtered_get(im, key, keylen); +} + +static Filtered_Image * +eng_image_filtered_save(void *im, void *fim, uint8_t *key, size_t keylen) +{ + return evas_gl_common_image_filtered_save(im, fim, key, keylen); +} + +static void +eng_image_filtered_free(void *im, Filtered_Image *fim) +{ + evas_gl_common_image_filtered_free(im, fim); +} +#endif + +static void * +eng_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + *error = EVAS_LOAD_ERROR_NONE; + eng_window_use(re->win); + return evas_gl_common_image_load(re->win->gl_context, file, key, lo, error); +} + +static void * +eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + return evas_gl_common_image_new_from_data(re->win->gl_context, w, h, image_data, alpha, cspace); +} + +static void * +eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + return evas_gl_common_image_new_from_copied_data(re->win->gl_context, w, h, image_data, alpha, cspace); +} + +static void +eng_image_free(void *data, void *image) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!image) return; + eng_window_use(re->win); + evas_gl_common_image_free(image); +} + +static void +eng_image_size_get(void *data __UNUSED__, void *image, int *w, int *h) +{ + if (!image) + { + *w = 0; + *h = 0; + return; + } + if (w) *w = ((Evas_GL_Image *)image)->w; + if (h) *h = ((Evas_GL_Image *)image)->h; +} + +static void * +eng_image_size_set(void *data, void *image, int w, int h) +{ + Render_Engine *re; + Evas_GL_Image *im = image; + Evas_GL_Image *im_old; + + re = (Render_Engine *)data; + if (!im) return NULL; + if (im->native.data) + { + im->w = w; + im->h = h; + return image; + } + eng_window_use(re->win); + if ((im->tex) && (im->tex->pt->dyn.img)) + { + evas_gl_common_texture_free(im->tex); + im->tex = NULL; + im->w = w; + im->h = h; + im->tex = evas_gl_common_texture_dynamic_new(im->gc, im); + return image; + } + im_old = image; + + switch (eng_image_colorspace_get(data, image)) + { + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + w &= ~0x1; + break; + } + + if ((im_old) && + ((int)im_old->im->cache_entry.w == w) && + ((int)im_old->im->cache_entry.h == h)) + return image; + if (im_old) + { + im = evas_gl_common_image_new(re->win->gl_context, w, h, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + /* + evas_common_load_image_data_from_file(im_old->im); + if (im_old->im->image->data) + { + evas_common_blit_rectangle(im_old->im, im->im, 0, 0, w, h, 0, 0); + evas_common_cpu_end_opt(); + } + */ + evas_gl_common_image_free(im_old); + } + else + im = evas_gl_common_image_new(re->win->gl_context, w, h, 1, EVAS_COLORSPACE_ARGB8888); + return im; +} + +static void * +eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h) +{ + Render_Engine *re; + Evas_GL_Image *im = image; + + re = (Render_Engine *)data; + if (!image) return NULL; + if (im->native.data) return image; + eng_window_use(re->win); + evas_gl_common_image_dirty(image, x, y, w, h); + return image; +} + +static void * +eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, int *err) +{ + Render_Engine *re; + Evas_GL_Image *im; + int error; + + re = (Render_Engine *)data; + if (!image) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_GENERIC; + return NULL; + } + im = image; + if (im->native.data) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_NONE; + return im; + } + + eng_window_use(re->win); + + if ((im->tex) && (im->tex->pt) && (im->tex->pt->dyn.img) && (im->cs.space == EVAS_COLORSPACE_ARGB8888)) + { + if (im->tex->pt->dyn.checked_out > 0) + { + im->tex->pt->dyn.checked_out++; + *image_data = im->tex->pt->dyn.data; + if (err) *err = EVAS_LOAD_ERROR_NONE; + return im; + } + *image_data = im->tex->pt->dyn.data = glsym_eglMapImageSEC(re->win->egl_disp, im->tex->pt->dyn.img); + + if (!im->tex->pt->dyn.data) + { + if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + GLERR(__FUNCTION__, __FILE__, __LINE__, ""); + return im; + } + im->tex->pt->dyn.checked_out++; + + if (err) *err = EVAS_LOAD_ERROR_NONE; + return im; + } + + /* Engine can fail to create texture after cache drop like eng_image_content_hint_set function, + so it is need to add code which check im->im's NULL value*/ + + if (!im->im) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return NULL; + } + + error = evas_cache_image_load_data(&im->im->cache_entry); + switch (im->cs.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (to_write) + { + if (im->references > 1) + { + Evas_GL_Image *im_new; + + im_new = evas_gl_common_image_new_from_copied_data + (im->gc, im->im->cache_entry.w, im->im->cache_entry.h, + im->im->image.data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im_new) + { + *image_data = NULL; + if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + return NULL; + } + evas_gl_common_image_free(im); + im = im_new; + } + else + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + } + *image_data = im->im->image.data; + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + *image_data = im->cs.data; + break; + default: + abort(); + break; + } + if (err) *err = error; + return im; +} + +static void * +eng_image_data_put(void *data, void *image, DATA32 *image_data) +{ + Render_Engine *re; + Evas_GL_Image *im, *im2; + + re = (Render_Engine *)data; + if (!image) return NULL; + im = image; + if (im->native.data) return image; + eng_window_use(re->win); + if ((im->tex) && (im->tex->pt) + && (im->tex->pt->dyn.data) + && (im->cs.space == EVAS_COLORSPACE_ARGB8888)) + { + int w, h; + + if (im->tex->pt->dyn.data == image_data) + { + im->tex->pt->dyn.checked_out--; + if (im->tex->pt->dyn.checked_out == 0) + glsym_eglUnmapImageSEC(re->win->egl_disp, im->tex->pt->dyn.img); + return image; + } + + w = im->im->cache_entry.w; + h = im->im->cache_entry.h; + im2 = eng_image_new_from_data(data, w, h, image_data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im2) return im; + evas_gl_common_image_free(im); + im = im2; + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + return im; + } + switch (im->cs.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (image_data != im->im->image.data) + { + int w, h; + + w = im->im->cache_entry.w; + h = im->im->cache_entry.h; + im2 = eng_image_new_from_data(data, w, h, image_data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im2) return im; + evas_gl_common_image_free(im); + im = im2; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + case EVAS_COLORSPACE_YCBCR422P709_PL: + case EVAS_COLORSPACE_YCBCR422601_PL: + case EVAS_COLORSPACE_YCBCR420NV12601_PL: + case EVAS_COLORSPACE_YCBCR420TM12601_PL: + if (image_data != im->cs.data) + { + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + im->cs.data = image_data; + } + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + break; + default: + abort(); + break; + } + return im; +} + +static void +eng_image_data_preload_request(void *data __UNUSED__, void *image, const void *target) +{ + Evas_GL_Image *gim = image; + RGBA_Image *im; + + if (!gim) return; + if (gim->native.data) return; + im = (RGBA_Image *)gim->im; + if (!im) return; + evas_cache_image_preload_data(&im->cache_entry, target); +} + +static void +eng_image_data_preload_cancel(void *data __UNUSED__, void *image, const void *target) +{ + Evas_GL_Image *gim = image; + RGBA_Image *im; + + if (!gim) return; + if (gim->native.data) return; + im = (RGBA_Image *)gim->im; + if (!im) return; + evas_cache_image_preload_cancel(&im->cache_entry, target); +} + +static void +eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + if (!image) return; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + evas_gl_common_image_draw(re->win->gl_context, image, + src_x, src_y, src_w, src_h, + dst_x, dst_y, dst_w, dst_h, + smooth); +} + +static void +eng_image_scale_hint_set(void *data __UNUSED__, void *image, int hint) +{ + if (image) evas_gl_common_image_scale_hint_set(image, hint); +} + +static int +eng_image_scale_hint_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + if (!gim) return EVAS_IMAGE_SCALE_HINT_NONE; + return gim->scale_hint; +} + +static void +eng_image_map_draw(void *data, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level) +{ + Evas_GL_Image *gim = image; + Render_Engine *re; + + re = (Render_Engine *)data; + if (!image) return; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + if (npoints != 4) + { + // FIXME: nash - you didn't fix this + abort(); + } + if ((p[0].x == p[3].x) && + (p[1].x == p[2].x) && + (p[0].y == p[1].y) && + (p[3].y == p[2].y) && + (p[0].x <= p[1].x) && + (p[0].y <= p[2].y) && + (p[0].u == 0) && + (p[0].v == 0) && + (p[1].u == (gim->w << FP)) && + (p[1].v == 0) && + (p[2].u == (gim->w << FP)) && + (p[2].v == (gim->h << FP)) && + (p[3].u == 0) && + (p[3].v == (gim->h << FP)) && + (p[0].col == 0xffffffff) && + (p[1].col == 0xffffffff) && + (p[2].col == 0xffffffff) && + (p[3].col == 0xffffffff)) + { + int dx, dy, dw, dh; + + dx = p[0].x >> FP; + dy = p[0].y >> FP; + dw = (p[2].x >> FP) - dx; + dh = (p[2].y >> FP) - dy; + eng_image_draw(data, context, surface, image, + 0, 0, gim->w, gim->h, dx, dy, dw, dh, smooth); + } + else + { + evas_gl_common_image_map_draw(re->win->gl_context, image, npoints, p, + smooth, level); + } +} + +static void * +eng_image_map_surface_new(void *data, int w, int h, int alpha) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + return evas_gl_common_image_surface_new(re->win->gl_context, w, h, alpha); +} + +static void +eng_image_map_surface_free(void *data __UNUSED__, void *surface) +{ + evas_gl_common_image_free(surface); +} + +static void +eng_image_content_hint_set(void *data __UNUSED__, void *image, int hint) +{ + if (image) evas_gl_common_image_content_hint_set(image, hint); +} + +static int +eng_image_content_hint_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + if (!gim) return EVAS_IMAGE_CONTENT_HINT_NONE; + return gim->content_hint; +} + +static void +eng_image_cache_flush(void *data) +{ + Render_Engine *re; + int tmp_size; + + re = (Render_Engine *)data; + + tmp_size = evas_common_image_get_cache(); + evas_common_image_set_cache(0); + evas_common_rgba_image_scalecache_flush(); + evas_gl_common_image_cache_flush(re->win->gl_context); + evas_common_image_set_cache(tmp_size); +} + +static void +eng_image_cache_set(void *data, int bytes) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + evas_common_image_set_cache(bytes); + evas_common_rgba_image_scalecache_size_set(bytes); + evas_gl_common_image_cache_flush(re->win->gl_context); +} + +static int +eng_image_cache_get(void *data __UNUSED__) +{ + return evas_common_image_get_cache(); +} + +static void +eng_image_stride_get(void *data __UNUSED__, void *image, int *stride) +{ + Evas_GL_Image *im = image; + + if ((im->tex) && (im->tex->pt->dyn.img)) + *stride = im->tex->pt->dyn.stride; + else + *stride = im->w * 4; +} + +static void +eng_font_draw(void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w __UNUSED__, int h __UNUSED__, int ow __UNUSED__, int oh __UNUSED__, const Evas_Text_Props *intl_props) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + eng_window_use(re->win); + evas_gl_common_context_target_surface_set(re->win->gl_context, surface); + re->win->gl_context->dc = context; + { + // FIXME: put im into context so we can free it + static RGBA_Image *im = NULL; + + if (!im) + im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + im->cache_entry.w = re->win->w; + im->cache_entry.h = re->win->h; + evas_common_draw_context_font_ext_set(context, + re->win->gl_context, + evas_gl_font_texture_new, + evas_gl_font_texture_free, + evas_gl_font_texture_draw); + evas_common_font_draw(im, context, (RGBA_Font *) font, x, y, + intl_props); + evas_common_draw_context_font_ext_set(context, NULL, NULL, NULL, NULL); + } +} + +static Eina_Bool +eng_canvas_alpha_get(void *data, void *info __UNUSED__) +{ + Render_Engine *re = (Render_Engine *)data; + return re->win->alpha; +} + +static int +_set_internal_config(Render_Engine_GL_Surface *sfc, Evas_GL_Config *cfg) +{ + // Also initialize pixel format here as well... + switch(cfg->color_format) + { + case EVAS_GL_RGB_888: + sfc->rt_fmt = GL_RGB; + sfc->rt_internal_fmt = GL_RGB; + break; + case EVAS_GL_RGBA_8888: + sfc->rt_fmt = GL_RGBA; + sfc->rt_internal_fmt = GL_RGBA; + break; + default: + ERR("Invalid Color Format!"); + return 0; + } + + switch(cfg->depth_bits) + { + case EVAS_GL_DEPTH_NONE: + break; + case EVAS_GL_DEPTH_BIT_8: + case EVAS_GL_DEPTH_BIT_16: + case EVAS_GL_DEPTH_BIT_24: + // 24 bit doesn't work... just cover it with 16 for now.. + sfc->rb_depth_fmt = GL_DEPTH_COMPONENT16; + break; + case EVAS_GL_DEPTH_BIT_32: + default: + ERR("Unsupported Depth Bits Format!"); + return 0; + } + + switch(cfg->stencil_bits) + { + case EVAS_GL_STENCIL_NONE: + break; + case EVAS_GL_STENCIL_BIT_1: + case EVAS_GL_STENCIL_BIT_2: + case EVAS_GL_STENCIL_BIT_4: + case EVAS_GL_STENCIL_BIT_8: + sfc->rb_stencil_fmt = GL_STENCIL_INDEX8; + break; + case EVAS_GL_STENCIL_BIT_16: + default: + ERR("Unsupported Stencil Bits Format!"); + return 0; + } + + // Do Packed Depth24_Stencil8 Later... + + return 1; +} + +static int +_create_rt_buffers(Render_Engine *data __UNUSED__, + Render_Engine_GL_Surface *sfc) +{ + // Render Target texture + glGenTextures(1, &sfc->rt_tex ); + + // Depth RenderBuffer - Create storage here... + if (sfc->depth_bits != EVAS_GL_DEPTH_NONE) + glGenRenderbuffers(1, &sfc->rb_depth); + + // Stencil RenderBuffer - Create Storage here... + if (sfc->stencil_bits != EVAS_GL_STENCIL_NONE) + glGenRenderbuffers(1, &sfc->rb_stencil); + + return 1; +} + +static int +_attach_fbo_surface(Render_Engine *data __UNUSED__, + Render_Engine_GL_Surface *sfc, + Render_Engine_GL_Context *ctx) +{ + int fb_status; + + // Initialize Texture + glBindTexture(GL_TEXTURE_2D, sfc->rt_tex ); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, sfc->w, sfc->h, 0, + GL_RGBA, GL_UNSIGNED_BYTE, NULL); + glBindTexture(GL_TEXTURE_2D, 0); + + + // Attach texture to FBO + glBindFramebuffer(GL_FRAMEBUFFER, ctx->context_fbo); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, sfc->rt_tex, 0); + + // Depth RenderBuffer - Attach it to FBO + if (sfc->depth_bits != EVAS_GL_DEPTH_NONE) + { + glBindRenderbuffer(GL_RENDERBUFFER, sfc->rb_depth); + glRenderbufferStorage(GL_RENDERBUFFER, sfc->rb_depth_fmt, + sfc->w, sfc->h); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, + GL_RENDERBUFFER, sfc->rb_depth); + glBindRenderbuffer(GL_RENDERBUFFER, 0); + } + + // Stencil RenderBuffer - Attach it to FBO + if (sfc->stencil_bits != EVAS_GL_STENCIL_NONE) + { + glBindRenderbuffer(GL_RENDERBUFFER, sfc->rb_stencil); + glRenderbufferStorage(GL_RENDERBUFFER, sfc->rb_stencil_fmt, + sfc->w, sfc->h); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, + GL_RENDERBUFFER, sfc->rb_stencil); + glBindRenderbuffer(GL_RENDERBUFFER, 0); + } + + // Check FBO for completeness + fb_status = glCheckFramebufferStatus(GL_FRAMEBUFFER); + if (fb_status != GL_FRAMEBUFFER_COMPLETE) + { + ERR("FBO not complete!"); + return 0; + } + + return 1; +} + + +static void * +eng_gl_surface_create(void *data, void *config, int w, int h) +{ + Render_Engine *re; + Render_Engine_GL_Surface *sfc; + Render_Engine_GL_Resource *rsc; + Evas_GL_Config *cfg; + int ret; + + sfc = calloc(1, sizeof(Render_Engine_GL_Surface)); + if (!sfc) return NULL; + + re = (Render_Engine *)data; + cfg = (Evas_GL_Config *)config; + + sfc->initialized = 0; + sfc->fbo_attached = 0; + sfc->w = w; + sfc->h = h; + sfc->depth_bits = cfg->depth_bits; + sfc->stencil_bits = cfg->stencil_bits; + sfc->rt_tex = 0; + sfc->rb_depth = 0; + sfc->rb_stencil = 0; + + // Set the internal format based on the config + if (!_set_internal_config(sfc, cfg)) + { + ERR("Unsupported Format!"); + free(sfc); + return NULL; + } + + // Create internal resource context if it hasn't been created already + if ((rsc = eina_tls_get(resource_key)) == NULL) + { + if ((rsc = _create_internal_glue_resources(re)) == NULL) + { + ERR("Error creating internal resources."); + free(sfc); + return NULL; + } + } + + // I'm using evas's original context to create the render target texture + // This is to prevent awkwardness in using native_surface_get() function + // If the rt texture creation is deferred till the context is created and + // make_current called, the user can't call native_surface_get() right + // after the surface is created. hence this is done here using evas' context. + ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, rsc->surface, rsc->context); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + free(sfc); + return NULL; + } + + // Create Render texture + if (!_create_rt_buffers(re, sfc)) + { + ERR("_create_rt_buffers() failed."); + free(sfc); + return NULL; + } + + ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + free(sfc); + return NULL; + } + + return sfc; +} + +static int +eng_gl_surface_destroy(void *data, void *surface) +{ + Render_Engine *re; + Render_Engine_GL_Surface *sfc; + Render_Engine_GL_Resource *rsc; + int ret; + + re = (Render_Engine *)data; + sfc = (Render_Engine_GL_Surface*)surface; + + if (!sfc) return 0; + + if ((rsc = eina_tls_get(resource_key)) == EINA_FALSE) return 0; + + ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, rsc->surface, rsc->context); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + + // Delete FBO/RBO and Texture here + if (sfc->rt_tex) + glDeleteTextures(1, &sfc->rt_tex); + + if (sfc->rb_depth) + glDeleteRenderbuffers(1, &sfc->rb_depth); + + if (sfc->rb_stencil) + glDeleteRenderbuffers(1, &sfc->rb_stencil); + + ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + free(sfc); + return 0; + } + + free(sfc); + surface = NULL; + + return 1; +} + +static void * +eng_gl_context_create(void *data, void *share_context) +{ + Render_Engine *re; + Render_Engine_GL_Context *ctx; + Render_Engine_GL_Context *share_ctx; + int context_attrs[3]; + + ctx = calloc(1, sizeof(Render_Engine_GL_Context)); + + if (!ctx) return NULL; + + re = (Render_Engine *)data; + share_ctx = (Render_Engine_GL_Context *)share_context; + + // Set the share context to Evas' GL context if share_context is NULL. + // Otherwise set it to the given share_context. + + // EGL + context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; + context_attrs[1] = 2; + context_attrs[2] = EGL_NONE; + + if (share_ctx) + { + ctx->context = eglCreateContext(re->win->egl_disp, + re->win->egl_config, + share_ctx->context, // Share Context + context_attrs); + } + else + { + ctx->context = eglCreateContext(re->win->egl_disp, + re->win->egl_config, + re->win->egl_context[0], // Evas' GL Context + context_attrs); + } + + if (!ctx->context) + { + ERR("eglCreateContext() fail. code=%#x", eglGetError()); + return NULL; + } + + ctx->initialized = 0; + ctx->context_fbo = 0; + ctx->current_sfc = NULL; + + return ctx; +} + +static int +eng_gl_context_destroy(void *data, void *context) +{ + Render_Engine *re; + Render_Engine_GL_Context *ctx; + Render_Engine_GL_Resource *rsc; + int ret; + + re = (Render_Engine *)data; + ctx = (Render_Engine_GL_Context*)context; + + if (!ctx) return 0; + + if ((rsc = eina_tls_get(resource_key)) == EINA_FALSE) return 0; + + // 1. Do a make current with the given context + ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, + rsc->surface, ctx->context); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + + // 2. Delete the FBO + if (ctx->context_fbo) + glDeleteFramebuffers(1, &ctx->context_fbo); + + // 3. Destroy the Context + eglDestroyContext(re->win->egl_disp, ctx->context); + + ctx->context = EGL_NO_CONTEXT; + + ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, + EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + + free(ctx); + context = NULL; + + return 1; +} + +static int +eng_gl_make_current(void *data __UNUSED__, void *surface, void *context) +{ + Render_Engine *re; + Render_Engine_GL_Surface *sfc; + Render_Engine_GL_Context *ctx; + int ret = 0; + Render_Engine_GL_Resource *rsc; + + re = (Render_Engine *)data; + sfc = (Render_Engine_GL_Surface*)surface; + ctx = (Render_Engine_GL_Context*)context; + + // Unset surface/context + if ((!sfc) || (!ctx)) + { + ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, + EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + + if (ctx) ctx->current_sfc = NULL; + if (sfc) sfc->current_ctx = NULL; + current_evgl_ctx = NULL; + return 1; + } + + // Do a make current only if it's not already current + if ((rsc = eina_tls_get(resource_key)) == EINA_FALSE) return 0; + + if ((eglGetCurrentContext() != ctx->context) || + (eglGetCurrentSurface(EGL_READ) != rsc->surface) || + (eglGetCurrentSurface(EGL_DRAW) != rsc->surface) ) + { + // Flush remainder of what's in Evas' pipeline + if (re->win) eng_window_use(NULL); + + // Do a make current + ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, + rsc->surface, ctx->context); + if (!ret) + { + ERR("xxxMakeCurrent() failed!"); + return 0; + } + } + + // Create FBO if not already created + if (!ctx->initialized) + { + glGenFramebuffers(1, &ctx->context_fbo); + ctx->initialized = 1; + } + + // Attach FBO if it hasn't been attached or if surface changed + if ((!sfc->fbo_attached) || (ctx->current_sfc != sfc)) + { + if (!_attach_fbo_surface(re, sfc, ctx)) + { + ERR("_attach_fbo_surface() failed."); + return 0; + } + + if (ctx->current_fbo) + // Bind to the previously bound buffer + glBindFramebuffer(GL_FRAMEBUFFER, ctx->current_fbo); + else + // Bind FBO + glBindFramebuffer(GL_FRAMEBUFFER, ctx->context_fbo); + + sfc->fbo_attached = 1; + } + + // Set the current surface/context + ctx->current_sfc = sfc; + sfc->current_ctx = ctx; + current_evgl_ctx = ctx; + + return 1; +} + +static void * +eng_gl_string_query(void *data __UNUSED__, int name) +{ + switch(name) + { + case EVAS_GL_EXTENSIONS: + return (void*)_evasgl_ext_string; + default: + return NULL; + }; +} + +static void * +eng_gl_proc_address_get(void *data __UNUSED__, const char *name) +{ + if (glsym_eglGetProcAddress) return glsym_eglGetProcAddress(name); + return dlsym(RTLD_DEFAULT, name); +} + +static int +eng_gl_native_surface_get(void *data, void *surface, void *native_surface) +{ + Render_Engine *re; + Render_Engine_GL_Surface *sfc; + Evas_Native_Surface *ns; + + re = (Render_Engine *)data; + sfc = (Render_Engine_GL_Surface*)surface; + ns = (Evas_Native_Surface*)native_surface; + + ns->type = EVAS_NATIVE_SURFACE_OPENGL; + ns->version = EVAS_NATIVE_SURFACE_VERSION; + ns->data.opengl.texture_id = sfc->rt_tex; + ns->data.opengl.x = 0; + ns->data.opengl.y = 0; + ns->data.opengl.w = sfc->w; + ns->data.opengl.h = sfc->h; + + return 1; +} + + +static const GLubyte * +evgl_glGetString(GLenum name) +{ + if (name == GL_EXTENSIONS) + return (GLubyte *)_gl_ext_string; //glGetString(GL_EXTENSIONS); + else + return glGetString(name); +} + +static void +evgl_glBindFramebuffer(GLenum target, GLuint framebuffer) +{ + Render_Engine_GL_Context *ctx = current_evgl_ctx; + + // Take care of BindFramebuffer 0 issue + if (framebuffer==0) + { + if (ctx) + { + glBindFramebuffer(target, ctx->context_fbo); + ctx->current_fbo = 0; + } + } + else + { + glBindFramebuffer(target, framebuffer); + + // Save this for restore when doing make current + if (ctx) + ctx->current_fbo = framebuffer; + } +} + +static void +evgl_glBindRenderbuffer(GLenum target, GLuint renderbuffer) +{ + // Add logic to take care when renderbuffer=0 + // On a second thought we don't need this + glBindRenderbuffer(target, renderbuffer); +} + +static void +evgl_glClearDepthf(GLclampf depth) +{ + glClearDepthf(depth); +} + +static void +evgl_glDepthRangef(GLclampf zNear, GLclampf zFar) +{ + glDepthRangef(zNear, zFar); +} + +static void +evgl_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) +{ + glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); +} + +static void +evgl_glReleaseShaderCompiler(void) +{ + glReleaseShaderCompiler(); +} + +static void +evgl_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) +{ + glShaderBinary(n, shaders, binaryformat, binary, length); +} + +//--------------------------------// +//#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) +// EGL Extensions +static void * +evgl_evasglCreateImage(int target, void* buffer, int *attrib_list) +{ + if (current_engine) + { + return glsym_eglCreateImage(current_engine->win->egl_disp, + EGL_NO_CONTEXT, + target, + buffer, + attrib_list); + } + else + { + ERR("Invalid Engine... (Can't acccess EGL Display)\n"); + return NULL; + } +} + +static void +evgl_evasglDestroyImage(EvasGLImage image) +{ + if (current_engine) + glsym_eglDestroyImage(current_engine->win->egl_disp, image); + else + ERR("Invalid Engine... (Can't acccess EGL Display)\n"); +} + +static void +evgl_glEvasGLImageTargetTexture2DOES(GLenum target, EvasGLImage image) +{ + glsym_glEGLImageTargetTexture2DOES(target, image); +} + +static void +evgl_glEvasGLImageTargetRenderbufferStorageOES(GLenum target, EvasGLImage image) +{ + glsym_glEGLImageTargetTexture2DOES(target, image); +} + +//--------------------------------// + + +static void * +eng_gl_api_get(void *data) +{ + Render_Engine *re; + + re = (Render_Engine *)data; + + gl_funcs.version = EVAS_GL_API_VERSION; + +#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, ) + // GLES 2.0 + ORD(glActiveTexture); + ORD(glAttachShader); + ORD(glBindAttribLocation); + ORD(glBindBuffer); + ORD(glBindTexture); + ORD(glBlendColor); + ORD(glBlendEquation); + ORD(glBlendEquationSeparate); + ORD(glBlendFunc); + ORD(glBlendFuncSeparate); + ORD(glBufferData); + ORD(glBufferSubData); + ORD(glCheckFramebufferStatus); + ORD(glClear); + ORD(glClearColor); +// ORD(glClearDepthf); + ORD(glClearStencil); + ORD(glColorMask); + ORD(glCompileShader); + ORD(glCompressedTexImage2D); + ORD(glCompressedTexSubImage2D); + ORD(glCopyTexImage2D); + ORD(glCopyTexSubImage2D); + ORD(glCreateProgram); + ORD(glCreateShader); + ORD(glCullFace); + ORD(glDeleteBuffers); + ORD(glDeleteFramebuffers); + ORD(glDeleteProgram); + ORD(glDeleteRenderbuffers); + ORD(glDeleteShader); + ORD(glDeleteTextures); + ORD(glDepthFunc); + ORD(glDepthMask); +// ORD(glDepthRangef); + ORD(glDetachShader); + ORD(glDisable); + ORD(glDisableVertexAttribArray); + ORD(glDrawArrays); + ORD(glDrawElements); + ORD(glEnable); + ORD(glEnableVertexAttribArray); + ORD(glFinish); + ORD(glFlush); + ORD(glFramebufferRenderbuffer); + ORD(glFramebufferTexture2D); + ORD(glFrontFace); + ORD(glGenBuffers); + ORD(glGenerateMipmap); + ORD(glGenFramebuffers); + ORD(glGenRenderbuffers); + ORD(glGenTextures); + ORD(glGetActiveAttrib); + ORD(glGetActiveUniform); + ORD(glGetAttachedShaders); + ORD(glGetAttribLocation); + ORD(glGetBooleanv); + ORD(glGetBufferParameteriv); + ORD(glGetError); + ORD(glGetFloatv); + ORD(glGetFramebufferAttachmentParameteriv); + ORD(glGetIntegerv); + ORD(glGetProgramiv); + ORD(glGetProgramInfoLog); + ORD(glGetRenderbufferParameteriv); + ORD(glGetShaderiv); + ORD(glGetShaderInfoLog); +// ORD(glGetShaderPrecisionFormat); + ORD(glGetShaderSource); +// ORD(glGetString); + ORD(glGetTexParameterfv); + ORD(glGetTexParameteriv); + ORD(glGetUniformfv); + ORD(glGetUniformiv); + ORD(glGetUniformLocation); + ORD(glGetVertexAttribfv); + ORD(glGetVertexAttribiv); + ORD(glGetVertexAttribPointerv); + ORD(glHint); + ORD(glIsBuffer); + ORD(glIsEnabled); + ORD(glIsFramebuffer); + ORD(glIsProgram); + ORD(glIsRenderbuffer); + ORD(glIsShader); + ORD(glIsTexture); + ORD(glLineWidth); + ORD(glLinkProgram); + ORD(glPixelStorei); + ORD(glPolygonOffset); + ORD(glReadPixels); +// ORD(glReleaseShaderCompiler); + ORD(glRenderbufferStorage); + ORD(glSampleCoverage); + ORD(glScissor); +// ORD(glShaderBinary); + ORD(glShaderSource); + ORD(glStencilFunc); + ORD(glStencilFuncSeparate); + ORD(glStencilMask); + ORD(glStencilMaskSeparate); + ORD(glStencilOp); + ORD(glStencilOpSeparate); + ORD(glTexImage2D); + ORD(glTexParameterf); + ORD(glTexParameterfv); + ORD(glTexParameteri); + ORD(glTexParameteriv); + ORD(glTexSubImage2D); + ORD(glUniform1f); + ORD(glUniform1fv); + ORD(glUniform1i); + ORD(glUniform1iv); + ORD(glUniform2f); + ORD(glUniform2fv); + ORD(glUniform2i); + ORD(glUniform2iv); + ORD(glUniform3f); + ORD(glUniform3fv); + ORD(glUniform3i); + ORD(glUniform3iv); + ORD(glUniform4f); + ORD(glUniform4fv); + ORD(glUniform4i); + ORD(glUniform4iv); + ORD(glUniformMatrix2fv); + ORD(glUniformMatrix3fv); + ORD(glUniformMatrix4fv); + ORD(glUseProgram); + ORD(glValidateProgram); + ORD(glVertexAttrib1f); + ORD(glVertexAttrib1fv); + ORD(glVertexAttrib2f); + ORD(glVertexAttrib2fv); + ORD(glVertexAttrib3f); + ORD(glVertexAttrib3fv); + ORD(glVertexAttrib4f); + ORD(glVertexAttrib4fv); + ORD(glVertexAttribPointer); + ORD(glViewport); +#undef ORD + +#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, glsym_) + // Extensions + ORD(glGetProgramBinaryOES); + ORD(glProgramBinaryOES); + ORD(glMapBufferOES); + ORD(glUnmapBufferOES); + ORD(glGetBufferPointervOES); + ORD(glTexImage3DOES); + ORD(glTexSubImage3DOES); + ORD(glCopyTexSubImage3DOES); + ORD(glCompressedTexImage3DOES); + ORD(glCompressedTexSubImage3DOES); + ORD(glFramebufferTexture3DOES); + ORD(glGetPerfMonitorGroupsAMD); + ORD(glGetPerfMonitorCountersAMD); + ORD(glGetPerfMonitorGroupStringAMD); + ORD(glGetPerfMonitorCounterStringAMD); + ORD(glGetPerfMonitorCounterInfoAMD); + ORD(glGenPerfMonitorsAMD); + ORD(glDeletePerfMonitorsAMD); + ORD(glSelectPerfMonitorCountersAMD); + ORD(glBeginPerfMonitorAMD); + ORD(glEndPerfMonitorAMD); + ORD(glGetPerfMonitorCounterDataAMD); + ORD(glDiscardFramebufferEXT); + ORD(glMultiDrawArraysEXT); + ORD(glMultiDrawElementsEXT); + ORD(glDeleteFencesNV); + ORD(glGenFencesNV); + ORD(glIsFenceNV); + ORD(glTestFenceNV); + ORD(glGetFenceivNV); + ORD(glFinishFenceNV); + ORD(glSetFenceNV); + ORD(glGetDriverControlsQCOM); + ORD(glGetDriverControlStringQCOM); + ORD(glEnableDriverControlQCOM); + ORD(glDisableDriverControlQCOM); + ORD(glExtGetTexturesQCOM); + ORD(glExtGetBuffersQCOM); + ORD(glExtGetRenderbuffersQCOM); + ORD(glExtGetFramebuffersQCOM); + ORD(glExtGetTexLevelParameterivQCOM); + ORD(glExtTexObjectStateOverrideiQCOM); + ORD(glExtGetTexSubImageQCOM); + ORD(glExtGetBufferPointervQCOM); + ORD(glExtGetShadersQCOM); + ORD(glExtGetProgramsQCOM); + ORD(glExtIsProgramBinaryQCOM); + ORD(glExtGetProgramBinarySourceQCOM); +#undef ORD + +// Override functions wrapped by Evas_GL +#define ORD(f) EVAS_API_OVERRIDE(f, &gl_funcs, evgl_) + ORD(glBindFramebuffer); + ORD(glBindRenderbuffer); + + // GLES2.0 API compat on top of desktop gl + ORD(glClearDepthf); + ORD(glDepthRangef); + ORD(glGetShaderPrecisionFormat); + ORD(glReleaseShaderCompiler); + ORD(glShaderBinary); + + ORD(glGetString); + + // GLES 2.0 Extensions that needs wrapping + ORD(evasglCreateImage); + ORD(evasglDestroyImage); + ORD(glEvasGLImageTargetTexture2DOES); + ORD(glEvasGLImageTargetRenderbufferStorageOES); + +#undef ORD + + return &gl_funcs; +} + +static int +eng_image_load_error_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *im; + + if (!image) return EVAS_LOAD_ERROR_NONE; + im = image; + return im->im->cache_entry.load_error; +} + +static Eina_Bool +eng_image_animated_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return EINA_FALSE; + im = (Image_Entry *)gim->im; + if (!im) return EINA_FALSE; + + return im->flags.animated; +} + +static int +eng_image_animated_frame_count_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return -1; + im = (Image_Entry *)gim->im; + if (!im) return -1; + + if (!im->flags.animated) return -1; + return im->frame_count; +} + +static Evas_Image_Animated_Loop_Hint +eng_image_animated_loop_type_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return EVAS_IMAGE_ANIMATED_HINT_NONE; + im = (Image_Entry *)gim->im; + if (!im) return EVAS_IMAGE_ANIMATED_HINT_NONE; + + if (!im->flags.animated) return EVAS_IMAGE_ANIMATED_HINT_NONE; + return im->loop_hint; +} + +static int +eng_image_animated_loop_count_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return -1; + im = (Image_Entry *)gim->im; + if (!im) return -1; + + if (!im->flags.animated) return -1; + return im->loop_count; +} + +static double +eng_image_animated_frame_duration_get(void *data __UNUSED__, void *image, int start_frame, int frame_num) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return -1; + im = (Image_Entry *)gim->im; + if (!im) return -1; + + if (!im->flags.animated) return -1; + return evas_common_load_rgba_image_frame_duration_from_file(im, start_frame, frame_num); +} + +static Eina_Bool +eng_image_animated_frame_set(void *data __UNUSED__, void *image, int frame_index) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + + if (!gim) return EINA_FALSE; + im = (Image_Entry *)gim->im; + if (!im) return EINA_FALSE; + + if (!im->flags.animated) return EINA_FALSE; + if (im->cur_frame == frame_index) return EINA_FALSE; + + im->cur_frame = frame_index; + return EINA_TRUE; +} + +static Eina_Bool +eng_image_can_region_get(void *data __UNUSED__, void *image) +{ + Evas_GL_Image *gim = image; + Image_Entry *im; + if (!gim) return EINA_FALSE; + im = (Image_Entry *)gim->im; + if (!im) return EINA_FALSE; + return ((Evas_Image_Load_Func*) im->info.loader)->do_region; +} + + +static void +eng_image_max_size_get(void *data, int *maxw, int *maxh) +{ + Render_Engine *re = (Render_Engine *)data; + if (maxw) *maxw = re->win->gl_context->shared->info.max_texture_size; + if (maxh) *maxh = re->win->gl_context->shared->info.max_texture_size; +} + +static int +module_open(Evas_Module *em) +{ + static Eina_Bool xrm_inited = EINA_FALSE; + if (!xrm_inited) + { + xrm_inited = EINA_TRUE; + XrmInitialize(); + } + + if (!em) return 0; + if (!evas_gl_common_module_open()) return 0; + /* get whatever engine module we inherit from */ + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; + if (_evas_engine_wl_egl_log_dom < 0) + { + _evas_engine_wl_egl_log_dom = + eina_log_domain_register("evas-gl_x11", EVAS_DEFAULT_LOG_COLOR); + } + + if (_evas_engine_wl_egl_log_dom < 0) + { + EINA_LOG_ERR("Can not create a module log domain."); + return 0; + } + /* store it for later use */ + func = pfunc; + /* now to override methods */ + #define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(context_cutout_add); + ORD(context_cutout_clear); + ORD(output_flush); + ORD(output_idle_flush); + ORD(output_dump); + ORD(rectangle_draw); + ORD(line_draw); + ORD(polygon_point_add); + ORD(polygon_points_clear); + ORD(polygon_draw); + + ORD(image_load); + ORD(image_new_from_data); + ORD(image_new_from_copied_data); + ORD(image_free); + ORD(image_size_get); + ORD(image_size_set); + ORD(image_dirty_region); + ORD(image_data_get); + ORD(image_data_put); + ORD(image_data_preload_request); + ORD(image_data_preload_cancel); + ORD(image_alpha_set); + ORD(image_alpha_get); + ORD(image_border_set); + ORD(image_border_get); + ORD(image_draw); + ORD(image_comment_get); + ORD(image_format_get); + ORD(image_colorspace_set); + ORD(image_colorspace_get); + ORD(image_can_region_get); + ORD(image_mask_create); + ORD(image_native_set); + ORD(image_native_get); +#if 0 // filtering disabled + ORD(image_draw_filtered); + ORD(image_filtered_get); + ORD(image_filtered_save); + ORD(image_filtered_free); +#endif + + ORD(font_draw); + + ORD(image_scale_hint_set); + ORD(image_scale_hint_get); + ORD(image_stride_get); + + ORD(image_map_draw); + ORD(image_map_surface_new); + ORD(image_map_surface_free); + + ORD(image_content_hint_set); + ORD(image_content_hint_get); + + ORD(image_cache_flush); + ORD(image_cache_set); + ORD(image_cache_get); + + ORD(gl_surface_create); + ORD(gl_surface_destroy); + ORD(gl_context_create); + ORD(gl_context_destroy); + ORD(gl_make_current); + ORD(gl_string_query); + ORD(gl_proc_address_get); + ORD(gl_native_surface_get); + ORD(gl_api_get); + + ORD(image_load_error_get); + + /* now advertise out own api */ + ORD(image_animated_get); + ORD(image_animated_frame_count_get); + ORD(image_animated_loop_type_get); + ORD(image_animated_loop_count_get); + ORD(image_animated_frame_duration_get); + ORD(image_animated_frame_set); + + ORD(image_max_size_get); + + /* now advertise out own api */ + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_engine_wl_egl_log_dom); + evas_gl_common_module_close(); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, "wayland_egl", "none", {module_open, module_close} +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, gl_x11); + +#ifndef EVAS_STATIC_BUILD_GL_XLIB +EVAS_EINA_MODULE_DEFINE(engine, gl_x11); +#endif + +/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/libraries/evas/src/modules/engines/wayland_egl/evas_engine.h b/libraries/evas/src/modules/engines/wayland_egl/evas_engine.h new file mode 100644 index 0000000..204d793 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_egl/evas_engine.h @@ -0,0 +1,82 @@ +#ifndef EVAS_ENGINE_H +#define EVAS_ENGINE_H + +#include "config.h" +#include "evas_common.h" +#include "evas_private.h" +#include "evas_gl_common.h" +#include "Evas.h" +#include "Evas_Engine_Wayland_Egl.h" + +#define GL_GLEXT_PROTOTYPES + +#include +#include +#include +#include + +extern int _evas_engine_wl_egl_log_dom; +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_wl_egl_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_wl_egl_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_wl_egl_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_wl_egl_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_wl_egl_log_dom, __VA_ARGS__) + +typedef struct _Evas_GL_Wl_Window Evas_GL_Wl_Window; + +struct _Evas_GL_Wl_Window +{ + struct wl_display *disp; + struct wl_egl_window *win; + struct wl_surface *surface; + int w, h; + int screen; +// XVisualInfo *visualinfo; +// Visual *visual; +// Colormap colormap; + int depth; + int alpha; + int rot; + Evas_Engine_GL_Context *gl_context; + struct { + int redraw : 1; + int drew : 1; + int x1, y1, x2, y2; + } draw; + EGLContext egl_context[1]; + EGLSurface egl_surface[1]; + EGLConfig egl_config; + EGLDisplay egl_disp; + int surf : 1; +}; + +Evas_GL_Wl_Window *eng_window_new(struct wl_display *disp, struct wl_surface *surface, int screen, + int depth, int w, int h, int indirect, + int alpha, int rot); +void eng_window_free(Evas_GL_Wl_Window *gw); +void eng_window_use(Evas_GL_Wl_Window *gw); +void eng_window_unsurf(Evas_GL_Wl_Window *gw); +void eng_window_resurf(Evas_GL_Wl_Window *gw); + +int eng_best_depth_get(Evas_Engine_Info_Wayland_Egl *einfo); + +#endif diff --git a/libraries/evas/src/modules/engines/wayland_egl/evas_wl_main.c b/libraries/evas/src/modules/engines/wayland_egl/evas_wl_main.c new file mode 100644 index 0000000..537fcc6 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_egl/evas_wl_main.c @@ -0,0 +1,323 @@ +#include "evas_engine.h" + +static Evas_GL_Wl_Window *_evas_gl_wl_window = NULL; + +static EGLContext context = EGL_NO_CONTEXT; + +// fixme: something is up/wrong here - dont know what tho... +//#define NEWGL 1 + +static int win_count = 0; + +Evas_GL_Wl_Window * +eng_window_new(struct wl_display *disp, struct wl_surface *surface, int screen, + int depth, int w, int h, int indirect, int alpha, int rot) +{ + Evas_GL_Wl_Window *gw; + int context_attrs[3]; + int config_attrs[40]; + int major_version, minor_version; + int num_config, n = 0; + const GLubyte *vendor, *renderer, *version; + + gw = calloc(1, sizeof(Evas_GL_Wl_Window)); + if (!gw) return NULL; + + win_count++; + gw->disp = disp; + gw->surface = surface; + gw->screen = screen; + gw->depth = depth; + gw->alpha = alpha; + gw->w = w; + gw->h = h; + gw->rot = rot; + +// EGL / GLES + context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; + context_attrs[1] = 2; + context_attrs[2] = EGL_NONE; + +#if defined(GLES_VARIETY_S3C6410) + if (gw->visualinfo->depth == 16) // 16bpp + { + config_attrs[n++] = EGL_SURFACE_TYPE; + config_attrs[n++] = EGL_WINDOW_BIT; + config_attrs[n++] = EGL_RENDERABLE_TYPE; + config_attrs[n++] = EGL_OPENGL_ES2_BIT; + config_attrs[n++] = EGL_RED_SIZE; + config_attrs[n++] = 5; + config_attrs[n++] = EGL_GREEN_SIZE; + config_attrs[n++] = 6; + config_attrs[n++] = EGL_BLUE_SIZE; + config_attrs[n++] = 5; + config_attrs[n++] = EGL_DEPTH_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_STENCIL_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_NONE; + } + else // 24/32bit. no one does 8bpp anymore. and 15bpp... dead + { + config_attrs[n++] = EGL_SURFACE_TYPE; + config_attrs[n++] = EGL_WINDOW_BIT; + config_attrs[n++] = EGL_RENDERABLE_TYPE; + config_attrs[n++] = EGL_OPENGL_ES2_BIT; + config_attrs[n++] = EGL_RED_SIZE; + config_attrs[n++] = 8; + config_attrs[n++] = EGL_GREEN_SIZE; + config_attrs[n++] = 8; + config_attrs[n++] = EGL_BLUE_SIZE; + config_attrs[n++] = 8; + config_attrs[n++] = EGL_DEPTH_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_STENCIL_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_NONE; + } +#elif defined(GLES_VARIETY_SGX) + config_attrs[n++] = EGL_SURFACE_TYPE; + config_attrs[n++] = EGL_WINDOW_BIT; + config_attrs[n++] = EGL_RENDERABLE_TYPE; + config_attrs[n++] = EGL_OPENGL_ES2_BIT; +# if 0 +// FIXME: n900 - omap3 sgx libs break here + config_attrs[n++] = EGL_RED_SIZE; + config_attrs[n++] = 1; + config_attrs[n++] = EGL_GREEN_SIZE; + config_attrs[n++] = 1; + config_attrs[n++] = EGL_BLUE_SIZE; + config_attrs[n++] = 1; +// FIXME: end n900 breakage +# endif + if (gw->alpha) + { + config_attrs[n++] = EGL_ALPHA_SIZE; + config_attrs[n++] = 1; + } + else + { + config_attrs[n++] = EGL_ALPHA_SIZE; + config_attrs[n++] = 0; + } + config_attrs[n++] = EGL_DEPTH_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_STENCIL_SIZE; + config_attrs[n++] = 0; + config_attrs[n++] = EGL_NONE; +#endif + + gw->egl_disp = eglGetDisplay((EGLNativeDisplayType)(gw->disp)); + if (!gw->egl_disp) + { + ERR("eglGetDisplay() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + if (!eglInitialize(gw->egl_disp, &major_version, &minor_version)) + { + ERR("eglInitialize() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + eglBindAPI(EGL_OPENGL_ES_API); + if (eglGetError() != EGL_SUCCESS) + { + ERR("eglBindAPI() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + + num_config = 0; + if (!eglChooseConfig(gw->egl_disp, config_attrs, &gw->egl_config, + 1, &num_config) || (num_config != 1)) + { + ERR("eglChooseConfig() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + + gw->win = wl_egl_window_create(gw->surface, gw->w, gw->h); + + gw->egl_surface[0] = eglCreateWindowSurface(gw->egl_disp, gw->egl_config, + (EGLNativeWindowType)gw->win, + NULL); + if (gw->egl_surface[0] == EGL_NO_SURFACE) + { + ERR("eglCreateWindowSurface() fail for %#x. code=%#x", + (unsigned int)gw->win, eglGetError()); + eng_window_free(gw); + return NULL; + } + + if (context == EGL_NO_CONTEXT) + context = eglCreateContext(gw->egl_disp, gw->egl_config, NULL, + context_attrs); + gw->egl_context[0] = context; + if (gw->egl_context[0] == EGL_NO_CONTEXT) + { + ERR("eglCreateContext() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + + if (eglMakeCurrent(gw->egl_disp, gw->egl_surface[0], gw->egl_surface[0], + gw->egl_context[0]) == EGL_FALSE) + { + ERR("eglMakeCurrent() fail. code=%#x", eglGetError()); + eng_window_free(gw); + return NULL; + } + + vendor = glGetString(GL_VENDOR); + renderer = glGetString(GL_RENDERER); + version = glGetString(GL_VERSION); + if (!vendor) vendor = (unsigned char *)"-UNKNOWN-"; + if (!renderer) renderer = (unsigned char *)"-UNKNOWN-"; + if (!version) version = (unsigned char *)"-UNKNOWN-"; + if (getenv("EVAS_GL_INFO")) + { + fprintf(stderr, "vendor: %s\n", vendor); + fprintf(stderr, "renderer: %s\n", renderer); + fprintf(stderr, "version: %s\n", version); + } + + gw->gl_context = evas_gl_common_context_new(); + if (!gw->gl_context) + { + eng_window_free(gw); + return NULL; + } + gw->gl_context->egldisp = gw->egl_disp; + eng_window_use(gw); + evas_gl_common_context_resize(gw->gl_context, w, h, rot); + gw->surf = 1; + return gw; + indirect = 0; +} + +void +eng_window_free(Evas_GL_Wl_Window *gw) +{ + int ref = 0; + + win_count--; + eng_window_use(gw); + if (gw == _evas_gl_wl_window) _evas_gl_wl_window = NULL; +// if (gw->win) wl_egl_window_destroy(gw->win); + if (gw->gl_context) + { + ref = gw->gl_context->references - 1; + evas_gl_common_context_free(gw->gl_context); + } + if (gw->egl_surface[0] != EGL_NO_SURFACE) + eglDestroySurface(gw->egl_disp, gw->egl_surface[0]); + eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (ref == 0) + { + if (context) eglDestroyContext(gw->egl_disp, context); + context = EGL_NO_CONTEXT; + eglTerminate(gw->egl_disp); + eglReleaseThread(); + } + free(gw); +} + +void +eng_window_use(Evas_GL_Wl_Window *gw) +{ + Eina_Bool force_use = EINA_FALSE; + + if (_evas_gl_wl_window) + { + if ((eglGetCurrentContext() != + _evas_gl_wl_window->egl_context[0]) || + (eglGetCurrentSurface(EGL_READ) != + _evas_gl_wl_window->egl_surface[0]) || + (eglGetCurrentSurface(EGL_DRAW) != + _evas_gl_wl_window->egl_surface[0])) + force_use = EINA_TRUE; + } + if ((_evas_gl_wl_window != gw) || (force_use)) + { + if (_evas_gl_wl_window) + { + evas_gl_common_context_use(_evas_gl_wl_window->gl_context); + evas_gl_common_context_flush(_evas_gl_wl_window->gl_context); + } + _evas_gl_wl_window = gw; + if (gw) + { + // EGL / GLES + if (gw->egl_surface[0] != EGL_NO_SURFACE) + { + if (eglMakeCurrent(gw->egl_disp, gw->egl_surface[0], + gw->egl_surface[0], + gw->egl_context[0]) == EGL_FALSE) + { + ERR("eglMakeCurrent() failed!"); + } + } + } + } + if (gw) evas_gl_common_context_use(gw->gl_context); +} + +void +eng_window_unsurf(Evas_GL_Wl_Window *gw) +{ + if (!gw->surf) return; + if (!getenv("EVAS_GL_WIN_RESURF")) return; + if (getenv("EVAS_GL_INFO")) printf("unsurf %p\n", gw); + + if (_evas_gl_wl_window) + evas_gl_common_context_flush(_evas_gl_wl_window->gl_context); + if (_evas_gl_wl_window == gw) + { + eglMakeCurrent(gw->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + if (gw->egl_surface[0] != EGL_NO_SURFACE) + eglDestroySurface(gw->egl_disp, gw->egl_surface[0]); + gw->egl_surface[0] = EGL_NO_SURFACE; + _evas_gl_wl_window = NULL; + } + gw->surf = 0; +} + +void +eng_window_resurf(Evas_GL_Wl_Window *gw) +{ + if (gw->surf) return; + if (getenv("EVAS_GL_INFO")) printf("resurf %p\n", gw); + + gw->egl_surface[0] = + eglCreateWindowSurface(gw->egl_disp, gw->egl_config, + (EGLNativeWindowType)gw->win, NULL); + + if (gw->egl_surface[0] == EGL_NO_SURFACE) + { + ERR("eglCreateWindowSurface() fail for %#x. code=%#x", + (unsigned int)gw->win, eglGetError()); + return; + } + if (eglMakeCurrent(gw->egl_disp, gw->egl_surface[0], gw->egl_surface[0], + gw->egl_context[0]) == EGL_FALSE) + { + ERR("eglMakeCurrent() failed!"); + } + gw->surf = 1; +} + +int +eng_best_depth_get(Evas_Engine_Info_Wayland_Egl *einfo) +{ + if (!einfo) return 0; + if (!einfo->info.display) return 0; + return 32; + /* if (!_evas_gl_x11_vi) eng_best_visual_get(einfo); */ + /* if (!_evas_gl_x11_vi) return 0; */ + /* if (einfo->info.destination_alpha) */ + /* { */ + /* if (_evas_gl_x11_rgba_vi) return _evas_gl_x11_rgba_vi->depth; */ + /* } */ + /* return _evas_gl_x11_vi->depth; */ +} diff --git a/libraries/evas/src/modules/engines/wayland_shm/Evas_Engine_Wayland_Shm.h b/libraries/evas/src/modules/engines/wayland_shm/Evas_Engine_Wayland_Shm.h new file mode 100644 index 0000000..b34b2c1 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_shm/Evas_Engine_Wayland_Shm.h @@ -0,0 +1,20 @@ +#ifndef _EVAS_ENGINE_WAYLAND_SHM_H +# define _EVAS_ENGINE_WAYLAND_SHM_H + +typedef struct _Evas_Engine_Info_Wayland_Shm Evas_Engine_Info_Wayland_Shm; +struct _Evas_Engine_Info_Wayland_Shm +{ + Evas_Engine_Info magic; + + struct + { + void *dest; + int rotation; + + unsigned char debug : 1; + } info; + + Evas_Engine_Render_Mode render_mode; +}; + +#endif diff --git a/libraries/evas/src/modules/engines/wayland_shm/Makefile.am b/libraries/evas/src/modules/engines/wayland_shm/Makefile.am new file mode 100644 index 0000000..455b82c --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_shm/Makefile.am @@ -0,0 +1,45 @@ + +MAINTAINERCLEANFILES = Makefile.in + +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_wayland_shm_cflags@ + +if BUILD_ENGINE_WAYLAND_SHM + +WAYLAND_SHM_SOURCES = \ +evas_engine.c \ +evas_outbuf.c + +WAYLAND_SHM_LIBADD = @FREETYPE_LIBS@ @EINA_LIBS@ @evas_engine_wayland_shm_libs@ + +includes_HEADERS = Evas_Engine_Wayland_Shm.h +includesdir = $(includedir)/evas-@VMAJ@ + +if !EVAS_STATIC_BUILD_WAYLAND_SHM + +pkgdir = $(libdir)/evas/modules/engines/wayland_shm/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la + +module_la_SOURCES = $(WAYLAND_SHM_SOURCES) +module_la_LIBADD = $(WAYLAND_SHM_LIBADD) $(top_builddir)/src/lib/libevas.la +module_la_LDFLAGS = -no-undefined -module -avoid-version +module_la_LIBTOOLFLAGS = --tag=disable-static + +else + +noinst_LTLIBRARIES = libevas_engine_wayland_shm.la + +libevas_engine_wayland_shm_la_SOURCES = $(WAYLAND_SHM_SOURCES) +libevas_engine_wayland_shm_la_LIBADD = $(WAYLAND_SHM_LIBADD) + +endif +endif + +EXTRA_DIST = \ +evas_engine.h diff --git a/libraries/evas/src/modules/engines/wayland_shm/Makefile.in b/libraries/evas/src/modules/engines/wayland_shm/Makefile.in new file mode 100644 index 0000000..4d69209 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_shm/Makefile.in @@ -0,0 +1,816 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/modules/engines/wayland_shm +DIST_COMMON = $(am__includes_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ + $(top_srcdir)/m4/efl_coverage.m4 \ + $(top_srcdir)/m4/efl_doxygen.m4 \ + $(top_srcdir)/m4/efl_fnmatch.m4 \ + $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ + $(top_srcdir)/m4/evas_check_engine.m4 \ + $(top_srcdir)/m4/evas_check_loader.m4 \ + $(top_srcdir)/m4/evas_converter.m4 \ + $(top_srcdir)/m4/evas_dither.m4 \ + $(top_srcdir)/m4/evas_scaler.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)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@libevas_engine_wayland_shm_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libevas_engine_wayland_shm_la_SOURCES_DIST = evas_engine.c \ + evas_outbuf.c +@BUILD_ENGINE_WAYLAND_SHM_TRUE@am__objects_1 = evas_engine.lo \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@ evas_outbuf.lo +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am_libevas_engine_wayland_shm_la_OBJECTS = $(am__objects_1) +libevas_engine_wayland_shm_la_OBJECTS = \ + $(am_libevas_engine_wayland_shm_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am_libevas_engine_wayland_shm_la_rpath = +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@module_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@ $(top_builddir)/src/lib/libevas.la +am__module_la_SOURCES_DIST = evas_engine.c evas_outbuf.c +@BUILD_ENGINE_WAYLAND_SHM_TRUE@am__objects_2 = \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@ module_la-evas_engine.lo \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@ module_la-evas_outbuf.lo +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@am_module_la_OBJECTS = $(am__objects_2) +module_la_OBJECTS = $(am_module_la_OBJECTS) +module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@am_module_la_rpath = -rpath \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@ $(pkgdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +SOURCES = $(libevas_engine_wayland_shm_la_SOURCES) \ + $(module_la_SOURCES) +DIST_SOURCES = $(am__libevas_engine_wayland_shm_la_SOURCES_DIST) \ + $(am__module_la_SOURCES_DIST) +am__includes_HEADERS_DIST = Evas_Engine_Wayland_Shm.h +HEADERS = $(includes_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ +ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ +EDB_CFLAGS = @EDB_CFLAGS@ +EDB_LIBS = @EDB_LIBS@ +EDJE_CFLAGS = @EDJE_CFLAGS@ +EDJE_LIBS = @EDJE_LIBS@ +EET_CFLAGS = @EET_CFLAGS@ +EET_LIBS = @EET_LIBS@ +EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ +EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ +EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ +EGREP = @EGREP@ +EINA_CFLAGS = @EINA_CFLAGS@ +EINA_LIBS = @EINA_LIBS@ +EVAS_CFLAGS = @EVAS_CFLAGS@ +EVAS_LIBS = @EVAS_LIBS@ +EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ +EVIL_CFLAGS = @EVIL_CFLAGS@ +EVIL_LIBS = @EVIL_LIBS@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ +FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ +FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ +FREETYPE_LIBS = @FREETYPE_LIBS@ +FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ +FRIBIDI_LIBS = @FRIBIDI_LIBS@ +GL_EET_CFLAGS = @GL_EET_CFLAGS@ +GL_EET_LIBS = @GL_EET_LIBS@ +GREP = @GREP@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ +LINEBREAK_LIBS = @LINEBREAK_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULE_ARCH = @MODULE_ARCH@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PNG_CFLAGS = @PNG_CFLAGS@ +PNG_LIBS = @PNG_LIBS@ +RANLIB = @RANLIB@ +SDL_CFLAGS = @SDL_CFLAGS@ +SDL_LIBS = @SDL_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SHM_OPEN_LINK = @SHM_OPEN_LINK@ +STRIP = @STRIP@ +SVG_CFLAGS = @SVG_CFLAGS@ +SVG_LIBS = @SVG_LIBS@ +VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ +VALGRIND_LIBS = @VALGRIND_LIBS@ +VERSION = @VERSION@ +VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WIN32_CFLAGS = @WIN32_CFLAGS@ +WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ +XCB_CFLAGS = @XCB_CFLAGS@ +XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ +XCB_GL_LIBS = @XCB_GL_LIBS@ +XCB_LIBS = @XCB_LIBS@ +XEXT_CFLAGS = @XEXT_CFLAGS@ +XEXT_LIBS = @XEXT_LIBS@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +altivec_cflags = @altivec_cflags@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dlopen_libs = @dlopen_libs@ +docdir = @docdir@ +dvidir = @dvidir@ +edje_cc = @edje_cc@ +efl_doxygen = @efl_doxygen@ +efl_have_doxygen = @efl_have_doxygen@ +evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ +evas_engine_buffer_libs = @evas_engine_buffer_libs@ +evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ +evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ +evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ +evas_engine_directfb_libs = @evas_engine_directfb_libs@ +evas_engine_fb_cflags = @evas_engine_fb_cflags@ +evas_engine_fb_libs = @evas_engine_fb_libs@ +evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ +evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ +evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ +evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ +evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ +evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ +evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ +evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ +evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ +evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ +evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ +evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ +evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ +evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ +evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ +evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ +evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ +evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ +evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ +evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ +evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ +evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ +evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ +evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ +evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ +evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@ +evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@ +evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ +evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ +evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ +evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ +evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ +evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ +evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ +evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ +evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ +evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ +evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ +evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ +evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ +evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ +evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ +evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ +evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ +evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ +evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ +evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ +evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ +evas_image_loader_png_libs = @evas_image_loader_png_libs@ +evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ +evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ +evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ +evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ +evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ +evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ +evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ +evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ +evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ +evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ +evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ +evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ +exec_prefix = @exec_prefix@ +have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ +have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ +have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ +have_evas_engine_software_x11 = @have_evas_engine_software_x11@ +have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ +have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ +have_lcov = @have_lcov@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +lt_enable_auto_import = @lt_enable_auto_import@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_requires_private = @pkgconfig_requires_private@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pthread_cflags = @pthread_cflags@ +pthread_libs = @pthread_libs@ +release_info = @release_info@ +requirement_evas = @requirement_evas@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +version_info = @version_info@ +MAINTAINERCLEANFILES = Makefile.in +AM_CPPFLAGS = \ +-I. \ +-I$(top_srcdir)/src/lib \ +-I$(top_srcdir)/src/lib/include \ +-I$(top_srcdir)/src/modules/engines \ +@FREETYPE_CFLAGS@ \ +@EINA_CFLAGS@ \ +@evas_engine_wayland_shm_cflags@ + +@BUILD_ENGINE_WAYLAND_SHM_TRUE@WAYLAND_SHM_SOURCES = \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@evas_engine.c \ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@evas_outbuf.c + +@BUILD_ENGINE_WAYLAND_SHM_TRUE@WAYLAND_SHM_LIBADD = @FREETYPE_LIBS@ @EINA_LIBS@ @evas_engine_wayland_shm_libs@ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@includes_HEADERS = Evas_Engine_Wayland_Shm.h +@BUILD_ENGINE_WAYLAND_SHM_TRUE@includesdir = $(includedir)/evas-@VMAJ@ +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@pkgdir = $(libdir)/evas/modules/engines/wayland_shm/$(MODULE_ARCH) +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@pkg_LTLIBRARIES = module.la +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@module_la_SOURCES = $(WAYLAND_SHM_SOURCES) +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@module_la_LIBADD = $(WAYLAND_SHM_LIBADD) $(top_builddir)/src/lib/libevas.la +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@module_la_LDFLAGS = -no-undefined -module -avoid-version +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@noinst_LTLIBRARIES = libevas_engine_wayland_shm.la +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@libevas_engine_wayland_shm_la_SOURCES = $(WAYLAND_SHM_SOURCES) +@BUILD_ENGINE_WAYLAND_SHM_TRUE@@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@libevas_engine_wayland_shm_la_LIBADD = $(WAYLAND_SHM_LIBADD) +EXTRA_DIST = \ +evas_engine.h + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/engines/wayland_shm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/modules/engines/wayland_shm/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ + } + +uninstall-pkgLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ + done + +clean-pkgLTLIBRARIES: + -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) + @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libevas_engine_wayland_shm.la: $(libevas_engine_wayland_shm_la_OBJECTS) $(libevas_engine_wayland_shm_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(am_libevas_engine_wayland_shm_la_rpath) $(libevas_engine_wayland_shm_la_OBJECTS) $(libevas_engine_wayland_shm_la_LIBADD) $(LIBS) +module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) + $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_outbuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_engine.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_outbuf.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +module_la-evas_engine.lo: evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_engine.lo -MD -MP -MF $(DEPDIR)/module_la-evas_engine.Tpo -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_engine.Tpo $(DEPDIR)/module_la-evas_engine.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_engine.c' object='module_la-evas_engine.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_engine.lo `test -f 'evas_engine.c' || echo '$(srcdir)/'`evas_engine.c + +module_la-evas_outbuf.lo: evas_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_outbuf.lo -MD -MP -MF $(DEPDIR)/module_la-evas_outbuf.Tpo -c -o module_la-evas_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_outbuf.Tpo $(DEPDIR)/module_la-evas_outbuf.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_outbuf.c' object='module_la-evas_outbuf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_outbuf.lo `test -f 'evas_outbuf.c' || echo '$(srcdir)/'`evas_outbuf.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includesHEADERS: $(includes_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)" + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ + done + +uninstall-includesHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(includesdir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(includesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkgLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-includesHEADERS install-pkgLTLIBRARIES + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includesHEADERS uninstall-pkgLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includesHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-pkgLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includesHEADERS \ + uninstall-pkgLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/libraries/evas/src/modules/engines/wayland_shm/evas_engine.c b/libraries/evas/src/modules/engines/wayland_shm/evas_engine.c new file mode 100644 index 0000000..7c55517 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_shm/evas_engine.c @@ -0,0 +1,370 @@ +#include "evas_common.h" +#include "evas_private.h" +#include "evas_engine.h" +#include "Evas_Engine_Wayland_Shm.h" + +/* local structures */ +typedef struct _Render_Engine Render_Engine; +struct _Render_Engine +{ + Tilebuf *tb; + Tilebuf_Rect *rects; + Outbuf *ob; + Eina_Inlist *cur_rect; + + Eina_Bool end : 1; + + void (*outbuf_free)(Outbuf *ob); + void (*outbuf_resize)(Outbuf *ob, int w, int h); + RGBA_Image *(*outbuf_new_region_for_update)(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); + void (*outbuf_push_updated_region)(Outbuf *ob, RGBA_Image *surface, int x, int y, int w, int h); + void (*outbuf_free_region_for_update)(Outbuf *ob, RGBA_Image *update); +}; + +/* local variables */ +static Evas_Func func, pfunc; + +/* external variables */ +int _evas_engine_way_shm_log_dom = -1; + +/* local function prototypes */ +static void *_output_setup(int w, int h, int rotation, void *dest); + +/* engine function prototypes */ +static void *eng_info(Evas *evas __UNUSED__); +static void eng_info_free(Evas *evas __UNUSED__, void *info); +static int eng_setup(Evas *evas, void *info); +static void eng_output_free(void *data); +static void eng_output_resize(void *data, int w, int h); +static void eng_output_tile_size_set(void *data, int w, int h); +static void eng_output_redraws_rect_add(void *data, int x, int y, int w, int h); +static void eng_output_redraws_rect_del(void *data, int x, int y, int w, int h); +static void eng_output_redraws_clear(void *data); +static void *eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); +static void eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h); +static void eng_output_flush(void *data); +static void eng_output_idle_flush(void *data); +static Eina_Bool eng_canvas_alpha_get(void *data, void *context __UNUSED__); + +/* local functions */ +static void * +_output_setup(int w, int h, int rotation, void *dest) +{ + Render_Engine *re = NULL; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(re = calloc(1, sizeof(Render_Engine)))) return NULL; + + if (!(re->ob = evas_outbuf_setup(w, h, rotation, dest))) + { + free(re); + return NULL; + } + + if (!(re->tb = evas_common_tilebuf_new(w, h))) + { + evas_outbuf_free(re->ob); + free(re); + return NULL; + } + + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + return re; +} + +/* engine functions */ +static void * +eng_info(Evas *evas __UNUSED__) +{ + Evas_Engine_Info_Wayland_Shm *info; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(info = calloc(1, sizeof(Evas_Engine_Info_Wayland_Shm)))) + return NULL; + + info->magic.magic = rand(); + info->info.debug = EINA_FALSE; + info->render_mode = EVAS_RENDER_MODE_BLOCKING; + + return info; +} + +static void +eng_info_free(Evas *evas __UNUSED__, void *info) +{ + Evas_Engine_Info_Wayland_Shm *in; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(in = (Evas_Engine_Info_Wayland_Shm *)info)) return; + free(in); +} + +static int +eng_setup(Evas *evas, void *info) +{ + Evas_Engine_Info_Wayland_Shm *in; + Render_Engine *re = NULL; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(in = (Evas_Engine_Info_Wayland_Shm *)info)) return 0; + + if (!evas->engine.data.output) + { + evas_common_cpu_init(); + evas_common_blend_init(); + evas_common_image_init(); + evas_common_convert_init(); + evas_common_scale_init(); + evas_common_rectangle_init(); + evas_common_polygon_init(); + evas_common_line_init(); + evas_common_font_init(); + evas_common_draw_init(); + evas_common_tilebuf_init(); + + re = _output_setup(evas->output.w, evas->output.h, + in->info.rotation, in->info.dest); + if (!re) return 0; + + re->outbuf_free = evas_outbuf_free; + re->outbuf_resize = evas_outbuf_resize; + re->outbuf_new_region_for_update = evas_outbuf_new_region_for_update; + re->outbuf_push_updated_region = evas_outbuf_push_updated_region; + re->outbuf_free_region_for_update = evas_outbuf_free_region_for_update; + } + else + { + if (!(re = evas->engine.data.output)) return 0; + if (re->ob) re->outbuf_free(re->ob); + re->ob = evas_outbuf_setup(evas->output.w, evas->output.h, + in->info.rotation, in->info.dest); + if (re->tb) evas_common_tilebuf_free(re->tb); + if ((re->tb = evas_common_tilebuf_new(evas->output.w, evas->output.h))) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + } + + evas->engine.data.output = re; + + if (!evas->engine.data.context) + { + evas->engine.data.context = + evas->engine.func->context_new(evas->engine.data.output); + } + + return 1; +} + +static void +eng_output_free(void *data) +{ + Render_Engine *re = NULL; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if ((re = (Render_Engine *)data)) + { + if (re->ob) re->outbuf_free(re->ob); + if (re->tb) evas_common_tilebuf_free(re->tb); + if (re->rects) evas_common_tilebuf_free_render_rects(re->rects); + free(re); + } + evas_common_font_shutdown(); + evas_common_image_shutdown(); +} + +static void +eng_output_resize(void *data, int w, int h) +{ + Render_Engine *re = NULL; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + + if (!(re = (Render_Engine *)data)) return; + + if (re->ob) re->outbuf_resize(re->ob, w, h); + if (re->tb) evas_common_tilebuf_free(re->tb); + if ((re->tb = evas_common_tilebuf_new(w, h))) + evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); +} + +static void +eng_output_tile_size_set(void *data, int w, int h) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; + if (re->tb) evas_common_tilebuf_set_tile_size(re->tb, w, h); +} + +static void +eng_output_redraws_rect_add(void *data, int x, int y, int w, int h) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; + if (re->tb) evas_common_tilebuf_add_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_rect_del(void *data, int x, int y, int w, int h) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; + if (re->tb) evas_common_tilebuf_del_redraw(re->tb, x, y, w, h); +} + +static void +eng_output_redraws_clear(void *data) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; + if (re->tb) evas_common_tilebuf_clear(re->tb); +} + +static void * +eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch) +{ + Render_Engine *re = NULL; + RGBA_Image *surface; + Tilebuf_Rect *rect; + int ux = 0, uy = 0, uw = 0, uh = 0; + + if (!(re = (Render_Engine *)data)) return NULL; + if (re->end) + { + re->end = EINA_FALSE; + return NULL; + } + if (!re->rects) + { + re->rects = evas_common_tilebuf_get_render_rects(re->tb); + re->cur_rect = EINA_INLIST_GET(re->rects); + } + if (!re->cur_rect) return NULL; + rect = (Tilebuf_Rect *)re->cur_rect; + ux = rect->x; + uy = rect->y; + uw = rect->w; + uh = rect->h; + re->cur_rect = re->cur_rect->next; + if (!re->cur_rect) + { + evas_common_tilebuf_free_render_rects(re->rects); + re->rects = NULL; + re->end = EINA_TRUE; + } + if ((ux + uw) > re->ob->w) uw = re->ob->w - ux; + if ((uy + uh) > re->ob->h) uh = re->ob->h - uy; + if ((uw <= 0) || (uh <= 0)) return NULL; + surface = + re->outbuf_new_region_for_update(re->ob, ux, uy, uw, uh, cx, cy, cw, ch); + if (x) *x = ux; + if (y) *y = uy; + if (w) *w = uw; + if (h) *h = uh; + return surface; +} + +static void +eng_output_redraws_next_update_push(void *data, void *surface, int x, int y, int w, int h) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; +#ifdef BUILD_PIPE_RENDER + evas_common_pipe_map_begin(surface); +#endif + if (re->ob) + { + re->outbuf_push_updated_region(re->ob, surface, x, y, w, h); + re->outbuf_free_region_for_update(re->ob, surface); + } + evas_common_cpu_end_opt(); +} + +static void +eng_output_flush(void *data) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; +} + +static void +eng_output_idle_flush(void *data) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return; +} + +static Eina_Bool +eng_canvas_alpha_get(void *data, void *context __UNUSED__) +{ + Render_Engine *re = NULL; + + if (!(re = (Render_Engine *)data)) return EINA_FALSE; + return EINA_TRUE; +} + +/* module functions */ +static int +module_open(Evas_Module *em) +{ + if (!em) return 0; + + if (!_evas_module_engine_inherit(&pfunc, "software_generic")) + return 0; + + _evas_engine_way_shm_log_dom = + eina_log_domain_register("evas-wayland_shm", EVAS_DEFAULT_LOG_COLOR); + if (_evas_engine_way_shm_log_dom < 0) + { + EINA_LOG_ERR("Could not create a module log domain."); + return 0; + } + + func = pfunc; + +#define ORD(f) EVAS_API_OVERRIDE(f, &func, eng_) + ORD(info); + ORD(info_free); + ORD(setup); + ORD(canvas_alpha_get); + ORD(output_free); + ORD(output_resize); + ORD(output_tile_size_set); + ORD(output_redraws_rect_add); + ORD(output_redraws_rect_del); + ORD(output_redraws_clear); + ORD(output_redraws_next_update_get); + ORD(output_redraws_next_update_push); + ORD(output_flush); + ORD(output_idle_flush); + + em->functions = (void *)(&func); + return 1; +} + +static void +module_close(Evas_Module *em __UNUSED__) +{ + eina_log_domain_unregister(_evas_engine_way_shm_log_dom); +} + +static Evas_Module_Api evas_modapi = +{ + EVAS_MODULE_API_VERSION, "wayland_shm", "none", {module_open, module_close} +}; + +EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, wayland_shm); + +#ifndef EVAS_STATIC_BUILD_WAYLAND_SHM +EVAS_EINA_MODULE_DEFINE(engine, wayland_shm); +#endif diff --git a/libraries/evas/src/modules/engines/wayland_shm/evas_engine.h b/libraries/evas/src/modules/engines/wayland_shm/evas_engine.h new file mode 100644 index 0000000..878851a --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_shm/evas_engine.h @@ -0,0 +1,60 @@ +#ifndef _EVAS_ENGINE_H +# define _EVAS_ENGINE_H + +//# define LOGFNS 1 + +# ifdef LOGFNS +# include +# define LOGFN(fl, ln, fn) printf("-EVAS-WL: %25s: %5i - %s\n", fl, ln, fn); +# else +# define LOGFN(fl, ln, fn) +# endif + +extern int _evas_engine_way_shm_log_dom; + +# ifdef ERR +# undef ERR +# endif +# define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_way_shm_log_dom, __VA_ARGS__) + +# ifdef DBG +# undef DBG +# endif +# define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_way_shm_log_dom, __VA_ARGS__) + +# ifdef INF +# undef INF +# endif +# define INF(...) EINA_LOG_DOM_INFO(_evas_engine_way_shm_log_dom, __VA_ARGS__) + +# ifdef WRN +# undef WRN +# endif +# define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_way_shm_log_dom, __VA_ARGS__) + +# ifdef CRIT +# undef CRIT +# endif +# define CRIT(...) EINA_LOG_DOM_CRIT(_evas_engine_way_shm_log_dom, __VA_ARGS__) + +typedef struct _Outbuf Outbuf; +struct _Outbuf +{ + int w, h; + int rotation; + + struct + { + void *dest; + RGBA_Image *buffer; + } priv; +}; + +void evas_outbuf_free(Outbuf *ob); +void evas_outbuf_resize(Outbuf *ob, int w, int h); +Outbuf *evas_outbuf_setup(int w, int h, int rot, void *dest); +RGBA_Image *evas_outbuf_new_region_for_update(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); +void evas_outbuf_push_updated_region(Outbuf *ob, RGBA_Image *update, int x __UNUSED__, int y, int w, int h); +void evas_outbuf_free_region_for_update(Outbuf *ob, RGBA_Image *update); + +#endif diff --git a/libraries/evas/src/modules/engines/wayland_shm/evas_outbuf.c b/libraries/evas/src/modules/engines/wayland_shm/evas_outbuf.c new file mode 100644 index 0000000..490a978 --- /dev/null +++ b/libraries/evas/src/modules/engines/wayland_shm/evas_outbuf.c @@ -0,0 +1,100 @@ +#include "evas_common.h" +#include "evas_engine.h" + +void +evas_outbuf_free(Outbuf *ob) +{ + if (!ob) return; + if (ob->priv.buffer) evas_cache_image_drop(&ob->priv.buffer->cache_entry); + free(ob); +} + +void +evas_outbuf_resize(Outbuf *ob, int w, int h) +{ + if (!ob) return; + if ((ob->w == w) && (ob->h == h)) return; + ob->w = w; + ob->h = h; + if (ob->priv.buffer) evas_cache_image_drop(&ob->priv.buffer->cache_entry); + ob->priv.buffer = NULL; +} + +Outbuf * +evas_outbuf_setup(int w, int h, int rot, void *dest) +{ + Outbuf *ob = NULL; + + if (!(ob = calloc(1, sizeof(Outbuf)))) return NULL; + + ob->w = w; + ob->h = h; + ob->rotation = rot; + ob->priv.dest = dest; + + ob->priv.buffer = + (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(), + w, h, ob->priv.dest, + 1, EVAS_COLORSPACE_ARGB8888); + + return ob; +} + +RGBA_Image * +evas_outbuf_new_region_for_update(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch) +{ + if (ob->priv.buffer) + { + *cx = x; *cy = y; *cw = w; *ch = h; + return ob->priv.buffer; + } + else + { + RGBA_Image *im; + + *cx = 0; *cy = 0; *cw = w; *ch = h; + im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get()); + if (im) + { + im->cache_entry.flags.alpha = 1; + im = (RGBA_Image *)evas_cache_image_size_set(&im->cache_entry, w, h); + } + + return im; + } + + return NULL; +} + +void +evas_outbuf_push_updated_region(Outbuf *ob, RGBA_Image *update, int x __UNUSED__, int y, int w, int h) +{ + if (!ob->priv.dest) return; + if (!ob->priv.buffer) + { + Gfx_Func_Copy func; + + func = evas_common_draw_func_copy_get(w, 0); + if (func) + { + DATA32 *dst, *src; + int yy = 0, bytes = 0; + + bytes = ((w * sizeof(int)) * h); + for (yy = 0; yy < h; yy++) + { + src = update->image.data + (yy * update->cache_entry.w); + dst = (DATA32 *)((DATA8 *)(ob->priv.dest) + + ((y + yy) * bytes)); + func(src, dst, w); + } + } + } +} + +void +evas_outbuf_free_region_for_update(Outbuf *ob, RGBA_Image *update) +{ + if (!ob) return; + if (update != ob->priv.buffer) evas_cache_image_drop(&update->cache_entry); +} diff --git a/libraries/evas/src/modules/loaders/Makefile.in b/libraries/evas/src/modules/loaders/Makefile.in index 2120a33..454dcd8 100644 --- a/libraries/evas/src/modules/loaders/Makefile.in +++ b/libraries/evas/src/modules/loaders/Makefile.in @@ -49,7 +49,7 @@ host_triplet = @host@ @BUILD_LOADER_WBMP_TRUE@@EVAS_STATIC_BUILD_WBMP_FALSE@am__append_14 = wbmp @BUILD_LOADER_XPM_TRUE@@EVAS_STATIC_BUILD_XPM_FALSE@am__append_15 = xpm subdir = src/modules/loaders -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ @@ -222,8 +222,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -240,6 +238,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -321,6 +321,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/TODO b/libraries/evas/src/modules/loaders/TODO deleted file mode 100644 index 3b82543..0000000 --- a/libraries/evas/src/modules/loaders/TODO +++ /dev/null @@ -1,5 +0,0 @@ -DONE -> bmp tga ico -id3 gz bz2 <- extraction loaders -lbm <- aaah amiga days -ani <- why> - diff --git a/libraries/evas/src/modules/loaders/bmp/Makefile.in b/libraries/evas/src/modules/loaders/bmp/Makefile.in index f2c3e20..943fb74 100644 --- a/libraries/evas/src/modules/loaders/bmp/Makefile.in +++ b/libraries/evas/src/modules/loaders/bmp/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c b/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c index 38e3680..6d15783 100644 --- a/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c +++ b/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c @@ -21,50 +21,91 @@ static Evas_Image_Load_Func evas_image_load_bmp_func = EINA_TRUE, evas_image_load_file_head_bmp, evas_image_load_file_data_bmp, - NULL + NULL, + EINA_FALSE }; -static int -read_short(FILE *file, short *ret) +static Eina_Bool +read_short(unsigned char *map, size_t length, size_t *position, short *ret) { unsigned char b[2]; - if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0; + + if (*position + 2 > length) return EINA_FALSE; + b[0] = map[(*position)++]; + b[1] = map[(*position)++]; *ret = (b[1] << 8) | b[0]; - return 1; + return EINA_TRUE; } -static int -read_ushort(FILE *file, unsigned short *ret) +static Eina_Bool +read_ushort(unsigned char *map, size_t length, size_t *position, unsigned short *ret) { unsigned char b[2]; - if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0; + + if (*position + 2 > length) return EINA_FALSE; + b[0] = map[(*position)++]; + b[1] = map[(*position)++]; *ret = (b[1] << 8) | b[0]; - return 1; + return EINA_TRUE; } -static int -read_int(FILE *file, int *ret) +static Eina_Bool +read_int(unsigned char *map, size_t length, size_t *position, int *ret) { unsigned char b[4]; - if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0; + int i; + + if (*position + 4 > length) return EINA_FALSE; + for (i = 0; i < 4; i++) + b[i] = map[(*position)++]; *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); - return 1; + return EINA_TRUE; } -static int -read_uint(FILE *file, unsigned int *ret) +static Eina_Bool +read_uint(unsigned char *map, size_t length, size_t *position, unsigned int *ret) { - unsigned char b[4]; - if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0; + unsigned char b[4]; + int i; + + if (*position + 4 > length) return EINA_FALSE; + for (i = 0; i < 4; i++) + b[i] = map[(*position)++]; *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); - return 1; + return EINA_TRUE; +} + +static Eina_Bool +read_uchar(unsigned char *map, size_t length, size_t *position, unsigned char *ret) +{ + if (*position + 1 > length) return EINA_FALSE; + *ret = map[(*position)++]; + return EINA_TRUE; +} + +static Eina_Bool +read_skip(size_t length, size_t *position, int skip) +{ + if (*position + skip > length) return EINA_FALSE; + *position += skip; + return EINA_TRUE; +} + +static Eina_Bool +read_mem(unsigned char *map, size_t length, size_t *position, void *buffer, int size) +{ + if (*position + size > length) return EINA_FALSE; + memcpy(buffer, map + *position, size); + *position += size; + return EINA_TRUE; } static Eina_Bool evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) { - FILE *f; - char buf[4096]; + Eina_File *f; + void *map = NULL; + size_t position = 0; char hasa = 0; int w = 0, h = 0, planes = 0, bit_count = 0, image_size = 0, comp = 0, hdpi = 0, vdpi = 0, @@ -76,7 +117,7 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key unsigned int bmpsize; unsigned short res1, res2; - f = fopen(file, "rb"); + f = eina_file_open(file, 0); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; @@ -84,84 +125,85 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key } *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; - fseek(f, 0, SEEK_END); - fsize = ftell(f); - fseek(f, 0, SEEK_SET); + fsize = eina_file_size_get(f); if (fsize < 2) goto close_file; - - if (fread(buf, 2, 1, f) != 1) goto close_file; - if (strncmp(buf, "BM", 2)) goto close_file; // magic number + + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto close_file; + + if (strncmp(map, "BM", 2)) goto close_file; // magic number + position += 2; *error = EVAS_LOAD_ERROR_CORRUPT_FILE; - if (!read_uint(f, &bmpsize)) goto close_file; - if (!read_ushort(f, &res1)) goto close_file; - if (!read_ushort(f, &res2)) goto close_file; - if (!read_uint(f, &offset)) goto close_file; - if (!read_uint(f, &head_size)) goto close_file; + if (!read_uint(map, fsize, &position, &bmpsize)) goto close_file; + if (!read_ushort(map, fsize, &position, &res1)) goto close_file; + if (!read_ushort(map, fsize, &position, &res2)) goto close_file; + if (!read_uint(map, fsize, &position, &offset)) goto close_file; + if (!read_uint(map, fsize, &position, &head_size)) goto close_file; if (head_size == 12) // OS/2 V1 + Windows 3.0 { short tmp; - - if (!read_short(f, &tmp)) goto close_file; + + if (!read_short(map, fsize, &position, &tmp)) goto close_file; w = tmp; // width - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; h = tmp; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8 & 24 } else if (head_size == 64) // OS/2 V2 { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all - if (fread(buf, 24, 1, f) != 1) goto close_file; // skip unused header + if (!read_skip(fsize, &position, 24)) goto close_file; // skip unused header if (image_size == 0) image_size = fsize - offset; } else if (head_size == 40) // Windows 3.0 + (v3) { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all if (image_size == 0) image_size = fsize - offset; if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to store it this way @@ -170,37 +212,37 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; rmask = tmp2; // red mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; gmask = tmp2; // green mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; bmask = tmp2; // blue mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; amask = tmp2; // alpha mask - if (fread(buf, 36, 1, f) != 1) goto close_file; // skip unused cie - if (fread(buf, 12, 1, f) != 1) goto close_file; // skip unused gamma + if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie + if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma if (image_size == 0) image_size = fsize - offset; if ((amask) && (bit_count == 32)) hasa = 1; } @@ -208,38 +250,38 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; rmask = tmp2; // red mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; gmask = tmp2; // green mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; bmask = tmp2; // blue mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; amask = tmp2; // alpha mask - if (fread(buf, 36, 1, f) != 1) goto close_file; // skip unused cie - if (fread(buf, 12, 1, f) != 1) goto close_file; // skip unused gamma - if (fread(buf, 16, 1, f) != 1) goto close_file; // skip others + if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie + if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma + if (!read_skip(fsize, &position, 16)) goto close_file; // skip others if (image_size == 0) image_size = fsize - offset; if ((amask) && (bit_count == 32)) hasa = 1; } @@ -251,7 +293,7 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key h = -h; right_way_up = 1; } - + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || IMG_TOO_BIG(w, h)) { @@ -327,21 +369,24 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key ie->w = w; ie->h = h; if (hasa) ie->flags.alpha = 1; - - fclose(f); + + eina_file_map_free(f, map); + eina_file_close(f); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; close_file: - fclose(f); + if (map) eina_file_map_free(f, map); + eina_file_close(f); return EINA_FALSE; } static Eina_Bool evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) { - FILE *f; - char buf[4096]; + Eina_File *f; + void *map = NULL; + size_t position = 0; unsigned char *buffer = NULL, *buffer_end = NULL, *p; char hasa = 0; int x = 0, y = 0, w = 0, h = 0, planes = 0, bit_count = 0, image_size = 0, @@ -361,96 +406,96 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key int row_size = 0; /* Row size is rounded up to a multiple of 4bytes */ int read_line = 0; /* total read line */ - - f = fopen(file, "rb"); + f = eina_file_open(file, 0); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } - + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; - fseek(f, 0, SEEK_END); - fsize = ftell(f); - fseek(f, 0, SEEK_SET); + fsize = eina_file_size_get(f); if (fsize < 2) goto close_file; + + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto close_file; - if (fread(buf, 2, 1, f) != 1) goto close_file; - if (strncmp(buf, "BM", 2)) goto close_file; // magic number + if (strncmp(map, "BM", 2)) goto close_file; // magic number + position += 2; *error = EVAS_LOAD_ERROR_CORRUPT_FILE; - if (!read_uint(f, &bmpsize)) goto close_file; - if (!read_ushort(f, &res1)) goto close_file; - if (!read_ushort(f, &res2)) goto close_file; - if (!read_uint(f, &offset)) goto close_file; - if (!read_uint(f, &head_size)) goto close_file; + if (!read_uint(map, fsize, &position, &bmpsize)) goto close_file; + if (!read_ushort(map, fsize, &position, &res1)) goto close_file; + if (!read_ushort(map, fsize, &position, &res2)) goto close_file; + if (!read_uint(map, fsize, &position, &offset)) goto close_file; + if (!read_uint(map, fsize, &position, &head_size)) goto close_file; image_size = fsize - offset; if (image_size < 1) goto close_file; - + if (head_size == 12) // OS/2 V1 + Windows 3.0 { short tmp; - - if (!read_short(f, &tmp)) goto close_file; + + if (!read_short(map, fsize, &position, &tmp)) goto close_file; w = tmp; // width - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; h = tmp; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8 & 24 } else if (head_size == 64) // OS/2 V2 { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all - if (fread(buf, 24, 1, f) != 1) goto close_file; // skip unused header + if (!read_skip(fsize, &position, 24)) goto close_file; // skip unused header if (image_size == 0) image_size = fsize - offset; } else if (head_size == 40) // Windows 3.0 + (v3) { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all if (image_size == 0) image_size = fsize - offset; if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to store it this way @@ -459,37 +504,37 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; rmask = tmp2; // red mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; gmask = tmp2; // green mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; bmask = tmp2; // blue mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; amask = tmp2; // alpha mask - if (fread(buf, 36, 1, f) != 1) goto close_file; // skip unused cie - if (fread(buf, 12, 1, f) != 1) goto close_file; // skip unused gamma + if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie + if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma if (image_size == 0) image_size = fsize - offset; if ((amask) && (bit_count == 32)) hasa = 1; } @@ -497,38 +542,38 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key { short tmp; int tmp2; - - if (!read_int(f, &tmp2)) goto close_file; + + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; planes = tmp; // must be 1 - if (!read_short(f, &tmp)) goto close_file; + if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; rmask = tmp2; // red mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; gmask = tmp2; // green mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; bmask = tmp2; // blue mask - if (!read_int(f, &tmp2)) goto close_file; + if (!read_int(map, fsize, &position, &tmp2)) goto close_file; amask = tmp2; // alpha mask - if (fread(buf, 36, 1, f) != 1) goto close_file; // skip unused cie - if (fread(buf, 12, 1, f) != 1) goto close_file; // skip unused gamma - if (fread(buf, 16, 1, f) != 1) goto close_file; // skip others + if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie + if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma + if (!read_skip(fsize, &position, 16)) goto close_file; // skip others if (image_size == 0) image_size = fsize - offset; if ((amask) && (bit_count == 32)) hasa = 1; } @@ -605,17 +650,17 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key pal = alloca(256 * 4); for (i = 0; i < pal_num; i++) { - if (fread(&b, 1, 1, f) != 1) goto close_file; - if (fread(&g, 1, 1, f) != 1) goto close_file; - if (fread(&r, 1, 1, f) != 1) goto close_file; + if (!read_uchar(map, fsize, &position, &b)) goto close_file; + if (!read_uchar(map, fsize, &position, &g)) goto close_file; + if (!read_uchar(map, fsize, &position, &r)) goto close_file; if ((head_size != 12) /*&& (palette_size != 0)*/) { // OS/2 V1 doesn't do the pad byte - if (fread(&a, 1, 1, f) != 1) goto close_file; + if (!read_uchar(map, fsize, &position, &a)) goto close_file; } a = 0xff; // fillin a as solid for paletted images pal[i] = ARGB_JOIN(a, r, g, b); } - fseek(f, offset, SEEK_SET); + position = offset; if ((scale_ratio == 1) || (comp !=0)) buffer = malloc(image_size + 8); // add 8 for padding to avoid checks @@ -643,11 +688,11 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key if ((scale_ratio == 1) || (comp !=0)) { - if (fread(buffer, image_size, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, buffer, image_size)) goto close_file; } else { - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; } if (bit_count == 1) @@ -715,8 +760,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -770,8 +815,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -960,8 +1005,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1088,7 +1133,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key { if (comp == 0) // no compression { - fseek(f, offset, SEEK_SET); + position = offset; if (scale_ratio == 1) buffer = malloc(image_size + 8); // add 8 for padding to avoid checks else @@ -1106,11 +1151,11 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key p = buffer; if (scale_ratio == 1) { - if (fread(buffer, image_size, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, buffer, image_size)) goto close_file; } else { - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; } if (bit_count == 16) { @@ -1139,8 +1184,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1173,8 +1218,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1212,8 +1257,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1230,7 +1275,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key if (hasa) { unsigned int *pixend = surface + (w * h); - + for (pix = surface; pix < pixend; pix++) A_VAL(pix) = 0xff; } @@ -1241,11 +1286,11 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key } else if (comp == 3) // bit field { - if (!read_uint(f, &rmask)) goto close_file; - if (!read_uint(f, &gmask)) goto close_file; - if (!read_uint(f, &bmask)) goto close_file; + if (!read_uint(map, fsize, &position, &rmask)) goto close_file; + if (!read_uint(map, fsize, &position, &gmask)) goto close_file; + if (!read_uint(map, fsize, &position, &bmask)) goto close_file; - fseek(f, offset, SEEK_SET); + position = offset; if (scale_ratio == 1) buffer = malloc(image_size + 8); // add 8 for padding to avoid checks else @@ -1264,14 +1309,14 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key p = buffer; if (scale_ratio == 1) { - if (fread(buffer, image_size, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, buffer, image_size)) goto close_file; } else { - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; } - if ((bit_count == 16) && + if ((bit_count == 16) && (rmask == 0xf800) && (gmask == 0x07e0) && (bmask == 0x001f) ) { @@ -1299,8 +1344,9 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key { read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1338,8 +1384,9 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key { read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer_end, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1375,8 +1422,9 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key { read_line += scale_ratio; if (read_line >= image_h) break; - fseek(f, row_size * (scale_ratio - 1), SEEK_CUR); - if (fread(buffer, row_size, 1, f) != 1) goto close_file; + + position += row_size * (scale_ratio - 1); + if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } @@ -1404,10 +1452,12 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key } else goto close_file; - + if (buffer) free(buffer); if (scale_surface) free(scale_surface); - fclose(f); + + eina_file_map_free(f, map); + eina_file_close(f); evas_common_image_premul(ie); *error = EVAS_LOAD_ERROR_NONE; @@ -1416,7 +1466,8 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key close_file: if (buffer) free(buffer); if (scale_surface) free(scale_surface); - fclose(f); + if (map) eina_file_map_free(f, map); + eina_file_close(f); return EINA_FALSE; } diff --git a/libraries/evas/src/modules/loaders/edb/Makefile.in b/libraries/evas/src/modules/loaders/edb/Makefile.in index 38c1fa2..87356b4 100644 --- a/libraries/evas/src/modules/loaders/edb/Makefile.in +++ b/libraries/evas/src/modules/loaders/edb/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/edb/evas_image_load_edb.c b/libraries/evas/src/modules/loaders/edb/evas_image_load_edb.c index 94b121e..521161f 100644 --- a/libraries/evas/src/modules/loaders/edb/evas_image_load_edb.c +++ b/libraries/evas/src/modules/loaders/edb/evas_image_load_edb.c @@ -16,7 +16,8 @@ static Evas_Image_Load_Func evas_image_load_edb_func = EINA_TRUE, evas_image_load_file_head_edb, evas_image_load_file_data_edb, - NULL + NULL, + EINA_FALSE }; static Eina_Bool diff --git a/libraries/evas/src/modules/loaders/eet/Makefile.in b/libraries/evas/src/modules/loaders/eet/Makefile.in index 6a6c40e..25a30cf 100644 --- a/libraries/evas/src/modules/loaders/eet/Makefile.in +++ b/libraries/evas/src/modules/loaders/eet/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/eet/evas_image_load_eet.c b/libraries/evas/src/modules/loaders/eet/evas_image_load_eet.c index a187b9e..f86246a 100644 --- a/libraries/evas/src/modules/loaders/eet/evas_image_load_eet.c +++ b/libraries/evas/src/modules/loaders/eet/evas_image_load_eet.c @@ -16,7 +16,8 @@ Evas_Image_Load_Func evas_image_load_eet_func = EINA_TRUE, evas_image_load_file_head_eet, evas_image_load_file_data_eet, - NULL + NULL, + EINA_FALSE }; diff --git a/libraries/evas/src/modules/loaders/generic/Makefile.in b/libraries/evas/src/modules/loaders/generic/Makefile.in index 65a0bac..dfd5294 100644 --- a/libraries/evas/src/modules/loaders/generic/Makefile.in +++ b/libraries/evas/src/modules/loaders/generic/Makefile.in @@ -232,8 +232,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -250,6 +248,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -331,6 +331,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/generic/evas_image_load_generic.c b/libraries/evas/src/modules/loaders/generic/evas_image_load_generic.c index 88c189d..2bbfd3e 100644 --- a/libraries/evas/src/modules/loaders/generic/evas_image_load_generic.c +++ b/libraries/evas/src/modules/loaders/generic/evas_image_load_generic.c @@ -24,7 +24,8 @@ Evas_Image_Load_Func evas_image_load_generic_func = EINA_TRUE, evas_image_load_file_head_generic, evas_image_load_file_data_generic, - NULL + NULL, + EINA_FALSE }; static Eina_Bool @@ -117,7 +118,7 @@ _load(Image_Entry *ie, const char *file, const char *key, int *error, Eina_Bool int read_data = 0; char *tmpfname = NULL, *shmfname = NULL; DATA32 *body; - FILE *f; + FILE *f = NULL; libdir = _evas_module_libdir_get(); cmd_len = strlen(libdir); @@ -125,6 +126,7 @@ _load(Image_Entry *ie, const char *file, const char *key, int *error, Eina_Bool img_loader = alloca(cmd_len + 1); strcpy(img_loader, libdir); strcat(img_loader, loader); + // params excluding file, key and loadopts cmd_len += 1024; cmd_len += strlen(file) * 2; @@ -188,6 +190,8 @@ _load(Image_Entry *ie, const char *file, const char *key, int *error, Eina_Bool // will interpret shell stuff and path hunt that will then exec the // program itself that will dynamically link that will again // parse the arguments and finally do something... + if (access(decoders[try_count], X_OK)) continue; + strcpy(cmd, decoders[try_count]); strcat(cmd, " "); // filename first arg diff --git a/libraries/evas/src/modules/loaders/gif/Makefile.in b/libraries/evas/src/modules/loaders/gif/Makefile.in index 7fcd6a7..f32fcf4 100644 --- a/libraries/evas/src/modules/loaders/gif/Makefile.in +++ b/libraries/evas/src/modules/loaders/gif/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c b/libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c index 976df0d..9cd6f6e 100644 --- a/libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c +++ b/libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c @@ -50,7 +50,8 @@ static Evas_Image_Load_Func evas_image_load_gif_func = EINA_TRUE, evas_image_load_file_head_gif, evas_image_load_file_data_gif, - evas_image_load_frame_duration_gif + evas_image_load_frame_duration_gif, + EINA_FALSE }; #define byte2_to_int(a,b) (((b)<<8)|(a)) diff --git a/libraries/evas/src/modules/loaders/ico/Makefile.in b/libraries/evas/src/modules/loaders/ico/Makefile.in index 5c26adf..f65ace0 100644 --- a/libraries/evas/src/modules/loaders/ico/Makefile.in +++ b/libraries/evas/src/modules/loaders/ico/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c b/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c index 17a7f7e..6e31191 100644 --- a/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c +++ b/libraries/evas/src/modules/loaders/ico/evas_image_load_ico.c @@ -19,32 +19,57 @@ static Evas_Image_Load_Func evas_image_load_ico_func = EINA_TRUE, evas_image_load_file_head_ico, evas_image_load_file_data_ico, - NULL + NULL, + EINA_FALSE }; -static int -read_ushort(FILE *file, unsigned short *ret) +static Eina_Bool +read_ushort(unsigned char *map, size_t length, size_t *position, unsigned short *ret) { unsigned char b[2]; - if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0; + + if (*position + 2 > length) return EINA_FALSE; + b[0] = map[(*position)++]; + b[1] = map[(*position)++]; *ret = (b[1] << 8) | b[0]; - return 1; + return EINA_TRUE; } -static int -read_uint(FILE *file, unsigned int *ret) +static Eina_Bool +read_uint(unsigned char *map, size_t length, size_t *position, unsigned int *ret) { - unsigned char b[4]; - if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0; + unsigned char b[4]; + unsigned int i; + + if (*position + 4 > length) return EINA_FALSE; + for (i = 0; i < 4; i++) + b[i] = map[(*position)++]; *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); - return 1; + return EINA_TRUE; +} + +static Eina_Bool +read_uchar(unsigned char *map, size_t length, size_t *position, unsigned char *ret) +{ + if (*position + 1 > length) return EINA_FALSE; + *ret = map[(*position)++]; + return EINA_TRUE; +} + +static Eina_Bool +read_mem(unsigned char *map, size_t length, size_t *position, void *buffer, int size) +{ + if (*position + size > length) return EINA_FALSE; + memcpy(buffer, map + *position, size); + *position += size; + return EINA_TRUE; } enum { - SMALLEST, - BIGGEST, - SMALLER, + SMALLEST, + BIGGEST, + SMALLER, BIGGER }; @@ -57,9 +82,11 @@ enum static Eina_Bool evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key, int *error) { + Eina_File *f; + void *map = NULL; + size_t position = 0; unsigned short word; unsigned char byte; - FILE *f; int wanted_w = 0, wanted_h = 0, w, h, cols, i, planes = 0, hot_x = 0, hot_y = 0, bpp = 0, pdelta, search = -1, have_choice = 0, hasa = 1; @@ -74,7 +101,7 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key unsigned int bmoffset, bmsize; } chosen = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - f = fopen(file, "rb"); + f = eina_file_open(file, EINA_FALSE); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; @@ -82,16 +109,17 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key } *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; - fseek(f, 0, SEEK_END); - fsize = ftell(f); - fseek(f, 0, SEEK_SET); + fsize = eina_file_size_get(f); if (fsize < (6 + 16 + 40)) goto close_file; + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto close_file; + // key: // NULL == highest res // biggest == highest res // smallest == lowest res - // + // // smaller == next size SMALLER than load opts WxH (if possible) // bigger == next size BIGGER than load opts WxH (if possible) // more ? @@ -103,10 +131,10 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key wanted_h = ie->load_opts.h; search = SMALLER; } - - if (!read_ushort(f, &reserved)) goto close_file; - if (!read_ushort(f, &type)) goto close_file; - if (!read_ushort(f, &count)) goto close_file; + + if (!read_ushort(map, fsize, &position, &reserved)) goto close_file; + if (!read_ushort(map, fsize, &position, &type)) goto close_file; + if (!read_ushort(map, fsize, &position, &count)) goto close_file; if (!((reserved == 0) && ((type == ICON) || (type == CURSOR)) && (count > 0))) goto close_file; @@ -141,24 +169,25 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key } for (i = 0; i < count; i++) { - if (fread(&byte, 1, 1, f) != 1) goto close_file; - w = byte; + unsigned char tw = 0, th = 0, tcols = 0; + if (!read_uchar(map, fsize, &position, &tw)) goto close_file; + w = tw; if (w <= 0) w = 256; - if (fread(&byte, 1, 1, f) != 1) goto close_file; - h = byte; + if (!read_uchar(map, fsize, &position, &th)) goto close_file; + h = th; if (h <= 0) h = 256; - if (fread(&byte, 1, 1, f) != 1) goto close_file; - cols = byte; + if (!read_uchar(map, fsize, &position, &tcols)) goto close_file; + cols = tcols; if (cols <= 0) cols = 256; - if (fread(&byte, 1, 1, f) != 1) goto close_file; - if (!read_ushort(f, &word)) goto close_file; + if (!read_uchar(map, fsize, &position, &byte)) goto close_file; + if (!read_ushort(map, fsize, &position, &word)) goto close_file; if (type == CURSOR) planes = word; else hot_x = word; - if (!read_ushort(f, &word)) goto close_file; + if (!read_ushort(map, fsize, &position, &word)) goto close_file; if (type == CURSOR) bpp = word; else hot_y = word; - if (!read_uint(f, &bmsize)) goto close_file; - if (!read_uint(f, &bmoffset)) goto close_file; + if (!read_uint(map, fsize, &position, &bmsize)) goto close_file; + if (!read_uint(map, fsize, &position, &bmoffset)) goto close_file; if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file; if (search == BIGGEST) { @@ -245,7 +274,7 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key } } if (chosen.bmoffset == 0) goto close_file; - if (fseek(f, chosen.bmoffset, SEEK_SET) != 0) goto close_file; + position = chosen.bmoffset; w = chosen.w; h = chosen.h; @@ -263,23 +292,28 @@ evas_image_load_file_head_ico(Image_Entry *ie, const char *file, const char *key ie->w = w; ie->h = h; if (hasa) ie->flags.alpha = 1; - - fclose(f); + + eina_file_map_free(f, map); + eina_file_close(f); + *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; close_file: - fclose(f); + if (map) eina_file_map_free(f, map); + eina_file_close(f); return EINA_FALSE; } static Eina_Bool evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key, int *error) { + Eina_File *f; + void *map = NULL; + size_t position = 0; unsigned short word; unsigned char byte; unsigned int dword; - FILE *f; int wanted_w = 0, wanted_h = 0, w, h, cols, i, planes = 0, hot_x = 0, hot_y = 0, bpp = 0, pdelta, search = -1, have_choice = 0, stride, pstride, j, right_way_up = 0, diff_size = 0, cols2; @@ -296,7 +330,7 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key unsigned int bmoffset, bmsize; } chosen = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - f = fopen(file, "rb"); + f = eina_file_open(file, EINA_FALSE); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; @@ -304,11 +338,12 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key } *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; - fseek(f, 0, SEEK_END); - fsize = ftell(f); - fseek(f, 0, SEEK_SET); + fsize = eina_file_size_get(f); if (fsize < (6 + 16 + 40)) goto close_file; + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto close_file; + // key: // NULL == highest res // biggest == highest res @@ -325,11 +360,11 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key wanted_h = ie->load_opts.h; search = SMALLER; } - - if (!read_ushort(f, &reserved)) goto close_file; - if (!read_ushort(f, &type)) goto close_file; - if (!read_ushort(f, &count)) goto close_file; - if (!((reserved == 0) && + + if (!read_ushort(map, fsize, &position, &reserved)) goto close_file; + if (!read_ushort(map, fsize, &position, &type)) goto close_file; + if (!read_ushort(map, fsize, &position, &count)) goto close_file; + if (!((reserved == 0) && ((type == ICON) || (type == CURSOR)) && (count > 0))) goto close_file; *error = EVAS_LOAD_ERROR_CORRUPT_FILE; @@ -363,24 +398,25 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key } for (i = 0; i < count; i++) { - if (fread(&byte, 1, 1, f) != 1) goto close_file; - w = byte; + unsigned char tw = 0, th = 0, tcols = 0; + if (!read_uchar(map, fsize, &position, &tw)) goto close_file; + w = tw; if (w <= 0) w = 256; - if (fread(&byte, 1, 1, f) != 1) goto close_file; - h = byte; + if (!read_uchar(map, fsize, &position, &th)) goto close_file; + h = th; if (h <= 0) h = 256; - if (fread(&byte, 1, 1, f) != 1) goto close_file; - cols = byte; + if (!read_uchar(map, fsize, &position, &tcols)) goto close_file; + cols = tcols; if (cols <= 0) cols = 256; - if (fread(&byte, 1, 1, f) != 1) goto close_file; - if (!read_ushort(f, &word)) goto close_file; + if (!read_uchar(map, fsize, &position, &byte)) goto close_file; + if (!read_ushort(map, fsize, &position, &word)) goto close_file; if (type == 1) planes = word; else hot_x = word; - if (!read_ushort(f, &word)) goto close_file; + if (!read_ushort(map, fsize, &position, &word)) goto close_file; if (type == 1) bpp = word; else hot_y = word; - if (!read_uint(f, &bmsize)) goto close_file; - if (!read_uint(f, &bmoffset)) goto close_file; + if (!read_uint(map, fsize, &position, &bmsize)) goto close_file; + if (!read_uint(map, fsize, &position, &bmoffset)) goto close_file; if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file; if (search == BIGGEST) { @@ -467,7 +503,7 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key } } if (chosen.bmoffset == 0) goto close_file; - if (fseek(f, chosen.bmoffset, SEEK_SET) != 0) goto close_file; + position = chosen.bmoffset; w = chosen.w; h = chosen.h; @@ -477,8 +513,8 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key if (((int)ie->w != w) || ((int)ie->h != h)) goto close_file; // read bmp header time... let's do some checking - if (!read_uint(f, &dword)) goto close_file; // headersize - dont care - if (!read_uint(f, &dword)) goto close_file; // width + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // headersize - dont care + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // width if (dword > 0) { if ((int)dword != w) @@ -487,7 +523,7 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key diff_size = 1; } } - if (!read_uint(f, &dword)) goto close_file; // height + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // height if (dword > 0) { if ((int)dword != (h * 2)) @@ -503,19 +539,19 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key " May be expanded or cropped.", file, ie->w, ie->h, w, h); } - if (!read_ushort(f, &word)) goto close_file; // planes + if (!read_ushort(map, fsize, &position, &word)) goto close_file; // planes planes2 = word; - if (!read_ushort(f, &word)) goto close_file; // bitcount + if (!read_ushort(map, fsize, &position, &word)) goto close_file; // bitcount bitcount = word; - if (!read_uint(f, &dword)) goto close_file; // compression + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // compression compression = dword; - if (!read_uint(f, &dword)) goto close_file; // imagesize + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // imagesize imagesize = dword; - if (!read_uint(f, &dword)) goto close_file; // z pixels per m - if (!read_uint(f, &dword)) goto close_file; // y pizels per m - if (!read_uint(f, &dword)) goto close_file; // colors used + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // z pixels per m + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // y pizels per m + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // colors used colorsused = dword; - if (!read_uint(f, &dword)) goto close_file; // colors important + if (!read_uint(map, fsize, &position, &dword)) goto close_file; // colors important colorsimportant = dword; evas_cache_image_surface_alloc(ie, ie->w, ie->h); @@ -545,11 +581,11 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key for (i = 0; i < cols; i++) { unsigned char a, r, g, b; - - if (fread(&b, 1, 1, f) != 1) goto close_file; - if (fread(&g, 1, 1, f) != 1) goto close_file; - if (fread(&r, 1, 1, f) != 1) goto close_file; - if (fread(&a, 1, 1, f) != 1) goto close_file; + + if (!read_uchar(map, fsize, &position, &b)) goto close_file; + if (!read_uchar(map, fsize, &position, &g)) goto close_file; + if (!read_uchar(map, fsize, &position, &r)) goto close_file; + if (!read_uchar(map, fsize, &position, &a)) goto close_file; a = 0xff; pal[i] = ARGB_JOIN(a, r, g, b); } @@ -563,7 +599,7 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key { pix = surface + (i * ie->w); if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); - if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ie->h) continue; for (j = 0; j < w; j++) @@ -613,7 +649,7 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key { pix = surface + (i * ie->w); if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); - if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ie->h) continue; for (j = 0; j < w; j++) @@ -639,7 +675,7 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key { pix = surface + (i * ie->w); if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); - if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ie->h) continue; for (j = 0; j < w; j++) @@ -658,13 +694,13 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key { pix = surface + (i * ie->w); if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); - if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ie->h) continue; for (j = 0; j < w; j++) { unsigned char a, r, g, b; - + if (j >= (int)ie->w) break; b = p[0]; g = p[1]; @@ -683,13 +719,13 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key { pix = surface + (i * ie->w); if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); - if (fread(pixbuf, pstride, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ie->h) continue; for (j = 0; j < w; j++) { unsigned char a, r, g, b; - + if (j >= (int)ie->w) break; b = p[0]; g = p[1]; @@ -704,13 +740,13 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key } if (!none_zero_alpha) { - if (fread(maskbuf, stride * 4 * h, 1, f) != 1) goto close_file; + if (!read_mem(map, fsize, &position, maskbuf, stride * 4 * h)) goto close_file; // apply mask pix = surface; for (i = 0; i < h; i++) { unsigned char *m; - + pix = surface + (i * ie->w); if (!right_way_up) pix = surface + ((ie->h - 1 - i) * ie->w); m = maskbuf + (stride * i * 4); @@ -727,15 +763,17 @@ evas_image_load_file_data_ico(Image_Entry *ie, const char *file, const char *key } } } - - fclose(f); - + + eina_file_map_free(f, map); + eina_file_close(f); + evas_common_image_premul(ie); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; close_file: - fclose(f); + if (map) eina_file_map_free(f, map); + eina_file_close(f); return EINA_FALSE; } diff --git a/libraries/evas/src/modules/loaders/jpeg/Makefile.in b/libraries/evas/src/modules/loaders/jpeg/Makefile.in index ce4b194..7c0ca18 100644 --- a/libraries/evas/src/modules/loaders/jpeg/Makefile.in +++ b/libraries/evas/src/modules/loaders/jpeg/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c b/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c index 0dbabab..797c76d 100644 --- a/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c +++ b/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c @@ -46,7 +46,8 @@ static Evas_Image_Load_Func evas_image_load_jpeg_func = EINA_TRUE, evas_image_load_file_head_jpeg, evas_image_load_file_data_jpeg, - NULL + NULL, + EINA_TRUE }; diff --git a/libraries/evas/src/modules/loaders/pmaps/Makefile.in b/libraries/evas/src/modules/loaders/pmaps/Makefile.in index de7b779..745e79b 100644 --- a/libraries/evas/src/modules/loaders/pmaps/Makefile.in +++ b/libraries/evas/src/modules/loaders/pmaps/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c b/libraries/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c index 9ba8f81..393e407 100644 --- a/libraries/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c +++ b/libraries/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c @@ -19,7 +19,8 @@ Evas_Image_Load_Func evas_image_load_pmaps_func = { EINA_TRUE, evas_image_load_file_head_pmaps, evas_image_load_file_data_pmaps, - NULL + NULL, + EINA_FALSE }; /* The buffer to load pmaps images */ @@ -27,7 +28,9 @@ typedef struct Pmaps_Buffer Pmaps_Buffer; struct Pmaps_Buffer { - FILE *file; + Eina_File *file; + void *map; + size_t position; /* the buffer */ DATA8 buffer[FILE_BUFFER_SIZE]; @@ -160,13 +163,23 @@ pmaps_buffer_open(Pmaps_Buffer *b, const char *filename, int *error) { size_t len; - b->file = fopen(filename, "rb"); + b->file = eina_file_open(filename, EINA_FALSE); if (!b->file) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } + b->map = eina_file_map_all(b->file, EINA_FILE_SEQUENTIAL); + if (!b->map) + { + *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; + eina_file_close(b->file); + b->file = NULL; + return EINA_FALSE; + } + + b->position = 0; *b->buffer = 0; *b->unread = 0; b->last_buffer = 0; @@ -177,7 +190,9 @@ pmaps_buffer_open(Pmaps_Buffer *b, const char *filename, int *error) if (len < 3) { *error = EVAS_LOAD_ERROR_CORRUPT_FILE; - fclose(b->file); + eina_file_map_free(b->file, b->map); + eina_file_close(b->file); + b->map = NULL; b->file = NULL; return EINA_FALSE; } @@ -197,7 +212,12 @@ static void pmaps_buffer_close(Pmaps_Buffer *b) { if (b->file) - fclose(b->file); + { + if (b->map) eina_file_map_free(b->file, b->map); + b->map = NULL; + eina_file_close(b->file); + b->file = NULL; + } } static Eina_Bool @@ -295,6 +315,7 @@ static size_t pmaps_buffer_plain_update(Pmaps_Buffer *b) { size_t r; + size_t max; /* if we already are in the last buffer we can not update it */ if (b->last_buffer) @@ -304,9 +325,14 @@ pmaps_buffer_plain_update(Pmaps_Buffer *b) * stuff */ if (b->unread_len) memcpy(b->buffer, b->unread, b->unread_len); - - r = fread(&b->buffer[b->unread_len], 1, - FILE_BUFFER_SIZE - b->unread_len - 1, b->file) + b->unread_len; + + max = FILE_BUFFER_SIZE - b->unread_len - 1; + if (b->position + max > eina_file_size_get(b->file)) + max = eina_file_size_get(b->file) - b->position; + + memcpy(&b->buffer[b->unread_len], b->map + b->position, max); + b->position += max; + r = max + b->unread_len; /* we haven't read anything nor have we bytes in the unread buffer */ if (r == 0) @@ -324,7 +350,7 @@ pmaps_buffer_plain_update(Pmaps_Buffer *b) } b->buffer[r] = 0; - + b->unread[0] = '\0'; b->unread_len = 0; @@ -339,6 +365,7 @@ static size_t pmaps_buffer_raw_update(Pmaps_Buffer *b) { size_t r; + size_t max; if (b->last_buffer) return 0; @@ -346,8 +373,13 @@ pmaps_buffer_raw_update(Pmaps_Buffer *b) if (b->unread_len) memcpy(b->buffer, b->unread, b->unread_len); - r = fread(&b->buffer[b->unread_len], 1, FILE_BUFFER_SIZE - b->unread_len, - b->file) + b->unread_len; + max = FILE_BUFFER_SIZE - b->unread_len; + if (b->position + max > eina_file_size_get(b->file)) + max = eina_file_size_get(b->file) - b->position; + + memcpy(&b->buffer[b->unread_len], b->map + b->position, max); + b->position += max; + r = max + b->unread_len; if (r < FILE_BUFFER_SIZE) { diff --git a/libraries/evas/src/modules/loaders/png/Makefile.in b/libraries/evas/src/modules/loaders/png/Makefile.in index 0717299..3bd4919 100644 --- a/libraries/evas/src/modules/loaders/png/Makefile.in +++ b/libraries/evas/src/modules/loaders/png/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/png/evas_image_load_png.c b/libraries/evas/src/modules/loaders/png/evas_image_load_png.c index a1480ae..3007a57 100644 --- a/libraries/evas/src/modules/loaders/png/evas_image_load_png.c +++ b/libraries/evas/src/modules/loaders/png/evas_image_load_png.c @@ -35,7 +35,8 @@ static Evas_Image_Load_Func evas_image_load_png_func = EINA_TRUE, evas_image_load_file_head_png, evas_image_load_file_data_png, - NULL + NULL, + EINA_FALSE }; static Eina_Bool diff --git a/libraries/evas/src/modules/loaders/psd/Makefile.in b/libraries/evas/src/modules/loaders/psd/Makefile.in index 98d340a..3dc9c38 100644 --- a/libraries/evas/src/modules/loaders/psd/Makefile.in +++ b/libraries/evas/src/modules/loaders/psd/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c b/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c index 5a85e17..27f5f24 100644 --- a/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c +++ b/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c @@ -61,48 +61,57 @@ enum { }; static Eina_Bool get_compressed_channels_length(PSD_Header *Head, - FILE *file, + const unsigned char *map, size_t length, size_t *position, unsigned short *rle_table, unsigned int *chanlen); static int -read_ushort(FILE *file, unsigned short *ret) +read_ushort(const unsigned char *map, size_t length, size_t *position, unsigned short *ret) { - unsigned char b[2]; - if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0; + if (*position + 2 > length) return 0; // FIXME: need to check order - *ret = (b[0] << 8) | b[1]; + *ret = (map[(*position) + 0] << 8) | map[(*position) + 1]; + *position += 2; return 1; } static int -read_uint(FILE *file, unsigned int *ret) +read_uint(const unsigned char *map, size_t length, size_t *position, unsigned int *ret) { - unsigned char b[4]; - if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0; + if (*position + 4 > length) return 0; // FIXME: need to check order - *ret = ARGB_JOIN(b[0], b[1], b[2], b[3]); + *ret = ARGB_JOIN(map[(*position) + 0], map[(*position) + 1], map[(*position) + 2], map[(*position) + 3]); + *position += 4; + return 1; +} + +static int +read_block(const unsigned char *map, size_t length, size_t *position, void *target, size_t size) +{ + if (*position + size > length) return 0; + memcpy(target, map + *position, size); + *position += size; return 1; } // Internal function used to get the Psd header from the current file. Eina_Bool -psd_get_header(PSD_Header *header, FILE * file) +psd_get_header(PSD_Header *header, const unsigned char *map, size_t length, size_t *position) { unsigned short tmp; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return EINA_FALSE; +#define CHECK_RET(Call) \ + if (!Call) return EINA_FALSE; - CHECK_RET(fread(header->signature, sizeof (unsigned char), 4, file), 4); - CHECK_RET(read_ushort(file, &header->version), 1); - CHECK_RET(fread(header->reserved, sizeof (unsigned char), 6, file), 6); - CHECK_RET(read_ushort(file, &header->channels), 1); - CHECK_RET(read_uint(file, &header->height), 1); - CHECK_RET(read_uint(file, &header->width), 1); - CHECK_RET(read_ushort(file, &header->depth), 1); + CHECK_RET(read_block(map, length, position, header->signature, 4)); + CHECK_RET(read_ushort(map, length, position, &header->version)); + CHECK_RET(read_block(map, length, position, header->reserved, 6)); + CHECK_RET(read_ushort(map, length, position, &header->channels)); + CHECK_RET(read_uint(map, length, position, &header->height)); + CHECK_RET(read_uint(map, length, position, &header->width)); + CHECK_RET(read_ushort(map, length, position, &header->depth)); - CHECK_RET(read_ushort(file, &tmp), 1); + CHECK_RET(read_ushort(map, length, position, &tmp)); header->mode = tmp; #undef CHECK_RET @@ -144,20 +153,35 @@ static Eina_Bool evas_image_load_file_head_psd(Image_Entry *ie, const char *FileName, const char *key __UNUSED__, int *error) { - FILE *f; + Eina_File *f; + void *map; + size_t length; + size_t position; PSD_Header header; Eina_Bool correct; *error = EVAS_LOAD_ERROR_NONE; - f = fopen(FileName, "rb"); + f = eina_file_open(FileName, 0); if (f == NULL) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } - correct = psd_get_header(&header, f); - fclose(f); + + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + length = eina_file_size_get(f); + position = 0; + if (!map || length < 1) + { + eina_file_close(f); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + correct = psd_get_header(&header, map, length, &position); + + eina_file_map_free(f, map); + eina_file_close(f); if (!correct || !is_psd(&header)) { @@ -174,7 +198,7 @@ evas_image_load_file_head_psd(Image_Entry *ie, const char *FileName, } static unsigned int -read_compressed_channel(FILE* file, +read_compressed_channel(const unsigned char *map, size_t length, size_t *position, const unsigned int channel_length __UNUSED__, unsigned int size, unsigned char* channel) @@ -183,19 +207,18 @@ read_compressed_channel(FILE* file, unsigned int i; char headbyte, c; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return READ_COMPRESSED_ERROR_FILE_READ_ERROR; +#define CHECK_RET(Call) \ + if (!Call) return READ_COMPRESSED_ERROR_FILE_READ_ERROR; \ for (i = 0; i < size; ) { - CHECK_RET(fread(&headbyte, 1, 1, file), 1); + CHECK_RET(read_block(map, length, position, &headbyte, 1)); if (headbyte >= 0) { if (i + headbyte > size) - return READ_COMPRESSED_ERROR_FILE_CORRUPT; - - CHECK_RET(fread(channel + i, headbyte + 1, 1, file), 1); + return READ_COMPRESSED_ERROR_FILE_CORRUPT; + CHECK_RET(read_block(map, length, position, channel + i, headbyte + 1)); i += headbyte + 1; } @@ -203,14 +226,14 @@ read_compressed_channel(FILE* file, { int run; - CHECK_RET(fread(&c, 1, 1, file), 1); + CHECK_RET(read_block(map, length, position, &c, 1)); run = c; /* if (run == -1) */ /* return READ_COMPRESSED_ERROR_FILE_READ_ERROR; */ if (i + (-headbyte + 1) > size) - return READ_COMPRESSED_ERROR_FILE_CORRUPT; + return READ_COMPRESSED_ERROR_FILE_CORRUPT; memset(channel + i, run, -headbyte + 1); i += -headbyte + 1; @@ -226,7 +249,7 @@ read_compressed_channel(FILE* file, Eina_Bool psd_get_data(Image_Entry *ie __UNUSED__, PSD_Header *head, - FILE *f, + const unsigned char *map, size_t length, size_t *position, unsigned char *buffer, Eina_Bool compressed, int *error) { @@ -268,13 +291,12 @@ psd_get_data(Image_Entry *ie __UNUSED__, { free(data); free(channel); - fprintf(stderr, "unsupported file format.\n"); *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; return EINA_FALSE; } -#define CHECK_RET(Call, Value) \ - if (Call != Value) \ +#define CHECK_RET(Call) \ + if (!Call) \ { \ free(data); \ free(channel); \ @@ -289,7 +311,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, { unsigned char *tmp = channel; - CHECK_RET(fread(tmp, pixels_count, 1, f), 1); + CHECK_RET(read_block(map, length, position, tmp, pixels_count)); for (y = 0; y < head->height * bps; y += bps) { @@ -306,7 +328,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, { unsigned char *tmp = channel; - CHECK_RET(fread(channel, pixels_count, 1, f), 1); + CHECK_RET(read_block(map, length, position, channel, pixels_count)); for (y = 0; y < head->height * bps; y += bps) { @@ -333,7 +355,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, { unsigned short *shortptr = (unsigned short*) channel; - CHECK_RET(fread(channel, pixels_count * 2, 1, f), 1); + CHECK_RET(read_block(map, length, position, channel, pixels_count * 2)); for (y = 0; y < head->height * bps2; y += bps2) { @@ -350,7 +372,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, { unsigned short *shortptr = (unsigned short*) channel; - CHECK_RET(fread(channel, pixels_count * 2, 1, f), 1); + CHECK_RET(read_block(map, length, position, channel, pixels_count * 2)); for (y = 0; y < head->height * bps2; y += bps2) { @@ -373,7 +395,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, rle_table = alloca(head->height * head->channel_num * sizeof (unsigned short)); chanlen = alloca(head->channel_num * sizeof (unsigned int)); - if (!get_compressed_channels_length(head, f, rle_table, chanlen)) + if (!get_compressed_channels_length(head, map, length, position, rle_table, chanlen)) goto file_read_error; for (c = 0; c < numchan; c++) @@ -381,7 +403,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, unsigned char *tmp = channel; int err; - err = read_compressed_channel(f, + err = read_compressed_channel(map, length, position, chanlen[c], pixels_count, channel); @@ -416,7 +438,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, unsigned char *tmp = channel; int err; - err = read_compressed_channel(f, + err = read_compressed_channel(map, length, position, chanlen[c], pixels_count, channel); @@ -482,7 +504,7 @@ psd_get_data(Image_Entry *ie __UNUSED__, Eina_Bool get_single_channel(Image_Entry *ie __UNUSED__, PSD_Header *head, - FILE *f, + const unsigned char *map, size_t length, size_t *position, unsigned char *buffer, Eina_Bool compressed) { @@ -496,29 +518,29 @@ get_single_channel(Image_Entry *ie __UNUSED__, bpc = (head->depth / 8); pixels_count = head->width * head->height; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return EINA_FALSE; +#define CHECK_RET(Call) \ + if (!Call) return EINA_FALSE; if (!compressed) { if (bpc == 1) { - CHECK_RET(fread(buffer, pixels_count, 1, f), 1); + CHECK_RET(read_block(map, length, position, buffer, pixels_count)); } else { // Bpc == 2 - CHECK_RET(fread(buffer, pixels_count * 2, 1, f), 1); + CHECK_RET(read_block(map, length, position, buffer, pixels_count * 2)); } } else { for (i = 0; i < (unsigned int)pixels_count; ) { - CHECK_RET(fread(&headbyte, 1, 1, f), 1); + CHECK_RET(read_block(map, length, position, &headbyte, 1)); if (headbyte >= 0) { // && HeadByte <= 127 - CHECK_RET(fread(buffer + i, headbyte + 1, 1, f), 1); + CHECK_RET(read_block(map, length, position, buffer + i, headbyte + 1)); i += headbyte + 1; } @@ -526,7 +548,7 @@ get_single_channel(Image_Entry *ie __UNUSED__, { int run; - CHECK_RET(fread(&c, 1, 1, f), 1); + CHECK_RET(read_block(map, length, position, &c, 1)); run = c; if (run == -1) return EINA_FALSE; @@ -543,7 +565,7 @@ get_single_channel(Image_Entry *ie __UNUSED__, } Eina_Bool -read_psd_grey(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) +read_psd_grey(Image_Entry *ie, PSD_Header *head, const unsigned char *map, size_t length, size_t *position, int *error) { unsigned int color_mode, resource_size, misc_info; unsigned short compressed; @@ -552,22 +574,21 @@ read_psd_grey(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) *error = EVAS_LOAD_ERROR_CORRUPT_FILE; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return EINA_FALSE; +#define CHECK_RET(Call) \ + if (!Call) return EINA_FALSE; - CHECK_RET(read_uint(f, &color_mode), 1); + CHECK_RET(read_uint(map, length, position, &color_mode)); // Skip over the 'color mode data section' - CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0); + *position += color_mode; - CHECK_RET(read_uint(f, &resource_size), 1); + CHECK_RET(read_uint(map, length, position, &resource_size)); // Read the 'image resources section' + *position += resource_size; - CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0); + CHECK_RET(read_uint(map, length, position, &misc_info)); + *position += misc_info; - CHECK_RET(read_uint(f, &misc_info), 1); - CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0); - - CHECK_RET(read_ushort(f, &compressed), 1); + CHECK_RET(read_ushort(map, length, position, &compressed)); ie->w = head->width; ie->h = head->height; @@ -599,7 +620,7 @@ read_psd_grey(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) goto cleanup_error; } - if (!psd_get_data(ie, head, f, surface, compressed, error)) + if (!psd_get_data(ie, head, map, length, position, surface, compressed, error)) goto cleanup_error; return EINA_TRUE; @@ -612,7 +633,7 @@ read_psd_grey(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) Eina_Bool -read_psd_indexed(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) +read_psd_indexed(Image_Entry *ie, PSD_Header *head, const unsigned char *map, size_t length, size_t *position, int *error) { unsigned int color_mode, resource_size, misc_info; unsigned short compressed; @@ -620,11 +641,11 @@ read_psd_indexed(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) *error = EVAS_LOAD_ERROR_CORRUPT_FILE; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return EINA_FALSE; +#define CHECK_RET(Call) \ + if (!(Call)) return EINA_FALSE; - CHECK_RET(read_uint(f, &color_mode), 1); - CHECK_RET((color_mode % 3), 0); + CHECK_RET(read_uint(map, length, position, &color_mode)); + CHECK_RET(!(color_mode % 3)); /* Palette = (unsigned char*)malloc(Colormode); if (Palette == NULL) @@ -633,16 +654,16 @@ read_psd_indexed(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) goto cleanup_error; */ // Skip over the 'color mode data section' - CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0); + *position += color_mode; // Read the 'image resources section' - CHECK_RET(read_uint(f, &resource_size), 1); - CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0); + CHECK_RET(read_uint(map, length, position, &resource_size)); + *position += resource_size; - CHECK_RET(read_uint(f, &misc_info), 1); - CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0); + CHECK_RET(read_uint(map, length, position, &misc_info)); + *position += misc_info; - CHECK_RET(read_ushort(f, &compressed), 1); + CHECK_RET(read_ushort(map, length, position, &compressed)); if (head->channels != 1 || head->depth != 8) { @@ -664,7 +685,7 @@ read_psd_indexed(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) return EINA_FALSE; } - if (!psd_get_data(ie, head, f, surface, compressed, error)) + if (!psd_get_data(ie, head, map, length, position, surface, compressed, error)) return EINA_FALSE; return EINA_TRUE; @@ -672,28 +693,28 @@ read_psd_indexed(Image_Entry *ie, PSD_Header *head, FILE * f, int *error) } Eina_Bool -read_psd_rgb(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) +read_psd_rgb(Image_Entry *ie, PSD_Header *head, const unsigned char *map, size_t length, size_t *position, int *error) { unsigned int color_mode, resource_size, misc_info; unsigned short compressed; unsigned int type; void *surface; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return EINA_FALSE; +#define CHECK_RET(Call) \ + if (!Call) return EINA_FALSE; - CHECK_RET(read_uint(f, &color_mode), 1); + CHECK_RET(read_uint(map, length, position, &color_mode)); // Skip over the 'color mode data section' - CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0); + *position += color_mode; // Read the 'image resources section' - CHECK_RET(read_uint(f, &resource_size), 1); - CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0); + CHECK_RET(read_uint(map, length, position, &resource_size)); + *position += resource_size; - CHECK_RET(read_uint(f, &misc_info), 1); - CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0); + CHECK_RET(read_uint(map, length, position, &misc_info)); + *position += misc_info; - CHECK_RET(read_ushort(f, &compressed), 1); + CHECK_RET(read_ushort(map, length, position, &compressed)); head->channel_num = head->channels; @@ -722,7 +743,7 @@ read_psd_rgb(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) goto cleanup_error; } - if (!psd_get_data(ie, head, f, surface, compressed, error)) + if (!psd_get_data(ie, head, map, length, position, surface, compressed, error)) goto cleanup_error; evas_common_image_premul(ie); @@ -735,7 +756,7 @@ read_psd_rgb(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) } Eina_Bool -read_psd_cmyk(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) +read_psd_cmyk(Image_Entry *ie, PSD_Header *head, const unsigned char *map, size_t length, size_t *position, int *error) { unsigned int color_mode, resource_size, misc_info, size, i, j, data_size; unsigned short compressed; @@ -745,21 +766,21 @@ read_psd_cmyk(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) *error = EVAS_LOAD_ERROR_CORRUPT_FILE; -#define CHECK_RET(Call, Value) \ - if (Call != Value) return EINA_FALSE; +#define CHECK_RET(Call) \ + if (!Call) return EINA_FALSE; - CHECK_RET(read_uint(f, &color_mode), 1); + CHECK_RET(read_uint(map, length, position, &color_mode)); // Skip over the 'color mode data section' - CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0); + *position += color_mode; - CHECK_RET(read_uint(f, &resource_size), 1); + CHECK_RET(read_uint(map, length, position, &resource_size)); // Read the 'image resources section' - CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0); + *position += resource_size; - CHECK_RET(read_uint(f, &misc_info), 1); - CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0); + CHECK_RET(read_uint(map, length, position, &misc_info)); + *position += misc_info; - CHECK_RET(read_ushort(f, &compressed), 1); + CHECK_RET(read_ushort(map, length, position, &compressed)); switch (head->channels) { @@ -804,14 +825,14 @@ read_psd_cmyk(Image_Entry *ie, PSD_Header *head, FILE *f, int *error) goto cleanup_error; } - if (!psd_get_data(ie, head, f, surface, compressed, error)) + if (!psd_get_data(ie, head, map, length, position, surface, compressed, error)) goto cleanup_error; size = type * ie->w * ie->h; kchannel = malloc(size); if (kchannel == NULL) goto cleanup_error; - if (!get_single_channel(ie, head, f, kchannel, compressed)) + if (!get_single_channel(ie, head, map, length, position, kchannel, compressed)) goto cleanup_error; data_size = head->channels * type * ie->w * ie->h; @@ -861,20 +882,34 @@ evas_image_load_file_data_psd(Image_Entry *ie, const char *key __UNUSED__, int *error) { - FILE *f; + Eina_File *f; + void *map; + size_t length; + size_t position; PSD_Header header; Eina_Bool bpsd = EINA_FALSE; - f = fopen(file, "rb"); + f = eina_file_open(file, 0); if (f == NULL) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return bpsd; } - if (!psd_get_header(&header, f) || !is_psd(&header)) + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + length = eina_file_size_get(f); + position = 0; + if (!map || length < 1) + { + eina_file_close(f); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; + return EINA_FALSE; + } + + if (!psd_get_header(&header, map, length, &position) || !is_psd(&header)) { - fclose(f); + eina_file_map_free(f, map); + eina_file_close(f); *error = EVAS_LOAD_ERROR_GENERIC; return EINA_FALSE; } @@ -887,39 +922,39 @@ evas_image_load_file_data_psd(Image_Entry *ie, switch (header.mode) { case PSD_GREYSCALE: // Greyscale - bpsd = read_psd_grey(ie, &header, f, error); + bpsd = read_psd_grey(ie, &header, map, length, &position, error); break; case PSD_INDEXED: // Indexed - bpsd = read_psd_indexed(ie, &header, f, error); + bpsd = read_psd_indexed(ie, &header, map, length, &position, error); break; case PSD_RGB: // RGB - bpsd = read_psd_rgb(ie, &header, f, error); + bpsd = read_psd_rgb(ie, &header, map, length, &position, error); break; case PSD_CMYK: // CMYK - bpsd = read_psd_cmyk(ie, &header, f, error); + bpsd = read_psd_cmyk(ie, &header, map, length, &position, error); break; default : *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; bpsd = EINA_FALSE; } - fclose(f); + + eina_file_map_free(f, map); + eina_file_close(f); return bpsd; } static Eina_Bool get_compressed_channels_length(PSD_Header *head, - FILE * file, + const unsigned char *map, size_t length, size_t *position, unsigned short *rle_table, unsigned int *chanlen) { unsigned int j; unsigned int c; - if (fread(rle_table, - sizeof(unsigned short), - head->height * head->channel_num, - file) != head->height * head->channel_num) + if (!read_block(map, length, position, rle_table, + sizeof (unsigned short) * head->height * head->channel_num)) return EINA_FALSE; memset(chanlen, 0, head->channel_num * sizeof(unsigned int)); @@ -941,7 +976,8 @@ static const Evas_Image_Load_Func evas_image_load_psd_func = { EINA_TRUE, evas_image_load_file_head_psd, evas_image_load_file_data_psd, - NULL + NULL, + EINA_FALSE }; static int diff --git a/libraries/evas/src/modules/loaders/svg/Makefile.in b/libraries/evas/src/modules/loaders/svg/Makefile.in index f81a3c3..b742842 100644 --- a/libraries/evas/src/modules/loaders/svg/Makefile.in +++ b/libraries/evas/src/modules/loaders/svg/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/svg/evas_image_load_svg.c b/libraries/evas/src/modules/loaders/svg/evas_image_load_svg.c index f1c8452..dc0fc8d 100644 --- a/libraries/evas/src/modules/loaders/svg/evas_image_load_svg.c +++ b/libraries/evas/src/modules/loaders/svg/evas_image_load_svg.c @@ -13,7 +13,8 @@ Evas_Image_Load_Func evas_image_load_svg_func = EINA_FALSE, evas_image_load_file_head_svg, evas_image_load_file_data_svg, - NULL + NULL, + EINA_FALSE }; static int rsvg_initialized = 0; diff --git a/libraries/evas/src/modules/loaders/tga/Makefile.in b/libraries/evas/src/modules/loaders/tga/Makefile.in index 645c77a..4d822d1 100644 --- a/libraries/evas/src/modules/loaders/tga/Makefile.in +++ b/libraries/evas/src/modules/loaders/tga/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c b/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c index 61b99f6..9b4073c 100644 --- a/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c +++ b/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c @@ -65,7 +65,8 @@ static Evas_Image_Load_Func evas_image_load_tga_func = EINA_TRUE, evas_image_load_file_head_tga, evas_image_load_file_data_tga, - NULL + NULL, + EINA_FALSE }; static Eina_Bool diff --git a/libraries/evas/src/modules/loaders/tiff/Makefile.in b/libraries/evas/src/modules/loaders/tiff/Makefile.in index a2deea7..2b102a1 100644 --- a/libraries/evas/src/modules/loaders/tiff/Makefile.in +++ b/libraries/evas/src/modules/loaders/tiff/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/tiff/evas_image_load_tiff.c b/libraries/evas/src/modules/loaders/tiff/evas_image_load_tiff.c index b9bea91..e17d5a6 100644 --- a/libraries/evas/src/modules/loaders/tiff/evas_image_load_tiff.c +++ b/libraries/evas/src/modules/loaders/tiff/evas_image_load_tiff.c @@ -34,7 +34,8 @@ static Evas_Image_Load_Func evas_image_load_tiff_func = EINA_TRUE, evas_image_load_file_head_tiff, evas_image_load_file_data_tiff, - NULL + NULL, + EINA_FALSE }; typedef struct TIFFRGBAImage_Extra TIFFRGBAImage_Extra; diff --git a/libraries/evas/src/modules/loaders/wbmp/Makefile.in b/libraries/evas/src/modules/loaders/wbmp/Makefile.in index 41a3bb9..5c01e1c 100644 --- a/libraries/evas/src/modules/loaders/wbmp/Makefile.in +++ b/libraries/evas/src/modules/loaders/wbmp/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/wbmp/evas_image_load_wbmp.c b/libraries/evas/src/modules/loaders/wbmp/evas_image_load_wbmp.c index fa6fab2..54e28d5 100644 --- a/libraries/evas/src/modules/loaders/wbmp/evas_image_load_wbmp.c +++ b/libraries/evas/src/modules/loaders/wbmp/evas_image_load_wbmp.c @@ -19,21 +19,22 @@ static Evas_Image_Load_Func evas_image_load_wbmp_func = EINA_TRUE, evas_image_load_file_head_wbmp, evas_image_load_file_data_wbmp, - NULL + NULL, + EINA_FALSE }; static int -read_mb(unsigned int *data, FILE *f) +read_mb(unsigned int *data, void *map, size_t length, size_t *position) { int ac = 0, ct; unsigned char buf; - + for (ct = 0;;) { if ((ct++) == 5) return -1; - if ((fread(&buf, 1, 1, f)) < 1) - return -1; + if (*position > length) return -1; + buf = ((unsigned char *) map)[(*position)++]; ac = (ac << 7) | (buf & 0x7f); if ((buf & 0x80) == 0) break; } @@ -44,70 +45,105 @@ read_mb(unsigned int *data, FILE *f) static Eina_Bool evas_image_load_file_head_wbmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) { - FILE *f; + Eina_File *f; + void *map = NULL; + size_t position = 0; + size_t length; unsigned int type, w, h; - unsigned char fixed_header; - struct stat statbuf; - + *error = EVAS_LOAD_ERROR_GENERIC; - f = fopen(file, "rb"); + f = eina_file_open(file, 0); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } - - if (stat(file, &statbuf) == -1) goto bail; - if (read_mb(&type, f) < 0) goto bail; - + + length = eina_file_size_get(f); + if (length <= 4) goto bail; + + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto bail; + + if (read_mb(&type, map, length, &position) < 0) goto bail; + if (type != 0) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; goto bail; } - - if (fread(&fixed_header, 1, 1, f) != 1) goto bail; - if (read_mb(&w, f) < 0) goto bail; - if (read_mb(&h, f) < 0) goto bail; + + position++; /* skipping one byte */ + if (read_mb(&w, map, length, &position) < 0) goto bail; + if (read_mb(&h, map, length, &position) < 0) goto bail; if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || IMG_TOO_BIG(w, h)) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto bail; } - - fclose(f); + + eina_file_map_free(f, map); + eina_file_close(f); ie->w = w; ie->h = h; - + *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; bail: - fclose(f); + if (map) eina_file_map_free(f, map); + eina_file_close(f); return EINA_FALSE; } static Eina_Bool evas_image_load_file_data_wbmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) { - FILE *f; - unsigned int dummy, line_length; + Eina_File *f; + void *map = NULL; + size_t position = 0; + size_t length; + unsigned int type, w, h; + unsigned int line_length; unsigned char *line = NULL; int cur = 0, x, y; DATA32 *dst_data; - + *error = EVAS_LOAD_ERROR_GENERIC; - f = fopen(file, "rb"); + f = eina_file_open(file, EINA_FALSE); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } - if (read_mb(&dummy, f) < 0) goto bail; - if (fread(&dummy, 1, 1, f) != 1) goto bail; - if (read_mb(&dummy, f) < 0) goto bail; - if (read_mb(&dummy, f) < 0) goto bail; - + + length = eina_file_size_get(f); + if (length <= 4) goto bail; + + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) goto bail; + + if (read_mb(&type, map, length, &position) < 0) goto bail; + position++; /* skipping one byte */ + if (read_mb(&w, map, length, &position) < 0) goto bail; + if (read_mb(&h, map, length, &position) < 0) goto bail; + + if (type != 0) + { + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + goto bail; + } + + if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || + IMG_TOO_BIG(w, h)) + { + *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; + goto bail; + } + + ie->w = w; + ie->h = h; + evas_cache_image_surface_alloc(ie, ie->w, ie->h); dst_data = evas_cache_image_pixels(ie); if (!dst_data) @@ -115,13 +151,14 @@ evas_image_load_file_data_wbmp(Image_Entry *ie, const char *file, const char *ke *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto bail; } - + line_length = (ie->w + 7) >> 3; - line = alloca(line_length); - + for (y = 0; y < (int)ie->h; y++) { - if (fread(line, 1, line_length, f) != line_length) goto bail; + if (position + line_length > length) goto bail; + line = ((unsigned char*) map) + position; + position += line_length; for (x = 0; x < (int)ie->w; x++) { int idx = x >> 3; @@ -131,11 +168,13 @@ evas_image_load_file_data_wbmp(Image_Entry *ie, const char *file, const char *ke cur++; } } - fclose(f); + eina_file_map_free(f, map); + eina_file_close(f); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; bail: - fclose(f); + if (map) eina_file_map_free(f, map); + eina_file_close(f); return EINA_FALSE; } diff --git a/libraries/evas/src/modules/loaders/xpm/Makefile.in b/libraries/evas/src/modules/loaders/xpm/Makefile.in index eba8f60..6383d9e 100644 --- a/libraries/evas/src/modules/loaders/xpm/Makefile.in +++ b/libraries/evas/src/modules/loaders/xpm/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/loaders/xpm/evas_image_load_xpm.c b/libraries/evas/src/modules/loaders/xpm/evas_image_load_xpm.c index 3a04f84..c764f6d 100644 --- a/libraries/evas/src/modules/loaders/xpm/evas_image_load_xpm.c +++ b/libraries/evas/src/modules/loaders/xpm/evas_image_load_xpm.c @@ -24,16 +24,20 @@ static Evas_Image_Load_Func evas_image_load_xpm_func = EINA_FALSE, evas_image_load_file_head_xpm, evas_image_load_file_data_xpm, - NULL + NULL, + EINA_FALSE }; -// TODO: REWRITE THIS WITH THREAD SAFE VERSION NOT USING THIS HANDLE!!!! -static FILE *rgb_txt = NULL; +static Eina_File *rgb_txt; +static void *rgb_txt_map; static void xpm_parse_color(char *color, int *r, int *g, int *b) { - char buf[4096]; + char *tmp; + char *max; + char *endline; + char buf[4096]; /* is a #ff00ff like color */ if (color[0] == '#') @@ -75,20 +79,23 @@ xpm_parse_color(char *color, int *r, int *g, int *b) return; } /* look in rgb txt database */ - if (!rgb_txt) rgb_txt = fopen("/usr/lib/X11/rgb.txt", "r"); - if (!rgb_txt) rgb_txt = fopen("/usr/X11/lib/X11/rgb.txt", "r"); - if (!rgb_txt) rgb_txt = fopen("/usr/X11R6/lib/X11/rgb.txt", "r"); - if (!rgb_txt) rgb_txt = fopen("/usr/openwin/lib/X11/rgb.txt", "r"); if (!rgb_txt) return; - fseek(rgb_txt, 0, SEEK_SET); - while (fgets(buf, sizeof(buf), rgb_txt)) + tmp = rgb_txt_map; + max = tmp + eina_file_size_get(rgb_txt); + + while (tmp < max) { - buf[sizeof(buf) - 1] = 0; - if (buf[0] != '!') + endline = memchr(tmp, '\n', max - tmp); + if (!endline) endline = max; + if ((*tmp != '!') && ((endline - tmp) < (int) (sizeof(buf) - 1))) { int rr, gg, bb; char name[4096]; + /* FIXME: not really efficient */ + memcpy(buf, tmp, endline - tmp); + buf[endline - tmp + 1] = '\0'; + if (sscanf(buf, "%i %i %i %[^\n]", &rr, &gg, &bb, name) == 4) { if (!strcasecmp(name, color)) @@ -100,33 +107,30 @@ xpm_parse_color(char *color, int *r, int *g, int *b) } } } + tmp = endline + 1; } } -static void -xpm_parse_done(void) -{ - if (rgb_txt) fclose(rgb_txt); - rgb_txt = NULL; -} - - /** FIXME: clean this up and make more efficient **/ static Eina_Bool evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UNUSED__, int load_data, int *error) { DATA32 *ptr, *end; - FILE *f; + Eina_File *f; + const char *map; + size_t length; + size_t position; int pc, c, i, j, k, w, h, ncolors, cpp, comment, transp, quote, context, len, done, r, g, b, backslash, lu1, lu2; - char *line, s[256], tok[128], col[256], *tl; + char *line = NULL; + char s[256], tok[128], col[256], *tl; int lsz = 256; struct _cmap { char str[6]; unsigned char transp; short r, g, b; - } *cmap; + } *cmap = NULL; short lookup[128 - 32][128 - 32]; int count, pixels; @@ -138,30 +142,39 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN /* if immediate_load is 1, then dont delay image laoding as below, or */ /* already data in this image - dont load it again */ - f = fopen(file, "rb"); + f = eina_file_open(file, 0); if (!f) { - xpm_parse_done(); + ERR("XPM ERROR: file failed to open"); *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } - if (fread(s, 9, 1, f) != 1) + length = eina_file_size_get(f); + position = 0; + if (length < 9) { - fclose(f); - xpm_parse_done(); + ERR("XPM ERROR: file size, %i, is to small", length); + eina_file_close(f); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } - rewind(f); - s[9] = 0; - if (strcmp("/* XPM */", s)) + + map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + if (!map) { - fclose(f); - xpm_parse_done(); - *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + ERR("XPM ERROR: file failed to mmap"); + eina_file_close(f); + *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } + if (strncmp("/* XPM */", map, 9)) + { + ERR("XPM ERROR: header not found"); + *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; + goto on_error; + } + i = 0; j = 0; cmap = NULL; @@ -178,10 +191,8 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN line = malloc(lsz); if (!line) { - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - return EINA_FALSE; + goto on_error; } backslash = 0; @@ -189,8 +200,8 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN while (!done) { pc = c; - c = fgetc(f); - if (c == EOF) break; + if (position == length) break ; + c = (char) map[position++]; if (!quote) { if ((pc == '/') && (c == '*')) @@ -215,56 +226,38 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN if (sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp) != 4) { ERR("XPM ERROR: XPM file malformed header"); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; - return EINA_FALSE; + goto on_error; } if ((ncolors > 32766) || (ncolors < 1)) { ERR("XPM ERROR: XPM files with colors > 32766 or < 1 not supported"); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; - return EINA_FALSE; + goto on_error; } if ((cpp > 5) || (cpp < 1)) { ERR("XPM ERROR: XPM files with characters per pixel > 5 or < 1not supported"); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; - return EINA_FALSE; + goto on_error; } if ((w > IMG_MAX_SIZE) || (w < 1)) { ERR("XPM ERROR: Image width > IMG_MAX_SIZE or < 1 pixels for file"); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_GENERIC; - return EINA_FALSE; + goto on_error; } if ((h > IMG_MAX_SIZE) || (h < 1)) { ERR("XPM ERROR: Image height > IMG_MAX_SIZE or < 1 pixels for file"); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_GENERIC; - return EINA_FALSE; + goto on_error; } if (IMG_TOO_BIG(w, h)) { ERR("XPM ERROR: Image just too big to ever allocate"); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - return EINA_FALSE; + goto on_error; } if (!cmap) @@ -272,11 +265,8 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN cmap = malloc(sizeof(struct _cmap) * ncolors); if (!cmap) { - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - return EINA_FALSE; + goto on_error; } } ie->w = w; @@ -398,24 +388,16 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN ptr = evas_cache_image_pixels(ie); if (!ptr) { - free(cmap); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; - return EINA_FALSE; + goto on_error; } pixels = w * h; end = ptr + pixels; } else { - free(cmap); - free(line); - fclose(f); - xpm_parse_done(); *error = EVAS_LOAD_ERROR_NONE; - return EINA_TRUE; + goto on_success; } } else @@ -631,13 +613,21 @@ evas_image_load_file_xpm(Image_Entry *ie, const char *file, const char *key __UN break; } + on_success: free(cmap); free(line); - fclose(f); - xpm_parse_done(); + eina_file_map_free(f, (void*) map); + eina_file_close(f); + *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; + + on_error: + free(line); + eina_file_map_free(f, (void*) map); + eina_file_close(f); + return EINA_FALSE; } static Eina_Bool @@ -663,6 +653,14 @@ module_open(Evas_Module *em) EINA_LOG_ERR("Can not create a module log domain."); return 0; } + + /* Shouldn't we make that PATH configurable ? */ + rgb_txt = eina_file_open("/usr/lib/X11/rgb.txt", 0); + if (!rgb_txt) rgb_txt = eina_file_open("/usr/X11/lib/X11/rgb.txt", 0); + if (!rgb_txt) rgb_txt = eina_file_open("/usr/X11R6/lib/X11/rgb.txt", 0); + if (!rgb_txt) rgb_txt = eina_file_open("/usr/openwin/lib/X11/rgb.txt", 0); + if (rgb_txt) + rgb_txt_map = eina_file_map_all(rgb_txt, EINA_FILE_SEQUENTIAL); em->functions = (void *)(&evas_image_load_xpm_func); return 1; } @@ -670,6 +668,12 @@ module_open(Evas_Module *em) static void module_close(Evas_Module *em __UNUSED__) { + if (rgb_txt) + { + eina_file_map_free(rgb_txt, rgb_txt_map); + eina_file_close(rgb_txt); + rgb_txt = NULL; + } eina_log_domain_unregister(_evas_loader_xpm_log_dom); } diff --git a/libraries/evas/src/modules/savers/Makefile.in b/libraries/evas/src/modules/savers/Makefile.in index 6d64b4c..28236d9 100644 --- a/libraries/evas/src/modules/savers/Makefile.in +++ b/libraries/evas/src/modules/savers/Makefile.in @@ -211,8 +211,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -229,6 +227,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -310,6 +310,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/savers/edb/Makefile.in b/libraries/evas/src/modules/savers/edb/Makefile.in index e319b56..2ed29ec 100644 --- a/libraries/evas/src/modules/savers/edb/Makefile.in +++ b/libraries/evas/src/modules/savers/edb/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/savers/eet/Makefile.in b/libraries/evas/src/modules/savers/eet/Makefile.in index c80e946..6564c18 100644 --- a/libraries/evas/src/modules/savers/eet/Makefile.in +++ b/libraries/evas/src/modules/savers/eet/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/savers/jpeg/Makefile.in b/libraries/evas/src/modules/savers/jpeg/Makefile.in index 3c1bd8b..e57c4f9 100644 --- a/libraries/evas/src/modules/savers/jpeg/Makefile.in +++ b/libraries/evas/src/modules/savers/jpeg/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/savers/png/Makefile.in b/libraries/evas/src/modules/savers/png/Makefile.in index 3b905a5..da04ff2 100644 --- a/libraries/evas/src/modules/savers/png/Makefile.in +++ b/libraries/evas/src/modules/savers/png/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/modules/savers/tiff/Makefile.in b/libraries/evas/src/modules/savers/tiff/Makefile.in index 27acddd..8f4411f 100644 --- a/libraries/evas/src/modules/savers/tiff/Makefile.in +++ b/libraries/evas/src/modules/savers/tiff/Makefile.in @@ -231,8 +231,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -249,6 +247,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -330,6 +330,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/static_deps/Makefile.in b/libraries/evas/src/static_deps/Makefile.in index 94f534e..514e79c 100644 --- a/libraries/evas/src/static_deps/Makefile.in +++ b/libraries/evas/src/static_deps/Makefile.in @@ -207,8 +207,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -225,6 +223,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -306,6 +306,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/static_deps/liblinebreak/AUTHORS b/libraries/evas/src/static_deps/liblinebreak/AUTHORS index 523106f..22786d4 100644 --- a/libraries/evas/src/static_deps/liblinebreak/AUTHORS +++ b/libraries/evas/src/static_deps/liblinebreak/AUTHORS @@ -4,3 +4,5 @@ Nikolay Pultsin. Put forward the original requirements on liblinebreak, performed tests, and made a lot of suggestions on the initial versions. Thomas Klausner. Autoconfiscated and libtoolized liblinebreak. + +Tom Hacohen. Added word boundaries support. diff --git a/libraries/evas/src/static_deps/liblinebreak/Makefile.am b/libraries/evas/src/static_deps/liblinebreak/Makefile.am index f386455..68e9c4a 100644 --- a/libraries/evas/src/static_deps/liblinebreak/Makefile.am +++ b/libraries/evas/src/static_deps/liblinebreak/Makefile.am @@ -1,13 +1,15 @@ MAINTAINERCLEANFILES = Makefile.in #noinst_PROGRAMS = filter_dup -noinst_HEADERS = linebreak.h linebreakdef.h +noinst_HEADERS = linebreak.h linebreakdef.h wordbreakdef.h wordbreak.h noinst_LTLIBRARIES = liblinebreak.la liblinebreak_la_SOURCES = \ linebreak.c \ linebreakdata.c \ - linebreakdef.c + linebreakdef.c \ + wordbreak.c \ + wordbreakdata.x EXTRA_DIST = \ LineBreak1.sed \ diff --git a/libraries/evas/src/static_deps/liblinebreak/Makefile.in b/libraries/evas/src/static_deps/liblinebreak/Makefile.in index 909f75e..9d44327 100644 --- a/libraries/evas/src/static_deps/liblinebreak/Makefile.in +++ b/libraries/evas/src/static_deps/liblinebreak/Makefile.in @@ -61,7 +61,7 @@ CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) liblinebreak_la_LIBADD = am_liblinebreak_la_OBJECTS = linebreak.lo linebreakdata.lo \ - linebreakdef.lo + linebreakdef.lo wordbreak.lo liblinebreak_la_OBJECTS = $(am_liblinebreak_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) @@ -200,8 +200,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -218,6 +216,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -299,6 +299,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ @@ -376,12 +380,14 @@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in #noinst_PROGRAMS = filter_dup -noinst_HEADERS = linebreak.h linebreakdef.h +noinst_HEADERS = linebreak.h linebreakdef.h wordbreakdef.h wordbreak.h noinst_LTLIBRARIES = liblinebreak.la liblinebreak_la_SOURCES = \ linebreak.c \ linebreakdata.c \ - linebreakdef.c + linebreakdef.c \ + wordbreak.c \ + wordbreakdata.x EXTRA_DIST = \ LineBreak1.sed \ @@ -446,6 +452,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linebreak.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linebreakdata.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linebreakdef.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wordbreak.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< diff --git a/libraries/evas/src/static_deps/liblinebreak/wordbreak.c b/libraries/evas/src/static_deps/liblinebreak/wordbreak.c new file mode 100644 index 0000000..bbbb7f4 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/wordbreak.c @@ -0,0 +1,435 @@ +/* vim: set tabstop=4 shiftwidth=4: */ + +/* + * Word breaking in a Unicode sequence. Designed to be used in a + * generic text renderer. + * + * Copyright (C) 2011-2011 Tom Hacohen + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the author be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute + * it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must + * not claim that you wrote the original software. If you use this + * software in a product, an acknowledgement in the product + * documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source + * distribution. + * + * The main reference is Unicode Standard Annex 29 (UAX #29): + * + * + * When this library was designed, this annex was at Revision 17, for + * Unicode 6.0.0: + * + * + * The Unicode Terms of Use are available at + * + */ + +/** + * @file wordbreak.c + * + * Implementation of the word breaking algorithm as described in Unicode + * Standard Annex 29. + * + * @version 2.0, 2011/12/12 + * @author Tom Hacohen + */ + + +#include +#include +#include +#include "linebreak.h" +#include "linebreakdef.h" + +#include "wordbreak.h" +#include "wordbreakdata.x" + +#define ARRAY_LEN(x) (sizeof(x) / sizeof(x[0])) + +/* Init the wordbreak internals. */ +void init_wordbreak(void) +{ + /* Currently does nothing, may be needed in the future. */ + return; +} + +/** + * Gets the word breaking class of a character. + * + * @param ch character to check + * @param wbp pointer to the wbp breaking properties array + * @param len the size of the wbp array in number of items. + * @return the word breaking class if found; \c WBP_Any otherwise + */ +static enum WordBreakClass get_char_wb_class( + utf32_t ch, + struct WordBreakProperties *wbp, + size_t len) +{ + int min = 0; + int max = len - 1; + int mid; + + do + { + mid = (min + max) / 2; + + if (ch < wbp[mid].start) + max = mid - 1; + else if (ch > wbp[mid].end) + min = mid + 1; + else + return wbp[mid].prop; + } + while (min <= max); + + return WBP_Any; +} + +/** + * Sets the break types in brks starting from posLast up to posStop. + * + * It sets the inside chars to #WORDBREAK_INSIDECHAR and the rest to brkType. + * Assumes brks is initialized - all the cells with #WORDBREAK_NOBREAK are + * cells that we really don't want to break after. + * + * @param s the string + * @param brks[out] the breaks array to fill. + * @param posStart the start position + * @param posEnd the end position + * @param len the length of the string + * @param brkType the breaks type to use + * @param get_next_char function to get the next UTF-32 character + */ +static void set_brks_to(const void *s, + char *brks, + size_t posStart, + size_t posEnd, + size_t len, + char brkType, + get_next_char_t get_next_char) +{ + size_t posCur = posStart; + while (posCur < posEnd) + { + get_next_char(s, len, &posCur); + for ( ; posStart < posCur - 1; ++posStart) + { + brks[posStart] = WORDBREAK_INSIDECHAR; + } + assert(posStart == posCur - 1); + + /* Only set it if we haven't set it not to break before. */ + if (brks[posStart] != WORDBREAK_NOBREAK) + brks[posStart] = brkType; + posStart = posCur; + } +} + +/* Checks to see if newline, cr, or lf. for WB3a and b */ +#define IS_WB3ab(cls) ((cls == WBP_Newline) || (cls == WBP_CR) || \ + (cls == WBP_LF)) + +/** + * Sets the word breaking information for a generic input string. + * + * @param[in] s input string + * @param[in] len length of the input + * @param[in] lang language of the input + * @param[out] brks pointer to the output breaking data, containing + * #WORDBREAK_BREAK, #WORDBREAK_NOBREAK, or + * #WORDBREAK_INSIDEACHAR + * @param[in] get_next_char function to get the next UTF-32 character + */ +static void set_wordbreaks( + const void *s, + size_t len, + const char *lang, + char *brks, + get_next_char_t get_next_char) +{ + /* Previous class */ + enum WordBreakClass p_cls = WBP_Undefined; + /* Strong previous class. */ + enum WordBreakClass sp_cls = WBP_Undefined; + utf32_t ch; + size_t posCur = 0; + size_t posCurSt = 0; + size_t posLast = 0; + + /* FIXME: unused atm. */ + (void) lang; + + + /* Init brks */ + memset(brks, WORDBREAK_BREAK, len); + + ch = get_next_char(s, len, &posCur); + + /* WB3a, WB3b are implied. */ + for ( ; ch != EOS ; ) + { + /* Current class */ + enum WordBreakClass c_cls; + c_cls = get_char_wb_class(ch, wb_prop_default, + ARRAY_LEN(wb_prop_default)); + + switch (c_cls) + { + case WBP_CR: + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_LF: + if (sp_cls == WBP_CR) /* WB3 */ + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + } + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_Newline: + /* WB3a, WB3b */ + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_Extend: + case WBP_Format: + /* WB4 - If not the first char/after a newline (W3ab), + * skip this class, set it to be the same as the prev, and mark + * brks not to break before them. */ + if ((sp_cls == WBP_Undefined) || IS_WB3ab(sp_cls)) + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + } + else + { + /* It's surely not the first */ + brks[posCurSt - 1] = WORDBREAK_NOBREAK; + /* "inherit" the previous class. */ + c_cls = p_cls; + } + break; + + case WBP_Katakana: + if ((sp_cls == WBP_Katakana) || /* WB13 */ + (sp_cls == WBP_ExtendNumLet)) /* WB13b */ + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, + get_next_char); + } + /* No rule found, reset */ + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + } + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_ALetter: + if ((sp_cls == WBP_ALetter) || /* WB5,6,7 */ + ((sp_cls == WBP_Numeric) && (p_cls == WBP_Numeric)) || /* WB10 */ + (sp_cls == WBP_ExtendNumLet)) /* WB13b */ + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, + get_next_char); + } + /* No rule found, reset */ + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + } + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_MidNumLet: + if ((p_cls == WBP_ALetter) || /* WBP6,7 */ + (p_cls == WBP_Numeric)) /* WBP11,12 */ + { + /* Go on */ + } + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + } + break; + + case WBP_MidLetter: + if (p_cls == WBP_ALetter) /* WBP6,7 */ + { + /* Go on */ + } + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + } + break; + + case WBP_MidNum: + if (p_cls == WBP_Numeric) /* WBP11,12 */ + { + /* Go on */ + } + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + } + break; + + case WBP_Numeric: + if ((sp_cls == WBP_Numeric) || /* WB8,11,12 */ + ((sp_cls == WBP_ALetter) && (p_cls == WBP_ALetter)) || /* WB9 */ + (sp_cls == WBP_ExtendNumLet)) /* WB13b */ + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, + get_next_char); + } + /* No rule found, reset */ + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + } + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_ExtendNumLet: + /* WB13a,13b */ + if ((sp_cls == p_cls) && + ((p_cls == WBP_ALetter) || + (p_cls == WBP_Numeric) || + (p_cls == WBP_Katakana) || + (p_cls == WBP_ExtendNumLet))) + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, + get_next_char); + } + /* No rule found, reset */ + else + { + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + } + sp_cls = c_cls; + posLast = posCurSt; + break; + + case WBP_Any: + /* Allow breaks and reset */ + set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, + get_next_char); + sp_cls = c_cls; + posLast = posCurSt; + break; + + default: + /* Error, should never get here! */ + assert(0); + break; + } + + p_cls = c_cls; + posCurSt = posCur; + ch = get_next_char(s, len, &posCur); + } + + /* WB2 */ + set_brks_to(s, brks, posLast, posCur, len, WORDBREAK_BREAK, + get_next_char); +} + +/** + * Sets the word breaking information for a UTF-8 input string. + * + * @param[in] s input UTF-8 string + * @param[in] len length of the input + * @param[in] lang language of the input + * @param[out] brks pointer to the output breaking data, containing + * #WORDBREAK_BREAK, #WORDBREAK_NOBREAK, or + * #WORDBREAK_INSIDEACHAR + */ +void set_wordbreaks_utf8( + const utf8_t *s, + size_t len, + const char *lang, + char *brks) +{ + set_wordbreaks(s, len, lang, brks, + (get_next_char_t)lb_get_next_char_utf8); +} + +/** + * Sets the word breaking information for a UTF-16 input string. + * + * @param[in] s input UTF-16 string + * @param[in] len length of the input + * @param[in] lang language of the input + * @param[out] brks pointer to the output breaking data, containing + * #WORDBREAK_BREAK, #WORDBREAK_NOBREAK, or + * #WORDBREAK_INSIDEACHAR + */ +void set_wordbreaks_utf16( + const utf16_t *s, + size_t len, + const char *lang, + char *brks) +{ + set_wordbreaks(s, len, lang, brks, + (get_next_char_t)lb_get_next_char_utf16); +} + +/** + * Sets the word breaking information for a UTF-32 input string. + * + * @param[in] s input UTF-32 string + * @param[in] len length of the input + * @param[in] lang language of the input + * @param[out] brks pointer to the output breaking data, containing + * #WORDBREAK_BREAK, #WORDBREAK_NOBREAK, or + * #WORDBREAK_INSIDEACHAR + */ +void set_wordbreaks_utf32( + const utf32_t *s, + size_t len, + const char *lang, + char *brks) +{ + set_wordbreaks(s, len, lang, brks, + (get_next_char_t)lb_get_next_char_utf32); +} diff --git a/libraries/evas/src/static_deps/liblinebreak/wordbreak.h b/libraries/evas/src/static_deps/liblinebreak/wordbreak.h new file mode 100644 index 0000000..7b7bea7 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/wordbreak.h @@ -0,0 +1,72 @@ +/* vim: set tabstop=4 shiftwidth=4: */ + +/* + * Word breaking in a Unicode sequence. Designed to be used in a + * generic text renderer. + * + * Copyright (C) 2011-2011 Tom Hacohen + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the author be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute + * it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must + * not claim that you wrote the original software. If you use this + * software in a product, an acknowledgement in the product + * documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source + * distribution. + * + * The main reference is Unicode Standard Annex 29 (UAX #29): + * + * + * When this library was designed, this annex was at Revision 17, for + * Unicode 6.0.0: + * + * + * The Unicode Terms of Use are available at + * + */ + +/** + * @file wordbreak.h + * + * Header file for the word breaking (segmentation) algorithm. + * + * @version 2.0, 2011/12/12 + * @author Tom Hacohen + */ + +#ifndef WORDBREAK_H +#define WORDBREAK_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define WORDBREAK_BREAK 0 /* Break found */ +#define WORDBREAK_NOBREAK 1 /**< Break not found */ +#define WORDBREAK_INSIDECHAR 2 /**< A UTF-8/16 sequence is unfinished */ + +void init_wordbreak(void); +void set_wordbreaks_utf8( + const utf8_t *s, size_t len, const char* lang, char *brks); +void set_wordbreaks_utf16( + const utf16_t *s, size_t len, const char* lang, char *brks); +void set_wordbreaks_utf32( + const utf32_t *s, size_t len, const char* lang, char *brks); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libraries/evas/src/static_deps/liblinebreak/wordbreakdata.x b/libraries/evas/src/static_deps/liblinebreak/wordbreakdata.x new file mode 100644 index 0000000..c7278ef --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/wordbreakdata.x @@ -0,0 +1,858 @@ +/* The content of this file is generated from: +# WordBreakProperty-6.0.0.txt +# Date: 2010-08-19, 00:48:48 GMT [MD] +*/ +#include "linebreak.h" +#include "wordbreakdef.h" +static struct WordBreakProperties wb_prop_default[] = { + {0x000A, 0x000A, WBP_LF}, + {0x000B, 0x000C, WBP_Newline}, + {0x000D, 0x000D, WBP_CR}, + {0x0027, 0x0027, WBP_MidNumLet}, + {0x002C, 0x002C, WBP_MidNum}, + {0x002E, 0x002E, WBP_MidNumLet}, + {0x0030, 0x0039, WBP_Numeric}, + {0x003A, 0x003A, WBP_MidLetter}, + {0x003B, 0x003B, WBP_MidNum}, + {0x0041, 0x005A, WBP_ALetter}, + {0x005F, 0x005F, WBP_ExtendNumLet}, + {0x0061, 0x007A, WBP_ALetter}, + {0x0085, 0x0085, WBP_Newline}, + {0x00AA, 0x00AA, WBP_ALetter}, + {0x00AD, 0x00AD, WBP_Format}, + {0x00B5, 0x00B5, WBP_ALetter}, + {0x00B7, 0x00B7, WBP_MidLetter}, + {0x00BA, 0x00BA, WBP_ALetter}, + {0x00C0, 0x00D6, WBP_ALetter}, + {0x00D8, 0x00F6, WBP_ALetter}, + {0x00F8, 0x01BA, WBP_ALetter}, + {0x01BB, 0x01BB, WBP_ALetter}, + {0x01BC, 0x01BF, WBP_ALetter}, + {0x01C0, 0x01C3, WBP_ALetter}, + {0x01C4, 0x0293, WBP_ALetter}, + {0x0294, 0x0294, WBP_ALetter}, + {0x0295, 0x02AF, WBP_ALetter}, + {0x02B0, 0x02C1, WBP_ALetter}, + {0x02C6, 0x02D1, WBP_ALetter}, + {0x02E0, 0x02E4, WBP_ALetter}, + {0x02EC, 0x02EC, WBP_ALetter}, + {0x02EE, 0x02EE, WBP_ALetter}, + {0x0300, 0x036F, WBP_Extend}, + {0x0370, 0x0373, WBP_ALetter}, + {0x0374, 0x0374, WBP_ALetter}, + {0x0376, 0x0377, WBP_ALetter}, + {0x037A, 0x037A, WBP_ALetter}, + {0x037B, 0x037D, WBP_ALetter}, + {0x037E, 0x037E, WBP_MidNum}, + {0x0386, 0x0386, WBP_ALetter}, + {0x0387, 0x0387, WBP_MidLetter}, + {0x0388, 0x038A, WBP_ALetter}, + {0x038C, 0x038C, WBP_ALetter}, + {0x038E, 0x03A1, WBP_ALetter}, + {0x03A3, 0x03F5, WBP_ALetter}, + {0x03F7, 0x0481, WBP_ALetter}, + {0x0483, 0x0487, WBP_Extend}, + {0x0488, 0x0489, WBP_Extend}, + {0x048A, 0x0527, WBP_ALetter}, + {0x0531, 0x0556, WBP_ALetter}, + {0x0559, 0x0559, WBP_ALetter}, + {0x0561, 0x0587, WBP_ALetter}, + {0x0589, 0x0589, WBP_MidNum}, + {0x0591, 0x05BD, WBP_Extend}, + {0x05BF, 0x05BF, WBP_Extend}, + {0x05C1, 0x05C2, WBP_Extend}, + {0x05C4, 0x05C5, WBP_Extend}, + {0x05C7, 0x05C7, WBP_Extend}, + {0x05D0, 0x05EA, WBP_ALetter}, + {0x05F0, 0x05F2, WBP_ALetter}, + {0x05F3, 0x05F3, WBP_ALetter}, + {0x05F4, 0x05F4, WBP_MidLetter}, + {0x0600, 0x0603, WBP_Format}, + {0x060C, 0x060D, WBP_MidNum}, + {0x0610, 0x061A, WBP_Extend}, + {0x0620, 0x063F, WBP_ALetter}, + {0x0640, 0x0640, WBP_ALetter}, + {0x0641, 0x064A, WBP_ALetter}, + {0x064B, 0x065F, WBP_Extend}, + {0x0660, 0x0669, WBP_Numeric}, + {0x066B, 0x066B, WBP_Numeric}, + {0x066C, 0x066C, WBP_MidNum}, + {0x066E, 0x066F, WBP_ALetter}, + {0x0670, 0x0670, WBP_Extend}, + {0x0671, 0x06D3, WBP_ALetter}, + {0x06D5, 0x06D5, WBP_ALetter}, + {0x06D6, 0x06DC, WBP_Extend}, + {0x06DD, 0x06DD, WBP_Format}, + {0x06DF, 0x06E4, WBP_Extend}, + {0x06E5, 0x06E6, WBP_ALetter}, + {0x06E7, 0x06E8, WBP_Extend}, + {0x06EA, 0x06ED, WBP_Extend}, + {0x06EE, 0x06EF, WBP_ALetter}, + {0x06F0, 0x06F9, WBP_Numeric}, + {0x06FA, 0x06FC, WBP_ALetter}, + {0x06FF, 0x06FF, WBP_ALetter}, + {0x070F, 0x070F, WBP_Format}, + {0x0710, 0x0710, WBP_ALetter}, + {0x0711, 0x0711, WBP_Extend}, + {0x0712, 0x072F, WBP_ALetter}, + {0x0730, 0x074A, WBP_Extend}, + {0x074D, 0x07A5, WBP_ALetter}, + {0x07A6, 0x07B0, WBP_Extend}, + {0x07B1, 0x07B1, WBP_ALetter}, + {0x07C0, 0x07C9, WBP_Numeric}, + {0x07CA, 0x07EA, WBP_ALetter}, + {0x07EB, 0x07F3, WBP_Extend}, + {0x07F4, 0x07F5, WBP_ALetter}, + {0x07F8, 0x07F8, WBP_MidNum}, + {0x07FA, 0x07FA, WBP_ALetter}, + {0x0800, 0x0815, WBP_ALetter}, + {0x0816, 0x0819, WBP_Extend}, + {0x081A, 0x081A, WBP_ALetter}, + {0x081B, 0x0823, WBP_Extend}, + {0x0824, 0x0824, WBP_ALetter}, + {0x0825, 0x0827, WBP_Extend}, + {0x0828, 0x0828, WBP_ALetter}, + {0x0829, 0x082D, WBP_Extend}, + {0x0840, 0x0858, WBP_ALetter}, + {0x0859, 0x085B, WBP_Extend}, + {0x0900, 0x0902, WBP_Extend}, + {0x0903, 0x0903, WBP_Extend}, + {0x0904, 0x0939, WBP_ALetter}, + {0x093A, 0x093A, WBP_Extend}, + {0x093B, 0x093B, WBP_Extend}, + {0x093C, 0x093C, WBP_Extend}, + {0x093D, 0x093D, WBP_ALetter}, + {0x093E, 0x0940, WBP_Extend}, + {0x0941, 0x0948, WBP_Extend}, + {0x0949, 0x094C, WBP_Extend}, + {0x094D, 0x094D, WBP_Extend}, + {0x094E, 0x094F, WBP_Extend}, + {0x0950, 0x0950, WBP_ALetter}, + {0x0951, 0x0957, WBP_Extend}, + {0x0958, 0x0961, WBP_ALetter}, + {0x0962, 0x0963, WBP_Extend}, + {0x0966, 0x096F, WBP_Numeric}, + {0x0971, 0x0971, WBP_ALetter}, + {0x0972, 0x0977, WBP_ALetter}, + {0x0979, 0x097F, WBP_ALetter}, + {0x0981, 0x0981, WBP_Extend}, + {0x0982, 0x0983, WBP_Extend}, + {0x0985, 0x098C, WBP_ALetter}, + {0x098F, 0x0990, WBP_ALetter}, + {0x0993, 0x09A8, WBP_ALetter}, + {0x09AA, 0x09B0, WBP_ALetter}, + {0x09B2, 0x09B2, WBP_ALetter}, + {0x09B6, 0x09B9, WBP_ALetter}, + {0x09BC, 0x09BC, WBP_Extend}, + {0x09BD, 0x09BD, WBP_ALetter}, + {0x09BE, 0x09C0, WBP_Extend}, + {0x09C1, 0x09C4, WBP_Extend}, + {0x09C7, 0x09C8, WBP_Extend}, + {0x09CB, 0x09CC, WBP_Extend}, + {0x09CD, 0x09CD, WBP_Extend}, + {0x09CE, 0x09CE, WBP_ALetter}, + {0x09D7, 0x09D7, WBP_Extend}, + {0x09DC, 0x09DD, WBP_ALetter}, + {0x09DF, 0x09E1, WBP_ALetter}, + {0x09E2, 0x09E3, WBP_Extend}, + {0x09E6, 0x09EF, WBP_Numeric}, + {0x09F0, 0x09F1, WBP_ALetter}, + {0x0A01, 0x0A02, WBP_Extend}, + {0x0A03, 0x0A03, WBP_Extend}, + {0x0A05, 0x0A0A, WBP_ALetter}, + {0x0A0F, 0x0A10, WBP_ALetter}, + {0x0A13, 0x0A28, WBP_ALetter}, + {0x0A2A, 0x0A30, WBP_ALetter}, + {0x0A32, 0x0A33, WBP_ALetter}, + {0x0A35, 0x0A36, WBP_ALetter}, + {0x0A38, 0x0A39, WBP_ALetter}, + {0x0A3C, 0x0A3C, WBP_Extend}, + {0x0A3E, 0x0A40, WBP_Extend}, + {0x0A41, 0x0A42, WBP_Extend}, + {0x0A47, 0x0A48, WBP_Extend}, + {0x0A4B, 0x0A4D, WBP_Extend}, + {0x0A51, 0x0A51, WBP_Extend}, + {0x0A59, 0x0A5C, WBP_ALetter}, + {0x0A5E, 0x0A5E, WBP_ALetter}, + {0x0A66, 0x0A6F, WBP_Numeric}, + {0x0A70, 0x0A71, WBP_Extend}, + {0x0A72, 0x0A74, WBP_ALetter}, + {0x0A75, 0x0A75, WBP_Extend}, + {0x0A81, 0x0A82, WBP_Extend}, + {0x0A83, 0x0A83, WBP_Extend}, + {0x0A85, 0x0A8D, WBP_ALetter}, + {0x0A8F, 0x0A91, WBP_ALetter}, + {0x0A93, 0x0AA8, WBP_ALetter}, + {0x0AAA, 0x0AB0, WBP_ALetter}, + {0x0AB2, 0x0AB3, WBP_ALetter}, + {0x0AB5, 0x0AB9, WBP_ALetter}, + {0x0ABC, 0x0ABC, WBP_Extend}, + {0x0ABD, 0x0ABD, WBP_ALetter}, + {0x0ABE, 0x0AC0, WBP_Extend}, + {0x0AC1, 0x0AC5, WBP_Extend}, + {0x0AC7, 0x0AC8, WBP_Extend}, + {0x0AC9, 0x0AC9, WBP_Extend}, + {0x0ACB, 0x0ACC, WBP_Extend}, + {0x0ACD, 0x0ACD, WBP_Extend}, + {0x0AD0, 0x0AD0, WBP_ALetter}, + {0x0AE0, 0x0AE1, WBP_ALetter}, + {0x0AE2, 0x0AE3, WBP_Extend}, + {0x0AE6, 0x0AEF, WBP_Numeric}, + {0x0B01, 0x0B01, WBP_Extend}, + {0x0B02, 0x0B03, WBP_Extend}, + {0x0B05, 0x0B0C, WBP_ALetter}, + {0x0B0F, 0x0B10, WBP_ALetter}, + {0x0B13, 0x0B28, WBP_ALetter}, + {0x0B2A, 0x0B30, WBP_ALetter}, + {0x0B32, 0x0B33, WBP_ALetter}, + {0x0B35, 0x0B39, WBP_ALetter}, + {0x0B3C, 0x0B3C, WBP_Extend}, + {0x0B3D, 0x0B3D, WBP_ALetter}, + {0x0B3E, 0x0B3E, WBP_Extend}, + {0x0B3F, 0x0B3F, WBP_Extend}, + {0x0B40, 0x0B40, WBP_Extend}, + {0x0B41, 0x0B44, WBP_Extend}, + {0x0B47, 0x0B48, WBP_Extend}, + {0x0B4B, 0x0B4C, WBP_Extend}, + {0x0B4D, 0x0B4D, WBP_Extend}, + {0x0B56, 0x0B56, WBP_Extend}, + {0x0B57, 0x0B57, WBP_Extend}, + {0x0B5C, 0x0B5D, WBP_ALetter}, + {0x0B5F, 0x0B61, WBP_ALetter}, + {0x0B62, 0x0B63, WBP_Extend}, + {0x0B66, 0x0B6F, WBP_Numeric}, + {0x0B71, 0x0B71, WBP_ALetter}, + {0x0B82, 0x0B82, WBP_Extend}, + {0x0B83, 0x0B83, WBP_ALetter}, + {0x0B85, 0x0B8A, WBP_ALetter}, + {0x0B8E, 0x0B90, WBP_ALetter}, + {0x0B92, 0x0B95, WBP_ALetter}, + {0x0B99, 0x0B9A, WBP_ALetter}, + {0x0B9C, 0x0B9C, WBP_ALetter}, + {0x0B9E, 0x0B9F, WBP_ALetter}, + {0x0BA3, 0x0BA4, WBP_ALetter}, + {0x0BA8, 0x0BAA, WBP_ALetter}, + {0x0BAE, 0x0BB9, WBP_ALetter}, + {0x0BBE, 0x0BBF, WBP_Extend}, + {0x0BC0, 0x0BC0, WBP_Extend}, + {0x0BC1, 0x0BC2, WBP_Extend}, + {0x0BC6, 0x0BC8, WBP_Extend}, + {0x0BCA, 0x0BCC, WBP_Extend}, + {0x0BCD, 0x0BCD, WBP_Extend}, + {0x0BD0, 0x0BD0, WBP_ALetter}, + {0x0BD7, 0x0BD7, WBP_Extend}, + {0x0BE6, 0x0BEF, WBP_Numeric}, + {0x0C01, 0x0C03, WBP_Extend}, + {0x0C05, 0x0C0C, WBP_ALetter}, + {0x0C0E, 0x0C10, WBP_ALetter}, + {0x0C12, 0x0C28, WBP_ALetter}, + {0x0C2A, 0x0C33, WBP_ALetter}, + {0x0C35, 0x0C39, WBP_ALetter}, + {0x0C3D, 0x0C3D, WBP_ALetter}, + {0x0C3E, 0x0C40, WBP_Extend}, + {0x0C41, 0x0C44, WBP_Extend}, + {0x0C46, 0x0C48, WBP_Extend}, + {0x0C4A, 0x0C4D, WBP_Extend}, + {0x0C55, 0x0C56, WBP_Extend}, + {0x0C58, 0x0C59, WBP_ALetter}, + {0x0C60, 0x0C61, WBP_ALetter}, + {0x0C62, 0x0C63, WBP_Extend}, + {0x0C66, 0x0C6F, WBP_Numeric}, + {0x0C82, 0x0C83, WBP_Extend}, + {0x0C85, 0x0C8C, WBP_ALetter}, + {0x0C8E, 0x0C90, WBP_ALetter}, + {0x0C92, 0x0CA8, WBP_ALetter}, + {0x0CAA, 0x0CB3, WBP_ALetter}, + {0x0CB5, 0x0CB9, WBP_ALetter}, + {0x0CBC, 0x0CBC, WBP_Extend}, + {0x0CBD, 0x0CBD, WBP_ALetter}, + {0x0CBE, 0x0CBE, WBP_Extend}, + {0x0CBF, 0x0CBF, WBP_Extend}, + {0x0CC0, 0x0CC4, WBP_Extend}, + {0x0CC6, 0x0CC6, WBP_Extend}, + {0x0CC7, 0x0CC8, WBP_Extend}, + {0x0CCA, 0x0CCB, WBP_Extend}, + {0x0CCC, 0x0CCD, WBP_Extend}, + {0x0CD5, 0x0CD6, WBP_Extend}, + {0x0CDE, 0x0CDE, WBP_ALetter}, + {0x0CE0, 0x0CE1, WBP_ALetter}, + {0x0CE2, 0x0CE3, WBP_Extend}, + {0x0CE6, 0x0CEF, WBP_Numeric}, + {0x0CF1, 0x0CF2, WBP_ALetter}, + {0x0D02, 0x0D03, WBP_Extend}, + {0x0D05, 0x0D0C, WBP_ALetter}, + {0x0D0E, 0x0D10, WBP_ALetter}, + {0x0D12, 0x0D3A, WBP_ALetter}, + {0x0D3D, 0x0D3D, WBP_ALetter}, + {0x0D3E, 0x0D40, WBP_Extend}, + {0x0D41, 0x0D44, WBP_Extend}, + {0x0D46, 0x0D48, WBP_Extend}, + {0x0D4A, 0x0D4C, WBP_Extend}, + {0x0D4D, 0x0D4D, WBP_Extend}, + {0x0D4E, 0x0D4E, WBP_ALetter}, + {0x0D57, 0x0D57, WBP_Extend}, + {0x0D60, 0x0D61, WBP_ALetter}, + {0x0D62, 0x0D63, WBP_Extend}, + {0x0D66, 0x0D6F, WBP_Numeric}, + {0x0D7A, 0x0D7F, WBP_ALetter}, + {0x0D82, 0x0D83, WBP_Extend}, + {0x0D85, 0x0D96, WBP_ALetter}, + {0x0D9A, 0x0DB1, WBP_ALetter}, + {0x0DB3, 0x0DBB, WBP_ALetter}, + {0x0DBD, 0x0DBD, WBP_ALetter}, + {0x0DC0, 0x0DC6, WBP_ALetter}, + {0x0DCA, 0x0DCA, WBP_Extend}, + {0x0DCF, 0x0DD1, WBP_Extend}, + {0x0DD2, 0x0DD4, WBP_Extend}, + {0x0DD6, 0x0DD6, WBP_Extend}, + {0x0DD8, 0x0DDF, WBP_Extend}, + {0x0DF2, 0x0DF3, WBP_Extend}, + {0x0E31, 0x0E31, WBP_Extend}, + {0x0E34, 0x0E3A, WBP_Extend}, + {0x0E47, 0x0E4E, WBP_Extend}, + {0x0E50, 0x0E59, WBP_Numeric}, + {0x0EB1, 0x0EB1, WBP_Extend}, + {0x0EB4, 0x0EB9, WBP_Extend}, + {0x0EBB, 0x0EBC, WBP_Extend}, + {0x0EC8, 0x0ECD, WBP_Extend}, + {0x0ED0, 0x0ED9, WBP_Numeric}, + {0x0F00, 0x0F00, WBP_ALetter}, + {0x0F18, 0x0F19, WBP_Extend}, + {0x0F20, 0x0F29, WBP_Numeric}, + {0x0F35, 0x0F35, WBP_Extend}, + {0x0F37, 0x0F37, WBP_Extend}, + {0x0F39, 0x0F39, WBP_Extend}, + {0x0F3E, 0x0F3F, WBP_Extend}, + {0x0F40, 0x0F47, WBP_ALetter}, + {0x0F49, 0x0F6C, WBP_ALetter}, + {0x0F71, 0x0F7E, WBP_Extend}, + {0x0F7F, 0x0F7F, WBP_Extend}, + {0x0F80, 0x0F84, WBP_Extend}, + {0x0F86, 0x0F87, WBP_Extend}, + {0x0F88, 0x0F8C, WBP_ALetter}, + {0x0F8D, 0x0F97, WBP_Extend}, + {0x0F99, 0x0FBC, WBP_Extend}, + {0x0FC6, 0x0FC6, WBP_Extend}, + {0x102B, 0x102C, WBP_Extend}, + {0x102D, 0x1030, WBP_Extend}, + {0x1031, 0x1031, WBP_Extend}, + {0x1032, 0x1037, WBP_Extend}, + {0x1038, 0x1038, WBP_Extend}, + {0x1039, 0x103A, WBP_Extend}, + {0x103B, 0x103C, WBP_Extend}, + {0x103D, 0x103E, WBP_Extend}, + {0x1040, 0x1049, WBP_Numeric}, + {0x1056, 0x1057, WBP_Extend}, + {0x1058, 0x1059, WBP_Extend}, + {0x105E, 0x1060, WBP_Extend}, + {0x1062, 0x1064, WBP_Extend}, + {0x1067, 0x106D, WBP_Extend}, + {0x1071, 0x1074, WBP_Extend}, + {0x1082, 0x1082, WBP_Extend}, + {0x1083, 0x1084, WBP_Extend}, + {0x1085, 0x1086, WBP_Extend}, + {0x1087, 0x108C, WBP_Extend}, + {0x108D, 0x108D, WBP_Extend}, + {0x108F, 0x108F, WBP_Extend}, + {0x1090, 0x1099, WBP_Numeric}, + {0x109A, 0x109C, WBP_Extend}, + {0x109D, 0x109D, WBP_Extend}, + {0x10A0, 0x10C5, WBP_ALetter}, + {0x10D0, 0x10FA, WBP_ALetter}, + {0x10FC, 0x10FC, WBP_ALetter}, + {0x1100, 0x1248, WBP_ALetter}, + {0x124A, 0x124D, WBP_ALetter}, + {0x1250, 0x1256, WBP_ALetter}, + {0x1258, 0x1258, WBP_ALetter}, + {0x125A, 0x125D, WBP_ALetter}, + {0x1260, 0x1288, WBP_ALetter}, + {0x128A, 0x128D, WBP_ALetter}, + {0x1290, 0x12B0, WBP_ALetter}, + {0x12B2, 0x12B5, WBP_ALetter}, + {0x12B8, 0x12BE, WBP_ALetter}, + {0x12C0, 0x12C0, WBP_ALetter}, + {0x12C2, 0x12C5, WBP_ALetter}, + {0x12C8, 0x12D6, WBP_ALetter}, + {0x12D8, 0x1310, WBP_ALetter}, + {0x1312, 0x1315, WBP_ALetter}, + {0x1318, 0x135A, WBP_ALetter}, + {0x135D, 0x135F, WBP_Extend}, + {0x1380, 0x138F, WBP_ALetter}, + {0x13A0, 0x13F4, WBP_ALetter}, + {0x1401, 0x166C, WBP_ALetter}, + {0x166F, 0x167F, WBP_ALetter}, + {0x1681, 0x169A, WBP_ALetter}, + {0x16A0, 0x16EA, WBP_ALetter}, + {0x16EE, 0x16F0, WBP_ALetter}, + {0x1700, 0x170C, WBP_ALetter}, + {0x170E, 0x1711, WBP_ALetter}, + {0x1712, 0x1714, WBP_Extend}, + {0x1720, 0x1731, WBP_ALetter}, + {0x1732, 0x1734, WBP_Extend}, + {0x1740, 0x1751, WBP_ALetter}, + {0x1752, 0x1753, WBP_Extend}, + {0x1760, 0x176C, WBP_ALetter}, + {0x176E, 0x1770, WBP_ALetter}, + {0x1772, 0x1773, WBP_Extend}, + {0x17B4, 0x17B5, WBP_Format}, + {0x17B6, 0x17B6, WBP_Extend}, + {0x17B7, 0x17BD, WBP_Extend}, + {0x17BE, 0x17C5, WBP_Extend}, + {0x17C6, 0x17C6, WBP_Extend}, + {0x17C7, 0x17C8, WBP_Extend}, + {0x17C9, 0x17D3, WBP_Extend}, + {0x17DD, 0x17DD, WBP_Extend}, + {0x17E0, 0x17E9, WBP_Numeric}, + {0x180B, 0x180D, WBP_Extend}, + {0x1810, 0x1819, WBP_Numeric}, + {0x1820, 0x1842, WBP_ALetter}, + {0x1843, 0x1843, WBP_ALetter}, + {0x1844, 0x1877, WBP_ALetter}, + {0x1880, 0x18A8, WBP_ALetter}, + {0x18A9, 0x18A9, WBP_Extend}, + {0x18AA, 0x18AA, WBP_ALetter}, + {0x18B0, 0x18F5, WBP_ALetter}, + {0x1900, 0x191C, WBP_ALetter}, + {0x1920, 0x1922, WBP_Extend}, + {0x1923, 0x1926, WBP_Extend}, + {0x1927, 0x1928, WBP_Extend}, + {0x1929, 0x192B, WBP_Extend}, + {0x1930, 0x1931, WBP_Extend}, + {0x1932, 0x1932, WBP_Extend}, + {0x1933, 0x1938, WBP_Extend}, + {0x1939, 0x193B, WBP_Extend}, + {0x1946, 0x194F, WBP_Numeric}, + {0x19B0, 0x19C0, WBP_Extend}, + {0x19C8, 0x19C9, WBP_Extend}, + {0x19D0, 0x19D9, WBP_Numeric}, + {0x1A00, 0x1A16, WBP_ALetter}, + {0x1A17, 0x1A18, WBP_Extend}, + {0x1A19, 0x1A1B, WBP_Extend}, + {0x1A55, 0x1A55, WBP_Extend}, + {0x1A56, 0x1A56, WBP_Extend}, + {0x1A57, 0x1A57, WBP_Extend}, + {0x1A58, 0x1A5E, WBP_Extend}, + {0x1A60, 0x1A60, WBP_Extend}, + {0x1A61, 0x1A61, WBP_Extend}, + {0x1A62, 0x1A62, WBP_Extend}, + {0x1A63, 0x1A64, WBP_Extend}, + {0x1A65, 0x1A6C, WBP_Extend}, + {0x1A6D, 0x1A72, WBP_Extend}, + {0x1A73, 0x1A7C, WBP_Extend}, + {0x1A7F, 0x1A7F, WBP_Extend}, + {0x1A80, 0x1A89, WBP_Numeric}, + {0x1A90, 0x1A99, WBP_Numeric}, + {0x1B00, 0x1B03, WBP_Extend}, + {0x1B04, 0x1B04, WBP_Extend}, + {0x1B05, 0x1B33, WBP_ALetter}, + {0x1B34, 0x1B34, WBP_Extend}, + {0x1B35, 0x1B35, WBP_Extend}, + {0x1B36, 0x1B3A, WBP_Extend}, + {0x1B3B, 0x1B3B, WBP_Extend}, + {0x1B3C, 0x1B3C, WBP_Extend}, + {0x1B3D, 0x1B41, WBP_Extend}, + {0x1B42, 0x1B42, WBP_Extend}, + {0x1B43, 0x1B44, WBP_Extend}, + {0x1B45, 0x1B4B, WBP_ALetter}, + {0x1B50, 0x1B59, WBP_Numeric}, + {0x1B6B, 0x1B73, WBP_Extend}, + {0x1B80, 0x1B81, WBP_Extend}, + {0x1B82, 0x1B82, WBP_Extend}, + {0x1B83, 0x1BA0, WBP_ALetter}, + {0x1BA1, 0x1BA1, WBP_Extend}, + {0x1BA2, 0x1BA5, WBP_Extend}, + {0x1BA6, 0x1BA7, WBP_Extend}, + {0x1BA8, 0x1BA9, WBP_Extend}, + {0x1BAA, 0x1BAA, WBP_Extend}, + {0x1BAE, 0x1BAF, WBP_ALetter}, + {0x1BB0, 0x1BB9, WBP_Numeric}, + {0x1BC0, 0x1BE5, WBP_ALetter}, + {0x1BE6, 0x1BE6, WBP_Extend}, + {0x1BE7, 0x1BE7, WBP_Extend}, + {0x1BE8, 0x1BE9, WBP_Extend}, + {0x1BEA, 0x1BEC, WBP_Extend}, + {0x1BED, 0x1BED, WBP_Extend}, + {0x1BEE, 0x1BEE, WBP_Extend}, + {0x1BEF, 0x1BF1, WBP_Extend}, + {0x1BF2, 0x1BF3, WBP_Extend}, + {0x1C00, 0x1C23, WBP_ALetter}, + {0x1C24, 0x1C2B, WBP_Extend}, + {0x1C2C, 0x1C33, WBP_Extend}, + {0x1C34, 0x1C35, WBP_Extend}, + {0x1C36, 0x1C37, WBP_Extend}, + {0x1C40, 0x1C49, WBP_Numeric}, + {0x1C4D, 0x1C4F, WBP_ALetter}, + {0x1C50, 0x1C59, WBP_Numeric}, + {0x1C5A, 0x1C77, WBP_ALetter}, + {0x1C78, 0x1C7D, WBP_ALetter}, + {0x1CD0, 0x1CD2, WBP_Extend}, + {0x1CD4, 0x1CE0, WBP_Extend}, + {0x1CE1, 0x1CE1, WBP_Extend}, + {0x1CE2, 0x1CE8, WBP_Extend}, + {0x1CE9, 0x1CEC, WBP_ALetter}, + {0x1CED, 0x1CED, WBP_Extend}, + {0x1CEE, 0x1CF1, WBP_ALetter}, + {0x1CF2, 0x1CF2, WBP_Extend}, + {0x1D00, 0x1D2B, WBP_ALetter}, + {0x1D2C, 0x1D61, WBP_ALetter}, + {0x1D62, 0x1D77, WBP_ALetter}, + {0x1D78, 0x1D78, WBP_ALetter}, + {0x1D79, 0x1D9A, WBP_ALetter}, + {0x1D9B, 0x1DBF, WBP_ALetter}, + {0x1DC0, 0x1DE6, WBP_Extend}, + {0x1DFC, 0x1DFF, WBP_Extend}, + {0x1E00, 0x1F15, WBP_ALetter}, + {0x1F18, 0x1F1D, WBP_ALetter}, + {0x1F20, 0x1F45, WBP_ALetter}, + {0x1F48, 0x1F4D, WBP_ALetter}, + {0x1F50, 0x1F57, WBP_ALetter}, + {0x1F59, 0x1F59, WBP_ALetter}, + {0x1F5B, 0x1F5B, WBP_ALetter}, + {0x1F5D, 0x1F5D, WBP_ALetter}, + {0x1F5F, 0x1F7D, WBP_ALetter}, + {0x1F80, 0x1FB4, WBP_ALetter}, + {0x1FB6, 0x1FBC, WBP_ALetter}, + {0x1FBE, 0x1FBE, WBP_ALetter}, + {0x1FC2, 0x1FC4, WBP_ALetter}, + {0x1FC6, 0x1FCC, WBP_ALetter}, + {0x1FD0, 0x1FD3, WBP_ALetter}, + {0x1FD6, 0x1FDB, WBP_ALetter}, + {0x1FE0, 0x1FEC, WBP_ALetter}, + {0x1FF2, 0x1FF4, WBP_ALetter}, + {0x1FF6, 0x1FFC, WBP_ALetter}, + {0x200C, 0x200D, WBP_Extend}, + {0x200E, 0x200F, WBP_Format}, + {0x2018, 0x2018, WBP_MidNumLet}, + {0x2019, 0x2019, WBP_MidNumLet}, + {0x2024, 0x2024, WBP_MidNumLet}, + {0x2027, 0x2027, WBP_MidLetter}, + {0x2028, 0x2028, WBP_Newline}, + {0x2029, 0x2029, WBP_Newline}, + {0x202A, 0x202E, WBP_Format}, + {0x203F, 0x2040, WBP_ExtendNumLet}, + {0x2044, 0x2044, WBP_MidNum}, + {0x2054, 0x2054, WBP_ExtendNumLet}, + {0x2060, 0x2064, WBP_Format}, + {0x206A, 0x206F, WBP_Format}, + {0x2071, 0x2071, WBP_ALetter}, + {0x207F, 0x207F, WBP_ALetter}, + {0x2090, 0x209C, WBP_ALetter}, + {0x20D0, 0x20DC, WBP_Extend}, + {0x20DD, 0x20E0, WBP_Extend}, + {0x20E1, 0x20E1, WBP_Extend}, + {0x20E2, 0x20E4, WBP_Extend}, + {0x20E5, 0x20F0, WBP_Extend}, + {0x2102, 0x2102, WBP_ALetter}, + {0x2107, 0x2107, WBP_ALetter}, + {0x210A, 0x2113, WBP_ALetter}, + {0x2115, 0x2115, WBP_ALetter}, + {0x2119, 0x211D, WBP_ALetter}, + {0x2124, 0x2124, WBP_ALetter}, + {0x2126, 0x2126, WBP_ALetter}, + {0x2128, 0x2128, WBP_ALetter}, + {0x212A, 0x212D, WBP_ALetter}, + {0x212F, 0x2134, WBP_ALetter}, + {0x2135, 0x2138, WBP_ALetter}, + {0x2139, 0x2139, WBP_ALetter}, + {0x213C, 0x213F, WBP_ALetter}, + {0x2145, 0x2149, WBP_ALetter}, + {0x214E, 0x214E, WBP_ALetter}, + {0x2160, 0x2182, WBP_ALetter}, + {0x2183, 0x2184, WBP_ALetter}, + {0x2185, 0x2188, WBP_ALetter}, + {0x24B6, 0x24E9, WBP_ALetter}, + {0x2C00, 0x2C2E, WBP_ALetter}, + {0x2C30, 0x2C5E, WBP_ALetter}, + {0x2C60, 0x2C7C, WBP_ALetter}, + {0x2C7D, 0x2C7D, WBP_ALetter}, + {0x2C7E, 0x2CE4, WBP_ALetter}, + {0x2CEB, 0x2CEE, WBP_ALetter}, + {0x2CEF, 0x2CF1, WBP_Extend}, + {0x2D00, 0x2D25, WBP_ALetter}, + {0x2D30, 0x2D65, WBP_ALetter}, + {0x2D6F, 0x2D6F, WBP_ALetter}, + {0x2D7F, 0x2D7F, WBP_Extend}, + {0x2D80, 0x2D96, WBP_ALetter}, + {0x2DA0, 0x2DA6, WBP_ALetter}, + {0x2DA8, 0x2DAE, WBP_ALetter}, + {0x2DB0, 0x2DB6, WBP_ALetter}, + {0x2DB8, 0x2DBE, WBP_ALetter}, + {0x2DC0, 0x2DC6, WBP_ALetter}, + {0x2DC8, 0x2DCE, WBP_ALetter}, + {0x2DD0, 0x2DD6, WBP_ALetter}, + {0x2DD8, 0x2DDE, WBP_ALetter}, + {0x2DE0, 0x2DFF, WBP_Extend}, + {0x2E2F, 0x2E2F, WBP_ALetter}, + {0x3005, 0x3005, WBP_ALetter}, + {0x302A, 0x302F, WBP_Extend}, + {0x3031, 0x3035, WBP_Katakana}, + {0x303B, 0x303B, WBP_ALetter}, + {0x303C, 0x303C, WBP_ALetter}, + {0x3099, 0x309A, WBP_Extend}, + {0x309B, 0x309C, WBP_Katakana}, + {0x30A0, 0x30A0, WBP_Katakana}, + {0x30A1, 0x30FA, WBP_Katakana}, + {0x30FC, 0x30FE, WBP_Katakana}, + {0x30FF, 0x30FF, WBP_Katakana}, + {0x3105, 0x312D, WBP_ALetter}, + {0x3131, 0x318E, WBP_ALetter}, + {0x31A0, 0x31BA, WBP_ALetter}, + {0x31F0, 0x31FF, WBP_Katakana}, + {0x32D0, 0x32FE, WBP_Katakana}, + {0x3300, 0x3357, WBP_Katakana}, + {0xA000, 0xA014, WBP_ALetter}, + {0xA015, 0xA015, WBP_ALetter}, + {0xA016, 0xA48C, WBP_ALetter}, + {0xA4D0, 0xA4F7, WBP_ALetter}, + {0xA4F8, 0xA4FD, WBP_ALetter}, + {0xA500, 0xA60B, WBP_ALetter}, + {0xA60C, 0xA60C, WBP_ALetter}, + {0xA610, 0xA61F, WBP_ALetter}, + {0xA620, 0xA629, WBP_Numeric}, + {0xA62A, 0xA62B, WBP_ALetter}, + {0xA640, 0xA66D, WBP_ALetter}, + {0xA66E, 0xA66E, WBP_ALetter}, + {0xA66F, 0xA66F, WBP_Extend}, + {0xA670, 0xA672, WBP_Extend}, + {0xA67C, 0xA67D, WBP_Extend}, + {0xA67F, 0xA67F, WBP_ALetter}, + {0xA680, 0xA697, WBP_ALetter}, + {0xA6A0, 0xA6E5, WBP_ALetter}, + {0xA6E6, 0xA6EF, WBP_ALetter}, + {0xA6F0, 0xA6F1, WBP_Extend}, + {0xA717, 0xA71F, WBP_ALetter}, + {0xA722, 0xA76F, WBP_ALetter}, + {0xA770, 0xA770, WBP_ALetter}, + {0xA771, 0xA787, WBP_ALetter}, + {0xA788, 0xA788, WBP_ALetter}, + {0xA78B, 0xA78E, WBP_ALetter}, + {0xA790, 0xA791, WBP_ALetter}, + {0xA7A0, 0xA7A9, WBP_ALetter}, + {0xA7FA, 0xA7FA, WBP_ALetter}, + {0xA7FB, 0xA801, WBP_ALetter}, + {0xA802, 0xA802, WBP_Extend}, + {0xA803, 0xA805, WBP_ALetter}, + {0xA806, 0xA806, WBP_Extend}, + {0xA807, 0xA80A, WBP_ALetter}, + {0xA80B, 0xA80B, WBP_Extend}, + {0xA80C, 0xA822, WBP_ALetter}, + {0xA823, 0xA824, WBP_Extend}, + {0xA825, 0xA826, WBP_Extend}, + {0xA827, 0xA827, WBP_Extend}, + {0xA840, 0xA873, WBP_ALetter}, + {0xA880, 0xA881, WBP_Extend}, + {0xA882, 0xA8B3, WBP_ALetter}, + {0xA8B4, 0xA8C3, WBP_Extend}, + {0xA8C4, 0xA8C4, WBP_Extend}, + {0xA8D0, 0xA8D9, WBP_Numeric}, + {0xA8E0, 0xA8F1, WBP_Extend}, + {0xA8F2, 0xA8F7, WBP_ALetter}, + {0xA8FB, 0xA8FB, WBP_ALetter}, + {0xA900, 0xA909, WBP_Numeric}, + {0xA90A, 0xA925, WBP_ALetter}, + {0xA926, 0xA92D, WBP_Extend}, + {0xA930, 0xA946, WBP_ALetter}, + {0xA947, 0xA951, WBP_Extend}, + {0xA952, 0xA953, WBP_Extend}, + {0xA960, 0xA97C, WBP_ALetter}, + {0xA980, 0xA982, WBP_Extend}, + {0xA983, 0xA983, WBP_Extend}, + {0xA984, 0xA9B2, WBP_ALetter}, + {0xA9B3, 0xA9B3, WBP_Extend}, + {0xA9B4, 0xA9B5, WBP_Extend}, + {0xA9B6, 0xA9B9, WBP_Extend}, + {0xA9BA, 0xA9BB, WBP_Extend}, + {0xA9BC, 0xA9BC, WBP_Extend}, + {0xA9BD, 0xA9C0, WBP_Extend}, + {0xA9CF, 0xA9CF, WBP_ALetter}, + {0xA9D0, 0xA9D9, WBP_Numeric}, + {0xAA00, 0xAA28, WBP_ALetter}, + {0xAA29, 0xAA2E, WBP_Extend}, + {0xAA2F, 0xAA30, WBP_Extend}, + {0xAA31, 0xAA32, WBP_Extend}, + {0xAA33, 0xAA34, WBP_Extend}, + {0xAA35, 0xAA36, WBP_Extend}, + {0xAA40, 0xAA42, WBP_ALetter}, + {0xAA43, 0xAA43, WBP_Extend}, + {0xAA44, 0xAA4B, WBP_ALetter}, + {0xAA4C, 0xAA4C, WBP_Extend}, + {0xAA4D, 0xAA4D, WBP_Extend}, + {0xAA50, 0xAA59, WBP_Numeric}, + {0xAA7B, 0xAA7B, WBP_Extend}, + {0xAAB0, 0xAAB0, WBP_Extend}, + {0xAAB2, 0xAAB4, WBP_Extend}, + {0xAAB7, 0xAAB8, WBP_Extend}, + {0xAABE, 0xAABF, WBP_Extend}, + {0xAAC1, 0xAAC1, WBP_Extend}, + {0xAB01, 0xAB06, WBP_ALetter}, + {0xAB09, 0xAB0E, WBP_ALetter}, + {0xAB11, 0xAB16, WBP_ALetter}, + {0xAB20, 0xAB26, WBP_ALetter}, + {0xAB28, 0xAB2E, WBP_ALetter}, + {0xABC0, 0xABE2, WBP_ALetter}, + {0xABE3, 0xABE4, WBP_Extend}, + {0xABE5, 0xABE5, WBP_Extend}, + {0xABE6, 0xABE7, WBP_Extend}, + {0xABE8, 0xABE8, WBP_Extend}, + {0xABE9, 0xABEA, WBP_Extend}, + {0xABEC, 0xABEC, WBP_Extend}, + {0xABED, 0xABED, WBP_Extend}, + {0xABF0, 0xABF9, WBP_Numeric}, + {0xAC00, 0xD7A3, WBP_ALetter}, + {0xD7B0, 0xD7C6, WBP_ALetter}, + {0xD7CB, 0xD7FB, WBP_ALetter}, + {0xFB00, 0xFB06, WBP_ALetter}, + {0xFB13, 0xFB17, WBP_ALetter}, + {0xFB1D, 0xFB1D, WBP_ALetter}, + {0xFB1E, 0xFB1E, WBP_Extend}, + {0xFB1F, 0xFB28, WBP_ALetter}, + {0xFB2A, 0xFB36, WBP_ALetter}, + {0xFB38, 0xFB3C, WBP_ALetter}, + {0xFB3E, 0xFB3E, WBP_ALetter}, + {0xFB40, 0xFB41, WBP_ALetter}, + {0xFB43, 0xFB44, WBP_ALetter}, + {0xFB46, 0xFBB1, WBP_ALetter}, + {0xFBD3, 0xFD3D, WBP_ALetter}, + {0xFD50, 0xFD8F, WBP_ALetter}, + {0xFD92, 0xFDC7, WBP_ALetter}, + {0xFDF0, 0xFDFB, WBP_ALetter}, + {0xFE00, 0xFE0F, WBP_Extend}, + {0xFE10, 0xFE10, WBP_MidNum}, + {0xFE13, 0xFE13, WBP_MidLetter}, + {0xFE14, 0xFE14, WBP_MidNum}, + {0xFE20, 0xFE26, WBP_Extend}, + {0xFE33, 0xFE34, WBP_ExtendNumLet}, + {0xFE4D, 0xFE4F, WBP_ExtendNumLet}, + {0xFE50, 0xFE50, WBP_MidNum}, + {0xFE52, 0xFE52, WBP_MidNumLet}, + {0xFE54, 0xFE54, WBP_MidNum}, + {0xFE55, 0xFE55, WBP_MidLetter}, + {0xFE70, 0xFE74, WBP_ALetter}, + {0xFE76, 0xFEFC, WBP_ALetter}, + {0xFEFF, 0xFEFF, WBP_Format}, + {0xFF07, 0xFF07, WBP_MidNumLet}, + {0xFF0C, 0xFF0C, WBP_MidNum}, + {0xFF0E, 0xFF0E, WBP_MidNumLet}, + {0xFF1A, 0xFF1A, WBP_MidLetter}, + {0xFF1B, 0xFF1B, WBP_MidNum}, + {0xFF21, 0xFF3A, WBP_ALetter}, + {0xFF3F, 0xFF3F, WBP_ExtendNumLet}, + {0xFF41, 0xFF5A, WBP_ALetter}, + {0xFF66, 0xFF6F, WBP_Katakana}, + {0xFF70, 0xFF70, WBP_Katakana}, + {0xFF71, 0xFF9D, WBP_Katakana}, + {0xFF9E, 0xFF9F, WBP_Extend}, + {0xFFA0, 0xFFBE, WBP_ALetter}, + {0xFFC2, 0xFFC7, WBP_ALetter}, + {0xFFCA, 0xFFCF, WBP_ALetter}, + {0xFFD2, 0xFFD7, WBP_ALetter}, + {0xFFDA, 0xFFDC, WBP_ALetter}, + {0xFFF9, 0xFFFB, WBP_Format}, + {0x10000, 0x1000B, WBP_ALetter}, + {0x1000D, 0x10026, WBP_ALetter}, + {0x10028, 0x1003A, WBP_ALetter}, + {0x1003C, 0x1003D, WBP_ALetter}, + {0x1003F, 0x1004D, WBP_ALetter}, + {0x10050, 0x1005D, WBP_ALetter}, + {0x10080, 0x100FA, WBP_ALetter}, + {0x10140, 0x10174, WBP_ALetter}, + {0x101FD, 0x101FD, WBP_Extend}, + {0x10280, 0x1029C, WBP_ALetter}, + {0x102A0, 0x102D0, WBP_ALetter}, + {0x10300, 0x1031E, WBP_ALetter}, + {0x10330, 0x10340, WBP_ALetter}, + {0x10341, 0x10341, WBP_ALetter}, + {0x10342, 0x10349, WBP_ALetter}, + {0x1034A, 0x1034A, WBP_ALetter}, + {0x10380, 0x1039D, WBP_ALetter}, + {0x103A0, 0x103C3, WBP_ALetter}, + {0x103C8, 0x103CF, WBP_ALetter}, + {0x103D1, 0x103D5, WBP_ALetter}, + {0x10400, 0x1044F, WBP_ALetter}, + {0x10450, 0x1049D, WBP_ALetter}, + {0x104A0, 0x104A9, WBP_Numeric}, + {0x10800, 0x10805, WBP_ALetter}, + {0x10808, 0x10808, WBP_ALetter}, + {0x1080A, 0x10835, WBP_ALetter}, + {0x10837, 0x10838, WBP_ALetter}, + {0x1083C, 0x1083C, WBP_ALetter}, + {0x1083F, 0x10855, WBP_ALetter}, + {0x10900, 0x10915, WBP_ALetter}, + {0x10920, 0x10939, WBP_ALetter}, + {0x10A00, 0x10A00, WBP_ALetter}, + {0x10A01, 0x10A03, WBP_Extend}, + {0x10A05, 0x10A06, WBP_Extend}, + {0x10A0C, 0x10A0F, WBP_Extend}, + {0x10A10, 0x10A13, WBP_ALetter}, + {0x10A15, 0x10A17, WBP_ALetter}, + {0x10A19, 0x10A33, WBP_ALetter}, + {0x10A38, 0x10A3A, WBP_Extend}, + {0x10A3F, 0x10A3F, WBP_Extend}, + {0x10A60, 0x10A7C, WBP_ALetter}, + {0x10B00, 0x10B35, WBP_ALetter}, + {0x10B40, 0x10B55, WBP_ALetter}, + {0x10B60, 0x10B72, WBP_ALetter}, + {0x10C00, 0x10C48, WBP_ALetter}, + {0x11000, 0x11000, WBP_Extend}, + {0x11001, 0x11001, WBP_Extend}, + {0x11002, 0x11002, WBP_Extend}, + {0x11003, 0x11037, WBP_ALetter}, + {0x11038, 0x11046, WBP_Extend}, + {0x11066, 0x1106F, WBP_Numeric}, + {0x11080, 0x11081, WBP_Extend}, + {0x11082, 0x11082, WBP_Extend}, + {0x11083, 0x110AF, WBP_ALetter}, + {0x110B0, 0x110B2, WBP_Extend}, + {0x110B3, 0x110B6, WBP_Extend}, + {0x110B7, 0x110B8, WBP_Extend}, + {0x110B9, 0x110BA, WBP_Extend}, + {0x110BD, 0x110BD, WBP_Format}, + {0x12000, 0x1236E, WBP_ALetter}, + {0x12400, 0x12462, WBP_ALetter}, + {0x13000, 0x1342E, WBP_ALetter}, + {0x16800, 0x16A38, WBP_ALetter}, + {0x1B000, 0x1B000, WBP_Katakana}, + {0x1D165, 0x1D166, WBP_Extend}, + {0x1D167, 0x1D169, WBP_Extend}, + {0x1D16D, 0x1D172, WBP_Extend}, + {0x1D173, 0x1D17A, WBP_Format}, + {0x1D17B, 0x1D182, WBP_Extend}, + {0x1D185, 0x1D18B, WBP_Extend}, + {0x1D1AA, 0x1D1AD, WBP_Extend}, + {0x1D242, 0x1D244, WBP_Extend}, + {0x1D400, 0x1D454, WBP_ALetter}, + {0x1D456, 0x1D49C, WBP_ALetter}, + {0x1D49E, 0x1D49F, WBP_ALetter}, + {0x1D4A2, 0x1D4A2, WBP_ALetter}, + {0x1D4A5, 0x1D4A6, WBP_ALetter}, + {0x1D4A9, 0x1D4AC, WBP_ALetter}, + {0x1D4AE, 0x1D4B9, WBP_ALetter}, + {0x1D4BB, 0x1D4BB, WBP_ALetter}, + {0x1D4BD, 0x1D4C3, WBP_ALetter}, + {0x1D4C5, 0x1D505, WBP_ALetter}, + {0x1D507, 0x1D50A, WBP_ALetter}, + {0x1D50D, 0x1D514, WBP_ALetter}, + {0x1D516, 0x1D51C, WBP_ALetter}, + {0x1D51E, 0x1D539, WBP_ALetter}, + {0x1D53B, 0x1D53E, WBP_ALetter}, + {0x1D540, 0x1D544, WBP_ALetter}, + {0x1D546, 0x1D546, WBP_ALetter}, + {0x1D54A, 0x1D550, WBP_ALetter}, + {0x1D552, 0x1D6A5, WBP_ALetter}, + {0x1D6A8, 0x1D6C0, WBP_ALetter}, + {0x1D6C2, 0x1D6DA, WBP_ALetter}, + {0x1D6DC, 0x1D6FA, WBP_ALetter}, + {0x1D6FC, 0x1D714, WBP_ALetter}, + {0x1D716, 0x1D734, WBP_ALetter}, + {0x1D736, 0x1D74E, WBP_ALetter}, + {0x1D750, 0x1D76E, WBP_ALetter}, + {0x1D770, 0x1D788, WBP_ALetter}, + {0x1D78A, 0x1D7A8, WBP_ALetter}, + {0x1D7AA, 0x1D7C2, WBP_ALetter}, + {0x1D7C4, 0x1D7CB, WBP_ALetter}, + {0x1D7CE, 0x1D7FF, WBP_Numeric}, + {0xE0001, 0xE0001, WBP_Format}, + {0xE0020, 0xE007F, WBP_Format}, + {0xE0100, 0xE01EF, WBP_Extend}, + {0xFFFFFFFF, 0xFFFFFFFF, WBP_Undefined} +}; diff --git a/libraries/evas/src/static_deps/liblinebreak/wordbreakdef.h b/libraries/evas/src/static_deps/liblinebreak/wordbreakdef.h new file mode 100644 index 0000000..331cd01 --- /dev/null +++ b/libraries/evas/src/static_deps/liblinebreak/wordbreakdef.h @@ -0,0 +1,80 @@ +/* vim: set tabstop=4 shiftwidth=4: */ + +/* + * Word breaking in a Unicode sequence. Designed to be used in a + * generic text renderer. + * + * Copyright (C) 2011-2011 Tom Hacohen + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the author be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute + * it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must + * not claim that you wrote the original software. If you use this + * software in a product, an acknowledgement in the product + * documentation would be appreciated but is not required. + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * 3. This notice may not be removed or altered from any source + * distribution. + * + * The main reference is Unicode Standard Annex 29 (UAX #29): + * + * + * When this library was designed, this annex was at Revision 17, for + * Unicode 6.0.0: + * + * + * The Unicode Terms of Use are available at + * + */ + +/** + * @file wordbreakdef.h + * + * Definitions of internal data structures, declarations of global + * variables, and function prototypes for the word breaking algorithm. + * + * @version 2.0, 2011/12/12 + * @author Tom Hacohen + */ + +/** + * Word break classes. This is a direct mapping of Table 3 of Unicode + * Standard Annex 29, Revision 17. + */ +enum WordBreakClass +{ + WBP_Undefined, + + /* The following break classes are treated in the pair table. */ + WBP_CR, + WBP_LF, + WBP_Newline, + WBP_Extend, + WBP_Format, + WBP_Katakana, + WBP_ALetter, + WBP_MidNumLet, + WBP_MidLetter, + WBP_MidNum, + WBP_Numeric, + WBP_ExtendNumLet, + WBP_Any +}; + +/** + * Struct for entries of word break properties. The array of the + * entries \e must be sorted. + */ +struct WordBreakProperties +{ + utf32_t start; /**< Starting coding point */ + utf32_t end; /**< End coding point */ + enum WordBreakClass prop; /**< The word breaking property */ +}; diff --git a/libraries/evas/src/tests/Makefile.in b/libraries/evas/src/tests/Makefile.in index c598c3d..8790c33 100644 --- a/libraries/evas/src/tests/Makefile.in +++ b/libraries/evas/src/tests/Makefile.in @@ -203,8 +203,6 @@ 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@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -221,6 +219,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -302,6 +302,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/tests/evas_test_callbacks.c b/libraries/evas/src/tests/evas_test_callbacks.c index 675ee1c..164851e 100644 --- a/libraries/evas/src/tests/evas_test_callbacks.c +++ b/libraries/evas/src/tests/evas_test_callbacks.c @@ -28,7 +28,7 @@ do \ } \ while (0) -static int counter = 1; +static uintptr_t counter = 1; static void _obj_event_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) @@ -37,7 +37,7 @@ _obj_event_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) (void) obj; (void) event_info; - fail_if(((int) data) != counter); + fail_if(((uintptr_t) data) != counter); counter++; } @@ -83,7 +83,7 @@ _event_cb(void *data, Evas *e, void *event_info) (void) e; (void) event_info; - fail_if(((int) data) != counter); + fail_if(((uintptr_t) data) != counter); counter++; } diff --git a/libraries/evas/src/tests/evas_test_textblock.c b/libraries/evas/src/tests/evas_test_textblock.c index 6a28353..cf6a78b 100644 --- a/libraries/evas/src/tests/evas_test_textblock.c +++ b/libraries/evas/src/tests/evas_test_textblock.c @@ -21,9 +21,7 @@ _evas_textblock_format_offset_get(const Evas_Object_Textblock_Node_Format *n); static const char *style_buf = "DEFAULT='font=Sans font_size=10 color=#000 text_class=entry'" - "br='\n'" - "ps='ps'" - "tab='\t'" + "newline='br'" "b='+ font=Sans:style=bold'"; #define START_TB_TEST() \ @@ -61,7 +59,7 @@ while (0) START_TEST(evas_textblock_simple) { START_TB_TEST(); - const char *buf = "This is a
test."; + const char *buf = "This is a
test."; evas_object_textblock_text_markup_set(tb, buf); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); END_TB_TEST(); @@ -95,12 +93,12 @@ START_TEST(evas_textblock_cursor) Evas_Coord x, y, w, h; size_t i, len; Evas_Coord nw, nh; - const char *buf = "This is a
test.Lets see if this works.עוד פסקה."; + const char *buf = "This is a
test.Lets see if this works.עוד פסקה."; /* Walk the textblock using cursor_char_next */ evas_object_textblock_text_markup_set(tb, buf); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); - len = eina_unicode_utf8_get_len(buf) - 9; /* 9 because len(
) == 1 and len() == 1 */ + len = eina_unicode_utf8_get_len(buf) - 12; /* 12 because len(
) == 1 and len() == 1 */ for (i = 0 ; i < len ; i++) { _CHECK_CURSOR_COORDS(); @@ -284,7 +282,7 @@ START_TEST(evas_textblock_cursor) /* Paragraph text get */ evas_textblock_cursor_paragraph_first(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), - "This is a
test.")); + "This is a
test.")); evas_textblock_cursor_paragraph_next(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), "Lets see if this works.")); @@ -294,9 +292,9 @@ START_TEST(evas_textblock_cursor) /* Paragraph length get */ evas_textblock_cursor_paragraph_first(cur); - /* -3 because len(
) == 1 */ + /* -4 because len(
) == 1 */ fail_if(evas_textblock_cursor_paragraph_text_length_get(cur) != - eina_unicode_utf8_get_len("This is a
test.") - 3); + eina_unicode_utf8_get_len("This is a
test.") - 4); evas_textblock_cursor_paragraph_next(cur); fail_if(evas_textblock_cursor_paragraph_text_length_get(cur) != eina_unicode_utf8_get_len("Lets see if this works.")); @@ -308,7 +306,7 @@ START_TEST(evas_textblock_cursor) evas_textblock_cursor_pos_set(cur, 0); fail_if(strcmp(evas_textblock_cursor_content_get(cur), "T")); evas_textblock_cursor_pos_set(cur, 9); - fail_if(strcmp(evas_textblock_cursor_content_get(cur), "
")); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "
")); evas_textblock_cursor_pos_set(cur, 43); fail_if(strcmp(evas_textblock_cursor_content_get(cur), "ד")); @@ -414,12 +412,12 @@ START_TEST(evas_textblock_cursor) #ifdef HAVE_FRIBIDI evas_object_textblock_text_markup_set(tb, - "testנסיוןtestנסיון" - "נסיוןtestנסיוןtest" - "testנסיוןtest" - "נסיוןtestנסיון" - "testנסיון
נסיון" - "נסיוןtest
test" + "testנסיוןtestנסיון" + "נסיוןtestנסיוןtest" + "testנסיוןtest" + "נסיוןtestנסיון" + "testנסיון
נסיון" + "נסיוןtest
test" ); for (i = 0 ; i < 8 ; i++) @@ -568,6 +566,32 @@ START_TEST(evas_textblock_cursor) fail_if(evas_textblock_cursor_compare(main_cur, cur)); } + { + const char *buf_wb = "a This is_a t:e.s't a"; + evas_object_textblock_text_markup_set(tb, buf_wb); + + /* Word start/end */ + evas_textblock_cursor_pos_set(cur, 3); + evas_textblock_cursor_word_start(cur); + fail_if(2 != evas_textblock_cursor_pos_get(cur)); + evas_textblock_cursor_word_end(cur); + fail_if(5 != evas_textblock_cursor_pos_get(cur)); + + evas_textblock_cursor_pos_set(cur, 13); + evas_textblock_cursor_word_end(cur); + fail_if(18 != evas_textblock_cursor_pos_get(cur)); + evas_textblock_cursor_word_start(cur); + fail_if(12 != evas_textblock_cursor_pos_get(cur)); + evas_textblock_cursor_word_start(cur); + fail_if(12 != evas_textblock_cursor_pos_get(cur)); + evas_textblock_cursor_word_start(cur); + fail_if(12 != evas_textblock_cursor_pos_get(cur)); + evas_textblock_cursor_word_end(cur); + fail_if(18 != evas_textblock_cursor_pos_get(cur)); + evas_textblock_cursor_word_end(cur); + fail_if(18 != evas_textblock_cursor_pos_get(cur)); + } + END_TB_TEST(); } END_TEST @@ -723,7 +747,7 @@ START_TEST(evas_textblock_format_removal) /* Range deletion across paragraphs */ evas_object_textblock_text_markup_set(tb, - "This ate" + "This ate" "sst."); evas_textblock_cursor_pos_set(cur, 6); evas_textblock_cursor_pos_set(main_cur, 10); @@ -749,14 +773,14 @@ START_TEST(evas_textblock_format_removal) fail_if (fnode); /* Two formats across different paragraphs with notihng in between. */ - evas_object_textblock_text_markup_set(tb, ""); + evas_object_textblock_text_markup_set(tb, ""); evas_textblock_cursor_pos_set(cur, 0); evas_textblock_cursor_char_delete(cur); fnode = evas_textblock_node_format_first_get(tb); fail_if (fnode); /* Try with range */ - evas_object_textblock_text_markup_set(tb, ""); + evas_object_textblock_text_markup_set(tb, ""); evas_textblock_cursor_pos_set(cur, 0); evas_textblock_cursor_pos_set(main_cur, 1); evas_textblock_cursor_range_delete(cur, main_cur); @@ -765,7 +789,7 @@ START_TEST(evas_textblock_format_removal) /* Verify fmt position and REP_CHAR positions are the same */ evas_object_textblock_text_markup_set(tb, - "This isan a."); + "This isan a."); evas_textblock_cursor_pos_set(cur, 7); evas_textblock_cursor_char_delete(cur); fnode = evas_textblock_node_format_first_get(tb); @@ -1091,9 +1115,9 @@ START_TEST(evas_textblock_wrapping) evas_object_textblock_text_markup_set(tb, "a"); evas_object_textblock_size_formatted_get(tb, &bw, &bh); evas_object_textblock_text_markup_set(tb, - "aaaa aaaa aaa aa aaa" - "aaaa aaa aaa aaa aaa" - "a aaaaa aaaaaaaaaaaaaa
aaaaa" + "aaaa aaaa aaa aa aaa" + "aaaa aaa aaa aaa aaa" + "a aaaaa aaaaaaaaaaaaaa
aaaaa" "aaaaaa" ); evas_textblock_cursor_format_prepend(cur, "+ wrap=char"); @@ -1113,9 +1137,9 @@ START_TEST(evas_textblock_wrapping) evas_object_textblock_text_markup_set(tb, "aaaaaa"); evas_object_textblock_size_formatted_get(tb, &bw, &bh); evas_object_textblock_text_markup_set(tb, - "aaaa aaaa aaa aa aaa" - "aaaa aaa aaa aaa aaa" - "a aaaaa aaaaaa
aaaaa" + "aaaa aaaa aaa aa aaa" + "aaaa aaa aaa aaa aaa" + "a aaaaa aaaaaa
aaaaa" "aaaaa" ); evas_textblock_cursor_format_prepend(cur, "+ wrap=word"); @@ -1134,9 +1158,9 @@ START_TEST(evas_textblock_wrapping) evas_object_textblock_text_markup_set(tb, "a"); evas_object_textblock_size_formatted_get(tb, &bw, &bh); evas_object_textblock_text_markup_set(tb, - "aaaa aaaa aaa aa aaa" - "aaaa aaa aaa aaa aaa" - "a aaaaa aaaaaa
aaaaa" + "aaaa aaaa aaa aa aaa" + "aaaa aaa aaa aaa aaa" + "a aaaaa aaaaaa
aaaaa" "aaaaa" ); evas_textblock_cursor_format_prepend(cur, "+ wrap=mixed"); @@ -1156,26 +1180,26 @@ START_TEST(evas_textblock_wrapping) int wrap_items = sizeof(wrap_style) / sizeof(*wrap_style); evas_object_textblock_text_markup_set(tb, - "This is an entry widget in this window that
" - "uses markup like this for styling and
" - "formatting like this, as well as
" - "links in the text, so enter text
" - "in here to edit it. By the way, links are
" - "called Anchors so you will need
" - "to refer to them this way.
" - "
" + "This is an entry widget in this window that
" + "uses markup like this for styling and
" + "formatting like this, as well as
" + "links in the text, so enter text
" + "in here to edit it. By the way, links are
" + "called Anchors so you will need
" + "to refer to them this way.
" + "
" "Also you can stick in items with (relsize + ascent): " "" " (full) " "" - " (to the left)
" + " (to the left)
" "Also (size + ascent): " "" " (full) " "" - " (before this)
" + " (before this)
" "And as well (absize + ascent): " "" @@ -1214,6 +1238,13 @@ START_TEST(evas_textblock_wrapping) evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if((w > (nw / 2)) || (h != nh)); + evas_object_textblock_text_markup_set(tb, "aaaaaaaaaaaaaaaaaa
b"); + evas_textblock_cursor_format_prepend(cur, "+ ellipsis=1.0 wrap=word"); + evas_object_textblock_size_native_get(tb, &nw, &nh); + evas_object_resize(tb, nw / 2, nh * 2); + evas_object_textblock_size_formatted_get(tb, &w, &h); + fail_if(w > (nw / 2)); + END_TB_TEST(); } END_TEST @@ -1223,7 +1254,7 @@ START_TEST(evas_textblock_various) { Evas_Coord w, h, bw, bh; START_TB_TEST(); - const char *buf = "Thistextblockhasalotoflines."; + const char *buf = "Thistextblockhasalotoflines."; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); /* Move outside of the screen so it'll have to search for the correct @@ -1241,15 +1272,15 @@ START_TEST(evas_textblock_various) /* Items have correct text node information */ evas_object_textblock_text_markup_set(tb, ""); fail_if(!_evas_textblock_check_item_node_link(tb)); - evas_object_textblock_text_markup_set(tb, ""); + evas_object_textblock_text_markup_set(tb, ""); fail_if(!_evas_textblock_check_item_node_link(tb)); - evas_object_textblock_text_markup_set(tb, "a"); + evas_object_textblock_text_markup_set(tb, "a"); fail_if(!_evas_textblock_check_item_node_link(tb)); - evas_object_textblock_text_markup_set(tb, "aa"); + evas_object_textblock_text_markup_set(tb, "aa"); fail_if(!_evas_textblock_check_item_node_link(tb)); - evas_object_textblock_text_markup_set(tb, "aa"); + evas_object_textblock_text_markup_set(tb, "aa"); fail_if(!_evas_textblock_check_item_node_link(tb)); - evas_object_textblock_text_markup_set(tb, "aaa"); + evas_object_textblock_text_markup_set(tb, "aaa"); fail_if(!_evas_textblock_check_item_node_link(tb)); END_TB_TEST(); @@ -1260,7 +1291,7 @@ END_TEST START_TEST(evas_textblock_geometries) { START_TB_TEST(); - const char *buf = "This is a
test."; + const char *buf = "This is a
test."; evas_object_textblock_text_markup_set(tb, buf); /* Single line range */ @@ -1327,7 +1358,7 @@ END_TEST START_TEST(evas_textblock_editing) { START_TB_TEST(); - const char *buf = "First par.Second par."; + const char *buf = "First par.Second par."; evas_object_textblock_text_markup_set(tb, buf); Evas_Textblock_Cursor *main_cur = evas_object_textblock_cursor_get(tb); @@ -1346,7 +1377,7 @@ START_TEST(evas_textblock_editing) evas_textblock_cursor_paragraph_first(cur); evas_textblock_cursor_char_delete(cur); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), - "irst par.Second par.")); + "irst par.Second par.")); /* Delete some arbitrary char */ evas_textblock_cursor_char_next(cur); @@ -1354,14 +1385,14 @@ START_TEST(evas_textblock_editing) evas_textblock_cursor_char_next(cur); evas_textblock_cursor_char_delete(cur); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), - "irs par.Second par.")); + "irs par.Second par.")); /* Delete a range */ evas_textblock_cursor_pos_set(main_cur, 1); evas_textblock_cursor_pos_set(cur, 6); evas_textblock_cursor_range_delete(cur, main_cur); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), - "ir.Second par.")); + "ir.Second par.")); evas_textblock_cursor_paragraph_char_first(main_cur); evas_textblock_cursor_paragraph_char_last(cur); evas_textblock_cursor_char_next(cur); @@ -1376,7 +1407,7 @@ START_TEST(evas_textblock_editing) evas_textblock_cursor_paragraph_char_first(main_cur); evas_textblock_cursor_range_delete(cur, main_cur); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), - "First par.")); + "First par.")); /* Merging paragraphs */ evas_object_textblock_text_markup_set(tb, buf); @@ -1406,6 +1437,27 @@ START_TEST(evas_textblock_editing) evas_textblock_cursor_paragraph_first(cur); fail_if(evas_textblock_cursor_paragraph_next(cur)); + /* Insert illegal characters inside the format. */ + { + const char *content; + evas_object_textblock_text_markup_set(tb, "a\n"); + evas_textblock_cursor_pos_set(cur, 1); + content = evas_textblock_cursor_content_get(cur); + + evas_object_textblock_text_markup_set(tb, "a\t"); + evas_textblock_cursor_pos_set(cur, 1); + content = evas_textblock_cursor_content_get(cur); + + evas_object_textblock_text_markup_set(tb, "a\xEF\xBF\xBC"); + evas_textblock_cursor_pos_set(cur, 1); + content = evas_textblock_cursor_content_get(cur); + + evas_object_textblock_text_markup_set(tb, "a\xE2\x80\xA9"); + evas_textblock_cursor_pos_set(cur, 1); + content = evas_textblock_cursor_content_get(cur); + (void) content; + } + /* FIXME: Also add text appending/prepending */ END_TB_TEST(); @@ -1416,13 +1468,13 @@ END_TEST START_TEST(evas_textblock_text_getters) { START_TB_TEST(); - const char *buf = "This is a
test." - "טקסט בעבריתand now in english."; + const char *buf = "This is a
test." + "טקסט בעבריתand now in english."; evas_object_textblock_text_markup_set(tb, buf); evas_textblock_cursor_paragraph_first(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), - "This is a
test.")); + "This is a
test.")); evas_textblock_cursor_paragraph_next(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), @@ -1447,17 +1499,17 @@ START_TEST(evas_textblock_text_getters) evas_textblock_cursor_pos_set(main_cur, 5); evas_textblock_cursor_pos_set(cur, 14); fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, - EVAS_TEXTBLOCK_TEXT_MARKUP), "is a
te")); + EVAS_TEXTBLOCK_TEXT_MARKUP), "is a
te")); evas_textblock_cursor_pos_set(main_cur, 14); evas_textblock_cursor_pos_set(cur, 20); fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, - EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טק")); + EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טק")); evas_textblock_cursor_pos_set(main_cur, 14); evas_textblock_cursor_pos_set(cur, 32); fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, - EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טקסט בעבריתan")); + EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טקסט בעבריתan")); /* Backward range get */ evas_textblock_cursor_pos_set(main_cur, 2); @@ -1473,17 +1525,17 @@ START_TEST(evas_textblock_text_getters) evas_textblock_cursor_pos_set(main_cur, 5); evas_textblock_cursor_pos_set(cur, 14); fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, - EVAS_TEXTBLOCK_TEXT_MARKUP), "is a
te")); + EVAS_TEXTBLOCK_TEXT_MARKUP), "is a
te")); evas_textblock_cursor_pos_set(main_cur, 14); evas_textblock_cursor_pos_set(cur, 20); fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, - EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טק")); + EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טק")); evas_textblock_cursor_pos_set(main_cur, 14); evas_textblock_cursor_pos_set(cur, 32); fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, - EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טקסט בעבריתan")); + EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טקסט בעבריתan")); /* Uninit cursors and other weird cases */ evas_object_textblock_clear(tb); @@ -1492,6 +1544,97 @@ START_TEST(evas_textblock_text_getters) fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, EVAS_TEXTBLOCK_TEXT_MARKUP), "aaa")); + /* Markup to plain and vice versa */ + { + char *tmp, *tmp2; + + /* Real textblock object */ + tmp = evas_textblock_text_markup_to_utf8(tb, "
aa<\n/>bb<\t/>"); + fail_if(strcmp(tmp, "\naa\nbb\t")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "
aa
bb")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(tb, "a"); + fail_if(strcmp(tmp, "a\xEF\xBF\xBC")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "a")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(tb, "a "); + fail_if(strcmp(tmp, "a\xC2\xA0")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "a\xC2\xA0")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(tb, "aba"); + fail_if(strcmp(tmp, "aba")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "aba")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(tb, "a&a"); + fail_if(strcmp(tmp, "a&a")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "a&a")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(tb, "aa"); + fail_if(strcmp(tmp, "a\na")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "a
a")); + free(tmp2); + free(tmp); + + /* NULL textblock object */ + tmp = evas_textblock_text_markup_to_utf8(NULL, "
aa<\n/>bb<\t/>"); + fail_if(strcmp(tmp, "\naa\nbb\t")); + tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); + fail_if(strcmp(tmp2, "
aa
bb")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(NULL, "a"); + fail_if(strcmp(tmp, "a\xEF\xBF\xBC")); + tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); + fail_if(strcmp(tmp2, "a")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(NULL, "a "); + fail_if(strcmp(tmp, "a\xC2\xA0")); + tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); + fail_if(strcmp(tmp2, "a\xC2\xA0")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(NULL, "aba"); + fail_if(strcmp(tmp, "aba")); + tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); + fail_if(strcmp(tmp2, "aba")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(tb, "a&a"); + fail_if(strcmp(tmp, "a&a")); + tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); + fail_if(strcmp(tmp2, "a&a")); + free(tmp2); + free(tmp); + + tmp = evas_textblock_text_markup_to_utf8(NULL, "aa"); + fail_if(strcmp(tmp, "aa")); + tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); + fail_if(strcmp(tmp2, "aa")); + free(tmp2); + free(tmp); + } + END_TB_TEST(); } END_TEST @@ -1500,7 +1643,7 @@ END_TEST START_TEST(evas_textblock_formats) { START_TB_TEST(); - const char *buf = "This is a
test."; + const char *buf = "This is a
test."; const Evas_Object_Textblock_Node_Format *fnode; evas_object_textblock_text_markup_set(tb, buf); @@ -1652,25 +1795,25 @@ START_TEST(evas_textblock_formats) * verify them visually, well, we can some of them. Possibly in the * future we will */ evas_object_textblock_text_markup_set(tb, - "font_size=40" - "color=#F210B3FF" - "underline=single underline_color=#A2B3C4" - "underline=double underline_color=#F00 underline2_color=#00F" - "underline=dashed underline_dash_color=#0F0 underline_dash_width=2 underline_dash_gap=1" - "style=outline outline_color=#F0FA" - "style=shadow shadow_color=#F0F" - "style=glow glow_color=#BBB" - "style=glow glow2_color=#0F0" - "style=glow color=#fff glow2_color=#fe87 glow_color=#f214" - "backing=on backing_color=#00F" - "strikethrough=on strikethrough_color=#FF0" - "align=right" - "valign=0.0" - "tabstops=<\\t>50" - "linesize=40" - "linerelsize=200%" - "linegap=20" - "linerelgap=100%"); + "font_size=40" + "color=#F210B3FF" + "underline=single underline_color=#A2B3C4" + "underline=double underline_color=#F00 underline2_color=#00F" + "underline=dashed underline_dash_color=#0F0 underline_dash_width=2 underline_dash_gap=1" + "style=outline outline_color=#F0FA" + "style=shadow shadow_color=#F0F" + "style=glow glow_color=#BBB" + "style=glow glow2_color=#0F0" + "style=glow color=#fff glow2_color=#fe87 glow_color=#f214" + "backing=on backing_color=#00F" + "strikethrough=on strikethrough_color=#FF0" + "align=right" + "valign=0.0" + "tabstops=<\\t>50" + "linesize=40" + "linerelsize=200%" + "linegap=20" + "linerelgap=100%"); /* Force a relayout */ evas_object_textblock_size_formatted_get(tb, NULL, NULL); @@ -1714,22 +1857,22 @@ START_TEST(evas_textblock_formats) } /* Make sure we get all the types of visible formats correctly. */ - evas_object_textblock_text_markup_set(tb, "a
aa"); + evas_object_textblock_text_markup_set(tb, "a
aa"); fail_if(strcmp(evas_textblock_node_format_text_get( evas_textblock_cursor_format_get(cur)), "ps")); - fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(strcmp(evas_textblock_node_format_text_get( evas_textblock_cursor_format_get(cur)), "br")); - fail_if(strcmp(evas_textblock_cursor_content_get(cur), "
")); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "
")); fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(strcmp(evas_textblock_node_format_text_get( evas_textblock_cursor_format_get(cur)), "tab")); - fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); + fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); @@ -1749,7 +1892,7 @@ START_TEST(evas_textblock_style) Evas_Coord l, r, t, b; START_TB_TEST(); Evas_Textblock_Style *newst; - const char *buf = "TestTest2נסיון"; + const char *buf = "TestTest2נסיון"; evas_object_textblock_text_markup_set(tb, buf); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); @@ -1850,7 +1993,7 @@ START_TEST(evas_textblock_set_get) fail_if(strcmp(evas_object_textblock_bidi_delimiters_get(tb), ",|")); /* Hinting */ - evas_object_textblock_text_markup_set(tb, "This isa test
bla"); + evas_object_textblock_text_markup_set(tb, "This isa test
bla"); /* Force relayout */ evas_object_textblock_size_formatted_get(tb, NULL, NULL); evas_font_hinting_set(evas, EVAS_FONT_HINTING_NONE); @@ -1923,7 +2066,7 @@ START_TEST(evas_textblock_size) { START_TB_TEST(); Evas_Coord w, h, h2, nw, nh; - const char *buf = "This is a
test.
גם בעברית"; + const char *buf = "This is a
test.
גם בעברית"; /* When wrapping is off, native size should be the same as formatted * size */ @@ -1932,7 +2075,7 @@ START_TEST(evas_textblock_size) fail_if((w != nw) || (h != nh)); fail_if(w != 0); - evas_object_textblock_text_markup_set(tb, "a
a"); + evas_object_textblock_text_markup_set(tb, "a
a"); evas_object_textblock_size_formatted_get(tb, &w, &h2); evas_object_textblock_size_native_get(tb, &nw, &nh); fail_if((w != nw) || (h2 != nh)); -- cgit v1.1