diff --git a/.ci/ci-configure.sh b/.ci/ci-configure.sh index df52625761..464380c0e0 100755 --- a/.ci/ci-configure.sh +++ b/.ci/ci-configure.sh @@ -44,7 +44,8 @@ if [ "$BUILDSYSTEM" = "ninja" ] ; then export CFLAGS="-I/usr/local/opt/openssl/include -frewrite-includes $CFLAGS" export LDFLAGS="-L/usr/local/opt/openssl/lib $LDFLAGS" - export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig" + LIBFFI_VER=$(brew list --versions libffi|head -n1|cut -d' ' -f2) + export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:/usr/local/Cellar/libffi/$LIBFFI_VER/lib/pkgconfig" mkdir build && meson build -Decore-imf-loaders-disabler=scim,ibus -Dx11=false -Davahi=false -Dbindings=luajit -Deeze=false -Dsystemd=false -Dnls=false -Dcocoa=true -Demotion-loaders-disabler=gstreamer,gstreamer1,libvlc,xine fi else @@ -146,7 +147,8 @@ else export CFLAGS="-I/usr/local/opt/openssl/include -frewrite-includes $CFLAGS" export LDFLAGS="-L/usr/local/opt/openssl/lib $LDFLAGS" - export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig" + LIBFFI_VER=$(brew list --versions libffi|head -n1|cut -d' ' -f2) + export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:/usr/local/Cellar/libffi/$LIBFFI_VER/lib/pkgconfig" # Normal build test of all targets rm -f ~/.ccache/ccache.conf diff --git a/.ci/ci-osx-deps.sh b/.ci/ci-osx-deps.sh index 22672606e8..838dd2dc05 100755 --- a/.ci/ci-osx-deps.sh +++ b/.ci/ci-osx-deps.sh @@ -2,5 +2,5 @@ brew update brew unlink python -brew install gettext check bullet dbus fontconfig freetype fribidi gst-plugins-good gstreamer luajit openssl webp libsndfile glib libspectre libraw librsvg poppler lz4 pulseaudio ccache ninja python3 +brew install gettext check bullet dbus fontconfig freetype fribidi gst-plugins-good gstreamer luajit openssl webp libsndfile glib libspectre libraw librsvg poppler lz4 pulseaudio ccache ninja python3 libffi pip3 install meson diff --git a/.ci/configure.sh b/.ci/configure.sh index fc2b231081..bdc2d85274 100755 --- a/.ci/configure.sh +++ b/.ci/configure.sh @@ -1,9 +1,8 @@ -#!/bin/bash - +#!/bin/bash +e set -o pipefail export TEST_VAR=1 -if ! ./configure $@ | tee -a configlog ; then +if ! ./configure $@ 2>&1 | tee -a configlog ; then if grep -q 'configure: error: changes in the environment can compromise the build' configlog ; then echo "clearing config.cache and retrying..." rm -f configlog config.cache diff --git a/NEWS b/NEWS index c06270e747..66bcce590f 100644 --- a/NEWS +++ b/NEWS @@ -35,9 +35,22 @@ Features: * efl_ui_relative_layout: introduce new relative container (T5487) * eolian: introduce typed slice types * eolian: add support for inlist structs + * eolian: remove support for inlist/inarray Fixes: + * build: fix rpath for binaries which use ecore-x dependencies + * elm/genlist: remove conditional in _calc_job for verifying show_item code (T6368) + * elementary image: don't calc size using empty ones. + * evas image: fix screen flickering issue at partial + image preloading + * edje_cc: change .mo file write location to be relative to the .edj file + * theme: add programs for deferred naviframe push/pop signals + * edje: unset internal _need_imf flag on shutdown + * elm_panel: return instead of EINA_SAFETY_ON_FALSE_RETURN (T7265) + * build: fix evas static build of gl engines + * ecore/main: only update loop_time during loop iteration if the change is monotonic + * evas gl: fix missing map texture target. + * elm_code: fix crash on backspace and selection delete. (T7259) * ecore_wl2_dmabuf: Link with ecore_wl2 (T7327) * ecore_wl2_dmabuf: Depend on ecore_wl2 (T7327) * efl selection manager - avoid multiple selection get callbacks for req @@ -91,6 +104,30 @@ Fixes: * ecore drm2 - work around kms/drm bug seemingly when no flip event comes * elm textpath: reduces differences between actual pos and modified pos * elm_map: Make more robust elm_map (T7443) + * Fix leak in elm atspi + * eina_file: set errno on open fail for win32 build + * evas-gl-drm: Fix issue of rotation not actually rotating (T7690) + * solve neon rotation issue by moving to the tiled rotator + * eo: Fix missing varags cleanup (CID1399080) + * efl_core_command_line: Fix logically dead code (CID1399106) + * efl_ui_widget_common: Fix potential resource leak (CID1399088) + * efl_ui_selection_manager: Fix unchecked return value (CID1399092) + * evas_device: Fix dereferencing null pointer (CID1399091) + * efl_ui_stack: Fix dereference null return value (CID1399082) + * efl_ui_datepicker: Fix uninitialized scalar value (CID1397006) + * efl_ui_grid: Fix dereferencing null pointer (CID1397000) + * ecore_con: Fix dereferencing of null pointer (CID1396990) + * elm_atspi_bridge: Fix resource leak (CID1399429) + * efl_ui_win: Fix dereference null return value (CID1399428) + * efl_ui_win: Fix dereference null return (CID1399427) + * efl_ui_win: Fix dereference null return (CID1399426) + * efl_ui_win: Fix dereference null return value (CID1399425) + * efreet: Fix resource leak (CID1399090) + * efl_ui_text: Fix resource leak (CID1396998) + * eldbus: Fix dereference after null check (CID1399422) + * efl_ui_focus_manager_calc: Fix resource leaks (CID1396984, CID1396965) + * elm_focus_legacy: Fix resource leaks (CID1399096, CID1399095) + * eldbus: Fix resource leak (CID1399097) Changes since 1.20.0: --------------------- diff --git a/configure.ac b/configure.ac index e99492ce0e..33d626d547 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ EFL_VERSION([1], [22], [0], [release]) -AC_INIT([efl], [efl_version-alpha1], [enlightenment-devel@lists.sourceforge.net]) +AC_INIT([efl], [efl_version-beta2], [enlightenment-devel@lists.sourceforge.net]) AC_PREREQ([2.60]) AC_CONFIG_SRCDIR([configure.ac]) @@ -28,7 +28,6 @@ CXXFLAGS="${CXXFLAGS} -Wno-shadow" # No shadow warnings #### Apply configuring with legacy api's only, eo api's or both. EFL_API_LEGACY_DEF="#define EFL_NOLEGACY_API_SUPPORT" -EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT" efl_api="both" #### For the moment the Eo EFL API is not ready you need to explicitly optin. @@ -43,22 +42,15 @@ AC_ARG_WITH([api], case "$efl_api" in eo) EFL_API_LEGACY_DEF="#define EFL_NOLEGACY_API_SUPPORT" - EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT" CFOPT_WARNING="xyes" ;; - legacy) + legacy|both) EFL_API_LEGACY_DEF="" - EFL_API_EO_DEF="" - ;; - both) - EFL_API_LEGACY_DEF="" - EFL_API_EO_DEF="#define EFL_EO_API_SUPPORT" ;; *) AC_MSG_ERROR([Invalid api (${efl_api}): must be eo, legacy or both]) ;; esac AC_SUBST(EFL_API_LEGACY_DEF) -AC_SUBST(EFL_API_EO_DEF) #### Additional options to configure @@ -147,6 +139,20 @@ case "${build_tests}" in ;; esac +install_eo_files="no" +AC_ARG_ENABLE([install-eo-files], + [AS_HELP_STRING([--enable-install-eo-files],[Enable installing eo files. @<:@default=disabled@:>@])], + [ + if test "x${enableval}" = "xyes" ; then + install_eo_files="yes" + else + install_eo_files="no" + fi + ], + [install_eo_files="no"]) + +AM_CONDITIONAL([INSTALL_EO_FILES], [test "${install_eo_files}" = "yes"]) + AC_ARG_WITH([ecore-con-http-test-url], [AS_HELP_STRING([--with-ecore-con-http-test-url=http://username:password@example.com],[Url of http server for testing with username and password])],[ECORE_CON_HTTP_TEST_URL=${withval}][AC_DEFINE_UNQUOTED([ECORE_CON_HTTP_TEST_URL],["$withval"],[Http url for testing])]) diff --git a/data/elementary/themes/edc/elm/code.edc b/data/elementary/themes/edc/elm/code.edc index 608b16f671..c55e592c21 100644 --- a/data/elementary/themes/edc/elm/code.edc +++ b/data/elementary/themes/edc/elm/code.edc @@ -1,5 +1,6 @@ /* simple layout to pack our scrolling content into an elm_layout */ group { name: "elm/code/layout/default"; + alias: "efl/code/layout"; data { item: "font.name" "Mono"; item: "font.size" "10"; diff --git a/doc/docfx/filterConfig.yml b/doc/docfx/filterConfig.yml index 053426e157..1e683a2fc7 100644 --- a/doc/docfx/filterConfig.yml +++ b/doc/docfx/filterConfig.yml @@ -1,6 +1,8 @@ apiRules: - exclude: uidRegex: ^.*NativeInherit +- exclude: + uidRegex: ^.*Concrete - include: uidRegex: ^Efl - include: diff --git a/examples_checks.py b/examples_checks.py index fa9badc728..f456e6be58 100755 --- a/examples_checks.py +++ b/examples_checks.py @@ -57,6 +57,41 @@ def prep_eet_data_file_descriptor_02(): f2.write(b"Simulation2") return [f1.name, f2.name, "union", "5", "Example-Simulation"] +def prep_ecore_getopt_example(): + return ["string-1", "120", "apple", "none-optional-arg"] + +def prep_eio_file_copy(): + f1 = tempfile.NamedTemporaryFile(delete=False) + f1.write(b"Simulation") + return [f1.name, "/tmp/eio_dst_file"] + +def prep_eio_file_ls(): + return ["/tmp/"] + +def prep_edje_color_class(): + return ["beta", "red", "green", "blue"] + +def prep_ecore_con_url_headers_example(): + return ["GET", "www.enlightenment.org"] + +def prep_ecore_con_url_download_example(): + return ["www.enlightenment.org"] + +def prep_ecore_con_url_cookies_example(): + return ["www.enlightenment.org"] + +def prep_ecore_con_client_example(): + return ["enlightenment.org", "80"] + +def prep_ecore_con_lookup_example(): + return ["enlightenment.org"] + +def prep_ecore_con_server_example(): + return ["enlightenment.org", "1234"] + +def prep_ecore_con_client_simple_example(): + return ["enlightenment.org", "80"] + example_preparation = { "eina_file_02" : prep_eina_file_02, "eina_xattr_01" : prep_eina_xattr_01, @@ -66,6 +101,17 @@ example_preparation = { "eet-data-simple" : prep_eet_data_simple, "eet-data-file_descriptor_01" : prep_eet_data_file_descriptor_01, "eet-data-file_descriptor_02" : prep_eet_data_file_descriptor_02, + "ecore_getopt_example" : prep_ecore_getopt_example, + "eio_file_copy" : prep_eio_file_copy, + "eio_file_ls" : prep_eio_file_ls, + "edje-color-class" : prep_edje_color_class, + "ecore_con_url_headers_example" : prep_ecore_con_url_headers_example, + "ecore_con_url_download_example" : prep_ecore_con_url_download_example, + "ecore_con_url_cookies_example" : prep_ecore_con_url_cookies_example, + "ecore_con_client_example" : prep_ecore_con_client_example, + "ecore_con_lookup_example" : prep_ecore_con_lookup_example, + "ecore_con_server_example" : prep_ecore_con_server_example, + "ecore_con_client_simple_example" : prep_ecore_con_client_simple_example, } # @@ -105,7 +151,14 @@ def simulate_example(example): args = [] if os.path.basename(example) in example_preparation: args = example_preparation[os.path.basename(example)]() - run = subprocess.Popen([G.builddir + "/" + example] + args, + + #meson changed behaviour from 0.49 to 0.50 so we need this: + if os.path.isabs(example): + example_dir = example + else: + example_dir = os.path.join(G.builddir, example) + + run = subprocess.Popen([example_dir] + args, stdout = subprocess.PIPE, stderr = subprocess.PIPE, ) @@ -119,10 +172,18 @@ def simulate_example(example): else: return (example, True if b'ERR' in outs or b'ERR' in errs else False, run.poll()) +#meson changed behaviour from 0.49 to 0.50 so we need this: +def meson_fetch_filename(filename_object): + if isinstance(filename_object, str): + return filename_object + else: + return filename_object[0] + parser = argparse.ArgumentParser(description='Run the examples of efl') parser.add_argument('builddir', metavar='build', help='the path where to find the meson build directory') + G = parser.parse_args() #Run meson to fetch all examples meson_introspect = subprocess.Popen(["meson", "introspect", G.builddir, "--targets"], @@ -131,7 +192,7 @@ meson_introspect = subprocess.Popen(["meson", "introspect", G.builddir, "--targe ) meson_introspect.poll() build_targets = json.loads(meson_introspect.stdout.read()) -examples = [b["filename"] for b in build_targets if "examples" in b["filename"] and b["type"] == "executable"] +examples = [meson_fetch_filename(b["filename"]) for b in build_targets if "examples" in meson_fetch_filename(b["filename"]) and b["type"] == "executable"] state = State(len(examples)) #simulate all examples in parallel with up to 5 runners with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor: diff --git a/header_checks/meson.build b/header_checks/meson.build index c77ad94c34..48eeb89d2a 100644 --- a/header_checks/meson.build +++ b/header_checks/meson.build @@ -43,7 +43,6 @@ header_checks = [ 'sys/wait.h', 'sys/resource.h', 'sys/times.h', - 'dirent.h', 'longinfo.h', 'exotic.h', 'ieeefp.h', @@ -106,7 +105,6 @@ function_checks = [ #FIXME strlcpy is detected by meson but drops at compilation time # ['strlcpy', ['string.h']], ['siginfo_t', ['signal.h']], - ['strerror_r', ['string.h']], ['pthread_getcpuclockid', ['pthread.h', 'time.h']], ['timerfd_create', ['sys/timerfd.h']], ['kevent', ['sys/types.h', 'sys/event.h', 'sys/time.h']], diff --git a/meson.build b/meson.build index 93cd3be56b..46eecba748 100644 --- a/meson.build +++ b/meson.build @@ -97,7 +97,6 @@ add_global_arguments(dev_cflags, language: 'cpp') foreach lang : ['c', 'objc', 'cpp'] add_global_arguments('-DHAVE_CONFIG_H=1', language: lang) add_global_arguments('-D_GNU_SOURCE=1', language: lang) - add_global_arguments('-DEFL_EO_API_SUPPORT=1', language: lang) add_global_arguments('-DEFL_BETA_API_SUPPORT=1', language: lang) add_global_arguments('-DNEED_RUN_IN_TREE=1', language: lang) add_global_arguments('-DEFL_BUILD=1', language: lang) @@ -121,6 +120,7 @@ foreach lang : ['c', 'objc', 'cpp'] else error('Version of targetted Windows incorrect') endif + add_global_arguments('-D__USE_MINGW_ANSI_STDIO', language: lang) endif endforeach @@ -422,9 +422,12 @@ if get_option('eolian-bootstrap') == false subdir(join_paths('src', 'generic', 'emotion')) bindings = get_option('bindings') + bindings_order = ['luajit', 'cxx', 'mono'] - foreach binding : bindings - subdir(join_paths('src', 'bindings', binding)) + foreach binding : bindings_order + if bindings.contains(binding) + subdir(join_paths('src', 'bindings', binding)) + endif endforeach subdir(join_paths('src', 'edje_external')) @@ -467,7 +470,6 @@ efl_config_h.set('EFL_VERSION_MICRO', version_micro) efl_config_h.set('EFL_BUILD_ID', get_option('build-id')) #FIXME placeholder -efl_config_h.set('EFL_API_EO_DEF', '#define EFL_API_EO_DEF "FIXME NOT IMPLEMENTED"') efl_config_h.set('EFL_API_LEGACY_DEF', '#define EFL_API_LEGACY_DEF "FIXME NOT IMPLEMENTED"') configure_file( diff --git a/meson/meson_csharp_docs.sh b/meson/meson_csharp_docs.sh new file mode 100755 index 0000000000..4e6577a173 --- /dev/null +++ b/meson/meson_csharp_docs.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# Installer script needed to install documentation xml file +# as meson's library() call can't track files other than the generated +# efl_mono.dll + +cp $1 $2 diff --git a/meson_options.txt b/meson_options.txt index 7d099b9557..d8bf4b1955 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -366,3 +366,9 @@ option('eolian-bootstrap', value : false, description : 'Only build efl up to eolian_gen and install eina libeolian and eolian_gen, usefull for cross compiles' ) + +option('install-eo-files', + type: 'boolean', + value: false, + description : 'Set this to false to not install any eo file' +) diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index 92c69d1717..1b83d74fa5 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -74,8 +74,10 @@ BUILT_SOURCES += \ $(ecore_priv_c) \ $(ecore_priv_h) +if INSTALL_EO_FILES ecoreeolianfilesdir = $(datadir)/eolian/include/ecore-@VMAJ@ ecoreeolianfiles_DATA = $(ecore_eolian_files_public) lib/ecore/efl_loop_timer.eo +endif ecore_legacy_eo_c = \ lib/ecore/ecore_exe_eo.c \ diff --git a/src/Makefile_Ecore_Audio.am b/src/Makefile_Ecore_Audio.am index 919104fc93..330a5129e2 100644 --- a/src/Makefile_Ecore_Audio.am +++ b/src/Makefile_Ecore_Audio.am @@ -20,11 +20,13 @@ BUILT_SOURCES += \ $(ecore_audio_eolian_c) \ $(ecore_audio_eolian_h) +if INSTALL_EO_FILES ecore_audioeolianfilesdir = $(datadir)/eolian/include/ecore-@VMAJ@ ecore_audioeolianfiles_DATA = $(ecore_audio_eolian_files) +endif EXTRA_DIST2 += \ - ${ecore_audioeolianfiles_DATA} + $(ecore_audio_eolian_files) lib_LTLIBRARIES += lib/ecore_audio/libecore_audio.la diff --git a/src/Makefile_Ecore_Con.am b/src/Makefile_Ecore_Con.am index b184cc2a72..c38acacf6d 100644 --- a/src/Makefile_Ecore_Con.am +++ b/src/Makefile_Ecore_Con.am @@ -56,13 +56,16 @@ BUILT_SOURCES += \ $(ecore_con_eolian_c) \ $(ecore_con_eolian_h) +if INSTALL_EO_FILES ecoreconeolianfilesdir = $(datadir)/eolian/include/ecore-@VMAJ@ ecoreconeolianfiles_DATA = \ $(ecore_con_eolian_files) \ $(ecore_con_eolian_type_files) +endif EXTRA_DIST2 += \ - ${ecoreconeolianfiles_DATA} + $(ecore_con_eolian_files) \ + $(ecore_con_eolian_type_files) lib_LTLIBRARIES += lib/ecore_con/libecore_con.la diff --git a/src/Makefile_Ector.am b/src/Makefile_Ector.am index c74346a9d9..9288458fc3 100644 --- a/src/Makefile_Ector.am +++ b/src/Makefile_Ector.am @@ -58,10 +58,12 @@ BUILT_SOURCES += \ $(ector_eolian_c) \ $(ector_eolian_h) +if INSTALL_EO_FILES ectoreolianfilesdir = $(datadir)/eolian/include/ector-@VMAJ@ ectoreolianfiles_DATA = $(ector_eolian_files) $(ector_eolian_type_files) +endif -EXTRA_DIST2 += $(ectoreolianfiles_DATA) \ +EXTRA_DIST2 += $(ector_eolian_files) $(ector_eolian_type_files) \ lib/ector/Ector.h \ lib/ector/ector_util.h \ lib/ector/ector_surface.h \ diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am index 6d4120949a..916ab65b98 100644 --- a/src/Makefile_Edje.am +++ b/src/Makefile_Edje.am @@ -35,15 +35,19 @@ BUILT_SOURCES += \ $(edje_eolian_priv_c) \ $(edje_eolian_priv_h) +if INSTALL_EO_FILES edjeeolianfilesdir = $(datadir)/eolian/include/edje-@VMAJ@ edjeeolianfiles_DATA = \ - $(edje_eolian_files) \ - $(edje_eolian_type_files) +$(edje_eolian_files) \ +$(edje_eolian_type_files) +endif noinst_DATA += $(edje_eolian_priv_c) $(edje_eolian_priv_h) -EXTRA_DIST2 += ${edjeeolianfiles_DATA} \ - $(edje_eolian_priv_files) +EXTRA_DIST2 += \ +$(edje_eolian_files) \ +$(edje_eolian_type_files) \ +$(edje_eolian_priv_files) lib_LTLIBRARIES += lib/edje/libedje.la diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index 8b8d60eafb..c178a7d4dc 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -111,8 +111,10 @@ EXTRA_DIST2 += \ $(efl_eolian_files) \ $(efl_eolian_type_files) +if INSTALL_EO_FILES efleolianfilesdir = $(datadir)/eolian/include/efl-@VMAJ@ efleolianfiles_DATA = $(efl_eolian_files) $(efl_eolian_type_files) +endif lib_LTLIBRARIES += lib/efl/libefl.la diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am index 91bb1cd504..7cdfc1d726 100644 --- a/src/Makefile_Efl_Mono.am +++ b/src/Makefile_Efl_Mono.am @@ -65,7 +65,8 @@ lib_efl_mono_libefl_mono_dll_sources = \ efl_mono_test_files = \ tests/efl_mono/dummy_test_object.eo \ tests/efl_mono/dummy_test_iface.eo \ - tests/efl_mono/dummy_another_iface.eo \ + tests/efl_mono/dummy_inherit_iface.eo \ + tests/efl_mono/dummy_inherit_helper.eo \ tests/efl_mono/dummy_child.eo \ tests/efl_mono/dummy_part_holder.eo \ tests/efl_mono/dummy_numberwrapper.eo \ @@ -83,31 +84,34 @@ bin_PROGRAMS += bin/eolian_mono/eolian_mono bin_eolian_mono_eolian_mono_SOURCES = \ bin/eolian_mono/eolian_mono.cc \ - bin/eolian_mono/eolian/mono/documentation.hh \ - bin/eolian_mono/eolian/mono/type.hh \ - bin/eolian_mono/eolian/mono/marshall_annotation.hh \ + bin/eolian_mono/eolian/mono/alias_definition.hh \ bin/eolian_mono/eolian/mono/async_function_definition.hh \ - bin/eolian_mono/eolian/mono/function_pointer.hh \ - bin/eolian_mono/eolian/mono/function_definition.hh \ - bin/eolian_mono/eolian/mono/name_helpers.hh \ - bin/eolian_mono/eolian/mono/function_declaration.hh \ - bin/eolian_mono/eolian/mono/helpers.hh \ - bin/eolian_mono/eolian/mono/function_helpers.hh \ - bin/eolian_mono/eolian/mono/marshall_type_impl.hh \ - bin/eolian_mono/eolian/mono/function_registration.hh \ + bin/eolian_mono/eolian/mono/blacklist.hh \ + bin/eolian_mono/eolian/mono/documentation.hh \ bin/eolian_mono/eolian/mono/enum_definition.hh \ - bin/eolian_mono/eolian/mono/struct_definition.hh \ - bin/eolian_mono/eolian/mono/part_definition.hh \ - bin/eolian_mono/eolian/mono/struct_fields.hh \ - bin/eolian_mono/eolian/mono/parameter.hh \ - bin/eolian_mono/eolian/mono/variable_definition.hh \ - bin/eolian_mono/eolian/mono/utils.hh \ - bin/eolian_mono/eolian/mono/using_decl.hh \ - bin/eolian_mono/eolian/mono/marshall_type.hh \ - bin/eolian_mono/eolian/mono/klass.hh \ - bin/eolian_mono/eolian/mono/type_impl.hh \ bin/eolian_mono/eolian/mono/events.hh \ - bin/eolian_mono/eolian/mono/generation_contexts.hh + bin/eolian_mono/eolian/mono/function_declaration.hh \ + bin/eolian_mono/eolian/mono/function_definition.hh \ + bin/eolian_mono/eolian/mono/function_helpers.hh \ + bin/eolian_mono/eolian/mono/function_pointer.hh \ + bin/eolian_mono/eolian/mono/function_registration.hh \ + bin/eolian_mono/eolian/mono/generation_contexts.hh \ + bin/eolian_mono/eolian/mono/helpers.hh \ + bin/eolian_mono/eolian/mono/klass.hh \ + bin/eolian_mono/eolian/mono/logging.hh \ + bin/eolian_mono/eolian/mono/marshall_annotation.hh \ + bin/eolian_mono/eolian/mono/marshall_type.hh \ + bin/eolian_mono/eolian/mono/marshall_type_impl.hh \ + bin/eolian_mono/eolian/mono/name_helpers.hh \ + bin/eolian_mono/eolian/mono/parameter.hh \ + bin/eolian_mono/eolian/mono/part_definition.hh \ + bin/eolian_mono/eolian/mono/struct_definition.hh \ + bin/eolian_mono/eolian/mono/struct_fields.hh \ + bin/eolian_mono/eolian/mono/type.hh \ + bin/eolian_mono/eolian/mono/type_impl.hh \ + bin/eolian_mono/eolian/mono/using_decl.hh \ + bin/eolian_mono/eolian/mono/utils.hh \ + bin/eolian_mono/eolian/mono/variable_definition.hh bin_eolian_mono_eolian_mono_CXXFLAGS = -I$(top_builddir)/src/lib/efl \ -I$(top_srcdir)/src/lib/eolian_cxx/ \ @@ -407,8 +411,6 @@ tests/efl_mono/libefl_mono_native_test.c: \ tests/efl_mono/dummy_test_object.eo.c \ tests/efl_mono/dummy_test_iface.eo.h \ tests/efl_mono/dummy_test_iface.eo.c \ - tests/efl_mono/dummy_another_iface.eo.h \ - tests/efl_mono/dummy_another_iface.eo.c \ tests/efl_mono/dummy_child.eo.h \ tests/efl_mono/dummy_child.eo.c \ tests/efl_mono/dummy_part_holder.eo.h \ @@ -423,7 +425,6 @@ tests/efl_mono/libefl_mono_native_test.c: \ # Intermediate C Sharp test DLL efl_mono_test_eolian_mono_files = tests/efl_mono/dummy_test_object.eo.cs \ tests/efl_mono/dummy_test_iface.eo.cs \ -tests/efl_mono/dummy_another_iface.eo.cs \ tests/efl_mono/dummy_child.eo.cs \ tests/efl_mono/dummy_part_holder.eo.cs \ tests/efl_mono/dummy_numberwrapper.eo.cs \ @@ -481,6 +482,7 @@ tests_efl_mono_efl_mono_SOURCES = \ tests/efl_mono/Events.cs \ tests/efl_mono/FunctionPointers.cs \ tests/efl_mono/FunctionPointerMarshalling.cs \ + tests/efl_mono/Inheritance.cs \ tests/efl_mono/Parts.cs \ tests/efl_mono/Promises.cs \ tests/efl_mono/Strbuf.cs \ diff --git a/src/Makefile_Eio.am b/src/Makefile_Eio.am index 4a92dd2f0e..a92f13030b 100644 --- a/src/Makefile_Eio.am +++ b/src/Makefile_Eio.am @@ -11,11 +11,13 @@ eio_eolian_c = $(eio_eolian_files:%.eo=%.eo.c) BUILT_SOURCES += $(eio_eolian_c) $(eio_eolian_h) +if INSTALL_EO_FILES eioeolianfilesdir = $(datadir)/eolian/include/eio-@VMAJ@ eioeolianfiles_DATA = $(eio_eolian_files) +endif lib_LTLIBRARIES += lib/eio/libeio.la -EXTRA_DIST2 += $(eioeolianfiles_DATA) +EXTRA_DIST2 += $(eio_eolian_files) installed_eiomainheadersdir = $(includedir)/eio-@VMAJ@ diff --git a/src/Makefile_Eldbus.am b/src/Makefile_Eldbus.am index 4e310fc386..bb786104d5 100644 --- a/src/Makefile_Eldbus.am +++ b/src/Makefile_Eldbus.am @@ -21,12 +21,16 @@ BUILT_SOURCES += \ $(eldbus_eolian_c) \ $(eldbus_eolian_h) +if INSTALL_EO_FILES eldbuseolianfilesdir = $(datadir)/eolian/include/eldbus-@VMAJ@ -eldbuseolianfiles_DATA = $(eldbus_eolian_files) \ - $(eldbus_eolian_type_files) +eldbuseolianfiles_DATA = \ +$(eldbus_eolian_files) \ +$(eldbus_eolian_type_files) +endif EXTRA_DIST2 += \ - ${eldbuseolianfiles_DATA} +$(eldbus_eolian_files) \ +$(eldbus_eolian_type_files) lib_LTLIBRARIES += lib/eldbus/libeldbus.la diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 65654e3d04..1af13b5d9e 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -144,8 +144,6 @@ elm_public_eolian_files += \ lib/elementary/efl_ui_progressbar_legacy_part.eo \ lib/elementary/elm_multibuttonentry_part.eo \ lib/elementary/elm_interface_scrollable.eo \ - lib/elementary/elm_atspi_bridge.eo \ - lib/elementary/elm_atspi_app_object.eo \ lib/elementary/efl_ui_image_zoomable_pan.eo \ $(NULL) @@ -220,8 +218,10 @@ BUILT_SOURCES += \ $(elm_legacy_eolian_eo_h) \ $(elm_legacy_eolian_legacy_h) +if INSTALL_EO_FILES elementaryeolianfilesdir = $(datadir)/eolian/include/elementary-@VMAJ@ elementaryeolianfiles_DATA = $(elm_public_eolian_files) $(elm_eolian_type_files) +endif noinst_DATA += $(elm_legacy_eolian_eo_h) @@ -255,6 +255,9 @@ lib/elementary/elm_access_eo.c \ lib/elementary/elm_access_eo.legacy.c \ lib/elementary/elm_actionslider_eo.c \ lib/elementary/elm_actionslider_eo.legacy.c \ +lib/elementary/elm_atspi_app_object_eo.c \ +lib/elementary/elm_atspi_bridge_eo.c \ +lib/elementary/elm_atspi_bridge_eo.legacy.c \ lib/elementary/elm_box_eo.c \ lib/elementary/elm_box_eo.legacy.c \ lib/elementary/elm_bubble_eo.c \ @@ -433,6 +436,8 @@ lib/elementary/efl_ui_win_legacy_eo.legacy.h \ lib/elementary/efl_ui_win_socket_legacy_eo.legacy.h \ lib/elementary/elm_access_eo.legacy.h \ lib/elementary/elm_actionslider_eo.legacy.h \ +lib/elementary/elm_atspi_app_object_eo.legacy.h \ +lib/elementary/elm_atspi_bridge_eo.legacy.h \ lib/elementary/elm_box_eo.legacy.h \ lib/elementary/elm_bubble_eo.legacy.h \ lib/elementary/elm_calendar_eo.legacy.h \ @@ -540,6 +545,8 @@ lib/elementary/efl_ui_win_legacy_eo.h \ lib/elementary/efl_ui_win_socket_legacy_eo.h \ lib/elementary/elm_access_eo.h \ lib/elementary/elm_actionslider_eo.h \ +lib/elementary/elm_atspi_app_object_eo.h \ +lib/elementary/elm_atspi_bridge_eo.h \ lib/elementary/elm_box_eo.h \ lib/elementary/elm_bubble_eo.h \ lib/elementary/elm_calendar_eo.h \ @@ -629,7 +636,7 @@ lib/elementary/elm_widget_clipper.h \ $(NULL) -EXTRA_DIST2 += ${elementaryeolianfiles_DATA} $(elm_legacy_eolian_files) $(elm_private_eolian_files) $(elm_legacy_eo_files) $(elm_legacy_eo_headers_priv) +EXTRA_DIST2 += $(elm_public_eolian_files) $(elm_eolian_type_files) $(elm_legacy_eolian_files) $(elm_private_eolian_files) $(elm_legacy_eo_files) $(elm_legacy_eo_headers_priv) lib_LTLIBRARIES += lib/elementary/libelementary.la @@ -643,7 +650,6 @@ includesdir = $(includedir)/elementary-@VMAJ@ includesunstable_HEADERS = \ lib/elementary/efl_ui_animation_view_private.h \ lib/elementary/elm_gen_common.h \ - lib/elementary/elm_atspi_bridge.h \ lib/elementary/efl_access_object.h \ lib/elementary/efl_access_text.h \ lib/elementary/efl_access_widget_action.h \ @@ -804,6 +810,7 @@ includesub_HEADERS = \ lib/elementary/efl_ui_animation_view.eo.legacy.h \ lib/elementary/elm_app.h \ lib/elementary/elm_atspi_app_object.h \ + lib/elementary/elm_atspi_bridge.h \ lib/elementary/elm_authors.h \ lib/elementary/elm_bg.h \ lib/elementary/elm_bg_legacy.h \ @@ -1408,6 +1415,7 @@ bin/elementary/test_tooltip.c \ bin/elementary/test_transit.c \ bin/elementary/test_transit_bezier.c \ bin/elementary/test_ui_box.c \ +bin/elementary/test_ui_box_stack.c \ bin/elementary/test_ui_clock.c \ bin/elementary/test_ui_table.c \ bin/elementary/test_ui_popup.c \ @@ -1940,6 +1948,7 @@ tests_elementary_efl_ui_suite_SOURCES = \ tests/elementary/efl_ui_test_focus_sub.c \ tests/elementary/efl_ui_test_box.c \ tests/elementary/efl_ui_test_box_flow.c \ + tests/elementary/efl_ui_test_box_stack.c \ tests/elementary/efl_ui_test_table.c \ tests/elementary/efl_ui_test_relative_layout.c \ tests/elementary/efl_ui_test_grid.c \ diff --git a/src/Makefile_Emotion.am b/src/Makefile_Emotion.am index 39fff79979..639557ea53 100644 --- a/src/Makefile_Emotion.am +++ b/src/Makefile_Emotion.am @@ -9,14 +9,14 @@ emotion_eolian_h = $(emotion_eolian_files:%.eo=%.eo.h) BUILT_SOURCES += \ $(emotion_eolian_c) \ $(emotion_eolian_h) - +if INSTALL_EO_FILES emotioneolianfilesdir = $(datadir)/eolian/include/emotion-@VMAJ@ emotioneolianfiles_DATA = \ $(emotion_eolian_files) - +endif EXTRA_DIST2 += \ lib/emotion/efl_canvas_video_eo.legacy.c \ - ${emotioneolianfiles_DATA} + ${emotion_eolian_files} lib_LTLIBRARIES += \ lib/emotion/libemotion.la diff --git a/src/Makefile_Eo.am b/src/Makefile_Eo.am index ae03748830..68a8c02f3e 100644 --- a/src/Makefile_Eo.am +++ b/src/Makefile_Eo.am @@ -51,13 +51,15 @@ lib_eo_libeo_dbg_la_LDFLAGS = $(lib_eo_libeo_la_LDFLAGS) bin_SCRIPTS += scripts/eo/eo_debug ###### - +if INSTALL_EO_FILES eoeolianfilesdir = $(datadir)/eolian/include/eo-@VMAJ@ eoeolianfiles_DATA = \ $(eo_eolian_files) \ lib/eo/eina_types.eot # We don't generate .c/.h on purpose - -EXTRA_DIST2 += ${eoeolianfiles_DATA} +endif +EXTRA_DIST2 += \ +$(eo_eolian_files) \ +lib/eo/eina_types.eot ### Unit tests diff --git a/src/Makefile_Eolian_Cxx.am b/src/Makefile_Eolian_Cxx.am index f17c00d7bf..8ae97279af 100644 --- a/src/Makefile_Eolian_Cxx.am +++ b/src/Makefile_Eolian_Cxx.am @@ -99,6 +99,7 @@ tests/eolian_cxx/eolian_cxx_test_documentation.cc \ tests/eolian_cxx/eolian_cxx_test_cyclic.cc \ tests/eolian_cxx/complex.c \ tests/eolian_cxx/complex_cxx.cc \ +tests/eolian_cxx/beta_class.eo \ tests/eolian_cxx/eolian_cxx_suite.h if HAVE_AM_16 diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index 9c416da539..2534f2da3c 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -111,9 +111,10 @@ BUILT_SOURCES += \ $(evas_eolian_c) \ $(evas_eolian_h) +if INSTALL_EO_FILES evaseolianfilesdir = $(datadir)/eolian/include/evas-@VMAJ@ evaseolianfiles_DATA = $(evas_eolian_files) - +endif evas_legacy_eo_h = \ lib/evas/canvas/efl_canvas_event_grabber_eo.legacy.h \ @@ -169,7 +170,7 @@ lib/evas/canvas/evas_textgrid_eo.legacy.c EXTRA_DIST2 += \ - $(evaseolianfiles_DATA) \ + $(evas_eolian_files) \ $(evas_eolian_internal_files) \ $(evas_legacy_eo_c) diff --git a/src/bin/eeze/eeze_scanner_monitor/eeze_scanner_monitor.c b/src/bin/eeze/eeze_scanner_monitor/eeze_scanner_monitor.c index 02d22ecdb6..526a3761f6 100644 --- a/src/bin/eeze/eeze_scanner_monitor/eeze_scanner_monitor.c +++ b/src/bin/eeze/eeze_scanner_monitor/eeze_scanner_monitor.c @@ -3,7 +3,6 @@ #endif #define EFL_BETA_API_SUPPORT 1 -#define EFL_EO_API_SUPPORT 1 #include #include #include diff --git a/src/bin/efl/efl_debugd.c b/src/bin/efl/efl_debugd.c index 7baffd464d..3962aa6a80 100644 --- a/src/bin/efl/efl_debugd.c +++ b/src/bin/efl/efl_debugd.c @@ -21,7 +21,6 @@ #endif #define EFL_BETA_API_SUPPORT 1 -#define EFL_EO_API_SUPPORT 1 #include #include "eina_debug_private.h" diff --git a/src/bin/elementary/meson.build b/src/bin/elementary/meson.build index 1612e0bdcc..0f7fa3d340 100644 --- a/src/bin/elementary/meson.build +++ b/src/bin/elementary/meson.build @@ -134,6 +134,7 @@ elementary_test_src = [ 'test_transit.c', 'test_transit_bezier.c', 'test_ui_box.c', + 'test_ui_box_stack.c', 'test_ui_clock.c', 'test_ui_table.c', 'test_ui_popup.c', diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c index 91fe009a66..f81af61ada 100644 --- a/src/bin/elementary/test.c +++ b/src/bin/elementary/test.c @@ -29,8 +29,8 @@ void test_box_horiz(void *data, Evas_Object *obj, void *event_info); void test_box_homo(void *data, Evas_Object *obj, void *event_info); void test_box_transition(void *data, Evas_Object *obj, void *event_info); void test_box_align(void *data, Evas_Object *obj, void *event_info); -void test_box_stack(void *data, Evas_Object *obj, void *event_info); void test_ui_box(void *data, Evas_Object *obj, void *event_info); +void test_ui_box_stack(void *data, Evas_Object *obj, void *event_info); void test_button(void *data, Evas_Object *obj, void *event_info); void test_ui_button(void *data, Evas_Object *obj, void *event_info); void test_cnp(void *data, Evas_Object *obj, void *event_info); @@ -826,7 +826,6 @@ add_tests: ADD_TEST(NULL, "Containers", "Box Homogeneous", test_box_homo); ADD_TEST(NULL, "Containers", "Box Transition", test_box_transition); ADD_TEST(NULL, "Containers", "Box Align", test_box_align); - ADD_TEST(NULL, "Containers", "Box Stack", test_box_stack); ADD_TEST(NULL, "Containers", "Table", test_table); ADD_TEST(NULL, "Containers", "Table Homogeneous", test_table2); ADD_TEST(NULL, "Containers", "Table 3", test_table3); @@ -841,6 +840,7 @@ add_tests: //------------------------------// ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Box", test_ui_box); + ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Box_Stack", test_ui_box_stack); ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table", test_ui_table); ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table (Linear API)", test_ui_table_linear); ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table_Static", test_ui_table_static); diff --git a/src/bin/elementary/test_box.c b/src/bin/elementary/test_box.c index 2d0e6affd3..893e96d716 100644 --- a/src/bin/elementary/test_box.c +++ b/src/bin/elementary/test_box.c @@ -882,44 +882,3 @@ test_box_align(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, evas_object_resize(win, 300, 400); evas_object_show(win); } - -void -test_box_stack(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, - void *event_info EINA_UNUSED) -{ - Evas_Object *win, *bx, *o; - char buf[PATH_MAX]; - - win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, - efl_text_set(efl_added, "Efl.Ui.Box_Stack"), - efl_ui_win_autodel_set(efl_added, EINA_TRUE)); - - efl_gfx_color_set(efl_part(win, "background"), 24, 24, 64, 255); - - /* stacked box, with items in the center-bottom. its default weight makes - * the window resizable */ - bx = efl_add(EFL_UI_BOX_STACK_CLASS, win, - efl_pack_align_set(efl_added, 0.5, 1.0)); - efl_content_set(win, bx); - - /* stretched rectangle */ - o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win, - efl_gfx_color_set(efl_added, 0, 64, 128, 255)); - efl_pack(bx, o); - - /* rectangle with a max size */ - o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win, - efl_gfx_color_set(efl_added, 64, 128, 64, 255), - efl_gfx_hint_size_max_set(efl_added, EINA_SIZE2D(128, 20))); - efl_pack(bx, o); - - /* image with a forced min size */ - snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get()); - o = efl_add(EFL_UI_IMAGE_CLASS, win, - efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)), - efl_file_set(efl_added, buf), - efl_file_load(efl_added)); - efl_pack(bx, o); - - efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 300)); -} diff --git a/src/bin/elementary/test_glview.c b/src/bin/elementary/test_glview.c index d71e371965..2ddb819561 100644 --- a/src/bin/elementary/test_glview.c +++ b/src/bin/elementary/test_glview.c @@ -1,8 +1,6 @@ #ifdef HAVE_CONFIG_H # include "elementary_config.h" #endif -#include -#include #include #include @@ -430,6 +428,7 @@ _init_gl(Evas_Object *obj) { GLData *gld = evas_object_data_get(obj, "gld"); + gld->glapi = elm_glview_gl_api_get(obj); printf("GL_VERSION: %s\n", gld->glapi->glGetString(GL_VERSION)); fflush(stdout); @@ -632,7 +631,7 @@ _test_glview_do(Evas_GL_Context_Version version) if (!(gld = calloc(1, sizeof(GLData)))) return; gldata_init(gld); -#if 0 +#if 1 // add a Z-depth buffer to the window and try to use GL Eina_Stringshare *accel; accel = eina_stringshare_add(elm_config_accel_preference_get()); @@ -686,7 +685,6 @@ _test_glview_do(Evas_GL_Context_Version version) // Animator and other vars ani = ecore_animator_add(_anim, gl); - gld->glapi = elm_glview_gl_api_get(gl); evas_object_data_set(gl, "ani", ani); evas_object_data_set(gl, "gld", gld); evas_object_event_callback_add(gl, EVAS_CALLBACK_DEL, _del, gl); @@ -731,6 +729,7 @@ _test_glview_do(Evas_GL_Context_Version version) evas_object_smart_callback_add(bt, "clicked", _on_done, win); evas_object_resize(win, 320, 480); + evas_object_show(win); } void diff --git a/src/bin/elementary/test_glview_manygears.c b/src/bin/elementary/test_glview_manygears.c index 97e9e88050..31084b78ec 100644 --- a/src/bin/elementary/test_glview_manygears.c +++ b/src/bin/elementary/test_glview_manygears.c @@ -673,6 +673,7 @@ _init_gl(Evas_Object *obj) { GLData *gld = evas_object_data_get(obj, "gld"); if (!gld) return; + gld->glapi = elm_glview_gl_api_get(obj); gears_init(gld); } @@ -841,10 +842,18 @@ test_glview_manygears(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void if (!(gld = calloc(1, sizeof(GLData)))) return; gldata_init(gld); + // add a Z-depth buffer to the window and try to use GL + Eina_Stringshare *accel; + accel = eina_stringshare_add(elm_config_accel_preference_get()); + elm_config_accel_preference_set("gl:depth"); + // new window - do the usual and give it a name, title and delete handler win = elm_win_util_standard_add("glview_manygears", "GLView Many Gears"); elm_win_autodel_set(win, EINA_TRUE); + // restore previous accel preference + elm_config_accel_preference_set(accel); + eina_stringshare_del(accel); // add an image bg bg = elm_bg_add(win); @@ -892,7 +901,6 @@ test_glview_manygears(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void // Add animator for rendering ani = ecore_animator_add(_anim, gl); - gld->glapi = elm_glview_gl_api_get(gl); evas_object_data_set(gl, "ani", ani); evas_object_data_set(gl, "gld", gld); evas_object_event_callback_add(gl, EVAS_CALLBACK_DEL, _del, gl); diff --git a/src/bin/elementary/test_glview_simple.c b/src/bin/elementary/test_glview_simple.c index ae6eece316..9e34afe17f 100644 --- a/src/bin/elementary/test_glview_simple.c +++ b/src/bin/elementary/test_glview_simple.c @@ -121,6 +121,7 @@ static void _init_gl(Evas_Object *obj) { GL_Data *gld = evas_object_data_get(obj, "gld"); + gld->glapi = elm_glview_gl_api_get(obj); Evas_GL_API *gl = gld->glapi; GLfloat vVertices[] = { 0.0f, 0.5f, 0.0f, -0.5f, -0.5f, 0.0f, @@ -232,10 +233,19 @@ test_glview_simple(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e if (!(gld = calloc(1, sizeof(GL_Data)))) return; + // add a Z-depth buffer to the window and try to use GL + Eina_Stringshare *accel; + accel = eina_stringshare_add(elm_config_accel_preference_get()); + elm_config_accel_preference_set("gl:depth"); + win = elm_win_util_standard_add("glview-simple", "GLView Simple"); elm_win_autodel_set(win, EINA_TRUE); evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _win_free_cb, gld); + // restore previous accel preference + elm_config_accel_preference_set(accel); + eina_stringshare_del(accel); + bx = elm_box_add(win); evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, bx); @@ -259,7 +269,6 @@ test_glview_simple(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e elm_object_focus_set(gl, EINA_TRUE); ani = ecore_animator_add(_anim, gl); - gld->glapi = elm_glview_gl_api_get(gl); evas_object_data_set(gl, "gld", gld); evas_object_event_callback_add(gl, EVAS_CALLBACK_DEL, _gl_del_cb, ani); } diff --git a/src/bin/elementary/test_ui_box_stack.c b/src/bin/elementary/test_ui_box_stack.c new file mode 100644 index 0000000000..1b5d579d1c --- /dev/null +++ b/src/bin/elementary/test_ui_box_stack.c @@ -0,0 +1,44 @@ +#include "test.h" +#ifdef HAVE_CONFIG_H +# include "elementary_config.h" +#endif +#include + +void +test_ui_box_stack(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, + void *event_info EINA_UNUSED) +{ + Evas_Object *win, *bx, *o; + char buf[PATH_MAX]; + + win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, + efl_text_set(efl_added, "Efl.Ui.Box_Stack"), + efl_ui_win_autodel_set(efl_added, EINA_TRUE)); + + efl_gfx_color_set(efl_part(win, "background"), 24, 24, 64, 255); + + bx = efl_add(EFL_UI_BOX_STACK_CLASS, win); + efl_content_set(win, bx); + + /* stretched rectangle */ + o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win, + efl_gfx_color_set(efl_added, 0, 64, 128, 255)); + efl_pack(bx, o); + + /* rectangle with a max size */ + o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win, + efl_gfx_color_set(efl_added, 64, 128, 64, 255), + efl_gfx_hint_size_max_set(efl_added, EINA_SIZE2D(128, 20)), + efl_gfx_hint_align_set(efl_added, 0.5, 1.0)); + efl_pack(bx, o); + + /* image with a forced min size */ + snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get()); + o = efl_add(EFL_UI_IMAGE_CLASS, win, + efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)), + efl_file_set(efl_added, buf), + efl_file_load(efl_added)); + efl_pack(bx, o); + + efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 300)); +} diff --git a/src/bin/elementary/test_ui_tab_pager.c b/src/bin/elementary/test_ui_tab_pager.c index ef8ccae0f4..c85b4b7fd2 100644 --- a/src/bin/elementary/test_ui_tab_pager.c +++ b/src/bin/elementary/test_ui_tab_pager.c @@ -89,6 +89,7 @@ content_add(Eo *parent, char *text) page = efl_add(EFL_UI_LAYOUT_CLASS, parent, efl_file_set(efl_added, buf), efl_file_key_set(efl_added, "page_layout"), + efl_file_load(efl_added), efl_text_set(efl_part(efl_added, "text"), text), efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE)); @@ -398,6 +399,7 @@ _unpack_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED) int index = efl_ui_pager_current_page_get(tab_pager); Eo *tab_page = efl_pack_content_get(tab_pager, index); efl_pack_unpack(tab_pager, tab_page); + efl_del(tab_page); } static void @@ -446,6 +448,7 @@ _unpack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) btn = efl_add(EFL_UI_BUTTON_CLASS, box, efl_text_set(efl_added, "Clear"), efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _clear_btn_cb, tab_pager), + efl_ui_widget_disabled_set(efl_added, EINA_TRUE), //Soon to be implemented efl_pack_end(box, efl_added)); /* Unpack */ @@ -458,6 +461,7 @@ _unpack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) btn = efl_add(EFL_UI_BUTTON_CLASS, box, efl_text_set(efl_added, "Unpack All"), efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _unpack_all_btn_cb, tab_pager), + efl_ui_widget_disabled_set(efl_added, EINA_TRUE), //Soon to be implemented efl_pack_end(box, efl_added)); in_box = efl_add(EFL_UI_BOX_CLASS, box, @@ -478,6 +482,7 @@ _unpack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) efl_text_set(efl_added, "Unpack At"), efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _unpack_at_btn_cb, tsd), efl_event_callback_add(efl_added, EFL_EVENT_DEL, _unpack_at_btn_del_cb, tsd), + efl_ui_widget_disabled_set(efl_added, EINA_TRUE), //Soon to be implemented efl_pack_end(in_box, efl_added)); } diff --git a/src/bin/elementary/test_ui_table.c b/src/bin/elementary/test_ui_table.c index f0e63d2ac3..d11cefe43b 100644 --- a/src/bin/elementary/test_ui_table.c +++ b/src/bin/elementary/test_ui_table.c @@ -545,7 +545,7 @@ append_cb(void *data, const Efl_Event *ev EINA_UNUSED) efl_gfx_hint_fill_set(o, EINA_FALSE, EINA_FALSE); efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL); elm_object_tooltip_text_set(o, "Click to unpack"); - efl_pack_end(table, o); + efl_pack(table, o); efl_gfx_entity_visible_set(o, 1); } diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c index 923c7ba14f..265dc75d92 100644 --- a/src/bin/eolian/sources.c +++ b/src/bin/eolian/sources.c @@ -1028,6 +1028,7 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Hash *refh) eina_strbuf_append(buf, " return efl_class_functions_set(klass, opsp, ropsp);\n"); eina_strbuf_free(ops); + eina_strbuf_free(refls); eina_strbuf_append(buf, "}\n\n"); diff --git a/src/bin/eolian_mono/eolian/mono/blacklist.hh b/src/bin/eolian_mono/eolian/mono/blacklist.hh index 2b9d8ad4bf..df94b6acb6 100644 --- a/src/bin/eolian_mono/eolian/mono/blacklist.hh +++ b/src/bin/eolian_mono/eolian/mono/blacklist.hh @@ -52,7 +52,7 @@ inline bool is_function_blacklisted(std::string const& c_name) } template -inline bool is_function_blacklisted(attributes::function_def const& func, Context context) +inline bool is_function_blacklisted(attributes::function_def const& func, Context const& context) { auto options = efl::eolian::grammar::context_find_tag(context); auto c_name = func.c_name; @@ -80,7 +80,7 @@ inline bool is_struct_blacklisted(std::string const& full_name) } template -inline bool is_struct_blacklisted(attributes::struct_def const& struct_, Context context) +inline bool is_struct_blacklisted(attributes::struct_def const& struct_, Context const& context) { auto options = efl::eolian::grammar::context_find_tag(context); if (struct_.is_beta && !options.want_beta) @@ -91,7 +91,7 @@ inline bool is_struct_blacklisted(attributes::struct_def const& struct_, Context // Struct as type_def is for places where the struct is used as a struct field or parameter/return. template -inline bool is_struct_blacklisted(attributes::type_def const& struct_, Context context) +inline bool is_struct_blacklisted(attributes::type_def const& struct_, Context const& context) { auto options = efl::eolian::grammar::context_find_tag(context); if (struct_.is_beta && !options.want_beta) @@ -115,11 +115,11 @@ inline bool is_property_blacklisted(std::string const& name) { return name == "Efl.Input.Key.Key" || name == "Efl.Input.Hold.Hold" - || name == "Efl.Text.Text"; + || name == "Efl.IText.Text"; } template -inline bool is_property_blacklisted(attributes::property_def const& property, Context context) +inline bool is_property_blacklisted(attributes::property_def const& property, Context const& context) { auto name = name_helpers::klass_full_concrete_or_interface_name(property.klass) + "." + name_helpers::property_managed_name(property); @@ -133,7 +133,23 @@ inline bool is_property_blacklisted(attributes::property_def const& property, Co } template -inline bool is_class_blacklisted(attributes::klass_def const& cls, Context context) +inline bool is_property_blacklisted(attributes::property_def const& property, + attributes::klass_def const& implementing_class, + Context const& context) +{ + std::string property_name = name_helpers::property_managed_name(property); + std::string klass_name = name_helpers::klass_concrete_or_interface_name(implementing_class); + + // This property wrapper is invalidated as it would clash with the implementing + // class constructor. CS + if (property_name == klass_name) + return true; + + return is_property_blacklisted(property, context); +} + +template +inline bool is_class_blacklisted(attributes::klass_def const& cls, Context const& context) { auto options = efl::eolian::grammar::context_find_tag(context); @@ -141,7 +157,7 @@ inline bool is_class_blacklisted(attributes::klass_def const& cls, Context conte } template -inline bool is_class_blacklisted(attributes::klass_name const& cls, Context context) +inline bool is_class_blacklisted(attributes::klass_name const& cls, Context const& context) { auto options = efl::eolian::grammar::context_find_tag(context); @@ -150,7 +166,7 @@ inline bool is_class_blacklisted(attributes::klass_name const& cls, Context cont template -inline bool is_event_blacklisted(attributes::event_def const& evt, Context context) +inline bool is_event_blacklisted(attributes::event_def const& evt, Context const& context) { auto options = efl::eolian::grammar::context_find_tag(context); diff --git a/src/bin/eolian_mono/eolian/mono/documentation.hh b/src/bin/eolian_mono/eolian/mono/documentation.hh index bb746ffe9a..1d65bcb076 100644 --- a/src/bin/eolian_mono/eolian/mono/documentation.hh +++ b/src/bin/eolian_mono/eolian/mono/documentation.hh @@ -37,6 +37,24 @@ struct documentation_generator return n; } + // Gets the eolian ref for the given class, prepending I for interfaces. + static std::string object_ref_conversion(const Eolian_Object *cls) + { + auto klass_type = ::eolian_class_type_get((const Eolian_Class *)cls); + auto full_eolian_name = name_helpers::managed_namespace(::eolian_object_name_get(cls)); + if (klass_type == EOLIAN_CLASS_MIXIN || klass_type == EOLIAN_CLASS_INTERFACE) + { + size_t pos = full_eolian_name.rfind("."); + if (pos == std::string::npos) + pos = 0; + else + pos++; + full_eolian_name.insert(pos, "I"); + } + return full_eolian_name; + } + + // Turns a function name from EO convention to EFL# convention. // The name_tail parameter is the last 4 chars of the original string, which // could be ".set" or ".get" and in this case they are ignored by Eolian. @@ -45,7 +63,7 @@ struct documentation_generator { ::Eolian_Function_Type ftype = ::eolian_function_type_get(function); const char* eo_name = ::eolian_function_name_get(function); - std::string name = name_helpers::managed_namespace(::eolian_object_name_get(klass)); + std::string name = object_ref_conversion(klass); switch(ftype) { case ::EOLIAN_METHOD: @@ -123,7 +141,7 @@ struct documentation_generator if (blacklist::is_struct_blacklisted(ref)) return ""; break; case ::EOLIAN_OBJECT_EVENT: - ref = name_helpers::managed_namespace(::eolian_object_name_get(data)); + ref = object_ref_conversion(data); ref += "."; ref += name_helpers::managed_event_name(::eolian_object_name_get(data2)); break; @@ -151,6 +169,9 @@ struct documentation_generator // If the reference cannot be resolved, just return an empty string and // it won't be converted into a tag. break; + case ::EOLIAN_OBJECT_CLASS: + ref = object_ref_conversion(data); + break; default: ref = name_helpers::managed_namespace(::eolian_object_name_get(data)); break; @@ -355,7 +376,10 @@ struct documentation_generator template bool generate(OutputIterator sink, attributes::documentation_def const& doc, Context const& context) const { - return generate_tag_summary(sink, doc.full_text, context); + std::string str = doc.full_text; + if (!doc.since.empty()) + str += "\n(Since EFL " + doc.since + ")"; + return generate_tag_summary(sink, str, context); } template diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh index d8dc043ada..f688602b2d 100644 --- a/src/bin/eolian_mono/eolian/mono/events.hh +++ b/src/bin/eolian_mono/eolian/mono/events.hh @@ -179,7 +179,7 @@ struct event_definition_generator bool is_inherited_event; template - bool generate(OutputIterator sink, attributes::event_def const& evt, Context context) const + bool generate(OutputIterator sink, attributes::event_def const& evt, Context const& context) const { if (blacklist::is_event_blacklisted(evt, context)) return true; @@ -262,7 +262,7 @@ struct event_definition_generator if (!generate_event_trigger(sink, wrapper_evt_name, wrapper_args_type, wrapper_args_template, context)) return false; - // Store the delegate for this event in this instance. This is initialized in register_event_proxies() + // Store the delegate for this event in this instance. This is initialized in RegisterEventProxies() // We can't initialize them directly here as they depend on the member methods being valid (i.e. // the constructor being called). if (!as_generator(scope_tab << "Efl.EventCb evt_" << wrapper_evt_name << "_delegate;\n").generate(sink, attributes::unused, context)) @@ -270,7 +270,7 @@ struct event_definition_generator // Callback to be given to C's callback_priority_add if (!as_generator( - scope_tab << "private void on_" << wrapper_evt_name << "_NativeCallback(System.IntPtr data, ref Efl.Event_StructInternal evt)\n" + scope_tab << "private void on_" << wrapper_evt_name << "_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)\n" << scope_tab << "{\n" << scope_tab << scope_tab << event_args << scope_tab << scope_tab << "try {\n" @@ -291,7 +291,7 @@ struct event_definition_generator , std::string const& event_name , std::string const& event_args_type , std::string const& event_template_args - , Context context) const + , Context const& context) const { auto delegate_type = "EventHandler" + event_template_args; if (!as_generator( @@ -311,7 +311,7 @@ struct event_definition_generator } template - bool generate_event_add_remove(OutputIterator sink, attributes::event_def const &evt, const std::string& event_name, Context context) const + bool generate_event_add_remove(OutputIterator sink, attributes::event_def const &evt, const std::string& event_name, Context const& context) const { std::string upper_c_name = utils::to_uppercase(evt.c_name); auto unit = (const Eolian_Unit*) context_find_tag(context).state; @@ -322,7 +322,7 @@ struct event_definition_generator << scope_tab << scope_tab << "add {\n" << scope_tab << scope_tab << scope_tab << "lock (eventLock) {\n" << scope_tab << scope_tab << scope_tab << scope_tab << "string key = \"_" << upper_c_name << "\";\n" - << scope_tab << scope_tab << scope_tab << scope_tab << "if (add_cpp_event_handler(" << library_name << ", key, this.evt_" << event_name << "_delegate)) {\n" + << scope_tab << scope_tab << scope_tab << scope_tab << "if (AddNativeEventHandler(" << library_name << ", key, this.evt_" << event_name << "_delegate)) {\n" << scope_tab << scope_tab << scope_tab << scope_tab << scope_tab << "eventHandlers.AddHandler(" << event_name << "Key , value);\n" << scope_tab << scope_tab << scope_tab << scope_tab << "} else\n" << scope_tab << scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Log.Error($\"Error adding proxy for event {key}\");\n" @@ -331,7 +331,7 @@ struct event_definition_generator << scope_tab << scope_tab << "remove {\n" << scope_tab << scope_tab << scope_tab << "lock (eventLock) {\n" << scope_tab << scope_tab << scope_tab << scope_tab << "string key = \"_" << upper_c_name << "\";\n" - << scope_tab << scope_tab << scope_tab << scope_tab << "if (remove_cpp_event_handler(key, this.evt_" << event_name << "_delegate)) { \n" + << scope_tab << scope_tab << scope_tab << scope_tab << "if (RemoveNativeEventHandler(key, this.evt_" << event_name << "_delegate)) { \n" << scope_tab << scope_tab << scope_tab << scope_tab << scope_tab << "eventHandlers.RemoveHandler(" << event_name << "Key , value);\n" << scope_tab << scope_tab << scope_tab << scope_tab << "} else\n" << scope_tab << scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Log.Error($\"Error removing proxy for event {key}\");\n" diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh index 67dfcc0ce4..0d6eff628e 100644 --- a/src/bin/eolian_mono/eolian/mono/function_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh @@ -107,7 +107,7 @@ struct native_function_definition_generator << scope_tab << scope_tab << "if(wrapper != null) {\n" << scope_tab << scope_tab << scope_tab << eolian_mono::native_function_definition_preamble() << scope_tab << scope_tab << scope_tab << "try {\n" - << scope_tab << scope_tab << scope_tab << scope_tab << (return_type != " void" ? "_ret_var = " : "") + << scope_tab << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "_ret_var = " : "") << (f.is_static ? "" : "((") << klass_cast_name << (f.is_static ? "." : ")wrapper).") << string << "(" << (native_argument_invocation % ", ") << ");\n" << scope_tab << scope_tab << scope_tab << "} catch (Exception e) {\n" @@ -116,7 +116,7 @@ struct native_function_definition_generator << scope_tab << scope_tab << scope_tab << "}\n" << eolian_mono::native_function_definition_epilogue(*klass) << scope_tab << scope_tab << "} else {\n" - << scope_tab << scope_tab << scope_tab << (return_type != " void" ? "return " : "") << string + << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "return " : "") << string << "_ptr.Value.Delegate(" << self << ((!f.is_static && f.parameters.size() > 0) ? ", " : "") << (argument % ", ") << ");\n" << scope_tab << scope_tab << "}\n" << scope_tab << "}\n" @@ -217,9 +217,9 @@ struct native_function_definition_parameterized struct property_wrapper_definition_generator { template - bool generate(OutputIterator sink, attributes::property_def const& property, Context context) const + bool generate(OutputIterator sink, attributes::property_def const& property, Context const& context) const { - if (blacklist::is_property_blacklisted(property, context)) + if (blacklist::is_property_blacklisted(property, *implementing_klass, context)) return true; bool interface = context_find_tag(context).current_wrapper_kind == class_context::interface; @@ -281,7 +281,19 @@ struct property_wrapper_definition_generator return true; } + attributes::klass_def const* implementing_klass; +}; +struct property_wrapper_definition_parameterized +{ + property_wrapper_definition_generator operator()(attributes::klass_def const& klass) const + { + return {&klass}; + } } const property_wrapper_definition; +property_wrapper_definition_generator as_generator(property_wrapper_definition_parameterized) +{ + return {}; +} } @@ -294,6 +306,8 @@ struct is_eager_generator< ::eolian_mono::native_function_definition_generator> template <> struct is_eager_generator< ::eolian_mono::property_wrapper_definition_generator> : std::true_type {}; template <> +struct is_eager_generator< ::eolian_mono::property_wrapper_definition_parameterized> : std::true_type {}; +template <> struct is_generator< ::eolian_mono::function_definition_generator> : std::true_type {}; template <> struct is_generator< ::eolian_mono::native_function_definition_generator> : std::true_type {}; @@ -301,6 +315,8 @@ template <> struct is_generator< ::eolian_mono::function_definition_parameterized> : std::true_type {}; template <> struct is_generator< ::eolian_mono::property_wrapper_definition_generator> : std::true_type {}; +template <> +struct is_generator< ::eolian_mono::property_wrapper_definition_parameterized> : std::true_type {}; namespace type_traits { template <> @@ -314,6 +330,8 @@ struct attributes_needed< ::eolian_mono::native_function_definition_generator> : template <> struct attributes_needed< ::eolian_mono::property_wrapper_definition_generator> : std::integral_constant {}; +template <> +struct attributes_needed< ::eolian_mono::property_wrapper_definition_parameterized> : std::integral_constant {}; } } } } diff --git a/src/bin/eolian_mono/eolian/mono/function_pointer.hh b/src/bin/eolian_mono/eolian/mono/function_pointer.hh index f3918f1c26..aa99601c8c 100644 --- a/src/bin/eolian_mono/eolian/mono/function_pointer.hh +++ b/src/bin/eolian_mono/eolian/mono/function_pointer.hh @@ -15,7 +15,7 @@ namespace eolian_mono { // Blacklist structs that require some kind of manual binding. template -static bool is_function_ptr_blacklisted(attributes::function_def const& func, Context context) +static bool is_function_ptr_blacklisted(attributes::function_def const& func, Context const& context) { std::string name = name_helpers::function_ptr_full_eolian_name(func); @@ -89,7 +89,7 @@ struct function_pointer { << scope_tab << scope_tab << string << " cb = (" << string << ")handle.Target;\n" << native_function_definition_preamble << scope_tab << scope_tab << "try {\n" - << scope_tab << scope_tab << scope_tab << (return_type != " void" ? "_ret_var = " : "") << "cb(" << (native_argument_invocation % ", ") << ");\n" + << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "_ret_var = " : "") << "cb(" << (native_argument_invocation % ", ") << ");\n" << scope_tab << scope_tab << "} catch (Exception e) {\n" << scope_tab << scope_tab << scope_tab << "Eina.Log.Warning($\"Callback error: {e.ToString()}\");\n" << scope_tab << scope_tab << scope_tab << "Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);\n" diff --git a/src/bin/eolian_mono/eolian/mono/function_registration.hh b/src/bin/eolian_mono/eolian/mono/function_registration.hh index cc7534b29a..5898af9c27 100644 --- a/src/bin/eolian_mono/eolian/mono/function_registration.hh +++ b/src/bin/eolian_mono/eolian/mono/function_registration.hh @@ -38,7 +38,7 @@ struct function_registration_generator if(!as_generator( scope_tab << scope_tab << "if (" << f.c_name << "_static_delegate == null)\n" - << scope_tab << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" << + << scope_tab << scope_tab << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" << escape_keyword(f.name) << ");\n" ).generate(sink, attributes::unused, context)) return false; diff --git a/src/bin/eolian_mono/eolian/mono/generation_contexts.hh b/src/bin/eolian_mono/eolian/mono/generation_contexts.hh index 5cc57ef902..25ac3098fb 100644 --- a/src/bin/eolian_mono/eolian/mono/generation_contexts.hh +++ b/src/bin/eolian_mono/eolian/mono/generation_contexts.hh @@ -1,6 +1,9 @@ #ifndef EOLIAN_MONO_GENERATION_CONTEXTS_HH #define EOLIAN_MONO_GENERATION_CONTEXTS_HH +#include "grammar/context.hpp" +#include "grammar/indentation.hpp" + namespace eolian_mono { struct class_context @@ -19,6 +22,33 @@ struct class_context wrapper_kind current_wrapper_kind; }; +struct indentation_context +{ + constexpr indentation_context(indentation_context const& other) = default; + constexpr indentation_context(efl::eolian::grammar::scope_tab_generator indent) + : indent(indent) + {} + constexpr indentation_context(int n) + : indent(n) + {} + constexpr indentation_context(int n, int m) + : indent(n, m) + {} + efl::eolian::grammar::scope_tab_generator indent; +}; + +template +inline constexpr efl::eolian::grammar::scope_tab_generator const& current_indentation(Context const& context) +{ + return efl::eolian::grammar::context_find_tag(context).indent; +} + +template +inline constexpr Context change_indentation(efl::eolian::grammar::scope_tab_generator const& indent, Context const& context) +{ + return efl::eolian::grammar::context_replace_tag(indentation_context(indent), context); +} + struct library_context { std::string library_name; diff --git a/src/bin/eolian_mono/eolian/mono/helpers.hh b/src/bin/eolian_mono/eolian/mono/helpers.hh index a4bb169593..dffb38b820 100644 --- a/src/bin/eolian_mono/eolian/mono/helpers.hh +++ b/src/bin/eolian_mono/eolian/mono/helpers.hh @@ -103,7 +103,7 @@ std::set interfa // Returns the set of interfaces implemented by this type that haven't been implemented // by a regular parent class. template -std::set non_implemented_interfaces(attributes::klass_def const& cls, Context context) +std::set non_implemented_interfaces(attributes::klass_def const& cls, Context const& context) { auto options = efl::eolian::grammar::context_find_tag(context); std::set implemented_interfaces; diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh index a9f270d15f..20045de39b 100644 --- a/src/bin/eolian_mono/eolian/mono/klass.hh +++ b/src/bin/eolian_mono/eolian/mono/klass.hh @@ -177,7 +177,7 @@ struct klass ).generate(sink, p, iface_cxt)) return false; - if (!as_generator(*(property_wrapper_definition)).generate(sink, cls.properties, iface_cxt)) + if (!as_generator(*(property_wrapper_definition(cls))).generate(sink, cls.properties, iface_cxt)) return false; // End of interface declaration @@ -237,7 +237,7 @@ struct klass << scope_tab << "public " << concrete_name << "(System.IntPtr raw)" << (root ? "" : " : base(raw)") << "\n" << scope_tab << "{\n" << scope_tab << scope_tab << (root ? "handle = raw;\n" : "") - << scope_tab << scope_tab << "register_event_proxies();\n" + << scope_tab << scope_tab << "RegisterEventProxies();\n" << scope_tab << "}\n" ) .generate(sink, attributes::unused, concrete_cxt)) @@ -272,16 +272,25 @@ struct klass return false; // Property wrappers - if (!as_generator(*(property_wrapper_definition)).generate(sink, cls.properties, concrete_cxt)) + if (!as_generator(*(property_wrapper_definition(cls))).generate(sink, cls.properties, concrete_cxt)) return false; for (auto&& klass : helpers::non_implemented_interfaces(cls, concrete_cxt)) { attributes::klass_def c(get_klass(klass, cls.unit), cls.unit); - if (!as_generator(*(property_wrapper_definition)).generate(sink, c.properties, concrete_cxt)) + if (!as_generator(*(property_wrapper_definition(cls))).generate(sink, c.properties, concrete_cxt)) return false; } + // Copied from nativeinherit class, used when setting up providers. + if(!as_generator( + scope_tab << "private static IntPtr GetEflClassStatic()\n" + << scope_tab << "{\n" + << scope_tab << scope_tab << "return " << name_helpers::klass_get_full_name(cls) << "();\n" + << scope_tab << "}\n" + ).generate(sink, attributes::unused, concrete_cxt)) + return false; + if(!as_generator("}\n").generate(sink, attributes::unused, concrete_cxt)) return false; } @@ -344,13 +353,13 @@ struct klass return false; // Property wrappers - if (!as_generator(*(property_wrapper_definition)).generate(sink, cls.properties, inherit_cxt)) + if (!as_generator(*(property_wrapper_definition(cls))).generate(sink, cls.properties, inherit_cxt)) return false; for (auto&& klass : helpers::non_implemented_interfaces(cls, inherit_cxt)) { attributes::klass_def c(get_klass(klass, cls.unit), cls.unit); - if (!as_generator(*(property_wrapper_definition)).generate(sink, c.properties, inherit_cxt)) + if (!as_generator(*(property_wrapper_definition(cls))).generate(sink, c.properties, inherit_cxt)) return false; } @@ -446,18 +455,6 @@ struct klass std::string native_inherit_full_name = name_helpers::klass_full_native_inherit_name(cls); auto inherit_name = name_helpers::klass_concrete_name(cls); - // The klass field is static but there is no problem if multiple C# classes inherit from this generated one - // as it is just a simple wrapper, forwarding the Eo calls either to the user API (where C#'s virtual method - // resolution kicks in) or to the base implementation (efl_super). - if (is_inherit) - { - if(!as_generator( - scope_tab << "public " << (root ? "" : "new ") << "static System.IntPtr klass = System.IntPtr.Zero;\n" - << scope_tab << "public " << (root ? "" : "new ") << "static " << native_inherit_full_name << " nativeInherit = new " << native_inherit_full_name << "();\n" - ).generate(sink, attributes::unused, context)) - return false; - } - std::string raw_klass_modifier; if (!root) raw_klass_modifier = "override "; @@ -540,7 +537,7 @@ struct klass << scope_tab << "public " << inherit_name << "(System.IntPtr raw)" << (root ? "" : " : base(raw)") << "\n" << scope_tab << "{\n" << scope_tab << scope_tab << (root ? "handle = raw;\n" : "") - << scope_tab << scope_tab << "register_event_proxies();\n" + << scope_tab << scope_tab << "RegisterEventProxies();\n" << scope_tab << "}\n" ).generate(sink, std::make_tuple(constructors, constructors, constructors), context)) return false; @@ -566,7 +563,7 @@ struct klass << scope_tab << scope_tab << scope_tab << "actual_klass = Efl.Eo.ClassRegister.GetInheritKlassOrRegister(base_klass, ((object)this).GetType());\n" << scope_tab << scope_tab << "}\n" << scope_tab << scope_tab << "handle = Efl.Eo.Globals.instantiate_start(actual_klass, parent);\n" - << scope_tab << scope_tab << "register_event_proxies();\n" + << scope_tab << scope_tab << "RegisterEventProxies();\n" << scope_tab << "}\n" << scope_tab << "protected void FinishInstantiation()\n" @@ -635,7 +632,8 @@ struct klass // Event proxy registration if (!as_generator( - scope_tab << (is_inherit_context(context) || !root ? "protected " : "") << virtual_modifier << "void register_event_proxies()\n" + scope_tab << "///Register the Eo event wrappers making the bridge to C# events. Internal usage only.\n" + << scope_tab << (is_inherit_context(context) || !root ? "protected " : "") << virtual_modifier << "void RegisterEventProxies()\n" << scope_tab << "{\n" ) .generate(sink, NULL, context)) @@ -644,7 +642,7 @@ struct klass // Generate event registrations here if (!root) - if (!as_generator(scope_tab << scope_tab << "base.register_event_proxies();\n").generate(sink, NULL, context)) + if (!as_generator(scope_tab << scope_tab << "base.RegisterEventProxies();\n").generate(sink, NULL, context)) return false; // Assigning the delegates @@ -689,7 +687,12 @@ struct klass // Callback registration functions if (!as_generator( - scope_tab << visibility << "bool add_cpp_event_handler(string lib, string key, Efl.EventCb evt_delegate) {\n" + scope_tab << "///Adds a new event handler, registering it to the native event. For internal use only.\n" + << scope_tab << "///The name of the native library definining the event.\n" + << scope_tab << "///The name of the native event.\n" + << scope_tab << "///The delegate to be called on event raising.\n" + << scope_tab << "///True if the delegate was successfully registered.\n" + << scope_tab << visibility << "bool AddNativeEventHandler(string lib, string key, Efl.EventCb evt_delegate) {\n" << scope_tab << scope_tab << "int event_count = 0;\n" << scope_tab << scope_tab << "if (!event_cb_count.TryGetValue(key, out event_count))\n" << scope_tab << scope_tab << scope_tab << "event_cb_count[key] = event_count;\n" @@ -711,7 +714,11 @@ struct klass << scope_tab << scope_tab << "event_cb_count[key]++;\n" << scope_tab << scope_tab << "return true;\n" << scope_tab << "}\n" - << scope_tab << visibility << "bool remove_cpp_event_handler(string key, Efl.EventCb evt_delegate) {\n" + << scope_tab << "///Removes the given event handler for the given event. For internal use only.\n" + << scope_tab << "///The name of the native event.\n" + << scope_tab << "///The delegate to be removed.\n" + << scope_tab << "///True if the delegate was successfully registered.\n" + << scope_tab << visibility << "bool RemoveNativeEventHandler(string key, Efl.EventCb evt_delegate) {\n" << scope_tab << scope_tab << "int event_count = 0;\n" << scope_tab << scope_tab << "if (!event_cb_count.TryGetValue(key, out event_count))\n" << scope_tab << scope_tab << scope_tab << "event_cb_count[key] = event_count;\n" diff --git a/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh b/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh index 998ca0bdb3..b50c88f768 100644 --- a/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh +++ b/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh @@ -46,55 +46,55 @@ struct marshall_type_visitor_generate { regular_type_def r = regular; r.base_qualifier.qualifier ^= qualifier_info::is_ref; - return replace_base_type(r, " System.String"); + return replace_base_type(r, "System.String"); }} , {"string", false, [&] { regular_type_def r = regular; r.base_qualifier.qualifier ^= qualifier_info::is_ref; - return replace_base_type(r, " System.String"); + return replace_base_type(r, "System.String"); }} , {"mstring", true, [&] { regular_type_def r = regular; r.base_qualifier.qualifier ^= qualifier_info::is_ref; - return replace_base_type(r, " System.String"); + return replace_base_type(r, "System.String"); }} , {"mstring", false, [&] { regular_type_def r = regular; r.base_qualifier.qualifier ^= qualifier_info::is_ref; - return replace_base_type(r, " System.String"); + return replace_base_type(r, "System.String"); }} , {"stringshare", true, [&] { regular_type_def r = regular; r.base_qualifier.qualifier ^= qualifier_info::is_ref; - return replace_base_type(r, " System.String"); + return replace_base_type(r, "System.String"); }} , {"stringshare", false, [&] { regular_type_def r = regular; r.base_qualifier.qualifier ^= qualifier_info::is_ref; - return replace_base_type(r, " System.String"); + return replace_base_type(r, "System.String"); }} , {"strbuf", nullptr, [&] { regular_type_def r = regular; r.base_qualifier.qualifier ^= qualifier_info::is_ref; - return replace_base_type(r, " Eina.Strbuf"); + return replace_base_type(r, "Eina.Strbuf"); }} , {"Binbuf", true, [&] { regular_type_def r = regular; - r.base_type = " System.IntPtr"; + r.base_type = "System.IntPtr"; r.namespaces.clear(); return r; }} , {"Binbuf", false, [&] { regular_type_def r = regular; - r.base_type = " System.IntPtr"; + r.base_type = "System.IntPtr"; r.namespaces.clear(); return r; }} @@ -103,9 +103,9 @@ struct marshall_type_visitor_generate regular_type_def r = regular; r.namespaces.clear(); if (is_ptr) - r.base_type = " Eina.Value"; + r.base_type = "Eina.Value"; else - r.base_type = " Eina.ValueNative"; + r.base_type = "Eina.ValueNative"; return r; }} , {"any_value", false, [&] @@ -113,23 +113,23 @@ struct marshall_type_visitor_generate regular_type_def r = regular; r.namespaces.clear(); if (is_ptr) - r.base_type = " Eina.Value"; + r.base_type = "Eina.Value"; else - r.base_type = " Eina.ValueNative"; + r.base_type = "Eina.ValueNative"; return r; }} , {"any_value_ptr", true, [&] { regular_type_def r = regular; r.namespaces.clear(); - r.base_type = " Eina.Value"; + r.base_type = "Eina.Value"; return r; }} , {"any_value_ptr", false, [&] { regular_type_def r = regular; r.namespaces.clear(); - r.base_type = " Eina.Value"; + r.base_type = "Eina.Value"; return r; }} , {"void", nullptr, [&] @@ -137,9 +137,9 @@ struct marshall_type_visitor_generate regular_type_def r = regular; r.namespaces.clear(); if (is_out) // @inout too - r.base_type = " System.IntPtr"; + r.base_type = "System.IntPtr"; else - r.base_type = " void"; + r.base_type = "void"; return r; }} }; @@ -147,8 +147,8 @@ struct marshall_type_visitor_generate if (regular.is_struct() && !blacklist::is_struct_blacklisted(regular) && !(bool)(regular.base_qualifier & qualifier_info::is_own)) { if ((is_out || is_return) && is_ptr) - return as_generator(" System.IntPtr").generate(sink, attributes::unused, *context); - return as_generator(string << "_StructInternal") + return as_generator("System.IntPtr").generate(sink, attributes::unused, *context); + return as_generator(string << ".NativeStruct") .generate(sink, name_helpers::type_full_managed_name(regular), *context); } else if (eina::optional b = call_match @@ -161,7 +161,7 @@ struct marshall_type_visitor_generate } , [&] (attributes::type_def::variant_type const& v) { - return v.visit(*this); // we want to keep is_out info + return v.visit(visitor_regular_type_def_printer{sink, context}); // we want to keep is_out info })) { return *b; @@ -169,7 +169,7 @@ struct marshall_type_visitor_generate else if (is_ptr && helpers::need_pointer_conversion(®ular)) { regular_type_def r = regular; - r.base_type = " System.IntPtr"; + r.base_type = "System.IntPtr"; r.namespaces.clear(); return visitor_generate{sink, context, c_type, is_out, is_return, is_ptr}(r); } @@ -196,27 +196,27 @@ struct marshall_type_visitor_generate { {"array", nullptr, nullptr, [&] { - return regular_type_def{" System.IntPtr", complex.outer.base_qualifier, {}}; + return regular_type_def{"System.IntPtr", complex.outer.base_qualifier, {}}; } } ,{"list", nullptr, nullptr, [&] { - return regular_type_def{" System.IntPtr", complex.outer.base_qualifier, {}}; + return regular_type_def{"System.IntPtr", complex.outer.base_qualifier, {}}; } } ,{"hash", nullptr, nullptr, [&] { - return regular_type_def{" System.IntPtr", complex.outer.base_qualifier, {}}; + return regular_type_def{"System.IntPtr", complex.outer.base_qualifier, {}}; } } ,{"iterator", nullptr, nullptr, [&] { - return regular_type_def{" System.IntPtr", complex.outer.base_qualifier, {}}; + return regular_type_def{"System.IntPtr", complex.outer.base_qualifier, {}}; } } ,{"accessor", nullptr, nullptr, [&] { - return regular_type_def{" System.IntPtr", complex.outer.base_qualifier, {}}; + return regular_type_def{"System.IntPtr", complex.outer.base_qualifier, {}}; } } }; diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh b/src/bin/eolian_mono/eolian/mono/name_helpers.hh index 074fd4f7ed..2ff2b47e1d 100644 --- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh +++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh @@ -278,7 +278,11 @@ struct klass_interface_name_generator template std::string operator()(T const& klass) const { - return utils::remove_all(klass.eolian_name, '_'); + std::string name = utils::remove_all(klass.eolian_name, '_'); + if (klass.type == attributes::class_type::mixin || klass.type == attributes::class_type::interface_) + return "I" + name; + else + return name; } template @@ -306,10 +310,23 @@ struct klass_full_interface_name_generator template inline std::string klass_concrete_name(T const& klass) { - std::string name = utils::remove_all(klass.eolian_name, '_'); - if (klass.type == attributes::class_type::regular || klass.type == attributes::class_type::abstract_) - return name; - return name + "Concrete"; + if (klass.type == attributes::class_type::mixin || klass.type == attributes::class_type::interface_) + return klass_interface_name(klass) + "Concrete"; + + return utils::remove_all(klass.eolian_name, '_'); +} + +template +inline std::string klass_concrete_or_interface_name(T const& klass) +{ + switch(klass.type) + { + case attributes::class_type::abstract_: + case attributes::class_type::regular: + return klass_concrete_name(klass); + default: + return klass_interface_name(klass); + } } struct klass_full_concrete_name_generator @@ -408,7 +425,7 @@ inline std::string managed_event_name(std::string const& name) inline std::string managed_event_args_short_name(attributes::event_def const& evt) { std::string ret; - ret = klass_interface_name(evt.klass); + ret = klass_concrete_or_interface_name(evt.klass); return ret + name_helpers::managed_event_name(evt.name) + "_Args"; } @@ -425,7 +442,7 @@ inline std::string translate_inherited_event_name(const attributes::event_def &e // Open/close namespaces template -bool open_namespaces(OutputIterator sink, std::vector namespaces, Context context) +bool open_namespaces(OutputIterator sink, std::vector namespaces, Context const& context) { std::transform(namespaces.begin(), namespaces.end(), namespaces.begin(), managed_namespace); @@ -434,7 +451,7 @@ bool open_namespaces(OutputIterator sink, std::vector namespaces, C } template -bool close_namespaces(OutputIterator sink, std::vector const& namespaces, Context context) +bool close_namespaces(OutputIterator sink, std::vector const& namespaces, Context const& context) { auto close_namespace = *(lit("} ")) << "\n"; return as_generator(close_namespace).generate(sink, namespaces, context); diff --git a/src/bin/eolian_mono/eolian/mono/parameter.hh b/src/bin/eolian_mono/eolian/mono/parameter.hh index 1314c125cb..acd0c5dfe1 100644 --- a/src/bin/eolian_mono/eolian/mono/parameter.hh +++ b/src/bin/eolian_mono/eolian/mono/parameter.hh @@ -580,8 +580,8 @@ struct native_convert_in_variable_generator else if (helpers::need_struct_conversion(regular)) { return as_generator( - "var " << string << " = " << type << "_StructConversion.ToManaged(" << escape_keyword(param.param_name) << ");\n" - ).generate(sink, std::make_tuple(in_variable_name(param.param_name), param.type), context); + type << " " << string << " = " << escape_keyword(param.param_name) << ";\n" + ).generate(sink, std::make_tuple(param.type, in_variable_name(param.param_name)), context); } else if (param.type.c_type == "Eina_Binbuf *" || param.type.c_type == "const Eina_Binbuf *") { @@ -647,8 +647,8 @@ struct convert_in_variable_generator else if (helpers::need_struct_conversion(regular)) { return as_generator( - "var " << string << " = " << type << "_StructConversion.ToInternal(" << escape_keyword(param.param_name) << ");\n" - ).generate(sink, std::make_tuple(in_variable_name(param.param_name), param.type), context); + marshall_type << " " << string << " = " << escape_keyword(param.param_name) << ";\n" + ).generate(sink, std::make_tuple(param.type, in_variable_name(param.param_name)), context); } else if (param.type.c_type == "Eina_Binbuf *" || param.type.c_type == "const Eina_Binbuf *") { @@ -899,8 +899,8 @@ struct convert_out_assign_generator else if (helpers::need_struct_conversion(regular)) { return as_generator( - string << " = " << type << "_StructConversion.ToManaged(" << out_variable_name(param.param_name) << ");\n" - ).generate(sink, std::make_tuple(escape_keyword(param.param_name), param.type), context); + string << " = " << out_variable_name(param.param_name) << ";\n" + ).generate(sink, escape_keyword(param.param_name), context); } else if (param_is_acceptable(param, "Eina_Binbuf *", WANT_OWN, WANT_OUT) || param_is_acceptable(param, "Eina_Binbuf *", !WANT_OWN, WANT_OUT) @@ -978,8 +978,8 @@ struct native_convert_in_ptr_assign_generator if (param_should_use_in_var(param, true) && param.type.is_ptr && !param.type.has_own && helpers::need_struct_conversion(regular)) { return as_generator( - string << " = " << type << "_StructConversion.ToInternal(" << in_variable_name(param.param_name) << ");\n" - ).generate(sink, std::make_tuple(escape_keyword(param.param_name), param.type), context); + string << " = " << in_variable_name(param.param_name) << ";\n" + ).generate(sink, escape_keyword(param.param_name), context); } return true; @@ -995,8 +995,8 @@ struct convert_in_ptr_assign_generator if (param_should_use_in_var(param, true) && param.type.is_ptr && !param.type.has_own && helpers::need_struct_conversion(regular)) { return as_generator( - string << " = " << type << "_StructConversion.ToManaged(" << in_variable_name(param.param_name) << ");\n" - ).generate(sink, std::make_tuple(escape_keyword(param.param_name), param.type), context); + string << " = " << in_variable_name(param.param_name) << ";\n" + ).generate(sink, escape_keyword(param.param_name), context); } return true; @@ -1033,8 +1033,8 @@ struct convert_return_generator else if (helpers::need_struct_conversion(regular)) { return as_generator( - "return " << type << "_StructConversion.ToManaged(_ret_var);\n" - ).generate(sink, ret_type, context); + "return _ret_var;\n" + ).generate(sink, nullptr, context); } else if (ret_type.c_type == "Eina_Binbuf *" || ret_type.c_type == "const Eina_Binbuf *") { @@ -1101,8 +1101,8 @@ struct native_convert_out_assign_generator else if (helpers::need_struct_conversion(regular)) { return as_generator( - string << " = " << type << "_StructConversion.ToInternal(" << string << ");\n" - ).generate(sink, std::make_tuple(escape_keyword(param.param_name), param.type, out_variable_name(param.param_name)), context); + string << " = " << string << ";\n" + ).generate(sink, std::make_tuple(escape_keyword(param.param_name), out_variable_name(param.param_name)), context); } else if (param_is_acceptable(param, "Eina_Stringshare *", !WANT_OWN, WANT_OUT)) { @@ -1240,8 +1240,8 @@ struct native_convert_return_generator else if (helpers::need_struct_conversion(regular)) { return as_generator( - "return " << type << "_StructConversion.ToInternal(_ret_var);\n" - ).generate(sink, ret_type, context); + "return _ret_var;\n" + ).generate(sink, nullptr, context); } else if (ret_type.c_type == "const char *") { @@ -1452,7 +1452,7 @@ struct constructor_parameter_name_parameterized struct constructor_param_generator { template - bool generate(OutputIterator sink, attributes::constructor_def const& ctor, Context context) const + bool generate(OutputIterator sink, attributes::constructor_def const& ctor, Context const& context) const { auto params = ctor.function.parameters; @@ -1471,7 +1471,7 @@ struct constructor_param_generator struct constructor_invocation_generator { template - bool generate(OutputIterator sink, attributes::constructor_def const& ctor, Context context) const + bool generate(OutputIterator sink, attributes::constructor_def const& ctor, Context const& context) const { auto params = ctor.function.parameters; if (!as_generator( diff --git a/src/bin/eolian_mono/eolian/mono/part_definition.hh b/src/bin/eolian_mono/eolian/mono/part_definition.hh index 2a8d2e1b00..7894086f95 100644 --- a/src/bin/eolian_mono/eolian/mono/part_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/part_definition.hh @@ -27,7 +27,7 @@ struct part_definition_generator << scope_tab << "{\n" << scope_tab << scope_tab << "get\n" << scope_tab << scope_tab << "{\n" - << scope_tab << scope_tab << scope_tab << "Efl.Object obj = Efl.PartNativeInherit.efl_part_get_ptr.Value.Delegate(NativeHandle, \"" << part.name << "\");\n" + << scope_tab << scope_tab << scope_tab << "Efl.Object obj = Efl.IPartNativeInherit.efl_part_get_ptr.Value.Delegate(NativeHandle, \"" << part.name << "\");\n" << scope_tab << scope_tab << scope_tab << "return " << part_klass_name << ".static_cast(obj);\n" << scope_tab << scope_tab << "}\n" << scope_tab << "}\n" diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh index ba058d0817..35f772554f 100644 --- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh @@ -21,96 +21,260 @@ inline std::string binding_struct_name(attributes::struct_def const& struct_) return name_helpers::typedecl_managed_name(struct_); } -inline std::string binding_struct_internal_name(attributes::struct_def const& struct_) +inline std::string struct_internal_decl_name() { - return binding_struct_name(struct_) + "_StructInternal"; + return "NativeStruct"; } -struct struct_definition_generator +inline std::string binding_struct_internal_name(attributes::struct_def const& struct_) { - template - bool generate(OutputIterator sink, attributes::struct_def const& struct_, Context const& context) const - { - EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "struct_definition_generator: " << struct_.cxx_name << std::endl; - if(!as_generator(documentation).generate(sink, struct_, context)) - return false; - if(!as_generator - ( - "[StructLayout(LayoutKind.Sequential)]\n" - "public struct " << string << "\n{\n" - ) - .generate(sink, binding_struct_name(struct_), context)) - return false; + return binding_struct_name(struct_) + "." + struct_internal_decl_name(); +} - // iterate struct fields - for (auto const& field : struct_.fields) - { - auto field_name = field.name; - field_name[0] = std::toupper(field_name[0]); // Hack to allow 'static' as a field name - if (!as_generator - ( - documentation(1) - << scope_tab(1) << "public " << type << " " << string << ";\n" - ) - .generate(sink, std::make_tuple(field, field.type, name_helpers::to_field_name(field.name)), context)) - return false; - } +// Conversors generation // - auto struct_name = binding_struct_name(struct_); +struct to_internal_field_convert_generator +{ + template + bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const + { + auto const& indent = current_indentation(context); + auto field_name = name_helpers::to_field_name(field.name); + // FIXME Replace need_struct_conversion(regular) with need_struct_conversion(type) + auto regular = efl::eina::get(&field.type.original_type); + auto klass = efl::eina::get(&field.type.original_type); + auto complex = efl::eina::get(&field.type.original_type); - // Check whether this is an extern struct without declared fields in .eo file and generate a - // placeholder field if positive. - // Mono's JIT is picky when generating function pointer for delegates with empty structs, leading to - // those 'mini-amd64.c condition fields not met' crashes. - if (struct_.fields.size() == 0) - { - if (!as_generator("///Placeholder field\npublic IntPtr field;\n").generate(sink, nullptr, context)) + if (klass) + { + if (!as_generator( + indent << scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << ".NativeHandle;\n") + .generate(sink, std::make_tuple(field_name, field_name), context)) return false; - } - else - { - // Constructor with default parameters for easy struct initialization - if(!as_generator( - scope_tab << "///Constructor for " << string << ".\n" - << scope_tab << "public " << string << "(\n" - << ((scope_tab << scope_tab << field_argument_default) % ",\n") - << scope_tab << ")\n" - << scope_tab << "{\n" - << *(scope_tab << scope_tab << field_argument_assignment << ";\n") - << scope_tab << "}\n") - .generate(sink, std::make_tuple(struct_name, struct_name, struct_.fields, struct_.fields), context)) - return false; - } + } + else if ((complex && (complex->outer.base_type == "array" + || complex->outer.base_type == "list" + || complex->outer.base_type == "iterator" + || complex->outer.base_type == "hash")) + || field.type.c_type == "Eina_Binbuf *" || field.type.c_type == "const Eina_Binbuf *") + { + // Always assumes pointer + if (!as_generator( + indent << scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << ".Handle;\n") + .generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else if (field.type.is_ptr && helpers::need_pointer_conversion(regular) && !helpers::need_struct_conversion(regular)) + { + if (!as_generator( + indent << scope_tab << scope_tab << "_internal_struct." << string << " = Eina.PrimitiveConversion.ManagedToPointerAlloc(_external_struct." << string << ");\n") + .generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else if (helpers::need_struct_conversion(regular)) + { + if (!as_generator( + indent << scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << ";\n") + .generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else if (regular && (regular->base_type == "string" || regular->base_type == "mstring")) + { + if (!as_generator( + indent << scope_tab << scope_tab << "_internal_struct." << string << " = Eina.MemoryNative.StrDup(_external_struct." << string << ");\n") + .generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else if (regular && regular->base_type == "stringshare") + { + if (!as_generator( + indent << scope_tab << scope_tab << "_internal_struct." << string << " = Eina.Stringshare.eina_stringshare_add(_external_struct." << string << ");\n") + .generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else if (field.type.c_type == "Eina_Slice" || field.type.c_type == "const Eina_Slice" + || field.type.c_type == "Eina_Rw_Slice" || field.type.c_type == "const Eina_Rw_Slice") + { + if (!as_generator( + "\n" << + indent << scope_tab << scope_tab << "_internal_struct." << field_name << ".Len = _external_struct." << field_name << ".Len;\n" << + indent << scope_tab << scope_tab << "_internal_struct." << field_name << ".Mem = _external_struct." << field_name << ".Mem;\n") + .generate(sink, attributes::unused, context)) + return false; + } + else if (field.type.c_type == "Eina_Value" || field.type.c_type == "const Eina_Value") + { + if (!as_generator( + indent << scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << ".GetNative();\n" + ).generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else if (field.type.c_type == "Eina_Value *" || field.type.c_type == "const Eina_Value *") + { + if (!as_generator( + indent << scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << ".NativeHandle;\n" + ).generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else if (!field.type.is_ptr && regular && regular->base_type == "bool") + { + if (!as_generator( + indent << scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << " ? (byte)1 : (byte)0;\n") + .generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else if (!field.type.is_ptr && regular && regular->base_type == "char") + { + if (!as_generator( + indent << scope_tab << scope_tab << "_internal_struct." << string << " = (byte)_external_struct." << string << ";\n") + .generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else // primitives and enums + { + if (!as_generator( + indent << scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << ";\n") + .generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + return true; + } +} const to_internal_field_convert {}; - if(!as_generator( - "public static implicit operator " << struct_name << "(IntPtr ptr)\n" - << scope_tab << "{\n" - << scope_tab << scope_tab << "var tmp = (" << struct_name << "_StructInternal)Marshal.PtrToStructure(ptr, typeof(" << struct_name << "_StructInternal));\n" - << scope_tab << scope_tab << "return " << struct_name << "_StructConversion.ToManaged(tmp);\n" - << scope_tab << "}\n" - ).generate(sink, attributes::unused, context)) - return false; +struct to_external_field_convert_generator +{ + template + bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const + { + auto const& indent = current_indentation(context); + auto field_name = name_helpers::to_field_name(field.name); + auto regular = efl::eina::get(&field.type.original_type); + auto klass = efl::eina::get(&field.type.original_type); + auto complex = efl::eina::get(&field.type.original_type); + if (klass) + { + auto interface_name = name_helpers::klass_full_interface_name(*klass); + auto concrete_name = name_helpers::klass_full_concrete_name(*klass); + if (!as_generator( + "\n" + << indent << scope_tab << scope_tab << "_external_struct." << string + << " = (" << concrete_name << ") System.Activator.CreateInstance(typeof(" + << concrete_name << "), new System.Object[] {_internal_struct." << string << "});\n" + << indent << scope_tab << scope_tab << "Efl.Eo.Globals.efl_ref(_internal_struct." << string << ");\n") + .generate(sink, std::make_tuple(field_name, field_name, field_name), context)) + return false; + } + else if (field.type.c_type == "Eina_Binbuf *" || field.type.c_type == "const Eina_Binbuf *") + { + if (!as_generator( + indent << scope_tab << scope_tab << "_external_struct." << string << " = new " << type << "(_internal_struct." << string << ", false);\n") + .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) + return false; + } + else if (complex && (complex->outer.base_type == "array" + || complex->outer.base_type == "list" + || complex->outer.base_type == "iterator")) + { + // Always assumes pointer + if (!as_generator( + indent << scope_tab << scope_tab << "_external_struct." << string << " = new " << type << "(_internal_struct." << string << ", false, false);\n") + .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) + return false; + } + else if (complex && complex->outer.base_type == "hash") + { + if (!as_generator( + indent << scope_tab << scope_tab << "_external_struct." << string << " = new " << type << "(_internal_struct." << string << ", false, false, false);\n") + .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) + return false; + } + else if (field.type.is_ptr && helpers::need_pointer_conversion(regular) && !helpers::need_struct_conversion(regular)) + { + if (!as_generator( + indent << scope_tab << scope_tab << "_external_struct." << string << " = Eina.PrimitiveConversion.PointerToManaged<" << type << ">(_internal_struct." << string << ");\n") + .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) + return false; + } + else if (helpers::need_struct_conversion(regular)) + { + if (!as_generator( + indent << scope_tab << scope_tab << "_external_struct." << string << " = _internal_struct." << string << ";\n") + .generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else if (regular && (regular->base_type == "string" || regular->base_type == "mstring" || regular->base_type == "stringshare")) + { + if (!as_generator( + indent << scope_tab << scope_tab << "_external_struct." << string << " = Eina.StringConversion.NativeUtf8ToManagedString(_internal_struct." << string << ");\n") + .generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else if (field.type.c_type == "Eina_Slice" || field.type.c_type == "const Eina_Slice" + || field.type.c_type == "Eina_Rw_Slice" || field.type.c_type == "const Eina_Rw_Slice") + { + if (!as_generator( + "\n" << + indent << scope_tab << scope_tab << "_external_struct." << field_name << ".Len = _internal_struct." << field_name << ".Len;\n" << + indent << scope_tab << scope_tab << "_external_struct." << field_name << ".Mem = _internal_struct." << field_name << ".Mem;\n") + .generate(sink, attributes::unused, context)) + return false; + } + else if (field.type.c_type == "Eina_Value" || field.type.c_type == "const Eina_Value") + { + if (!as_generator( + indent << scope_tab << scope_tab << "_external_struct." << string << " = new Eina.Value(_internal_struct." << string << ");\n" + ).generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else if (field.type.c_type == "Eina_Value *" || field.type.c_type == "const Eina_Value *") + { + if (!as_generator( + indent << scope_tab << scope_tab << "_external_struct." << string << " = new Eina.Value(_internal_struct." << string << ", Eina.Ownership.Unmanaged);\n" + ).generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else if (!field.type.is_ptr && regular && regular->base_type == "bool") + { + if (!as_generator( + indent << scope_tab << scope_tab << "_external_struct." << string << " = _internal_struct." << string << " != 0;\n" + ).generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else if (!field.type.is_ptr && regular && regular->base_type == "char") + { + if (!as_generator( + indent << scope_tab << scope_tab << "_external_struct." << string << " = (char)_internal_struct." << string << ";\n" + ).generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + else // primitives and enums + { + if (!as_generator( + indent << scope_tab << scope_tab << "_external_struct." << string << " = _internal_struct." << string << ";\n") + .generate(sink, std::make_tuple(field_name, field_name), context)) + return false; + } + return true; + } +} const to_external_field_convert {}; - if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false; - - return true; - } -} const struct_definition {}; - +// Internal Struct // struct struct_internal_definition_generator { template bool generate(OutputIterator sink, attributes::struct_def const& struct_, Context const& context) const { + auto const& indent = current_indentation(context); if (!as_generator ( - "///Internal wrapper for struct " << string << ".\n" - "[StructLayout(LayoutKind.Sequential)]\n" - "public struct " << string << "\n{\n" + indent << "///Internal wrapper for struct " << string << ".\n" + << indent << "[StructLayout(LayoutKind.Sequential)]\n" + << indent << "public struct " << string << "\n" + << indent << "{\n" ) - .generate(sink, std::make_tuple<>(binding_struct_name(struct_), binding_struct_internal_name(struct_)), context)) + .generate(sink, std::make_tuple<>(binding_struct_name(struct_), struct_internal_decl_name()), context)) return false; // iterate struct fields @@ -126,29 +290,29 @@ struct struct_internal_definition_generator || regular->base_type == "stringshare" || regular->base_type == "any_value_ptr"))) { - if (!as_generator("///Internal wrapper for field " << field_name << "\n" - << "public System.IntPtr " << field_name << ";\n") + if (!as_generator(indent << scope_tab << "///Internal wrapper for field " << field_name << "\n" + << indent << scope_tab << "public System.IntPtr " << field_name << ";\n") .generate(sink, nullptr, context)) return false; } else if (regular && !(regular->base_qualifier & efl::eolian::grammar::attributes::qualifier_info::is_ref) && regular->base_type == "bool") { - if (!as_generator("///Internal wrapper for field " << field_name << "\n" - "public System.Byte " << field_name << ";\n") + if (!as_generator(indent << scope_tab << "///Internal wrapper for field " << field_name << "\n" + << indent << scope_tab << "public System.Byte " << field_name << ";\n") .generate(sink, nullptr, context)) return false; } else if (regular && !(regular->base_qualifier & efl::eolian::grammar::attributes::qualifier_info::is_ref) && regular->base_type == "char") { - if (!as_generator("///Internal wrapper for field " << field_name << "\n" - "public System.Byte " << field_name << ";\n") + if (!as_generator(indent << scope_tab << "///Internal wrapper for field " << field_name << "\n" + << indent << scope_tab << "public System.Byte " << field_name << ";\n") .generate(sink, nullptr, context)) return false; } - else if (!as_generator(scope_tab << eolian_mono::marshall_annotation(false) << "\n" - << scope_tab << "public " << eolian_mono::marshall_type(false) << " " << string << ";\n") + else if (!as_generator(indent << scope_tab << eolian_mono::marshall_annotation(false) << "\n" + << indent << scope_tab << "public " << eolian_mono::marshall_type(false) << " " << string << ";\n") .generate(sink, std::make_tuple(field.type, field.type, field_name), context)) return false; } @@ -159,286 +323,20 @@ struct struct_internal_definition_generator // those 'mini-amd64.c condition fields not met' crashes. if (struct_.fields.size() == 0) { - if (!as_generator("internal IntPtr field;\n").generate(sink, nullptr, context)) + if (!as_generator(indent << scope_tab << "internal IntPtr field;\n").generate(sink, nullptr, context)) return false; } auto external_name = binding_struct_name(struct_); auto internal_name = binding_struct_internal_name(struct_); - if(!as_generator( - scope_tab << "///Implicit conversion to the internal/marshalling representation.\n" - << scope_tab << "public static implicit operator " << string << "(" << string << " struct_)\n" - << scope_tab << "{\n" - << scope_tab << scope_tab << "return " << string << "_StructConversion.ToManaged(struct_);\n" - << scope_tab << "}\n" - << scope_tab << "///Implicit conversion to the managed representation.\n" - << scope_tab << "public static implicit operator " << string << "(" << string << " struct_)\n" - << scope_tab << "{\n" - << scope_tab << scope_tab << "return " << string << "_StructConversion.ToInternal(struct_);\n" - << scope_tab << "}\n" - ).generate(sink, std::make_tuple(external_name, internal_name, external_name, - internal_name, external_name, external_name), context)) - return false; - - if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false; - - return true; - } -} const struct_internal_definition {}; - - -// Conversors generation // - -struct to_internal_field_convert_generator -{ - template - bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const - { - auto field_name = name_helpers::to_field_name(field.name); - // FIXME Replace need_struct_conversion(regular) with need_struct_conversion(type) - auto regular = efl::eina::get(&field.type.original_type); - auto klass = efl::eina::get(&field.type.original_type); - auto complex = efl::eina::get(&field.type.original_type); - - if (klass) - { - if (!as_generator( - scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << ".NativeHandle;\n") - .generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else if ((complex && (complex->outer.base_type == "array" - || complex->outer.base_type == "list" - || complex->outer.base_type == "iterator" - || complex->outer.base_type == "hash")) - || field.type.c_type == "Eina_Binbuf *" || field.type.c_type == "const Eina_Binbuf *") - { - // Always assumes pointer - if (!as_generator( - scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << ".Handle;\n") - .generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else if (field.type.is_ptr && helpers::need_pointer_conversion(regular) && !helpers::need_struct_conversion(regular)) - { - if (!as_generator( - scope_tab << scope_tab << "_internal_struct." << string << " = Eina.PrimitiveConversion.ManagedToPointerAlloc(_external_struct." << string << ");\n") - .generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else if (helpers::need_struct_conversion(regular)) - { - if (!as_generator( - scope_tab << scope_tab << "_internal_struct." << string << " = " << type << "_StructConversion.ToInternal(_external_struct." << string << ");\n") - .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) - return false; - } - else if (regular && (regular->base_type == "string" || regular->base_type == "mstring")) - { - if (!as_generator( - scope_tab << scope_tab << "_internal_struct." << string << " = Eina.MemoryNative.StrDup(_external_struct." << string << ");\n") - .generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else if (regular && regular->base_type == "stringshare") - { - if (!as_generator( - scope_tab << scope_tab << "_internal_struct." << string << " = Eina.Stringshare.eina_stringshare_add(_external_struct." << string << ");\n") - .generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else if (field.type.c_type == "Eina_Slice" || field.type.c_type == "const Eina_Slice" - || field.type.c_type == "Eina_Rw_Slice" || field.type.c_type == "const Eina_Rw_Slice") - { - if (!as_generator( - "\n" << - scope_tab << scope_tab << "_internal_struct." << field_name << ".Len = _external_struct." << field_name << ".Len;\n" << - scope_tab << scope_tab << "_internal_struct." << field_name << ".Mem = _external_struct." << field_name << ".Mem;\n\n") - .generate(sink, attributes::unused, context)) - return false; - } - else if (field.type.c_type == "Eina_Value" || field.type.c_type == "const Eina_Value") - { - if (!as_generator( - scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << ".GetNative();\n" - ).generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else if (field.type.c_type == "Eina_Value *" || field.type.c_type == "const Eina_Value *") - { - if (!as_generator( - scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << ".NativeHandle;\n" - ).generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else if (!field.type.is_ptr && regular && regular->base_type == "bool") - { - if (!as_generator( - scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << " ? (byte)1 : (byte)0;\n") - .generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else if (!field.type.is_ptr && regular && regular->base_type == "char") - { - if (!as_generator( - scope_tab << scope_tab << "_internal_struct." << string << " = (byte)_external_struct." << string << ";\n") - .generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else // primitives and enums - { - if (!as_generator( - scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << ";\n") - .generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - return true; - } -} const to_internal_field_convert {}; - -struct to_external_field_convert_generator -{ - template - bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const - { - auto field_name = name_helpers::to_field_name(field.name); - auto regular = efl::eina::get(&field.type.original_type); - auto klass = efl::eina::get(&field.type.original_type); - auto complex = efl::eina::get(&field.type.original_type); - - if (klass) - { - auto interface_name = name_helpers::klass_full_interface_name(*klass); - auto concrete_name = name_helpers::klass_full_concrete_name(*klass); - if (!as_generator( - "\n" - << scope_tab << scope_tab << "_external_struct." << string - << " = (" << concrete_name << ") System.Activator.CreateInstance(typeof(" - << concrete_name << "), new System.Object[] {_internal_struct." << string << "});\n" - << scope_tab << scope_tab << "Efl.Eo.Globals.efl_ref(_internal_struct." << string << ");\n\n") - .generate(sink, std::make_tuple(field_name, field_name, field_name), context)) - return false; - } - else if (field.type.c_type == "Eina_Binbuf *" || field.type.c_type == "const Eina_Binbuf *") - { - if (!as_generator( - scope_tab << scope_tab << "_external_struct." << string << " = new " << type << "(_internal_struct." << string << ", false);\n") - .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) - return false; - } - else if (complex && (complex->outer.base_type == "array" - || complex->outer.base_type == "list" - || complex->outer.base_type == "iterator")) - { - // Always assumes pointer - if (!as_generator( - scope_tab << scope_tab << "_external_struct." << string << " = new " << type << "(_internal_struct." << string << ", false, false);\n") - .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) - return false; - } - else if (complex && complex->outer.base_type == "hash") - { - if (!as_generator( - scope_tab << scope_tab << "_external_struct." << string << " = new " << type << "(_internal_struct." << string << ", false, false, false);\n") - .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) - return false; - } - else if (field.type.is_ptr && helpers::need_pointer_conversion(regular) && !helpers::need_struct_conversion(regular)) - { - if (!as_generator( - scope_tab << scope_tab << "_external_struct." << string << " = Eina.PrimitiveConversion.PointerToManaged<" << type << ">(_internal_struct." << string << ");\n") - .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) - return false; - } - else if (helpers::need_struct_conversion(regular)) - { - if (!as_generator( - scope_tab << scope_tab << "_external_struct." << string << " = " << type << "_StructConversion.ToManaged(_internal_struct." << string << ");\n") - .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) - return false; - } - else if (regular && (regular->base_type == "string" || regular->base_type == "mstring" || regular->base_type == "stringshare")) - { - if (!as_generator( - scope_tab << scope_tab << "_external_struct." << string << " = Eina.StringConversion.NativeUtf8ToManagedString(_internal_struct." << string << ");\n") - .generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else if (field.type.c_type == "Eina_Slice" || field.type.c_type == "const Eina_Slice" - || field.type.c_type == "Eina_Rw_Slice" || field.type.c_type == "const Eina_Rw_Slice") - { - if (!as_generator( - "\n" << - scope_tab << scope_tab << "_external_struct." << field_name << ".Len = _internal_struct." << field_name << ".Len;\n" << - scope_tab << scope_tab << "_external_struct." << field_name << ".Mem = _internal_struct." << field_name << ".Mem;\n\n") - .generate(sink, attributes::unused, context)) - return false; - } - else if (field.type.c_type == "Eina_Value" || field.type.c_type == "const Eina_Value") - { - if (!as_generator( - scope_tab << scope_tab << "_external_struct." << string << " = new Eina.Value(_internal_struct." << string << ");\n" - ).generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else if (field.type.c_type == "Eina_Value *" || field.type.c_type == "const Eina_Value *") - { - if (!as_generator( - scope_tab << scope_tab << "_external_struct." << string << " = new Eina.Value(_internal_struct." << string << ", Eina.Ownership.Unmanaged);\n" - ).generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else if (!field.type.is_ptr && regular && regular->base_type == "bool") - { - if (!as_generator( - scope_tab << scope_tab << "_external_struct." << string << " = _internal_struct." << string << " != 0;\n" - ).generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else if (!field.type.is_ptr && regular && regular->base_type == "char") - { - if (!as_generator( - scope_tab << scope_tab << "_external_struct." << string << " = (char)_internal_struct." << string << ";\n" - ).generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - else // primitives and enums - { - if (!as_generator( - scope_tab << scope_tab << "_external_struct." << string << " = _internal_struct." << string << ";\n") - .generate(sink, std::make_tuple(field_name, field_name), context)) - return false; - } - return true; - } -} const to_external_field_convert {}; - -struct struct_binding_conversion_functions_generator -{ - template - bool generate(OutputIterator sink, attributes::struct_def const& struct_, Context const& context) const - { - // Open conversion class - if (!as_generator - ( - "/// Conversion class for struct " << name_helpers::typedecl_managed_name(struct_) << "\n" - "public static class " << name_helpers::typedecl_managed_name(struct_) << "_StructConversion\n{\n" - ) - .generate(sink, nullptr, context)) - return false; - // to internal - if (!as_generator - ( - scope_tab << "internal static " << string << " ToInternal(" << string << " _external_struct)\n" - << scope_tab << "{\n" - << scope_tab << scope_tab << "var _internal_struct = new " << string << "();\n\n" - ) - .generate(sink, std::make_tuple(binding_struct_internal_name(struct_) - , binding_struct_name(struct_) - , binding_struct_internal_name(struct_) - ), context)) + if (!as_generator( + indent << scope_tab << "///Implicit conversion to the internal/marshalling representation.\n" + << indent << scope_tab << "public static implicit operator " << string << "(" << string << " _external_struct)\n" + << indent << scope_tab << "{\n" + << indent << scope_tab << scope_tab << "var _internal_struct = new " << string << "();\n" + ).generate(sink, std::make_tuple(internal_name, external_name, internal_name), context)) return false; for (auto const& field : struct_.fields) @@ -447,26 +345,17 @@ struct struct_binding_conversion_functions_generator return false; } - if (!as_generator - ( - "\n" - << scope_tab << scope_tab << "return _internal_struct;\n" - << scope_tab << "}\n\n" - ) - .generate(sink, attributes::unused, context)) + if (!as_generator(indent << scope_tab << scope_tab << "return _internal_struct;\n" + << indent << scope_tab << "}\n\n").generate(sink, nullptr, context)) return false; - // to external - if (!as_generator - ( - scope_tab << "internal static " << string << " ToManaged(" << string << " _internal_struct)\n" - << scope_tab << "{\n" - << scope_tab << scope_tab << "var _external_struct = new " << string << "();\n\n" - ) - .generate(sink, std::make_tuple(binding_struct_name(struct_) - , binding_struct_internal_name(struct_) - , binding_struct_name(struct_) - ), context)) + // to managed + if (!as_generator( + indent << scope_tab << "///Implicit conversion to the managed representation.\n" + << indent << scope_tab << "public static implicit operator " << string << "(" << string << " _internal_struct)\n" + << indent << scope_tab << "{\n" + << indent << scope_tab << scope_tab << "var _external_struct = new " << string << "();\n" + ).generate(sink, std::make_tuple(external_name, internal_name, external_name), context)) return false; for (auto const& field : struct_.fields) @@ -475,22 +364,95 @@ struct struct_binding_conversion_functions_generator return false; } - if (!as_generator - ( - "\n" - << scope_tab << scope_tab << "return _external_struct;\n" - << scope_tab << "}\n\n" - ) - .generate(sink, attributes::unused, context)) + if (!as_generator(indent << scope_tab << scope_tab << "return _external_struct;\n" + << indent << scope_tab << "}\n\n").generate(sink, nullptr, context)) return false; - // Close conversion class - if (!as_generator("}\n").generate(sink, attributes::unused, context)) - return false; + // close internal class + if(!as_generator(indent << "}\n\n").generate(sink, attributes::unused, context)) return false; return true; } -} const struct_binding_conversion_functions {}; +} const struct_internal_definition {}; + +// Managed Struct // + +struct struct_definition_generator +{ + template + bool generate(OutputIterator sink, attributes::struct_def const& struct_, Context const& context) const + { + EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "struct_definition_generator: " << struct_.cxx_name << std::endl; + auto const& indent = current_indentation(context); + if(!as_generator(documentation).generate(sink, struct_, context)) + return false; + if(!as_generator + ( + indent << "[StructLayout(LayoutKind.Sequential)]\n" + << indent << "public struct " << string << "\n" + << indent << "{\n" + ) + .generate(sink, binding_struct_name(struct_), context)) + return false; + + // iterate struct fields + for (auto const& field : struct_.fields) + { + auto field_name = field.name; + field_name[0] = std::toupper(field_name[0]); // Hack to allow 'static' as a field name + if (!as_generator + ( + indent << scope_tab << documentation + << indent << scope_tab << "public " << type << " " << string << ";\n" + ) + .generate(sink, std::make_tuple(field, field.type, name_helpers::to_field_name(field.name)), context)) + return false; + } + + auto struct_name = binding_struct_name(struct_); + + // Check whether this is an extern struct without declared fields in .eo file and generate a + // placeholder field if positive. + // Mono's JIT is picky when generating function pointer for delegates with empty structs, leading to + // those 'mini-amd64.c condition fields not met' crashes. + if (struct_.fields.size() == 0) + { + if (!as_generator(indent << scope_tab << "///Placeholder field\n" + << indent << scope_tab << "public IntPtr field;\n").generate(sink, nullptr, context)) + return false; + } + else + { + // Constructor with default parameters for easy struct initialization + if(!as_generator( + indent << scope_tab << "///Constructor for " << string << ".\n" + << indent << scope_tab << "public " << string << "(\n" + << ((indent << scope_tab << scope_tab << field_argument_default) % ",\n") + << indent << scope_tab << ")\n" + << indent << scope_tab << "{\n" + << *(indent << scope_tab << scope_tab << field_argument_assignment << ";\n") + << indent << scope_tab << "}\n\n") + .generate(sink, std::make_tuple(struct_name, struct_name, struct_.fields, struct_.fields), context)) + return false; + } + + if(!as_generator( + indent << scope_tab << "public static implicit operator " << struct_name << "(IntPtr ptr)\n" + << indent << scope_tab << "{\n" + << indent << scope_tab << scope_tab << "var tmp = (" << struct_name << ".NativeStruct)Marshal.PtrToStructure(ptr, typeof(" << struct_name << ".NativeStruct));\n" + << indent << scope_tab << scope_tab << "return tmp;\n" + << indent << scope_tab << "}\n\n" + ).generate(sink, attributes::unused, context)) + return false; + + if (!struct_internal_definition.generate(sink, struct_, change_indentation(indent.inc(), context))) + return false; + + if(!as_generator(indent << "}\n\n").generate(sink, attributes::unused, context)) return false; + + return true; + } +} const struct_definition {}; struct struct_entities_generator { @@ -506,12 +468,6 @@ struct struct_entities_generator if (!struct_definition.generate(sink, struct_, context)) return false; - if (!struct_internal_definition.generate(sink, struct_, context)) - return false; - - if (!struct_binding_conversion_functions.generate(sink, struct_, context)) - return false; - return name_helpers::close_namespaces(sink, struct_.namespaces, context); } @@ -541,11 +497,6 @@ struct is_eager_generator< ::eolian_mono::to_external_field_convert_generator> : template <> struct is_generator< ::eolian_mono::to_external_field_convert_generator> : std::true_type {}; -template <> -struct is_eager_generator< ::eolian_mono::struct_binding_conversion_functions_generator> : std::true_type {}; -template <> -struct is_generator< ::eolian_mono::struct_binding_conversion_functions_generator> : std::true_type {}; - template <> struct is_eager_generator< ::eolian_mono::struct_entities_generator> : std::true_type {}; template <> @@ -564,9 +515,6 @@ struct attributes_needed< ::eolian_mono::to_internal_field_convert_generator> : template <> struct attributes_needed< ::eolian_mono::to_external_field_convert_generator> : std::integral_constant {}; -template <> -struct attributes_needed< ::eolian_mono::struct_binding_conversion_functions_generator> : std::integral_constant {}; - template <> struct attributes_needed< ::eolian_mono::struct_entities_generator> : std::integral_constant {}; } diff --git a/src/bin/eolian_mono/eolian/mono/type_impl.hh b/src/bin/eolian_mono/eolian/mono/type_impl.hh index f34c4796ec..4b3f097dd4 100644 --- a/src/bin/eolian_mono/eolian/mono/type_impl.hh +++ b/src/bin/eolian_mono/eolian/mono/type_impl.hh @@ -26,10 +26,10 @@ attributes::regular_type_def replace_base_integer(attributes::regular_type_def v bool s = std::is_signed::value; switch (sizeof(T)) { - case 1: return s ? replace_base_type(v, " sbyte") : replace_base_type(v, " byte"); - case 2: return s ? replace_base_type(v, " short") : replace_base_type(v, " ushort"); - case 4: return s ? replace_base_type(v, " int") : replace_base_type(v, " uint"); - case 8: return s ? replace_base_type(v, " long") : replace_base_type(v, " ulong"); + case 1: return s ? replace_base_type(v, "sbyte") : replace_base_type(v, "byte"); + case 2: return s ? replace_base_type(v, "short") : replace_base_type(v, "ushort"); + case 4: return s ? replace_base_type(v, "int") : replace_base_type(v, "uint"); + case 8: return s ? replace_base_type(v, "long") : replace_base_type(v, "ulong"); default: return v; } } @@ -40,10 +40,10 @@ attributes::regular_type_def replace_base_opt_integer(attributes::regular_type_d bool s = std::is_signed::value; switch (sizeof(T)) { - case 1: return s ? replace_base_type(v, " sbyte?") : replace_base_type(v, " byte?"); - case 2: return s ? replace_base_type(v, " short?") : replace_base_type(v, " ushort?"); - case 4: return s ? replace_base_type(v, " int?") : replace_base_type(v, " uint?"); - case 8: return s ? replace_base_type(v, " long?") : replace_base_type(v, " ulong?"); + case 1: return s ? replace_base_type(v, "sbyte?") : replace_base_type(v, "byte?"); + case 2: return s ? replace_base_type(v, "short?") : replace_base_type(v, "ushort?"); + case 4: return s ? replace_base_type(v, "int?") : replace_base_type(v, "uint?"); + case 8: return s ? replace_base_type(v, "long?") : replace_base_type(v, "ulong?"); default: return v; } } @@ -67,7 +67,28 @@ eina::optional call_match(Array const (&array)[N], F f, A a) } return {nullptr}; } - + +template +struct visitor_regular_type_def_printer +{ + typedef visitor_regular_type_def_printer visitor_type; + typedef bool result_type; + + mutable OutputIterator sink; + Context const* context; + + bool operator()(grammar::attributes::regular_type_def const ®ular) const + { + return as_generator(string).generate(sink, name_helpers::type_full_managed_name(regular), *context); + } + + template + bool operator()(T const&) const + { + return true; + } +}; + template struct visitor_generate { @@ -94,110 +115,110 @@ struct visitor_generate const optional_match_table[] = { // signed primitives - {"byte", nullptr, [&] { return replace_base_type(regular, " sbyte?"); }} - , {"float", nullptr, [&] { return replace_base_type(regular, " float?"); }} - , {"double", nullptr, [&] { return replace_base_type(regular, " double?"); }} - , {"bool", nullptr, [&] { return replace_base_type(regular, " bool?"); }} + {"byte", nullptr, [&] { return replace_base_type(regular, "sbyte?"); }} + , {"float", nullptr, [&] { return replace_base_type(regular, "float?"); }} + , {"double", nullptr, [&] { return replace_base_type(regular, "double?"); }} + , {"bool", nullptr, [&] { return replace_base_type(regular, "bool?"); }} , {"short", nullptr, [&] { return replace_base_opt_integer(regular); }} , {"int", nullptr, [&] { return replace_base_opt_integer(regular); }} , {"long", nullptr, [&] { return replace_base_opt_integer(regular); }} , {"llong", nullptr, [&] { return replace_base_opt_integer(regular); }} - , {"int8", nullptr, [&] { return replace_base_type(regular, " sbyte?"); }} - , {"int16", nullptr, [&] { return replace_base_type(regular, " short?"); }} - , {"int32", nullptr, [&] { return replace_base_type(regular, " int?"); }} - , {"int64", nullptr, [&] { return replace_base_type(regular, " long?"); }} + , {"int8", nullptr, [&] { return replace_base_type(regular, "sbyte?"); }} + , {"int16", nullptr, [&] { return replace_base_type(regular, "short?"); }} + , {"int32", nullptr, [&] { return replace_base_type(regular, "int?"); }} + , {"int64", nullptr, [&] { return replace_base_type(regular, "long?"); }} , {"ssize", nullptr, [&] { return replace_base_opt_integer(regular); }} // unsigned primitives - , {"ubyte", nullptr, [&] { return replace_base_type(regular, " byte?"); }} + , {"ubyte", nullptr, [&] { return replace_base_type(regular, "byte?"); }} , {"ushort", nullptr, [&] { return replace_base_opt_integer(regular); }} , {"uint", nullptr, [&] { return replace_base_opt_integer(regular); }} , {"ulong", nullptr, [&] { return replace_base_opt_integer(regular); }} , {"ullong", nullptr, [&] { return replace_base_opt_integer(regular); }} - , {"uint8", nullptr, [&] { return replace_base_type(regular, " byte?"); }} - , {"uint16", nullptr, [&] { return replace_base_type(regular, " ushort?"); }} - , {"uint32", nullptr, [&] { return replace_base_type(regular, " uint?"); }} - , {"uint64", nullptr, [&] { return replace_base_type(regular, " ulong?"); }} + , {"uint8", nullptr, [&] { return replace_base_type(regular, "byte?"); }} + , {"uint16", nullptr, [&] { return replace_base_type(regular, "ushort?"); }} + , {"uint32", nullptr, [&] { return replace_base_type(regular, "uint?"); }} + , {"uint64", nullptr, [&] { return replace_base_type(regular, "ulong?"); }} , {"size", nullptr, [&] { return replace_base_opt_integer(regular); }} , {"ptrdiff", nullptr, [&] { return replace_base_opt_integer(regular); }} - , {"intptr", nullptr, [&] { return replace_base_type(regular, " System.IntPtr?"); }} - , {"uintptr", nullptr, [&] { return replace_base_type(regular, " System.IntPtr?"); }} - , {"void_ptr", nullptr, [&] { return replace_base_type(regular, " System.IntPtr?"); }} + , {"intptr", nullptr, [&] { return replace_base_type(regular, "System.IntPtr?"); }} + , {"uintptr", nullptr, [&] { return replace_base_type(regular, "System.IntPtr?"); }} + , {"void_ptr", nullptr, [&] { return replace_base_type(regular, "System.IntPtr?"); }} }; struct match const match_table[] = { // signed primitives - {"byte", nullptr, [&] { return replace_base_type(regular, " sbyte"); }} + {"byte", nullptr, [&] { return replace_base_type(regular, "sbyte"); }} , {"short", nullptr, [&] { return replace_base_integer(regular); }} , {"int", nullptr, [&] { return replace_base_integer(regular); }} , {"long", nullptr, [&] { return replace_base_integer(regular); }} , {"llong", nullptr, [&] { return replace_base_integer(regular); }} - , {"int8", nullptr, [&] { return replace_base_type(regular, " sbyte"); }} - , {"int16", nullptr, [&] { return replace_base_type(regular, " short"); }} - , {"int32", nullptr, [&] { return replace_base_type(regular, " int"); }} - , {"int64", nullptr, [&] { return replace_base_type(regular, " long"); }} + , {"int8", nullptr, [&] { return replace_base_type(regular, "sbyte"); }} + , {"int16", nullptr, [&] { return replace_base_type(regular, "short"); }} + , {"int32", nullptr, [&] { return replace_base_type(regular, "int"); }} + , {"int64", nullptr, [&] { return replace_base_type(regular, "long"); }} , {"ssize", nullptr, [&] { return replace_base_integer(regular); }} // unsigned primitives - , {"ubyte", nullptr, [&] { return replace_base_type(regular, " byte"); }} + , {"ubyte", nullptr, [&] { return replace_base_type(regular, "byte"); }} , {"ushort", nullptr, [&] { return replace_base_integer(regular); }} , {"uint", nullptr, [&] { return replace_base_integer(regular); }} , {"ulong", nullptr, [&] { return replace_base_integer(regular); }} , {"ullong", nullptr, [&] { return replace_base_integer(regular); }} - , {"uint8", nullptr, [&] { return replace_base_type(regular, " byte"); }} - , {"uint16", nullptr, [&] { return replace_base_type(regular, " ushort"); }} - , {"uint32", nullptr, [&] { return replace_base_type(regular, " uint"); }} - , {"uint64", nullptr, [&] { return replace_base_type(regular, " ulong"); }} + , {"uint8", nullptr, [&] { return replace_base_type(regular, "byte"); }} + , {"uint16", nullptr, [&] { return replace_base_type(regular, "ushort"); }} + , {"uint32", nullptr, [&] { return replace_base_type(regular, "uint"); }} + , {"uint64", nullptr, [&] { return replace_base_type(regular, "ulong"); }} , {"size", nullptr, [&] { return replace_base_integer(regular); }} , {"ptrdiff", nullptr, [&] { return replace_base_integer(regular); }} - , {"intptr", nullptr, [&] { return replace_base_type(regular, " System.IntPtr"); }} - , {"uintptr", nullptr, [&] { return replace_base_type(regular, " System.IntPtr"); }} - , {"void_ptr", nullptr, [&] { return replace_base_type(regular, " System.IntPtr"); }} + , {"intptr", nullptr, [&] { return replace_base_type(regular, "System.IntPtr"); }} + , {"uintptr", nullptr, [&] { return replace_base_type(regular, "System.IntPtr"); }} + , {"void_ptr", nullptr, [&] { return replace_base_type(regular, "System.IntPtr"); }} , {"void", nullptr, [&] { regular_type_def r = regular; r.namespaces.clear(); if (is_out) // @inout too - r.base_type = " System.IntPtr"; + r.base_type = "System.IntPtr"; else - r.base_type = " void"; + r.base_type = "void"; return r; }} , {"Eina.Error", nullptr, [&] // Eina.Error { - return regular_type_def{" Eina.Error", regular.base_qualifier, {}}; + return regular_type_def{"Eina.Error", regular.base_qualifier, {}}; }} // TODO , {"string", nullptr, [&] { regular_type_def r = regular; r.base_qualifier.qualifier ^= qualifier_info::is_ref; - return replace_base_type(r, " System.String"); + return replace_base_type(r, "System.String"); }} , {"mstring", nullptr, [&] { regular_type_def r = regular; r.base_qualifier.qualifier ^= qualifier_info::is_ref; - return replace_base_type(r, " System.String"); + return replace_base_type(r, "System.String"); }} , {"stringshare", nullptr, [&] { regular_type_def r = regular; r.base_qualifier.qualifier ^= qualifier_info::is_ref; - return replace_base_type(r, " System.String"); + return replace_base_type(r, "System.String"); }} , {"strbuf", nullptr, [&] { - return regular_type_def{" Eina.Strbuf", regular.base_qualifier, {}}; + return regular_type_def{"Eina.Strbuf", regular.base_qualifier, {}}; }} , {"any_value", true, [&] - { return regular_type_def{" Eina.Value", regular.base_qualifier, {}}; + { return regular_type_def{"Eina.Value", regular.base_qualifier, {}}; }} , {"any_value", false, [&] - { return regular_type_def{" Eina.Value", regular.base_qualifier, {}}; + { return regular_type_def{"Eina.Value", regular.base_qualifier, {}}; }} , {"any_value_ptr", nullptr, [&] - { return regular_type_def{" Eina.Value", regular.base_qualifier, {}}; + { return regular_type_def{"Eina.Value", regular.base_qualifier, {}}; }} // FIXME add proper support for any_value_ptr }; std::string full_type_name = name_helpers::type_full_eolian_name(regular); @@ -234,7 +255,7 @@ struct visitor_generate } , [&] (attributes::type_def::variant_type const& v) { - return v.visit(*this); // we want to keep is_out info + return v.visit(visitor_regular_type_def_printer{sink, context}); // we want to keep is_out info })) { return *b; diff --git a/src/bin/eolian_mono/eolian/mono/variable_definition.hh b/src/bin/eolian_mono/eolian/mono/variable_definition.hh index d143d7e138..f13efdecc2 100644 --- a/src/bin/eolian_mono/eolian/mono/variable_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/variable_definition.hh @@ -28,7 +28,7 @@ namespace eolian_mono { struct constant_definition_generator { template - bool generate(OutputIterator sink, attributes::variable_def constant, Context context) const + bool generate(OutputIterator sink, attributes::variable_def constant, Context const& context) const { // Open partial class if (!name_helpers::open_namespaces(sink, constant.namespaces, context)) diff --git a/src/bin/eolian_mono/eolian_mono.cc b/src/bin/eolian_mono/eolian_mono.cc index e3cbe5fcad..0699c774e7 100644 --- a/src/bin/eolian_mono/eolian_mono.cc +++ b/src/bin/eolian_mono/eolian_mono.cc @@ -140,15 +140,16 @@ run(options_type const& opts) throw std::runtime_error("Failed to generate file preamble"); } - auto lib_context = efl::eolian::grammar::context_add_tag(eolian_mono::library_context{opts.dllimport, - opts.v_major, - opts.v_minor, - opts.references_map}, - efl::eolian::grammar::context_null()); + using efl::eolian::grammar::context_add_tag; - auto options_context = efl::eolian::grammar::context_add_tag(eolian_mono::options_context{opts.want_beta}, lib_context); - - auto context = efl::eolian::grammar::context_add_tag(eolian_mono::eolian_state_context{opts.state}, options_context); + auto context = context_add_tag(eolian_mono::indentation_context{0}, + context_add_tag(eolian_mono::eolian_state_context{opts.state}, + context_add_tag(eolian_mono::options_context{opts.want_beta}, + context_add_tag(eolian_mono::library_context{opts.dllimport, + opts.v_major, + opts.v_minor, + opts.references_map}, + efl::eolian::grammar::context_null())))); EINA_ITERATOR_FOREACH(aliases, tp) { diff --git a/src/bindings/cxx/meson.build b/src/bindings/cxx/meson.build index 0a209b527d..8697473f09 100644 --- a/src/bindings/cxx/meson.build +++ b/src/bindings/cxx/meson.build @@ -30,7 +30,7 @@ foreach lib : cxx_sublibs '-DNEED_RUN_IN_TREE=1' ] - dir_package_include = join_paths(dir_include, package_version_name) + dir_package_include = package_version_name dir_package_modules = join_paths(dir_lib, package_name, 'modules') cxx_generator_target = [] cxx_header_src = [] diff --git a/src/bindings/mono/efl_mono/efl_all.cs b/src/bindings/mono/efl_mono/efl_all.cs index d8c08d3890..bf78df1d3d 100644 --- a/src/bindings/mono/efl_mono/efl_all.cs +++ b/src/bindings/mono/efl_mono/efl_all.cs @@ -36,22 +36,17 @@ static class UnsafeNativeMethods { } } -public enum Components { - Basic, - Ui -} - public static class All { private static bool InitializedUi = false; - public static void Init(Efl.Components components=Components.Basic) { + public static void Init(Efl.Csharp.Components components=Efl.Csharp.Components.Basic) { Eina.Config.Init(); Efl.Eo.Config.Init(); ecore_init(); evas_init(); eldbus.Config.Init(); - if (components == Components.Ui) { + if (components == Efl.Csharp.Components.Ui) { Efl.Ui.Config.Init(); InitializedUi = true; } diff --git a/src/bindings/mono/efl_mono/efl_csharp_application.cs b/src/bindings/mono/efl_mono/efl_csharp_application.cs index b487cf6289..3bac96170d 100644 --- a/src/bindings/mono/efl_mono/efl_csharp_application.cs +++ b/src/bindings/mono/efl_mono/efl_csharp_application.cs @@ -3,19 +3,13 @@ using System.Runtime.InteropServices; using System.Threading; using static Efl.UnsafeNativeMethods; -static class UnsafeNativeMethods { - [DllImport(efl.Libs.Ecore)] public static extern void ecore_init(); - [DllImport(efl.Libs.Ecore)] public static extern void ecore_shutdown(); - [DllImport(efl.Libs.Elementary)] public static extern int elm_init(int argc, IntPtr argv); - [DllImport(efl.Libs.Elementary)] public static extern void elm_policy_set(int policy, int policy_detail); - [DllImport(efl.Libs.Elementary)] public static extern void elm_shutdown(); - [DllImport(efl.Libs.Elementary)] public static extern void elm_exit(); -} - namespace Efl { namespace Csharp { + ///The components to be initialized. public enum Components { + ///Basic components: Eina, Eo, Ecore, Evas and DBus. Basic, + ///The same components of and the Elementary widget toolkit. Ui, } /// diff --git a/src/bindings/mono/eina_mono/eina_accessor.cs b/src/bindings/mono/eina_mono/eina_accessor.cs index c3c09c4966..3f2f71b2b3 100644 --- a/src/bindings/mono/eina_mono/eina_accessor.cs +++ b/src/bindings/mono/eina_mono/eina_accessor.cs @@ -27,6 +27,7 @@ public class Accessor : IEnumerable, IDisposable private Ownership Ownership { get; set; } // FIXME Part of the implicit EFL Container interface. Need to make it explicit. + ///Whether this wrapper owns the native accessor. public bool Own { get @@ -40,12 +41,18 @@ public class Accessor : IEnumerable, IDisposable } /// Create a new accessor wrapping the given pointer. + /// The native handle to be wrapped. + /// Whether this wrapper owns the native accessor. public Accessor(IntPtr handle, Ownership owner=Ownership.Managed) { Handle = handle; Ownership = owner; } + /// Create a new accessor wrapping the given pointer. + /// The native handle to be wrapped. + /// Whether this wrapper owns the native accessor. + /// For compatibility with other EFL# containers. Ignored in acessors. public Accessor(IntPtr handle, bool own, bool ownContent=false) : this(handle, own ? Ownership.Managed : Ownership.Unmanaged) { @@ -57,6 +64,9 @@ public class Accessor : IEnumerable, IDisposable Dispose(true); } + /// Disposes of this wrapper, releasing the native accessor if owned. + /// True if this was called from public method. False if + /// called from the C# finalizer. protected virtual void Dispose(bool disposing) { if (Ownership == Ownership.Managed && Handle != IntPtr.Zero) @@ -66,17 +76,23 @@ public class Accessor : IEnumerable, IDisposable } } + /// Finalizer to be called from the Garbage Collector. ~Accessor() { Dispose(false); } - public virtual T Convert(IntPtr data) + /// Convert the native data into managed. This is used when returning the data through a + /// . + /// The data to be converted + /// The managed data representing data. + protected virtual T Convert(IntPtr data) { return NativeToManaged(data); } /// Returns an enumerator that iterates throught this accessor. + /// An enumerator to walk through the acessor items. public IEnumerator GetEnumerator() { if (Handle == IntPtr.Zero) @@ -105,19 +121,38 @@ public class Accessor : IEnumerable, IDisposable } } +///Accessor for Inlists. public class AccessorInList : Accessor { + + /// Create a new accessor wrapping the given pointer. + /// The native handle to be wrapped. + /// Whether this wrapper owns the native accessor. public AccessorInList(IntPtr handle, Ownership own): base(handle, own) {} - public override T Convert(IntPtr data) + + /// Convert the native data into managed. This is used when returning the data through a + /// . + /// The data to be converted + /// The managed data representing data. + protected override T Convert(IntPtr data) { return NativeToManagedInlistNode(data); } } +///Accessor for Inarrays. public class AccessorInArray : Accessor { + /// Create a new accessor wrapping the given pointer. + /// The native handle to be wrapped. + /// Whether this wrapper owns the native accessor. public AccessorInArray(IntPtr handle, Ownership own): base(handle, own) {} - public override T Convert(IntPtr data) + + /// Convert the native data into managed. This is used when returning the data through a + /// . + /// The data to be converted + /// The managed data representing data. + protected override T Convert(IntPtr data) { return NativeToManagedInplace(data); } diff --git a/src/bindings/mono/eina_mono/eina_promises.cs b/src/bindings/mono/eina_mono/eina_promises.cs index 8be5f9d6cb..176a8835ae 100644 --- a/src/bindings/mono/eina_mono/eina_promises.cs +++ b/src/bindings/mono/eina_mono/eina_promises.cs @@ -129,6 +129,9 @@ public class Promise : IDisposable Dispose(false); } + /// Disposes of this wrapper, rejecting the native promise with + /// True if this was called from public method. False if + /// called from the C# finalizer. protected virtual void Dispose(bool disposing) { if (Handle != IntPtr.Zero) @@ -190,7 +193,7 @@ public class Future /// public delegate Eina.Value ResolvedCb(Eina.Value value); - public IntPtr Handle { get; internal set; } + internal IntPtr Handle; /// /// Creates a Future from a native pointer. @@ -317,14 +320,23 @@ public class Future } } +/// Custom marshaler to convert between managed and native . +/// Internal usage in generated code. public class FutureMarshaler : ICustomMarshaler { + ///Wrap the native future with a managed wrapper. + ///Handle to the native future. + ///An wrapping the native future. public object MarshalNativeToManaged(IntPtr pNativeData) { return new Future(pNativeData); } + ///Extracts the native future from a managed wrapper. + ///The managed wrapper. If it is not an , the value returned + ///is . + ///A pointing to the native future. public IntPtr MarshalManagedToNative(object managedObj) { Future f = managedObj as Future; @@ -333,20 +345,27 @@ public class FutureMarshaler : ICustomMarshaler return f.Handle; } + ///Not implemented. The code receiving the native data is in charge of releasing it. + ///The native pointer to be released. public void CleanUpNativeData(IntPtr pNativeData) { } + ///Not implemented. The runtime takes care of releasing it. + ///The managed object to be cleaned. public void CleanUpManagedData(object managedObj) { } + ///Size of the native data size returned + ///The size of the data. public int GetNativeDataSize() { return -1; } + ///Gets an instance of this marshaller. + ///A name that could be used to customize the returned marshaller. Currently not used. + ///The instance that will marshall the data. public static ICustomMarshaler GetInstance(string cookie) { if (marshaler == null) - { marshaler = new FutureMarshaler(); - } return marshaler; } diff --git a/src/bindings/mono/eo_mono/FunctionWrapper.cs b/src/bindings/mono/eo_mono/FunctionWrapper.cs index 03e81383bb..5aa4030a2f 100644 --- a/src/bindings/mono/eo_mono/FunctionWrapper.cs +++ b/src/bindings/mono/eo_mono/FunctionWrapper.cs @@ -3,8 +3,17 @@ using System.Runtime.InteropServices; namespace Efl { namespace Eo { +///Class to load functions pointers from a native module. +/// +///This class has a platform-dependent implementation on whether it +///is compiled for Windows (using LoadLibrary/GetProcAddress) or Unix +///(dlopen/dlsym). public partial class FunctionInterop { + ///Loads a function pointer from the given module. + ///The name of the module containing the function. + ///The name of the function to search for. + ///A function pointer that can be used with delegates. public static IntPtr LoadFunctionPointer(string moduleName, string functionName) { NativeModule module = new NativeModule(moduleName); @@ -13,6 +22,10 @@ public partial class FunctionInterop Eina.Log.Debug($"searching {module.Module} for{functionName}, result {s}"); return s; } + + ///Loads a function pointer from the default module. + ///The name of the function to search for. + ///A function pointer that can be used with delegates. public static IntPtr LoadFunctionPointer(string functionName) { Eina.Log.Debug($"searching {null} for {functionName}"); @@ -21,8 +34,14 @@ public partial class FunctionInterop return s; } } - -public class FunctionWrapper + +///Wraps a native function in a portable manner. +/// +///This is intended as a workaround DllImport limitations when switching between mono and dotnet. +/// +///The parameter T must be a delegate. +/// +public class FunctionWrapper // NOTE: When supporting C# >=7.3, add a where T: System.Delegate? { private Lazy> loadResult; #pragma warning disable 0414 @@ -42,12 +61,18 @@ public class FunctionWrapper return new FunctionLoadResult(Marshal.GetDelegateForFunctionPointer(funcptr)); } } - + + ///Creates a wrapper for the given function of the given module. + ///The name of the module containing the function. + ///The name of the function to search for. public FunctionWrapper(string moduleName, string functionName) : this (new NativeModule(moduleName), functionName) { } - + + ///Creates a wrapper for the given function of the given module. + ///The module wrapper containing the function. + ///The name of the function to search for. public FunctionWrapper(NativeModule module, string functionName) { this.module = module; @@ -58,6 +83,8 @@ public class FunctionWrapper }); } + ///Retrieves the result of function load. + ///The load result. public FunctionLoadResult Value { get @@ -67,12 +94,26 @@ public class FunctionWrapper } } -public enum FunctionLoadResultKind { Success, LibraryNotFound, FunctionNotFound } - +///The outcome of the function load process. +public enum FunctionLoadResultKind { + ///Function was loaded successfully. + Success, + ///Library was not found. + LibraryNotFound, + ///Function symbol was not found in the given module. + FunctionNotFound +} + +///Represents the result of loading a function pointer. public class FunctionLoadResult { + ///The status of the load. public FunctionLoadResultKind Kind; - public T _Delegate; + private T _Delegate; + + ///The delegate wrapping the loaded function pointer. + /// + ///Throws InvalidOperationException if trying to access while not loaded. public T Delegate { get { @@ -82,10 +123,15 @@ public class FunctionLoadResult } } + ///Creates a new load result of the given kind. + ///The outcome of the load process. public FunctionLoadResult(FunctionLoadResultKind kind) { this.Kind = kind; } + + ///Creates a new load result with the given delegate. + ///The delegate wrapping the native function. public FunctionLoadResult(T Delegate) { this._Delegate = Delegate; @@ -93,5 +139,4 @@ public class FunctionLoadResult } } - } } diff --git a/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs b/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs index 76ee4892ef..845f8239e0 100644 --- a/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs +++ b/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs @@ -6,8 +6,12 @@ namespace Efl { namespace Eo { public partial class FunctionInterop { [DllImport(efl.Libs.Libdl)] - public static extern IntPtr dlsym(IntPtr handle, string symbol); - + private static extern IntPtr dlsym(IntPtr handle, string symbol); + + ///Loads a function pointer from the given module. + ///The module containing the function. + ///The name of the function to search for. + ///A function pointer that can be used with delegates. public static IntPtr LoadFunctionPointer(IntPtr nativeLibraryHandle, string functionName) { Eina.Log.Debug("searching {nativeLibraryHandle} for {functionName}"); @@ -17,5 +21,4 @@ public partial class FunctionInterop } } - } } diff --git a/src/bindings/mono/eo_mono/NativeModule.cs b/src/bindings/mono/eo_mono/NativeModule.cs index 324a933b65..400f24fb87 100644 --- a/src/bindings/mono/eo_mono/NativeModule.cs +++ b/src/bindings/mono/eo_mono/NativeModule.cs @@ -2,10 +2,13 @@ using System; namespace Efl { namespace Eo { +///Wraps a native module that was opened with dlopen/LoadLibrary. public partial class NativeModule : IDisposable { private Lazy module; + ///Lazily tries to load the module with the given name. + ///The name of the module to load. public NativeModule(string libName) { module = new Lazy @@ -15,6 +18,7 @@ public partial class NativeModule : IDisposable }); } + ///The module that was loaded. public IntPtr Module { get @@ -23,6 +27,7 @@ public partial class NativeModule : IDisposable } } + ///Unload and released the handle to the wrapped module. public void Dispose() { UnloadLibrary(module.Value); diff --git a/src/bindings/mono/eo_mono/NativeModule_Unix.cs b/src/bindings/mono/eo_mono/NativeModule_Unix.cs index 6f6939546c..8783895b14 100644 --- a/src/bindings/mono/eo_mono/NativeModule_Unix.cs +++ b/src/bindings/mono/eo_mono/NativeModule_Unix.cs @@ -5,21 +5,45 @@ namespace Efl { namespace Eo { public partial class NativeModule { - public const int RTLD_NOW = 0x002; + private const int RTLD_NOW = 0x002; // Currently we are using GLOBAL due to issues // with the way evas modules are built. - public const int RTLD_GLOBAL = 0x100; + private const int RTLD_GLOBAL = 0x100; [DllImport(efl.Libs.Libdl)] - public static extern IntPtr dlopen(string fileName, int flag); + private static extern IntPtr dlopen(string fileName, int flag); [DllImport(efl.Libs.Libdl)] - public static extern int dlclose(IntPtr handle); + private static extern int dlclose(IntPtr handle); + ///Closes the library handle. + ///The handle to the library. public static void UnloadLibrary(IntPtr handle) { dlclose(handle); } + ///Loads the given library. + /// + ///It attempts to load using the following list of names based on the filename + ///parameter: + /// + /// + /// + ///filename + /// + /// + ///libfilename + /// + /// + ///filename.so + /// + /// + ///libfilename.so + /// + /// + /// + ///The name to search for. + ///The loaded library handle or on failure. public static IntPtr LoadLibrary(string filename) { Eina.Log.Debug($"Loading library {filename}"); diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs index 744421503b..3120dbbbf7 100644 --- a/src/bindings/mono/eo_mono/iwrapper.cs +++ b/src/bindings/mono/eo_mono/iwrapper.cs @@ -12,6 +12,21 @@ using EoG = Efl.Eo.Globals; namespace Efl { namespace Eo { public class Globals { + + /// Represents the type of the native Efl_Class. + public enum EflClassType { + /// Regular EFL classes. + Regular = 0, + /// Non-instantiable efl classes (i.e. Abstracts). + RegularNoInstant, + /// Interface types. + Interface, + /// Mixins types. + Mixin, + /// Invalid class type. + Invalid + } + [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_object_init_delegate(); public static FunctionWrapper efl_object_init_ptr = @@ -155,6 +170,7 @@ public class Globals { [DllImport(efl.Libs.Eo)] public static extern IntPtr efl_super(IntPtr obj, IntPtr klass); public delegate IntPtr efl_class_get_delegate(IntPtr obj); [DllImport(efl.Libs.Eo)] public static extern IntPtr efl_class_get(IntPtr obj); + [DllImport(efl.Libs.Eo)] public static extern EflClassType efl_class_type_get(IntPtr klass); public delegate IntPtr dlerror_delegate(); [DllImport(efl.Libs.Evil)] public static extern IntPtr dlerror(); @@ -180,10 +196,6 @@ public class Globals { IntPtr desc, Efl.EventCb cb, System.IntPtr data); - public delegate IntPtr - efl_object_legacy_only_event_description_get_delegate([MarshalAs(UnmanagedType.LPStr)] String name); - [DllImport(efl.Libs.Eo)] public static extern IntPtr - efl_object_legacy_only_event_description_get([MarshalAs(UnmanagedType.LPStr)] String name); public const int RTLD_NOW = 2; @@ -546,6 +558,15 @@ public static class ClassRegister string name = Eina.StringConversion.NativeUtf8ToManagedString(namePtr) .Replace("_", ""); // Convert Efl C name to C# name + var klass_type = Efl.Eo.Globals.efl_class_type_get(klass); + + // When converting to managed, interfaces and mixins gets the 'I' prefix. + if (klass_type == Efl.Eo.Globals.EflClassType.Interface || klass_type == Efl.Eo.Globals.EflClassType.Mixin) + { + var pos = name.LastIndexOf("."); + name = name.Insert(pos + 1, "I"); // -1 if not found, inserts at 0 normally + } + var curr_asm = typeof(IWrapper).Assembly; t = curr_asm.GetType(name); if (t == null) @@ -613,19 +634,34 @@ public static class ClassRegister { for (System.Type t = objectType.BaseType; t != null; t = t.BaseType) { - var method = t.GetMethod("GetEflClassStatic", - System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic); - if (method != null) - return (IntPtr) method.Invoke(null, null); + var ptr = GetNativeKlassPtr(t); + if (ptr != IntPtr.Zero) + return ptr; } throw new System.InvalidOperationException($"Class '{objectType.FullName}' is not an Efl object"); } private static IntPtr GetNativeKlassPtr(System.Type objectType) { + if (objectType == null) + return IntPtr.Zero; + + if (objectType.IsInterface) + { + // Try to get the *Concrete class + var assembly = objectType.Assembly; + objectType = assembly.GetType(objectType.FullName + "Concrete"); + + if (objectType == null) + return IntPtr.Zero; + } + var method = objectType.GetMethod("GetEflClassStatic", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic); - return (IntPtr) method?.Invoke(null, null); + + if (method == null) + return IntPtr.Zero; + return (IntPtr) (method.Invoke(null, null)); } public static void AddToKlassTypeBiDictionary(IntPtr klassPtr, System.Type objectType) diff --git a/src/bindings/mono/eo_mono/workaround.cs b/src/bindings/mono/eo_mono/workaround.cs index 4d576771f8..b1f9d9fea7 100644 --- a/src/bindings/mono/eo_mono/workaround.cs +++ b/src/bindings/mono/eo_mono/workaround.cs @@ -104,7 +104,7 @@ public struct EventDescription { } }; -public delegate void EventCb(System.IntPtr data, ref Event_StructInternal evt); +public delegate void EventCb(System.IntPtr data, ref Event.NativeStruct evt); [StructLayout(LayoutKind.Sequential)] public struct TextCursorCursor { diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build index 13fe4caada..67c77a647d 100644 --- a/src/bindings/mono/meson.build +++ b/src/bindings/mono/meson.build @@ -62,7 +62,6 @@ blacklisted_files = [ 'efl_vg_root_node.eo', 'efl_vg_shape.eo.cs', 'efl_io_buffer.eo', - 'efl_io_positioner.eo', 'efl_io_queue.eo', 'efl_io_sizer.eo', 'efl_io_closer_fd.eo', @@ -156,13 +155,20 @@ if get_option('mono-beta') extra_cs_args += '-d:EFL_BETA' endif +efl_mono_install_dir = join_paths(dir_lib, 'efl-mono-'+version_major) +efl_mono_xml_doc = join_paths(meson.current_build_dir(), 'efl_mono.xml') + efl_mono = library('efl_mono', mono_generator_target + mono_files + [efl_src], install : true, - install_dir : join_paths(dir_lib, 'efl-mono-'+version_major), - cs_args : extra_cs_args + install_dir : efl_mono_install_dir, + cs_args : extra_cs_args + ['-doc:' + efl_mono_xml_doc] ) +meson.add_install_script(join_paths(meson.source_root(), 'meson', 'meson_csharp_docs.sh'), + efl_mono_xml_doc, + efl_mono_install_dir) + efl_mono_test_suite_path=join_paths(meson.current_build_dir()) pkgconfig.generate( diff --git a/src/examples/ecore/ecore_evas_vnc_example.c b/src/examples/ecore/ecore_evas_vnc_example.c index c3d1ac7cfd..2796771a9c 100644 --- a/src/examples/ecore/ecore_evas_vnc_example.c +++ b/src/examples/ecore/ecore_evas_vnc_example.c @@ -1,4 +1,3 @@ -#define EFL_EO_API_SUPPORT #define EFL_BETA_API_SUPPORT #include diff --git a/src/examples/ecore/ecore_evas_wayland_multiseat_example.c b/src/examples/ecore/ecore_evas_wayland_multiseat_example.c index 3aec0fa524..dc1d537478 100644 --- a/src/examples/ecore/ecore_evas_wayland_multiseat_example.c +++ b/src/examples/ecore/ecore_evas_wayland_multiseat_example.c @@ -1,4 +1,3 @@ -#define EFL_EO_API_SUPPORT #define EFL_BETA_API_SUPPORT #include diff --git a/src/examples/ecore/efl_exe.c b/src/examples/ecore/efl_exe.c index e50d49588c..f435bcadd2 100644 --- a/src/examples/ecore/efl_exe.c +++ b/src/examples/ecore/efl_exe.c @@ -1,5 +1,4 @@ #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #include #include diff --git a/src/examples/ecore/efl_net_ip_address_example.c b/src/examples/ecore/efl_net_ip_address_example.c index 0097c2ac72..b2bc9c6675 100644 --- a/src/examples/ecore/efl_net_ip_address_example.c +++ b/src/examples/ecore/efl_net_ip_address_example.c @@ -1,5 +1,4 @@ #define EFL_BETA_API_SUPPORT 1 -#define EFL_EO_API_SUPPORT 1 #ifdef HAVE_CONFIG_H # include "config.h" #endif diff --git a/src/examples/ecore/efl_thread.c b/src/examples/ecore/efl_thread.c index a0b1a3a4eb..0298be15d0 100644 --- a/src/examples/ecore/efl_thread.c +++ b/src/examples/ecore/efl_thread.c @@ -1,5 +1,4 @@ #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #include #include diff --git a/src/examples/edje/edje-swallow2.c b/src/examples/edje/edje-swallow2.c index fe3f95632d..c393ad811c 100644 --- a/src/examples/edje/edje-swallow2.c +++ b/src/examples/edje/edje-swallow2.c @@ -19,6 +19,11 @@ #define PACKAGE_DATA_DIR "." #endif +#ifndef PACKAGE_SOURCE_DATA_DIR +#define PACKAGE_SOURCE_DATA_DIR "." +#endif + + #include #include #include @@ -36,7 +41,7 @@ int main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED) { const char *edje_file = PACKAGE_DATA_DIR"/swallow.edj"; - const char *img_file = PACKAGE_DATA_DIR"/bubble.png"; + const char *img_file = PACKAGE_SOURCE_DATA_DIR"/bubble.png"; Ecore_Evas *ee; Evas *evas; Evas_Object *bg; diff --git a/src/examples/edje/meson.build b/src/examples/edje/meson.build index d73c83a199..bad8f7c085 100644 --- a/src/examples/edje/meson.build +++ b/src/examples/edje/meson.build @@ -42,7 +42,8 @@ edc_files = [ 'table.edc', 'text.edc', 'textblock-hyphen.edc', - 'toggle_using_filter.edc' + 'toggle_using_filter.edc', + 'multisense.edc', ] if (get_option('physics')) @@ -130,6 +131,7 @@ foreach edje_example : edje_examples executable(edje_example, [edje_example + '.c'] + themes, dependencies: [edje, ecore_evas], - c_args: ['-DPACKAGE_DATA_DIR="'+ meson.current_build_dir()+'"',] + c_args: ['-DPACKAGE_DATA_DIR="'+ meson.current_build_dir()+'"', + '-DPACKAGE_SOURCE_DATA_DIR="'+ meson.current_source_dir()+'"',] ) endforeach diff --git a/src/examples/elementary/bg_cxx_example_01.cc b/src/examples/elementary/bg_cxx_example_01.cc index 5919d18531..1b3ae91736 100644 --- a/src/examples/elementary/bg_cxx_example_01.cc +++ b/src/examples/elementary/bg_cxx_example_01.cc @@ -11,7 +11,7 @@ elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED) win.text_set("Window Background"); win.autohide_set(true); win.size_set({320,320}); - win.background().color_set(139, 69, 19, 255); + //win.background().color_set(139, 69, 19, 255); // Clean exit elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); diff --git a/src/examples/elementary/efl_canvas_layout_text.c b/src/examples/elementary/efl_canvas_layout_text.c index da0e089c01..bb4fa7b97c 100644 --- a/src/examples/elementary/efl_canvas_layout_text.c +++ b/src/examples/elementary/efl_canvas_layout_text.c @@ -6,7 +6,6 @@ # include "elementary_config.h" #else # define EFL_BETA_API_SUPPORT 1 -# define EFL_EO_API_SUPPORT 1 #endif #include diff --git a/src/examples/elementary/efl_ui_grid_example_1.c b/src/examples/elementary/efl_ui_grid_example_1.c index 92379fe6e4..6fe455c904 100644 --- a/src/examples/elementary/efl_ui_grid_example_1.c +++ b/src/examples/elementary/efl_ui_grid_example_1.c @@ -4,7 +4,6 @@ #include "elementary_config.h" #else #define EFL_BETA_API_SUPPORT 1 -#define EFL_EO_API_SUPPORT 1 #endif #include diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c index cad8e112ad..29475f98bf 100644 --- a/src/examples/elementary/efl_ui_list_example_1.c +++ b/src/examples/elementary/efl_ui_list_example_1.c @@ -5,7 +5,6 @@ # include "elementary_config.h" #else # define EFL_BETA_API_SUPPORT 1 -# define EFL_EO_API_SUPPORT 1 #endif #include @@ -126,8 +125,8 @@ elm_main(int argc EINA_UNUSED, char **argv) priv_d.list = list = efl_add(EFL_UI_LIST_CLASS, wbox); efl_gfx_hint_weight_set(list, EFL_GFX_HINT_EXPAND, 0.9); - efl_event_callback_add(list, EFL_UI_EVENT_SELECTABLE_SELECTED, _list_selected, NULL); - efl_event_callback_add(list, EFL_UI_EVENT_SELECTABLE_UNSELECTED, _list_unselected, NULL); + efl_event_callback_add(list, EFL_UI_EVENT_ITEM_SELECTED, _list_selected, NULL); + efl_event_callback_add(list, EFL_UI_EVENT_ITEM_UNSELECTED, _list_unselected, NULL); efl_event_callback_add(list, EFL_UI_EVENT_PRESSED, _list_pressed, NULL); efl_event_callback_add(list, EFL_UI_EVENT_UNPRESSED, _list_unpressed, NULL); efl_event_callback_add(list, EFL_UI_EVENT_LONGPRESSED, _list_longpressed, NULL); diff --git a/src/examples/elementary/efl_ui_list_view_example_1.c b/src/examples/elementary/efl_ui_list_view_example_1.c index 3943a7793b..04ae147f2a 100644 --- a/src/examples/elementary/efl_ui_list_view_example_1.c +++ b/src/examples/elementary/efl_ui_list_view_example_1.c @@ -4,7 +4,6 @@ # include "elementary_config.h" #else # define EFL_BETA_API_SUPPORT 1 -# define EFL_EO_API_SUPPORT 1 #endif #include diff --git a/src/examples/elementary/efl_ui_list_view_example_2.c b/src/examples/elementary/efl_ui_list_view_example_2.c index 8e47d9222a..a843f6ed9c 100644 --- a/src/examples/elementary/efl_ui_list_view_example_2.c +++ b/src/examples/elementary/efl_ui_list_view_example_2.c @@ -4,7 +4,6 @@ # include "config.h" #else # define EFL_BETA_API_SUPPORT 1 -# define EFL_EO_API_SUPPORT 1 #endif #include diff --git a/src/examples/elementary/efl_ui_list_view_example_3.c b/src/examples/elementary/efl_ui_list_view_example_3.c index 9cc4c8efde..c027856df7 100644 --- a/src/examples/elementary/efl_ui_list_view_example_3.c +++ b/src/examples/elementary/efl_ui_list_view_example_3.c @@ -4,7 +4,6 @@ # include "config.h" #else # define EFL_BETA_API_SUPPORT 1 -# define EFL_EO_API_SUPPORT 1 #endif #define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED diff --git a/src/examples/elementary/efl_ui_relative_layout_example_01.c b/src/examples/elementary/efl_ui_relative_layout_example_01.c index 7ccec35651..e2d2af7948 100644 --- a/src/examples/elementary/efl_ui_relative_layout_example_01.c +++ b/src/examples/elementary/efl_ui_relative_layout_example_01.c @@ -4,7 +4,6 @@ #include "elementary_config.h" #else #define EFL_BETA_API_SUPPORT 1 -#define EFL_EO_API_SUPPORT 1 #endif #include diff --git a/src/examples/elementary/efl_ui_relative_layout_example_02.c b/src/examples/elementary/efl_ui_relative_layout_example_02.c index 14af786cd6..fe254633bb 100644 --- a/src/examples/elementary/efl_ui_relative_layout_example_02.c +++ b/src/examples/elementary/efl_ui_relative_layout_example_02.c @@ -4,7 +4,6 @@ #include "elementary_config.h" #else #define EFL_BETA_API_SUPPORT 1 -#define EFL_EO_API_SUPPORT 1 #endif #include diff --git a/src/examples/elementary/efl_ui_scroller_example.c b/src/examples/elementary/efl_ui_scroller_example.c index e76254d8aa..90e6f55941 100644 --- a/src/examples/elementary/efl_ui_scroller_example.c +++ b/src/examples/elementary/efl_ui_scroller_example.c @@ -2,7 +2,6 @@ //gcc -g efl_ui_scroller_example.c -o efl_ui_scroller_example `pkg-config --cflags --libs elementary` #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #include #include diff --git a/src/examples/elementary/efl_ui_theme_example_01.c b/src/examples/elementary/efl_ui_theme_example_01.c index 29614c8f3b..15e1017e50 100644 --- a/src/examples/elementary/efl_ui_theme_example_01.c +++ b/src/examples/elementary/efl_ui_theme_example_01.c @@ -3,7 +3,6 @@ * gcc -o efl_ui_theme_example_01 efl_ui_theme_example_01.c `pkg-config --cflags --libs elementary` */ #define EFL_BETA_API_SUPPORT 1 -#define EFL_EO_API_SUPPORT 1 #define EFL_UI_WIDGET_PROTECTED #include diff --git a/src/examples/elementary/efl_ui_theme_example_02.c b/src/examples/elementary/efl_ui_theme_example_02.c index b78dc73f0b..0d0390b82c 100644 --- a/src/examples/elementary/efl_ui_theme_example_02.c +++ b/src/examples/elementary/efl_ui_theme_example_02.c @@ -3,7 +3,6 @@ * gcc -o efl_ui_theme_example_02 efl_ui_theme_example_02.c `pkg-config --cflags --libs elementary` */ #define EFL_BETA_API_SUPPORT 1 -#define EFL_EO_API_SUPPORT 1 #define EFL_UI_WIDGET_PROTECTED #include diff --git a/src/examples/elementary/evas3d_map_example.c b/src/examples/elementary/evas3d_map_example.c index 6ce53290e3..f0859e30ac 100644 --- a/src/examples/elementary/evas3d_map_example.c +++ b/src/examples/elementary/evas3d_map_example.c @@ -1,6 +1,3 @@ -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif #ifndef EFL_BETA_API_SUPPORT # define EFL_BETA_API_SUPPORT #endif diff --git a/src/examples/elementary/evas3d_object_on_button_example.c b/src/examples/elementary/evas3d_object_on_button_example.c index 8b6724aacd..fe458eb454 100644 --- a/src/examples/elementary/evas3d_object_on_button_example.c +++ b/src/examples/elementary/evas3d_object_on_button_example.c @@ -8,9 +8,6 @@ #ifndef EFL_BETA_API_SUPPORT # define EFL_BETA_API_SUPPORT #endif -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif #include #include diff --git a/src/examples/elementary/evas3d_scene_on_button_example.c b/src/examples/elementary/evas3d_scene_on_button_example.c index 05817990ad..267e45b7e9 100644 --- a/src/examples/elementary/evas3d_scene_on_button_example.c +++ b/src/examples/elementary/evas3d_scene_on_button_example.c @@ -5,9 +5,6 @@ * Compile with: * gcc -o evas3d_scene_on_button_example evas3d_scene_on_button_example.c -g `pkg-config --libs --cflags evas ecore eo elementary` */ -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif #ifndef EFL_BETA_API_SUPPORT # define EFL_BETA_API_SUPPORT #endif diff --git a/src/examples/elementary/filemvc.c b/src/examples/elementary/filemvc.c index 2aa0a54e85..dfe73c8b2b 100644 --- a/src/examples/elementary/filemvc.c +++ b/src/examples/elementary/filemvc.c @@ -4,7 +4,6 @@ # include "config.h" #else # define EFL_BETA_API_SUPPORT 1 -# define EFL_EO_API_SUPPORT 1 #endif #include diff --git a/src/examples/elementary/fileviewlist.c b/src/examples/elementary/fileviewlist.c index 4f7ff608c5..ffbaca57b5 100644 --- a/src/examples/elementary/fileviewlist.c +++ b/src/examples/elementary/fileviewlist.c @@ -5,7 +5,6 @@ # include "config.h" #else # define EFL_BETA_API_SUPPORT 1 -# define EFL_EO_API_SUPPORT 1 #endif #include diff --git a/src/examples/elementary/index_example_02.c b/src/examples/elementary/index_example_02.c index 820f095e29..84cd1498f9 100644 --- a/src/examples/elementary/index_example_02.c +++ b/src/examples/elementary/index_example_02.c @@ -87,7 +87,7 @@ elm_main(int argc EINA_UNUSED, Elm_Object_Item *gg_it; unsigned int i; - Elm_Gengrid_Item_Class gic; + Elm_Gengrid_Item_Class gic = { 0 }; elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); elm_app_info_set(elm_main, "elementary", "images"); diff --git a/src/examples/elementary/inwin_example.c b/src/examples/elementary/inwin_example.c index 76dbffa2ee..2a893921d5 100644 --- a/src/examples/elementary/inwin_example.c +++ b/src/examples/elementary/inwin_example.c @@ -134,7 +134,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) evas_object_smart_callback_add(o, "clicked", _btn_click_cb, NULL); - if (!strncmp(elm_config_preferred_engine_get(), "shot", 4)) + if (eina_streq(getenv("ELM_ENGINE"), "shot")) ecore_timer_add(0.1, _screenshot_hack_cb, o); evas_object_resize(win, 400, 400); diff --git a/src/examples/elementary/layout_property_bind.c b/src/examples/elementary/layout_property_bind.c index 3277288c16..2b911018ef 100644 --- a/src/examples/elementary/layout_property_bind.c +++ b/src/examples/elementary/layout_property_bind.c @@ -4,7 +4,6 @@ # include "config.h" #else # define EFL_BETA_API_SUPPORT 1 -# define EFL_EO_API_SUPPORT 1 #endif #include diff --git a/src/examples/elementary/location_example_01.c b/src/examples/elementary/location_example_01.c index b98371de36..7b8ad6f897 100644 --- a/src/examples/elementary/location_example_01.c +++ b/src/examples/elementary/location_example_01.c @@ -1,8 +1,5 @@ //Compile with: //gcc -o location_example_01 location_example_01.c -g `pkg-config --cflags --libs elementary elocation` -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif #ifndef EFL_BETA_API_SUPPORT # define EFL_BETA_API_SUPPORT #endif diff --git a/src/examples/elementary/meson.build b/src/examples/elementary/meson.build index f431c43511..a0309838b0 100644 --- a/src/examples/elementary/meson.build +++ b/src/examples/elementary/meson.build @@ -148,7 +148,7 @@ endforeach codegen = custom_target('elementary_codegen_examples', - depends : themes, + depends : [themes, elementary_codegen], input : themes[0], output : ['codegen_example_generated.c', 'codegen_example_generated.h'], command : elementary_codegen_exe + ['-p=codegen_example', '@INPUT@', 'elm/example/mylayout/default', '@OUTPUT0@', '@OUTPUT1@'], diff --git a/src/examples/elementary/performance/graphical.c b/src/examples/elementary/performance/graphical.c index 3c7caa20fc..c3a87683b7 100644 --- a/src/examples/elementary/performance/graphical.c +++ b/src/examples/elementary/performance/graphical.c @@ -1,6 +1,3 @@ -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif #ifndef EFL_BETA_API_SUPPORT # define EFL_BETA_API_SUPPORT #endif diff --git a/src/examples/elementary/performance/performance.c b/src/examples/elementary/performance/performance.c index cced019c4a..7508a93de1 100644 --- a/src/examples/elementary/performance/performance.c +++ b/src/examples/elementary/performance/performance.c @@ -30,9 +30,6 @@ #include #include -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif #ifndef EFL_BETA_API_SUPPORT # define EFL_BETA_API_SUPPORT #endif @@ -47,7 +44,6 @@ #include "graphical_struct.h" -#define CONVERT 20 #define WIDTH 1000 #define HEIGHT 600 @@ -56,13 +52,6 @@ Graphical globalGraphical; /*Variable for fps*/ int fps_frames = 0; -void _clear_buf(char *buf) -{ - int i; - for (i = 0; i < CONVERT; i++) - buf[i] = '\0'; -} - Eina_Slstr * _value_int_to_char(int value, const char *description) { if (description) diff --git a/src/examples/elementary/performance/tools_private.h b/src/examples/elementary/performance/tools_private.h index 20aa80d073..40d6f12afc 100644 --- a/src/examples/elementary/performance/tools_private.h +++ b/src/examples/elementary/performance/tools_private.h @@ -1,6 +1,3 @@ -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif #ifndef EFL_BETA_API_SUPPORT # define EFL_BETA_API_SUPPORT #endif diff --git a/src/examples/elementary/sphere_hunter/evas_3d_sphere_hunter.c b/src/examples/elementary/sphere_hunter/evas_3d_sphere_hunter.c index 7b789740e3..5120154715 100644 --- a/src/examples/elementary/sphere_hunter/evas_3d_sphere_hunter.c +++ b/src/examples/elementary/sphere_hunter/evas_3d_sphere_hunter.c @@ -14,9 +14,6 @@ * edje_cc sphere_hunter.edc * gcc -o evas_3d_sphere_hunter evas_3d_sphere_hunter.c -g `pkg-config --libs --cflags evas ecore elementary eina eo` -lm */ -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif #ifndef EFL_BETA_API_SUPPORT # define EFL_BETA_API_SUPPORT #endif diff --git a/src/examples/emotion/emotion_basic_example.c b/src/examples/emotion/emotion_basic_example.c index 8f470041a7..04df0e802c 100644 --- a/src/examples/emotion/emotion_basic_example.c +++ b/src/examples/emotion/emotion_basic_example.c @@ -1,9 +1,6 @@ //Compile with: // gcc -o emotion_basic_example emotion_basic_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eo` -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif #ifndef EFL_BETA_API_SUPPORT # define EFL_BETA_API_SUPPORT #endif diff --git a/src/examples/emotion/emotion_border_example.c b/src/examples/emotion/emotion_border_example.c index 7a24b8dae5..8ece2d298a 100644 --- a/src/examples/emotion/emotion_border_example.c +++ b/src/examples/emotion/emotion_border_example.c @@ -1,8 +1,5 @@ //Compile with: // gcc -o emotion_border_example emotion_border_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eina eo` -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif #ifndef EFL_BETA_API_SUPPORT # define EFL_BETA_API_SUPPORT #endif diff --git a/src/examples/emotion/emotion_generic_example.c b/src/examples/emotion/emotion_generic_example.c index 0bd722a0cd..4ac996f33a 100644 --- a/src/examples/emotion/emotion_generic_example.c +++ b/src/examples/emotion/emotion_generic_example.c @@ -1,8 +1,5 @@ //Compile with: // gcc -o emotion_generic_example emotion_generic_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eina eo` -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif #ifndef EFL_BETA_API_SUPPORT # define EFL_BETA_API_SUPPORT #endif diff --git a/src/examples/emotion/emotion_generic_subtitle_example.c b/src/examples/emotion/emotion_generic_subtitle_example.c index 07c8973641..40543f44b2 100644 --- a/src/examples/emotion/emotion_generic_subtitle_example.c +++ b/src/examples/emotion/emotion_generic_subtitle_example.c @@ -1,9 +1,6 @@ //Compile with: // gcc -o emotion_generic_subtitle_example emotion_generic_subtitle_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eo` -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif #ifndef EFL_BETA_API_SUPPORT # define EFL_BETA_API_SUPPORT #endif diff --git a/src/examples/emotion/emotion_signals_example.c b/src/examples/emotion/emotion_signals_example.c index b5dc6257c7..dbc7a5b969 100644 --- a/src/examples/emotion/emotion_signals_example.c +++ b/src/examples/emotion/emotion_signals_example.c @@ -1,9 +1,6 @@ //Compile with: // gcc -o emotion_signals_example emotion_signals_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eo` -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif #ifndef EFL_BETA_API_SUPPORT # define EFL_BETA_API_SUPPORT #endif diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c index fdb8a45278..99e3b98cce 100644 --- a/src/examples/evas/evas-3d-aabb.c +++ b/src/examples/evas/evas-3d-aabb.c @@ -14,7 +14,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-blending.c b/src/examples/evas/evas-3d-blending.c index 667b671197..47271ff460 100644 --- a/src/examples/evas/evas-3d-blending.c +++ b/src/examples/evas/evas-3d-blending.c @@ -14,7 +14,6 @@ #include "config.h" #else #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-colorpick.c b/src/examples/evas/evas-3d-colorpick.c index 7b894cd23e..138ceb089a 100644 --- a/src/examples/evas/evas-3d-colorpick.c +++ b/src/examples/evas/evas-3d-colorpick.c @@ -19,7 +19,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-cube-rotate.c b/src/examples/evas/evas-3d-cube-rotate.c index 25889024d1..d5b89b3037 100644 --- a/src/examples/evas/evas-3d-cube-rotate.c +++ b/src/examples/evas/evas-3d-cube-rotate.c @@ -16,7 +16,6 @@ #include "config.h" #else #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-cube.c b/src/examples/evas/evas-3d-cube.c index e8d04d4ea9..3fba86a147 100644 --- a/src/examples/evas/evas-3d-cube.c +++ b/src/examples/evas/evas-3d-cube.c @@ -12,7 +12,6 @@ #include "config.h" #else #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-cube2.c b/src/examples/evas/evas-3d-cube2.c index b2d905e873..493cea98ce 100644 --- a/src/examples/evas/evas-3d-cube2.c +++ b/src/examples/evas/evas-3d-cube2.c @@ -11,7 +11,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-eet.c b/src/examples/evas/evas-3d-eet.c index becd0bcadc..5ecd79e350 100644 --- a/src/examples/evas/evas-3d-eet.c +++ b/src/examples/evas/evas-3d-eet.c @@ -18,7 +18,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-fog.c b/src/examples/evas/evas-3d-fog.c index 4c69dcac94..8bcd51b94e 100644 --- a/src/examples/evas/evas-3d-fog.c +++ b/src/examples/evas/evas-3d-fog.c @@ -10,7 +10,6 @@ #include "config.h" #else #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-frustum.c b/src/examples/evas/evas-3d-frustum.c index 6e765bd399..6aacecc825 100644 --- a/src/examples/evas/evas-3d-frustum.c +++ b/src/examples/evas/evas-3d-frustum.c @@ -20,7 +20,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-hull.c b/src/examples/evas/evas-3d-hull.c index e82f31bca7..6ca12837dc 100644 --- a/src/examples/evas/evas-3d-hull.c +++ b/src/examples/evas/evas-3d-hull.c @@ -18,7 +18,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-md2.c b/src/examples/evas/evas-3d-md2.c index f97c183bd0..4c93b54ec0 100644 --- a/src/examples/evas/evas-3d-md2.c +++ b/src/examples/evas/evas-3d-md2.c @@ -11,7 +11,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-mmap-set.c b/src/examples/evas/evas-3d-mmap-set.c index 149217d95a..df8bdbdd4d 100644 --- a/src/examples/evas/evas-3d-mmap-set.c +++ b/src/examples/evas/evas-3d-mmap-set.c @@ -15,7 +15,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-obj.c b/src/examples/evas/evas-3d-obj.c index 91126fbfa0..6bf668ba09 100644 --- a/src/examples/evas/evas-3d-obj.c +++ b/src/examples/evas/evas-3d-obj.c @@ -19,7 +19,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-parallax-occlusion.c b/src/examples/evas/evas-3d-parallax-occlusion.c index 1d2cc75263..65d1880559 100644 --- a/src/examples/evas/evas-3d-parallax-occlusion.c +++ b/src/examples/evas/evas-3d-parallax-occlusion.c @@ -13,7 +13,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-pick.c b/src/examples/evas/evas-3d-pick.c index 20230d0112..5ed8067dc3 100644 --- a/src/examples/evas/evas-3d-pick.c +++ b/src/examples/evas/evas-3d-pick.c @@ -15,7 +15,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-ply.c b/src/examples/evas/evas-3d-ply.c index 7769a45442..ba0b912d0b 100644 --- a/src/examples/evas/evas-3d-ply.c +++ b/src/examples/evas/evas-3d-ply.c @@ -16,7 +16,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-proxy.c b/src/examples/evas/evas-3d-proxy.c index 6445ee9564..1a671f811d 100644 --- a/src/examples/evas/evas-3d-proxy.c +++ b/src/examples/evas/evas-3d-proxy.c @@ -12,7 +12,6 @@ #include "config.h" #else #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-shadows.c b/src/examples/evas/evas-3d-shadows.c index 16733183f4..eaa2f02f55 100644 --- a/src/examples/evas/evas-3d-shadows.c +++ b/src/examples/evas/evas-3d-shadows.c @@ -31,7 +31,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-3d-static-lod.c b/src/examples/evas/evas-3d-static-lod.c index 92e3b1a1a9..3b08380f1c 100644 --- a/src/examples/evas/evas-3d-static-lod.c +++ b/src/examples/evas/evas-3d-static-lod.c @@ -16,7 +16,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include diff --git a/src/examples/evas/evas-map-aa-eo.c b/src/examples/evas/evas-map-aa-eo.c index 30e8831c7b..b8156ad2b9 100644 --- a/src/examples/evas/evas-map-aa-eo.c +++ b/src/examples/evas/evas-map-aa-eo.c @@ -16,10 +16,6 @@ # define EFL_BETA_API_SUPPORT #endif -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif - #include #include #include diff --git a/src/examples/evas/evas-map-utils-eo.c b/src/examples/evas/evas-map-utils-eo.c index 157b3af847..1ea812bed1 100644 --- a/src/examples/evas/evas-map-utils-eo.c +++ b/src/examples/evas/evas-map-utils-eo.c @@ -19,10 +19,6 @@ # define EFL_BETA_API_SUPPORT #endif -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif - #include #include diff --git a/src/examples/evas/evas-object-manipulation-eo.c b/src/examples/evas/evas-object-manipulation-eo.c index 4d4c37fa90..7ba391acc9 100644 --- a/src/examples/evas/evas-object-manipulation-eo.c +++ b/src/examples/evas/evas-object-manipulation-eo.c @@ -14,7 +14,6 @@ #include "config.h" #else #define PACKAGE_EXAMPLES_DIR "." -#define EFL_EO_API_SUPPORT #define EFL_BETA_API_SUPPORT #endif diff --git a/src/examples/evas/evas-vg-batman.c b/src/examples/evas/evas-vg-batman.c index 650709f250..8625366962 100644 --- a/src/examples/evas/evas-vg-batman.c +++ b/src/examples/evas/evas-vg-batman.c @@ -22,10 +22,6 @@ #define EFL_BETA_API_SUPPORT #endif -#ifndef EFL_EO_API_SUPPORT -#define EFL_EO_API_SUPPORT -#endif - #include #include #include diff --git a/src/examples/evas/evas-vg-simple.c b/src/examples/evas/evas-vg-simple.c index 36b8baaf55..ef128d511e 100644 --- a/src/examples/evas/evas-vg-simple.c +++ b/src/examples/evas/evas-vg-simple.c @@ -43,10 +43,6 @@ #define EFL_BETA_API_SUPPORT #endif -#ifndef EFL_EO_API_SUPPORT -#define EFL_EO_API_SUPPORT -#endif - #include #include #include diff --git a/src/examples/evas/meson.build b/src/examples/evas/meson.build index e5e43ba1ac..e196a99a84 100644 --- a/src/examples/evas/meson.build +++ b/src/examples/evas/meson.build @@ -51,7 +51,9 @@ examples = [ ] foreach example : examples - executable(example, example + '.c', + executable(example, example + '.c', dependencies: [eina, ecore_evas, ecore_file, m], c_args : ['-DPACKAGE_EXAMPLES_DIR="'+meson.current_source_dir()+'"']) endforeach + +subdir('shooter') diff --git a/src/examples/evas/shooter/evas-3d-shooter-header.h b/src/examples/evas/shooter/evas-3d-shooter-header.h index 13600ec121..cd30fde209 100644 --- a/src/examples/evas/shooter/evas-3d-shooter-header.h +++ b/src/examples/evas/shooter/evas-3d-shooter-header.h @@ -5,7 +5,6 @@ #else #define PACKAGE_EXAMPLES_DIR "." #define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT #endif #include @@ -114,9 +113,9 @@ typedef struct _Scene_Data Eina_Bool normal; } Scene_Data; -static Evas *evas = NULL; -static Eo *background = NULL; -static Eo *image = NULL; +extern Evas *evas; +extern Eo *background; +extern Eo *image; static const vec2 tex_scale = {1, 1}; diff --git a/src/examples/evas/shooter/evas-3d-shooter.c b/src/examples/evas/shooter/evas-3d-shooter.c index 1c4deb4d7e..2dcad1db61 100644 --- a/src/examples/evas/shooter/evas-3d-shooter.c +++ b/src/examples/evas/shooter/evas-3d-shooter.c @@ -19,6 +19,11 @@ #define LOCAL_IMAGE_FOLDER PACKAGE_EXAMPLES_DIR "" EVAS_PROJECT_IMAGE_FOLDER #define LOCAL_MODEL_FOLDER PACKAGE_EXAMPLES_DIR "" EVAS_PROJECT_MODEL_FOLDER + +Evas *evas = NULL; +Eo *background = NULL; +Eo *image = NULL; + static const char *gray_brick_n_path = LOCAL_IMAGE_FOLDER "/brick-stone_n.jpg"; static const char *gray_brick_path = LOCAL_IMAGE_FOLDER "/brick-stone.jpg"; static const char *red_brick_n_path = LOCAL_IMAGE_FOLDER "/bricks_n.jpg"; diff --git a/src/examples/evas/shooter/meson.build b/src/examples/evas/shooter/meson.build new file mode 100644 index 0000000000..abb782d540 --- /dev/null +++ b/src/examples/evas/shooter/meson.build @@ -0,0 +1,5 @@ +executable('evas-3d-shooter', + ['evas-3d-shooter-header.c', 'evas-3d-shooter.c'], + dependencies: [ecore_evas], + c_args : ['-DPACKAGE_EXAMPLES_DIR="'+meson.current_source_dir()+'"'] +) diff --git a/src/lib/ecore/Ecore.h b/src/lib/ecore/Ecore.h index 28b7af2d08..cfc6dd7660 100644 --- a/src/lib/ecore/Ecore.h +++ b/src/lib/ecore/Ecore.h @@ -274,10 +274,7 @@ #include #include - -#ifdef EFL_BETA_API_SUPPORT #include -#endif #ifdef EAPI # undef EAPI @@ -333,9 +330,7 @@ extern "C" { #ifndef EFL_NOLEGACY_API_SUPPORT #include "Ecore_Legacy.h" #endif -#ifdef EFL_EO_API_SUPPORT #include "Ecore_Eo.h" -#endif #ifdef __cplusplus } diff --git a/src/lib/ecore/Efl_Core.h b/src/lib/ecore/Efl_Core.h index ab82063bef..c735b333fc 100644 --- a/src/lib/ecore/Efl_Core.h +++ b/src/lib/ecore/Efl_Core.h @@ -5,9 +5,7 @@ #include #include -#ifdef EFL_BETA_API_SUPPORT #include -#endif #ifdef EAPI # undef EAPI #endif diff --git a/src/lib/ecore/efl_app.eo b/src/lib/ecore/efl_app.eo index d7117ba093..7197c295bf 100644 --- a/src/lib/ecore/efl_app.eo +++ b/src/lib/ecore/efl_app.eo @@ -2,7 +2,10 @@ import efl_types; abstract Efl.App extends Efl.Loop implements Efl.Core.Command_Line { - [[Object representing the application itself]] + [[Object representing the application itself. + + @since 1.22 + ]] data: null; methods { @property app_main @class { diff --git a/src/lib/ecore/efl_appthread.c b/src/lib/ecore/efl_appthread.c index b1871dd27d..c02fd11903 100644 --- a/src/lib/ecore/efl_appthread.c +++ b/src/lib/ecore/efl_appthread.c @@ -139,7 +139,7 @@ _efl_appthread_efl_io_reader_can_read_set(Eo *obj, Efl_Appthread_Data *pd, Eina_ else efl_loop_handler_active_set(pd->fd.in_handler, EFL_LOOP_HANDLER_FLAGS_READ); - efl_event_callback_call(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read); + efl_event_callback_call(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, &can_read); } EOLIAN static Eina_Bool @@ -231,7 +231,7 @@ _efl_appthread_efl_io_writer_can_write_set(Eo *obj, Efl_Appthread_Data *pd, Eina else efl_loop_handler_active_set(pd->fd.in_handler, EFL_LOOP_HANDLER_FLAGS_WRITE); - efl_event_callback_call(obj, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write); + efl_event_callback_call(obj, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, &can_write); } EOLIAN static Eina_Bool diff --git a/src/lib/ecore/efl_core_command_line.c b/src/lib/ecore/efl_core_command_line.c index 424dd3486a..1c084030f1 100644 --- a/src/lib/ecore/efl_core_command_line.c +++ b/src/lib/ecore/efl_core_command_line.c @@ -210,7 +210,7 @@ _efl_core_command_line_command_array_set(Eo *obj EINA_UNUSED, Efl_Core_Command_L Eina_Strbuf *command = eina_strbuf_new(); unsigned int i = 0; - pd->command = eina_array_new(eina_array_count(array)); + pd->command = eina_array_new(array ? eina_array_count(array) : 0); for (i = 0; i < (array ? eina_array_count(array) : 0); ++i) { char *content = eina_array_data_get(array, i); @@ -223,12 +223,13 @@ _efl_core_command_line_command_array_set(Eo *obj EINA_UNUSED, Efl_Core_Command_L eina_stringshare_del(eina_array_pop(pd->command)); eina_array_free(pd->command); pd->command = NULL; - for (;i < (array ? eina_array_count(array) : 0); ++i) + for (;i < eina_array_count(array); ++i) { content = eina_array_data_get(array, i); eina_stringshare_del(content); } eina_array_free(array); + eina_strbuf_free(command); return EINA_FALSE; } @@ -256,7 +257,9 @@ _efl_core_command_line_command_string_set(Eo *obj EINA_UNUSED, Efl_Core_Command_ EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->filled, EINA_FALSE); pd->string_command = eina_strdup(str); - _remove_invalid_chars(pd->string_command); + + if (pd->string_command) + _remove_invalid_chars(pd->string_command); pd->command = _unescape(str); if (!pd->command) { diff --git a/src/lib/ecore/efl_exe.c b/src/lib/ecore/efl_exe.c index 721c597800..b7cba7292f 100644 --- a/src/lib/ecore/efl_exe.c +++ b/src/lib/ecore/efl_exe.c @@ -759,7 +759,7 @@ _efl_exe_efl_io_reader_can_read_set(Eo *obj, Efl_Exe_Data *pd, Eina_Bool can_rea else efl_loop_handler_active_set(pd->fd.out_handler, EFL_LOOP_HANDLER_FLAGS_READ); - efl_event_callback_call(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read); + efl_event_callback_call(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, &can_read); } EOLIAN static Eina_Bool @@ -857,7 +857,7 @@ _efl_exe_efl_io_writer_can_write_set(Eo *obj, Efl_Exe_Data *pd, Eina_Bool can_wr else efl_loop_handler_active_set(pd->fd.in_handler, EFL_LOOP_HANDLER_FLAGS_WRITE); - efl_event_callback_call(obj, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write); + efl_event_callback_call(obj, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, &can_write); } EOLIAN static Eina_Bool diff --git a/src/lib/ecore/efl_io_buffered_stream.c b/src/lib/ecore/efl_io_buffered_stream.c index f2054c2ec9..77e0ccd145 100644 --- a/src/lib/ecore/efl_io_buffered_stream.c +++ b/src/lib/ecore/efl_io_buffered_stream.c @@ -273,7 +273,7 @@ _efl_io_buffered_stream_efl_io_reader_can_read_set(Eo *o, Efl_Io_Buffered_Stream EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o)); if (pd->can_read == can_read) return; pd->can_read = can_read; - efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read); + efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, &can_read); } EOLIAN static Eina_Bool @@ -339,7 +339,7 @@ _efl_io_buffered_stream_efl_io_writer_can_write_set(Eo *o, Efl_Io_Buffered_Strea EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o)); if (pd->can_write == can_write) return; pd->can_write = can_write; - efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write); + efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, &can_write); } EOLIAN static void diff --git a/src/lib/ecore/efl_io_buffered_stream.eo b/src/lib/ecore/efl_io_buffered_stream.eo index c61248b30d..5271006422 100644 --- a/src/lib/ecore/efl_io_buffered_stream.eo +++ b/src/lib/ecore/efl_io_buffered_stream.eo @@ -31,8 +31,6 @@ class @beta Efl.Io.Buffered_Stream extends Efl.Loop_Consumer implements Efl.Io.R and can be retrieved with @.inner_io.get, which should be used with care -- calling @Efl.Io.Reader.read and @Efl.Io.Writer.write on it may produce unexpected results. - - @since 1.19 ]] methods { diff --git a/src/lib/ecore/efl_io_closer_fd.eo b/src/lib/ecore/efl_io_closer_fd.eo index c927cb5b2d..2d59703205 100644 --- a/src/lib/ecore/efl_io_closer_fd.eo +++ b/src/lib/ecore/efl_io_closer_fd.eo @@ -1,7 +1,5 @@ mixin @beta Efl.Io.Closer_Fd requires Efl.Object extends Efl.Io.Closer { [[Close fd using close(2). - - @since 1.19 ]] methods { diff --git a/src/lib/ecore/efl_io_copier.eo b/src/lib/ecore/efl_io_copier.eo index ba4412f359..f4ef7679c4 100644 --- a/src/lib/ecore/efl_io_copier.eo +++ b/src/lib/ecore/efl_io_copier.eo @@ -59,8 +59,6 @@ class @beta Efl.Io.Copier extends Efl.Loop_Consumer implements Efl.Io.Closer { @Efl.Io.Closer.close_on_exec and @Efl.Io.Closer.close_on_invalidate are respected and applied to both source and destination. Both default to $true. - - @since 1.19 ]] methods { diff --git a/src/lib/ecore/efl_io_file.eo b/src/lib/ecore/efl_io_file.eo index 269d46ec37..c0a968741e 100644 --- a/src/lib/ecore/efl_io_file.eo +++ b/src/lib/ecore/efl_io_file.eo @@ -4,8 +4,6 @@ class @beta Efl.Io.File extends Efl.Loop_Fd implements Efl.File, Efl.Io.Reader_F @Efl.Io.Closer.close_on_exec and @Efl.Io.Closer.close_on_invalidate are respected and default to $true. @Efl.Io.Closer.close_on_exec.set sets flag O_CLOEXEC. - - @since 1.19 ]] methods { diff --git a/src/lib/ecore/efl_io_positioner_fd.eo b/src/lib/ecore/efl_io_positioner_fd.eo index f5169e10be..dba9042f1b 100644 --- a/src/lib/ecore/efl_io_positioner_fd.eo +++ b/src/lib/ecore/efl_io_positioner_fd.eo @@ -1,7 +1,5 @@ mixin @beta Efl.Io.Positioner_Fd extends Efl.Io.Positioner { [[Positions fd using lseek(2). - - @since 1.19 ]] methods { diff --git a/src/lib/ecore/efl_io_reader_fd.c b/src/lib/ecore/efl_io_reader_fd.c index 078af8cbf6..c0267af4cf 100644 --- a/src/lib/ecore/efl_io_reader_fd.c +++ b/src/lib/ecore/efl_io_reader_fd.c @@ -79,7 +79,7 @@ _efl_io_reader_fd_efl_io_reader_can_read_set(Eo *o, Efl_Io_Reader_Fd_Data *pd, E EINA_SAFETY_ON_TRUE_RETURN(efl_io_reader_fd_get(o) < 0 && can_read); if (pd->can_read == can_read) return; pd->can_read = can_read; - efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read); + efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, &can_read); } EOLIAN static Eina_Bool diff --git a/src/lib/ecore/efl_io_reader_fd.eo b/src/lib/ecore/efl_io_reader_fd.eo index 9c6fc83bae..d32dfb486e 100644 --- a/src/lib/ecore/efl_io_reader_fd.eo +++ b/src/lib/ecore/efl_io_reader_fd.eo @@ -1,7 +1,5 @@ mixin @beta Efl.Io.Reader_Fd extends Efl.Io.Reader { [[Reads fd using read(2). - - @since 1.19 ]] methods { diff --git a/src/lib/ecore/efl_io_sizer_fd.eo b/src/lib/ecore/efl_io_sizer_fd.eo index 6eb12ad8b7..9dc98de9ed 100644 --- a/src/lib/ecore/efl_io_sizer_fd.eo +++ b/src/lib/ecore/efl_io_sizer_fd.eo @@ -1,7 +1,5 @@ mixin @beta Efl.Io.Sizer_Fd extends Efl.Io.Sizer { [[Resizes fd usign ftruncate(2). - - @since 1.19 ]] methods { diff --git a/src/lib/ecore/efl_io_stderr.eo b/src/lib/ecore/efl_io_stderr.eo index f183e371e2..626a99de95 100644 --- a/src/lib/ecore/efl_io_stderr.eo +++ b/src/lib/ecore/efl_io_stderr.eo @@ -1,7 +1,5 @@ class @beta Efl.Io.Stderr extends Efl.Loop_Fd implements Efl.Io.Writer_Fd { [[Application's standard error (stderr). - - @since 1.19 ]] data: null; diff --git a/src/lib/ecore/efl_io_stdin.eo b/src/lib/ecore/efl_io_stdin.eo index 75645d2461..d081bb1075 100644 --- a/src/lib/ecore/efl_io_stdin.eo +++ b/src/lib/ecore/efl_io_stdin.eo @@ -1,7 +1,5 @@ class @beta Efl.Io.Stdin extends Efl.Loop_Fd implements Efl.Io.Reader_Fd { [[Application's standard input (stdin). - - @since 1.19 ]] data: null; diff --git a/src/lib/ecore/efl_io_stdout.eo b/src/lib/ecore/efl_io_stdout.eo index 66497b1211..5d419550d3 100644 --- a/src/lib/ecore/efl_io_stdout.eo +++ b/src/lib/ecore/efl_io_stdout.eo @@ -1,7 +1,5 @@ class @beta Efl.Io.Stdout extends Efl.Loop_Fd implements Efl.Io.Writer_Fd { [[Application's standard output (stdout). - - @since 1.19 ]] data: null; diff --git a/src/lib/ecore/efl_io_writer_fd.c b/src/lib/ecore/efl_io_writer_fd.c index 50be01cef1..a1174bc091 100644 --- a/src/lib/ecore/efl_io_writer_fd.c +++ b/src/lib/ecore/efl_io_writer_fd.c @@ -83,7 +83,7 @@ _efl_io_writer_fd_efl_io_writer_can_write_set(Eo *o, Efl_Io_Writer_Fd_Data *pd, EINA_SAFETY_ON_TRUE_RETURN(efl_io_writer_fd_get(o) < 0 && can_write); if (pd->can_write == can_write) return; pd->can_write = can_write; - efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write); + efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, &can_write); } #include "efl_io_writer_fd.eo.c" diff --git a/src/lib/ecore/efl_io_writer_fd.eo b/src/lib/ecore/efl_io_writer_fd.eo index 70fe627725..2f7b46156b 100644 --- a/src/lib/ecore/efl_io_writer_fd.eo +++ b/src/lib/ecore/efl_io_writer_fd.eo @@ -1,7 +1,5 @@ mixin @beta Efl.Io.Writer_Fd extends Efl.Io.Writer { [[Writes fd using write(2). - - @since 1.19 ]] methods { diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo index 95f94da771..7e1bc107ae 100644 --- a/src/lib/ecore/efl_loop.eo +++ b/src/lib/ecore/efl_loop.eo @@ -1,5 +1,8 @@ struct Efl.Loop_Arguments { - [[EFL loop arguments data structure]] + [[EFL loop arguments data structure + + @since 1.22 + ]] argv: const(array); [[Array with loop arguments]] initialization: bool; [[Set to $true when the program should initialize its internal state. This happen once per process instance.]] } @@ -15,6 +18,8 @@ abstract Efl.Loop extends Efl.Task It serializes these and allows for greater responsiveness without the need for threads (or any other concurrency). However you can provide these if you need to. + + @since 1.22 ]] methods { iterate { diff --git a/src/lib/ecore/efl_loop_consumer.eo b/src/lib/ecore/efl_loop_consumer.eo index f03a4d6d86..c5828648b6 100644 --- a/src/lib/ecore/efl_loop_consumer.eo +++ b/src/lib/ecore/efl_loop_consumer.eo @@ -2,7 +2,10 @@ abstract Efl.Loop_Consumer extends Efl.Object { [[An @Efl.Loop_Consumer is a class which requires one of the parents to provide an @Efl.Loop interface when performing @Efl.Object.provider_find. It will enforce this by - only allowing parents which provide such an interface or $NULL.]] + only allowing parents which provide such an interface or $NULL. + + @since 1.22 + ]] eo_prefix: efl_loop; methods { @property loop { diff --git a/src/lib/ecore/efl_loop_timer.eo b/src/lib/ecore/efl_loop_timer.eo index 2917689435..d726c1ad5f 100644 --- a/src/lib/ecore/efl_loop_timer.eo +++ b/src/lib/ecore/efl_loop_timer.eo @@ -8,6 +8,8 @@ class Efl.Loop_Timer extends Efl.Loop_Consumer "best effort" basis. The @Efl.Object.event_freeze and @Efl.Object.event_thaw calls are used to pause and unpause the timer. + + @since 1.22 ]] methods { @property timer_interval { @@ -32,14 +34,11 @@ class Efl.Loop_Timer extends Efl.Loop_Consumer timer start ticking off from zero now. This is equal to delaying the timer by the already passed time, since the timer started ticking - - @since 1.2 ]] } timer_loop_reset { [[This effectively resets a timer but based on the time when this iteration of the main loop started. - @since 1.18 - ]] + ]] } timer_delay { [[Adds a delay to the next occurrence of a timer. diff --git a/src/lib/ecore/efl_task.eo b/src/lib/ecore/efl_task.eo index d30b0d005f..9731bebe2f 100644 --- a/src/lib/ecore/efl_task.eo +++ b/src/lib/ecore/efl_task.eo @@ -1,5 +1,7 @@ enum Efl.Task_Priority { - [[ ]] + [[ + @since 1.22 + ]] normal, background, low, @@ -8,7 +10,9 @@ enum Efl.Task_Priority { } enum Efl.Task_Flags { - [[ ]] + [[ + @since 1.22 + ]] none = 0, use_stdin = 1, use_stdout = 2, @@ -17,7 +21,9 @@ enum Efl.Task_Flags { abstract Efl.Task extends Efl.Loop_Consumer { - [[ ]] + [[ + @since 1.22 + ]] methods { @property priority { [[ The priority of this task. ]] diff --git a/src/lib/ecore/efl_thread.c b/src/lib/ecore/efl_thread.c index bd20cd1e3b..c9badf716a 100644 --- a/src/lib/ecore/efl_thread.c +++ b/src/lib/ecore/efl_thread.c @@ -892,7 +892,7 @@ _efl_thread_efl_io_reader_can_read_set(Eo *obj, Efl_Thread_Data *pd, Eina_Bool c else efl_loop_handler_active_set(pd->fd.out_handler, EFL_LOOP_HANDLER_FLAGS_READ); - efl_event_callback_call(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read); + efl_event_callback_call(obj, EFL_IO_READER_EVENT_CAN_READ_CHANGED, &can_read); } EOLIAN static Eina_Bool @@ -986,7 +986,7 @@ _efl_thread_efl_io_writer_can_write_set(Eo *obj, Efl_Thread_Data *pd, Eina_Bool else efl_loop_handler_active_set(pd->fd.in_handler, EFL_LOOP_HANDLER_FLAGS_WRITE); - efl_event_callback_call(obj, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write); + efl_event_callback_call(obj, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, &can_write); } EOLIAN static Eina_Bool diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build index a40c45a5e3..64d255fe73 100644 --- a/src/lib/ecore/meson.build +++ b/src/lib/ecore/meson.build @@ -220,9 +220,11 @@ ecore = declare_dependency( eolian_ecore_dir = join_paths(eolian_include_dir, package_version_name) -install_data(pub_eo_files + pub_eo_types_files, - install_dir: eolian_ecore_dir -) +if get_option('install-eo-files') + install_data(pub_eo_files + pub_eo_types_files, + install_dir: eolian_ecore_dir + ) +endif install_headers(ecore_header_src, install_dir : dir_package_include, diff --git a/src/lib/ecore_audio/ecore_audio.eo b/src/lib/ecore_audio/ecore_audio.eo index af668fbe32..93409d21cb 100644 --- a/src/lib/ecore_audio/ecore_audio.eo +++ b/src/lib/ecore_audio/ecore_audio.eo @@ -21,8 +21,6 @@ abstract @beta Ecore.Audio extends Efl.Object methods { @property paused { [[Pauses state of the object - - @since 1.8 ]] set { } @@ -34,8 +32,6 @@ abstract @beta Ecore.Audio extends Efl.Object } @property volume { [[Volume of the object - - @since 1.8 ]] set { } @@ -51,8 +47,6 @@ abstract @beta Ecore.Audio extends Efl.Object What sources are supported depends on the actual object. For example, the libsndfile class accepts WAV, OGG, FLAC files as source. - - @since 1.8 ]] set { return: bool; [[$true if the source was set correctly (i.e. the file @@ -71,8 +65,6 @@ abstract @beta Ecore.Audio extends Efl.Object What formats are supported depends on the actual object. Default is ECORE_AUDIO_FORMAT_AUTO - - @since 1.8 ]] return: bool; [[$true if the format was supported, $false otherwise]] } @@ -81,8 +73,6 @@ abstract @beta Ecore.Audio extends Efl.Object After setting the source if the format was ECORE_AUDIO_FORMAT_AUTO this function will now return the actual format. - - @since 1.8 ]] } values { @@ -91,8 +81,6 @@ abstract @beta Ecore.Audio extends Efl.Object } vio_set @pure_virtual { [[Sets the virtual IO functions - - @since 1.8 ]] params { vio: ptr(Ecore.Audio.Vio); [[The @Ecore.Audio.Vio struct with diff --git a/src/lib/ecore_audio/ecore_audio_in.eo b/src/lib/ecore_audio/ecore_audio_in.eo index 7c8582f985..bbee8e1910 100644 --- a/src/lib/ecore_audio/ecore_audio_in.eo +++ b/src/lib/ecore_audio/ecore_audio_in.eo @@ -7,8 +7,6 @@ class @beta Ecore.Audio.In extends Ecore.Audio methods { @property speed { [[Playback speed of the input. - - @since 1.8 ]] set { } @@ -20,8 +18,6 @@ class @beta Ecore.Audio.In extends Ecore.Audio } @property samplerate { [[Sample-rate of the input - - @since 1.8 ]] set { } @@ -33,8 +29,6 @@ class @beta Ecore.Audio.In extends Ecore.Audio } @property channels { [[Amount of channels the input has - - @since 1.8 ]] set { } @@ -46,8 +40,6 @@ class @beta Ecore.Audio.In extends Ecore.Audio } @property preloaded { [[Preloaded state of the input - - @since 1.8 ]] set { } @@ -63,8 +55,6 @@ class @beta Ecore.Audio.In extends Ecore.Audio If the input is looped and reaches the end it will start from the beginning again. At the same time the event \@ref ECORE_AUDIO_EV_IN_LOOPED will be emitted - - @since 1.8 ]] set { } @@ -79,8 +69,6 @@ class @beta Ecore.Audio.In extends Ecore.Audio This function is only implemented by some classes (i.e. ECORE_AUDIO_OBJ_IN_TONE_CLASS) - - @since 1.8 ]] set { } @@ -93,8 +81,6 @@ class @beta Ecore.Audio.In extends Ecore.Audio @property output { get { [[Gets the output that this input is attached to - - @since 1.8 ]] } values { @@ -104,8 +90,6 @@ class @beta Ecore.Audio.In extends Ecore.Audio @property remaining { get { [[Gets the remaining time of the input - - @since 1.8 ]] } values { @@ -114,8 +98,6 @@ class @beta Ecore.Audio.In extends Ecore.Audio } read { [[Reads from the input - - @since 1.8 ]] return: ssize; [[The amount of samples written to buf]] params { @@ -125,8 +107,6 @@ class @beta Ecore.Audio.In extends Ecore.Audio } read_internal { [[Internal read function - - @since 1.8 ]] return: ssize; [[The amount of samples written to buf]] params { @@ -136,8 +116,6 @@ class @beta Ecore.Audio.In extends Ecore.Audio } seek { [[Seeks within the input - - @since 1.8 ]] return: double; [[The current absolute position in seconds within the input]] diff --git a/src/lib/ecore_audio/ecore_audio_out.eo b/src/lib/ecore_audio/ecore_audio_out.eo index 59821c3dd9..f18dd8dc0e 100644 --- a/src/lib/ecore_audio/ecore_audio_out.eo +++ b/src/lib/ecore_audio/ecore_audio_out.eo @@ -7,8 +7,6 @@ abstract @beta Ecore.Audio.Out extends Ecore.Audio methods { input_attach { [[Attaches an input to an output - - @since 1.8 ]] return: bool; [[$true if the input was attached, $false otherwise]] params { @@ -17,8 +15,6 @@ abstract @beta Ecore.Audio.Out extends Ecore.Audio } input_detach { [[Detaches an input from an output - - @since 1.8 ]] return: bool; [[$true if the input was detached, $false otherwise]] params { @@ -27,8 +23,6 @@ abstract @beta Ecore.Audio.Out extends Ecore.Audio } inputs_get { [[Returns the list of all attached inputs - - @since 1.8 ]] return: list; [[A list of the inputs that are attached to the output]] } diff --git a/src/lib/ecore_audio/meson.build b/src/lib/ecore_audio/meson.build index bc3215e62c..cbcaca4931 100644 --- a/src/lib/ecore_audio/meson.build +++ b/src/lib/ecore_audio/meson.build @@ -92,9 +92,11 @@ ecore_audio = declare_dependency( dependencies: ecore_audio_pub_deps, ) -install_data(pub_eo_files + pub_eo_types_files, - install_dir: eolian_ecore_dir -) +if get_option('install-eo-files') + install_data(pub_eo_files + pub_eo_types_files, + install_dir: eolian_ecore_dir + ) +endif install_headers(ecore_audio_header_src, install_dir : dir_package_include, diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c index 5cbb39bf65..1956176604 100644 --- a/src/lib/ecore_con/ecore_con_legacy.c +++ b/src/lib/ecore_con/ecore_con_legacy.c @@ -293,7 +293,7 @@ _ecore_con_client_free(Ecore_Con_Client *cl) efl_event_callback_array_del(inner_socket, _ecore_con_client_socket_ssl_cbs(), cl); parent = efl_parent_get(cl->socket); - if (parent && (parent != svr->server)) + if (parent && svr && (parent != svr->server)) efl_del(cl->socket); /* we own it */ else efl_unref(cl->socket); diff --git a/src/lib/ecore_con/efl_net_control_access_point.eo b/src/lib/ecore_con/efl_net_control_access_point.eo index a2c9206fcc..3acf2a2f17 100644 --- a/src/lib/ecore_con/efl_net_control_access_point.eo +++ b/src/lib/ecore_con/efl_net_control_access_point.eo @@ -1,7 +1,5 @@ enum @beta Efl.Net.Control.Access_Point_State { [[Provides the access point state. - - @since 1.19 ]] idle, [[Nothing is happening with this access point]] association, [[The access point is trying to associate itself. This is the first state after a connection attempt.]] @@ -14,8 +12,6 @@ enum @beta Efl.Net.Control.Access_Point_State { enum @beta Efl.Net.Control.Access_Point_Error { [[The reason for the connection error. - - @since 1.19 ]] none, [[All OK, no errors]] out_of_range, [[Wireless device is out of range.]] @@ -27,8 +23,6 @@ enum @beta Efl.Net.Control.Access_Point_Error { enum @beta Efl.Net.Control.Access_Point_Security { [[Bitwise-able securities supported by an access point. - - @since 1.19 ]] unknow = 0, [[Unknown]] none = (1 << 0), [[Open access, no security]] @@ -39,8 +33,6 @@ enum @beta Efl.Net.Control.Access_Point_Security { enum @beta Efl.Net.Control.Access_Point_Ipv4_Method { [[The method used to configure IPv4 - - @since 1.19 ]] off, [[IPv4 is disabled.]] dhcp, [[IPv4 is configured using DHCP.]] @@ -50,8 +42,6 @@ enum @beta Efl.Net.Control.Access_Point_Ipv4_Method { enum @beta Efl.Net.Control.Access_Point_Ipv6_Method { [[The method used to configure IPv6 - - @since 1.19 ]] off, [[IPv6 is disabled.]] fixed, [[IPv6 is fixed by operator and cannot be changed.]] @@ -65,8 +55,6 @@ enum @beta Efl.Net.Control.Access_Point_Ipv6_Method { enum @beta Efl.Net.Control.Access_Point_Proxy_Method { [[The method used to configure Proxies. - - @since 1.19 ]] off, [[Direct connection to the internet, no proxy used.]] auto, [[Proxy is autoconfigured using Proxy-Auto-Configuration (PAC) using given URL.]] @@ -82,8 +70,6 @@ class @beta Efl.Net.Control.Access_Point extends Efl.Loop_Consumer { An application requiring only a network connection can just use a @Efl.Net.Session instead. - - @since 1.19 ]] events { diff --git a/src/lib/ecore_con/efl_net_control_manager.eo b/src/lib/ecore_con/efl_net_control_manager.eo index e0f769bac7..cfb729b9db 100644 --- a/src/lib/ecore_con/efl_net_control_manager.eo +++ b/src/lib/ecore_con/efl_net_control_manager.eo @@ -7,8 +7,6 @@ enum @beta Efl.Net.Control.State { For more details, use @Efl.Net.Control.Manager access points and their property state. - - @since 1.19 ]] offline, [[No access point is connected.]] local, [[At least one access point is connected and the internet connection hasn't been verified.]] @@ -17,8 +15,6 @@ enum @beta Efl.Net.Control.State { enum @beta Efl.Net.Control.Agent_Request_Input_Field { [[Bitwise-able fields requested to the agent. - - @since 1.19 ]] name = (1 << 0), [[Used for hidden WiFi access points. If SSID is present, this is an alternative to that.]] ssid = (1 << 1), [[Used for hidden WiFi access points. If name is present, this is an alternative to that.]] @@ -29,8 +25,6 @@ enum @beta Efl.Net.Control.Agent_Request_Input_Field { struct @beta Efl.Net.Control.Agent_Request_Input_Information { [[Name-value information pair provided to the agent. - - @since 1.19 ]] name: string; [[The information name, such as PreviousPassphrase, Host, Name...]] value: string; [[The contents of the information]] @@ -38,8 +32,6 @@ struct @beta Efl.Net.Control.Agent_Request_Input_Information { struct @beta Efl.Net.Control.Agent_Request_Input { [[Requests input to the agent. - - @since 1.19 ]] access_point: Efl.Net.Control.Access_Point; [[The access point which triggered this request.]] fields: Efl.Net.Control.Agent_Request_Input_Field; [[Bitwise OR of fields present in this request.]] @@ -49,8 +41,6 @@ struct @beta Efl.Net.Control.Agent_Request_Input { struct @beta Efl.Net.Control.Agent_Error { [[Reports error to the agent. - - @since 1.19 ]] access_point: Efl.Net.Control.Access_Point; [[The access point that triggered this error.]] message: string; [[The error message.]] @@ -58,8 +48,6 @@ struct @beta Efl.Net.Control.Agent_Error { struct @beta Efl.Net.Control.Agent_Browser_Url { [[Reports to agent that it should open a browser at a given URL. - - @since 1.19 ]] access_point: Efl.Net.Control.Access_Point; [[The access point that triggered this request.]] url: string; [[The URL to point the browser at.]] @@ -103,9 +91,6 @@ class @beta Efl.Net.Control.Manager extends Efl.Loop_Consumer { (@Efl.Net.Control.State.online) and iterators for @.access_points and @.technologies will be empty (they will be returned but won't contain any items). - - - @since 1.19 ]] events { access_point,add: Efl.Net.Control.Access_Point; [[The given access point has been added]] diff --git a/src/lib/ecore_con/efl_net_control_technology.eo b/src/lib/ecore_con/efl_net_control_technology.eo index 1c651a0d57..dc674339a7 100644 --- a/src/lib/ecore_con/efl_net_control_technology.eo +++ b/src/lib/ecore_con/efl_net_control_technology.eo @@ -1,7 +1,5 @@ enum @beta Efl.Net.Control.Technology_Type { [[Technology types - - @since 1.19 ]] unknown, [[Type: unknown]] system, [[Type: system]] @@ -24,8 +22,6 @@ class @beta Efl.Net.Control.Technology extends Efl.Loop_Consumer { When powered, the technology will dynamically create and remove access points in @Efl.Net.Control.Manager.access_points. - - @since 1.19 ]] events { changed: void; [[Called when some properties were changed.]] diff --git a/src/lib/ecore_con/efl_net_dialer.eo b/src/lib/ecore_con/efl_net_dialer.eo index 46d46cd157..02770dca46 100644 --- a/src/lib/ecore_con/efl_net_dialer.eo +++ b/src/lib/ecore_con/efl_net_dialer.eo @@ -17,8 +17,6 @@ interface @beta Efl.Net.Dialer extends Efl.Net.Socket { Once the socket is closed, @Efl.Io.Closer.closed will be called and the "closed" event is dispatched. - - @since 1.19 ]] methods { dial { diff --git a/src/lib/ecore_con/efl_net_dialer_http.c b/src/lib/ecore_con/efl_net_dialer_http.c index 64947a1fc4..b6467b2c23 100644 --- a/src/lib/ecore_con/efl_net_dialer_http.c +++ b/src/lib/ecore_con/efl_net_dialer_http.c @@ -1626,7 +1626,7 @@ _efl_net_dialer_http_efl_io_reader_can_read_set(Eo *o, Efl_Net_Dialer_Http_Data EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o)); if (pd->can_read == can_read) return; pd->can_read = can_read; - efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read); + efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, &can_read); } EOLIAN static Eina_Bool @@ -1714,7 +1714,7 @@ _efl_net_dialer_http_efl_io_writer_can_write_set(Eo *o, Efl_Net_Dialer_Http_Data EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o)); if (pd->can_write == can_write) return; pd->can_write = can_write; - efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write); + efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, &can_write); } static Eina_Value _efl_net_dialer_http_pending_close(Eo *o, void *data, Eina_Value value); diff --git a/src/lib/ecore_con/efl_net_dialer_http.eo b/src/lib/ecore_con/efl_net_dialer_http.eo index 4edff59178..ae06b397fa 100644 --- a/src/lib/ecore_con/efl_net_dialer_http.eo +++ b/src/lib/ecore_con/efl_net_dialer_http.eo @@ -47,8 +47,6 @@ class @beta Efl.Net.Dialer_Http extends Efl.Loop_Consumer implements Efl.Net.Dia - socks5://proxyserver (default port 1080) - socks4a://proxyserver:port (SOCKSv4 and let socks server to resolve domain) - socks4://proxyserver:port (SOCKSv4) - - @since 1.19 ]] methods { @property method { diff --git a/src/lib/ecore_con/efl_net_dialer_simple.c b/src/lib/ecore_con/efl_net_dialer_simple.c index 775621a97a..111874e8df 100644 --- a/src/lib/ecore_con/efl_net_dialer_simple.c +++ b/src/lib/ecore_con/efl_net_dialer_simple.c @@ -29,33 +29,6 @@ typedef struct #define MY_CLASS EFL_NET_DIALER_SIMPLE_CLASS -static void -_efl_net_dialer_simple_inner_io_resolved(void *data, const Efl_Event *event) -{ - Eo *o = data; - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_RESOLVED, event->info); -} - -static void -_efl_net_dialer_simple_inner_io_error(void *data, const Efl_Event *event) -{ - Eo *o = data; - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, event->info); -} - -static void -_efl_net_dialer_simple_inner_io_connected(void *data, const Efl_Event *event) -{ - Eo *o = data; - - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, event->info); -} - -EFL_CALLBACKS_ARRAY_DEFINE(_efl_net_dialer_simple_inner_io_cbs, - { EFL_NET_DIALER_EVENT_DIALER_RESOLVED, _efl_net_dialer_simple_inner_io_resolved }, - { EFL_NET_DIALER_EVENT_DIALER_ERROR, _efl_net_dialer_simple_inner_io_error }, - { EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _efl_net_dialer_simple_inner_io_connected }); - EOLIAN static Efl_Object * _efl_net_dialer_simple_efl_object_finalize(Eo *o, Efl_Net_Dialer_Simple_Data *pd) { @@ -94,7 +67,9 @@ _efl_net_dialer_simple_efl_object_invalidate(Eo *o, Efl_Net_Dialer_Simple_Data * inner_io = efl_io_buffered_stream_inner_io_get(o); if (inner_io) { - efl_event_callback_array_del(inner_io, _efl_net_dialer_simple_inner_io_cbs(), o); + efl_event_callback_forwarder_del(inner_io, EFL_NET_DIALER_EVENT_DIALER_ERROR, o); + efl_event_callback_forwarder_del(inner_io, EFL_NET_DIALER_EVENT_DIALER_RESOLVED, o); + efl_event_callback_forwarder_del(inner_io, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, o); if (efl_parent_get(inner_io) == o) efl_parent_set(inner_io, NULL); } @@ -122,8 +97,9 @@ _efl_net_dialer_simple_efl_io_buffered_stream_inner_io_set(Eo *o, Efl_Net_Dialer { EINA_SAFETY_ON_FALSE_RETURN(efl_isa(io, EFL_NET_DIALER_INTERFACE)); efl_io_buffered_stream_inner_io_set(efl_super(o, MY_CLASS), io); - efl_event_callback_array_add(io, _efl_net_dialer_simple_inner_io_cbs(), o); - + efl_event_callback_forwarder_add(io, EFL_NET_DIALER_EVENT_DIALER_ERROR, o); + efl_event_callback_forwarder_add(io, EFL_NET_DIALER_EVENT_DIALER_RESOLVED, o); + efl_event_callback_forwarder_add(io, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, o); /* apply pending dialer values */ if (pd->pending.proxy_url) { diff --git a/src/lib/ecore_con/efl_net_dialer_simple.eo b/src/lib/ecore_con/efl_net_dialer_simple.eo index e28c929dd1..f1d2dd1acd 100644 --- a/src/lib/ecore_con/efl_net_dialer_simple.eo +++ b/src/lib/ecore_con/efl_net_dialer_simple.eo @@ -40,8 +40,6 @@ class @beta Efl.Net.Dialer_Simple extends Efl.Net.Socket_Simple implements Efl.N to be set prior to @Efl.Object.finalize, then use @Efl.Io.Buffered_Stream.inner_io directly providing an already created dialer. - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/efl_net_dialer_ssl.eo b/src/lib/ecore_con/efl_net_dialer_ssl.eo index a80c063aec..6172bd24d9 100644 --- a/src/lib/ecore_con/efl_net_dialer_ssl.eo +++ b/src/lib/ecore_con/efl_net_dialer_ssl.eo @@ -21,8 +21,6 @@ class @beta Efl.Net.Dialer_Ssl extends Efl.Net.Socket_Ssl implements Efl.Net.Dia - socks5://proxyserver (default port 1080) - socks4a://proxyserver:port (SOCKSv4 and let socks server to resolve domain) - socks4://proxyserver:port (SOCKSv4) - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/efl_net_dialer_tcp.eo b/src/lib/ecore_con/efl_net_dialer_tcp.eo index fdbf7d3797..4b01aeec9d 100644 --- a/src/lib/ecore_con/efl_net_dialer_tcp.eo +++ b/src/lib/ecore_con/efl_net_dialer_tcp.eo @@ -18,8 +18,6 @@ class @beta Efl.Net.Dialer_Tcp extends Efl.Net.Socket_Tcp implements Efl.Net.Dia - socks5://proxyserver (default port 1080) - socks4a://proxyserver:port (SOCKSv4 and let socks server to resolve domain) - socks4://proxyserver:port (SOCKSv4) - - @since 1.19 ]] implements { diff --git a/src/lib/ecore_con/efl_net_dialer_udp.eo b/src/lib/ecore_con/efl_net_dialer_udp.eo index 709031a71e..15a957248b 100644 --- a/src/lib/ecore_con/efl_net_dialer_udp.eo +++ b/src/lib/ecore_con/efl_net_dialer_udp.eo @@ -19,10 +19,6 @@ class @beta Efl.Net.Dialer_Udp extends Efl.Net.Socket_Udp implements Efl.Net.Dia - @Efl.Net.Socket_Udp.multicast_join: join other multicast groups. - @Efl.Net.Socket_Udp.multicast_loopback: if packets should be delivered locally or only to remote peers. - @Efl.Net.Socket_Udp.multicast_time_to_live: how far, in number of hops, the packet should go. - - I - - @since 1.19 ]] implements { diff --git a/src/lib/ecore_con/efl_net_dialer_unix.eo b/src/lib/ecore_con/efl_net_dialer_unix.eo index a74f34d784..a9a7693300 100644 --- a/src/lib/ecore_con/efl_net_dialer_unix.eo +++ b/src/lib/ecore_con/efl_net_dialer_unix.eo @@ -6,8 +6,6 @@ class @beta Efl.Net.Dialer_Unix extends Efl.Net.Socket_Unix implements Efl.Net.D Note: Proxies are meaningless for AF_UNIX family, thus are not implemented. - - @since 1.19 ]] implements { diff --git a/src/lib/ecore_con/efl_net_dialer_websocket.c b/src/lib/ecore_con/efl_net_dialer_websocket.c index 78ab750756..e6672e600c 100644 --- a/src/lib/ecore_con/efl_net_dialer_websocket.c +++ b/src/lib/ecore_con/efl_net_dialer_websocket.c @@ -1297,7 +1297,7 @@ _efl_net_dialer_websocket_efl_io_reader_can_read_set(Eo *o, Efl_Net_Dialer_Webso if (pd->streaming_mode == EFL_NET_DIALER_WEBSOCKET_STREAMING_MODE_DISABLED) return; if (pd->can_read == can_read) return; pd->can_read = can_read; - efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read); + efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, &can_read); } EOLIAN static void @@ -1350,7 +1350,7 @@ _efl_net_dialer_websocket_efl_io_writer_can_write_set(Eo *o, Efl_Net_Dialer_Webs can_write = EINA_FALSE; if (pd->can_write == can_write) return; pd->can_write = can_write; - efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write); + efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, &can_write); } EOLIAN static Eina_Error diff --git a/src/lib/ecore_con/efl_net_dialer_websocket.eo b/src/lib/ecore_con/efl_net_dialer_websocket.eo index 4a29fc30d5..262ad755fd 100644 --- a/src/lib/ecore_con/efl_net_dialer_websocket.eo +++ b/src/lib/ecore_con/efl_net_dialer_websocket.eo @@ -3,8 +3,6 @@ import efl_net_http_types; enum @beta Efl.Net.Dialer_Websocket_Streaming_Mode { [[How to map WebSocket to EFL I/O Interfaces. - - @since 1.19 ]] disabled, [[@Efl.Io.Writer.write and @Efl.Io.Reader.read will fail by returning ENOSTR]] binary, [[@Efl.Io.Writer.write will result in @Efl.Net.Dialer_Websocket.binary_send]] @@ -18,8 +16,6 @@ enum @beta Efl.Net.Dialer_Websocket_Close_Reason { using "_start" and "end" suffixes. See https://tools.ietf.org/html/rfc6455#section-7.4.1 - - @since 1.19 ]] normal = 1000, [[Indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled.]] going_away = 1001, [[Indicates that an endpoint is "going away", such as a server going down or a browser having navigated away from a page.]] @@ -40,8 +36,6 @@ enum @beta Efl.Net.Dialer_Websocket_Close_Reason { struct @beta Efl.Net.Dialer_Websocket_Closed_Reason { [[Close reason event payload. - - @since 1.19 ]] reason: Efl.Net.Dialer_Websocket_Close_Reason; [[Closing reason]] message: string; [[Textual closing reason message]] @@ -74,8 +68,6 @@ class @beta Efl.Net.Dialer_Websocket extends Efl.Loop_Consumer implements Efl.Ne - socks5://proxyserver (default port 1080) - socks4a://proxyserver:port (SOCKSv4 and let socks server to resolve domain) - socks4://proxyserver:port (SOCKSv4) - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/efl_net_dialer_windows.eo b/src/lib/ecore_con/efl_net_dialer_windows.eo index 9bce9c35ac..49878f5ece 100644 --- a/src/lib/ecore_con/efl_net_dialer_windows.eo +++ b/src/lib/ecore_con/efl_net_dialer_windows.eo @@ -5,8 +5,6 @@ class @beta Efl.Net.Dialer_Windows extends Efl.Net.Socket_Windows implements Efl Windows CreateNamedPipe(). Note: Proxies are meaningless, thus are not implemented. - - @since 1.19 ]] implements { diff --git a/src/lib/ecore_con/efl_net_ip_address.eo b/src/lib/ecore_con/efl_net_ip_address.eo index b1cdd466c6..8e0370a201 100644 --- a/src/lib/ecore_con/efl_net_ip_address.eo +++ b/src/lib/ecore_con/efl_net_ip_address.eo @@ -4,8 +4,6 @@ struct @beta Efl.Net.Ip_Address_Resolve_Results { [[The results of @Efl.Net.Ip_Address.resolve call. This structure is created by @Efl.Net.Ip_Address.resolve. - - @since 1.19 ]] request_address: string; [[The 'address' argument given to Efl.Net.Ip_Address.resolve]] canonical_name: string; [[The canonical name, if it was requested in flags]] @@ -36,8 +34,6 @@ class @beta Efl.Net.Ip_Address extends Efl.Object { The result of @.string can be passed to @Efl.Net.Dialer.dial and @Efl.Net.Server.serve - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/efl_net_server.eo b/src/lib/ecore_con/efl_net_server.eo index 0f23e5af54..72b0bb25d9 100644 --- a/src/lib/ecore_con/efl_net_server.eo +++ b/src/lib/ecore_con/efl_net_server.eo @@ -9,8 +9,6 @@ interface @beta Efl.Net.Server { interface. These implement the standard @Efl.Io.Reader, @Efl.Io.Writer and @Efl.Io.Closer interfaces, so can be used with utilities such as @Efl.Io.Copier. - - @since 1.19 ]] events { diff --git a/src/lib/ecore_con/efl_net_server_fd.eo b/src/lib/ecore_con/efl_net_server_fd.eo index 74d734d86a..3807d3ddcc 100644 --- a/src/lib/ecore_con/efl_net_server_fd.eo +++ b/src/lib/ecore_con/efl_net_server_fd.eo @@ -1,7 +1,5 @@ abstract @beta Efl.Net.Server_Fd extends Efl.Loop_Fd implements Efl.Net.Server { [[A generic server based on file descriptors. - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/efl_net_server_ip.eo b/src/lib/ecore_con/efl_net_server_ip.eo index ab1f770b54..b398ff7497 100644 --- a/src/lib/ecore_con/efl_net_server_ip.eo +++ b/src/lib/ecore_con/efl_net_server_ip.eo @@ -1,7 +1,5 @@ abstract @beta Efl.Net.Server_Ip extends Efl.Net.Server_Fd { [[An IP server. - - @since 1.20 ]] methods { @property ipv6_only { diff --git a/src/lib/ecore_con/efl_net_server_simple.c b/src/lib/ecore_con/efl_net_server_simple.c index 46924fae25..6ae83dd233 100644 --- a/src/lib/ecore_con/efl_net_server_simple.c +++ b/src/lib/ecore_con/efl_net_server_simple.c @@ -113,10 +113,10 @@ _efl_net_server_simple_inner_server_error(void *data, const Efl_Event *event) } static void -_efl_net_server_simple_inner_server_serving(void *data, const Efl_Event *event) +_efl_net_server_simple_inner_server_serving(void *data, const Efl_Event *event EINA_UNUSED) { Eo *o = data; - efl_event_callback_call(o, EFL_NET_SERVER_EVENT_SERVING, event->info); + efl_event_callback_call(o, EFL_NET_SERVER_EVENT_SERVING, NULL); } EFL_CALLBACKS_ARRAY_DEFINE(_efl_net_server_simple_inner_server_cbs, diff --git a/src/lib/ecore_con/efl_net_server_simple.eo b/src/lib/ecore_con/efl_net_server_simple.eo index 7dc4488731..3fc0400a9c 100644 --- a/src/lib/ecore_con/efl_net_server_simple.eo +++ b/src/lib/ecore_con/efl_net_server_simple.eo @@ -3,8 +3,6 @@ class @beta Efl.Net.Server_Simple extends Efl.Loop_Consumer implements Efl.Net.S This is just a wrapper server. It takes an actual server using @.inner_server or creates one using @.inner_class. - - @since 1.19 ]] methods { @property inner_class { diff --git a/src/lib/ecore_con/efl_net_server_ssl.eo b/src/lib/ecore_con/efl_net_server_ssl.eo index 18a7c22db6..f4bbcf52f3 100644 --- a/src/lib/ecore_con/efl_net_server_ssl.eo +++ b/src/lib/ecore_con/efl_net_server_ssl.eo @@ -1,7 +1,5 @@ class @beta Efl.Net.Server_Ssl extends Efl.Net.Server_Tcp { [[A SSL server over TCP. - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/efl_net_server_tcp.eo b/src/lib/ecore_con/efl_net_server_tcp.eo index 4a4e99833f..0478be67ec 100644 --- a/src/lib/ecore_con/efl_net_server_tcp.eo +++ b/src/lib/ecore_con/efl_net_server_tcp.eo @@ -1,7 +1,5 @@ class @beta Efl.Net.Server_Tcp extends Efl.Net.Server_Ip { [[A TCP server. - - @since 1.19 ]] implements { diff --git a/src/lib/ecore_con/efl_net_server_udp.eo b/src/lib/ecore_con/efl_net_server_udp.eo index b5f5cec09d..3532a7bcb7 100644 --- a/src/lib/ecore_con/efl_net_server_udp.eo +++ b/src/lib/ecore_con/efl_net_server_udp.eo @@ -1,7 +1,5 @@ class @beta Efl.Net.Server_Udp extends Efl.Net.Server_Ip { [[A UDP server. - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/efl_net_server_udp_client.c b/src/lib/ecore_con/efl_net_server_udp_client.c index ec4f1fd6a6..9a4a7990a4 100644 --- a/src/lib/ecore_con/efl_net_server_udp_client.c +++ b/src/lib/ecore_con/efl_net_server_udp_client.c @@ -234,7 +234,7 @@ _efl_net_server_udp_client_efl_io_reader_can_read_set(Eo *o, Efl_Net_Server_Udp_ EINA_SAFETY_ON_TRUE_RETURN(pd->fd == INVALID_SOCKET); if (pd->can_read == can_read) return; pd->can_read = can_read; - efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read); + efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, &can_read); } EOLIAN static Eina_Bool @@ -265,7 +265,7 @@ _efl_net_server_udp_client_efl_io_writer_can_write_set(Eo *o, Efl_Net_Server_Udp EINA_SAFETY_ON_TRUE_RETURN(pd->fd == INVALID_SOCKET); if (pd->can_write == can_write) return; pd->can_write = can_write; - efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write); + efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, &can_write); } EOLIAN static Eina_Bool diff --git a/src/lib/ecore_con/efl_net_server_udp_client.eo b/src/lib/ecore_con/efl_net_server_udp_client.eo index 28d979687c..6ffc5ec5c8 100644 --- a/src/lib/ecore_con/efl_net_server_udp_client.eo +++ b/src/lib/ecore_con/efl_net_server_udp_client.eo @@ -9,8 +9,6 @@ class @beta Efl.Net.Server_Udp_Client extends Efl.Object implements Efl.Net.Sock Given this limitation, some features such as 'cork' (used to coalesce multiple writes() into a single datagram) are not available since it could interfere with other clients. - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/efl_net_server_unix.eo b/src/lib/ecore_con/efl_net_server_unix.eo index 2a541b4eb1..0a7f3f435e 100644 --- a/src/lib/ecore_con/efl_net_server_unix.eo +++ b/src/lib/ecore_con/efl_net_server_unix.eo @@ -6,8 +6,6 @@ class @beta Efl.Net.Server_Unix extends Efl.Net.Server_Fd { created socket must be subject to some special mode or user, change before executing said method, for example by calling umask(2). - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/efl_net_server_windows.eo b/src/lib/ecore_con/efl_net_server_windows.eo index e235ea0bb5..fad8a4f318 100644 --- a/src/lib/ecore_con/efl_net_server_windows.eo +++ b/src/lib/ecore_con/efl_net_server_windows.eo @@ -5,8 +5,6 @@ class @beta Efl.Net.Server_Windows extends Efl.Loop_Consumer implements Efl.Net. directly, so the path will be accessed and created in that method. If the created socket must be subject to some special mode or user, change before executing said method. - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/efl_net_session.eo b/src/lib/ecore_con/efl_net_session.eo index 81ef902a47..d9f55e5c0f 100644 --- a/src/lib/ecore_con/efl_net_session.eo +++ b/src/lib/ecore_con/efl_net_session.eo @@ -1,7 +1,5 @@ enum @beta Efl.Net.Session_State { [[Provides the session connectivity state. - - @since 1.19 ]] offline, [[No access point is connected.]] local, [[At least one access point has connected and the internet connection hasn't been verified.]] @@ -11,8 +9,6 @@ enum @beta Efl.Net.Session_State { /* keep in sync with efl_net_control_technology.eo, comment what doesn't make sense */ enum @beta Efl.Net.Session_Technology { [[Bitwise-able technologies to allow for a network session. - - @since 1.9 ]] unknown = 0, [[Type: unknown]] /* system = (1 << 0), [[Type: system]]*/ @@ -47,8 +43,6 @@ class @beta Efl.Net.Session extends Efl.Loop_Consumer { Note: the @.connect method is subject to backend policy. For instance, ConnMan uses https://github.com/aldebaran/connman/blob/master/doc/session-policy-format.txt - - @since 1.19 ]] events { changed: void; [[Called when some properties were changed.]] diff --git a/src/lib/ecore_con/efl_net_socket.eo b/src/lib/ecore_con/efl_net_socket.eo index 90804f366c..c16a19dc51 100644 --- a/src/lib/ecore_con/efl_net_socket.eo +++ b/src/lib/ecore_con/efl_net_socket.eo @@ -7,8 +7,6 @@ interface @beta Efl.Net.Socket extends Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Clos - @Efl.Io.Closer: to close the socket for further operations. As such it can be used with utilities like @Efl.Io.Copier. - - @since 1.19 ]] methods { @property address_local { diff --git a/src/lib/ecore_con/efl_net_socket_fd.eo b/src/lib/ecore_con/efl_net_socket_fd.eo index a02cb65666..8c4147fa33 100644 --- a/src/lib/ecore_con/efl_net_socket_fd.eo +++ b/src/lib/ecore_con/efl_net_socket_fd.eo @@ -7,8 +7,6 @@ class @beta Efl.Net.Socket_Fd extends Efl.Loop_Fd implements Efl.Io.Reader_Fd, E @Efl.Io.Closer.close_on_exec and @Efl.Io.Closer.close_on_invalidate are respected and default to $true. - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/efl_net_socket_simple.eo b/src/lib/ecore_con/efl_net_socket_simple.eo index dd255b5003..493fe30a13 100644 --- a/src/lib/ecore_con/efl_net_socket_simple.eo +++ b/src/lib/ecore_con/efl_net_socket_simple.eo @@ -33,8 +33,6 @@ class @beta Efl.Net.Socket_Simple extends Efl.Io.Buffered_Stream implements Efl. @Efl.Io.Buffered_Stream.inner_io.set and can be retrieved with @Efl.Io.Buffered_Stream.inner_io.get, which should be used with care. - - @since 1.19 ]] implements { diff --git a/src/lib/ecore_con/efl_net_socket_ssl.c b/src/lib/ecore_con/efl_net_socket_ssl.c index 4d2c0c08f4..c952acbaeb 100644 --- a/src/lib/ecore_con/efl_net_socket_ssl.c +++ b/src/lib/ecore_con/efl_net_socket_ssl.c @@ -536,7 +536,7 @@ _efl_net_socket_ssl_efl_io_reader_can_read_set(Eo *o, Efl_Net_Socket_Ssl_Data *p EINA_SAFETY_ON_NULL_RETURN(pd->sock); if (pd->can_read == can_read) return; pd->can_read = can_read; - efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read); + efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, &can_read); } EOLIAN static Eina_Bool @@ -599,7 +599,7 @@ _efl_net_socket_ssl_efl_io_writer_can_write_set(Eo *o, Efl_Net_Socket_Ssl_Data * EINA_SAFETY_ON_NULL_RETURN(pd->sock); if (pd->can_write == can_write) return; pd->can_write = can_write; - efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write); + efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, &can_write); } EOLIAN static Eina_Bool diff --git a/src/lib/ecore_con/efl_net_socket_ssl.eo b/src/lib/ecore_con/efl_net_socket_ssl.eo index 7abc0001ad..9fb0031473 100644 --- a/src/lib/ecore_con/efl_net_socket_ssl.eo +++ b/src/lib/ecore_con/efl_net_socket_ssl.eo @@ -8,8 +8,6 @@ class @beta Efl.Net.Socket_Ssl extends Efl.Loop_Consumer implements Efl.Net.Sock communication. One common use is to apply it to TCP sockets created with @Efl.Net.Dialer_Tcp or @Efl.Net.Server_Tcp created with "client,add" event. - - @since 1.19 ]] events { diff --git a/src/lib/ecore_con/efl_net_socket_tcp.eo b/src/lib/ecore_con/efl_net_socket_tcp.eo index 449f255540..b3232501ca 100644 --- a/src/lib/ecore_con/efl_net_socket_tcp.eo +++ b/src/lib/ecore_con/efl_net_socket_tcp.eo @@ -3,8 +3,6 @@ class @beta Efl.Net.Socket_Tcp extends Efl.Net.Socket_Fd { This is the common class and takes an existing FD, usually created by an dialer or server. - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/efl_net_socket_udp.eo b/src/lib/ecore_con/efl_net_socket_udp.eo index dd36e8c58e..2e5ed25350 100644 --- a/src/lib/ecore_con/efl_net_socket_udp.eo +++ b/src/lib/ecore_con/efl_net_socket_udp.eo @@ -9,8 +9,6 @@ class @beta Efl.Net.Socket_Udp extends Efl.Net.Socket_Fd { Since for the server 'clients' there is no accepted connection it will reuse the same file decriptor. To avoid it being closed, another class Efl.Net.Server_Udp_Client is used instead. - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/efl_net_socket_unix.eo b/src/lib/ecore_con/efl_net_socket_unix.eo index b7a193efc0..04105d4b71 100644 --- a/src/lib/ecore_con/efl_net_socket_unix.eo +++ b/src/lib/ecore_con/efl_net_socket_unix.eo @@ -3,8 +3,6 @@ class @beta Efl.Net.Socket_Unix extends Efl.Net.Socket_Fd { This is the common class and takes an existing FD, usually created by an dialer or server. - - @since 1.19 ]] implements { diff --git a/src/lib/ecore_con/efl_net_socket_windows.c b/src/lib/ecore_con/efl_net_socket_windows.c index 0aaa8ed221..717f0a0256 100644 --- a/src/lib/ecore_con/efl_net_socket_windows.c +++ b/src/lib/ecore_con/efl_net_socket_windows.c @@ -816,7 +816,7 @@ _efl_net_socket_windows_efl_io_reader_can_read_set(Eo *o, Efl_Net_Socket_Windows EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o) && can_read); if (pd->can_read == can_read) return; pd->can_read = can_read; - efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read); + efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, &can_read); } EOLIAN static Eina_Bool @@ -899,7 +899,7 @@ _efl_net_socket_windows_efl_io_writer_can_write_set(Eo *o, Efl_Net_Socket_Window EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o) && can_write); if (pd->can_write == can_write) return; pd->can_write = can_write; - efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write); + efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, &can_write); } EOLIAN static Eina_Bool diff --git a/src/lib/ecore_con/efl_net_socket_windows.eo b/src/lib/ecore_con/efl_net_socket_windows.eo index dbce9f133b..aebc5ca546 100644 --- a/src/lib/ecore_con/efl_net_socket_windows.eo +++ b/src/lib/ecore_con/efl_net_socket_windows.eo @@ -4,8 +4,6 @@ class @beta Efl.Net.Socket_Windows extends Efl.Loop_Consumer implements Efl.Net. This is the common class and takes an existing file HANDLE, usually created by an dialer (CreatFile()) or server (CreateNamedPipe()). - - @since 1.19 ]] implements { diff --git a/src/lib/ecore_con/efl_net_ssl_context.eo b/src/lib/ecore_con/efl_net_ssl_context.eo index c6ad382341..2557a03552 100644 --- a/src/lib/ecore_con/efl_net_ssl_context.eo +++ b/src/lib/ecore_con/efl_net_ssl_context.eo @@ -12,8 +12,6 @@ class @beta Efl.Net.Ssl.Context extends Efl.Object { operational parameters. Note: All setter methods must be called before @Efl.Object.finalize. - - @since 1.19 ]] methods { diff --git a/src/lib/ecore_con/meson.build b/src/lib/ecore_con/meson.build index d46a8cdb04..743904285c 100644 --- a/src/lib/ecore_con/meson.build +++ b/src/lib/ecore_con/meson.build @@ -200,9 +200,11 @@ ecore_con = declare_dependency( dependencies: ecore_con_pub_deps, ) -install_data(pub_eo_files + pub_eo_types_files, - install_dir: eolian_ecore_dir -) +if get_option('install-eo-files') + install_data(pub_eo_files + pub_eo_types_files, + install_dir: eolian_ecore_dir + ) +endif install_headers(ecore_con_header_src, install_dir : dir_package_include, diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index fed477f56c..2274345590 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -792,6 +792,18 @@ EAPI int ecore_drm2_output_supported_rotations_get(Ecore_Drm2_Output *output); */ EAPI Eina_Bool ecore_drm2_output_rotation_set(Ecore_Drm2_Output *output, int rotation); +/** + * Get current output rotation + * + * @param output + * + * @return An integer representing the output current rotation + * + * @ingroup Ecore_Drm2_Output_Group + * @since 1.22 + */ +EAPI int ecore_drm2_output_rotation_get(Ecore_Drm2_Output *output); + /** * Set the user data for the output's page flip handler * diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c index 6888a3c2c1..017f981693 100644 --- a/src/lib/ecore_drm2/ecore_drm2_fb.c +++ b/src/lib/ecore_drm2/ecore_drm2_fb.c @@ -413,6 +413,25 @@ _fb_atomic_flip_test(Ecore_Drm2_Output *output) sym_drmModeAtomicAddProperty(req, pstate->obj_id, pstate->ch.id, pstate->ch.value); if (ret < 0) goto err; + +#if 0 + /* XXX: Disable hardware plane rotation for now as this has broken + * recently. The break happens because of an invalid argument, + * ie: the value being sent from pstate->rotation_map ends up being + * incorrect for some reason. I suspect the breakage to be from + * kernel drivers (linux 4.20.0) but have not confirmed that version */ + if ((pstate->rotation.id) && + (pstate->type.value == DRM_PLANE_TYPE_PRIMARY)) + { + DBG("Plane %d Atomic Rotation: %lu", + pstate->obj_id, pstate->rotation.value); + ret = + sym_drmModeAtomicAddProperty(req, pstate->obj_id, + pstate->rotation.id, + pstate->rotation_map[pstate->rotation.value]); + if (ret < 0) goto err; + } +#endif } ret = diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index a820f7d3f5..6734cacdff 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1518,10 +1518,18 @@ ecore_drm2_output_supported_rotations_get(Ecore_Drm2_Output *output) EAPI Eina_Bool ecore_drm2_output_rotation_set(Ecore_Drm2_Output *output, int rotation) { - Eina_Bool ret = EINA_FALSE; + Eina_Bool ret = EINA_TRUE; EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE); + output->rotation = rotation; + +#if 0 + /* XXX: Disable hardware plane rotation for now as this has broken + * recently. The break happens because of an invalid argument, + * ie: the value being sent from pstate->rotation_map ends up being + * incorrect for some reason. I suspect the breakage to be from + * kernel drivers (linux 4.20.0) but have not confirmed that version */ if (_ecore_drm2_use_atomic) { Eina_List *l; @@ -1563,10 +1571,18 @@ ecore_drm2_output_rotation_set(Ecore_Drm2_Output *output, int rotation) err: sym_drmModeAtomicFree(req); } +#endif return ret; } +EAPI int +ecore_drm2_output_rotation_get(Ecore_Drm2_Output *output) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(output, -1); + return output->rotation; +} + EAPI unsigned int ecore_drm2_output_subpixel_get(const Ecore_Drm2_Output *output) { @@ -1659,8 +1675,21 @@ ecore_drm2_output_info_get(Ecore_Drm2_Output *output, int *x, int *y, int *w, in EINA_SAFETY_ON_NULL_RETURN(output); EINA_SAFETY_ON_TRUE_RETURN(!output->current_mode); - if (w) *w = output->current_mode->width; - if (h) *h = output->current_mode->height; + switch (output->rotation) + { + case ECORE_DRM2_ROTATION_90: + case ECORE_DRM2_ROTATION_270: + if (w) *w = output->current_mode->height; + if (h) *h = output->current_mode->width; + break; + case ECORE_DRM2_ROTATION_NORMAL: + case ECORE_DRM2_ROTATION_180: + default: + if (w) *w = output->current_mode->width; + if (h) *h = output->current_mode->height; + break; + } + if (refresh) *refresh = output->current_mode->refresh; if (x) *x = output->x; if (y) *y = output->y; diff --git a/src/lib/ecore_drm2/ecore_drm2_plane.c b/src/lib/ecore_drm2/ecore_drm2_plane.c index b9601cc347..6dfa0bcb85 100644 --- a/src/lib/ecore_drm2/ecore_drm2_plane.c +++ b/src/lib/ecore_drm2/ecore_drm2_plane.c @@ -181,6 +181,13 @@ ecore_drm2_plane_fb_set(Ecore_Drm2_Plane *plane, Ecore_Drm2_Fb *fb) fallback_id = plane->state->fid.value; plane->state->fid.value = fb->id; + + /* Update plane state based on fb */ + plane->state->sw.value = fb->w << 16; + plane->state->sh.value = fb->h << 16; + plane->state->cw.value = fb->w; + plane->state->ch.value = fb->h; + if (_fb_atomic_flip_test(plane->output)) { _ecore_drm2_fb_ref(fb); diff --git a/src/lib/ecore_drm2/ecore_drm2_private.h b/src/lib/ecore_drm2/ecore_drm2_private.h index d1a749a871..25aaac7d71 100644 --- a/src/lib/ecore_drm2/ecore_drm2_private.h +++ b/src/lib/ecore_drm2/ecore_drm2_private.h @@ -208,6 +208,7 @@ struct _Ecore_Drm2_Output int fd; int pipe; int x, y, w, h, pw, ph; + int rotation; long fallback_sec, fallback_usec; diff --git a/src/lib/ector/cairo/meson.build b/src/lib/ector/cairo/meson.build index 123ea90d1f..094aedb3e6 100644 --- a/src/lib/ector/cairo/meson.build +++ b/src/lib/ector/cairo/meson.build @@ -31,6 +31,9 @@ foreach eo_file : pub_eo_files '-gchd', '@INPUT@']) endforeach -install_data(pub_eo_files, - install_dir: join_paths(eolian_include_dir, package_version_name) -) + +if get_option('install-eo-files') + install_data(pub_eo_files, + install_dir: join_paths(eolian_include_dir, package_version_name) + ) +endif diff --git a/src/lib/ector/ector_buffer.eo b/src/lib/ector/ector_buffer.eo index 226f19a725..c53ecc8962 100644 --- a/src/lib/ector/ector_buffer.eo +++ b/src/lib/ector/ector_buffer.eo @@ -24,8 +24,6 @@ enum @beta Ector.Buffer.Access_Flag { mixin @beta Ector.Buffer { [[2D pixel buffer interface for Ector - - @since 1.17 ]] eo_prefix: ector_buffer; methods { diff --git a/src/lib/ector/gl/meson.build b/src/lib/ector/gl/meson.build index 071e98eaee..ab87d79b4d 100644 --- a/src/lib/ector/gl/meson.build +++ b/src/lib/ector/gl/meson.build @@ -34,6 +34,9 @@ foreach eo_file : pub_eo_files '-gchd', '@INPUT@']) endforeach -install_data(pub_eo_files, - install_dir: join_paths(eolian_include_dir, package_version_name) -) + +if get_option('install-eo-files') + install_data(pub_eo_files, + install_dir: join_paths(eolian_include_dir, package_version_name) + ) +endif diff --git a/src/lib/ector/meson.build b/src/lib/ector/meson.build index 5b86466873..069e98d9e7 100644 --- a/src/lib/ector/meson.build +++ b/src/lib/ector/meson.build @@ -55,9 +55,11 @@ pub_eo_types_files = [ 'ector_types.eot' ] -install_data(ector_pub_eo_files + pub_eo_types_files, - install_dir: join_paths(eolian_include_dir, package_version_name) -) +if get_option('install-eo-files') + install_data(ector_pub_eo_files + pub_eo_types_files, + install_dir: join_paths(eolian_include_dir, package_version_name) + ) +endif foreach eo_file : pub_eo_types_files pub_eo_file_target += custom_target('eolian_gen_' + eo_file, diff --git a/src/lib/ector/software/meson.build b/src/lib/ector/software/meson.build index 1484553374..2dff5be26c 100644 --- a/src/lib/ector/software/meson.build +++ b/src/lib/ector/software/meson.build @@ -45,6 +45,9 @@ if cpu_sse3 == true ector_opt_lib += [ ector_opt ] endif -install_data(pub_eo_files, - install_dir: join_paths(eolian_include_dir, package_version_name) -) + +if get_option('install-eo-files') + install_data(pub_eo_files, + install_dir: join_paths(eolian_include_dir, package_version_name) + ) +endif diff --git a/src/lib/edje/Edje.h b/src/lib/edje/Edje.h index 4d747fc9ea..d8c32dc8c1 100644 --- a/src/lib/edje/Edje.h +++ b/src/lib/edje/Edje.h @@ -253,9 +253,7 @@ extern "C" { #ifndef EFL_NOLEGACY_API_SUPPORT #include "Edje_Legacy.h" #endif -#ifdef EFL_EO_API_SUPPORT #include "Edje_Eo.h" -#endif #ifdef __cplusplus } diff --git a/src/lib/edje/efl_canvas_layout.eo b/src/lib/edje/efl_canvas_layout.eo index 424deb5b90..0653bb41ac 100644 --- a/src/lib/edje/efl_canvas_layout.eo +++ b/src/lib/edje/efl_canvas_layout.eo @@ -44,8 +44,7 @@ class @beta Efl.Canvas.Layout extends Efl.Canvas.Group implements Efl.File, Efl. Edje naming follows a incrementional convention: first registered name is "seat1", second is "seat2", differently from Evas. - - @since 1.19]] + ]] return: Efl.Input.Device; [[The seat device or $null if not found.]] } @@ -61,9 +60,7 @@ class @beta Efl.Canvas.Layout extends Efl.Canvas.Group implements Efl.File, Efl. Edje naming follows a incrementional convention: first registered name is "seat1", second is "seat2", differently from Evas. - - @since 1.19]] - + ]] return: stringshare; [[The name's character string or $null if not found.]] } keys { diff --git a/src/lib/edje/efl_canvas_layout_part.eo b/src/lib/edje/efl_canvas_layout_part.eo index 416ab4aa97..72bee1c5d8 100644 --- a/src/lib/edje/efl_canvas_layout_part.eo +++ b/src/lib/edje/efl_canvas_layout_part.eo @@ -8,8 +8,6 @@ class @beta Efl.Canvas.Layout_Part extends Efl.Object implements Efl.Gfx.Entity, to be used for one and only one function call. In pseudo-code, the use of object of this type looks like the following: rect = layout.part("somepart").geometry_get(); - - @since 1.20 ]] methods { @property state { diff --git a/src/lib/edje/efl_canvas_layout_part_external.eo b/src/lib/edje/efl_canvas_layout_part_external.eo index 7750480147..ea8b00cfa0 100644 --- a/src/lib/edje/efl_canvas_layout_part_external.eo +++ b/src/lib/edje/efl_canvas_layout_part_external.eo @@ -20,8 +20,6 @@ class @beta Efl.Canvas.Layout_Part_External extends Efl.Canvas.Layout_Part imple efl_text_set(efl_part(layout, "title"), "hello"); Or in pseudo-script: layout["title"].text = "hello"; - - @since 1.20 ]] data: null; implements { diff --git a/src/lib/edje/efl_canvas_layout_part_invalid.eo b/src/lib/edje/efl_canvas_layout_part_invalid.eo index 6268f2a5d5..54720569d2 100644 --- a/src/lib/edje/efl_canvas_layout_part_invalid.eo +++ b/src/lib/edje/efl_canvas_layout_part_invalid.eo @@ -9,8 +9,6 @@ class @beta Efl.Canvas.Layout_Part_Invalid extends Efl.Canvas.Layout_Part implem to be used for one and only one function call. In pseudo-code, the use of object of this type looks like the following: rect = layout.part("somepart").geometry_get(); - - @since 1.20 ]] data: null; implements { diff --git a/src/lib/edje/efl_layout_calc.eo b/src/lib/edje/efl_layout_calc.eo index b5b45c540d..8864691313 100644 --- a/src/lib/edje/efl_layout_calc.eo +++ b/src/lib/edje/efl_layout_calc.eo @@ -8,7 +8,7 @@ interface Efl.Layout.Calc This defines all the APIs supported by legacy "Edje" object, known in EO API as Efl.Canvas.Layout. - @since 1.21 + @since 1.22 ]] event_prefix: efl_layout; methods { diff --git a/src/lib/edje/efl_layout_group.eo b/src/lib/edje/efl_layout_group.eo index 8c75204671..78592ab988 100644 --- a/src/lib/edje/efl_layout_group.eo +++ b/src/lib/edje/efl_layout_group.eo @@ -4,7 +4,7 @@ interface Efl.Layout.Group { [[APIs representing static data from a group in an edje file. - @since 1.21 + @since 1.22 ]] methods { @property group_size_min { diff --git a/src/lib/edje/efl_layout_signal.eo b/src/lib/edje/efl_layout_signal.eo index 3b4562e596..df2f234bc9 100644 --- a/src/lib/edje/efl_layout_signal.eo +++ b/src/lib/edje/efl_layout_signal.eo @@ -2,14 +2,17 @@ Edje signaling interface. Note: This API must be manually bound in other languages as this uses function - pointers! This is by design, to keep the API simplhe API simple. + pointers! This is by design, to keep the API simple. If function pointers really become allowed in EO this needs to be altered to match that. */ function EflLayoutSignalCb { - [[EflLayoutSignalCb function that is called when a specifc pair of signal/emision is triggered]] + [[EflLayoutSignalCb function that is called when a specifc pair of signal/emision is triggered + + @since 1.22 + ]] params { @in object: Efl.Layout.Signal; [[The object the callback is being triggered from.]] @in emission: string; [[The name component of the signal.]] @@ -21,7 +24,7 @@ interface Efl.Layout.Signal { [[Layouts asynchronous messaging and signaling interface. - @since 1.21 + @since 1.22 ]] methods { // FIXME: There is no message_handler in EO! diff --git a/src/lib/edje/meson.build b/src/lib/edje/meson.build index c45dced7f8..23d93ce27e 100644 --- a/src/lib/edje/meson.build +++ b/src/lib/edje/meson.build @@ -158,9 +158,12 @@ edje = declare_dependency( dependencies: edje_pub_deps, ) -install_data(pub_eo_files + pub_eo_types_files, - install_dir: join_paths(eolian_include_dir, package_version_name) -) + +if get_option('install-eo-files') + install_data(pub_eo_files + pub_eo_types_files, + install_dir: join_paths(eolian_include_dir, package_version_name) + ) +endif install_headers(edje_header_src, install_dir : dir_package_include, diff --git a/src/lib/efl/Efl_Config.h.cmake b/src/lib/efl/Efl_Config.h.cmake index 4f7a03ac1f..5c7a420dae 100644 --- a/src/lib/efl/Efl_Config.h.cmake +++ b/src/lib/efl/Efl_Config.h.cmake @@ -3,16 +3,12 @@ /* Add -DEFL_API_OVERRIDE ot your CFLAGS to override the default * installed api set and then fter that -DEFL_NOLEGACY_API_SUPPORT - * and/or -DEFL_EO_API_SUPPORT as desired + * as desired */ #ifndef EFL_API_OVERRIDE #cmakedefine EFL_API_LEGACY_DEF #cmakedefine EFL_BETA_API_SUPPORT -/* You can't disable Eo API anymore as EFL use it everywhere internally - and we don't want to expose it publicly just yet, so keep it hidden - and require an explicit request to get it. */ -/* #define EFL_EO_API_SUPPORT */ #endif #define EFL_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ diff --git a/src/lib/efl/Efl_Config.h.in b/src/lib/efl/Efl_Config.h.in index 25420d0c4e..1673cd04e9 100644 --- a/src/lib/efl/Efl_Config.h.in +++ b/src/lib/efl/Efl_Config.h.in @@ -3,14 +3,10 @@ /* Add -DEFL_API_OVERRIDE ot your CFLAGS to override the default * installed api set and then fter that -DEFL_NOLEGACY_API_SUPPORT - * and/or -DEFL_EO_API_SUPPORT as desired + * as desired */ #ifndef EFL_API_OVERRIDE @EFL_API_LEGACY_DEF@ -/* You can't disable Eo API anymore as EFL use it everywhere internally - and we don't want to expose it publicly just yet, so keep it hidden - and require an explicit request to get it. */ -/* @EFL_API_EO_DEF@ */ #endif #define EFL_VERSION_MAJOR @EFL_VERSION_MAJOR@ diff --git a/src/lib/efl/interfaces/efl_canvas_pointer.eo b/src/lib/efl/interfaces/efl_canvas_pointer.eo index 9dbaef00fd..705b17d5e6 100644 --- a/src/lib/efl/interfaces/efl_canvas_pointer.eo +++ b/src/lib/efl/interfaces/efl_canvas_pointer.eo @@ -2,7 +2,10 @@ import efl_input_device; interface Efl.Canvas.Pointer { - [[Efl Canvas Pointer interface]] + [[Efl Canvas Pointer interface + + @since 1.22 + ]] methods { /* FIXME Efl.Input.Device is not stable yet*/ @property pointer_inside @beta { diff --git a/src/lib/efl/interfaces/efl_canvas_scene.eo b/src/lib/efl/interfaces/efl_canvas_scene.eo index d8a1619ef2..fd1a8180d9 100644 --- a/src/lib/efl/interfaces/efl_canvas_scene.eo +++ b/src/lib/efl/interfaces/efl_canvas_scene.eo @@ -3,7 +3,10 @@ import efl_gfx_types; interface Efl.Canvas.Scene { - [[Interface containing basic canvas-related methods and events.]] + [[Interface containing basic canvas-related methods and events. + + @since 1.22 + ]] methods { @property image_max_size { get { @@ -149,8 +152,6 @@ interface Efl.Canvas.Scene A "seat" is the term used for a group of input devices, typically including a pointer and a keyboard. A seat object is the parent of the individual input devices. - - @since 1.20 ]] return: iterator @owned; [[An iterator over the attached seats.]] diff --git a/src/lib/efl/interfaces/efl_container.eo b/src/lib/efl/interfaces/efl_container.eo index 88664432a0..d45d0a1d75 100644 --- a/src/lib/efl/interfaces/efl_container.eo +++ b/src/lib/efl/interfaces/efl_container.eo @@ -4,6 +4,8 @@ interface Efl.Container APIs in this interface deal with containers of multiple sub objects, not with individual parts. + + @since 1.22 ]] eo_prefix: efl_content; event_prefix: efl_container; diff --git a/src/lib/efl/interfaces/efl_content.eo b/src/lib/efl/interfaces/efl_content.eo index 4f84abac4b..ed3e96b18c 100644 --- a/src/lib/efl/interfaces/efl_content.eo +++ b/src/lib/efl/interfaces/efl_content.eo @@ -4,6 +4,8 @@ interface Efl.Content This is used for the default content part of widgets, as well as for individual parts through @Efl.Part. + + @since 1.22 ]] methods { @property content { diff --git a/src/lib/efl/interfaces/efl_file.eo b/src/lib/efl/interfaces/efl_file.eo index ef45ce37c4..6711dfb579 100644 --- a/src/lib/efl/interfaces/efl_file.eo +++ b/src/lib/efl/interfaces/efl_file.eo @@ -2,7 +2,10 @@ import eina_types; import efl_gfx_types; mixin Efl.File requires Efl.Object { - [[Efl file interface]] + [[Efl file interface + + @since 1.22 + ]] methods { @property mmap { set { diff --git a/src/lib/efl/interfaces/efl_file_save.eo b/src/lib/efl/interfaces/efl_file_save.eo index 715f3a215b..e9a72ec262 100644 --- a/src/lib/efl/interfaces/efl_file_save.eo +++ b/src/lib/efl/interfaces/efl_file_save.eo @@ -3,14 +3,20 @@ import eina_types; struct Efl.File_Save_Info { - [[Info used to determine various attributes when saving a file.]] + [[Info used to determine various attributes when saving a file. + + @since 1.22 + ]] quality: uint; [[The quality level (0-100) to save the file with; commonly used when saving image files.]] compression: uint; [[The compression level (0-100) to save the file with.]] encoding: string; [[The encoding to use when saving the file.]] } interface Efl.File_Save { - [[Efl file saving interface]] + [[Efl file saving interface + + @since 1.22 + ]] methods { save @const { [[Save the given image object's contents to an (image) file. diff --git a/src/lib/efl/interfaces/efl_gfx_color.eo b/src/lib/efl/interfaces/efl_gfx_color.eo index d3c41e1e31..fa0d1d4c37 100644 --- a/src/lib/efl/interfaces/efl_gfx_color.eo +++ b/src/lib/efl/interfaces/efl_gfx_color.eo @@ -2,7 +2,10 @@ import efl_gfx_types; mixin Efl.Gfx.Color { - [[Efl Gfx Color mixin class]] + [[Efl Gfx Color mixin class + + @since 1.22 + ]] data: null; methods { @property color @pure_virtual { diff --git a/src/lib/efl/interfaces/efl_gfx_color_class.eo b/src/lib/efl/interfaces/efl_gfx_color_class.eo index 51bade3d11..25d822bdc8 100644 --- a/src/lib/efl/interfaces/efl_gfx_color_class.eo +++ b/src/lib/efl/interfaces/efl_gfx_color_class.eo @@ -120,8 +120,7 @@ mixin @beta Efl.Gfx.Color_Class This function deletes any color classes defined in object level. Clearing color classes will revert the color of all edje parts to the values defined in global level or theme file. - - @since 1.17.0]] + ]] } } } diff --git a/src/lib/efl/interfaces/efl_gfx_entity.eo b/src/lib/efl/interfaces/efl_gfx_entity.eo index 48caf1ecb3..358228c5ce 100644 --- a/src/lib/efl/interfaces/efl_gfx_entity.eo +++ b/src/lib/efl/interfaces/efl_gfx_entity.eo @@ -1,7 +1,10 @@ import eina_types; interface Efl.Gfx.Entity { - [[Efl graphics interface]] + [[Efl graphics interface + + @since 1.22 + ]] eo_prefix: efl_gfx_entity; methods { @property position { diff --git a/src/lib/efl/interfaces/efl_gfx_filter.eo b/src/lib/efl/interfaces/efl_gfx_filter.eo index 5cee031f3f..5e8e0e982b 100644 --- a/src/lib/efl/interfaces/efl_gfx_filter.eo +++ b/src/lib/efl/interfaces/efl_gfx_filter.eo @@ -7,8 +7,6 @@ interface @beta Efl.Gfx.Filter be found under "EFL Graphics Filters". This was a beta feature since 1.15. - - @since 1.18 ]] eo_prefix: efl_gfx; methods { diff --git a/src/lib/efl/interfaces/efl_gfx_frame_controller.eo b/src/lib/efl/interfaces/efl_gfx_frame_controller.eo index 1b53f3a454..79712182f4 100644 --- a/src/lib/efl/interfaces/efl_gfx_frame_controller.eo +++ b/src/lib/efl/interfaces/efl_gfx_frame_controller.eo @@ -19,8 +19,6 @@ interface @beta Efl.Gfx.Frame_Controller This will be $true for animated object for instance but $false for a single frame object. - - @since 1.1 ]] } values { @@ -34,8 +32,6 @@ interface @beta Efl.Gfx.Frame_Controller ]] set { [[Set the frame to current frame of an animated object. - - @since 1.1 ]] return: bool; [[Returns $true if the frame index is valid.]] } @@ -49,8 +45,6 @@ interface @beta Efl.Gfx.Frame_Controller [[Get the total number of frames of the object, if animated. Returns -1 if not animated. - - @since 1.1 ]] return: int; [[The number of frames in the animated object.]] } @@ -70,8 +64,6 @@ interface @beta Efl.Gfx.Frame_Controller 1->2->3->2->1->2->3->1... The default type is @Efl.Gfx.Frame_Controller_Loop_Hint.loop. - - @since 1.1 ]] return: Efl.Gfx.Frame_Controller_Loop_Hint; [[Loop type of the animated object.]] } @@ -86,8 +78,6 @@ interface @beta Efl.Gfx.Frame_Controller If 0 is returned, then looping should happen indefinitely (no limit to the number of times it loops). - - @since 1.1 ]] return: int; [[The number of loop of an animated object.]] } @@ -102,8 +92,6 @@ interface @beta Efl.Gfx.Frame_Controller If $start_frame is 1 and $frame_num is 0, this returns the duration of frame 1. If $start_frame is 1 and $frame_num is 1, this returns the total duration of frame 1 + frame 2. - - @since 1.1 ]] } keys { diff --git a/src/lib/efl/interfaces/efl_gfx_hint.eo b/src/lib/efl/interfaces/efl_gfx_hint.eo index c45f97633c..08f521fcf4 100644 --- a/src/lib/efl/interfaces/efl_gfx_hint.eo +++ b/src/lib/efl/interfaces/efl_gfx_hint.eo @@ -6,7 +6,10 @@ const Efl.Gfx.Hint_Expand: double = 1.0; interface Efl.Gfx.Hint { - [[Efl graphics hint interface]] + [[Efl graphics hint interface + + @since 1.22 + ]] event_prefix: efl_gfx_entity; methods { @property hint_aspect { diff --git a/src/lib/efl/interfaces/efl_gfx_image.eo b/src/lib/efl/interfaces/efl_gfx_image.eo index 3167b3ec3b..1ef54efe8c 100644 --- a/src/lib/efl/interfaces/efl_gfx_image.eo +++ b/src/lib/efl/interfaces/efl_gfx_image.eo @@ -148,8 +148,6 @@ interface @beta Efl.Gfx.Image as stored in the original file. This is a read-only property, and may return 0x0. - - @since 1.20 ]] get {} values { diff --git a/src/lib/efl/interfaces/efl_gfx_image_load_controller.eo b/src/lib/efl/interfaces/efl_gfx_image_load_controller.eo index d0cef46b35..84f0cc0527 100644 --- a/src/lib/efl/interfaces/efl_gfx_image_load_controller.eo +++ b/src/lib/efl/interfaces/efl_gfx_image_load_controller.eo @@ -92,8 +92,6 @@ interface @beta Efl.Gfx.Image_Load_Controller @property load_region_support { [[Indicates whether the @.load_region property is supported for the current file. - - @since 1.2 ]] get {} values { @@ -130,8 +128,6 @@ interface @beta Efl.Gfx.Image_Load_Controller JPEG image. If this flag is $false, then the orientation will be ignored at load time, otherwise the image will be loaded with the proper orientation. - - @since 1.1 ]] set {} get {} diff --git a/src/lib/efl/interfaces/efl_gfx_path.eo b/src/lib/efl/interfaces/efl_gfx_path.eo index 5f8e0baa59..e370ea5a08 100644 --- a/src/lib/efl/interfaces/efl_gfx_path.eo +++ b/src/lib/efl/interfaces/efl_gfx_path.eo @@ -8,8 +8,6 @@ mixin @beta Efl.Gfx.Path @property path { [[Set the list of commands and points to be used to create the content of path. - - @since 1.18 ]] set { } @@ -50,8 +48,6 @@ mixin @beta Efl.Gfx.Path /* FIXME: Return a new object!!! */ copy_from { [[Copy the path data from the object specified. - - @since 1.18 ]] params { @in dup_from: const(Efl.Object); [[Shape object from where data will be copied.]] @@ -59,8 +55,6 @@ mixin @beta Efl.Gfx.Path } bounds_get @const { [[Compute and return the bounding box of the currently set path - - @since 1.18 ]] params { @out r: Eina.Rect; [[Contain the bounding box of the currently set path]] @@ -68,8 +62,6 @@ mixin @beta Efl.Gfx.Path } reset { [[Reset the path data of the path object. - - @since 1.18 ]] } append_move_to { @@ -77,8 +69,6 @@ mixin @beta Efl.Gfx.Path implicitly starting a new subpath and closing the previous one. See also @.append_close. - - @since 1.18 ]] params { @in x: double; [[X co-ordinate of the current point.]] @@ -94,8 +84,6 @@ mixin @beta Efl.Gfx.Path a point. See also @.append_move_to. - - @since 1.18 ]] params { @in x: double; [[X co-ordinate of end point of the line.]] @@ -107,8 +95,6 @@ mixin @beta Efl.Gfx.Path given end point (x,y) using the control points specified by (ctrl_x, ctrl_y). After the path is drawn, the current position is updated to be at the end point of the path. - - @since 1.18 ]] params { @in x: double; [[X co-ordinate of end point of the line.]] @@ -122,8 +108,6 @@ mixin @beta Efl.Gfx.Path that it uses the current control point to draw the bezier. See also @.append_quadratic_to. - - @since 1.18 ]] params { @in x: double; [[X co-ordinate of end point of the line.]] @@ -135,8 +119,6 @@ mixin @beta Efl.Gfx.Path given end point (x,y) using the control points specified by (ctrl_x0, ctrl_y0), and (ctrl_x1, ctrl_y1). After the path is drawn, the current position is updated to be at the end point of the path. - - @since 1.18 ]] params { @in ctrl_x0: double; [[X co-ordinate of 1st control point.]] @@ -152,8 +134,6 @@ mixin @beta Efl.Gfx.Path uses the current control point to draw the bezier. See also @.append_cubic_to. - - @since 1.18 ]] params { @in x: double; [[X co-ordinate of end point of the line.]] @@ -169,8 +149,6 @@ mixin @beta Efl.Gfx.Path Use this api if you know the end point's of the arc otherwise use more convenient function @.append_arc. - - @since 1.18 ]] params { @in x: double; [[X co-ordinate of end point of the arc.]] @@ -189,8 +167,6 @@ mixin @beta Efl.Gfx.Path append_arc { [[Append an arc that enclosed in the given rectangle (x, y, w, h). The angle is defined in counter clock wise , use -ve angle for clockwise arc. - - @since 1.18 ]] params { @in x: double; [[X co-ordinate of the rect.]] @@ -207,14 +183,10 @@ mixin @beta Efl.Gfx.Path new path is (0, 0). If the subpath does not contain any points, this function does nothing. - - @since 1.18 ]] } append_circle { [[Append a circle with given center and radius. - - @since 1.18 ]] params { @in x: double; [[X co-ordinate of the center of the circle.]] @@ -232,8 +204,6 @@ mixin @beta Efl.Gfx.Path If xr and yr are 0, then it will draw a rectangle without rounded corner. - - @since 1.18 ]] params { @in x: double; [[X co-ordinate of the rectangle.]] @@ -284,8 +254,6 @@ mixin @beta Efl.Gfx.Path [[Reserve path commands buffer in advance. If you know the count of path commands coming, you can reserve commands buffer in advance to avoid buffer growing job. - - @since 1.22 ]] params { @in cmd_count: uint; [[Commands count to reserve]] diff --git a/src/lib/efl/interfaces/efl_gfx_shape.eo b/src/lib/efl/interfaces/efl_gfx_shape.eo index f71ec933ae..321d4057bf 100644 --- a/src/lib/efl/interfaces/efl_gfx_shape.eo +++ b/src/lib/efl/interfaces/efl_gfx_shape.eo @@ -7,8 +7,6 @@ mixin @beta Efl.Gfx.Shape extends Efl.Gfx.Path @property stroke_scale { [[The stroke scale to be used for stroking the path. Will be used along with stroke width property. - - @since 1.14 ]] set { } @@ -20,8 +18,6 @@ mixin @beta Efl.Gfx.Shape extends Efl.Gfx.Path } @property stroke_color { [[The color to be used for stroking the path. - - @since 1.14 ]] set { } @@ -36,8 +32,6 @@ mixin @beta Efl.Gfx.Shape extends Efl.Gfx.Path } @property stroke_width { [[The stroke width to be used for stroking the path. - - @since 1.14 ]] set { } @@ -79,8 +73,6 @@ mixin @beta Efl.Gfx.Shape extends Efl.Gfx.Path open subpath. See also @Efl.Gfx.Cap. - - @since 1.14 ]] set { } @@ -96,8 +88,6 @@ mixin @beta Efl.Gfx.Shape extends Efl.Gfx.Path while stroking the path. See also @Efl.Gfx.Join. - - @since 1.14 ]] set { } @@ -110,8 +100,6 @@ mixin @beta Efl.Gfx.Shape extends Efl.Gfx.Path @property fill_rule { [[The fill rule of the given shape object. @Efl.Gfx.Fill_Rule.winding or @Efl.Gfx.Fill_Rule.odd_even. - - @since 1.14 ]] set { } diff --git a/src/lib/efl/interfaces/efl_gfx_size_class.eo b/src/lib/efl/interfaces/efl_gfx_size_class.eo index 4cf49ae70e..b7033e925d 100644 --- a/src/lib/efl/interfaces/efl_gfx_size_class.eo +++ b/src/lib/efl/interfaces/efl_gfx_size_class.eo @@ -9,8 +9,7 @@ interface @beta Efl.Gfx.Size_Class This function sets width and height for a size class. This will make all edje parts in the specified object that have the specified size class update their size with given values. - - @since 1.17]] + ]] return: bool; [[$true, on success or $false, on error]] } get { @@ -19,8 +18,7 @@ interface @beta Efl.Gfx.Size_Class This function gets width and height for a size class. These values will only be valid until the size class is changed or the edje object is deleted. - - @since 1.17]] + ]] return: bool; [[$true, on success or $false, on error]] } keys { @@ -40,8 +38,7 @@ interface @beta Efl.Gfx.Size_Class Deleting the size class will revert it to the values defined by @.size_class.set() or the size class defined in the theme file. - - @since 1.17]] + ]] params { @in size_class: string; [[The size class to be deleted.]] } diff --git a/src/lib/efl/interfaces/efl_gfx_stack.eo b/src/lib/efl/interfaces/efl_gfx_stack.eo index bfe6d1106c..ea3ce848ac 100644 --- a/src/lib/efl/interfaces/efl_gfx_stack.eo +++ b/src/lib/efl/interfaces/efl_gfx_stack.eo @@ -3,7 +3,10 @@ const Efl.Gfx.Stack_Layer_Max: short = 32767; [[top-most layer number]] interface Efl.Gfx.Stack { - [[Efl graphics stack interface]] + [[Efl graphics stack interface + + @since 1.22 + ]] event_prefix: efl_gfx_entity; methods { @property layer { diff --git a/src/lib/efl/interfaces/efl_gfx_text_class.eo b/src/lib/efl/interfaces/efl_gfx_text_class.eo index a3c7f3f20b..0d92f97220 100644 --- a/src/lib/efl/interfaces/efl_gfx_text_class.eo +++ b/src/lib/efl/interfaces/efl_gfx_text_class.eo @@ -34,8 +34,7 @@ interface @beta Efl.Gfx.Text_Class Deleting the text class will revert it to the values defined by @.text_class.set() or the text class defined in the theme file. - - @since 1.17]] + ]] params { @in text_class: string; [[The text class to be deleted.]] } diff --git a/src/lib/efl/interfaces/efl_input_device.eo b/src/lib/efl/interfaces/efl_input_device.eo index 90f507af21..28ec10eb5d 100644 --- a/src/lib/efl/interfaces/efl_input_device.eo +++ b/src/lib/efl/interfaces/efl_input_device.eo @@ -22,8 +22,6 @@ enum @beta Efl.Input.Device_Type class @beta Efl.Input.Device extends Efl.Object { [[Represents a pointing device such as a touch finger, pen or mouse. - - @since 1.18 ]] methods { @property device_type { @@ -56,8 +54,6 @@ class @beta Efl.Input.Device extends Efl.Object } @property seat_id { [[Seat id number - - @since 1.20 ]] values { id: uint; [[The id of the seat]] @@ -68,8 +64,6 @@ class @beta Efl.Input.Device extends Efl.Object This is only meaningful with seat devices, as they are groups of real input devices. - - @since 1.20 ]] return: iterator @owned; [[List of device children]] } @@ -79,8 +73,6 @@ class @beta Efl.Input.Device extends Efl.Object Returns 1 for Mouse, Touch, Pen, Pointer, and Wand type devices. If a seat device is passed returns the number of pointer devices in the seat. - - @since 1.20 ]] return: uint; [[Pointer caps]] } diff --git a/src/lib/efl/interfaces/efl_io_buffer.c b/src/lib/efl/interfaces/efl_io_buffer.c index 62050d0309..2c0e5957ef 100644 --- a/src/lib/efl/interfaces/efl_io_buffer.c +++ b/src/lib/efl/interfaces/efl_io_buffer.c @@ -232,7 +232,7 @@ _efl_io_buffer_efl_io_reader_can_read_set(Eo *o, Efl_Io_Buffer_Data *pd, Eina_Bo EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o)); if (pd->can_read == can_read) return; pd->can_read = can_read; - efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read); + efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, &can_read); } EOLIAN static Eina_Bool @@ -322,7 +322,7 @@ _efl_io_buffer_efl_io_writer_can_write_set(Eo *o, Efl_Io_Buffer_Data *pd, Eina_B EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o)); if (pd->can_write == can_write) return; pd->can_write = can_write; - efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write); + efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, &can_write); } EOLIAN static Eina_Error diff --git a/src/lib/efl/interfaces/efl_io_buffer.eo b/src/lib/efl/interfaces/efl_io_buffer.eo index 0f781d0bd0..7cad411cd9 100644 --- a/src/lib/efl/interfaces/efl_io_buffer.eo +++ b/src/lib/efl/interfaces/efl_io_buffer.eo @@ -10,8 +10,6 @@ class @beta Efl.Io.Buffer extends Efl.Object implements Efl.Io.Reader, Efl.Io.Wr A fixed sized buffer can be implemented by setting @.limit followed by @.preallocate - - @since 1.19 ]] methods { diff --git a/src/lib/efl/interfaces/efl_io_closer.eo b/src/lib/efl/interfaces/efl_io_closer.eo index 2ba4323085..91e35eb75d 100644 --- a/src/lib/efl/interfaces/efl_io_closer.eo +++ b/src/lib/efl/interfaces/efl_io_closer.eo @@ -9,7 +9,7 @@ interface Efl.Io.Closer { Calls to @.close() may or may not block, that's not up to this interface to specify. - @since 1.19 + @since 1.22 ]] methods { diff --git a/src/lib/efl/interfaces/efl_io_positioner.eo b/src/lib/efl/interfaces/efl_io_positioner.eo index f1f3f201ce..28d6f8e754 100644 --- a/src/lib/efl/interfaces/efl_io_positioner.eo +++ b/src/lib/efl/interfaces/efl_io_positioner.eo @@ -9,8 +9,6 @@ enum @beta Efl.Io.Positioner_Whence { mixin @beta Efl.Io.Positioner { [[Generic interface for objects that can change or report position. - - @since 1.19 ]] data: null; diff --git a/src/lib/efl/interfaces/efl_io_queue.c b/src/lib/efl/interfaces/efl_io_queue.c index c30f7e8482..3d570d82b0 100644 --- a/src/lib/efl/interfaces/efl_io_queue.c +++ b/src/lib/efl/interfaces/efl_io_queue.c @@ -346,7 +346,7 @@ _efl_io_queue_efl_io_reader_can_read_set(Eo *o, Efl_Io_Queue_Data *pd, Eina_Bool EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o)); if (pd->can_read == can_read) return; pd->can_read = can_read; - efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, (void*) (uintptr_t) can_read); + efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, &can_read); } EOLIAN static Eina_Bool @@ -448,7 +448,7 @@ _efl_io_queue_efl_io_writer_can_write_set(Eo *o, Efl_Io_Queue_Data *pd, Eina_Boo EINA_SAFETY_ON_TRUE_RETURN(efl_io_closer_closed_get(o)); if (pd->can_write == can_write) return; pd->can_write = can_write; - efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, (void*) (uintptr_t) can_write); + efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, &can_write); } EOLIAN static Eina_Error diff --git a/src/lib/efl/interfaces/efl_io_queue.eo b/src/lib/efl/interfaces/efl_io_queue.eo index 39bc760c8e..75011d87d2 100644 --- a/src/lib/efl/interfaces/efl_io_queue.eo +++ b/src/lib/efl/interfaces/efl_io_queue.eo @@ -7,8 +7,6 @@ class @beta Efl.Io.Queue extends Efl.Object implements Efl.Io.Reader, Efl.Io.Wri A fixed sized queue can be implemented by setting @.limit followed by @.preallocate - - @since 1.19 ]] methods { diff --git a/src/lib/efl/interfaces/efl_io_reader.eo b/src/lib/efl/interfaces/efl_io_reader.eo index c173538a16..873b11eda6 100644 --- a/src/lib/efl/interfaces/efl_io_reader.eo +++ b/src/lib/efl/interfaces/efl_io_reader.eo @@ -12,7 +12,7 @@ interface Efl.Io.Reader { "can_read,changed" or property @.can_read to known whenever a read would have data to return. - @since 1.19 + @since 1.22 ]] methods { diff --git a/src/lib/efl/interfaces/efl_io_sizer.eo b/src/lib/efl/interfaces/efl_io_sizer.eo index 9f358619e5..765784e15c 100644 --- a/src/lib/efl/interfaces/efl_io_sizer.eo +++ b/src/lib/efl/interfaces/efl_io_sizer.eo @@ -5,8 +5,6 @@ mixin @beta Efl.Io.Sizer { This interface allows external objects to transparently resize or report its size. - - @since 1.19 ]] data: null; diff --git a/src/lib/efl/interfaces/efl_io_writer.eo b/src/lib/efl/interfaces/efl_io_writer.eo index 593c81e4fc..bfff7242b9 100644 --- a/src/lib/efl/interfaces/efl_io_writer.eo +++ b/src/lib/efl/interfaces/efl_io_writer.eo @@ -12,7 +12,7 @@ interface Efl.Io.Writer { "can_write,changed" or property @.can_write to known whenever a write could push more data. - @since 1.19 + @since 1.22 ]] methods { diff --git a/src/lib/efl/interfaces/efl_model.eo b/src/lib/efl/interfaces/efl_model.eo index 29dbf9775c..981158f9be 100644 --- a/src/lib/efl/interfaces/efl_model.eo +++ b/src/lib/efl/interfaces/efl_model.eo @@ -28,8 +28,6 @@ interface @beta Efl.Model listeners of any modifications in the properties. See also @[Efl.Model.properties,changed]. - - @since 1.14 ]] } values { @@ -52,8 +50,6 @@ interface @beta Efl.Model property in model See @.property.get, @[Efl.Model.properties,changed] - - @since 1.14 ]] return: future; [[Return an error in case the property could not be set, the value that was set otherwise.]] } @@ -65,8 +61,6 @@ interface @beta Efl.Model notify listeners of the property/value. See @.properties.get, @[Efl.Model.properties,changed] - - @since 1.14 ]] } keys { @@ -120,8 +114,6 @@ interface @beta Efl.Model Note: The returned children will live only as long as the future itself. Once the future is done, if you want to keep the object alive, you need to take a reference for yourself. - - @since 1.14 ]] params { @in start: uint; [[Range begin - start from here.]] @@ -142,8 +134,6 @@ interface @beta Efl.Model emitted when count is finished. See also @.children_slice_get. - - @since 1.14 ]] } values { @@ -157,8 +147,6 @@ interface @beta Efl.Model of a internal keeping. When the child is effectively added the event @[Efl.Model.child,added] is then raised and the new child is kept along with other children. - - @since 1.14 ]] return: Efl.Object; [[Child object]] } @@ -169,8 +157,6 @@ interface @beta Efl.Model removed the event @[Efl.Model.child,removed] is then raised to give a chance for listeners to perform any cleanup and/or update references. - - @since 1.14 ]] params { @in child: Efl.Object; [[Child to be removed]] diff --git a/src/lib/efl/interfaces/efl_observable.eo b/src/lib/efl/interfaces/efl_observable.eo index 12686c15e9..babfe21c59 100644 --- a/src/lib/efl/interfaces/efl_observable.eo +++ b/src/lib/efl/interfaces/efl_observable.eo @@ -15,8 +15,7 @@ class @beta Efl.Observable extends Efl.Object { Note: Observers that observe this observable are grouped by the $key and an observer can belong to multiple groups at the same time. - - @since 1.19]] + ]] params { @in key: string; [[A key to classify observer groups]] @in obs: Efl.Observer; [[An observer object]] @@ -26,8 +25,7 @@ class @beta Efl.Observable extends Efl.Object { [[Delete an observer from a group of observers. See also @.observer_add(). - - @since 1.19]] + ]] params { @in key: string; [[A key to classify observer groups]] @in obs: Efl.Observer; [[An observer object]] @@ -35,16 +33,14 @@ class @beta Efl.Observable extends Efl.Object { } observer_clean { [[Clear an observer from all groups of observers. - - @since 1.19]] + ]] params { @in obs: Efl.Observer; [[An observer object]] } } observers_iterator_new { [[Return a new iterator associated with a group of observers. - - @since 1.19]] + ]] return: iterator @owned; [[Iterator for observers group]] params { @in key: string; [[A key to classify observer groups]] @@ -52,8 +48,7 @@ class @beta Efl.Observable extends Efl.Object { } observers_update { [[Update all observers in a group by calling their update() method. - - @since 1.19]] + ]] params { @in key: string; [[A key to classify observer groups]] @in data: void_ptr; [[Required data to update observer]] @@ -61,8 +56,7 @@ class @beta Efl.Observable extends Efl.Object { } iterator_tuple_new { [[Return a new iterator associated to this observable. - - @since 1.19]] + ]] return: iterator @owned; [[Iterator for observer]] } } diff --git a/src/lib/efl/interfaces/efl_observer.eo b/src/lib/efl/interfaces/efl_observer.eo index 82e91c2682..f1477807dd 100644 --- a/src/lib/efl/interfaces/efl_observer.eo +++ b/src/lib/efl/interfaces/efl_observer.eo @@ -3,8 +3,7 @@ interface @beta Efl.Observer { methods { update { [[Update observer according to the changes of observable object. - - @since 1.19]] + ]] params { /* FIXME: obs should be Efl.Observable, but cyclic dependency error occurs. */ @in obs: Efl.Object; [[An observable object]] diff --git a/src/lib/efl/interfaces/efl_pack_table.eo b/src/lib/efl/interfaces/efl_pack_table.eo index ea88ca61da..9472b52ed4 100644 --- a/src/lib/efl/interfaces/efl_pack_table.eo +++ b/src/lib/efl/interfaces/efl_pack_table.eo @@ -1,6 +1,6 @@ import efl_ui_direction; -interface @beta Efl.Pack_Table extends Efl.Pack_Linear +interface @beta Efl.Pack_Table extends Efl.Pack { [[2D containers aligned on a table with rows and columns]] eo_prefix: efl_pack; diff --git a/src/lib/efl/interfaces/efl_part.eo b/src/lib/efl/interfaces/efl_part.eo index 1f37e7e4ab..f282983cd6 100644 --- a/src/lib/efl/interfaces/efl_part.eo +++ b/src/lib/efl/interfaces/efl_part.eo @@ -33,6 +33,8 @@ interface Efl.Part func2(part, args) func3(part, args) unref(part) + + @since 1.22 ]] methods { part_get @protected @const { diff --git a/src/lib/efl/interfaces/efl_screen.eo b/src/lib/efl/interfaces/efl_screen.eo index 44f72f337a..5fd9adef6e 100644 --- a/src/lib/efl/interfaces/efl_screen.eo +++ b/src/lib/efl/interfaces/efl_screen.eo @@ -2,7 +2,10 @@ import eina_types; interface Efl.Screen { - [[Efl screen interface]] + [[Efl screen interface + + @since 1.22 + ]] methods { @property screen_size_in_pixels { get { @@ -47,7 +50,6 @@ interface Efl.Screen [[Get the rotation of the screen. Most engines only return multiples of 90. - @since 1.19 ]] } values { @@ -57,8 +59,6 @@ interface Efl.Screen @property screen_dpi { get { [[Get the pixel density in DPI (Dots Per Inch) for the screen that a window is on. - - @since 1.7 ]] } values { diff --git a/src/lib/efl/interfaces/efl_text.eo b/src/lib/efl/interfaces/efl_text.eo index 13733b0d4e..35b44bbcdf 100644 --- a/src/lib/efl/interfaces/efl_text.eo +++ b/src/lib/efl/interfaces/efl_text.eo @@ -1,6 +1,9 @@ interface Efl.Text { - [[Efl text interface]] + [[Efl text interface + + @since 1.22 + ]] methods { @property text { set { diff --git a/src/lib/efl/interfaces/efl_text_annotate.eo b/src/lib/efl/interfaces/efl_text_annotate.eo index 8cf8f15c4d..f9f52a4bb0 100644 --- a/src/lib/efl/interfaces/efl_text_annotate.eo +++ b/src/lib/efl/interfaces/efl_text_annotate.eo @@ -2,8 +2,6 @@ import efl_text_types; interface @beta Efl.Text_Annotate { [[Cursor API - - @since 1.20 ]] eo_prefix: efl_text; methods { @@ -15,8 +13,6 @@ interface @beta Efl.Text_Annotate { Assumes that $annotation is a handle for an existing annotation, i.e. one that was added using @.annotation_insert to this object. Otherwise, this will fail and return $false. - - @since 1.18 ]] set { return: bool; [[$true on success, $false otherwise.]] @@ -32,8 +28,6 @@ interface @beta Efl.Text_Annotate { } range_annotations_get @const { [[Returns an iterator of all the handles in a range. - - @since 1.18 ]] params { @in start: ptr(const(Efl.Text_Cursor_Cursor)); [[Start of range]] @@ -46,8 +40,6 @@ interface @beta Efl.Text_Annotate { The $format will be applied to the given range, and the $annotation handle will be returned for further handling. - - @since 1.18 ]] params { @in start: ptr(Efl.Text_Cursor_Cursor); [[Start of range]] @@ -61,8 +53,6 @@ interface @beta Efl.Text_Annotate { All formats applied by $annotation will be removed and it will be deleted. - - @since 1.18 ]] params { @in annotation: ptr(Efl.Text_Annotate_Annotation); [[Annotation to be @@ -75,8 +65,6 @@ interface @beta Efl.Text_Annotate { The cursors $start and $end will be set to the start and end positions of the given annotation $annotation. - - @since 1.18 ]] params { @in annotation: ptr(const(Efl.Text_Annotate_Annotation)); [[Annotation @@ -94,8 +82,6 @@ interface @beta Efl.Text_Annotate { see @.cursor_item_insert see @.item_geometry_get - - @since 1.21 ]] params { annotation: ptr(Efl.Text_Annotate_Annotation); [[Given annotation]] @@ -106,8 +92,6 @@ interface @beta Efl.Text_Annotate { [[Queries a given object item for its geometry. Note that the provided annotation should be an object item type. - - @since 1.18 ]] params { @in an: ptr(const(Efl.Text_Annotate_Annotation)); [[Given annotation to query]] diff --git a/src/lib/efl/interfaces/efl_text_cursor.eo b/src/lib/efl/interfaces/efl_text_cursor.eo index f8ad8c5e81..50fc3aecdc 100644 --- a/src/lib/efl/interfaces/efl_text_cursor.eo +++ b/src/lib/efl/interfaces/efl_text_cursor.eo @@ -22,15 +22,11 @@ enum @beta Efl.Text_Cursor_Type interface @beta Efl.Text_Cursor { [[Cursor API - - @since 1.20 ]] methods { // Cursor @property text_cursor { [[The object's main cursor. - - @since 1.18 ]] get { return: ptr(Efl.Text_Cursor_Cursor); [[Text cursor object]] diff --git a/src/lib/efl/interfaces/efl_text_font.eo b/src/lib/efl/interfaces/efl_text_font.eo index 6eb36ce676..32f15c2a55 100644 --- a/src/lib/efl/interfaces/efl_text_font.eo +++ b/src/lib/efl/interfaces/efl_text_font.eo @@ -42,8 +42,6 @@ enum @beta Efl.Text_Font_Slant { */ enum @beta Efl.Text_Font_Bitmap_Scalable { [[Scalable of bitmap fonts - - @since 1.21 ]] none = 0, [[Disable scalable feature for bitmap fonts.]] color = (1 << 0), [[Enable scalable feature for color bitmap fonts.]] @@ -51,8 +49,6 @@ enum @beta Efl.Text_Font_Bitmap_Scalable { interface @beta Efl.Text_Font { [[Font settings of the text - - @since 1.20 ]] eo_prefix: efl_text; methods { diff --git a/src/lib/efl/interfaces/efl_text_format.eo b/src/lib/efl/interfaces/efl_text_format.eo index 31c0b9c862..6d0125c55d 100644 --- a/src/lib/efl/interfaces/efl_text_format.eo +++ b/src/lib/efl/interfaces/efl_text_format.eo @@ -20,8 +20,6 @@ interface @beta Efl.Text_Format { The text format can affect the geometry of the text object, as well as how characters are presented. - - @since 1.20 ]] eo_prefix: efl_text; methods { diff --git a/src/lib/efl/interfaces/efl_text_markup.eo b/src/lib/efl/interfaces/efl_text_markup.eo index a12b0728b8..a0ec020cf5 100644 --- a/src/lib/efl/interfaces/efl_text_markup.eo +++ b/src/lib/efl/interfaces/efl_text_markup.eo @@ -1,7 +1,5 @@ interface @beta Efl.Text_Markup { [[Markup data that populates the text object's style and format - - @since 1.21 ]] methods { @property markup { diff --git a/src/lib/efl/interfaces/efl_text_markup_interactive.eo b/src/lib/efl/interfaces/efl_text_markup_interactive.eo index dc0a04af5d..cbb4906ac2 100644 --- a/src/lib/efl/interfaces/efl_text_markup_interactive.eo +++ b/src/lib/efl/interfaces/efl_text_markup_interactive.eo @@ -1,7 +1,5 @@ interface @beta Efl.Text_Markup_Interactive extends Efl.Text_Cursor { [[Markup data that populates the text object's style and format - - @since 1.22 ]] methods { @property markup_range { @@ -11,8 +9,8 @@ interface @beta Efl.Text_Markup_Interactive extends Efl.Text_Cursor { this text of a given range]] } keys { - start: ptr(Efl.Text_Cursor_Cursor); - end: ptr(Efl.Text_Cursor_Cursor); + start: ptr(Efl.Text_Cursor_Cursor); [[Start of the markup region]] + end: ptr(Efl.Text_Cursor_Cursor); [[End of markup region]] } } cursor_markup_insert { diff --git a/src/lib/efl/interfaces/efl_text_markup_util.eo b/src/lib/efl/interfaces/efl_text_markup_util.eo index f29d2f8d77..96237fc740 100644 --- a/src/lib/efl/interfaces/efl_text_markup_util.eo +++ b/src/lib/efl/interfaces/efl_text_markup_util.eo @@ -1,7 +1,5 @@ class @beta Efl.Text_Markup_Util { [[Utility class for markup, such as conversions - - @since 1.21. ]] data: null; methods { diff --git a/src/lib/efl/interfaces/efl_text_style.eo b/src/lib/efl/interfaces/efl_text_style.eo index 71220608fe..362a56f223 100644 --- a/src/lib/efl/interfaces/efl_text_style.eo +++ b/src/lib/efl/interfaces/efl_text_style.eo @@ -59,8 +59,6 @@ interface @beta Efl.Text_Style { [[Style to apply to the text A style can be coloring, effects, underline, strikethrough etc. - - @since 1.20 ]] eo_prefix: efl_text; methods { diff --git a/src/lib/efl/interfaces/efl_ui_drag.eo b/src/lib/efl/interfaces/efl_ui_drag.eo index acc1304cdc..36a5aa0365 100644 --- a/src/lib/efl/interfaces/efl_ui_drag.eo +++ b/src/lib/efl/interfaces/efl_ui_drag.eo @@ -5,8 +5,6 @@ import efl_ui_types; interface @beta Efl.Ui.Drag { [[Common interface for draggable objects and parts. - - @since 1.20 ]] methods { @property drag_value { diff --git a/src/lib/efl/interfaces/efl_ui_scrollable.eo b/src/lib/efl/interfaces/efl_ui_scrollable.eo index 664ab6f47d..dd255eb0bf 100644 --- a/src/lib/efl/interfaces/efl_ui_scrollable.eo +++ b/src/lib/efl/interfaces/efl_ui_scrollable.eo @@ -4,8 +4,6 @@ enum @beta Efl.Ui.Scroll_Block Note: These options may be effective only in case of thumbscroll (i.e. when scrolling by dragging). - - @since 1.21 ]] none = 0, [[Don't block any movement.]] vertical = 1, [[Block vertical movement.]] diff --git a/src/lib/efl/interfaces/efl_ui_selectable.eo b/src/lib/efl/interfaces/efl_ui_selectable.eo index a3dd4ac548..1105fe42d2 100644 --- a/src/lib/efl/interfaces/efl_ui_selectable.eo +++ b/src/lib/efl/interfaces/efl_ui_selectable.eo @@ -4,14 +4,14 @@ interface @beta Efl.Ui.Selectable event_prefix: efl_ui; events { /* FIXME: Called with multiple types of event_info! */ - selectable,selected: void; [[Called when selected]] + item,selected: Efl.Object; [[Called when selected]] /* FIXME: Called with multiple types of event_info! */ - selectable,unselected: void; [[Called when no longer selected]] - selectable,paste: void; [[Called when selection is pasted]] - selectable,copy: void; [[Called when selection is copied]] - selectable,cut: void; [[Called when selection is cut]] - selectable,start: void; [[Called at selection start]] - selectable,changed: void; [[Called when selection is changed]] - selectable,cleared: void; [[Called when selection is cleared]] + item,unselected: Efl.Object; [[Called when no longer selected]] + selection,paste: void; [[Called when selection is pasted]] + selection,copy: void; [[Called when selection is copied]] + selection,cut: void; [[Called when selection is cut]] + selection,start: void; [[Called at selection start]] + selection,changed: void; [[Called when selection is changed]] + selection,cleared: void; [[Called when selection is cleared]] } } diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index 1c63bb327d..ef75b3d7ff 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -138,9 +138,11 @@ foreach eo_file : pub_eo_types_files '-ghd', '@INPUT@']) endforeach -install_data(pub_eo_files + pub_legacy_eo_files + pub_eo_types_files, - install_dir: join_paths(eolian_include_dir, package_version_name) -) +if get_option('install-eo-files') + install_data(pub_eo_files + pub_legacy_eo_files + pub_eo_types_files, + install_dir: join_paths(eolian_include_dir, package_version_name) + ) +endif efl_interfaces_eo_files = pub_eo_files efl_interfaces_eot_files = pub_eo_types_files diff --git a/src/lib/efreet/efreet_desktop_command.c b/src/lib/efreet/efreet_desktop_command.c index c98ce0fbdf..8c99102c3d 100644 --- a/src/lib/efreet/efreet_desktop_command.c +++ b/src/lib/efreet/efreet_desktop_command.c @@ -464,6 +464,7 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command) } while ((l = eina_list_next(l))); + IF_FREE(exec); return execs; error: IF_FREE(exec); diff --git a/src/lib/eina/eina_error.c b/src/lib/eina/eina_error.c index a7faadeb3b..7922933e59 100644 --- a/src/lib/eina/eina_error.c +++ b/src/lib/eina/eina_error.c @@ -25,10 +25,6 @@ #include #include -#ifdef _WIN32 -# include -#endif - #include "eina_config.h" #include "eina_private.h" @@ -111,6 +107,18 @@ _eina_error_msg_alloc(void) return _eina_errors + idx; } +#ifdef _WIN32 +# define HAVE_STRERROR_R +# ifdef STRERROR_R_CHAR_P +# undef STRERROR_R_CHAR_P +# endif +/* Windows has strerror_s(), similar to POSIX strerror_r() */ +static inline int strerror_r(int errnum, char *buf, size_t buflen) +{ + return strerror_s(buf, buflen, errnum); +} +#endif + /** * @endcond */ diff --git a/src/lib/eina/eina_promise.c b/src/lib/eina/eina_promise.c index f2dc9cccac..62a47576ce 100644 --- a/src/lib/eina/eina_promise.c +++ b/src/lib/eina/eina_promise.c @@ -1205,7 +1205,7 @@ _race_then_cb(void *data, const Eina_Value v, Eina_Promise *p = ctx->base.promise; Eina_Bool found, r; Eina_Value result; - unsigned int i; + unsigned int i = 0; //This is not allowed! assert(v.type != &EINA_VALUE_TYPE_PROMISE); diff --git a/src/lib/eio/Eio.h b/src/lib/eio/Eio.h index cc986938dd..fb0fc64813 100644 --- a/src/lib/eio/Eio.h +++ b/src/lib/eio/Eio.h @@ -76,9 +76,7 @@ typedef Eina_Bool (*Eio_Filter_Direct_Cb)(void *data, Eio_File *handler, const E #ifndef EFL_NOLEGACY_API_SUPPORT #include "Eio_Legacy.h" #endif -#ifdef EFL_EO_API_SUPPORT #include "Eio_Eo.h" -#endif /** * @brief get access time from a Eina_Stat diff --git a/src/lib/eio/efl_io_model.eo b/src/lib/eio/efl_io_model.eo index 206ba07dc5..2e314753f9 100644 --- a/src/lib/eio/efl_io_model.eo +++ b/src/lib/eio/efl_io_model.eo @@ -24,8 +24,6 @@ class @beta Efl.Io.Model extends Efl.Loop_Model EINA_TRUE to keep it. See also @Efl.Model.children_slice_get. - - @since 1.11 ]] params { filter: EflIoFilter; [[Filter callback]] @@ -33,8 +31,6 @@ class @beta Efl.Io.Model extends Efl.Loop_Model } @property path { [[ Define the root path of a model. - - @since 1.11 ]] set { [[ Only possible during construction. ]] } get { } diff --git a/src/lib/eio/meson.build b/src/lib/eio/meson.build index ec113fcd14..f95a1e652c 100644 --- a/src/lib/eio/meson.build +++ b/src/lib/eio/meson.build @@ -83,9 +83,12 @@ eio = declare_dependency( dependencies: eio_pub_deps, ) -install_data(pub_eo_files + pub_eo_types_files, - install_dir: join_paths(eolian_include_dir, package_version_name) -) + +if get_option('install-eo-files') + install_data(pub_eo_files + pub_eo_types_files, + install_dir: join_paths(eolian_include_dir, package_version_name) + ) +endif install_headers(eio_header_src, install_dir : dir_package_include, diff --git a/src/lib/eldbus/eldbus_model_proxy.c b/src/lib/eldbus/eldbus_model_proxy.c index d571732fc8..bf1f8fb931 100644 --- a/src/lib/eldbus/eldbus_model_proxy.c +++ b/src/lib/eldbus/eldbus_model_proxy.c @@ -271,7 +271,7 @@ _eldbus_model_proxy_efl_model_property_set(Eo *obj EINA_UNUSED, const char *property, Eina_Value *value) { - Eldbus_Model_Proxy_Property_Set_Data *data; + Eldbus_Model_Proxy_Property_Set_Data *data = NULL; const char *signature; Eldbus_Pending *pending; unsigned char access; @@ -314,6 +314,7 @@ _eldbus_model_proxy_efl_model_property_set(Eo *obj EINA_UNUSED, .data = data, .free = _eldbus_model_proxy_cancel_cb); on_error: + free(data); return efl_loop_future_rejected(obj, err); } @@ -662,7 +663,9 @@ _eldbus_model_proxy_property_set_load_cb(void *data, signature, set_data->value, _eldbus_model_proxy_property_set_cb, set_data); pd->pendings = eina_list_append(pd->pendings, pending); - end: + +end: + if (!properties) return; while ((sp = eina_array_pop(properties))) eina_stringshare_del(sp); eina_array_free(properties); diff --git a/src/lib/eldbus/meson.build b/src/lib/eldbus/meson.build index 1fd852fcb3..de9902757d 100644 --- a/src/lib/eldbus/meson.build +++ b/src/lib/eldbus/meson.build @@ -109,9 +109,12 @@ eldbus = declare_dependency( dependencies: eldbus_pub_deps, ) -install_data(pub_eo_files + pub_eo_types_files, - install_dir: join_paths(eolian_include_dir, package_version_name) -) + +if get_option('install-eo-files') + install_data(pub_eo_files + pub_eo_types_files, + install_dir: join_paths(eolian_include_dir, package_version_name) + ) +endif install_headers(eldbus_header_src, install_dir : dir_package_include, diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h index d5db6923d0..22e446a998 100644 --- a/src/lib/elementary/Efl_Ui.h +++ b/src/lib/elementary/Efl_Ui.h @@ -4,10 +4,6 @@ #include #include -#ifndef EFL_EO_API_SUPPORT -# define EFL_EO_API_SUPPORT -#endif - /* FIXME: wtf? */ #ifndef EFL_UI_RADIO_EVENT_CHANGED # define EFL_UI_RADIO_EVENT_CHANGED EFL_UI_NSTATE_EVENT_CHANGED @@ -153,7 +149,9 @@ typedef Eo Efl_Ui_Focus_Manager; # include # include +# ifdef EFL_BETA_API_SUPPORT EAPI void efl_ui_focus_relation_free(Efl_Ui_Focus_Relations *rel); +# endif # include # include # include @@ -232,6 +230,12 @@ EAPI void efl_ui_focus_relation_free(Efl_Ui_Focus_Relations *rel); # include # include +# include +# include +# include +# include +# include + /** * Initialize Elementary * diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h index e61390880b..a10b9e5299 100644 --- a/src/lib/elementary/Elementary.h +++ b/src/lib/elementary/Elementary.h @@ -146,7 +146,6 @@ EAPI extern Elm_Version *elm_version; #include #include -#if defined (EFL_EO_API_SUPPORT) && defined (EFL_BETA_API_SUPPORT) #include /* FIXME: wtf? */ #ifndef EFL_UI_RADIO_EVENT_CHANGED @@ -160,7 +159,6 @@ typedef Eo Efl_Ui_Focus_Manager; # include # include -EAPI void efl_ui_focus_relation_free(Efl_Ui_Focus_Relations *rel); # include # include # include @@ -169,6 +167,8 @@ EAPI void efl_ui_focus_relation_free(Efl_Ui_Focus_Relations *rel); # include # include # include + +#ifdef EFL_BETA_API_SUPPORT # include # include #endif @@ -285,7 +285,6 @@ EAPI void efl_ui_focus_relation_free(Efl_Ui_Focus_Relations *rel); #include #include -#ifdef EFL_EO_API_SUPPORT # include # include # include @@ -359,13 +358,8 @@ EAPI void efl_ui_focus_relation_free(Efl_Ui_Focus_Relations *rel); # include # include # include -# include -# include -# include -# include -# include -# include # include +# include # ifndef _EFL_UI_PAGER_EO_CLASS_TYPE # define _EFL_UI_PAGER_EO_CLASS_TYPE @@ -382,7 +376,6 @@ typedef Eo Efl_Ui_Pager; # include # include # include -#endif /* include deprecated calls last of all */ #include diff --git a/src/lib/elementary/Elementary.hh b/src/lib/elementary/Elementary.hh index 36a31ef700..e5e1036e0c 100644 --- a/src/lib/elementary/Elementary.hh +++ b/src/lib/elementary/Elementary.hh @@ -7,9 +7,6 @@ #ifndef EFL_BETA_API_SUPPORT #define EFL_BETA_API_SUPPORT #endif -#ifndef EFL_EO_API_SUPPORT -#define EFL_EO_API_SUPPORT -#endif #ifndef ELM_INTERNAL_API_ARGESFSDFEFC #define ELM_INTERNAL_API_ARGESFSDFEFC #endif diff --git a/src/lib/elementary/efl_access_object.c b/src/lib/elementary/efl_access_object.c index 84ae798cc0..6bb3b2e882 100644 --- a/src/lib/elementary/efl_access_object.c +++ b/src/lib/elementary/efl_access_object.c @@ -195,7 +195,7 @@ _efl_access_object_attributes_get(const Eo *obj EINA_UNUSED, Efl_Access_Object_D { Efl_Access_Attribute *attr = calloc(1, sizeof(Efl_Access_Attribute)); if (!attr) - return attr_list; + return attr_list; attr->key = eina_stringshare_add(t_attr->key); attr->value = eina_stringshare_add(t_attr->value); @@ -232,6 +232,29 @@ _efl_access_object_attribute_append(Eo *obj EINA_UNUSED, Efl_Access_Object_Data pd->attr_list = eina_list_append(pd->attr_list, attr); } +EOLIAN static void +_efl_access_object_attribute_del(Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd, const char *key) +{ + Eina_List *l; + Efl_Access_Attribute *attr = NULL; + + if (!key) return; + if (!pd->attr_list) return; + + /* Check whether existing attribute list has this key and delete */ + EINA_LIST_FOREACH(pd->attr_list, l, attr) + { + if (!strcmp((const char *)attr->key, key)) + { + pd->attr_list = eina_list_remove_list(pd->attr_list, l); + eina_stringshare_del(attr->key); + eina_stringshare_del(attr->value); + free(attr); + return; + } + } +} + EOLIAN static void _efl_access_object_attributes_clear(Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd) { if (!pd->attr_list) return; @@ -249,7 +272,14 @@ EOLIAN static void _efl_access_object_reading_info_type_set(Eo *obj, Efl_Access_Object_Data *pd, Efl_Access_Reading_Info_Type reading_info) { Eina_Strbuf *buf = NULL; + if (reading_info == pd->reading_info) + return; pd->reading_info = reading_info; + if (!pd->reading_info) + { + efl_access_object_attribute_del(obj, "reading_info_type"); + return; + } buf = eina_strbuf_new(); eina_strbuf_reset(buf); if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_NAME)) diff --git a/src/lib/elementary/efl_access_object.eo b/src/lib/elementary/efl_access_object.eo index 933533663a..37b021e0ca 100644 --- a/src/lib/elementary/efl_access_object.eo +++ b/src/lib/elementary/efl_access_object.eo @@ -307,15 +307,26 @@ mixin @beta Efl.Access.Object requires Efl.Object @in value: string; [[The string value to give extra information]] } } + attribute_del { + [[delete key-value pair identifying object extra attributes when key is given + ]] + params { + @in key: string; [[The string key to identify the key-value pair]] + } + } attributes_clear { [[Removes all attributes in accessible object.]] } @property reading_info_type @protected { get { - [[Gets reading information types of an accessible object.]] + [[Gets reading information types of an accessible object. if no reading information + is set, 0 is returned which means all four reading information types will be read on + object highlight]] } set { - [[Sets reading information of an accessible object.]] + [[Sets reading information of an accessible object. If set as 0, existing + reading info will be deleted and by default all four reading information types + like name, role, state and description will be read on object highlight]] } values { reading_info: Efl.Access.Reading.Info.Type; [[Reading information types]] diff --git a/src/lib/elementary/efl_access_object.h b/src/lib/elementary/efl_access_object.h index b42db31f7f..4ad1ede4e5 100644 --- a/src/lib/elementary/efl_access_object.h +++ b/src/lib/elementary/efl_access_object.h @@ -2,13 +2,7 @@ #define EFL_ACCESS_H #ifdef EFL_BETA_API_SUPPORT - -#ifdef EFL_EO_API_SUPPORT #include "efl_access_object.eo.h" -#endif -#ifndef EFL_NOLEGACY_API_SUPPORT -#include "efl_access_object.eo.legacy.h" -#endif /* * Sets a particilar state type for given state set. @@ -36,8 +30,6 @@ EAPI void efl_access_attributes_list_free(Eina_List *list); EAPI void efl_access_attribute_free(Efl_Access_Attribute *attr); -#ifdef EFL_EO_API_SUPPORT - /** * Emits Accessible 'StateChanged' signal. */ @@ -130,7 +122,5 @@ efl_access_attribute_free(Efl_Access_Attribute *attr); #define efl_access_removed(obj) \ efl_access_object_event_emit(obj, EFL_ACCESS_OBJECT_EVENT_REMOVED, NULL); -#endif - #endif #endif diff --git a/src/lib/elementary/efl_access_text.h b/src/lib/elementary/efl_access_text.h index f5cecc01bd..a1dfec0a0c 100644 --- a/src/lib/elementary/efl_access_text.h +++ b/src/lib/elementary/efl_access_text.h @@ -2,13 +2,7 @@ #define ELM_INTERFACE_ATSPI_TEXT_H #ifdef EFL_BETA_API_SUPPORT - -#ifdef EFL_EO_API_SUPPORT #include "efl_access_text.eo.h" -#endif -#ifndef EFL_NOLEGACY_API_SUPPORT -#include "efl_access_text.eo.legacy.h" -#endif /** * @brief Free Efl_Access_Text_Attribute structure diff --git a/src/lib/elementary/efl_access_widget_action.h b/src/lib/elementary/efl_access_widget_action.h index 62caf4f5ae..86df79c8cc 100644 --- a/src/lib/elementary/efl_access_widget_action.h +++ b/src/lib/elementary/efl_access_widget_action.h @@ -13,12 +13,7 @@ struct _Efl_Access_Action_Data typedef struct _Efl_Access_Action_Data Efl_Access_Action_Data; -#ifdef EFL_EO_API_SUPPORT #include "efl_access_widget_action.eo.h" -#endif -#ifndef EFL_NOLEGACY_API_SUPPORT -#include "efl_access_widget_action.eo.legacy.h" -#endif #endif #endif diff --git a/src/lib/elementary/efl_access_window.h b/src/lib/elementary/efl_access_window.h index c4b3d3c398..739d9f025d 100644 --- a/src/lib/elementary/efl_access_window.h +++ b/src/lib/elementary/efl_access_window.h @@ -2,13 +2,7 @@ #define EFL_ACCESS_WINDOW_H #ifdef EFL_BETA_API_SUPPORT -#ifdef EFL_EO_API_SUPPORT - #include "efl_access_window.eo.h" -#endif -#ifndef EFL_NOLEGACY_API_SUPPORT -#include "efl_access_window.eo.legacy.h" -#endif /** * Emits 'Window:Activated' accessible signal. diff --git a/src/lib/elementary/efl_config_global.eo b/src/lib/elementary/efl_config_global.eo index 5ec518a8a6..77a04ae928 100644 --- a/src/lib/elementary/efl_config_global.eo +++ b/src/lib/elementary/efl_config_global.eo @@ -79,8 +79,6 @@ class @beta Efl.Config_Global extends Efl.Object implements Efl.Config At this point it is not expected that anyone would generally use this API except if you are a desktop environment and so the user base of this API will be enlightenment itself. - - @since 1.17 ]] params { profile: string; [[The new profile's name.]] @@ -97,8 +95,6 @@ class @beta Efl.Config_Global extends Efl.Object implements Efl.Config At this point it is not expected that anyone would generally use this API except if you are a desktop environment and so the user base of this API will be enlightenment itself. - - @since 1.17 ]] params { profile: string; [[The name of the profile that is to be deleted.]] diff --git a/src/lib/elementary/efl_ui_box_stack.c b/src/lib/elementary/efl_ui_box_stack.c index ce356bd33a..69e72ea586 100644 --- a/src/lib/elementary/efl_ui_box_stack.c +++ b/src/lib/elementary/efl_ui_box_stack.c @@ -1,35 +1,102 @@ #define EFL_GFX_HINT_PROTECTED #include "efl_ui_box_private.h" +#include "efl_ui_container_layout.h" #define MY_CLASS EFL_UI_BOX_STACK_CLASS +typedef struct _Item_Calc Item_Calc; + +struct _Item_Calc +{ + Evas_Object *obj; + Efl_Ui_Container_Item_Hints hints[2]; /* 0 is x-axis, 1 is y-axis */ +}; + EOLIAN static void _efl_ui_box_stack_efl_pack_layout_layout_update(Eo *obj, void *_pd EINA_UNUSED) { Evas_Object_Box_Option *opt; Evas_Object_Box_Data *bd; - Eina_Size2D min = { 0, 0 }, cmin; + Efl_Ui_Container_Layout_Calc box_calc[2]; + Efl_Ui_Container_Item_Hints *hints; + Item_Calc *items, *item; Eina_List *l; + Eina_Size2D want = { 0, 0 }; + Evas_Object *old_child = NULL; + int i = 0, count; EINA_SAFETY_ON_FALSE_RETURN(efl_isa(obj, EFL_UI_BOX_CLASS)); ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); bd = efl_data_scope_get(wd->resize_obj, EVAS_BOX_CLASS); - evas_object_box_layout_stack(wd->resize_obj, bd, NULL); + count = eina_list_count(bd->children); + if (!count) + { + efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(0, 0)); + return; + } + + _efl_ui_container_layout_init(obj, box_calc); + + items = alloca(count * sizeof(*items)); +#ifdef DEBUG + memset(items, 0, count * sizeof(*items)); +#endif - /* Note: legacy evas_object_box_layout_stack sets the box min size to be - * the MAX() of the children's sizes, rather than their min sizes. By fixing - * that, we can implement elm_win_resize_object_add() with a Efl.Ui.Box. */ EINA_LIST_FOREACH(bd->children, l, opt) { - Evas_Object *child = opt->obj; + item = &items[i++]; + item->obj = opt->obj; + hints = item->hints; - cmin = efl_gfx_hint_size_combined_min_get(child); - if (cmin.w > min.w) min.w = cmin.w; - if (cmin.h > min.h) min.h = cmin.h; + _efl_ui_container_layout_item_init(opt->obj, hints); + + if (want.w < hints[0].space) + want.w = hints[0].space; + if (want.h < hints[1].space) + want.h = hints[1].space; } - efl_gfx_hint_size_restricted_min_set(obj, min); + + if (box_calc[0].size < want.w) + box_calc[0].size = want.w; + if (box_calc[1].size < want.h) + box_calc[1].size = want.h; + + for (i = 0; i < count; i++) + { + hints = items[i].hints; + Eina_Rect item_geom; + + hints[0].space = box_calc[0].size - + (hints[0].margin[0] + hints[0].margin[1]); + hints[1].space = box_calc[1].size - + (hints[1].margin[0] + hints[1].margin[1]); + + item_geom.w = ((hints[0].weight > 0) && hints[0].fill) ? hints[0].space : 0; + item_geom.h = ((hints[1].weight > 0) && hints[1].fill) ? hints[1].space : 0; + + _efl_ui_container_layout_min_max_calc(hints, &item_geom.w, &item_geom.h, + (hints[0].aspect > 0) && (hints[1].aspect > 0)); + + item_geom.x = box_calc[0].pos + hints[0].margin[0] + + (hints[0].space - item_geom.w) * hints[0].align; + item_geom.y = box_calc[1].pos + hints[1].margin[0] + + (hints[1].space - item_geom.h) * hints[1].align; + + efl_gfx_entity_geometry_set(items[i].obj, item_geom); + + if (old_child) + efl_gfx_stack_above(items[i].obj, old_child); + old_child = items[i].obj; + } + + want.w += (box_calc[0].margin[0] + box_calc[0].margin[1]); + want.h += (box_calc[1].margin[0] + box_calc[1].margin[1]); + + efl_gfx_hint_size_restricted_min_set(obj, want); + + efl_event_callback_call(obj, EFL_PACK_EVENT_LAYOUT_UPDATED, NULL); } #include "efl_ui_box_stack.eo.c" diff --git a/src/lib/elementary/efl_ui_calendar.h b/src/lib/elementary/efl_ui_calendar.h index f80dce28d5..c3c8f6ae89 100644 --- a/src/lib/elementary/efl_ui_calendar.h +++ b/src/lib/elementary/efl_ui_calendar.h @@ -48,9 +48,8 @@ * @{ */ -#ifdef EFL_EO_API_SUPPORT #include "efl_ui_calendar.eo.h" -#endif + /** * @} */ diff --git a/src/lib/elementary/efl_ui_clock.h b/src/lib/elementary/efl_ui_clock.h index b882cd77a5..1115faaf45 100644 --- a/src/lib/elementary/efl_ui_clock.h +++ b/src/lib/elementary/efl_ui_clock.h @@ -196,9 +196,8 @@ * @{ */ -#ifdef EFL_EO_API_SUPPORT #include "efl_ui_clock.eo.h" -#endif + /** * @} */ diff --git a/src/lib/elementary/efl_ui_container_layout.c b/src/lib/elementary/efl_ui_container_layout.c index e8c5979dd0..51934e73c7 100644 --- a/src/lib/elementary/efl_ui_container_layout.c +++ b/src/lib/elementary/efl_ui_container_layout.c @@ -87,12 +87,12 @@ _efl_ui_container_layout_item_init(Eo* o, Efl_Ui_Container_Item_Hints *item) item[0].min = min.w; item[1].min = min.h; - if ((item[0].aspect <= 0) || (item[1].aspect_type <= 0)) + if ((item[0].aspect <= 0) || (item[1].aspect <= 0)) { - if ((item[0].aspect <= 0) ^ (item[1].aspect_type <= 0)) + if ((item[0].aspect <= 0) ^ (item[1].aspect <= 0)) { ERR("Invalid aspect parameter for obj(%p)", o); - item[0].aspect = item[1].aspect_type = 0; + item[0].aspect = item[1].aspect = 0; item[0].aspect_type = item[1].aspect_type = EFL_GFX_HINT_ASPECT_NONE; } } diff --git a/src/lib/elementary/efl_ui_datepicker.c b/src/lib/elementary/efl_ui_datepicker.c index 872f67b90a..b7978b15c4 100644 --- a/src/lib/elementary/efl_ui_datepicker.c +++ b/src/lib/elementary/efl_ui_datepicker.c @@ -27,6 +27,7 @@ t.tm_year = pd->cur_date[DATEPICKER_YEAR] - 1900; \ t.tm_mon = pd->cur_date[DATEPICKER_MONTH] - 1; \ t.tm_mday = pd->cur_date[DATEPICKER_DAY]; \ + t.tm_sec = 0; \ efl_datetime_manager_value_set(pd->dt_manager, t); \ } while (0) diff --git a/src/lib/elementary/efl_ui_dnd_types.eot b/src/lib/elementary/efl_ui_dnd_types.eot index 9f24c6682d..83b9795506 100644 --- a/src/lib/elementary/efl_ui_dnd_types.eot +++ b/src/lib/elementary/efl_ui_dnd_types.eot @@ -5,7 +5,7 @@ function @beta Efl.Dnd.Drag_Icon_Create { params { @in win: Efl.Canvas.Object; [[The window to create the objects relative to]] @in drag_obj: Efl.Canvas.Object; [[The drag object]] - @out off: Eina.Position2D; + @out off: Eina.Position2D; [[Offset from the icon position to the cursor]] } return: Efl.Canvas.Object; [[The drag icon object]] }; diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index e0e8ff1625..523c5d3902 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -3,8 +3,6 @@ import eina_types; struct @beta @free(efl_ui_focus_relation_free) Efl.Ui.Focus.Relations { [[Structure holding the graph of relations between focusable objects. - - @since 1.20 ]] right : list @owned; [[List of objects on the right side]] left : list @owned; [[[List of objects on the left side]] @@ -22,7 +20,7 @@ struct @beta @free(efl_ui_focus_relation_free) Efl.Ui.Focus.Relations { struct Efl.Ui.Focus.Manager_Logical_End_Detail { [[Structure holding the focus object with extra information on logical end - @since 1.21 + @since 1.22 ]] is_regular_end : bool; [[$true if element is registered as regular element in the @Efl.Ui.Focus.Manager obejct, $false otherwise]] element : Efl.Ui.Focus.Object; [[The last element of the logical chain in the @Efl.Ui.Focus.Manager]] @@ -37,7 +35,7 @@ interface Efl.Ui.Focus.Manager { The tree interpretation differentiates between logical and non-logical widgets, a logical widget cannot receive focus whereas a non-logical one can. - @since 1.20 + @since 1.22 ]] methods { move { diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.c b/src/lib/elementary/efl_ui_focus_manager_calc.c index e64ee99818..3ccb48e8a6 100644 --- a/src/lib/elementary/efl_ui_focus_manager_calc.c +++ b/src/lib/elementary/efl_ui_focus_manager_calc.c @@ -1489,7 +1489,7 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_manager_focus_set(Eo *obj, Efl_U { //the correct one is focused if (node->redirect_manager == pd->redirect) - return; + goto end; } //make sure this manager is in the chain of redirects @@ -1566,11 +1566,18 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_manager_focus_set(Eo *obj, Efl_U } while (eina_array_count(chain) > 1) - efl_event_callback_call(eina_array_pop(chain), EFL_UI_FOCUS_OBJECT_EVENT_CHILD_FOCUS_CHANGED , (void*)EINA_TRUE); + { + Eina_Bool child_focus_changed = EINA_TRUE; + efl_event_callback_call(eina_array_pop(chain), EFL_UI_FOCUS_OBJECT_EVENT_CHILD_FOCUS_CHANGED , &child_focus_changed); + } while (eina_array_count(old_chain) > 1) - efl_event_callback_call(eina_array_pop(old_chain), EFL_UI_FOCUS_OBJECT_EVENT_CHILD_FOCUS_CHANGED, (void*)EINA_FALSE); + { + Eina_Bool child_focus_changed = EINA_FALSE; + efl_event_callback_call(eina_array_pop(old_chain), EFL_UI_FOCUS_OBJECT_EVENT_CHILD_FOCUS_CHANGED, &child_focus_changed); + } +end: eina_array_free(old_chain); eina_array_free(chain); } @@ -1949,19 +1956,24 @@ _efl_ui_focus_manager_calc_efl_ui_focus_manager_dirty_logic_freeze(Eo *obj, Efl_ { pd->freeze ++; if (pd->freeze == 1) - efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_DIRTY_LOGIC_FREEZE_CHANGED, (void*)EINA_TRUE); -} + { + Eina_Bool event_info = EINA_TRUE; + efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_DIRTY_LOGIC_FREEZE_CHANGED, &event_info); + } +} EOLIAN static void _efl_ui_focus_manager_calc_efl_ui_focus_manager_dirty_logic_unfreeze(Eo *obj, Efl_Ui_Focus_Manager_Calc_Data *pd) { pd->freeze --; if (!pd->freeze) - efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_DIRTY_LOGIC_FREEZE_CHANGED, (void*)EINA_FALSE); + { + Eina_Bool event_info = EINA_FALSE; + efl_event_callback_call(obj, EFL_UI_FOCUS_MANAGER_EVENT_DIRTY_LOGIC_FREEZE_CHANGED, &event_info); + } } - #define EFL_UI_FOCUS_MANAGER_CALC_EXTRA_OPS \ EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_ui_focus_manager_calc_efl_object_dbg_info_get) diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.eo b/src/lib/elementary/efl_ui_focus_manager_calc.eo index 72f0a2299b..7f1974139b 100644 --- a/src/lib/elementary/efl_ui_focus_manager_calc.eo +++ b/src/lib/elementary/efl_ui_focus_manager_calc.eo @@ -4,8 +4,6 @@ class @beta Efl.Ui.Focus.Manager_Calc extends Efl.Object implements Efl.Ui.Focus Each registered item will get an other registered object in each direction. You can get items for the currently focused item if you call request move. - - @since 1.20 ]] methods { register { diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.c b/src/lib/elementary/efl_ui_focus_manager_sub.c index 96eebdde50..4fb2733610 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.c +++ b/src/lib/elementary/efl_ui_focus_manager_sub.c @@ -122,7 +122,8 @@ _redirect_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED) static void _freeze_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED) { - if (ev->info) + Eina_Bool *val = ev->info; + if (*val) { efl_ui_focus_manager_dirty_logic_freeze(data); } diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.eo b/src/lib/elementary/efl_ui_focus_manager_sub.eo index 79e06c86ff..9394080396 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.eo +++ b/src/lib/elementary/efl_ui_focus_manager_sub.eo @@ -12,8 +12,6 @@ mixin @beta Efl.Ui.Focus.Manager_Sub requires Efl.Object extends Efl.Ui.Focus.Ma You can filter the border elements by overriding the property @Efl.Ui.Focus.Manager.border_elements. - - @since 1.20 ]] implements { Efl.Object.constructor; diff --git a/src/lib/elementary/efl_ui_focus_manager_window_root.eo b/src/lib/elementary/efl_ui_focus_manager_window_root.eo index 201e3bffc1..f56e6ccf58 100644 --- a/src/lib/elementary/efl_ui_focus_manager_window_root.eo +++ b/src/lib/elementary/efl_ui_focus_manager_window_root.eo @@ -3,5 +3,7 @@ interface Efl.Ui.Focus.Manager_Window_Root { Focusmanagers are ensuring that if they give focus to something, that they are registered in the upper focus manager. The most upper focus manager does not need to do that, and can implement this interface to indicate that. + + @since 1.22 ]] } diff --git a/src/lib/elementary/efl_ui_focus_object.c b/src/lib/elementary/efl_ui_focus_object.c index 1dc19a6b44..92f857897d 100644 --- a/src/lib/elementary/efl_ui_focus_object.c +++ b/src/lib/elementary/efl_ui_focus_object.c @@ -24,7 +24,7 @@ _efl_ui_focus_object_focus_set(Eo *obj, Efl_Ui_Focus_Object_Data *pd, Eina_Bool parent = efl_ui_focus_object_focus_parent_get(obj); if (parent) efl_ui_focus_object_child_focus_set(parent, focus); - efl_event_callback_call(obj, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED , (void*) (uintptr_t) focus); + efl_event_callback_call(obj, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED , &focus); } EOLIAN static Eina_Bool diff --git a/src/lib/elementary/efl_ui_focus_object.eo b/src/lib/elementary/efl_ui_focus_object.eo index 62c3f8b5ac..3210db0e15 100644 --- a/src/lib/elementary/efl_ui_focus_object.eo +++ b/src/lib/elementary/efl_ui_focus_object.eo @@ -4,7 +4,7 @@ mixin Efl.Ui.Focus.Object { [[Functions of focusable objects. - @since 1.20 + @since 1.22 ]] methods { @property focus_geometry { diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c index 58cacdd6f3..8e0974dd12 100644 --- a/src/lib/elementary/efl_ui_grid.c +++ b/src/lib/elementary/efl_ui_grid.c @@ -167,6 +167,7 @@ _reposition(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, Eina_Position2D pan) EINA_LIST_FOREACH(pd->items, l, item) { EFL_UI_GRID_ITEM_DATA_GET(item, id); + if (!id) continue; ipos.x = id->geo.x - pan.x; ipos.y = id->geo.y - pan.y; @@ -902,7 +903,7 @@ _grid_item_selected(void *data, const Efl_Event *event) pd->selected = eina_list_append(pd->selected, item); pd->last_selected = item; - efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_SELECTED, item); + efl_event_callback_call(obj, EFL_UI_EVENT_ITEM_SELECTED, item); } static void @@ -915,7 +916,7 @@ _grid_item_unselected(void *data, const Efl_Event *event) pd->selected = eina_list_remove(pd->selected, item); if (pd->last_selected == item) pd->last_selected = NULL; - efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_UNSELECTED, item); + efl_event_callback_call(obj, EFL_UI_EVENT_ITEM_UNSELECTED, item); } static void @@ -944,8 +945,8 @@ _grid_item_process(Eo *obj, Efl_Ui_Grid_Data *pd, EINA_UNUSED Efl_Ui_Grid_Item * efl_event_callback_add(it, EFL_UI_EVENT_PRESSED, _grid_item_pressed, obj); efl_event_callback_add(it, EFL_UI_EVENT_UNPRESSED, _grid_item_unpressed, obj); efl_event_callback_add(it, EFL_UI_EVENT_LONGPRESSED, _grid_item_longpressed, obj); - efl_event_callback_add(it, EFL_UI_EVENT_SELECTABLE_SELECTED, _grid_item_selected, obj); - efl_event_callback_add(it, EFL_UI_EVENT_SELECTABLE_UNSELECTED, _grid_item_unselected, obj); + efl_event_callback_add(it, EFL_UI_EVENT_ITEM_SELECTED, _grid_item_selected, obj); + efl_event_callback_add(it, EFL_UI_EVENT_ITEM_UNSELECTED, _grid_item_unselected, obj); efl_event_callback_add(it, EFL_EVENT_DEL, _grid_item_deleted, obj); return EINA_TRUE; @@ -970,8 +971,8 @@ _grid_item_unpack_internal(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Ui_Grid_Item *it) efl_event_callback_del(it, EFL_UI_EVENT_PRESSED, _grid_item_pressed, obj); efl_event_callback_del(it, EFL_UI_EVENT_UNPRESSED, _grid_item_unpressed, obj); efl_event_callback_del(it, EFL_UI_EVENT_LONGPRESSED, _grid_item_longpressed, obj); - efl_event_callback_del(it, EFL_UI_EVENT_SELECTABLE_SELECTED, _grid_item_selected, obj); - efl_event_callback_del(it, EFL_UI_EVENT_SELECTABLE_UNSELECTED, _grid_item_unselected, obj); + efl_event_callback_del(it, EFL_UI_EVENT_ITEM_SELECTED, _grid_item_selected, obj); + efl_event_callback_del(it, EFL_UI_EVENT_ITEM_UNSELECTED, _grid_item_unselected, obj); efl_event_callback_del(it, EFL_EVENT_DEL, _grid_item_deleted, obj); } diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index 56be05583e..a1bbe2f239 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -600,7 +600,6 @@ _efl_ui_image_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Image_Data *sd) if (elm_widget_is_legacy(obj)) efl_event_callback_del(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, _on_size_hints_changed, sd); - ecore_job_del(sd->sizing_job); ecore_timer_del(sd->anim_timer); evas_object_del(sd->img); _prev_img_del(sd); @@ -741,18 +740,15 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) return EINA_TRUE; } -static void -_sizing_eval_cb(void *data) +void +_efl_ui_image_sizing_eval(Evas_Object *obj) { - Evas_Object *obj = data; + EFL_UI_IMAGE_DATA_GET_OR_RETURN(obj, sd); + Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1; Eina_Size2D sz; double ts; - EFL_UI_IMAGE_DATA_GET_OR_RETURN(obj, sd); - - sd->sizing_job = NULL; - // TODO: remove this function after using the widget's scale value instead of image's scale value, if (sd->no_scale) sd->scale = 1.0; @@ -812,15 +808,6 @@ _sizing_eval_cb(void *data) } } -void -_efl_ui_image_sizing_eval(Evas_Object *obj) -{ - EFL_UI_IMAGE_DATA_GET_OR_RETURN(obj, sd); - - if (sd->sizing_job) ecore_job_del(sd->sizing_job); - sd->sizing_job = ecore_job_add(_sizing_eval_cb, obj); -} - static void _efl_ui_image_load_size_set_internal(Evas_Object *obj, Efl_Ui_Image_Data *sd) { diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo index 3e876e02be..cae449fa06 100644 --- a/src/lib/elementary/efl_ui_image.eo +++ b/src/lib/elementary/efl_ui_image.eo @@ -2,7 +2,6 @@ struct @beta Efl.Ui.Image_Progress { [[ Structure associated with smart callback 'download,progress'. - @since 1.8 ]] now: double; [[Current percentage]] total: double; [[Total percentage]] @@ -12,7 +11,6 @@ struct @beta Efl.Ui.Image_Error { [[ Structure associated with smart callback 'download,progress'. - @since 1.8 ]] status: int; [[Error status of the download]] open_error: bool; [[$true if the error happened when opening the file, $false otherwise]] @@ -30,8 +28,7 @@ class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl. methods { @property scalable { [[Enable or disable scaling up or down the internal image. - - @since 1.18]] + ]] values { scale_up: bool; [[If $true, the internal image might be scaled up if necessary according to the scale type. @@ -45,8 +42,7 @@ class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl. } @property align { [[Controls how the internal image is positioned inside an image object. - - @since 1.18]] + ]] values { align_x: double; [[Alignment in the horizontal axis (0 <= align_x <= 1).]] align_y: double; [[Alignment in the vertical axis (0 <= align_y <= 1).]] diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c index b821c441a7..b7ff98a22c 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.c +++ b/src/lib/elementary/efl_ui_image_zoomable.c @@ -2030,10 +2030,7 @@ _img_proxy_set(Evas_Object *obj, Efl_Ui_Image_Zoomable_Data *sd, ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); double tz; int w, h; - Eina_Error err; - - err = efl_file_load(efl_super(obj, MY_CLASS)); - if (err) return err; + Eina_Error err = 0; sd->zoom = 1.0; evas_object_image_smooth_scale_set(sd->img, (sd->no_smooth == 0)); @@ -2111,12 +2108,9 @@ _internal_file_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, Evas_Load_Error *ret ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_GFX_IMAGE_LOAD_ERROR_GENERIC); int w, h; double tz; - Eina_Error err; + Eina_Error err = 0; const char *file; - err = efl_file_load(efl_super(obj, MY_CLASS)); - if (err) return err; - file = efl_file_get(obj); if (eina_str_has_extension(file, ".edj")) @@ -2337,8 +2331,9 @@ static const Eina_Slice remote_uri[] = { static inline Eina_Bool _efl_ui_image_zoomable_is_remote(const char *file) { - Eina_Slice s = EINA_SLICE_STR(file); const Eina_Slice *itr; + if (!file) return EINA_FALSE; + Eina_Slice s = EINA_SLICE_STR(file);; for (itr = remote_uri; itr->mem; itr++) if (eina_slice_startswith(s, *itr)) @@ -2407,10 +2402,16 @@ _efl_ui_image_zoomable_efl_file_load(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd) } EOLIAN static Eina_Error -_efl_ui_image_zoomable_efl_file_file_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, const char *file) +_efl_ui_image_zoomable_efl_file_file_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd, const char *file) { eina_stringshare_replace(&sd->file, file); - return efl_file_set(efl_super(obj, MY_CLASS), file); + return 0; +} + +EOLIAN static const char * +_efl_ui_image_zoomable_efl_file_file_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd) +{ + return sd->file; } EOLIAN static void @@ -3358,8 +3359,8 @@ elm_photocam_zoom_mode_get(const Evas_Object *obj) EAPI Evas_Load_Error elm_photocam_file_set(Evas_Object *obj, const char *file) { - ELM_PHOTOCAM_CHECK(obj) EVAS_LOAD_ERROR_NONE; - EINA_SAFETY_ON_NULL_RETURN_VAL(file, EVAS_LOAD_ERROR_NONE); + ELM_PHOTOCAM_CHECK(obj) EVAS_LOAD_ERROR_GENERIC; + EINA_SAFETY_ON_NULL_RETURN_VAL(file, EVAS_LOAD_ERROR_GENERIC); if (efl_file_simple_load(obj, file, NULL)) return EVAS_LOAD_ERROR_NONE; Eina_Error err = eina_error_get(); diff --git a/src/lib/elementary/efl_ui_image_zoomable.eo b/src/lib/elementary/efl_ui_image_zoomable.eo index 374c82fc21..fccf57f21c 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.eo +++ b/src/lib/elementary/efl_ui_image_zoomable.eo @@ -37,7 +37,6 @@ class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom, [[Set the viewed region of the image This shows the region of the image without using animation. - @since 1.20 ]] } values { @@ -65,7 +64,7 @@ class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom, Efl.Ui.Scrollable_Interactive.scroll; Efl.Access.Widget.Action.elm_actions { get; } Efl.File.load; - Efl.File.file { set; } + Efl.File.file { get; set; } Efl.Orientation.orientation { get; set; } Efl.Orientation.flip { get; set; } Efl.Layout.Group.group_size_min { get; } diff --git a/src/lib/elementary/efl_ui_item.c b/src/lib/elementary/efl_ui_item.c index e4d616c2be..65f488e2e7 100644 --- a/src/lib/elementary/efl_ui_item.c +++ b/src/lib/elementary/efl_ui_item.c @@ -27,7 +27,7 @@ _item_select(Eo *obj, Efl_Ui_Item_Data *pd) pd->selected = EINA_TRUE; edje_object_signal_emit(wd->resize_obj, "efl,state,selected", "efl"); - efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_SELECTED, NULL); + efl_event_callback_call(obj, EFL_UI_EVENT_ITEM_SELECTED, NULL); } static void @@ -38,7 +38,7 @@ _item_unselect(Eo *obj, Efl_Ui_Item_Data *pd) pd->selected = EINA_FALSE; edje_object_signal_emit(wd->resize_obj, "efl,state,unselected", "efl"); - efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_UNSELECTED, NULL); + efl_event_callback_call(obj, EFL_UI_EVENT_ITEM_UNSELECTED, NULL); } /* Mouse Controls */ diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index 8c6e69abcf..9ba90026a9 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -474,13 +474,20 @@ _efl_ui_layout_theme_internal(Eo *obj, Efl_Ui_Layout_Data *sd) EOLIAN static Eina_Error _efl_ui_layout_base_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Layout_Data *sd) { - Eina_Error theme_apply_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC; + Eina_Error theme_apply_ret, theme_apply_internal_ret; theme_apply_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)); if (theme_apply_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return EFL_UI_THEME_APPLY_ERROR_GENERIC; - theme_apply_ret &= _efl_ui_layout_theme_internal(obj, sd); - return theme_apply_ret; + theme_apply_internal_ret = _efl_ui_layout_theme_internal(obj, sd); + if (theme_apply_internal_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) + return EFL_UI_THEME_APPLY_ERROR_GENERIC; + + if ((theme_apply_ret == EFL_UI_THEME_APPLY_ERROR_DEFAULT) || + (theme_apply_internal_ret == EFL_UI_THEME_APPLY_ERROR_DEFAULT)) + return EFL_UI_THEME_APPLY_ERROR_DEFAULT; + + return EFL_UI_THEME_APPLY_ERROR_NONE; } EOLIAN static Eina_Bool @@ -2756,6 +2763,7 @@ elm_layout_table_clear(Eo *obj, const char *part, Eina_Bool clear) EAPI Eina_Bool elm_layout_text_set(Eo *obj, const char *part, const char *text) { + Eo *part_obj; if (!part) { part = efl_ui_widget_default_text_part_get(obj); @@ -2764,8 +2772,19 @@ elm_layout_text_set(Eo *obj, const char *part, const char *text) else if (!_elm_layout_part_aliasing_eval(obj, &part, EINA_TRUE)) return EINA_FALSE; - if (!efl_layout_group_part_exist_get(obj, part)) return EINA_FALSE; - efl_text_set(efl_part(obj, part), text); + part_obj = efl_ref(efl_part(obj, part)); + + if (!efl_isa(part_obj, EFL_TEXT_INTERFACE) || + !efl_isa(part_obj, EFL_UI_LAYOUT_PART_CLASS)) + { + efl_del(part_obj); + return EINA_FALSE; + } + + efl_text_set(part_obj, text); + + efl_unref(part_obj); + return EINA_TRUE; } diff --git a/src/lib/elementary/efl_ui_layout.eo b/src/lib/elementary/efl_ui_layout.eo index 40ab958928..8738f3dce8 100644 --- a/src/lib/elementary/efl_ui_layout.eo +++ b/src/lib/elementary/efl_ui_layout.eo @@ -2,7 +2,10 @@ import efl_ui; class Efl.Ui.Layout extends Efl.Ui.Layout_Base implements Efl.File { - [[Elementary layout class]] + [[Elementary layout class + + @since 1.22 + ]] data: null; implements { Efl.File.file { get; set; } diff --git a/src/lib/elementary/efl_ui_layout_base.eo b/src/lib/elementary/efl_ui_layout_base.eo index 14688f1af5..331a149fa8 100644 --- a/src/lib/elementary/efl_ui_layout_base.eo +++ b/src/lib/elementary/efl_ui_layout_base.eo @@ -6,7 +6,10 @@ abstract Efl.Ui.Layout_Base extends Efl.Ui.Widget implements Efl.Container, Efl.Layout.Calc, Efl.Layout.Signal, Efl.Layout.Group { - [[Elementary layout abstract]] + [[Elementary layout abstract + + @since 1.22 + ]] eo_prefix: efl_ui_layout; data: Efl_Ui_Layout_Data; methods { diff --git a/src/lib/elementary/efl_ui_list.c b/src/lib/elementary/efl_ui_list.c index ff08383e39..2b2b077f24 100644 --- a/src/lib/elementary/efl_ui_list.c +++ b/src/lib/elementary/efl_ui_list.c @@ -657,7 +657,7 @@ _list_item_selected(void *data, const Efl_Event *event) pd->selected = eina_list_append(pd->selected, item); pd->last_selected = item; - efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_SELECTED, item); + efl_event_callback_call(obj, EFL_UI_EVENT_ITEM_SELECTED, item); } static void @@ -670,7 +670,7 @@ _list_item_unselected(void *data, const Efl_Event *event) pd->selected = eina_list_remove(pd->selected, item); if (pd->last_selected == item) pd->last_selected = NULL; - efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_UNSELECTED, item); + efl_event_callback_call(obj, EFL_UI_EVENT_ITEM_UNSELECTED, item); } static Eina_Bool @@ -689,8 +689,8 @@ _list_item_process(Eo *obj, Efl_Ui_List_Data *pd, EINA_UNUSED Efl_Ui_List_Item * efl_event_callback_add(it, EFL_UI_EVENT_PRESSED, _list_item_pressed, obj); efl_event_callback_add(it, EFL_UI_EVENT_UNPRESSED, _list_item_unpressed, obj); efl_event_callback_add(it, EFL_UI_EVENT_LONGPRESSED, _list_item_longpressed, obj); - efl_event_callback_add(it, EFL_UI_EVENT_SELECTABLE_SELECTED, _list_item_selected, obj); - efl_event_callback_add(it, EFL_UI_EVENT_SELECTABLE_UNSELECTED, _list_item_unselected, obj); + efl_event_callback_add(it, EFL_UI_EVENT_ITEM_SELECTED, _list_item_selected, obj); + efl_event_callback_add(it, EFL_UI_EVENT_ITEM_UNSELECTED, _list_item_unselected, obj); return EINA_TRUE; } @@ -708,8 +708,8 @@ _list_item_clear(Eo *obj, Efl_Ui_List_Data *pd EINA_UNUSED, EINA_UNUSED Efl_Ui_L efl_event_callback_del(it, EFL_UI_EVENT_PRESSED, _list_item_pressed, obj); efl_event_callback_del(it, EFL_UI_EVENT_UNPRESSED, _list_item_unpressed, obj); efl_event_callback_del(it, EFL_UI_EVENT_LONGPRESSED, _list_item_longpressed, obj); - efl_event_callback_del(it, EFL_UI_EVENT_SELECTABLE_SELECTED, _list_item_selected, obj); - efl_event_callback_del(it, EFL_UI_EVENT_SELECTABLE_UNSELECTED, _list_item_unselected, obj); + efl_event_callback_del(it, EFL_UI_EVENT_ITEM_SELECTED, _list_item_selected, obj); + efl_event_callback_del(it, EFL_UI_EVENT_ITEM_UNSELECTED, _list_item_unselected, obj); } /* Pack APIs */ diff --git a/src/lib/elementary/efl_ui_list_view.eo b/src/lib/elementary/efl_ui_list_view.eo index 9112e6fc78..f963fd3331 100644 --- a/src/lib/elementary/efl_ui_list_view.eo +++ b/src/lib/elementary/efl_ui_list_view.eo @@ -51,8 +51,6 @@ class @beta Efl.Ui.List_View extends Efl.Ui.Layout_Base implements Efl.Ui.Scroll item,unfocused : Efl.Ui.List_View_Item_Event; item,highlighted : Efl.Ui.List_View_Item_Event; item,unhighlighted : Efl.Ui.List_View_Item_Event; - item,selected : Efl.Ui.List_View_Item_Event; - item,unselected : Efl.Ui.List_View_Item_Event; } implements { diff --git a/src/lib/elementary/efl_ui_navigation_layout.eo b/src/lib/elementary/efl_ui_navigation_layout.eo index e766fc0da7..1ddac7367b 100644 --- a/src/lib/elementary/efl_ui_navigation_layout.eo +++ b/src/lib/elementary/efl_ui_navigation_layout.eo @@ -16,7 +16,7 @@ class @beta Efl.Ui.Navigation_Layout extends Efl.Ui.Layout_Base implements Efl.C get { } values { - value: Efl.Ui.Layout; + value: Efl.Ui.Layout_Base; [[The bar object located at the top area of the Navigation Layout. ]] } diff --git a/src/lib/elementary/efl_ui_nstate.h b/src/lib/elementary/efl_ui_nstate.h index 5e69c19dce..1d16c1f1c4 100644 --- a/src/lib/elementary/efl_ui_nstate.h +++ b/src/lib/elementary/efl_ui_nstate.h @@ -21,6 +21,4 @@ * @{ */ -#ifdef EFL_EO_API_SUPPORT #include "efl_ui_nstate.eo.h" -#endif diff --git a/src/lib/elementary/efl_ui_progressbar.eo b/src/lib/elementary/efl_ui_progressbar.eo index 846bd8e7cb..af84fc986c 100644 --- a/src/lib/elementary/efl_ui_progressbar.eo +++ b/src/lib/elementary/efl_ui_progressbar.eo @@ -16,8 +16,6 @@ class @beta Efl.Ui.Progressbar extends Efl.Ui.Layout_Base implements Efl.Ui.Rang animate the bar with content, switching constantly between filling it and back to non-filled in a loop. To start and stop this pulsing animation you need to explicitly call efl_ui_progressbar_pulse_set(). - - @since 1.20 ]] set { @@ -33,14 +31,10 @@ class @beta Efl.Ui.Progressbar extends Efl.Ui.Layout_Base implements Efl.Ui.Rang [[Start/stop a given progress bar "pulsing" animation, if its under that mode Note: This call won't do anything if $obj is not under "pulsing mode". - - @since 1.20 ]] } get { [[ Get the pulsing state on a given progressbar widget. - - @since 1.20 ]] } values { diff --git a/src/lib/elementary/efl_ui_selection.eo b/src/lib/elementary/efl_ui_selection.eo index 6132a4f2db..20e42261d0 100644 --- a/src/lib/elementary/efl_ui_selection.eo +++ b/src/lib/elementary/efl_ui_selection.eo @@ -9,7 +9,7 @@ mixin @beta Efl.Ui.Selection { params { @in type: Efl.Ui.Selection_Type; [[Selection Type]] @in format: Efl.Ui.Selection_Format; [[Selection Format]] - @in data: Eina.Slice; + @in data: Eina.Slice; [[Selection data]] @in seat: uint;[[Specified seat for multiple seats case.]] } return: future; [[Future for tracking when the selection is lost]] @@ -40,6 +40,6 @@ mixin @beta Efl.Ui.Selection { } } events { - selection,changed: Efl.Ui.Selection_Changed; [[Called when display server's selection has changed]] + wm_selection,changed: Efl.Ui.Selection_Changed; [[Called when display server's selection has changed]] } } diff --git a/src/lib/elementary/efl_ui_selection_manager.c b/src/lib/elementary/efl_ui_selection_manager.c index 7b06cfc142..ef9d221d0d 100644 --- a/src/lib/elementary/efl_ui_selection_manager.c +++ b/src/lib/elementary/efl_ui_selection_manager.c @@ -880,7 +880,7 @@ _x11_fixes_selection_notify(void *data, int t EINA_UNUSED, void *event) _e->exists = e.exist; ecore_event_add(ELM_CNP_EVENT_SELECTION_CHANGED, _e, NULL, NULL); - efl_event_callback_call(sel->owner, EFL_UI_SELECTION_EVENT_SELECTION_CHANGED, &e); + efl_event_callback_call(sel->owner, EFL_UI_SELECTION_EVENT_WM_SELECTION_CHANGED, &e); return ECORE_CALLBACK_RENEW; } @@ -2650,7 +2650,7 @@ _wl_selection_changed(void *data, int type EINA_UNUSED, void *event) _e->exists = e.exist; ecore_event_add(ELM_CNP_EVENT_SELECTION_CHANGED, _e, _wl_selection_changed_free, ev->display); - efl_event_callback_call(sel->request_obj, EFL_UI_SELECTION_EVENT_SELECTION_CHANGED, &e); + efl_event_callback_call(sel->request_obj, EFL_UI_SELECTION_EVENT_WM_SELECTION_CHANGED, &e); return ECORE_CALLBACK_RENEW; } @@ -5179,7 +5179,11 @@ _efl_ui_selection_manager_efl_object_constructor(Eo *obj, Efl_Ui_Selection_Manag } if (init_x) { - ecore_x_init(NULL); + if (!ecore_x_init(NULL)) + { + ERR("Could not initialize Ecore_X"); + return NULL; + } } #endif #ifdef HAVE_ELEMENTARY_WL2 diff --git a/src/lib/elementary/efl_ui_slider_interval.eo b/src/lib/elementary/efl_ui_slider_interval.eo index c42621356b..fcfc1b73bd 100644 --- a/src/lib/elementary/efl_ui_slider_interval.eo +++ b/src/lib/elementary/efl_ui_slider_interval.eo @@ -3,14 +3,10 @@ class @beta Efl.Ui.Slider_Interval extends Efl.Ui.Slider [[An interval slider. This is a slider with two indicators. - - @since 1.21 ]] methods { @property interval_value { [[Sets up position of two indicators at start and end position. - - @since 1.21 ]] get { } diff --git a/src/lib/elementary/efl_ui_spin.eo b/src/lib/elementary/efl_ui_spin.eo index be06558691..e523ecbd3b 100644 --- a/src/lib/elementary/efl_ui_spin.eo +++ b/src/lib/elementary/efl_ui_spin.eo @@ -12,8 +12,6 @@ class @beta Efl.Ui.Spin extends Efl.Ui.Layout_Base implements Efl.Ui.Range_Inter This is a widget which allows the user to increase or decrease numeric values using user interactions. It's a basic type of widget for choosing and displaying values. - - @since 1.21 ]] methods { @property special_value { diff --git a/src/lib/elementary/efl_ui_spin_button.eo b/src/lib/elementary/efl_ui_spin_button.eo index 7123570dbd..fd6d360011 100644 --- a/src/lib/elementary/efl_ui_spin_button.eo +++ b/src/lib/elementary/efl_ui_spin_button.eo @@ -6,8 +6,6 @@ class @beta Efl.Ui.Spin_Button extends Efl.Ui.Spin implements Efl.Ui.Focus.Compo This is a widget which allows the user to increase or decrease numeric values using the arrow buttons or to edit values directly by clicking over them and inputting new ones. - - @since 1.21 ]] methods { @property circulate { diff --git a/src/lib/elementary/efl_ui_stack.c b/src/lib/elementary/efl_ui_stack.c index 76b59c128b..e7edcdaf57 100644 --- a/src/lib/elementary/efl_ui_stack.c +++ b/src/lib/elementary/efl_ui_stack.c @@ -124,6 +124,8 @@ _hide_anim_ended_cb(void *data, const Efl_Event *event EINA_UNUSED) Efl_Ui_Stack_Data *pd = efl_data_scope_safe_get(data, EFL_UI_STACK_CLASS); Efl_Canvas_Object *content; + EINA_SAFETY_ON_NULL_RETURN(pd); + content = _end_anim(pd->hide_td); pd->hide_td = NULL; efl_gfx_entity_visible_set(content, EINA_FALSE); @@ -136,6 +138,8 @@ _show_anim_ended_cb(void *data, const Efl_Event *event EINA_UNUSED) Efl_Ui_Stack_Data *pd = efl_data_scope_safe_get(data, EFL_UI_STACK_CLASS); Efl_Canvas_Object *content; + EINA_SAFETY_ON_NULL_RETURN(pd); + content = _end_anim(pd->show_td); pd->show_td = NULL; //Activated Event @@ -261,9 +265,9 @@ static void _pop_content_hide_cb(void *data, const Efl_Event *event) { Content_Data *cd = data; - + Eina_Bool *visible = event->info; /* object is being shown */ - if (event->info) return; + if (*visible) return; cd->popped_hidden = EINA_TRUE; diff --git a/src/lib/elementary/efl_ui_tab_bar.c b/src/lib/elementary/efl_ui_tab_bar.c index 0cc849c8ce..e5fb3414df 100644 --- a/src/lib/elementary/efl_ui_tab_bar.c +++ b/src/lib/elementary/efl_ui_tab_bar.c @@ -187,9 +187,9 @@ _tab_select(Efl_Ui_Tab_Bar_Data *sd, Tab_Info *ti) index = eina_list_data_idx(sd->tab_infos, ti); - efl_event_callback_call(tp, EFL_UI_EVENT_SELECTABLE_SELECTED, (void *)(intptr_t)index); - sd->cur = index; + + efl_event_callback_call(tp, EFL_UI_EVENT_ITEM_SELECTED, NULL); } } diff --git a/src/lib/elementary/efl_ui_tab_pager.c b/src/lib/elementary/efl_ui_tab_pager.c index 3edbf1a0f4..4187f31174 100644 --- a/src/lib/elementary/efl_ui_tab_pager.c +++ b/src/lib/elementary/efl_ui_tab_pager.c @@ -26,7 +26,7 @@ _select(Eo *obj, int index) static void _tab_select_cb(void *data, const Efl_Event *event) { - int index = (intptr_t)event->info; + int index = efl_ui_tab_bar_current_tab_get(event->object); _select(data, index); } @@ -60,7 +60,7 @@ _efl_ui_tab_pager_tab_bar_set(Eo *obj, Efl_Ui_Tab_Pager_Data *sd, Efl_Canvas_Obj { if (sd->tab_bar != NULL) { - efl_event_callback_del(sd->tab_bar, EFL_UI_EVENT_SELECTABLE_SELECTED, _tab_select_cb, obj); + efl_event_callback_del(sd->tab_bar, EFL_UI_EVENT_ITEM_SELECTED, _tab_select_cb, obj); efl_content_unset(efl_part(obj, "efl.tab_root")); efl_del(sd->tab_bar); } @@ -68,7 +68,7 @@ _efl_ui_tab_pager_tab_bar_set(Eo *obj, Efl_Ui_Tab_Pager_Data *sd, Efl_Canvas_Obj sd->tab_bar = tab_bar; efl_content_set(efl_part(obj, "efl.tab_root"), sd->tab_bar); - efl_event_callback_add(sd->tab_bar, EFL_UI_EVENT_SELECTABLE_SELECTED, _tab_select_cb, obj); + efl_event_callback_add(sd->tab_bar, EFL_UI_EVENT_ITEM_SELECTED, _tab_select_cb, obj); } EOLIAN static Efl_Canvas_Object * @@ -87,7 +87,7 @@ EOLIAN static void _efl_ui_tab_pager_efl_object_destructor(Eo *obj, Efl_Ui_Tab_Pager_Data *sd) { if (sd->tab_bar != NULL) - efl_event_callback_del(sd->tab_bar, EFL_UI_EVENT_SELECTABLE_SELECTED, _tab_select_cb, obj); + efl_event_callback_del(sd->tab_bar, EFL_UI_EVENT_ITEM_SELECTED, _tab_select_cb, obj); efl_destructor(efl_super(obj, MY_CLASS)); } diff --git a/src/lib/elementary/efl_ui_tab_pager.eo b/src/lib/elementary/efl_ui_tab_pager.eo index b602cce018..c7e0b5504a 100644 --- a/src/lib/elementary/efl_ui_tab_pager.eo +++ b/src/lib/elementary/efl_ui_tab_pager.eo @@ -14,7 +14,7 @@ class @beta Efl.Ui.Tab_Pager extends Efl.Ui.Pager Efl.Container.content_count; Efl.Pack.pack_clear; // TODO Efl.Pack.unpack_all; // TODO - Efl.Pack.unpack; // TODO + Efl.Pack.unpack; Efl.Pack_Linear.pack_begin; Efl.Pack_Linear.pack_end; Efl.Pack_Linear.pack_before; diff --git a/src/lib/elementary/efl_ui_table.c b/src/lib/elementary/efl_ui_table.c index 7fe398d1ed..50fd0be834 100644 --- a/src/lib/elementary/efl_ui_table.c +++ b/src/lib/elementary/efl_ui_table.c @@ -719,14 +719,7 @@ _efl_ui_table_efl_pack_table_table_rows_get(const Eo *obj EINA_UNUSED, Efl_Ui_Ta } EOLIAN static Eina_Bool -_efl_ui_table_efl_pack_pack(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED, Efl_Gfx_Entity *subobj) -{ - /* this is just an alias */ - return efl_pack_end(obj, subobj); -} - -EOLIAN static Eina_Bool -_efl_ui_table_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Table_Data *pd, Efl_Gfx_Entity *subobj) +_efl_ui_table_efl_pack_pack(Eo *obj, Efl_Ui_Table_Data *pd, Efl_Gfx_Entity *subobj) { EINA_SAFETY_ON_NULL_RETURN_VAL(subobj, EINA_FALSE); diff --git a/src/lib/elementary/efl_ui_table.eo b/src/lib/elementary/efl_ui_table.eo index 3e3753a94c..7bcf3195a1 100644 --- a/src/lib/elementary/efl_ui_table.eo +++ b/src/lib/elementary/efl_ui_table.eo @@ -38,7 +38,6 @@ class @beta Efl.Ui.Table extends Efl.Ui.Widget implements Efl.Pack_Table, Efl.Pa Efl.Pack_Table.table_columns { get; set; } Efl.Pack_Table.table_rows { get; set; } Efl.Pack_Table.table_direction { get; set; } - Efl.Pack_Linear.pack_end; Efl.Pack_Layout.layout_update; Efl.Pack_Layout.layout_request; } diff --git a/src/lib/elementary/efl_ui_tags.c b/src/lib/elementary/efl_ui_tags.c index 8d377b6aed..00748a7986 100644 --- a/src/lib/elementary/efl_ui_tags.c +++ b/src/lib/elementary/efl_ui_tags.c @@ -144,7 +144,7 @@ _shrink_mode_set(Eo *obj, { sd->view_state = TAGS_VIEW_SHRINK; efl_event_callback_call - (obj, EFL_UI_TAGS_EVENT_EXPAND_STATE_CHANGED, (void *)1); + (obj, EFL_UI_TAGS_EVENT_EXPAND_STATE_CHANGED, &shrink); } eina_value_flush(&val); @@ -175,7 +175,7 @@ _shrink_mode_set(Eo *obj, { sd->view_state = TAGS_VIEW_NONE; efl_event_callback_call - (obj, EFL_UI_TAGS_EVENT_EXPAND_STATE_CHANGED, (void *)(uintptr_t)sd->shrink); + (obj, EFL_UI_TAGS_EVENT_EXPAND_STATE_CHANGED, &shrink); } } diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c index f5a2ddedb1..cae523bcdd 100644 --- a/src/lib/elementary/efl_ui_text.c +++ b/src/lib/elementary/efl_ui_text.c @@ -1164,9 +1164,6 @@ _selection_store(Efl_Ui_Selection_Type seltype, Selection_Loss_Data *ldata; Eina_Future *f; - ldata = calloc(1, sizeof(Selection_Loss_Data)); - if (!ldata) return; - EFL_UI_TEXT_DATA_GET(obj, sd); efl_text_interactive_selection_cursors_get(obj, &start, &end); @@ -1177,7 +1174,6 @@ _selection_store(Efl_Ui_Selection_Type seltype, slice.len = strlen(sel); slice.mem = sel; - switch (seltype) { case EFL_UI_SELECTION_TYPE_CLIPBOARD: @@ -1202,12 +1198,16 @@ _selection_store(Efl_Ui_Selection_Type seltype, break; } + ldata = calloc(1, sizeof(Selection_Loss_Data)); + if (!ldata) goto end; + ldata->obj = obj; eina_future_then_easy(f, _selection_lost_cb, NULL, NULL, EINA_VALUE_TYPE_UINT, ldata); //if (seltype == EFL_UI_SELECTION_TYPE_CLIPBOARD) // eina_stringshare_replace(&sd->cut_sel, sel); +end: free(sel); } @@ -1217,7 +1217,7 @@ _cut_cb(Eo *obj) Efl_Text_Cursor_Cursor *start, *end; EFL_UI_TEXT_DATA_GET(obj, sd); - efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_CUT, NULL); + efl_event_callback_call(obj, EFL_UI_EVENT_SELECTION_CUT, NULL); /* Store it */ sd->sel_mode = EINA_FALSE; if (!_elm_config->desktop_entry) @@ -1246,7 +1246,7 @@ _copy_cb(Eo *obj) { EFL_UI_TEXT_DATA_GET(obj, sd); - efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_COPY, NULL); + efl_event_callback_call(obj, EFL_UI_EVENT_SELECTION_COPY, NULL); sd->sel_mode = EINA_FALSE; if (!_elm_config->desktop_entry) { @@ -2437,7 +2437,7 @@ _efl_ui_text_select_none(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd) edje_object_signal_emit(sd->entry_edje, "efl,state,select,off", "efl"); } if (sd->have_selection) - efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_CLEARED, NULL); + efl_event_callback_call(obj, EFL_UI_EVENT_SELECTION_CLEARED, NULL); sd->have_selection = EINA_FALSE; _edje_signal_emit(sd, "selection,cleared", "efl.text"); diff --git a/src/lib/elementary/efl_ui_text.eo b/src/lib/elementary/efl_ui_text.eo index b43059e89a..c2b0bb1ce6 100644 --- a/src/lib/elementary/efl_ui_text.eo +++ b/src/lib/elementary/efl_ui_text.eo @@ -29,14 +29,10 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Ui.Clickable, set { [[Set the attribute to show the input panel in case of only a user's explicit Mouse Up event. It doesn't request to show the input panel even though it has focus. - - @since 1.9 ]] } get { [[Get the attribute to show the input panel in case of only an user's explicit Mouse Up event. - - @since 1.9 ]] } values { @@ -109,14 +105,10 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Ui.Clickable, @property input_panel_layout_variation { set { [[Set the input panel layout variation of the entry - - @since 1.8 ]] } get { [[Get the input panel layout variation of the entry - - @since 1.8 ]] } values { diff --git a/src/lib/elementary/efl_ui_text_alert_popup.c b/src/lib/elementary/efl_ui_text_alert_popup.c index e0d516a598..dd19e6a0d8 100644 --- a/src/lib/elementary/efl_ui_text_alert_popup.c +++ b/src/lib/elementary/efl_ui_text_alert_popup.c @@ -270,7 +270,7 @@ _efl_ui_text_alert_popup_efl_object_constructor(Eo *obj, ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); if (!elm_widget_theme_klass_get(obj)) - elm_widget_theme_klass_set(obj, "scroll_alert_popup"); + elm_widget_theme_klass_set(obj, "text_alert_popup"); obj = efl_constructor(efl_super(obj, MY_CLASS)); efl_canvas_object_type_set(obj, MY_CLASS_NAME); diff --git a/src/lib/elementary/efl_ui_text_async.eo b/src/lib/elementary/efl_ui_text_async.eo index e61de4bda5..186394812e 100644 --- a/src/lib/elementary/efl_ui_text_async.eo +++ b/src/lib/elementary/efl_ui_text_async.eo @@ -1,8 +1,6 @@ class @beta Efl.Ui.Text_Async extends Efl.Ui.Text { [[Efl UI text async class - - @since 1.21 ]] data: null; implements { diff --git a/src/lib/elementary/efl_ui_text_factory_emoticons.eo b/src/lib/elementary/efl_ui_text_factory_emoticons.eo index 429dc14b91..903f449d6b 100644 --- a/src/lib/elementary/efl_ui_text_factory_emoticons.eo +++ b/src/lib/elementary/efl_ui_text_factory_emoticons.eo @@ -1,8 +1,6 @@ class @beta Efl.Ui.Text_Factory.Emoticons extends Efl.Object implements Efl.Canvas.Text_Factory { [[Factory that creates emoticons from the current theme given a key. - - @since 1.21 ]] implements { Efl.Canvas.Text_Factory.create; diff --git a/src/lib/elementary/efl_ui_text_factory_fallback.eo b/src/lib/elementary/efl_ui_text_factory_fallback.eo index 98ad98bafd..f41352bee8 100644 --- a/src/lib/elementary/efl_ui_text_factory_fallback.eo +++ b/src/lib/elementary/efl_ui_text_factory_fallback.eo @@ -6,7 +6,6 @@ class @beta Efl.Ui.Text_Factory.Fallback extends Efl.Object implements Efl.Canva - Contains 2 factories: image and emoticon - Strips off "file://" prefix for image items, to be used with the image factory. - @since 1.21 ]] implements { Efl.Object.constructor; diff --git a/src/lib/elementary/efl_ui_text_factory_images.eo b/src/lib/elementary/efl_ui_text_factory_images.eo index ae72bee1b3..eecc69cb91 100644 --- a/src/lib/elementary/efl_ui_text_factory_images.eo +++ b/src/lib/elementary/efl_ui_text_factory_images.eo @@ -5,8 +5,6 @@ class @beta Efl.Ui.Text_Factory.Images extends Efl.Object implements Efl.Canvas. The key can be either a full image path, or associated with one. The factory will fallback if key was not matches with an image, and try to load it as a full path. - - @since 1.21 ]] methods { matches_add { diff --git a/src/lib/elementary/efl_ui_video.h b/src/lib/elementary/efl_ui_video.h index d015d1c0d7..c4cfc55815 100644 --- a/src/lib/elementary/efl_ui_video.h +++ b/src/lib/elementary/efl_ui_video.h @@ -54,9 +54,7 @@ * ELM_PLAYER_CLASS */ -#ifdef EFL_EO_API_SUPPORT #include "efl_ui_video_eo.h" -#endif #ifndef EFL_NOLEGACY_API_SUPPORT #include "efl_ui_video_legacy.h" #endif diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index acab4f32f5..5eb1431a6b 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -30,9 +30,6 @@ #define MY_CLASS_NAME "Efl_Ui_Widget" #define MY_CLASS_NAME_LEGACY "elm_widget" -#define ELM_WIDGET_DATA_GET(o, wd) \ - Elm_Widget_Smart_Data *wd = efl_data_scope_get(o, MY_CLASS) - #define API_ENTRY \ Elm_Widget_Smart_Data *sd = NULL; \ if (!_elm_widget_is(obj) || \ @@ -483,12 +480,7 @@ _logical_parent_eval(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, Eina_Bool s { if (efl_isa(pd->logical.parent, EFL_UI_WIDGET_CLASS)) { - ELM_WIDGET_DATA_GET(pd->logical.parent, logical_wd); - if (!logical_wd) - { - ERR("Widget parent has the wrong type!"); - return NULL; - } + ELM_WIDGET_DATA_GET_OR_RETURN(pd->logical.parent, logical_wd, NULL); logical_wd->logical.child_count --; } old = pd->logical.parent; @@ -499,12 +491,7 @@ _logical_parent_eval(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, Eina_Bool s { if (efl_isa(parent, EFL_UI_WIDGET_CLASS)) { - ELM_WIDGET_DATA_GET(parent, parent_wd); - if (!parent_wd) - { - ERR("Widget parent has the wrong type!"); - return NULL; - } + ELM_WIDGET_DATA_GET_OR_RETURN(parent, parent_wd, NULL); parent_wd->logical.child_count ++; } pd->logical.parent = parent; @@ -1377,7 +1364,6 @@ elm_widget_sub_object_parent_add(Evas_Object *sobj) EOLIAN static void _efl_ui_widget_widget_parent_set(Eo *obj, Elm_Widget_Smart_Data *pd, Efl_Ui_Widget *parent) { - Eina_Bool mirrored, pmirrored = efl_ui_mirrored_get(obj); Efl_Ui_Widget *old_parent; //check if we are in the subobject list of parents if (parent) @@ -1386,32 +1372,33 @@ _efl_ui_widget_widget_parent_set(Eo *obj, Elm_Widget_Smart_Data *pd, Efl_Ui_Widg EINA_SAFETY_ON_FALSE_RETURN(eina_list_data_find(ppd->subobjs, obj)); } + /* NOTE: In the following two lines, 'obj' is correct. Do not change it. + * Due to elementary's scale policy, scale and prev_scale can be different in + * some cases. This happens when obj's previous parent and new parent have + * different scale value. + * For example, if obj's previous parent's scale is 5 and new parent's scale + * is 2 while obj's scale is 0. Then 'prev_pscale' is 5 and 'scale' is 2. So + * we need to reset obj's scale to 5. + * Note that each widget's scale is 1.0 by default. + */ + double scale, prev_scale = efl_gfx_entity_scale_get(obj); + Elm_Theme *th, *prev_th = elm_widget_theme_get(obj); + Eina_Bool mirrored, pmirrored = efl_ui_mirrored_get(parent); + old_parent = pd->parent_obj; pd->parent_obj = parent; // now lets sync up all states - if (pd->parent_obj) { - /* NOTE: In the following two lines, 'sobj' is correct. Do not change it. - * Due to elementary's scale policy, scale and pscale can be different in - * some cases. This happens when sobj's previous parent and new parent have - * different scale value. - * For example, if sobj's previous parent's scale is 5 and new parent's scale - * is 2 while sobj's scale is 0. Then 'pscale' is 5 and 'scale' is 2. So we - * need to reset sobj's scale to 5. - * Note that each widget's scale is 0 by default. - */ - double scale, pscale = efl_gfx_entity_scale_get(obj); - Elm_Theme *th, *pth = elm_widget_theme_get(obj); - scale = efl_gfx_entity_scale_get(obj); th = elm_widget_theme_get(obj); mirrored = efl_ui_mirrored_get(obj); if (!pd->on_create) { - if ((scale != pscale) || (th != pth) || (pmirrored != mirrored)) + if ((scale != prev_scale) || (th != prev_th) || + (pmirrored != mirrored)) elm_widget_theme(obj); } if (_is_focused(obj)) _parents_focus(parent); diff --git a/src/lib/elementary/efl_ui_widget.eo b/src/lib/elementary/efl_ui_widget.eo index 7585726222..981ef4ca29 100644 --- a/src/lib/elementary/efl_ui_widget.eo +++ b/src/lib/elementary/efl_ui_widget.eo @@ -7,7 +7,9 @@ function @beta Efl.Ui.Scrollable_On_Show_Region { }; struct Efl.Ui.Widget_Focus_State { - [[All relevant fields needed for the current state of focus registration]] + [[All relevant fields needed for the current state of focus registration + @since 1.22 + ]] manager : Efl.Ui.Focus.Manager; [[The manager where the widget is registered in]] parent : Efl.Ui.Focus.Object; [[The parent the widget is using as logical parent]] logical : bool; [[$true if this is registered as logical currently]] @@ -19,7 +21,10 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object, Efl.Ui.Selection, Efl.Ui.Dnd, Efl.Ui.Property_Bind, Efl.Ui.View { - [[Efl UI widget abstract class]] + [[Efl UI widget abstract class + + @since 1.22 + ]] //eo_prefix: efl_ui_widget; event_prefix: efl_ui_widget; data: Efl_Ui_Widget_Data; @@ -369,8 +374,7 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object, } @property focus_move_policy_automatic @beta { [[Control the widget's focus_move_policy mode setting. - - @since 1.18]] + ]] values { automatic: bool; [[$true to follow system focus move policy change, $false otherwise]] diff --git a/src/lib/elementary/efl_ui_widget_common.c b/src/lib/elementary/efl_ui_widget_common.c index 519efe21bf..c83fd07c92 100644 --- a/src/lib/elementary/efl_ui_widget_common.c +++ b/src/lib/elementary/efl_ui_widget_common.c @@ -139,8 +139,8 @@ _only_widget(const void *container EINA_UNUSED, void *data, void *fdata EINA_UNU EAPI Eina_Iterator* efl_ui_widget_tree_widget_iterator(Efl_Ui_Widget *obj) { - Eina_Iterator *tree_iterator = efl_ui_widget_tree_iterator(obj); ELM_WIDGET_DATA_GET_OR_RETURN(obj, pd, NULL); + Eina_Iterator *tree_iterator = efl_ui_widget_tree_iterator(obj); return eina_iterator_filter_new(tree_iterator, _only_widget, NULL, NULL); } diff --git a/src/lib/elementary/efl_ui_widget_focus_manager.eo b/src/lib/elementary/efl_ui_widget_focus_manager.eo index 4ffc1353d0..af5a09212f 100644 --- a/src/lib/elementary/efl_ui_widget_focus_manager.eo +++ b/src/lib/elementary/efl_ui_widget_focus_manager.eo @@ -1,5 +1,8 @@ mixin Efl.Ui.Widget_Focus_Manager requires Efl.Ui.Widget extends Efl.Ui.Focus.Manager { + [[ + @since 1.22 + ]] methods { focus_manager_create @protected @pure_virtual { [[If the widget needs a focus manager, this function will be called. diff --git a/src/lib/elementary/efl_ui_widget_image.h b/src/lib/elementary/efl_ui_widget_image.h index 5bdb566add..7a959d4cc6 100644 --- a/src/lib/elementary/efl_ui_widget_image.h +++ b/src/lib/elementary/efl_ui_widget_image.h @@ -91,8 +91,6 @@ struct _Efl_Ui_Image_Data Eina_Bool use : 1; } freedesktop; - Ecore_Job *sizing_job; - Eina_Bool aspect_fixed : 1; Eina_Bool fill_inside : 1; Eina_Bool no_scale : 1; diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index e2ad5bcd21..b37c1de997 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -213,7 +213,6 @@ struct _Efl_Ui_Win_Data int norender; int modal_count; int response; - int rotation; Eina_Bool req_wh : 1; Eina_Bool req_xy : 1; @@ -1645,7 +1644,7 @@ _win_rotate(Evas_Object *obj, Efl_Ui_Win_Data *sd, int rotation, Eina_Bool resiz #endif _elm_win_frame_obj_update(sd, 0); efl_event_callback_call - (obj, EFL_UI_WIN_EVENT_WIN_ROTATION_CHANGED, (void*)(uintptr_t)rotation); + (obj, EFL_UI_WIN_EVENT_WIN_ROTATION_CHANGED, &rotation); evas_object_smart_callback_call(obj, "rotation,changed", NULL); if (_elm_config->atspi_mode) { @@ -1676,7 +1675,7 @@ _efl_ui_win_win_rotation_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd, int rotat it = efl_ui_widget_tree_widget_iterator(obj); EINA_ITERATOR_FOREACH(it, widget) { - if (!efl_isa(widget, EFL_UI_LAYOUT_CLASS)) continue; + if (!efl_isa(widget, EFL_UI_LAYOUT_BASE_CLASS)) continue; if (efl_ui_layout_automatic_theme_rotation_get(widget)) efl_ui_layout_theme_rotation_apply(widget, rot); @@ -1686,7 +1685,7 @@ _efl_ui_win_win_rotation_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd, int rotat EOLIAN static int _efl_ui_win_win_rotation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd) { - return pd->rotation; + return pd->rot; } EAPI void @@ -1698,6 +1697,7 @@ elm_win_rotation_set(Evas_Object *obj, int rotation) EAPI int elm_win_rotation_get(const Evas_Object *obj) { + EINA_SAFETY_ON_NULL_RETURN_VAL(obj, -1); return efl_ui_win_rotation_get(obj); } @@ -1809,7 +1809,7 @@ _elm_win_state_change(Ecore_Evas *ee) { evas_object_smart_callback_call(obj, "unfullscreen", NULL); } - efl_event_callback_call(obj, EFL_UI_WIN_EVENT_FULLSCREEN_CHANGED, (void*) (uintptr_t)fullscreen); + efl_event_callback_call(obj, EFL_UI_WIN_EVENT_FULLSCREEN_CHANGED, &fullscreen); } if (ch_maximized) { @@ -1829,7 +1829,7 @@ _elm_win_state_change(Ecore_Evas *ee) if (_elm_config->atspi_mode) efl_access_window_restored_signal_emit(obj); } - efl_event_callback_call(obj, EFL_UI_WIN_EVENT_MAXIMIZED_CHANGED, (void*) (uintptr_t)maximized); + efl_event_callback_call(obj, EFL_UI_WIN_EVENT_MAXIMIZED_CHANGED, &maximized); } if (ch_profile) { @@ -4962,28 +4962,38 @@ _elm_win_cb_show(void *data EINA_UNUSED, _elm_win_state_eval_queue(); } -static inline const char * -_efl_ui_win_accel(Efl_Ui_Win_Data *sd) +static inline Eina_Bool +_efl_ui_win_accel(Efl_Ui_Win_Data *sd, Eina_Stringshare **accel, int *gl_depth, int *gl_stencil, int *gl_msaa) { const char *str = sd->accel_pref; const char *env; + const char *cfg = NULL; + Eina_Bool is_accel = EINA_FALSE; - /* current elm config */ - if (!str) + /* current elm config OR global override */ + if ((!str) || ((_elm_config->accel_override) && (_elm_config->accel))) { - if (_elm_config->accel) str = _elm_config->accel; - if (_elm_accel_preference) str = _elm_accel_preference; + if (_elm_config->accel) cfg = _elm_config->accel; + if (_elm_config->accel_override && _elm_accel_preference) cfg = _elm_accel_preference; } - /* global overrides */ - if ((_elm_config->accel_override) && (_elm_config->accel)) - str = _elm_config->accel; - /* env var wins */ env = getenv("ELM_ACCEL"); - if (env) str = env; - return str; + if (env) + is_accel = _elm_config_accel_preference_parse(env, accel, gl_depth, gl_stencil, gl_msaa); + else if (cfg) + { + is_accel = !!cfg; + *accel = eina_stringshare_ref(cfg); + *gl_depth = _elm_config->gl_depth; + *gl_stencil = _elm_config->gl_stencil; + *gl_msaa = _elm_config->gl_msaa; + } + else + is_accel = _elm_config_accel_preference_parse(str, accel, gl_depth, gl_stencil, gl_msaa); + + return is_accel; } static inline void @@ -5145,8 +5155,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U /* just to store some data while trying out to create a canvas */ memset(&tmp_sd, 0, sizeof(Efl_Ui_Win_Data)); - is_gl_accel = _elm_config_accel_preference_parse - (_efl_ui_win_accel(sd), &accel, &gl_depth, &gl_stencil, &gl_msaa); + is_gl_accel = _efl_ui_win_accel(sd, &accel, &gl_depth, &gl_stencil, &gl_msaa); switch ((int) type) { @@ -5852,7 +5861,8 @@ _efl_ui_win_efl_object_finalize(Eo *obj, Efl_Ui_Win_Data *sd) if (obj && (!elm_widget_is_legacy(obj))) { /* FIXME: if parts other than background are supported then this should change */ - if (efl_file_get(efl_part(obj, "background")) || efl_file_mmap_get(efl_part(obj, "background"))) + if (efl_file_get(efl_super(efl_part(obj, "background"), EFL_UI_WIN_PART_CLASS)) || + efl_file_mmap_get(efl_super(efl_part(obj, "background"), EFL_UI_WIN_PART_CLASS))) efl_file_load(efl_part(obj, "background")); } return obj; @@ -7627,10 +7637,10 @@ _efl_ui_win_part_file_load(Eo *obj, Efl_Ui_Win_Data *sd, Eo *part_obj, const cha { const char *file, *key; + sd->legacy.forbidden = EINA_TRUE; if (efl_file_loaded_get(part_obj)) return 0; file = efl_file_get(part_obj); key = efl_file_key_get(part_obj); - sd->legacy.forbidden = EINA_TRUE; if (eina_streq(part, "background")) { Eina_Bool ok = EINA_TRUE; @@ -8845,6 +8855,7 @@ elm_win_keygrab_set(Elm_Win *obj, const char *key, Eina_Bool ret = EINA_FALSE; #ifdef HAVE_ELEMENTARY_X Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE); _internal_elm_win_xwindow_get(sd); if (sd->x.xwin) { @@ -8885,6 +8896,7 @@ elm_win_keygrab_unset(Elm_Win *obj, const char *key, Eina_Bool ret = EINA_FALSE; #ifdef HAVE_ELEMENTARY_X Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE); _internal_elm_win_xwindow_get(sd); if (sd->x.xwin) ret = ecore_x_window_keygrab_unset(sd->x.xwin, key, 0, 0); @@ -9234,6 +9246,7 @@ EAPI void elm_win_noblank_set(Evas_Object *obj, Eina_Bool noblank) { Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS); + EINA_SAFETY_ON_NULL_RETURN(sd); noblank = !!noblank; if (sd->noblank == noblank) return; sd->noblank = noblank; @@ -9244,6 +9257,7 @@ EAPI Eina_Bool elm_win_noblank_get(const Evas_Object *obj) { Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS); + EINA_SAFETY_ON_NULL_RETURN_VAL(sd, EINA_FALSE); return sd->noblank; } diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index 1255b98d51..e9d572c804 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -42,7 +42,6 @@ enum @beta Efl.Ui.Win_Type /* Some types have been removed from EO. Skipping to 17. */ naviframe_basic = 17 [[Used for naviframe style replacement with a back button instead of a close button. - @since 1.19 ]] } @@ -74,8 +73,10 @@ enum @beta Efl.Ui.Win_Keyboard_Mode enum Efl.Ui.Win_Indicator_Mode { - [[Defines the type indicator that can be shown]] + [[Defines the type indicator that can be shown + @since 1.22 + ]] off, [[Request to deactivate the indicator]] bg_opaque, [[The indicator icon is opaque, as is the indicator background. The content of window is located at the end of the indicator. @@ -123,7 +124,7 @@ enum Efl.Ui.Win_Move_Resize_Mode 8. bottom | left, 9. bottom | right. - @since 1.19 + @since 1.22 ]] move = 1, [[Start moving window]] @@ -139,7 +140,10 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W Efl.Text, Efl.Config, Efl.Ui.Widget_Focus_Manager, Efl.Ui.Focus.Manager_Window_Root { - [[Efl UI window class]] + [[Efl UI window class + + @since 1.22 + ]] methods { @property indicator_mode { [[In some environments you may have an indicator that @@ -150,8 +154,6 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W such circumstances. The default settings depends on the environment. For example, on phones, the default is to enable the indicator. The indicator is disabled on devices like televisions however. - - @since 1.18 ]] set { } @@ -437,7 +439,6 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W [[Name can only be set before finalize.]] } get { - [[ @since 1.18 ]] } values { name: string @nullable; [[Window name]] @@ -505,8 +506,6 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W Note that this option may be overriden by environment variables or the configuration option "accel_preference_override". - - @since 1.18 ]] values { accel: string; [[Acceleration]] diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c index 18615b90b8..413719a12b 100644 --- a/src/lib/elementary/elc_fileselector.c +++ b/src/lib/elementary/elc_fileselector.c @@ -15,6 +15,7 @@ #define EFL_UI_FOCUS_COMPOSITION_PROTECTED #include "elm_priv.h" +#include "eo_internal.h" #include #include "Eio_Eo.h" #include "elm_fileselector_button_eo.h" @@ -1214,7 +1215,7 @@ _on_item_selected(void *data, const Efl_Event *event) elm_object_text_set(sd->name_entry, it_data->filename); _model_event_call - (data, EFL_UI_EVENT_SELECTABLE_SELECTED, it_data->model, it_data->path); + (data, EFL_UI_EVENT_ITEM_SELECTED, it_data->model, it_data->path); } else if (sd->multi && it_data->is_dir && sd->double_tap_navigation) { @@ -1466,7 +1467,7 @@ _on_text_activated_set_path_then(void *data, const Eina_Value v, const Eina_Futu selected: if (sd->only_folder) - _model_event_call(fs, EFL_UI_EVENT_SELECTABLE_SELECTED, model, str); + _model_event_call(fs, EFL_UI_EVENT_ITEM_SELECTED, model, str); end: _text_activated_free_fs_data(fs); @@ -1606,9 +1607,9 @@ _files_list_add(Evas_Object *obj) efl_ui_mirrored_automatic_set(li, EINA_FALSE); efl_event_callback_add - (li, EFL_UI_EVENT_SELECTABLE_SELECTED, _on_item_selected, obj); + (li, EFL_UI_EVENT_ITEM_SELECTED, _on_item_selected, obj); efl_event_callback_add - (li, EFL_UI_EVENT_SELECTABLE_UNSELECTED, _on_item_unselected, obj); + (li, EFL_UI_EVENT_ITEM_UNSELECTED, _on_item_unselected, obj); efl_event_callback_add (li, ELM_GENLIST_EVENT_ACTIVATED, _on_item_activated, obj); efl_event_callback_add @@ -1643,9 +1644,9 @@ _files_grid_add(Evas_Object *obj) elm_gengrid_align_set(grid, 0.0, 0.0); efl_event_callback_add - (grid, EFL_UI_EVENT_SELECTABLE_SELECTED, _on_item_selected, obj); + (grid, EFL_UI_EVENT_ITEM_SELECTED, _on_item_selected, obj); efl_event_callback_add - (grid, EFL_UI_EVENT_SELECTABLE_UNSELECTED, _on_item_unselected, obj); + (grid, EFL_UI_EVENT_ITEM_UNSELECTED, _on_item_unselected, obj); efl_event_callback_add (grid, ELM_GENGRID_EVENT_ACTIVATED, _on_item_activated, obj); efl_event_callback_add @@ -1994,7 +1995,7 @@ _elm_fileselector_efl_object_event_callback_legacy_call(Eo *obj, Elm_Fileselecto { const Efl_Event_Description *evt_desc = NULL; if (strcmp(desc->name, "selected") == 0) - evt_desc = EFL_UI_EVENT_SELECTABLE_SELECTED; + evt_desc = EFL_UI_EVENT_ITEM_SELECTED; else if (strcmp(desc->name, "activated") == 0) evt_desc = ELM_FILESELECTOR_EVENT_ACTIVATED; else if (strcmp(desc->name, "directory,open") == 0) @@ -2009,7 +2010,7 @@ _elm_fileselector_efl_object_event_callback_legacy_call(Eo *obj, Elm_Fileselecto return _from_legacy_event_call(obj, sd, desc, evt_desc, event_info); } - if (desc == EFL_UI_EVENT_SELECTABLE_SELECTED || + if (desc == EFL_UI_EVENT_ITEM_SELECTED || desc == ELM_FILESELECTOR_EVENT_ACTIVATED || desc == ELM_FILESELECTOR_EVENT_DIRECTORY_OPEN || desc == ELM_FILESELECTOR_EVENT_DONE || diff --git a/src/lib/elementary/elc_fileselector_common.h b/src/lib/elementary/elc_fileselector_common.h index c20e2a37c5..df4f831268 100644 --- a/src/lib/elementary/elc_fileselector_common.h +++ b/src/lib/elementary/elc_fileselector_common.h @@ -1,7 +1,6 @@ typedef Eina_Bool (*Elm_Fileselector_Filter_Func)(const char *path, /**< File path */ Eina_Bool dir, /**< A flag to show if path is a directory or not. True if the path is a directory. */ void *data /**< A user data that was given by elm_fileselector_custom_filter_append. */); -#ifdef EFL_EO_API_SUPPORT + EAPI extern Eina_Error ELM_FILESELECTOR_ERROR_UNKNOWN; EAPI extern Eina_Error ELM_FILESELECTOR_ERROR_INVALID_MODEL; -#endif diff --git a/src/lib/elementary/elc_fileselector_entry.c b/src/lib/elementary/elc_fileselector_entry.c index c5c6edf48b..2df184ea4a 100644 --- a/src/lib/elementary/elc_fileselector_entry.c +++ b/src/lib/elementary/elc_fileselector_entry.c @@ -61,9 +61,9 @@ SIG_FWD(PRESS, ELM_FILESELECTOR_ENTRY_EVENT_PRESS) SIG_FWD(LONGPRESSED, EFL_UI_EVENT_LONGPRESSED) SIG_FWD(CLICKED, EFL_UI_EVENT_CLICKED) SIG_FWD(CLICKED_DOUBLE, EFL_UI_EVENT_CLICKED_DOUBLE) -SIG_FWD(SELECTION_PASTE, EFL_UI_EVENT_SELECTABLE_PASTE) -SIG_FWD(SELECTION_COPY, EFL_UI_EVENT_SELECTABLE_COPY) -SIG_FWD(SELECTION_CUT, EFL_UI_EVENT_SELECTABLE_CUT) +SIG_FWD(SELECTION_PASTE, EFL_UI_EVENT_SELECTION_PASTE) +SIG_FWD(SELECTION_COPY, EFL_UI_EVENT_SELECTION_COPY) +SIG_FWD(SELECTION_CUT, EFL_UI_EVENT_SELECTION_CUT) SIG_FWD(UNPRESSED, EFL_UI_EVENT_UNPRESSED) #undef SIG_FWD @@ -255,9 +255,9 @@ _elm_fileselector_entry_efl_canvas_group_group_add(Eo *obj, Elm_Fileselector_Ent SIG_FWD(LONGPRESSED, EFL_UI_EVENT_LONGPRESSED); SIG_FWD(CLICKED, EFL_UI_EVENT_CLICKED); SIG_FWD(CLICKED_DOUBLE, EFL_UI_EVENT_CLICKED_DOUBLE); - SIG_FWD(SELECTION_PASTE, EFL_UI_EVENT_SELECTABLE_PASTE); - SIG_FWD(SELECTION_COPY, EFL_UI_EVENT_SELECTABLE_COPY); - SIG_FWD(SELECTION_CUT, EFL_UI_EVENT_SELECTABLE_CUT); + SIG_FWD(SELECTION_PASTE, EFL_UI_EVENT_SELECTION_PASTE); + SIG_FWD(SELECTION_COPY, EFL_UI_EVENT_SELECTION_COPY); + SIG_FWD(SELECTION_CUT, EFL_UI_EVENT_SELECTION_CUT); #undef SIG_FWD efl_event_callback_forwarder_add(priv->entry, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, obj); diff --git a/src/lib/elementary/elc_hoversel.c b/src/lib/elementary/elc_hoversel.c index 0e45d16a85..3986b2a14f 100644 --- a/src/lib/elementary/elc_hoversel.c +++ b/src/lib/elementary/elc_hoversel.c @@ -176,7 +176,7 @@ _on_item_clicked(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) ELM_HOVERSEL_DATA_GET(obj2, sd); if (item->func) item->func((void *)WIDGET_ITEM_DATA_GET(eo_it), obj2, eo_it); - efl_event_callback_legacy_call(obj2, EFL_UI_EVENT_SELECTABLE_SELECTED, eo_it); + efl_event_callback_legacy_call(obj2, EFL_UI_EVENT_ITEM_SELECTED, eo_it); evas_object_event_callback_add(sd->hover, EVAS_CALLBACK_DEL, _auto_update, item); diff --git a/src/lib/elementary/elm_actionslider.c b/src/lib/elementary/elm_actionslider.c index 852a817a06..07fc630811 100644 --- a/src/lib/elementary/elm_actionslider.c +++ b/src/lib/elementary/elm_actionslider.c @@ -239,16 +239,13 @@ _button_animator(void *data) if ((!EINA_DBL_EQ(sd->final_position, 0)) && (sd->enabled_position & ELM_ACTIONSLIDER_LEFT)) - efl_event_callback_legacy_call - (obj, EFL_UI_EVENT_SELECTABLE_SELECTED, (char *)left); + evas_object_smart_callback_call(obj, "selected",(char *)left); else if ((EINA_DBL_EQ(sd->final_position, 0.5)) && (sd->enabled_position & ELM_ACTIONSLIDER_CENTER)) - efl_event_callback_legacy_call - (obj, EFL_UI_EVENT_SELECTABLE_SELECTED, (char *)center); + evas_object_smart_callback_call(obj, "selected", (char *)center); else if ((EINA_DBL_EQ(sd->final_position, 1)) && (sd->enabled_position & ELM_ACTIONSLIDER_RIGHT)) - efl_event_callback_legacy_call - (obj, EFL_UI_EVENT_SELECTABLE_SELECTED, (char *)right); + evas_object_smart_callback_call(obj, "selected", (char *)right); sd->button_animator = NULL; @@ -285,8 +282,7 @@ _drag_button_up_cb(void *data, (efl_ui_mirrored_get(obj) && EINA_DBL_EQ(position, 1.0)))) { sd->final_position = 0; - efl_event_callback_legacy_call - (obj, EFL_UI_EVENT_SELECTABLE_SELECTED, (char *)left); + evas_object_smart_callback_call(obj, "selected", (char *)left); return; } @@ -295,8 +291,7 @@ _drag_button_up_cb(void *data, (sd->enabled_position & ELM_ACTIONSLIDER_CENTER)) { sd->final_position = 0.5; - efl_event_callback_legacy_call - (obj, EFL_UI_EVENT_SELECTABLE_SELECTED, (char *)center); + evas_object_smart_callback_call(obj, "selected", (char *)center); ecore_animator_del(sd->button_animator); sd->button_animator = ecore_evas_animator_add(obj, _button_animator, obj); @@ -309,8 +304,7 @@ _drag_button_up_cb(void *data, (efl_ui_mirrored_get(obj) && EINA_DBL_EQ(position, 0)))) { sd->final_position = 1; - efl_event_callback_legacy_call - (obj, EFL_UI_EVENT_SELECTABLE_SELECTED, (char *)right); + evas_object_smart_callback_call(obj, "selected", (char *)right); return; } diff --git a/src/lib/elementary/elm_atspi_app_object.c b/src/lib/elementary/elm_atspi_app_object.c index 77cfe7f93c..e1ef62ac91 100644 --- a/src/lib/elementary/elm_atspi_app_object.c +++ b/src/lib/elementary/elm_atspi_app_object.c @@ -70,4 +70,4 @@ _elm_atspi_app_object_efl_access_object_role_get(const Eo *obj EINA_UNUSED, Elm_ return EFL_ACCESS_ROLE_APPLICATION; } -#include "elm_atspi_app_object.eo.c" +#include "elm_atspi_app_object_eo.c" diff --git a/src/lib/elementary/elm_atspi_app_object.eo b/src/lib/elementary/elm_atspi_app_object.eo deleted file mode 100644 index e63e233923..0000000000 --- a/src/lib/elementary/elm_atspi_app_object.eo +++ /dev/null @@ -1,12 +0,0 @@ -class Elm.Atspi.App.Object extends Efl.Object implements Efl.Access.Object -{ - [[AT-SPI application object class]] - data: Elm_Atspi_App_Object_Data; - implements { - Efl.Object.destructor; - Efl.Access.Object.i18n_name { get; } - Efl.Access.Object.description { get; set; } - Efl.Access.Object.role { get; } - Efl.Access.Object.access_children { get; } - } -} diff --git a/src/lib/elementary/elm_atspi_app_object.h b/src/lib/elementary/elm_atspi_app_object.h index 3d66198215..e67e5524ff 100644 --- a/src/lib/elementary/elm_atspi_app_object.h +++ b/src/lib/elementary/elm_atspi_app_object.h @@ -1,3 +1,3 @@ -#ifdef EFL_EO_API_SUPPORT -#include "elm_atspi_app_object.eo.h" +#ifndef EFL_NOLEGACY_API_SUPPORT +#include "elm_atspi_app_object_eo.legacy.h" #endif diff --git a/src/lib/elementary/elm_atspi_app_object_eo.c b/src/lib/elementary/elm_atspi_app_object_eo.c new file mode 100644 index 0000000000..2158c09038 --- /dev/null +++ b/src/lib/elementary/elm_atspi_app_object_eo.c @@ -0,0 +1,55 @@ + +void _elm_atspi_app_object_efl_object_destructor(Eo *obj, Elm_Atspi_App_Object_Data *pd); + + +const char *_elm_atspi_app_object_efl_access_object_i18n_name_get(const Eo *obj, Elm_Atspi_App_Object_Data *pd); + + +void _elm_atspi_app_object_efl_access_object_description_set(Eo *obj, Elm_Atspi_App_Object_Data *pd, const char *description); + + +const char *_elm_atspi_app_object_efl_access_object_description_get(const Eo *obj, Elm_Atspi_App_Object_Data *pd); + + +Efl_Access_Role _elm_atspi_app_object_efl_access_object_role_get(const Eo *obj, Elm_Atspi_App_Object_Data *pd); + + +Eina_List *_elm_atspi_app_object_efl_access_object_access_children_get(const Eo *obj, Elm_Atspi_App_Object_Data *pd); + + +static Eina_Bool +_elm_atspi_app_object_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_ATSPI_APP_OBJECT_EXTRA_OPS +#define ELM_ATSPI_APP_OBJECT_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(efl_destructor, _elm_atspi_app_object_efl_object_destructor), + EFL_OBJECT_OP_FUNC(efl_access_object_i18n_name_get, _elm_atspi_app_object_efl_access_object_i18n_name_get), + EFL_OBJECT_OP_FUNC(efl_access_object_description_set, _elm_atspi_app_object_efl_access_object_description_set), + EFL_OBJECT_OP_FUNC(efl_access_object_description_get, _elm_atspi_app_object_efl_access_object_description_get), + EFL_OBJECT_OP_FUNC(efl_access_object_role_get, _elm_atspi_app_object_efl_access_object_role_get), + EFL_OBJECT_OP_FUNC(efl_access_object_access_children_get, _elm_atspi_app_object_efl_access_object_access_children_get), + ELM_ATSPI_APP_OBJECT_EXTRA_OPS + ); + opsp = &ops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_atspi_app_object_class_desc = { + EO_VERSION, + "Elm.Atspi.App.Object", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Atspi_App_Object_Data), + _elm_atspi_app_object_class_initializer, + NULL, + NULL +}; + +EFL_DEFINE_CLASS(elm_atspi_app_object_class_get, &_elm_atspi_app_object_class_desc, EFL_OBJECT_CLASS, EFL_ACCESS_OBJECT_MIXIN, NULL); diff --git a/src/lib/elementary/elm_atspi_app_object_eo.h b/src/lib/elementary/elm_atspi_app_object_eo.h new file mode 100644 index 0000000000..0dff0ba000 --- /dev/null +++ b/src/lib/elementary/elm_atspi_app_object_eo.h @@ -0,0 +1,24 @@ +#ifndef _ELM_ATSPI_APP_OBJECT_EO_H_ +#define _ELM_ATSPI_APP_OBJECT_EO_H_ + +#ifndef _ELM_ATSPI_APP_OBJECT_EO_CLASS_TYPE +#define _ELM_ATSPI_APP_OBJECT_EO_CLASS_TYPE + +typedef Eo Elm_Atspi_App_Object; + +#endif + +#ifndef _ELM_ATSPI_APP_OBJECT_EO_TYPES +#define _ELM_ATSPI_APP_OBJECT_EO_TYPES + + +#endif +/** AT-SPI application object class + * + * @ingroup Elm_Atspi_App_Object + */ +#define ELM_ATSPI_APP_OBJECT_CLASS elm_atspi_app_object_class_get() + +EWAPI const Efl_Class *elm_atspi_app_object_class_get(void); + +#endif diff --git a/src/lib/elementary/elm_atspi_app_object_eo.legacy.h b/src/lib/elementary/elm_atspi_app_object_eo.legacy.h new file mode 100644 index 0000000000..993c31100f --- /dev/null +++ b/src/lib/elementary/elm_atspi_app_object_eo.legacy.h @@ -0,0 +1,17 @@ +#ifndef _ELM_ATSPI_APP_OBJECT_EO_LEGACY_H_ +#define _ELM_ATSPI_APP_OBJECT_EO_LEGACY_H_ + +#ifndef _ELM_ATSPI_APP_OBJECT_EO_CLASS_TYPE +#define _ELM_ATSPI_APP_OBJECT_EO_CLASS_TYPE + +typedef Eo Elm_Atspi_App_Object; + +#endif + +#ifndef _ELM_ATSPI_APP_OBJECT_EO_TYPES +#define _ELM_ATSPI_APP_OBJECT_EO_TYPES + + +#endif + +#endif diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index d9f271f3dd..c689557d6c 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -4704,11 +4704,13 @@ _elm_atspi_bridge_key_filter(void *data, void *loop EINA_UNUSED, int type, void if (eldbus_message_error_get(reply, &errname, &errmsg)) ERR("Error in call method " ATSPI_DBUS_INTERFACE_DEC "." "NotifyListenersSync" ": %s %s", errname, errmsg); else - if (!eldbus_message_arguments_get(reply, "b", &ret)) - ERR("Invalid answer signature"); + if (!eldbus_message_arguments_get(reply, "b", &ret)) + ERR("Invalid answer signature"); + + eldbus_message_unref(reply); if (ret) - return EINA_FALSE; + return EINA_FALSE; return EINA_FALSE; } @@ -4799,4 +4801,4 @@ _elm_atspi_bridge_efl_object_destructor(Eo *obj, Elm_Atspi_Bridge_Data *pd) efl_destructor(efl_super(obj, ELM_ATSPI_BRIDGE_CLASS)); } -#include "elm_atspi_bridge.eo.c" +#include "elm_atspi_bridge_eo.c" diff --git a/src/lib/elementary/elm_atspi_bridge.eo b/src/lib/elementary/elm_atspi_bridge.eo deleted file mode 100644 index 8ed0f1a25b..0000000000 --- a/src/lib/elementary/elm_atspi_bridge.eo +++ /dev/null @@ -1,24 +0,0 @@ -class Elm.Atspi.Bridge extends Efl.Object -{ - [[AT-SPI bridge class]] - eo_prefix: elm_obj_atspi_bridge; - event_prefix: elm_atspi_bridge; - methods { - @property connected { - get { - [[Indicate if connection with AT-SPI2 bus has been established.]] - values { - ret: bool; [[$true if connection has been established, $false otherwise]] - } - } - } - } - implements { - Efl.Object.constructor; - Efl.Object.destructor; - } - events { - connected: void; [[Connected with AT-SPI2 bus]] - disconnected: void; [[Disconnected from AT-SPI2 bus]] - } -} diff --git a/src/lib/elementary/elm_atspi_bridge.h b/src/lib/elementary/elm_atspi_bridge.h index 80a476df36..c889027b58 100644 --- a/src/lib/elementary/elm_atspi_bridge.h +++ b/src/lib/elementary/elm_atspi_bridge.h @@ -1,5 +1,4 @@ -#ifdef EFL_BETA_API_SUPPORT -#ifdef EFL_EO_API_SUPPORT -#include "elm_atspi_bridge.eo.h" -#endif +#ifndef EFL_NOLEGACY_API_SUPPORT +#include "elm_atspi_bridge_eo.legacy.h" #endif + diff --git a/src/lib/elementary/elm_atspi_bridge_eo.c b/src/lib/elementary/elm_atspi_bridge_eo.c new file mode 100644 index 0000000000..aa883454cd --- /dev/null +++ b/src/lib/elementary/elm_atspi_bridge_eo.c @@ -0,0 +1,66 @@ +EWAPI const Efl_Event_Description _ELM_ATSPI_BRIDGE_EVENT_CONNECTED = + EFL_EVENT_DESCRIPTION("connected"); +EWAPI const Efl_Event_Description _ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED = + EFL_EVENT_DESCRIPTION("disconnected"); + +Eina_Bool _elm_atspi_bridge_connected_get(const Eo *obj, Elm_Atspi_Bridge_Data *pd); + + +static Eina_Value +__eolian_elm_atspi_bridge_connected_get_reflect(const Eo *obj) +{ + Eina_Bool val = elm_obj_atspi_bridge_connected_get(obj); + return eina_value_bool_init(val); +} + +EOAPI EFL_FUNC_BODY_CONST(elm_obj_atspi_bridge_connected_get, Eina_Bool, 0); + +Efl_Object *_elm_atspi_bridge_efl_object_constructor(Eo *obj, Elm_Atspi_Bridge_Data *pd); + + +void _elm_atspi_bridge_efl_object_destructor(Eo *obj, Elm_Atspi_Bridge_Data *pd); + + +static Eina_Bool +_elm_atspi_bridge_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef ELM_ATSPI_BRIDGE_EXTRA_OPS +#define ELM_ATSPI_BRIDGE_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(elm_obj_atspi_bridge_connected_get, _elm_atspi_bridge_connected_get), + EFL_OBJECT_OP_FUNC(efl_constructor, _elm_atspi_bridge_efl_object_constructor), + EFL_OBJECT_OP_FUNC(efl_destructor, _elm_atspi_bridge_efl_object_destructor), + ELM_ATSPI_BRIDGE_EXTRA_OPS + ); + opsp = &ops; + + static const Efl_Object_Property_Reflection refl_table[] = { + {"connected", NULL, __eolian_elm_atspi_bridge_connected_get_reflect}, + }; + static const Efl_Object_Property_Reflection_Ops rops = { + refl_table, EINA_C_ARRAY_LENGTH(refl_table) + }; + ropsp = &rops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _elm_atspi_bridge_class_desc = { + EO_VERSION, + "Elm.Atspi.Bridge", + EFL_CLASS_TYPE_REGULAR, + sizeof(Elm_Atspi_Bridge_Data), + _elm_atspi_bridge_class_initializer, + NULL, + NULL +}; + +EFL_DEFINE_CLASS(elm_atspi_bridge_class_get, &_elm_atspi_bridge_class_desc, EFL_OBJECT_CLASS, NULL); + +#include "elm_atspi_bridge_eo.legacy.c" diff --git a/src/lib/elementary/elm_atspi_bridge_eo.h b/src/lib/elementary/elm_atspi_bridge_eo.h new file mode 100644 index 0000000000..180544d25c --- /dev/null +++ b/src/lib/elementary/elm_atspi_bridge_eo.h @@ -0,0 +1,51 @@ +#ifndef _ELM_ATSPI_BRIDGE_EO_H_ +#define _ELM_ATSPI_BRIDGE_EO_H_ + +#ifndef _ELM_ATSPI_BRIDGE_EO_CLASS_TYPE +#define _ELM_ATSPI_BRIDGE_EO_CLASS_TYPE + +typedef Eo Elm_Atspi_Bridge; + +#endif + +#ifndef _ELM_ATSPI_BRIDGE_EO_TYPES +#define _ELM_ATSPI_BRIDGE_EO_TYPES + + +#endif +/** AT-SPI bridge class + * + * @ingroup Elm_Atspi_Bridge + */ +#define ELM_ATSPI_BRIDGE_CLASS elm_atspi_bridge_class_get() + +EWAPI const Efl_Class *elm_atspi_bridge_class_get(void); + +/** + * @brief Indicate if connection with AT-SPI2 bus has been established. + * + * @param[in] obj The object. + * + * @return @c true if connection has been established, @c false otherwise + * + * @ingroup Elm_Atspi_Bridge + */ +EOAPI Eina_Bool elm_obj_atspi_bridge_connected_get(const Eo *obj); + +EWAPI extern const Efl_Event_Description _ELM_ATSPI_BRIDGE_EVENT_CONNECTED; + +/** Connected with AT-SPI2 bus + * + * @ingroup Elm_Atspi_Bridge + */ +#define ELM_ATSPI_BRIDGE_EVENT_CONNECTED (&(_ELM_ATSPI_BRIDGE_EVENT_CONNECTED)) + +EWAPI extern const Efl_Event_Description _ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED; + +/** Disconnected from AT-SPI2 bus + * + * @ingroup Elm_Atspi_Bridge + */ +#define ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED (&(_ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED)) + +#endif diff --git a/src/lib/elementary/elm_atspi_bridge_eo.legacy.c b/src/lib/elementary/elm_atspi_bridge_eo.legacy.c new file mode 100644 index 0000000000..8f6ffebcc8 --- /dev/null +++ b/src/lib/elementary/elm_atspi_bridge_eo.legacy.c @@ -0,0 +1,6 @@ + +EAPI Eina_Bool +elm_atspi_bridge_connected_get(const Elm_Atspi_Bridge *obj) +{ + return elm_obj_atspi_bridge_connected_get(obj); +} diff --git a/src/lib/elementary/elm_atspi_bridge_eo.legacy.h b/src/lib/elementary/elm_atspi_bridge_eo.legacy.h new file mode 100644 index 0000000000..ed90721eb6 --- /dev/null +++ b/src/lib/elementary/elm_atspi_bridge_eo.legacy.h @@ -0,0 +1,28 @@ +#ifndef _ELM_ATSPI_BRIDGE_EO_LEGACY_H_ +#define _ELM_ATSPI_BRIDGE_EO_LEGACY_H_ + +#ifndef _ELM_ATSPI_BRIDGE_EO_CLASS_TYPE +#define _ELM_ATSPI_BRIDGE_EO_CLASS_TYPE + +typedef Eo Elm_Atspi_Bridge; + +#endif + +#ifndef _ELM_ATSPI_BRIDGE_EO_TYPES +#define _ELM_ATSPI_BRIDGE_EO_TYPES + + +#endif + +/** + * @brief Indicate if connection with AT-SPI2 bus has been established. + * + * @param[in] obj The object. + * + * @return @c true if connection has been established, @c false otherwise + * + * @ingroup Elm_Atspi_Bridge_Group + */ +EAPI Eina_Bool elm_atspi_bridge_connected_get(const Elm_Atspi_Bridge *obj); + +#endif diff --git a/src/lib/elementary/elm_check.h b/src/lib/elementary/elm_check.h index 056dee46a8..492494a2f8 100644 --- a/src/lib/elementary/elm_check.h +++ b/src/lib/elementary/elm_check.h @@ -59,9 +59,8 @@ * @{ */ -#ifdef EFL_EO_API_SUPPORT #define EFL_UI_CHECK_EVENT_CHANGED EFL_UI_NSTATE_EVENT_CHANGED -#endif + #ifndef EFL_NOLEGACY_API_SUPPORT #include "elm_check_legacy.h" #endif diff --git a/src/lib/elementary/elm_color_class.c b/src/lib/elementary/elm_color_class.c index 9227794cf0..f6ed3b9c62 100644 --- a/src/lib/elementary/elm_color_class.c +++ b/src/lib/elementary/elm_color_class.c @@ -743,7 +743,7 @@ elm_color_class_editor_add(Evas_Object *obj) elm_genlist_mode_set(gl, ELM_LIST_COMPRESS); elm_object_part_content_set(ly, "elm.swallow.list", gl); efl_event_callback_add - (gl, EFL_UI_EVENT_SELECTABLE_SELECTED, _colorclass_activate, cc); + (gl, EFL_UI_EVENT_ITEM_SELECTED, _colorclass_activate, cc); cc->reset = bt = elm_button_add(ly); elm_object_style_set(bt, "colorclass"); diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c index a6d943e356..a88d62503e 100644 --- a/src/lib/elementary/elm_config.c +++ b/src/lib/elementary/elm_config.c @@ -779,7 +779,8 @@ _elm_config_profile_derived_save(const char *profile, Elm_Config_Derived *derive eet_close(ef); if (ret) { - ecore_file_cp(buf, buf2); + if (!ecore_file_cp(buf, buf2)) + ERR("Error saving Elementary's derived configuration profile file"); ecore_file_unlink(buf); } else diff --git a/src/lib/elementary/elm_config.h b/src/lib/elementary/elm_config.h index c9c65c5db6..260d1dfa49 100644 --- a/src/lib/elementary/elm_config.h +++ b/src/lib/elementary/elm_config.h @@ -2356,7 +2356,8 @@ EAPI void elm_config_drag_anim_duration_set(double set); /* new efl.config interface helpers in C */ -#ifdef EFL_EO_API_SUPPORT +/* FIXME these depend on stuff from Efl.h but this is included before that */ +#ifdef EFL_BETA_API_SUPPORT static inline Eina_Bool efl_config_bool_set(Efl_Config *obj, const char * name, Eina_Bool val) diff --git a/src/lib/elementary/elm_conform.c b/src/lib/elementary/elm_conform.c index 82b5e2fe7d..a72c08eafc 100644 --- a/src/lib/elementary/elm_conform.c +++ b/src/lib/elementary/elm_conform.c @@ -997,7 +997,6 @@ _elm_conformant_efl_object_constructor(Eo *obj, Elm_Conformant_Data *sd) (void)parent; #endif - obj = efl_constructor(efl_super(obj, MY_CLASS)); efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY); evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); efl_access_object_role_set(obj, EFL_ACCESS_ROLE_FILLER); diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c index d8ebb9018d..b6c49ecc74 100644 --- a/src/lib/elementary/elm_diskselector.c +++ b/src/lib/elementary/elm_diskselector.c @@ -91,8 +91,7 @@ _item_select(Elm_Diskselector_Item_Data *it) _selected_item_indicate(sd->selected_item); if (it->func) it->func((void *)WIDGET_ITEM_DATA_GET(eo_it), WIDGET(it), eo_it); - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_SELECTABLE_SELECTED, eo_it); + evas_object_smart_callback_call(WIDGET(it), "selected", eo_it); } static int diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index 7b41a72017..ed7035fd90 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -219,6 +219,7 @@ _load_do(Evas_Object *obj) default: text = NULL; + err = EINVAL; break; } if (fail) @@ -1567,7 +1568,7 @@ _paste_cb(void *data, if (!sd) return; efl_event_callback_legacy_call - (data, EFL_UI_EVENT_SELECTABLE_PASTE, NULL); + (data, EFL_UI_EVENT_SELECTION_PASTE, NULL); sd->selection_asked = EINA_TRUE; @@ -1622,7 +1623,7 @@ _cut_cb(void *data, if (!sd) return; efl_event_callback_legacy_call - (data, EFL_UI_EVENT_SELECTABLE_CUT, NULL); + (data, EFL_UI_EVENT_SELECTION_CUT, NULL); /* Store it */ sd->sel_mode = EINA_FALSE; if (!_elm_config->desktop_entry) @@ -1646,7 +1647,7 @@ _copy_cb(void *data, if (!sd) return; efl_event_callback_legacy_call - (data, EFL_UI_EVENT_SELECTABLE_COPY, NULL); + (data, EFL_UI_EVENT_SELECTION_COPY, NULL); sd->sel_mode = EINA_FALSE; if (!_elm_config->desktop_entry) { @@ -1890,9 +1891,8 @@ _magnifier_move(void *data) cx += ex; cy += ey; - //Move the Magnifier + // calculate the position of the magnifier edje_object_parts_extends_calc(sd->mgf_bg, &x, &y, &w, &h); - evas_object_move(sd->mgf_bg, cx - x - (w / 2), cy - y - h); mx = cx - x - (w / 2); my = cy - y - h; @@ -1919,9 +1919,11 @@ _magnifier_move(void *data) my = 0; if (my + mh > wh) my = wh - mh; - evas_object_move(sd->mgf_bg, mx, my); } + // move the magnifier to the proper position + evas_object_move(sd->mgf_bg, mx, my); + //Set the Proxy Render Area evas_object_geometry_get(data, &x, &y, &w, &h); evas_object_geometry_get(sd->mgf_proxy, &px, &py, &pw, &ph); @@ -2317,7 +2319,7 @@ _entry_selection_start_signal_cb(void *data, if (entry != data) elm_entry_select_none(entry); } efl_event_callback_legacy_call - (data, EFL_UI_EVENT_SELECTABLE_START, NULL); + (data, EFL_UI_EVENT_SELECTION_START, NULL); elm_object_focus_set(data, EINA_TRUE); } @@ -2361,7 +2363,7 @@ _entry_selection_changed_signal_cb(void *data, if (!sd) return; sd->have_selection = EINA_TRUE; efl_event_callback_legacy_call - (data, EFL_UI_EVENT_SELECTABLE_CHANGED, NULL); + (data, EFL_UI_EVENT_SELECTION_CHANGED, NULL); // XXX: still try primary selection even if on wl in case it's // supported // if (!_entry_win_is_wl(data)) @@ -2384,7 +2386,7 @@ _entry_selection_cleared_signal_cb(void *data, sd->have_selection = EINA_FALSE; efl_event_callback_legacy_call - (data, EFL_UI_EVENT_SELECTABLE_CLEARED, NULL); + (data, EFL_UI_EVENT_SELECTION_CLEARED, NULL); // XXX: still try primary selection even if on wl in case it's // supported // if (!_entry_win_is_wl(data)) @@ -2425,7 +2427,7 @@ _entry_paste_request_signal_cb(void *data, // supported // if ((type == ELM_SEL_TYPE_PRIMARY) && _entry_win_is_wl(data)) return; efl_event_callback_legacy_call - (data, EFL_UI_EVENT_SELECTABLE_PASTE, NULL); + (data, EFL_UI_EVENT_SELECTION_PASTE, NULL); top = _entry_win_get(data); if (top) @@ -2870,7 +2872,7 @@ _entry_has_new_line(const char *text) { if (!strncmp(text, "' || ((text[4] == '/') && (text[5] == '>'))) + if (text[3] == '>' || ((text[3] == '/') && (text[4] == '>'))) { return EINA_TRUE; } @@ -4412,7 +4414,7 @@ _elm_entry_select_none(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd) } if (sd->have_selection) efl_event_callback_legacy_call - (obj, EFL_UI_EVENT_SELECTABLE_CLEARED, NULL); + (obj, EFL_UI_EVENT_SELECTION_CLEARED, NULL); sd->have_selection = EINA_FALSE; edje_object_part_text_select_none(sd->entry_edje, "elm.text"); @@ -4986,6 +4988,13 @@ elm_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format) return ret; } +EOLIAN static void +_elm_entry_efl_file_unload(Eo *obj, Elm_Entry_Data *sd EINA_UNUSED) +{ + elm_object_text_set(obj, ""); + efl_file_unload(efl_super(obj, MY_CLASS)); +} + EOLIAN static Eina_Error _elm_entry_efl_file_load(Eo *obj, Elm_Entry_Data *sd) { diff --git a/src/lib/elementary/elm_entry_eo.c b/src/lib/elementary/elm_entry_eo.c index 196d03a81e..09ff5794c8 100644 --- a/src/lib/elementary/elm_entry_eo.c +++ b/src/lib/elementary/elm_entry_eo.c @@ -981,6 +981,8 @@ Eina_Error _elm_entry_efl_file_file_set(Eo *obj, Elm_Entry_Data *pd, const char Eina_Error _elm_entry_efl_file_load(Eo *obj, Elm_Entry_Data *pd); +void _elm_entry_efl_file_unload(Eo *obj, Elm_Entry_Data *pd); + Efl_Object *_elm_entry_efl_part_part_get(const Eo *obj, Elm_Entry_Data *pd, const char *name); @@ -1142,6 +1144,7 @@ _elm_entry_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_entry_efl_access_widget_action_elm_actions_get), EFL_OBJECT_OP_FUNC(efl_file_set, _elm_entry_efl_file_file_set), EFL_OBJECT_OP_FUNC(efl_file_load, _elm_entry_efl_file_load), + EFL_OBJECT_OP_FUNC(efl_file_unload, _elm_entry_efl_file_unload), EFL_OBJECT_OP_FUNC(efl_part_get, _elm_entry_efl_part_part_get), ELM_ENTRY_EXTRA_OPS ); diff --git a/src/lib/elementary/elm_flipselector.c b/src/lib/elementary/elm_flipselector.c index 59109dac8f..8085325c84 100644 --- a/src/lib/elementary/elm_flipselector.c +++ b/src/lib/elementary/elm_flipselector.c @@ -233,8 +233,7 @@ _on_item_changed(Elm_Flipselector_Data *sd) if (item->func) item->func((void *)WIDGET_ITEM_DATA_GET(eo_item), WIDGET(item), eo_item); - efl_event_callback_legacy_call - (sd->obj, EFL_UI_EVENT_SELECTABLE_SELECTED, eo_item); + evas_object_smart_callback_call(sd->obj, "selected", eo_item); } static void diff --git a/src/lib/elementary/elm_focus.h b/src/lib/elementary/elm_focus.h index 6532aea457..a7243a9a65 100644 --- a/src/lib/elementary/elm_focus.h +++ b/src/lib/elementary/elm_focus.h @@ -352,6 +352,8 @@ EAPI Elm_Focus_Move_Policy elm_object_focus_move_policy_get(const Evas_Object * * as an item, set the mode ELM_FOCUS_REGION_SHOW_ITEM. * If then, it will be scrolled as an item. * + * This API is only implemented for Elm_Gengrid widgets. Every other widgets will always automatically show the widget. + * * @since 1.16 * * @ingroup Elm_Focus diff --git a/src/lib/elementary/elm_focus_legacy.c b/src/lib/elementary/elm_focus_legacy.c index b0cc1e67b2..5108f04c40 100644 --- a/src/lib/elementary/elm_focus_legacy.c +++ b/src/lib/elementary/elm_focus_legacy.c @@ -245,7 +245,12 @@ elm_object_focus_next(Evas_Object *obj, { Evas_Object *parent = eina_array_data_get(old_chain, i); if (!elm_widget_is(parent)) continue; - ELM_WIDGET_DATA_GET_OR_RETURN(parent, ppd); + ELM_WIDGET_DATA_GET(parent, ppd); + if (!ppd) + { + ERR("Failed to get Elm widget data for parent"); + break; + } legacy_target = _get_legacy_target(parent, ppd, dir); if (legacy_target) break; } diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 07ceb89b7b..7617df3b07 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -721,8 +721,8 @@ _item_unselect(Elm_Gen_Item *it) { it->selected = EINA_FALSE; sd->selected = eina_list_remove(sd->selected, eo_it); - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_SELECTABLE_UNSELECTED, eo_it); + evas_object_smart_callback_call + (WIDGET(it), "unselected", eo_it); if (_elm_config->atspi_mode) efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_TYPE_SELECTED, EINA_FALSE); } @@ -1265,6 +1265,12 @@ _elm_gengrid_item_unrealize(Elm_Gen_Item *it, it->realized = EINA_FALSE; it->want_unrealize = EINA_FALSE; + { + ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd); + efl_ui_focus_manager_calc_unregister(sd->obj, EO_OBJ(it)); + sd->order_dirty = EINA_TRUE; + } + evas_event_thaw(evas_object_evas_get(WIDGET(it))); evas_event_thaw_eval(evas_object_evas_get(WIDGET(it))); } @@ -1593,6 +1599,12 @@ _item_realize(Elm_Gen_Item *it) ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd); Elm_Object_Item *eo_it = EO_OBJ(it); + if (!it->realized) + { + efl_ui_focus_manager_calc_register_logical(sd->obj, EO_OBJ(it), sd->obj, NULL); + sd->order_dirty = EINA_TRUE; + } + if ((it->realized) || (it->generation < sd->generation)) return; @@ -3958,7 +3970,7 @@ _item_select(Elm_Gen_Item *it) if (it->func.func) it->func.func((void *)it->func.data, WIDGET(it), eo_it); if (it->generation == sd->generation) { - efl_event_callback_legacy_call(WIDGET(it), EFL_UI_EVENT_SELECTABLE_SELECTED, eo_it); + evas_object_smart_callback_call(WIDGET(it), "selected", eo_it); if (_elm_config->atspi_mode) efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_TYPE_SELECTED, EINA_TRUE); } @@ -4027,9 +4039,7 @@ _elm_gengrid_item_new(Elm_Gengrid_Data *sd, (!strcmp(it->itc->item_style, "group_index")); sd->item_count++; - efl_ui_focus_composition_dirty(sd->obj); - - return it; + return it; } EOLIAN static void @@ -4359,8 +4369,6 @@ _elm_gengrid_efl_object_constructor(Eo *obj, Elm_Gengrid_Data *sd) efl_ui_focus_parent_provider_gen_container_set(efl_added, obj), efl_ui_focus_parent_provider_gen_content_item_map_set(efl_added, sd->content_item_map)); - efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE); - obj = efl_constructor(efl_super(obj, MY_CLASS)); sd->obj = obj; @@ -5811,22 +5819,27 @@ _elm_gengrid_efl_object_provider_find(const Eo *obj, Elm_Gengrid_Data *pd, const } EOLIAN static void -_elm_gengrid_efl_ui_focus_composition_prepare(Eo *obj, Elm_Gengrid_Data *pd) +_elm_gengrid_efl_ui_focus_object_setup_order(Eo *obj, Elm_Gengrid_Data *pd) { Elm_Gen_Item *item; Eina_List *order = NULL; + if (!pd->order_dirty) return; + pd->order_dirty = EINA_FALSE; + EINA_INLIST_FOREACH(pd->items, item) { if (item->base->disabled) continue; if (item->group) continue; + if (item->realized) + continue; order = eina_list_append(order, item->base->eo_obj); } - efl_ui_focus_composition_elements_set(obj, order); + efl_ui_focus_manager_calc_update_order(obj, obj, order); } EOLIAN static Eina_Bool diff --git a/src/lib/elementary/elm_gengrid_eo.c b/src/lib/elementary/elm_gengrid_eo.c index e87ad58aef..89263f9c1f 100644 --- a/src/lib/elementary/elm_gengrid_eo.c +++ b/src/lib/elementary/elm_gengrid_eo.c @@ -386,7 +386,7 @@ Eina_Bool _elm_gengrid_efl_access_selection_all_children_select(Eo *obj, Elm_Gen Eina_Bool _elm_gengrid_efl_access_selection_access_selection_clear(Eo *obj, Elm_Gengrid_Data *pd); -void _elm_gengrid_efl_ui_focus_composition_prepare(Eo *obj, Elm_Gengrid_Data *pd); +void _elm_gengrid_efl_ui_focus_object_setup_order(Eo *obj, Elm_Gengrid_Data *pd); Eina_Bool _elm_gengrid_efl_ui_widget_focus_state_apply(Eo *obj, Elm_Gengrid_Data *pd, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect); @@ -478,7 +478,7 @@ _elm_gengrid_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_access_selection_is_child_selected, _elm_gengrid_efl_access_selection_is_child_selected), EFL_OBJECT_OP_FUNC(efl_access_selection_all_children_select, _elm_gengrid_efl_access_selection_all_children_select), EFL_OBJECT_OP_FUNC(efl_access_selection_clear, _elm_gengrid_efl_access_selection_access_selection_clear), - EFL_OBJECT_OP_FUNC(efl_ui_focus_composition_prepare, _elm_gengrid_efl_ui_focus_composition_prepare), + EFL_OBJECT_OP_FUNC(efl_ui_focus_object_setup_order, _elm_gengrid_efl_ui_focus_object_setup_order), EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_state_apply, _elm_gengrid_efl_ui_widget_focus_state_apply), EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_setup_on_first_touch, _elm_gengrid_efl_ui_focus_manager_setup_on_first_touch), EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_focus_get, _elm_gengrid_efl_ui_focus_manager_manager_focus_get), @@ -512,6 +512,6 @@ static const Efl_Class_Description _elm_gengrid_class_desc = { NULL }; -EFL_DEFINE_CLASS(elm_gengrid_class_get, &_elm_gengrid_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_UI_FOCUS_COMPOSITION_MIXIN, ELM_INTERFACE_SCROLLABLE_MIXIN, EFL_UI_CLICKABLE_INTERFACE, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_ACCESS_SELECTION_INTERFACE, EFL_UI_LEGACY_INTERFACE, ELM_WIDGET_ITEM_CONTAINER_INTERFACE, NULL); +EFL_DEFINE_CLASS(elm_gengrid_class_get, &_elm_gengrid_class_desc, EFL_UI_LAYOUT_BASE_CLASS, ELM_INTERFACE_SCROLLABLE_MIXIN, EFL_UI_CLICKABLE_INTERFACE, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_ACCESS_SELECTION_INTERFACE, EFL_UI_LEGACY_INTERFACE, ELM_WIDGET_ITEM_CONTAINER_INTERFACE, NULL); #include "elm_gengrid_eo.legacy.c" diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index a42eea90b9..a2ad60c590 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -3931,8 +3931,8 @@ _item_unselect(Elm_Gen_Item *it) it->selected = EINA_FALSE; sd->selected = eina_list_remove(sd->selected, EO_OBJ(it)); - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_SELECTABLE_UNSELECTED, EO_OBJ(it)); + evas_object_smart_callback_call + (WIDGET(it), "unselected", EO_OBJ(it)); if (_elm_config->atspi_mode) efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_TYPE_SELECTED, EINA_FALSE); } @@ -6116,7 +6116,7 @@ _item_select(Elm_Gen_Item *it) if (it->func.func) it->func.func((void *)it->func.data, WIDGET(it), eo_it); // delete item if it's requested deletion in the above callbacks. if ((it->base)->on_deletion) goto item_deleted; - efl_event_callback_legacy_call(WIDGET(it), EFL_UI_EVENT_SELECTABLE_SELECTED, eo_it); + evas_object_smart_callback_call(WIDGET(it), "selected", eo_it); if (_elm_config->atspi_mode) efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_TYPE_SELECTED, EINA_TRUE); // delete item if it's requested deletion in the above callbacks. diff --git a/src/lib/elementary/elm_gesture_layer.c b/src/lib/elementary/elm_gesture_layer.c index ba5ea9cc99..667a2716a0 100644 --- a/src/lib/elementary/elm_gesture_layer.c +++ b/src/lib/elementary/elm_gesture_layer.c @@ -619,7 +619,7 @@ _state_report(Gesture_Info *gesture, flags |= cb_info->cb(cb_info->user_data, info); } - return EVAS_EVENT_FLAG_NONE; + return flags; } /** diff --git a/src/lib/elementary/elm_helper.h b/src/lib/elementary/elm_helper.h index 2cc350e869..488372939a 100644 --- a/src/lib/elementary/elm_helper.h +++ b/src/lib/elementary/elm_helper.h @@ -77,7 +77,7 @@ elm_validator_regexp_free(Elm_Validator_Regexp *validator) EINA_ARG_NONNULL(1); EAPI Elm_Regexp_Status elm_validator_regexp_status_get(Elm_Validator_Regexp *validator) EINA_ARG_NONNULL(1); -#if defined(EFL_BETA_API_SUPPORT) && defined(EFL_EO_API_SUPPORT) +#if defined(EFL_BETA_API_SUPPORT) /** * @brief The regex validator. Used as callback to validate event. * diff --git a/src/lib/elementary/elm_index.c b/src/lib/elementary/elm_index.c index 8fa7e8a740..49fa53192b 100644 --- a/src/lib/elementary/elm_index.c +++ b/src/lib/elementary/elm_index.c @@ -863,8 +863,7 @@ _on_mouse_up(void *data, { efl_event_callback_legacy_call (data, EFL_UI_EVENT_CLICKED, eo_item); - efl_event_callback_legacy_call - (data, EFL_UI_EVENT_SELECTABLE_SELECTED, eo_item); + evas_object_smart_callback_call(data, "selected", eo_item); eo_id_item = eo_item; ELM_INDEX_ITEM_DATA_GET(eo_id_item, id_item); if (id_item->func) @@ -1298,8 +1297,7 @@ _elm_index_item_selected_set(Eo *eo_it, efl_event_callback_legacy_call (obj, ELM_INDEX_EVENT_CHANGED, eo_it); - efl_event_callback_legacy_call - (obj, EFL_UI_EVENT_SELECTABLE_SELECTED, eo_it); + evas_object_smart_callback_call(obj, "selected", eo_it); ecore_timer_del(sd->delay); sd->delay = ecore_timer_add(sd->delay_change_time, _delay_change_cb, obj); diff --git a/src/lib/elementary/elm_interface_scrollable.eo b/src/lib/elementary/elm_interface_scrollable.eo index 8a66c9fefc..6fc578882d 100644 --- a/src/lib/elementary/elm_interface_scrollable.eo +++ b/src/lib/elementary/elm_interface_scrollable.eo @@ -216,8 +216,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol Note: If $obj is not set to have pages, nothing will happen after this call. - - @since 1.8]] + ]] set { } get { @@ -251,8 +250,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol such as the movement angle. If the user scrolls roughly in one direction only, it will only move according to it while if the move was clearly wanted on both axes, it will happen on both of them. - - @since 1.8]] + ]] set { } get { @@ -274,8 +272,7 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Scrol } @property content_loop { [[Controls an infinite loop for a scroller. - - @since 1.14]] + ]] set { } get { diff --git a/src/lib/elementary/elm_interface_scrollable.h b/src/lib/elementary/elm_interface_scrollable.h index 3f2a0862a4..cf9806f501 100644 --- a/src/lib/elementary/elm_interface_scrollable.h +++ b/src/lib/elementary/elm_interface_scrollable.h @@ -58,12 +58,7 @@ typedef void (*Elm_Interface_Scrollable_Resize_Cb)(Evas_Object *obj, Evas_C typedef struct _Elm_Scrollable_Smart_Interface_Data Elm_Scrollable_Smart_Interface_Data; -#ifdef EFL_EO_API_SUPPORT #include "elm_interface_scrollable.eo.h" -#endif -#ifndef EFL_NOLEGACY_API_SUPPORT -#include "elm_interface_scrollable.eo.legacy.h" -#endif struct _Elm_Scrollable_Smart_Interface_Data { @@ -247,7 +242,7 @@ struct _Elm_Scrollable_Smart_Interface_Data return __VA_ARGS__; \ } -#if defined(EFL_EO_API_SUPPORT) && defined(EFL_BETA_API_SUPPORT) +#ifdef EFL_BETA_API_SUPPORT EAPI void elm_pan_gravity_set(Elm_Pan *, double x, double) EINA_DEPRECATED; EAPI void elm_pan_gravity_get(const Elm_Pan *, double *, double *) EINA_DEPRECATED; #endif diff --git a/src/lib/elementary/elm_interfaces.h b/src/lib/elementary/elm_interfaces.h index bcbe8e646f..2c0f33a260 100644 --- a/src/lib/elementary/elm_interfaces.h +++ b/src/lib/elementary/elm_interfaces.h @@ -3,13 +3,7 @@ #include "efl_access_widget_action.h" #include "efl_access_window.h" -// FIXME FIXME FIXME -- Still required because of photocam -#ifdef EFL_EO_API_SUPPORT -# include "elm_interface_scrollable.h" -#endif - #ifdef EFL_BETA_API_SUPPORT -#ifdef EFL_EO_API_SUPPORT #include "efl_access_action.eo.h" #include "efl_access_component.eo.h" #include "efl_access_editable_text.eo.h" @@ -17,12 +11,3 @@ #include "efl_access_value.eo.h" #include "efl_ui_legacy.eo.h" #endif -#ifndef EFL_NOLEGACY_API_SUPPORT -#include "efl_access_action.eo.legacy.h" -#include "efl_access_component.eo.legacy.h" -#include "efl_access_editable_text.eo.legacy.h" -#include "efl_access_selection.eo.legacy.h" -#include "efl_access_value.eo.legacy.h" -#include "efl_ui_legacy.eo.legacy.h" -#endif -#endif diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c index 5047330de3..891e58536f 100644 --- a/src/lib/elementary/elm_list.c +++ b/src/lib/elementary/elm_list.c @@ -1448,7 +1448,7 @@ call: _elm_list_walk(obj, sd); if (it->func) it->func((void *)WIDGET_ITEM_DATA_GET(eo_it), WIDGET(it), eo_it); - efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SELECTABLE_SELECTED, eo_it); + evas_object_smart_callback_call(obj, "selected", eo_it); if (_elm_config->atspi_mode) efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_TYPE_SELECTED, EINA_TRUE); sd->last_selected_item = eo_it; @@ -1523,8 +1523,8 @@ _item_unselect(Elm_List_Item_Data *it) sd->selected = eina_list_remove(sd->selected, EO_OBJ(it)); if (!(it->base->disabled || (sd->select_mode == ELM_OBJECT_SELECT_MODE_NONE))) - efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_SELECTABLE_UNSELECTED, EO_OBJ(it)); + evas_object_smart_callback_call + (WIDGET(it), "unselected", EO_OBJ(it)); if (_elm_config->atspi_mode) efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_TYPE_SELECTED, EINA_FALSE); } diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c index bd0f0b7d38..676f1a9e8a 100644 --- a/src/lib/elementary/elm_main.c +++ b/src/lib/elementary/elm_main.c @@ -1943,22 +1943,21 @@ elm_object_name_find(const Evas_Object *obj, const char *name, int recurse) EAPI void elm_object_orientation_mode_disabled_set(Evas_Object *obj, Eina_Bool disabled) { - if (efl_isa(obj, EFL_UI_LAYOUT_CLASS)) + if (efl_isa(obj, EFL_UI_LAYOUT_BASE_CLASS)) { efl_ui_layout_automatic_theme_rotation_set(obj, disabled); } else { //legacy behaviour - if (disabled) - efl_key_data_set(obj, "__orientation_mode_disabled", (void*) (intptr_t) EINA_TRUE); + efl_key_data_set(obj, "__orientation_mode_disabled", (void*) (intptr_t) disabled); } } EAPI Eina_Bool elm_object_orientation_mode_disabled_get(const Evas_Object *obj) { - if (efl_isa(obj, EFL_UI_LAYOUT_CLASS)) + if (efl_isa(obj, EFL_UI_LAYOUT_BASE_CLASS)) { return efl_ui_layout_automatic_theme_rotation_get(obj); } diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h index cf9b553c12..f6974a9ba0 100644 --- a/src/lib/elementary/elm_priv.h +++ b/src/lib/elementary/elm_priv.h @@ -67,6 +67,8 @@ # include "elm_code_private.h" #include "elm_access_eo.h" #include "elm_actionslider_eo.h" +#include "elm_atspi_app_object_eo.h" +#include "elm_atspi_bridge_eo.h" #include "elm_box_eo.h" #include "elm_bubble_eo.h" #include "elm_calendar_eo.h" diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index 9e0358bfd4..b64f4d91bb 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -178,7 +178,7 @@ _item_unselect(Elm_Toolbar_Item_Data *item) elm_layout_signal_emit(VIEW(item), "elm,state,unselected", "elm"); if (item->icon) elm_widget_signal_emit(item->icon, "elm,state,unselected", "elm"); - efl_event_callback_legacy_call(WIDGET(item), EFL_UI_EVENT_SELECTABLE_UNSELECTED, EO_OBJ(item)); + evas_object_smart_callback_call(WIDGET(item), "unselected", EO_OBJ(item)); if (_elm_config->atspi_mode) efl_access_state_changed_signal_emit(EO_OBJ(item), EFL_ACCESS_STATE_TYPE_SELECTED, EINA_FALSE); } @@ -1094,7 +1094,7 @@ _item_select(Elm_Toolbar_Item_Data *it) { if (it->func) it->func((void *)(WIDGET_ITEM_DATA_GET(EO_OBJ(it))), WIDGET(it), EO_OBJ(it)); } - efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SELECTABLE_SELECTED, EO_OBJ(it)); + evas_object_smart_callback_call(obj, "selected", EO_OBJ(it)); if (_elm_config->atspi_mode) efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_TYPE_SELECTED, EINA_TRUE); } diff --git a/src/lib/elementary/elm_view_form.h b/src/lib/elementary/elm_view_form.h index e97ca6c6e7..fc35e48644 100644 --- a/src/lib/elementary/elm_view_form.h +++ b/src/lib/elementary/elm_view_form.h @@ -1,5 +1,5 @@ -#ifdef EFL_EO_API_SUPPORT +#ifdef EFL_BETA_API_SUPPORT #ifndef ELM_VIEW_FORM_H #define ELM_VIEW_FORM_H diff --git a/src/lib/elementary/elm_view_list.h b/src/lib/elementary/elm_view_list.h index 4ad048e106..7f7ef5a553 100644 --- a/src/lib/elementary/elm_view_list.h +++ b/src/lib/elementary/elm_view_list.h @@ -1,5 +1,5 @@ -#ifdef EFL_EO_API_SUPPORT +#ifdef EFL_BETA_API_SUPPORT #ifndef ELM_VIEW_LIST_H #define ELM_VIEW_LIST_H diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h index f6eb21cec7..ca4550ae5e 100644 --- a/src/lib/elementary/elm_widget.h +++ b/src/lib/elementary/elm_widget.h @@ -706,7 +706,7 @@ Efl_Canvas_Object * _efl_ui_widget_bg_get(const Efl_Ui_Widget *obj); #define ELM_WIDGET_DATA_GET_OR_RETURN(o, ptr, ...) \ Elm_Widget_Smart_Data *ptr; \ - ptr = efl_data_scope_get(o, EFL_UI_WIDGET_CLASS); \ + ptr = efl_data_scope_safe_get(o, EFL_UI_WIDGET_CLASS); \ if (EINA_UNLIKELY(!ptr)) \ { \ ERR("No widget data for object %p (%s)", \ @@ -714,6 +714,13 @@ Efl_Canvas_Object * _efl_ui_widget_bg_get(const Efl_Ui_Widget *obj); return __VA_ARGS__; \ } +#define ELM_WIDGET_DATA_GET(o, ptr) \ + Elm_Widget_Smart_Data *ptr; \ + ptr = efl_data_scope_safe_get(o, EFL_UI_WIDGET_CLASS); \ + if (EINA_UNLIKELY(!ptr)) \ + ERR("No widget data for object %p (%s)", \ + o, evas_object_type_get(o)); + #define ELM_WIDGET_CHECK(obj) \ if (EINA_UNLIKELY(!efl_isa((obj), EFL_UI_WIDGET_CLASS))) \ return diff --git a/src/lib/elementary/elm_widget_gengrid.h b/src/lib/elementary/elm_widget_gengrid.h index f17b75e8ab..dc93910041 100644 --- a/src/lib/elementary/elm_widget_gengrid.h +++ b/src/lib/elementary/elm_widget_gengrid.h @@ -154,6 +154,7 @@ struct _Elm_Gengrid_Data Eina_Bool scr_minw; Eina_Bool scr_minh; + Eina_Bool order_dirty; /* boolean flag indicating if there needs to be an update to the focus_order of the widget.*/ }; struct Elm_Gen_Item_Type diff --git a/src/lib/elementary/elm_widget_item_static_focus.c b/src/lib/elementary/elm_widget_item_static_focus.c index a94e80fb19..c2061ed808 100644 --- a/src/lib/elementary/elm_widget_item_static_focus.c +++ b/src/lib/elementary/elm_widget_item_static_focus.c @@ -54,10 +54,6 @@ _grid_realized_cb(void *data, const Efl_Event *ev) if (!elm_object_item_disabled_get(data) && !is_group) { - Elm_Widget_Item_Data *wpd = efl_data_scope_get(data, ELM_WIDGET_ITEM_CLASS); - - //first prepare the container - efl_ui_focus_object_setup_order(wpd->widget); efl_ui_focus_object_setup_order(data); } } diff --git a/src/lib/elementary/elm_win_eo.h b/src/lib/elementary/elm_win_eo.h index 51eaee9010..39ec8eb4b1 100644 --- a/src/lib/elementary/elm_win_eo.h +++ b/src/lib/elementary/elm_win_eo.h @@ -11,7 +11,7 @@ EAPI void elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel); EAPI Eina_Bool elm_win_autodel_get(const Evas_Object *obj); -#if defined (EFL_EO_API_SUPPORT) && defined (EFL_BETA_API_SUPPORT) +#ifdef EFL_BETA_API_SUPPORT /** * @brief Set the window's autodel state. * diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index a18f4d5e35..2402c81a4b 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -172,8 +172,6 @@ pub_eo_files = [ 'efl_ui_progressbar_legacy_part.eo', 'elm_multibuttonentry_part.eo', 'elm_interface_scrollable.eo', - 'elm_atspi_bridge.eo', - 'elm_atspi_app_object.eo', 'efl_ui_image_zoomable_pan.eo', 'efl_ui_text_part.eo', 'efl_ui_caching_factory.eo', @@ -262,7 +260,6 @@ eolian_include_directories += ['-I', meson.current_source_dir()] elementary_headers_unstable = [ 'elm_gen_common.h', - 'elm_atspi_bridge.h', 'efl_access_object.h', 'efl_access_text.h', 'efl_access_widget_action.h', @@ -417,6 +414,9 @@ elementary_pub_headers = [ 'elm_actionslider_legacy.h', 'elm_app.h', 'elm_atspi_app_object.h', + 'elm_atspi_app_object_eo.legacy.h', + 'elm_atspi_bridge.h', + 'elm_atspi_bridge_eo.legacy.h', 'elm_authors.h', 'elm_bg.h', 'elm_bg_legacy.h', @@ -1019,9 +1019,12 @@ elementary = declare_dependency( dependencies: elementary_pub_deps, ) -install_data(pub_eo_files + pub_eo_types_files, - install_dir: join_paths(eolian_include_dir, package_version_name) -) + +if get_option('install-eo-files') + install_data(pub_eo_files + pub_eo_types_files, + install_dir: join_paths(eolian_include_dir, package_version_name) + ) +endif install_headers(elementary_header_src, install_dir : dir_package_include, diff --git a/src/lib/emotion/Emotion.h b/src/lib/emotion/Emotion.h index d7eef3c090..d8eb052f93 100644 --- a/src/lib/emotion/Emotion.h +++ b/src/lib/emotion/Emotion.h @@ -127,9 +127,7 @@ extern "C" { #ifndef EFL_NOLEGACY_API_SUPPORT #include "Emotion_Legacy.h" #endif -#ifdef EFL_EO_API_SUPPORT #include "Emotion_Eo.h" -#endif /** * @file Emotion.h diff --git a/src/lib/emotion/meson.build b/src/lib/emotion/meson.build index 93218828b3..6f2717dfa6 100644 --- a/src/lib/emotion/meson.build +++ b/src/lib/emotion/meson.build @@ -1,11 +1,11 @@ -pub_legacy_eo_files = [ +pub_eo_file = [ 'efl_canvas_video.eo' ] pub_eo_file_target = [] priv_eo_file_target = [] -foreach eo_file : pub_legacy_eo_files +foreach eo_file : pub_eo_file pub_eo_file_target += custom_target('eolian_gen_' + eo_file, input : eo_file, output : [eo_file + '.h'], @@ -62,9 +62,11 @@ emotion = declare_dependency( dependencies: emotion_pub_deps, ) -install_data(pub_legacy_eo_files, - install_dir: join_paths(eolian_include_dir, package_version_name) -) +if get_option('install-eo-files') + install_data(pub_eo_file, + install_dir: join_paths(eolian_include_dir, package_version_name) + ) +endif install_headers(emotion_header_src, install_dir : dir_package_include, diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index ea865a8d2d..613774da87 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -2082,14 +2082,6 @@ typedef void (*efl_key_data_free_func)(void *); * @{ */ -/** - * Don't use this. - * The values of the returned event structure are also internal, don't assume - * anything about them. - * @internal - */ -EAPI const Efl_Event_Description *efl_object_legacy_only_event_description_get(const char *_event_name); - /** * Helper for sorting callbacks array. Automatically used by * @ref EFL_CALLBACKS_ARRAY_DEFINE diff --git a/src/lib/eo/efl_class.eo b/src/lib/eo/efl_class.eo index b665ec2e8c..c30df7209a 100644 --- a/src/lib/eo/efl_class.eo +++ b/src/lib/eo/efl_class.eo @@ -1,5 +1,8 @@ abstract Efl.Class { - [[Abstract Efl class]] + [[Abstract Efl class + + @since 1.22 + ]] data: null; } diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo index 39bdc33450..34d020160b 100644 --- a/src/lib/eo/efl_object.eo +++ b/src/lib/eo/efl_object.eo @@ -1,7 +1,10 @@ import eina_types; struct Efl.Event_Description { - [[This struct holds the description of a specific event.]] + [[This struct holds the description of a specific event. + + @since 1.22 + ]] name: string; [[name of the event.]] unfreezable: bool; [[$true if the event cannot be frozen.]] legacy_is: bool; [[Internal use: $true if a legacy event.]] @@ -18,7 +21,9 @@ type Efl.Callback_Priority : short; specified @Efl.Callback_Priority_Default is to be assumed. See @Efl.Callback_Priority_Before @Efl.Callback_Priority_Default @Efl.Callback_Priority_After - ]] + + @since 1.22 +]] const Efl.Callback_Priority_Before : Efl.Callback_Priority = -100; [[Slightly more prioritized than default.]] @@ -56,8 +61,8 @@ abstract Efl.Object @.destructor method is called, use it to return any resources the object might have gathered during its life. - @since 1.22 - ]] + @since 1.22 + ]] eo_prefix: efl; methods { diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 301a015859..a95c27a42d 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -1547,6 +1547,7 @@ efl_class_new(const Efl_Class_Description *desc, const Efl_Class *parent_id, ... break; default: ERR("type cannot be INVALID"); + va_end(p_list); return NULL; } } diff --git a/src/lib/eo/eo_internal.h b/src/lib/eo/eo_internal.h index 0eecdf2eb2..7c57e9839c 100644 --- a/src/lib/eo/eo_internal.h +++ b/src/lib/eo/eo_internal.h @@ -29,6 +29,15 @@ typedef unsigned char Eina_Bool; typedef struct _Eo_Opaque Eo; +typedef struct _Efl_Event_Description Efl_Event_Description; + +/** + * Don't use this. + * The values of the returned event structure are also internal, don't assume + * anything about them. + * @internal + */ +EAPI const Efl_Event_Description *efl_object_legacy_only_event_description_get(const char *_event_name); EAPI void ___efl_auto_unref_set(Eo *obj_id, Eina_Bool enable); diff --git a/src/lib/eo/meson.build b/src/lib/eo/meson.build index 1e344293ef..abc563ff60 100644 --- a/src/lib/eo/meson.build +++ b/src/lib/eo/meson.build @@ -72,9 +72,11 @@ eo_dbg = declare_dependency( dependencies: eo_deps + eo_pub_deps, ) -install_data(pub_eo_files + pub_eo_types_files, - install_dir: join_paths(eolian_include_dir, package_version_name) -) +if get_option('install-eo-files') + install_data(pub_eo_files + pub_eo_types_files, + install_dir: join_paths(eolian_include_dir, package_version_name) + ) +endif install_headers(eo_header, install_dir : dir_package_include, diff --git a/src/lib/eolian/database_check.c b/src/lib/eolian/database_check.c index 61afa6e281..4e448cea7a 100644 --- a/src/lib/eolian/database_check.c +++ b/src/lib/eolian/database_check.c @@ -125,6 +125,11 @@ _check_class(const Eolian_Class *cl, Eina_Hash *depset, Eina_Hash *chash) _add_dep(depset, icl->base.unit); eina_iterator_free(itr); + itr = eina_list_iterator_new(cl->requires); + EINA_ITERATOR_FOREACH(itr, icl) + _add_dep(depset, icl->base.unit); + eina_iterator_free(itr); + const Eolian_Function *fid; itr = eina_list_iterator_new(cl->properties); EINA_ITERATOR_FOREACH(itr, fid) diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c index a6ae461079..d9ca18a755 100644 --- a/src/lib/eolian/database_validate.c +++ b/src/lib/eolian/database_validate.c @@ -12,7 +12,6 @@ typedef struct _Validate_State { Eina_Bool warned; Eina_Bool stable; - Eina_Bool event_redef; Eina_Bool unimplemented; } Validate_State; @@ -505,22 +504,18 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash) { const Eolian_Object *oobj = NULL; - if (vals->event_redef) + oobj = eina_hash_find(nhash, &event->base.name); + if (EINA_UNLIKELY(!!oobj)) { - oobj = eina_hash_find(nhash, &event->base.name); - if (EINA_UNLIKELY(!!oobj)) - { - _eo_parser_log(&event->base, - "event '%s' conflicts with another event (at %s:%d:%d)", - event->base.name, oobj->file, oobj->line, oobj->column); - vals->warned = EINA_TRUE; - } + _eo_parser_log(&event->base, + "event '%s' conflicts with another event (at %s:%d:%d)", + event->base.name, oobj->file, oobj->line, oobj->column); + vals->warned = EINA_TRUE; } if (event->base.validated) { - if (vals->event_redef && !oobj) - eina_hash_add(nhash, &event->base.name, &event->base); + eina_hash_set(nhash, &event->base.name, &event->base); return EINA_TRUE; } @@ -529,11 +524,70 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash) if (!_validate_type(vals, event->type)) return _reset_stable(vals, was_stable, EINA_FALSE); + /* if this is an alias we need the lowest type in the stack, this is + * after validation so all the necessary fields are properly filled in + */ + const Eolian_Type *tp = eolian_type_aliased_base_get(event->type); + + /* event types are specially restricted + * but stuff like pointer-to-pointer is alrady handled by _validate_type + */ + if (tp->type == EOLIAN_TYPE_REGULAR && vals->stable) + { + /* explicit pointers never allowed */ + if (tp->is_ptr) + { + _eo_parser_log(&tp->base, "pointers not allowed in events"); + return _reset_stable(vals, was_stable, EINA_FALSE); + } + /* require containers to be const for now... + * + * this is FIXME, and decision wasn't reached before 1.22 + * it is a simple search-replace anyway + */ + if (database_type_is_ownable(tp->base.unit, tp, EINA_FALSE)) + { + if (!tp->is_const) + { + _eo_parser_log(&tp->base, "event container types must be const"); + return _reset_stable(vals, was_stable, EINA_FALSE); + } + } + else if (tp->is_const) + { + _eo_parser_log(&tp->base, "event value types cannot be const"); + return _reset_stable(vals, was_stable, EINA_FALSE); + } + int kwid = eo_lexer_keyword_str_to_id(tp->base.name); + /* containers are allowed but not iterators/lists */ + if (kwid == KW_iterator || kwid == KW_list) + { + _eo_parser_log(&tp->base, "sequence containers not allowed in events"); + return _reset_stable(vals, was_stable, EINA_FALSE); + } + /* rw slices are not allowed as regular types are always immutable */ + if (kwid == KW_rw_slice) + { + _eo_parser_log(&tp->base, "mutable slices not allowed in events"); + return _reset_stable(vals, was_stable, EINA_FALSE); + } + /* any type past builtin value types and containers is not allowed, + * any_value is allowed but passed as const reference, any_value_ptr + * is not; string is allowed, but mutable strings or stringshares are + * not and neither are string buffers, the type is never owned by the + * callee, so all strings passed in are unowned and read-only + */ + if (kwid >= KW_any_value_ptr && kwid != KW_string) + { + _eo_parser_log(&tp->base, "forbidden event type"); + return _reset_stable(vals, was_stable, EINA_FALSE); + } + } + if (!_validate_doc(event->doc)) return _reset_stable(vals, was_stable, EINA_FALSE); - if (vals->event_redef && !oobj) - eina_hash_add(nhash, &event->base.name, &event->base); + eina_hash_set(nhash, &event->base.name, &event->base); _reset_stable(vals, was_stable, EINA_TRUE); return _validate(&event->base); @@ -1353,7 +1407,6 @@ database_validate(const Eolian_Unit *src) Validate_State vals = { EINA_FALSE, EINA_TRUE, - !!getenv("EOLIAN_EVENT_REDEF_WARN"), !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_WARN"), }; diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 454e634e8c..9895f0eb4a 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -1687,8 +1687,7 @@ parse_event(Eo_Lexer *ls) ev->base.name = eina_stringshare_add(eina_strbuf_string_get(buf)); eo_lexer_dtor_pop(ls); Eina_Bool has_scope = EINA_FALSE, has_beta = EINA_FALSE, - has_hot = EINA_FALSE, has_restart = EINA_FALSE, - has_owned = EINA_FALSE; + has_hot = EINA_FALSE, has_restart = EINA_FALSE; for (;;) switch (ls->t.kw) { case KW_at_private: @@ -1714,17 +1713,12 @@ parse_event(Eo_Lexer *ls) ev->is_restart = EINA_TRUE; eo_lexer_get(ls); break; - case KW_at_owned: - CASE_LOCK(ls, owned, "owned qualifier"); - eo_lexer_get(ls); - break; default: goto end; } end: check_next(ls, ':'); ev->type = eo_lexer_type_release(ls, parse_type_void(ls, EINA_TRUE)); - ev->type->owned = has_owned; check(ls, ';'); eo_lexer_get(ls); FILL_DOC(ls, ev, doc); diff --git a/src/lib/eolian_cxx/grammar/context.hpp b/src/lib/eolian_cxx/grammar/context.hpp index e4839200bc..6fb171ab66 100644 --- a/src/lib/eolian_cxx/grammar/context.hpp +++ b/src/lib/eolian_cxx/grammar/context.hpp @@ -5,33 +5,50 @@ namespace efl { namespace eolian { namespace grammar { struct context_null {}; -template +template struct context_cons { - Tag tag; - Tail const& tail; -}; - -template -struct context_cons -{ - Tag tag; - context_null tail; + typename std::remove_reference::type const tag; + typename std::remove_reference::type const tail; }; template -context_cons> -context_add_tag(NewTag tag, context_cons const& context) +constexpr context_cons> +context_add_tag(NewTag const& tag, context_cons const& context) { return context_cons>{tag, context}; } template -context_cons -context_add_tag(NewTag tag, context_null context) +constexpr context_cons +context_add_tag(NewTag const& tag, context_null context) { return context_cons{tag, context}; } +template +constexpr context_cons +context_replace_tag(Tag const& tag, context_cons const& context + , typename std::enable_if::value>::type* = nullptr) +{ + return {tag, context.tail}; +} + +template +constexpr context_cons +context_replace_tag(Tag const& tag, context_cons const& context + , typename std::enable_if::value>::type* = nullptr) +{ + return {context.tag, context_replace_tag(tag, context.tail)}; +} + +template +constexpr context_null +context_replace_tag(Tag const& tag, context_null const&) +{ + static_assert(std::is_same::value, "Tag type not available in this generation context"); + return tag; +} + template struct tag_check; template @@ -42,25 +59,26 @@ template struct tag_check> : tag_check {}; template -Tag const& context_find_tag(context_cons const& context +constexpr Tag const& context_find_tag(context_cons const& context , typename std::enable_if::value>::type* = nullptr) { return context.tag; } template -Tag const& context_find_tag(context_cons const& context +constexpr Tag const& context_find_tag(context_cons const& context , typename std::enable_if::value>::type* = nullptr) { return context_find_tag(context.tail); } -template -Tag const& context_find_tag(context_null const&) +template +constexpr Tag const& context_find_tag(context_null const& context) { - throw std::logic_error("Context for generation not available"); + static_assert(std::is_same::value, "Tag type not available in this generation context"); + return context; } - + } } } #endif diff --git a/src/lib/eolian_cxx/grammar/indentation.hpp b/src/lib/eolian_cxx/grammar/indentation.hpp index 897be03c3b..347974fa01 100644 --- a/src/lib/eolian_cxx/grammar/indentation.hpp +++ b/src/lib/eolian_cxx/grammar/indentation.hpp @@ -8,22 +8,36 @@ namespace efl { namespace eolian { namespace grammar { struct scope_tab_generator { - scope_tab_generator(int n) - : n(n) {} - + constexpr scope_tab_generator(int n, int m = 4) + : n(n) + , m(m) + {} + constexpr scope_tab_generator(scope_tab_generator const&) = default; + scope_tab_generator& operator=(scope_tab_generator const&) = default; + template bool generate(OutputIterator sink, attributes::unused_type, Context const&) const { for(int i = 0; i != n; ++i) { - *sink++ = ' '; - *sink++ = ' '; - *sink++ = ' '; + for(int j = 0; j != m; ++j) + *sink++ = ' '; } return true; } + constexpr scope_tab_generator inc(int nplus = 1) const + { + return {n+nplus, m}; + } + + constexpr scope_tab_generator dec(int nminus = 1) const + { + return {n-nminus, m}; + } + int n; + int m; }; template <> @@ -33,9 +47,14 @@ struct is_generator : std::true_type {}; struct scope_tab_terminal { - scope_tab_generator operator()(int n) const + scope_tab_generator operator()(int n, int m = 4) const { - return scope_tab_generator(n); + return {n, m}; + } + + operator scope_tab_generator() const + { + return {1}; } } const scope_tab = {}; diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp index c014ee8a88..fa32dfbe93 100644 --- a/src/lib/eolian_cxx/grammar/klass_def.hpp +++ b/src/lib/eolian_cxx/grammar/klass_def.hpp @@ -258,7 +258,6 @@ struct documentation_def str = eolian_documentation_since_get(eolian_doc); if (str) { since = str; - full_text += "\n" + since; } efl::eina::ptr_list l(eolian_documentation_string_split(description.c_str())); diff --git a/src/lib/evas/Evas.h b/src/lib/evas/Evas.h index 525ca7d785..9044398971 100644 --- a/src/lib/evas/Evas.h +++ b/src/lib/evas/Evas.h @@ -169,10 +169,8 @@ #include #include -#ifdef EFL_BETA_API_SUPPORT /* This include has been added to support Eo in Evas */ #include -#endif #include diff --git a/src/lib/evas/Evas.hh b/src/lib/evas/Evas.hh index 064d8c184e..ac9b6509ed 100644 --- a/src/lib/evas/Evas.hh +++ b/src/lib/evas/Evas.hh @@ -8,9 +8,6 @@ #ifndef EFL_BETA_API_SUPPORT #define EFL_BETA_API_SUPPORT #endif -#ifndef EFL_EO_API_SUPPORT -#define EFL_EO_API_SUPPORT -#endif #include diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h index bb710a9825..661d7f5c6b 100644 --- a/src/lib/evas/Evas_Common.h +++ b/src/lib/evas/Evas_Common.h @@ -89,7 +89,7 @@ EAPI extern Evas_Version * evas_version; * @since 1.1 */ // Support not having eo available -#if defined (EFL_BETA_API_SUPPORT) && defined(EFL_EO_API_SUPPORT) +#ifdef EFL_BETA_API_SUPPORT typedef Efl_Callback_Priority Evas_Callback_Priority; #else typedef short Evas_Callback_Priority; @@ -3490,21 +3490,9 @@ typedef unsigned int Efl_Input_Device_Type; #endif -#ifndef _EFL_H -#define _EFL_H -typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; -typedef struct tm Efl_Time; -#endif - #ifndef _EFL_TEXT_CURSOR_EO_H_ #define _EFL_TEXT_CURSOR_EO_H_ -#ifndef _EFL_TEXT_CURSOR_EO_CLASS_TYPE -#define _EFL_TEXT_CURSOR_EO_CLASS_TYPE -#endif -typedef Eo Efl_Text_Cursor; -typedef Eo Efl_Text_Cursor_Cursor; - #endif #ifndef _EFL_GFX_ENTITY_EO_H_ #define _EFL_GFX_ENTITY_EO_H_ diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h index a2c3e5c9e6..a4f611e201 100644 --- a/src/lib/evas/Evas_Eo.h +++ b/src/lib/evas/Evas_Eo.h @@ -2,8 +2,6 @@ # error You shall not include this header directly #endif -#ifdef EFL_EO_API_SUPPORT - #ifndef _EFL_CANVAS_VG_NODE_EO_CLASS_TYPE #define _EFL_CANVAS_VG_NODE_EO_CLASS_TYPE @@ -200,11 +198,6 @@ struct _Efl_Canvas_Object_Animation_Event #include "canvas/efl_canvas_animation_group_parallel.eo.h" #include "canvas/efl_canvas_animation_group_sequential.eo.h" #include "canvas/efl_canvas_animation_player.eo.h" - -#endif /* EFL_EO_API_SUPPORT */ - -#if defined(EFL_BETA_API_SUPPORT) && defined(EFL_EO_API_SUPPORT) - #include "canvas/efl_canvas_event_grabber.eo.h" /** @@ -418,17 +411,13 @@ typedef void (Evas_Canvas3D_Surface_Func)(Evas_Real *out_x, #include "canvas/evas_canvas3d_scene.eo.h" #include "canvas/efl_canvas_scene3d.eo.h" -#endif /* EFL_BETA_API_SUPPORT */ -#ifdef EFL_EO_API_SUPPORT #include "canvas/efl_canvas_image_internal.eo.h" #include "canvas/efl_canvas_image.eo.h" #include "canvas/efl_canvas_snapshot.eo.h" #include "canvas/efl_canvas_proxy.eo.h" #include "canvas/efl_gfx_mapping.eo.h" -#endif /* EFL_EO_API_SUPPORT */ -#if defined(EFL_BETA_API_SUPPORT) && defined(EFL_EO_API_SUPPORT) /** * @ingroup Evas_Object_VG * @@ -445,9 +434,7 @@ typedef void (Evas_Canvas3D_Surface_Func)(Evas_Real *out_x, #include "canvas/efl_canvas_vg_gradient.eo.h" #include "canvas/efl_canvas_vg_gradient_linear.eo.h" #include "canvas/efl_canvas_vg_gradient_radial.eo.h" -#endif /* EFL_BETA_API_SUPPORT */ -#ifdef EFL_EO_API_SUPPORT #include "canvas/efl_input_state.eo.h" #include "canvas/efl_input_event.eo.h" #include "canvas/efl_input_pointer.eo.h" @@ -455,9 +442,7 @@ typedef void (Evas_Canvas3D_Surface_Func)(Evas_Real *out_x, #include "canvas/efl_input_hold.eo.h" #include "canvas/efl_input_interface.eo.h" #include "canvas/efl_input_focus.eo.h" -#endif /* EFL_EO_API_SUPPORT */ -#ifdef EFL_EO_API_SUPPORT # include "gesture/efl_canvas_gesture_types.eot.h" # include "gesture/efl_canvas_gesture_touch.eo.h" # include "gesture/efl_canvas_gesture.eo.h" @@ -465,4 +450,3 @@ typedef void (Evas_Canvas3D_Surface_Func)(Evas_Real *out_x, # include "gesture/efl_canvas_gesture_long_tap.eo.h" # include "gesture/efl_canvas_gesture_recognizer.eo.h" # include "gesture/efl_canvas_gesture_manager.eo.h" -#endif /* EFL_EO_API_SUPPORT */ diff --git a/src/lib/evas/canvas/efl_canvas_event_grabber.eo b/src/lib/evas/canvas/efl_canvas_event_grabber.eo index ee9657a813..205f5fb573 100644 --- a/src/lib/evas/canvas/efl_canvas_event_grabber.eo +++ b/src/lib/evas/canvas/efl_canvas_event_grabber.eo @@ -15,8 +15,6 @@ class @beta Efl.Canvas.Event_Grabber extends Efl.Canvas.Group No child objects should be stacked above the event grabber parent while the grabber is visible. A critical error will be raised if this is detected. - - @since 1.20 ]] data: Efl_Object_Event_Grabber_Data; methods { diff --git a/src/lib/evas/canvas/efl_canvas_group.eo b/src/lib/evas/canvas/efl_canvas_group.eo index 3dcee10c00..503b2177f8 100644 --- a/src/lib/evas/canvas/efl_canvas_group.eo +++ b/src/lib/evas/canvas/efl_canvas_group.eo @@ -8,6 +8,8 @@ class Efl.Canvas.Group extends Efl.Canvas.Object sense that a standard widget may not have any empty slots for content. However it's still a group of low-level canvas objects (clipper, raw objects, etc.). + + @since 1.22 ]] data: Evas_Smart_Data; methods { diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo index 3f2bd0d2e7..9a5f89dbe8 100644 --- a/src/lib/evas/canvas/efl_canvas_object.eo +++ b/src/lib/evas/canvas/efl_canvas_object.eo @@ -10,13 +10,15 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Input.Interface, Efl.Gfx.Hint, Efl.Gfx.Mapping, Efl.Ui.I18n, Efl.Canvas.Pointer { - [[Efl canvas object abstract class]] + [[Efl canvas object abstract class + + @since 1.22 + ]] data: Evas_Object_Protected_Data; methods { @property pointer_mode_by_device @beta { [[Low-level pointer behaviour by device. See @.pointer_mode.get and @.pointer_mode.set for more explanation. - @since 1.19 ]] keys { dev: Efl.Input.Device; [[The pointer device to set/get the mode. Use $null for the default pointer.]] @@ -187,7 +189,6 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, @property seat_focus { [[ Check if this object is focused. - @since 1.19 ]] get { } @@ -197,7 +198,7 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, } /* FIXME Efl.Input.Device is not stable yet*/ seat_focus_check @beta { - [[ Check if this object is focused by a given seat @since 1.19 ]] + [[ Check if this object is focused by a given seat ]] params { @in seat: Efl.Input.Device; [[The seat to check if the object is focused. Use $null for the default seat.]] } @@ -212,8 +213,6 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, after the seat is added to the list this object will now be also focused by this new seat. Note: The old focus APIs still work, however they will only act on the default seat. - - @since 1.19 ]] params { @in seat: Efl.Input.Device; [[The seat that should be added to the focus list. Use $null for the default seat.]] @@ -223,8 +222,6 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, /* FIXME Efl.Input.Device is not stable yet*/ seat_focus_del @beta { [[ Remove a seat from the focus list. - - @since 1.19 ]] params { @in seat: Efl.Input.Device; [[The seat that should be removed from the focus list. Use $null for the default seat.]] @@ -367,8 +364,6 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, This can be different from @Efl.Object.parent because this one is used internally for rendering and the normal parent is what the user expects to be the parent. - - @since 1.18 ]] get { } @@ -452,8 +447,6 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, This flag can be used to avoid rendering visible clippers on the canvas, even if they currently don't clip any object. - - @since 1.15 ]] } set { @@ -472,8 +465,6 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, clippers. When hidden, all "no-render" objects will completely disappear from the canvas, and hide their clippees or be invisible when used as proxy sources. - - @since 1.15 ]] } values { diff --git a/src/lib/evas/canvas/efl_canvas_object_eo.legacy.c b/src/lib/evas/canvas/efl_canvas_object_eo.legacy.c index f6d9155d1d..034d8c1ece 100644 --- a/src/lib/evas/canvas/efl_canvas_object_eo.legacy.c +++ b/src/lib/evas/canvas/efl_canvas_object_eo.legacy.c @@ -101,14 +101,46 @@ evas_object_smart_parent_get(const Efl_Canvas_Object *obj) return efl_canvas_object_render_parent_get(obj); } -EAPI void -evas_object_paragraph_direction_set(Efl_Canvas_Object *obj, Efl_Text_Bidirectional_Type dir) +static inline Efl_Text_Bidirectional_Type +_evas_bidi_direction_type_to_efl_text_bidirectional_type(Evas_BiDi_Direction type) { - efl_canvas_object_paragraph_direction_set(obj, dir); + switch (type) + { +#define CONVERT_TYPE(TYPE) case EVAS_BIDI_DIRECTION_##TYPE: return EFL_TEXT_BIDIRECTIONAL_TYPE_##TYPE + CONVERT_TYPE(NATURAL); //Neutral text type, same as natural + CONVERT_TYPE(LTR); + CONVERT_TYPE(RTL); + CONVERT_TYPE(INHERIT); + default: break; + } + return EFL_TEXT_BIDIRECTIONAL_TYPE_NATURAL; +#undef CONVERT_TYPE } -EAPI Efl_Text_Bidirectional_Type +static inline Evas_BiDi_Direction +_efl_text_bidirectional_type_to_evas_bidi_direction_type(Efl_Text_Bidirectional_Type type) +{ + switch (type) + { +#define CONVERT_TYPE(TYPE) case EFL_TEXT_BIDIRECTIONAL_TYPE_##TYPE: return EVAS_BIDI_DIRECTION_##TYPE + CONVERT_TYPE(NATURAL); //Neutral text type, same as natural + CONVERT_TYPE(LTR); + CONVERT_TYPE(RTL); + CONVERT_TYPE(INHERIT); + default: break; + } + return EVAS_BIDI_DIRECTION_NATURAL; +#undef CONVERT_TYPE +} + +EAPI void +evas_object_paragraph_direction_set(Efl_Canvas_Object *obj, Evas_BiDi_Direction dir) +{ + efl_canvas_object_paragraph_direction_set(obj, _evas_bidi_direction_type_to_efl_text_bidirectional_type(dir)); +} + +EAPI Evas_BiDi_Direction evas_object_paragraph_direction_get(const Efl_Canvas_Object *obj) { - return efl_canvas_object_paragraph_direction_get(obj); + return _efl_text_bidirectional_type_to_evas_bidi_direction_type(efl_canvas_object_paragraph_direction_get(obj)); } diff --git a/src/lib/evas/canvas/efl_canvas_object_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_object_eo.legacy.h index f21d91fca0..b8cd72787f 100644 --- a/src/lib/evas/canvas/efl_canvas_object_eo.legacy.h +++ b/src/lib/evas/canvas/efl_canvas_object_eo.legacy.h @@ -373,7 +373,7 @@ EAPI Efl_Canvas_Object *evas_object_smart_parent_get(const Efl_Canvas_Object *ob * * @ingroup Evas_Object_Group */ -EAPI void evas_object_paragraph_direction_set(Efl_Canvas_Object *obj, Efl_Text_Bidirectional_Type dir); +EAPI void evas_object_paragraph_direction_set(Efl_Canvas_Object *obj, Evas_BiDi_Direction dir); /** * @brief This handles text paragraph direction of the given object. Even if @@ -387,7 +387,7 @@ EAPI void evas_object_paragraph_direction_set(Efl_Canvas_Object *obj, Efl_Text_B * * @ingroup Evas_Object_Group */ -EAPI Efl_Text_Bidirectional_Type evas_object_paragraph_direction_get(const Efl_Canvas_Object *obj); +EAPI Evas_BiDi_Direction evas_object_paragraph_direction_get(const Efl_Canvas_Object *obj); /** * @brief Test if any object is clipped by @c obj. diff --git a/src/lib/evas/canvas/efl_canvas_proxy.eo b/src/lib/evas/canvas/efl_canvas_proxy.eo index 5024d8feac..f13b07a5c0 100644 --- a/src/lib/evas/canvas/efl_canvas_proxy.eo +++ b/src/lib/evas/canvas/efl_canvas_proxy.eo @@ -40,8 +40,6 @@ class @beta Efl.Canvas.Proxy extends Efl.Canvas.Image_Internal and apply some sort of transformation on it. $true means both objects will share the same clip. - - @since 1.8 ]] set {} get {} @@ -60,8 +58,6 @@ class @beta Efl.Canvas.Proxy extends Efl.Canvas.Image_Internal If $source is $false, events occurring on $obj will be processed only on it. - - @since 1.8 ]] set {} get {} diff --git a/src/lib/evas/canvas/efl_canvas_scene3d.eo b/src/lib/evas/canvas/efl_canvas_scene3d.eo index 7d9095086e..8d506be64c 100644 --- a/src/lib/evas/canvas/efl_canvas_scene3d.eo +++ b/src/lib/evas/canvas/efl_canvas_scene3d.eo @@ -5,8 +5,6 @@ class @beta Efl.Canvas.Scene3d extends Efl.Canvas.Image_Internal methods { @property scene3d { [[The 3d scene to display in this view. - - @since 1.10 ]] set {} get {} diff --git a/src/lib/evas/canvas/efl_canvas_text.eo b/src/lib/evas/canvas/efl_canvas_text.eo index d6c350eef2..8e334cefb5 100644 --- a/src/lib/evas/canvas/efl_canvas_text.eo +++ b/src/lib/evas/canvas/efl_canvas_text.eo @@ -11,8 +11,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, methods { @property is_empty { [[Whether the object is empty (no text) or not - - @since 1.18 ]] get { } @@ -26,8 +24,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, The given $start and $end cursor act like out-variables here, as they are set to the positions of the start and the end of the visible range in the text, respectively. - - @since 1.18 ]] return: bool; [[$true on success, $false otherwise]] params { @@ -39,8 +35,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, [[Gets the left, right, top and bottom insets of the text. The inset is any applied padding on the text. - - @since 1.18 ]] get {} values { @@ -55,8 +49,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, segments. This is useful, for example, in the recipient fields of e-mail clients where bidi oddities can occur when mixing RTL and LTR. - - @since 1.18 ]] set {} get {} @@ -66,8 +58,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, } @property legacy_newline { [[When $true, newline character will behave as a paragraph separator. - - @since 1.18 ]] set {} get {} @@ -85,8 +75,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, first. Set $style to $NULL to delete it. - - @since 1.18 ]] set { } @@ -116,8 +104,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, "You shall not pass!" with no margins or padding and assuming a monospace font and a size of 7x10 char widths (for simplicity) has a native size of 19x1 and a formatted size of 5x4. - - @since 1.18 ]] get {} values { @@ -142,8 +128,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, "You shall not pass!" with no margins or padding and assuming a monospace font and a size of 7x10 char widths (for simplicity) has a native size of 19x1 and a formatted size of 5x4. - - @since 1.18 ]] get {} values { @@ -153,8 +137,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, } range_text_get @const { [[Returns the text in the range between $cur1 and $cur2. - - @since 1.18 ]] return: mstring @owned; [[The text in the given range]] params { @@ -167,8 +149,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, The geometry is represented as rectangles for each of the line segments in the given range [$cur1, $cur2]. - - @since 1.19 ]] params { @cref cur1: Efl.Text_Cursor_Cursor; [[Start of range]] @@ -184,8 +164,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, The geometry is the geometry in which rectangles in middle lines of range are merged into one big rectangle. This is an optimized version of @.range_geometry_get. - - @since 1.19 ]] params { @cref cur1: Efl.Text_Cursor_Cursor; [[Start of range]] @@ -212,8 +190,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, The textblock does the layout of the text according to the position of the obstacle. - - @since 1.18 ]] params { @in eo_obs: Efl.Canvas.Object; [[Obstacle object]] @@ -222,8 +198,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, } obstacle_del { [[Removes $eo_obs from observation during text layout. - - @since 1.18 ]] params { @in eo_obs: Efl.Canvas.Object; [[Obstacle object]] @@ -242,8 +216,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, differrent coordinates relative to the textblock, you need to call this so it will consider this new state and will relayout the text. - - @since 1.18 ]] } async_layout { @@ -251,8 +223,6 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, Once layout is complete, the result is returned as @Eina.Rect, with w, h fields set. - - @since 1.21 ]] return: future @owned; [[Future for layout result]] } diff --git a/src/lib/evas/canvas/efl_canvas_text_factory.eo b/src/lib/evas/canvas/efl_canvas_text_factory.eo index a86295cf46..51ca68b92b 100644 --- a/src/lib/evas/canvas/efl_canvas_text_factory.eo +++ b/src/lib/evas/canvas/efl_canvas_text_factory.eo @@ -7,8 +7,6 @@ interface @beta Efl.Canvas.Text_Factory decided by the inheriting class, whether it is by treating the $key as an image path, or a key associated with a real-path in a hashtable or something else entirely. - - @since 1.21 ]] methods { create { diff --git a/src/lib/evas/canvas/efl_canvas_vg_node.eo b/src/lib/evas/canvas/efl_canvas_vg_node.eo index 27be5003f0..641cda1c11 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_node.eo +++ b/src/lib/evas/canvas/efl_canvas_vg_node.eo @@ -9,13 +9,11 @@ abstract @beta Efl.Canvas.Vg.Node extends Efl.Object implements Efl.Gfx.Entity, [[Sets the transformation matrix to be used for this node object. Note: Pass $null to cancel the applied transformation. - - @since 1.14]] + ]] } get { [[Gets the transformation matrix used for this node object. - - @since 1.14]] + ]] } values { @cref m: Eina.Matrix3; [[Transformation matrix.]] @@ -26,13 +24,11 @@ abstract @beta Efl.Canvas.Vg.Node extends Efl.Object implements Efl.Gfx.Entity, [[Sets the origin position of the node object. This origin position affects node transformation. - - @since 1.14]] + ]] } get { [[Gets the origin position of the node object. - - @since 1.14]] + ]] } values { x: double; [[$origin x position.]] diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c index b44e5cdb10..aaa732e4e3 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_object.c +++ b/src/lib/evas/canvas/efl_canvas_vg_object.c @@ -257,7 +257,7 @@ _efl_canvas_vg_object_efl_file_file_set(Eo *eo_obj, Efl_Canvas_Vg_Object_Data *p int pl = pname ? strlen(pname) : 0; int cl = file ? strlen(file) : 0; - if ((pl != cl) || strcmp(pname, file)) + if ((pl != cl) || (pname && file && strcmp(pname, file))) { Evas_Object_Protected_Data *obj; obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.eo b/src/lib/evas/canvas/efl_canvas_vg_object.eo index ca7134fec1..12411eab37 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_object.eo +++ b/src/lib/evas/canvas/efl_canvas_vg_object.eo @@ -54,7 +54,7 @@ class @beta Efl.Canvas.Vg.Object extends Efl.Canvas.Object implements Efl.File, @property root_node { get { [[Get the root node of the evas_object_vg. - @since 1.14]] + ]] } set { [[Set the root node of the evas_object_vg. diff --git a/src/lib/evas/canvas/efl_gfx_mapping.eo b/src/lib/evas/canvas/efl_gfx_mapping.eo index 0ca0d33a81..f3ac8c3843 100644 --- a/src/lib/evas/canvas/efl_gfx_mapping.eo +++ b/src/lib/evas/canvas/efl_gfx_mapping.eo @@ -14,7 +14,7 @@ mixin Efl.Gfx.Mapping requires Efl.Object At the moment of writing, maps can only have 4 points (no more, no less). - @since 1.20 + @since 1.22 ]] methods { mapping_has { diff --git a/src/lib/evas/canvas/efl_input_event.eo b/src/lib/evas/canvas/efl_input_event.eo index 91fc56da3c..95f2db6575 100644 --- a/src/lib/evas/canvas/efl_input_event.eo +++ b/src/lib/evas/canvas/efl_input_event.eo @@ -7,8 +7,6 @@ mixin @beta Efl.Input.Event requires Efl.Object extends Efl.Duplicate Note: Most Efl Events do not carry Efl Objects, rather simple data structures. This class is intended to carry more complex event data, such as pointer events. - - @since 1.19 ]] eo_prefix: efl_input; data: null; diff --git a/src/lib/evas/canvas/efl_input_focus.eo b/src/lib/evas/canvas/efl_input_focus.eo index d15685a339..eacc99fc79 100644 --- a/src/lib/evas/canvas/efl_input_focus.eo +++ b/src/lib/evas/canvas/efl_input_focus.eo @@ -1,6 +1,9 @@ class Efl.Input.Focus extends Efl.Object implements Efl.Input.Event { - [[Represents a focus event. @since 1.19]] + [[Represents a focus event. + + @since 1.22 + ]] methods { @property object { [[The focused object]] diff --git a/src/lib/evas/canvas/efl_input_interface.eo b/src/lib/evas/canvas/efl_input_interface.eo index 4065dd6ef9..8d64f406f7 100644 --- a/src/lib/evas/canvas/efl_input_interface.eo +++ b/src/lib/evas/canvas/efl_input_interface.eo @@ -18,8 +18,6 @@ interface @beta Efl.Input.Interface A "key" is a key press from a keyboard or equivalent type of input device. Long, repeated, key presses will always happen like this: down...up,down...up,down...up (not down...up or down...down...down...up). - - @since 1.19 ]] eo_prefix: efl_input; event_prefix: efl; diff --git a/src/lib/evas/canvas/efl_input_key.eo b/src/lib/evas/canvas/efl_input_key.eo index f79db973c0..2f549f79af 100644 --- a/src/lib/evas/canvas/efl_input_key.eo +++ b/src/lib/evas/canvas/efl_input_key.eo @@ -1,8 +1,6 @@ class @beta Efl.Input.Key extends Efl.Object implements Efl.Input.Event, Efl.Input.State { [[Represents a single key event from a keyboard or similar device. - - @since 1.18 ]] methods { @property pressed { diff --git a/src/lib/evas/canvas/efl_input_pointer.eo b/src/lib/evas/canvas/efl_input_pointer.eo index d7edc6a81e..852c3b143c 100644 --- a/src/lib/evas/canvas/efl_input_pointer.eo +++ b/src/lib/evas/canvas/efl_input_pointer.eo @@ -3,8 +3,6 @@ import efl_input_types; class @beta Efl.Input.Pointer extends Efl.Object implements Efl.Input.Event, Efl.Input.State { [[Event data carried over with any pointer event (mouse, touch, pen, ...) - - @since 1.18 ]] methods { @property action { diff --git a/src/lib/evas/canvas/efl_input_state.eo b/src/lib/evas/canvas/efl_input_state.eo index 6aa88e37e0..08f0623608 100644 --- a/src/lib/evas/canvas/efl_input_state.eo +++ b/src/lib/evas/canvas/efl_input_state.eo @@ -2,7 +2,10 @@ import efl_input_types; interface Efl.Input.State { - [[Efl input state interface]] + [[Efl input state interface. + + @since 1.22 + ]] eo_prefix: efl_input; methods { /* FIXME Efl.Input.Device is not stable yet*/ diff --git a/src/lib/evas/canvas/evas_canvas3d_node.c b/src/lib/evas/canvas/evas_canvas3d_node.c index f80395f362..98492fa502 100644 --- a/src/lib/evas/canvas/evas_canvas3d_node.c +++ b/src/lib/evas/canvas/evas_canvas3d_node.c @@ -1,3 +1,4 @@ +#include "eo_internal.h" #include "evas_common_private.h" #include "evas_private.h" #include "evas_canvas3d_node_callback.h" @@ -1047,6 +1048,7 @@ _evas_canvas3d_node_efl_object_finalize(Eo *obj, Evas_Canvas3D_Node_Data *pd) EOLIAN static Efl_Object * _evas_canvas3d_node_efl_object_constructor(Eo *obj, Evas_Canvas3D_Node_Data *pd) { + efl_constructor(efl_super(obj, MY_CLASS)); evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_NODE); eina_vector3_set(&pd->position, 0.0, 0.0, 0.0); diff --git a/src/lib/evas/canvas/evas_canvas3d_scene.c b/src/lib/evas/canvas/evas_canvas3d_scene.c index a11848326b..725996ee96 100644 --- a/src/lib/evas/canvas/evas_canvas3d_scene.c +++ b/src/lib/evas/canvas/evas_canvas3d_scene.c @@ -1,3 +1,4 @@ +#include "eo_internal.h" #include "evas_common_private.h" #include "evas_private.h" diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c index 3678d4aa82..809c24f72a 100644 --- a/src/lib/evas/canvas/evas_clip.c +++ b/src/lib/evas/canvas/evas_clip.c @@ -289,7 +289,8 @@ _efl_canvas_object_clipper_unset_common(Evas_Object_Protected_Data *obj, Eina_Bo if (((clip->cur) && (clip->cur->visible)) && (((clip->cur->color.r != 255) || (clip->cur->color.g != 255) || (clip->cur->color.b != 255) || (clip->cur->color.a != 255)) || - (clip->mask->is_mask))) + (clip->mask->is_mask)) && + efl_alive_get(clip->object)) { if (clip->layer) { diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c index 0d6319457c..660f657158 100644 --- a/src/lib/evas/canvas/evas_device.c +++ b/src/lib/evas/canvas/evas_device.c @@ -533,7 +533,9 @@ _evas_canvas_efl_canvas_scene_pointer_position_get(const Eo *eo_e, Evas_Public_D Eina_Iterator *it; Eo *child; - if (pos) *pos = EINA_POSITION2D(0, 0); + if (!pos) return EINA_FALSE; + + *pos = EINA_POSITION2D(0, 0); if (!e->default_seat) return EINA_FALSE; if (!seat) { @@ -548,6 +550,7 @@ _evas_canvas_efl_canvas_scene_pointer_position_get(const Eo *eo_e, Evas_Public_D break; if (child) *pos = efl_input_pointer_position_get(child); + eina_iterator_free(it); return !!child; } diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c index 2a7c017fda..bff66c81d9 100644 --- a/src/lib/evas/canvas/evas_events.c +++ b/src/lib/evas/canvas/evas_events.c @@ -3743,6 +3743,12 @@ _efl_canvas_object_efl_object_event_thaw(Eo *obj, Evas_Object_Protected_Data *pd EAPI void evas_object_freeze_events_set(Eo *eo_obj, Eina_Bool freeze) { + Evas_Object_Protected_Data *pd = EVAS_OBJECT_DATA_SAFE_GET(eo_obj); + EINA_SAFETY_ON_NULL_RETURN(pd); + + freeze = !!freeze; + if (pd->freeze_events == freeze) return; + if (freeze) efl_event_freeze(eo_obj); else diff --git a/src/lib/evas/canvas/evas_object_inform.c b/src/lib/evas/canvas/evas_object_inform.c index f13b3bfbae..7422d3634e 100644 --- a/src/lib/evas/canvas/evas_object_inform.c +++ b/src/lib/evas/canvas/evas_object_inform.c @@ -15,8 +15,9 @@ void evas_object_inform_call_show(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { int event_id = _evas_object_event_new(); + Eina_Bool vis = EINA_TRUE; - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_SHOW, (void*)1, event_id, EFL_GFX_ENTITY_EVENT_SHOW); + evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_SHOW, &vis, event_id, EFL_GFX_ENTITY_EVENT_SHOW); _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id); } @@ -24,8 +25,9 @@ void evas_object_inform_call_hide(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { int event_id = _evas_object_event_new(); + Eina_Bool vis = EINA_FALSE; - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HIDE, NULL, event_id, EFL_GFX_ENTITY_EVENT_HIDE); + evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HIDE, &vis, event_id, EFL_GFX_ENTITY_EVENT_HIDE); _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id); } diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 289b61a878..3e5cba9771 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -1,5 +1,6 @@ #define EFL_CANVAS_GROUP_PROTECTED +#include "eo_internal.h" #include "evas_common_private.h" #include "evas_private.h" diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index b476ff2930..e1891fc890 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -3600,6 +3600,7 @@ evas_render_updates_internal(Evas *eo_e, if (out->output) ENFN->output_flush(ENC, out->output, EVAS_RENDER_MODE_SYNC); _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_FLUSH_POST, NULL); + _deferred_callbacks_process(eo_e, evas); eina_evlog("-render_output_flush", eo_e, 0.0, NULL); } } diff --git a/src/lib/evas/meson.build b/src/lib/evas/meson.build index 1b306c363e..df5f585f5e 100644 --- a/src/lib/evas/meson.build +++ b/src/lib/evas/meson.build @@ -202,9 +202,11 @@ evas_pre_lib_dep = declare_dependency( dependencies: [evas_deps, m, draw, valgrind, libunibreak] ) -install_data(pub_evas_eo_files + pub_evas_eot_files, - install_dir: join_paths(eolian_include_dir, package_version_name) -) +if get_option('install-eo-files') + install_data(pub_evas_eo_files + pub_evas_eot_files, + install_dir: join_paths(eolian_include_dir, package_version_name) + ) +endif install_headers(evas_header_src, install_dir : dir_package_include, diff --git a/src/lib/evil/evil_fcntl.c b/src/lib/evil/evil_fcntl.c index df79c3605f..26d596a030 100644 --- a/src/lib/evil/evil_fcntl.c +++ b/src/lib/evil/evil_fcntl.c @@ -18,8 +18,8 @@ _is_socket(SOCKET s) fd_set rfds; struct timeval tv; - tv.tv_sec = 0.00000001; - tv.tv_usec = 0; + tv.tv_sec = 0; + tv.tv_usec = 100; FD_ZERO(&rfds); FD_SET(s, &rfds); diff --git a/src/lib/evil/evil_stdlib.c b/src/lib/evil/evil_stdlib.c index dbb9779ee4..b03625a24d 100644 --- a/src/lib/evil/evil_stdlib.c +++ b/src/lib/evil/evil_stdlib.c @@ -192,12 +192,6 @@ mkstemps(char *__template, int suffixlen) return -1; } -int -mkstemp(char *__template) -{ - return mkstemps(__template, 0); -} - char * realpath(const char *file_name, char *resolved_name) { diff --git a/src/lib/evil/evil_stdlib.h b/src/lib/evil/evil_stdlib.h index 316347abdd..6e0b27cdda 100644 --- a/src/lib/evil/evil_stdlib.h +++ b/src/lib/evil/evil_stdlib.h @@ -67,38 +67,6 @@ EAPI int unsetenv(const char *name); * */ -/** - * @brief Create a unique temporary file name. - * - * @param __template Template of the file to create. - * @return A file descriptor on success, -1 otherwise. - * - * Take the given file name @p template and overwrite a portion of it - * to create a file name. This file is guaranted not to exist at the - * time invocation and is suitable for use by the function. - * - * The @p template parameter can be any file name with six X's at the end - * for example @em baseXXXXXX, where @em base is the part of the new file - * that you supply and each 'X' is a placeholder for a character supplied - * by mkstemp(). The trailing 'Xs' are replaced with a six-digit value; - * this value is a unique number. Each successful call to mkstemp() - * modifies @p template. - * - * When mkstemp() succeeds, it creates and opens the temporary file for - * reading and writing. - * - * On success, the function returns the file descriptor of the - * temporary file. Otherwise, it returns -1 and errno is set to the - * following values: - * - EINVAL: @p template has an invalid format. - * - EEXISTS: File name already exists. - * - * Conformity: Should follow BSD conformity. - * - * Supported OS: Windows XP. - */ -EAPI int mkstemp(char *__template); - /** * @brief create an unique temporary directory * diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index 5668b416d1..c60293cb40 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -231,92 +231,52 @@ static void _drm_rotation_do(Ecore_Evas *ee, int rotation, int resize) { Evas_Engine_Info_Drm *einfo; - Ecore_Evas_Engine_Drm_Data *edata; - Eina_Bool use_hw = EINA_FALSE; - int diff, rotations = 0, orient = 0; - - if (ee->rotation == rotation) return; + int diff; einfo = (Evas_Engine_Info_Drm *)evas_engine_info_get(ee->evas); if (!einfo) return; - edata = ee->engine.data; - - rotations = ecore_drm2_output_supported_rotations_get(edata->output); - if (rotations >= 0) - { - if (rotations & ECORE_DRM2_ROTATION_NORMAL) - { - if (rotation == 0) - { - use_hw = EINA_TRUE; - orient = ECORE_DRM2_ROTATION_NORMAL; - } - } - - if (rotations & ECORE_DRM2_ROTATION_90) - { - if (rotation == 90) - { - use_hw = EINA_TRUE; - orient = ECORE_DRM2_ROTATION_90; - } - } - - if (rotations & ECORE_DRM2_ROTATION_180) - { - if (rotation == 180) - { - use_hw = EINA_TRUE; - orient = ECORE_DRM2_ROTATION_180; - } - } - - if (rotations & ECORE_DRM2_ROTATION_270) - { - if (rotation == 270) - { - use_hw = EINA_TRUE; - orient = ECORE_DRM2_ROTATION_270; - } - } - } - - if (use_hw) - { - ecore_drm2_output_rotation_set(edata->output, orient); - ee->rotation = rotation; - return; - } - - einfo->info.rotation = rotation; - if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) - ERR("evas_engine_info_set() for engine '%s' failed", ee->driver); - diff = ee->rotation - rotation; if (diff < 0) diff = -diff; + einfo->info.rotation = rotation; + if (diff != 180) { + if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) + ERR("evas_engine_info_set() for engine '%s' failed", ee->driver); + if (!resize) { - int ww, hh; - - if (ECORE_EVAS_PORTRAIT(ee)) + if (!ee->prop.fullscreen) + { + ee->expecting_resize.w = ee->h; + ee->expecting_resize.h = ee->w; + evas_output_size_set(ee->evas, ee->req.h, ee->req.w); + evas_output_viewport_set(ee->evas, 0, 0, ee->req.h, ee->req.w); + } + else + { + if (PORTRAIT_CHECK(rotation)) + { + evas_output_size_set(ee->evas, ee->req.w, ee->req.h); + evas_output_viewport_set(ee->evas, 0, 0, ee->req.w, ee->req.h); + } + else + { + evas_output_size_set(ee->evas, ee->req.h, ee->req.w); + evas_output_viewport_set(ee->evas, 0, 0, ee->req.h, ee->req.w); + } + if (ee->func.fn_resize) ee->func.fn_resize(ee); + } + if (PORTRAIT_CHECK(rotation)) evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h); else evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.h, ee->req.w); - - ww = ee->h; - hh = ee->w; - ee->w = ww; - ee->h = hh; - ee->req.w = ww; - ee->req.h = hh; } else { - if ((rotation == 0) || (rotation == 180)) + if (PORTRAIT_CHECK(rotation)) { evas_output_size_set(ee->evas, ee->w, ee->h); evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); @@ -326,17 +286,25 @@ _drm_rotation_do(Ecore_Evas *ee, int rotation, int resize) evas_output_size_set(ee->evas, ee->h, ee->w); evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w); } + if (ee->func.fn_resize) ee->func.fn_resize(ee); + if (PORTRAIT_CHECK(rotation)) + evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); + else + evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w); } + ee->rotation = rotation; } - - ee->rotation = rotation; - - if (ee->func.fn_resize) ee->func.fn_resize(ee); - - if (ECORE_EVAS_PORTRAIT(ee)) - evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); else - evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w); + { + if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) + ERR("evas_engine_info_set() for engine '%s' failed", ee->driver); + ee->rotation = rotation; + if (ee->func.fn_resize) ee->func.fn_resize(ee); + if (PORTRAIT_CHECK(rotation)) + evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); + else + evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w); + } } static void diff --git a/src/modules/ethumb/emotion/emotion.c b/src/modules/ethumb/emotion/emotion.c index b80b33b8e5..bc343df802 100644 --- a/src/modules/ethumb/emotion/emotion.c +++ b/src/modules/ethumb/emotion/emotion.c @@ -1,7 +1,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" #else -#define EFL_EO_API_SUPPORT #define EFL_BETA_API_SUPPORT #endif diff --git a/src/modules/evas/engines/drm/evas_engine.c b/src/modules/evas/engines/drm/evas_engine.c index 63719018ec..8e9eb67773 100644 --- a/src/modules/evas/engines/drm/evas_engine.c +++ b/src/modules/evas/engines/drm/evas_engine.c @@ -38,13 +38,13 @@ eng_output_setup(void *engine, void *einfo, unsigned int w, unsigned int h) _outbuf_rotation_get, _outbuf_reconfigure, NULL, - NULL, + _outbuf_damage_region_set, _outbuf_update_region_new, _outbuf_update_region_push, NULL, NULL, _outbuf_flush, - _outbuf_redraws_clear, + NULL, _outbuf_free, ob->w, ob->h)) goto init_err; @@ -70,33 +70,16 @@ eng_output_info_setup(void *info) einfo->render_mode = EVAS_RENDER_MODE_BLOCKING; } -static void -eng_output_resize(void *engine EINA_UNUSED, void *data, int w, int h) +static int +eng_output_update(void *engine EINA_UNUSED, void *data, void *einfo, unsigned int w, unsigned int h) { Render_Engine *re = data; Evas_Engine_Info_Drm *info; - info = re->generic.ob->info; - if (!info) return; - + info = (Evas_Engine_Info_Drm *)einfo; _outbuf_reconfigure(re->generic.ob, w, h, info->info.rotation, info->info.depth); - evas_common_tilebuf_free(re->generic.tb); - if ((re->generic.tb = evas_common_tilebuf_new(w, h))) - evas_common_tilebuf_set_tile_size(re->generic.tb, TILESIZE, TILESIZE); - - re->generic.w = w; - re->generic.h = h; -} - -static int -eng_output_update(void *engine, void *data, void *einfo EINA_UNUSED, unsigned int w, unsigned int h) -{ - Render_Engine *re = data; - - eng_output_resize(engine, data, w, h); - evas_render_engine_software_generic_update(&re->generic, re->generic.ob, w, h); @@ -251,7 +234,6 @@ module_open(Evas_Module *em) ORD(output_setup); ORD(output_update); ORD(output_free); - ORD(output_resize); ORD(image_plane_assign); ORD(image_plane_release); diff --git a/src/modules/evas/engines/drm/evas_engine.h b/src/modules/evas/engines/drm/evas_engine.h index ea8a6cec03..0afb1e3109 100644 --- a/src/modules/evas/engines/drm/evas_engine.h +++ b/src/modules/evas/engines/drm/evas_engine.h @@ -82,6 +82,7 @@ Render_Output_Swap_Mode _outbuf_state_get(Outbuf *ob); void *_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); void _outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); void _outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer_damage, Evas_Render_Mode render_mode); -void _outbuf_redraws_clear(Outbuf *ob); +void _outbuf_damage_region_set(Outbuf *ob, Tilebuf_Rect *damage); +void _outbuf_idle_flush(Outbuf *ob); #endif diff --git a/src/modules/evas/engines/drm/evas_outbuf.c b/src/modules/evas/engines/drm/evas_outbuf.c index f53f9683db..1f22ae7faa 100644 --- a/src/modules/evas/engines/drm/evas_outbuf.c +++ b/src/modules/evas/engines/drm/evas_outbuf.c @@ -8,26 +8,6 @@ #define MAX_BUFFERS 10 #define QUEUE_TRIM_DURATION 100 -static void -_outbuf_buffer_swap(Outbuf *ob, Eina_Rectangle *rects, unsigned int count) -{ - /* Ecore_Drm2_Plane *plane; */ - Outbuf_Fb *ofb; - - ofb = ob->priv.draw; - if (!ofb) return; - - ecore_drm2_fb_dirty(ofb->fb, rects, count); - - if (!ob->priv.plane) - ob->priv.plane = ecore_drm2_plane_assign(ob->priv.output, ofb->fb, 0, 0); - else ecore_drm2_plane_fb_set(ob->priv.plane, ofb->fb); - - ecore_drm2_fb_flip(ofb->fb, ob->priv.output); - ofb->drawn = EINA_TRUE; - ofb->age = 0; -} - static Outbuf_Fb * _outbuf_fb_create(Outbuf *ob, int w, int h) { @@ -65,6 +45,126 @@ _outbuf_fb_destroy(Outbuf_Fb *ofb) free(ofb); } +static Outbuf_Fb * +_outbuf_fb_wait(Outbuf *ob) +{ + Eina_List *l; + Outbuf_Fb *ofb, *best = NULL; + int best_age = -1, num_required = 1, num_allocated = 0; + + /* We pick the oldest available buffer to avoid using the same two + * repeatedly and then having the third be stale when we need it + */ + EINA_LIST_FOREACH(ob->priv.fb_list, l, ofb) + { + num_allocated++; + if (ecore_drm2_fb_busy_get(ofb->fb)) + { + num_required++; + continue; + } + if (ofb->valid && (ofb->age > best_age)) + { + best = ofb; + best_age = best->age; + } + } + + if (num_required < num_allocated) + ob->priv.unused_duration++; + else + ob->priv.unused_duration = 0; + + /* If we've had unused buffers for longer than QUEUE_TRIM_DURATION, then + * destroy the oldest buffer (currently in best) and recursively call + * ourself to get the next oldest. + */ + if (best && (ob->priv.unused_duration > QUEUE_TRIM_DURATION)) + { + ob->priv.unused_duration = 0; + ob->priv.fb_list = eina_list_remove(ob->priv.fb_list, best); + _outbuf_fb_destroy(best); + best = _outbuf_fb_wait(ob); + } + + return best; +} + +static Outbuf_Fb * +_outbuf_fb_assign(Outbuf *ob) +{ + int fw = 0, fh = 0; + Outbuf_Fb *ofb; + Eina_List *l; + + ob->priv.draw = _outbuf_fb_wait(ob); + if (!ob->priv.draw) + { + EINA_SAFETY_ON_TRUE_RETURN_VAL(eina_list_count(ob->priv.fb_list) >= MAX_BUFFERS, NULL); + + if ((ob->rotation == 0) || (ob->rotation == 180)) + { + fw = ob->w; + fh = ob->h; + } + else if ((ob->rotation == 90) || (ob->rotation == 270)) + { + fw = ob->h; + fh = ob->w; + } + ob->priv.draw = _outbuf_fb_create(ob, fw, fh); + if (ob->priv.draw) + ob->priv.fb_list = eina_list_append(ob->priv.fb_list, ob->priv.draw); + } + + while (!ob->priv.draw) + { + ecore_drm2_fb_release(ob->priv.output, EINA_TRUE); + ob->priv.draw = _outbuf_fb_wait(ob); + } + + EINA_LIST_FOREACH(ob->priv.fb_list, l, ofb) + { + if ((ofb->valid) && (ofb->drawn)) + { + ofb->age++; + if (ofb->age > 4) + { + ofb->age = 0; + ofb->drawn = EINA_FALSE; + } + } + } + + return ob->priv.draw; +} + +static void +_outbuf_buffer_swap(Outbuf *ob) +{ + Outbuf_Fb *ofb; + + ofb = ob->priv.draw; + if (!ofb) + { + ecore_drm2_fb_release(ob->priv.output, EINA_TRUE); + ofb = _outbuf_fb_assign(ob); + if (!ofb) + { + ERR("Could not assign front buffer"); + return; + } + } + + if (!ob->priv.plane) + ob->priv.plane = ecore_drm2_plane_assign(ob->priv.output, ofb->fb, 0, 0); + else ecore_drm2_plane_fb_set(ob->priv.plane, ofb->fb); + + ecore_drm2_fb_flip(ofb->fb, ob->priv.output); + ofb->drawn = EINA_TRUE; + ofb->age = 0; +} + Outbuf * _outbuf_setup(Evas_Engine_Info_Drm *info, int w, int h) { @@ -128,7 +228,6 @@ _outbuf_rotation_get(Outbuf *ob) void _outbuf_reconfigure(Outbuf *ob, int w, int h, int rotation, Outbuf_Depth depth) { - Outbuf_Fb *ofb; unsigned int format = DRM_FORMAT_ARGB8888; switch (depth) @@ -181,104 +280,7 @@ _outbuf_reconfigure(Outbuf *ob, int w, int h, int rotation, Outbuf_Depth depth) ob->rotation = rotation; ob->priv.unused_duration = 0; - EINA_LIST_FREE(ob->priv.fb_list, ofb) - _outbuf_fb_destroy(ofb); - - /* TODO: idle flush */ -} - -static Outbuf_Fb * -_outbuf_fb_wait(Outbuf *ob) -{ - Eina_List *l; - Outbuf_Fb *ofb, *best = NULL; - int best_age = -1, num_required = 1, num_allocated = 0; - - /* We pick the oldest available buffer to avoid using the same two - * repeatedly and then having the third be stale when we need it - */ - EINA_LIST_FOREACH(ob->priv.fb_list, l, ofb) - { - num_allocated++; - if (ecore_drm2_fb_busy_get(ofb->fb)) - { - num_required++; - continue; - } - if (ofb->valid && (ofb->age > best_age)) - { - best = ofb; - best_age = best->age; - } - } - - if (num_required < num_allocated) - ob->priv.unused_duration++; - else - ob->priv.unused_duration = 0; - - /* If we've had unused buffers for longer than QUEUE_TRIM_DURATION, then - * destroy the oldest buffer (currently in best) and recursively call - * ourself to get the next oldest. - */ - if (best && (ob->priv.unused_duration > QUEUE_TRIM_DURATION)) - { - ob->priv.unused_duration = 0; - ob->priv.fb_list = eina_list_remove(ob->priv.fb_list, best); - _outbuf_fb_destroy(best); - best = _outbuf_fb_wait(ob); - } - - return best; -} - -static Eina_Bool -_outbuf_fb_assign(Outbuf *ob) -{ - int fw = 0, fh = 0; - Outbuf_Fb *ofb; - Eina_List *l; - - ob->priv.draw = _outbuf_fb_wait(ob); - if (!ob->priv.draw) - { - EINA_SAFETY_ON_TRUE_RETURN_VAL(eina_list_count(ob->priv.fb_list) >= MAX_BUFFERS, EINA_FALSE); - - if ((ob->rotation == 0) || (ob->rotation == 180)) - { - fw = ob->w; - fh = ob->h; - } - else if ((ob->rotation == 90) || (ob->rotation == 270)) - { - fw = ob->h; - fh = ob->w; - } - ob->priv.draw = _outbuf_fb_create(ob, fw, fh); - if (ob->priv.draw) - ob->priv.fb_list = eina_list_append(ob->priv.fb_list, ob->priv.draw); - } - - while (!ob->priv.draw) - { - ecore_drm2_fb_release(ob->priv.output, EINA_TRUE); - ob->priv.draw = _outbuf_fb_wait(ob); - } - - EINA_LIST_FOREACH(ob->priv.fb_list, l, ofb) - { - if ((ofb->valid) && (ofb->drawn)) - { - ofb->age++; - if (ofb->age > 4) - { - ofb->age = 0; - ofb->drawn = EINA_FALSE; - } - } - } - - return EINA_TRUE; + _outbuf_idle_flush(ob); } Render_Output_Swap_Mode @@ -286,7 +288,7 @@ _outbuf_state_get(Outbuf *ob) { int age; - if (!_outbuf_fb_assign(ob)) return MODE_FULL; + if (!ob->priv.draw) return MODE_FULL; age = ob->priv.draw->age; if (age > 4) return MODE_FULL; @@ -538,14 +540,55 @@ _outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage EINA_UNUSED, Tilebuf_Rect i++; } + + _outbuf_buffer_swap(ob); } void -_outbuf_redraws_clear(Outbuf *ob) +_outbuf_damage_region_set(Outbuf *ob, Tilebuf_Rect *damage) { - if (!ob->priv.rect_count) return; + Tilebuf_Rect *tr; + Eina_Rectangle *rects; + Ecore_Drm2_Fb *fb; + int count, i = 0; - _outbuf_buffer_swap(ob, ob->priv.rects, ob->priv.rect_count); - free(ob->priv.rects); - ob->priv.rect_count = 0; + if (!ob->priv.draw) return; + + fb = ob->priv.draw->fb; + + count = eina_inlist_count(EINA_INLIST_GET(damage)); + rects = alloca(count * sizeof(Eina_Rectangle)); + + EINA_INLIST_FOREACH(damage, tr) + { + rects[i].x = tr->x; + rects[i].y = tr->y; + rects[i].w = tr->w; + rects[i].h = tr->h; + i++; + } + + ecore_drm2_fb_dirty(fb, rects, count); +} + +void +_outbuf_idle_flush(Outbuf *ob) +{ + while (ob->priv.pending) + { + RGBA_Image *img; + Eina_Rectangle *rect; + + img = ob->priv.pending->data; + ob->priv.pending = + eina_list_remove_list(ob->priv.pending, ob->priv.pending); + + rect = img->extended_info; + + evas_cache_image_drop(&img->cache_entry); + + eina_rectangle_free(rect); + } + + while (ecore_drm2_fb_release(ob->priv.output, EINA_TRUE)); } diff --git a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h index a7effafde0..56a0cf3cad 100644 --- a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h +++ b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h @@ -165,4 +165,20 @@ gl_generic_any_output_get(Render_Engine_GL_Generic *engine) return NULL; } +static inline Render_Output_GL_Generic * +gl_generic_output_find(Render_Engine_GL_Generic *engine) +{ + Render_Output_GL_Generic *output; + Eina_List *l; + + EINA_LIST_FOREACH(engine->software.outputs, l, output) + { + if (!output->software.ob) continue; + return output; + } + + return NULL; +} + + #endif diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index 96b0e41a94..2659498611 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -627,6 +627,7 @@ eng_image_size_set(void *engine, void *image, int w, int h) Evas_GL_Image *im_old; if (!im) return NULL; + gl_context = gl_generic_context_find(engine, 1); if (im->native.data) { im->w = w; @@ -634,7 +635,6 @@ eng_image_size_set(void *engine, void *image, int w, int h) evas_gl_common_image_native_enable(im); return image; } - gl_context = gl_generic_context_find(engine, 1); if ((im->tex) && (im->tex->pt->dyn.img)) { evas_gl_common_texture_free(im->tex, EINA_TRUE); @@ -2306,7 +2306,7 @@ eng_renderer_3d_get(void *output) static void * eng_drawable_new(void *engine, int w, int h, int alpha) { - eng_context_3d_use(engine); + eng_context_3d_use(gl_generic_output_find(engine)); #ifdef GL_GLES return e3d_drawable_new(w, h, alpha, GL_DEPTH_STENCIL_OES, GL_NONE); #else @@ -2317,7 +2317,7 @@ eng_drawable_new(void *engine, int w, int h, int alpha) static void eng_drawable_free(void *engine, void *drawable) { - eng_context_3d_use(engine); + eng_context_3d_use(gl_generic_output_find(engine)); e3d_drawable_free(drawable); } @@ -2349,7 +2349,7 @@ eng_image_drawable_set(void *engine, void *image, void *drawable) } static void -eng_drawable_scene_render(void *engine EINA_UNUSED, void *data, void *drawable, void *scene_data) +eng_drawable_scene_render(void *engine, void *data, void *drawable, void *scene_data) { Evas_Engine_GL_Context *gl_context; E3D_Renderer *renderer = NULL; @@ -2357,7 +2357,7 @@ eng_drawable_scene_render(void *engine EINA_UNUSED, void *data, void *drawable, gl_context = gl_generic_context_get(data, 1); evas_gl_common_context_flush(gl_context); - eng_context_3d_use(data); + eng_context_3d_use(gl_generic_output_find(engine)); renderer = eng_renderer_3d_get(data); e3d_drawable_scene_render(drawable, renderer, scene_data); } @@ -2390,7 +2390,7 @@ eng_drawable_scene_render_to_texture(void *engine, void *drawable, void *scene_d gl_context = gl_generic_context_get(engine, 1); evas_gl_common_context_flush(gl_context); - eng_context_3d_use(engine); + eng_context_3d_use(gl_generic_output_find(engine)); renderer = eng_renderer_3d_get(engine); return e3d_drawable_scene_render_to_texture((E3D_Drawable *)drawable, renderer, scene_data); @@ -2453,7 +2453,7 @@ eng_texture_image_set(void *engine, void *texture, void *image) { Evas_Engine_GL_Context *gl_context; - gl_context = gl_generic_context_get(engine, 1); + gl_context = gl_generic_context_find(engine, 1); e3d_texture_set(gl_context, (E3D_Texture *)texture, (Evas_GL_Image *)image); } diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs index 9329fbae12..578ad10790 100644 --- a/src/tests/efl_mono/Eo.cs +++ b/src/tests/efl_mono/Eo.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using System.Collections.Generic; namespace TestSuite { @@ -327,7 +328,7 @@ class TestCsharpProperties public static void test_iface_property() { int val = -33; - Dummy.TestIface iface = new Dummy.TestObject(); + Dummy.ITestIface iface = new Dummy.TestObject(); iface.IfaceProp = val; Test.AssertEquals(val, iface.IfaceProp); } @@ -429,7 +430,7 @@ class TestInterfaceConcrete public static void test_iface_concrete_methods() { var obj = new Dummy.TestObject(); - Dummy.TestIface iface = Dummy.TestIfaceConcrete.static_cast(obj); + Dummy.ITestIface iface = Dummy.ITestIfaceConcrete.static_cast(obj); iface.IfaceProp = 1970; Test.AssertEquals(iface.IfaceProp, 1970); @@ -446,6 +447,51 @@ class TestProvider Test.AssertEquals(provider.GetType(), typeof(Dummy.Numberwrapper)); Test.AssertEquals(provider.GetNumber(), 1999); } + + private class ProviderHolder : Dummy.TestObject + { + private Dummy.TestObject provider; + public string ProviderName + { + get + { + return "MyProvider"; + } + } + + public ProviderHolder() : base(null) + { + this.provider = new Dummy.TestObject(this); + this.provider.Name = this.ProviderName; + this.provider.IfaceProp = 1997; + } + + public override Efl.Object FindProvider(System.Type type) + { + Console.WriteLine("Called FindProvider"); + if (type == typeof(Dummy.ITestIface)) + { + return this.provider; + } + else + { + return null; + } + } + } + + public static void test_find_provider_iface() + { + var obj = new ProviderHolder(); + + var provider = obj.CallFindProvider(typeof(Efl.Object)); + Test.AssertNull(provider, msg : "Unkonw provider must be null"); + + provider = obj.CallFindProviderForIface(); + Test.AssertNotNull(provider, msg : "Provider of ITestIFace must not be null"); + Test.AssertEquals(provider.Name, obj.ProviderName, "Provider name does not match expected"); + + } } } diff --git a/src/tests/efl_mono/Events.cs b/src/tests/efl_mono/Events.cs index 2d6dedb8e9..32c87b2a75 100644 --- a/src/tests/efl_mono/Events.cs +++ b/src/tests/efl_mono/Events.cs @@ -165,21 +165,21 @@ class TestEoEvents Test.AssertEquals(sent_struct.Fobj, received_struct.Fobj); } - public static void event_with_list_payload() + public static void event_with_array_payload() { var obj = new Dummy.TestObject(); - Eina.List received = null; - Eina.List sent = new Eina.List(); + Eina.Array received = null; + Eina.Array sent = new Eina.Array(); sent.Append("Abc"); sent.Append("Def"); sent.Append("Ghi"); - obj.EvtWithListEvt += (object sender, Dummy.TestObjectEvtWithListEvt_Args e) => { + obj.EvtWithArrayEvt += (object sender, Dummy.TestObjectEvtWithArrayEvt_Args e) => { received = e.arg; }; - obj.EmitEventWithList(sent); + obj.EmitEventWithArray(sent); Test.AssertEquals(sent.Length, received.Length); var pairs = sent.Zip(received, (string sentItem, string receivedItem) => new { Sent = sentItem, Received = receivedItem } ); @@ -225,33 +225,6 @@ class TestInterfaceEvents obj.EmitNonconflicted(); Test.Assert(called); } - - public static void test_conflicting_events() - { - var obj = new Dummy.TestObject(); - var test_called = false; - var another_called = false; - - EventHandler cb = (object sender, EventArgs e) => { - test_called = true; - }; - - EventHandler another_cb = (object sender, EventArgs e) => { - another_called = true; - }; - - ((Dummy.TestIface)obj).ConflictedEvt += cb; - ((Dummy.AnotherIface)obj).ConflictedEvt += another_cb; - - obj.EmitTestConflicted(); - Test.Assert(test_called); - Test.Assert(!another_called); - test_called = false; - - obj.EmitAnotherConflicted(); - Test.Assert(!test_called); - Test.Assert(another_called); - } } class TestEventNaming diff --git a/src/tests/efl_mono/Inheritance.cs b/src/tests/efl_mono/Inheritance.cs index 344c6da71f..befdd3a7b4 100644 --- a/src/tests/efl_mono/Inheritance.cs +++ b/src/tests/efl_mono/Inheritance.cs @@ -20,7 +20,7 @@ class TestInheritance } } - internal class Inherit2 : Dummy.TestObject, Dummy.InheritIface + internal class Inherit2 : Dummy.TestObject, Dummy.IInheritIface { override public void IntOut (int x, out int y) { diff --git a/src/tests/efl_mono/TestUtils.cs b/src/tests/efl_mono/TestUtils.cs index 615a8f3c6d..e7daf0559d 100644 --- a/src/tests/efl_mono/TestUtils.cs +++ b/src/tests/efl_mono/TestUtils.cs @@ -186,6 +186,16 @@ public static class Test if (reference != null) throw new AssertionException($"Assertion failed: {file}:{line} ({member}) {msg}"); } + + /// Asserts if the given reference is not null. + public static void AssertNotNull(object reference, String msg = "Reference is null", + [CallerLineNumber] int line = 0, + [CallerFilePath] string file = null, + [CallerMemberName] string member = null) + { + if (reference == null) + throw new AssertionException($"Assertion failed: {file}:{line} ({member}) {msg}"); + } } diff --git a/src/tests/efl_mono/dummy_another_iface.eo b/src/tests/efl_mono/dummy_another_iface.eo deleted file mode 100644 index 84c9187f05..0000000000 --- a/src/tests/efl_mono/dummy_another_iface.eo +++ /dev/null @@ -1,10 +0,0 @@ -interface Dummy.Another_Iface -{ - methods { - emit_another_conflicted { - } - } - events { - conflicted: void; - } -} diff --git a/src/tests/efl_mono/dummy_test_iface.eo b/src/tests/efl_mono/dummy_test_iface.eo index d9d29ac749..3ab37f5407 100644 --- a/src/tests/efl_mono/dummy_test_iface.eo +++ b/src/tests/efl_mono/dummy_test_iface.eo @@ -1,8 +1,6 @@ interface Dummy.Test_Iface { methods { - emit_test_conflicted { - } emit_nonconflicted { } @property iface_prop { @@ -14,7 +12,6 @@ interface Dummy.Test_Iface } } events { - conflicted: void; nonconflicted: void; } } diff --git a/src/tests/efl_mono/dummy_test_object.eo b/src/tests/efl_mono/dummy_test_object.eo index 0d6ced8e62..5475c81c3c 100644 --- a/src/tests/efl_mono/dummy_test_object.eo +++ b/src/tests/efl_mono/dummy_test_object.eo @@ -101,7 +101,7 @@ function Dummy.FormatCb { } }; -class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface, Dummy.Another_Iface { +class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface { methods { return_object { return: Dummy.Test_Object; @@ -1304,9 +1304,9 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface, Dummy.An } } - emit_event_with_list { + emit_event_with_array { params { - @in data: list; + @in data: array; } } @@ -1388,19 +1388,28 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface, Dummy.An get_setter_only { return: int; } + + call_find_provider { + params { + @in type: const(Efl.Class); + } + return: Efl.Object; + } + + call_find_provider_for_iface { + return: Efl.Object; + } } implements { class.constructor; class.destructor; Efl.Object.constructor; Efl.Object.provider_find; - Dummy.Test_Iface.emit_test_conflicted; Dummy.Test_Iface.emit_nonconflicted; Dummy.Test_Iface.iface_prop { get; set; } - Dummy.Another_Iface.emit_another_conflicted; } events { - evt,with,string @hot: string; + evt,with,string @hot: const(string); evt,with,bool: bool; evt,with,int @hot: int; evt,with,uint @hot: uint; @@ -1408,7 +1417,7 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface, Dummy.An evt,with,error @hot: Eina.Error; evt,with,struct @hot: Dummy.StructSimple; evt,with,struct,complex @hot: Dummy.StructComplex; - evt,with,list @hot: list; + evt,with,array @hot: const(array); evt_with,under @hot: void; } } diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c index 11190c9124..7b4dd1a77f 100644 --- a/src/tests/efl_mono/libefl_mono_native_test.c +++ b/src/tests/efl_mono/libefl_mono_native_test.c @@ -49,7 +49,6 @@ #include "dummy_test_object.eo.h" #include "dummy_child.eo.h" #include "dummy_test_iface.eo.h" -#include "dummy_another_iface.eo.h" #include "dummy_inherit_iface.eo.h" #include "dummy_inherit_helper.eo.h" #include "dummy_part_holder.eo.h" @@ -73,6 +72,7 @@ typedef struct Dummy_Test_Object_Data int setter_only; int iface_prop; Eo *provider; + Eo *iface_provider; } Dummy_Test_Object_Data; typedef struct Dummy_Numberwrapper_Data @@ -151,6 +151,12 @@ _dummy_test_object_efl_object_constructor(Eo *obj, Dummy_Test_Object_Data *pd) { efl_constructor(efl_super(obj, DUMMY_TEST_OBJECT_CLASS)); pd->provider = efl_add(DUMMY_NUMBERWRAPPER_CLASS, obj); + + if (efl_parent_get(obj) == NULL) { // Avoid recursion + pd->iface_provider = efl_add(DUMMY_TEST_OBJECT_CLASS, obj); + dummy_test_iface_prop_set(pd->iface_provider, 1997); + } else + pd->iface_provider = NULL; dummy_numberwrapper_number_set(pd->provider, 1999); return obj; @@ -161,7 +167,7 @@ Efl_Object *_dummy_test_object_return_object(Eo *obj, EINA_UNUSED Dummy_Test_Obj return obj; } -Efl_Object *_dummy_test_object_return_null_object(Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd) +Efl_Object *_dummy_test_object_return_null_object(Eo *obj EINA_UNUSED, EINA_UNUSED Dummy_Test_Object_Data *pd) { return NULL; } @@ -3784,9 +3790,9 @@ void _dummy_test_object_emit_event_with_struct_complex(Eo *obj, EINA_UNUSED Dumm efl_event_callback_legacy_call(obj, DUMMY_TEST_OBJECT_EVENT_EVT_WITH_STRUCT_COMPLEX, &data); } -void _dummy_test_object_emit_event_with_list(Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd, Eina_List *data) +void _dummy_test_object_emit_event_with_array(Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd, Eina_Array *data) { - efl_event_callback_legacy_call(obj, DUMMY_TEST_OBJECT_EVENT_EVT_WITH_LIST, data); + efl_event_callback_legacy_call(obj, DUMMY_TEST_OBJECT_EVENT_EVT_WITH_ARRAY, data); } void _dummy_test_object_emit_event_with_under(Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd) @@ -3888,21 +3894,11 @@ Eina_Accessor *_dummy_test_object_clone_accessor(Eo *obj EINA_UNUSED, Dummy_Test return eina_list_accessor_new(pd->list_for_accessor); } -void _dummy_test_object_dummy_test_iface_emit_test_conflicted(Eo *obj, Dummy_Test_Object_Data *pd EINA_UNUSED) -{ - efl_event_callback_legacy_call(obj, DUMMY_TEST_IFACE_EVENT_CONFLICTED, NULL); -} - void _dummy_test_object_dummy_test_iface_emit_nonconflicted(Eo *obj, Dummy_Test_Object_Data *pd EINA_UNUSED) { efl_event_callback_legacy_call(obj, DUMMY_TEST_IFACE_EVENT_NONCONFLICTED, NULL); } -void _dummy_test_object_dummy_another_iface_emit_another_conflicted(Eo *obj, Dummy_Test_Object_Data *pd EINA_UNUSED) -{ - efl_event_callback_legacy_call(obj, DUMMY_ANOTHER_IFACE_EVENT_CONFLICTED, NULL); -} - void _dummy_test_object_setter_only_set(EINA_UNUSED Eo *obj, Dummy_Test_Object_Data *pd, int value) { pd->setter_only = value; @@ -3928,9 +3924,23 @@ Eo * _dummy_test_object_efl_object_provider_find(EINA_UNUSED const Eo *obj, Dumm EINA_LOG_ERR("klass: %p, NUMBERWRAPPER: %p", klass, DUMMY_NUMBERWRAPPER_CLASS); if (klass == DUMMY_NUMBERWRAPPER_CLASS) return pd->provider; + else if (klass == DUMMY_TEST_IFACE_INTERFACE) + return pd->iface_provider; return efl_provider_find(efl_super(obj, DUMMY_TEST_OBJECT_CLASS), klass); } +Efl_Object *_dummy_test_object_call_find_provider(Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd, const Efl_Class *type) +{ + printf("CALLING FIND PROVIDER FROM C"); + return efl_provider_find(obj, type); +} + +Efl_Object *_dummy_test_object_call_find_provider_for_iface(Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd) +{ + printf("CALLING FIND PROVIDER FROM C"); + return efl_provider_find(obj, DUMMY_TEST_IFACE_INTERFACE); +} + /// Dummy.Child static Efl_Object * @@ -4048,7 +4058,6 @@ Efl_Object *_dummy_part_holder_efl_part_part_get(EINA_UNUSED const Eo *obj, Dumm #include "dummy_numberwrapper.eo.c" #include "dummy_child.eo.c" #include "dummy_test_iface.eo.c" -#include "dummy_another_iface.eo.c" #include "dummy_inherit_helper.eo.c" #include "dummy_inherit_iface.eo.c" #include "dummy_part_holder.eo.c" diff --git a/src/tests/efl_mono/meson.build b/src/tests/efl_mono/meson.build index f9fcbcf88c..f13b9a3b48 100644 --- a/src/tests/efl_mono/meson.build +++ b/src/tests/efl_mono/meson.build @@ -1,4 +1,4 @@ -eo_files = ['dummy_child.eo', 'dummy_numberwrapper.eo', 'dummy_test_object.eo', 'dummy_test_iface.eo', 'dummy_another_iface.eo', 'dummy_inherit_helper.eo', 'dummy_inherit_iface.eo', 'dummy_part_holder.eo'] +eo_files = ['dummy_child.eo', 'dummy_numberwrapper.eo', 'dummy_test_object.eo', 'dummy_test_iface.eo', 'dummy_inherit_helper.eo', 'dummy_inherit_iface.eo', 'dummy_part_holder.eo'] eo_file_targets = [] diff --git a/src/tests/elementary/efl_ui_compile_test.c b/src/tests/elementary/efl_ui_compile_test.c new file mode 100644 index 0000000000..4234502659 --- /dev/null +++ b/src/tests/elementary/efl_ui_compile_test.c @@ -0,0 +1,12 @@ +#undef EFL_BETA_API_SUPPORT +#define EFL_NOLEGACY_API_SUPPORT + +#include + +EAPI_MAIN void +efl_main(void *data EINA_UNUSED, + const Efl_Event *ev EINA_UNUSED) +{ +} + +EFL_MAIN() diff --git a/src/tests/elementary/efl_ui_suite.c b/src/tests/elementary/efl_ui_suite.c index 5783c203ce..097f432e8a 100644 --- a/src/tests/elementary/efl_ui_suite.c +++ b/src/tests/elementary/efl_ui_suite.c @@ -14,6 +14,7 @@ static const Efl_Test_Case etc[] = { { "efl_ui_focus_sub", efl_ui_test_focus_sub}, { "efl_ui_box", efl_ui_test_box}, { "efl_ui_box_flow", efl_ui_test_box_flow}, + { "efl_ui_box_stack", efl_ui_test_box_stack}, { "efl_ui_table", efl_ui_test_table}, { "efl_ui_grid", efl_ui_test_grid}, { "efl_ui_relative_layout", efl_ui_test_relative_layout}, diff --git a/src/tests/elementary/efl_ui_suite.h b/src/tests/elementary/efl_ui_suite.h index 1f393828f4..3755a0e56f 100644 --- a/src/tests/elementary/efl_ui_suite.h +++ b/src/tests/elementary/efl_ui_suite.h @@ -21,6 +21,7 @@ void efl_ui_test_box(TCase *tc); void efl_ui_test_box_flow(TCase *tc); +void efl_ui_test_box_stack(TCase *tc); void efl_ui_test_table(TCase *tc); void efl_ui_test_grid(TCase *tc); void efl_ui_test_relative_layout(TCase *tc); diff --git a/src/tests/elementary/efl_ui_test_atspi.c b/src/tests/elementary/efl_ui_test_atspi.c index 9aa046351c..68a88ec6c3 100644 --- a/src/tests/elementary/efl_ui_test_atspi.c +++ b/src/tests/elementary/efl_ui_test_atspi.c @@ -451,6 +451,141 @@ EFL_START_TEST(test_efl_access_object_relationships_clear) } EFL_END_TEST +EFL_START_TEST(test_efl_access_object_attribute_append) +{ + Eina_List *attr_list = NULL, *l = NULL; + Efl_Access_Attribute *attr = NULL; + generate_app(); + efl_access_object_attribute_append(g_btn, "color1", "red"); + efl_access_object_attribute_append(g_btn, "color2", "blue"); + efl_access_object_attribute_append(g_btn, "color3", "green"); + attr_list = efl_access_object_attributes_get(g_btn); + + ck_assert(attr_list != NULL); + EINA_LIST_FOREACH(attr_list, l, attr) + { + if (!strcmp(attr->key, "color1")) + ck_assert_str_eq(attr->value, "red"); + else if (!strcmp(attr->key, "color2")) + ck_assert_str_eq(attr->value, "blue"); + else if (!strcmp(attr->key, "color3")) + ck_assert_str_eq(attr->value, "green"); + } + EINA_LIST_FREE(attr_list, attr) + { + eina_stringshare_del(attr->key); + eina_stringshare_del(attr->value); + free(attr); + } +} +EFL_END_TEST + +EFL_START_TEST(test_efl_access_object_attributes_get) +{ + Eina_List *attr_list = NULL, *l = NULL; + Efl_Access_Attribute *attr = NULL; + generate_app(); + efl_access_object_attribute_append(g_btn, "color1", "red"); + efl_access_object_attribute_append(g_btn, "color2", "blue"); + efl_access_object_attribute_append(g_btn, "color3", "green"); + attr_list = efl_access_object_attributes_get(g_btn); + + ck_assert(attr_list != NULL); + EINA_LIST_FOREACH(attr_list, l, attr) + { + if (!strcmp(attr->key, "color1")) + ck_assert_str_eq(attr->value, "red"); + else if (!strcmp(attr->key, "color2")) + ck_assert_str_eq(attr->value, "blue"); + else if (!strcmp(attr->key, "color3")) + ck_assert_str_eq(attr->value, "green"); + } + EINA_LIST_FREE(attr_list, attr) + { + eina_stringshare_del(attr->key); + eina_stringshare_del(attr->value); + free(attr); + } +} +EFL_END_TEST + +EFL_START_TEST(test_efl_access_object_attribute_del) +{ + Eina_List *attr_list = NULL; + Efl_Access_Attribute *attr = NULL; + int count1 = 0; + int count2 = 0; + generate_app(); + efl_access_object_attribute_append(g_btn, "color1", "red"); + efl_access_object_attribute_append(g_btn, "color2", "blue"); + efl_access_object_attribute_append(g_btn, "color3", "green"); + attr_list = efl_access_object_attributes_get(g_btn);//default attributes are added again + ck_assert(attr_list != NULL); + count1 = eina_list_count(attr_list); + EINA_LIST_FREE(attr_list, attr) + { + eina_stringshare_del(attr->key); + eina_stringshare_del(attr->value); + free(attr); + } + attr_list = NULL; + efl_access_object_attribute_del(g_btn, "color4");//non existent key deletion + efl_access_object_attribute_del(g_btn, "color3");//existing key deletion + attr_list = efl_access_object_attributes_get(g_btn); + ck_assert(attr_list != NULL); + count2 = eina_list_count(attr_list); + ck_assert(count1 == (count2+1)); + EINA_LIST_FREE(attr_list, attr) + { + eina_stringshare_del(attr->key); + eina_stringshare_del(attr->value); + free(attr); + } +} +EFL_END_TEST + +EFL_START_TEST(test_efl_access_object_attributes_clear) +{ + Eina_List *attr_list = NULL; + Efl_Access_Attribute *attr = NULL; + generate_app(); + efl_access_object_attribute_append(g_btn, "color1", "red"); + efl_access_object_attribute_append(g_btn, "color2", "blue"); + efl_access_object_attribute_append(g_btn, "color3", "green"); + efl_access_object_attributes_clear(g_btn); + attr_list = efl_access_object_attributes_get(g_btn);//default attributes are added again + ck_assert(attr_list != NULL); + ck_assert(eina_list_count(attr_list) <= 2); + EINA_LIST_FREE(attr_list, attr) + { + eina_stringshare_del(attr->key); + eina_stringshare_del(attr->value); + free(attr); + } +} +EFL_END_TEST + +EFL_START_TEST(test_efl_access_object_reading_info_type_set) +{ + Efl_Access_Reading_Info_Type reading_info; + generate_app(); + efl_access_object_reading_info_type_set(g_btn, EFL_ACCESS_READING_INFO_TYPE_NAME| + EFL_ACCESS_READING_INFO_TYPE_ROLE); + reading_info = efl_access_object_reading_info_type_get(g_btn); + ck_assert(reading_info & EFL_ACCESS_READING_INFO_TYPE_NAME); + ck_assert(reading_info & EFL_ACCESS_READING_INFO_TYPE_ROLE); +} +EFL_END_TEST + +EFL_START_TEST(test_efl_access_object_reading_info_type_get) +{ + Efl_Access_Reading_Info_Type reading_info; + generate_app(); + reading_info = efl_access_object_reading_info_type_get(g_btn); + ck_assert(reading_info == 0); +} +EFL_END_TEST + void efl_ui_test_atspi(TCase *tc) { tcase_add_test(tc, test_efl_access_app_obj_name_get); @@ -469,4 +604,10 @@ void efl_ui_test_atspi(TCase *tc) tcase_add_test(tc, test_efl_access_object_relationship_append); tcase_add_test(tc, test_efl_access_object_relationship_remove); tcase_add_test(tc, test_efl_access_object_relationships_clear); + tcase_add_test(tc, test_efl_access_object_attribute_append); + tcase_add_test(tc, test_efl_access_object_attributes_get); + tcase_add_test(tc, test_efl_access_object_attribute_del); + tcase_add_test(tc, test_efl_access_object_attributes_clear); + tcase_add_test(tc, test_efl_access_object_reading_info_type_set); + tcase_add_test(tc, test_efl_access_object_reading_info_type_get); } diff --git a/src/tests/elementary/efl_ui_test_box_stack.c b/src/tests/elementary/efl_ui_test_box_stack.c new file mode 100644 index 0000000000..dccbe1fa2c --- /dev/null +++ b/src/tests/elementary/efl_ui_test_box_stack.c @@ -0,0 +1,244 @@ +#ifdef HAVE_CONFIG_H +# include "elementary_config.h" +#endif + +#include +#include "elm_suite.h" + +#define COORD_EQ(a, b) (!!(abs(a - b) < 2)) +#define GEOMETRY_EQ(a, b) (COORD_EQ(a.x, b.x) && COORD_EQ(a.y, b.y) && \ + COORD_EQ(a.w, b.w) && COORD_EQ(a.h, b.h)) + +typedef struct { + Eina_Size2D max; + Eina_Size2D min; + double weightx; + double weighty; + double alignx; + double aligny; + int marginl; + int marginr; + int margint; + int marginb; + Efl_Gfx_Hint_Aspect mode; + Eina_Size2D aspect; + Eina_Bool fillx; + Eina_Bool filly; + Eina_Size2D layout_size; + Eina_Size2D layout_expected; + Eina_Rect expected; + char testname[1024]; +} Hint; + +static Hint hints[] = { + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(0, 0), 1, 1, 0.5, 0.5, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 200), + EINA_RECT(0, 0, 200, 200), "[0]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.3, 0.5, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 200), + EINA_RECT(0, 0, 200, 200), "[1]" }, + { EINA_SIZE2D(50, 150), EINA_SIZE2D(70, 70), 1, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 200), + EINA_RECT((200 - 70) * 0.3, (200 - 150) * 0.7, 70, 150), "[2]" }, + { EINA_SIZE2D(150, -1), EINA_SIZE2D(70, 70), 0, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_FALSE, EINA_FALSE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 200), + EINA_RECT((200 - 70) * 0.3, (200 - 70) * 0.7, 70, 70), "[3]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_FALSE, EINA_TRUE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 200), + EINA_RECT((200 - 70) * 0.3, (200 - 70) * 0.7, 70, 70), "[4]" }, + { EINA_SIZE2D(150, 150), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_FALSE, EINA_TRUE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 200), + EINA_RECT((200 - 70) * 0.3, (200 - 70) * 0.7, 70, 70), "[5]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 0, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 210), + EINA_RECT((200 - 70) * 0.3, 0, 70, 70 * 3), "[6]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 0, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(300, 300), EINA_SIZE2D(300, 300), + EINA_RECT((300 - 70) * 0.3, (300 - 70 * 3) * 0.7, 70, 70 * 3), "[7]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 210), + EINA_RECT((200 - 70) * 0.3, 0, 70, 70 * 3), "[8]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(300, 300), EINA_SIZE2D(300, 300), + EINA_RECT((300 - 70) * 0.3, (300 - 70 * 3) * 0.7, 70, 70 * 3), "[9]" }, + { EINA_SIZE2D(-1, 150), EINA_SIZE2D(70, 70), 0, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 210), + EINA_RECT((200 - 70) * 0.3, 0, 70, 70 * 3), "[10]" }, + { EINA_SIZE2D(-1, 150), EINA_SIZE2D(70, 70), 0, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(300, 300), EINA_SIZE2D(300, 300), + EINA_RECT((300 - 70) * 0.3, (300 - 70 * 3) * 0.7, 70, 70 * 3), "[11]" }, + { EINA_SIZE2D(-1, 150), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(200, 200), EINA_SIZE2D(200, 210), + EINA_RECT((200 - 70) * 0.3, 0, 70, 70 * 3), "[12]" }, + { EINA_SIZE2D(-1, 150), EINA_SIZE2D(70, 70), 1, 0, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(300, 300), EINA_SIZE2D(300, 300), + EINA_RECT((300 - 70) * 0.3, (300 - 70 * 3) * 0.7, 70, 70 * 3), "[13]" }, +}; + +static Eo *win, *layout; + +static void +btn_hint_set(Eo *btn, Hint *hint) +{ + efl_gfx_entity_size_set(layout, hint->layout_size); + efl_gfx_hint_size_max_set(btn, hint->max); + efl_gfx_hint_size_min_set(btn, hint->min); + efl_gfx_hint_margin_set(btn, hint->marginl, hint->marginr, hint->margint, + hint->marginb); + efl_gfx_hint_weight_set(btn, hint->weightx, hint->weighty); + efl_gfx_hint_align_set(btn, hint->alignx, hint->aligny); + efl_gfx_hint_fill_set(btn, hint->fillx, hint->filly); + efl_gfx_hint_aspect_set(btn, hint->mode, hint->aspect); + efl_canvas_group_calculate(layout); +} + +static void +btn_geom_assert(Hint *hint, Eina_Rect btn_geom) +{ + Eina_Size2D layout_size, layout_min; + + layout_size = efl_gfx_entity_size_get(layout); + layout_min = efl_gfx_hint_size_combined_min_get(layout); + layout_size.w = layout_size.w > layout_min.w ? layout_size.w : layout_min.w; + layout_size.h = layout_size.h > layout_min.h ? layout_size.h : layout_min.h; + + ck_assert_msg(GEOMETRY_EQ(btn_geom, hint->expected), + "Case %s failed... button geometry: (%d, %d, %d, %d) expected geometry: (%d, %d, %d, %d)", + hint->testname, btn_geom.x, btn_geom.y, btn_geom.w, btn_geom.h, + hint->expected.x, hint->expected.y, hint->expected.w, hint->expected.h); + ck_assert_msg(COORD_EQ(layout_size.w, hint->layout_expected.w) && + COORD_EQ(layout_size.h, hint->layout_expected.h), + "Case %s failed... layout size: (%d, %d) expected size: (%d, %d)", + hint->testname, layout_size.w, layout_size.h, + hint->layout_expected.w, hint->layout_expected.h); +} + +static void +layout_setup() +{ + win = win_add(); + + layout = efl_add(EFL_UI_BOX_STACK_CLASS, win, + efl_pack_align_set(efl_added, 0.8, 0.2), + efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL)); +} + +static void +layout_teardown() +{ + if (win) + { + efl_del(win); + win = NULL; + } +} + +EFL_START_TEST (efl_ui_box_stack_class_check) +{ + const char *class; + + class = efl_class_name_get(layout); + + ck_assert(class != NULL); + ck_assert(!strcmp(class, "Efl.Ui.Box_Stack")); +} +EFL_END_TEST + +EFL_START_TEST (efl_ui_box_stack_layout_update) +{ + int i, max_index = (sizeof(hints) / sizeof(Hint)); + + Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, layout, + efl_pack_end(layout, efl_added)); + + for (i = 0; i < max_index; i++) + { + btn_hint_set(btn, &hints[i]); + btn_geom_assert(&hints[i], efl_gfx_entity_geometry_get(btn)); + } +} +EFL_END_TEST + +EFL_START_TEST (efl_ui_box_stack_size) +{ +#define USERMIN_CHECK(a, b) \ + efl_canvas_group_calculate(layout); \ + user_min = efl_gfx_hint_size_min_get(layout); \ + ck_assert_msg(COORD_EQ(user_min.w, (a)) && COORD_EQ(user_min.h, (b)), \ + "Case box_size failed... user_min: (%d, %d) expected user_min: (%d, %d)", \ + user_min.w, user_min.h, (a), (b)); + +#define MIN_CHECK(a, b) \ + efl_canvas_group_calculate(layout); \ + min = efl_gfx_hint_size_combined_min_get(layout); \ + ck_assert_msg(COORD_EQ(min.w, (a)) && COORD_EQ(min.h, (b)), \ + "Case box_size failed... min: (%d, %d) expected min: (%d, %d)", \ + min.w, min.h, (a), (b)); + + Eo *btn, *btn2, *btn3; + Eina_Size2D min, user_min; + + btn = efl_add(EFL_UI_BUTTON_CLASS, layout, + efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)), + efl_pack_end(layout, efl_added)); + + USERMIN_CHECK(0, 0); + MIN_CHECK(100, 100); + + btn2 = efl_add(EFL_UI_BUTTON_CLASS, layout, + efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(300, 300)), + efl_pack_end(layout, efl_added)); + btn3 = efl_add(EFL_UI_BUTTON_CLASS, layout, + efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(200, 200)), + efl_pack_end(layout, efl_added)); + USERMIN_CHECK(0, 0); + MIN_CHECK(300, 300); + + efl_pack_unpack(layout, btn2); + USERMIN_CHECK(0, 0); + MIN_CHECK(200, 200); + + efl_pack_unpack(layout, btn3); + USERMIN_CHECK(0, 0); + MIN_CHECK(100, 100); + + efl_pack_unpack(layout, btn); + USERMIN_CHECK(0, 0); + MIN_CHECK(0, 0); + + efl_pack_end(layout, btn); + efl_gfx_hint_size_min_set(layout, EINA_SIZE2D(200, 200)); + USERMIN_CHECK(200, 200); + MIN_CHECK(200, 200); + + efl_pack_end(layout, btn2); + efl_pack_end(layout, btn3); + USERMIN_CHECK(200, 200); + MIN_CHECK(300, 300); + +#undef USERMIN_ASSERT +#undef MIN_ASSERT +} +EFL_END_TEST + +void efl_ui_test_box_stack(TCase *tc) +{ + tcase_add_checked_fixture(tc, layout_setup, layout_teardown); + tcase_add_test(tc, efl_ui_box_stack_class_check); + tcase_add_test(tc, efl_ui_box_stack_layout_update); + tcase_add_test(tc, efl_ui_box_stack_size); +} diff --git a/src/tests/elementary/efl_ui_test_widget.c b/src/tests/elementary/efl_ui_test_widget.c index d5f9c4d525..810285d0b6 100644 --- a/src/tests/elementary/efl_ui_test_widget.c +++ b/src/tests/elementary/efl_ui_test_widget.c @@ -188,6 +188,37 @@ EFL_START_TEST(efl_ui_test_widget_sub_object_add_del) } EFL_END_TEST +EFL_START_TEST(efl_ui_test_widget_sub_object_theme_sync) +{ + State s; + Efl_Canvas_Layout *edje; + + _small_ui(&s); + edje = elm_widget_resize_object_get(s.btn1); + + ck_assert(EINA_DBL_EQ(efl_gfx_entity_scale_get(s.btn1), 1.0)); + ck_assert(EINA_DBL_EQ(efl_gfx_entity_scale_get(edje), 1.0)); + ck_assert(EINA_DBL_EQ(efl_gfx_entity_scale_get(s.btn2), 1.0)); + + efl_gfx_entity_scale_set(s.win, 0.123); + ck_assert(EINA_DBL_EQ(efl_gfx_entity_scale_get(s.btn1), 0.123)); + ck_assert(EINA_DBL_EQ(efl_gfx_entity_scale_get(edje), 0.123)); + ck_assert(EINA_DBL_EQ(efl_gfx_entity_scale_get(s.btn2), 0.123)); + + efl_ui_widget_sub_object_del(s.box, s.btn1); + efl_gfx_entity_scale_set(s.win, 0.456); + ck_assert(EINA_DBL_EQ(efl_gfx_entity_scale_get(s.btn1), 1.0)); + ck_assert(EINA_DBL_EQ(efl_gfx_entity_scale_get(edje), 0.123)); + ck_assert(EINA_DBL_EQ(efl_gfx_entity_scale_get(s.btn2), 0.456)); + + efl_gfx_entity_scale_set(s.win, 0.789); + efl_ui_widget_sub_object_add(s.box, s.btn1); + ck_assert(EINA_DBL_EQ(efl_gfx_entity_scale_get(s.btn1), 0.789)); + ck_assert(EINA_DBL_EQ(efl_gfx_entity_scale_get(edje), 0.789)); + ck_assert(EINA_DBL_EQ(efl_gfx_entity_scale_get(s.btn2), 0.789)); +} +EFL_END_TEST + void efl_ui_test_widget(TCase *tc) { tcase_add_test(tc, efl_ui_test_widget_parent_iterator); @@ -196,4 +227,5 @@ void efl_ui_test_widget(TCase *tc) tcase_add_test(tc, efl_ui_test_widget_iterator); tcase_add_test(tc, efl_ui_test_widget_sub_iterator); tcase_add_test(tc, efl_ui_test_widget_sub_object_add_del); + tcase_add_test(tc, efl_ui_test_widget_sub_object_theme_sync); } diff --git a/src/tests/elementary/elm_suite.h b/src/tests/elementary/elm_suite.h index bf169e32e9..ba76b29615 100644 --- a/src/tests/elementary/elm_suite.h +++ b/src/tests/elementary/elm_suite.h @@ -17,6 +17,7 @@ #include #include +#include "suite_helpers.h" void elm_test_config(TCase *tc); void elm_test_check(TCase *tc); diff --git a/src/tests/elementary/elm_suite_build.c b/src/tests/elementary/elm_suite_build.c index 614f7816da..7ff098adec 100644 --- a/src/tests/elementary/elm_suite_build.c +++ b/src/tests/elementary/elm_suite_build.c @@ -1,3 +1,2 @@ #undef EFL_BETA_API_SUPPORT -#undef EFL_EO_API_SUPPORT #include diff --git a/src/tests/elementary/elm_test_entry.c b/src/tests/elementary/elm_test_entry.c index 969681f4e4..5033798f7d 100644 --- a/src/tests/elementary/elm_test_entry.c +++ b/src/tests/elementary/elm_test_entry.c @@ -393,6 +393,104 @@ EFL_START_TEST(elm_atspi_role_get) } EFL_END_TEST +static Eina_Bool +end_test() +{ + ecore_main_loop_quit(); + return EINA_FALSE; +} + +static void +mag_job(void *e) +{ + evas_event_feed_mouse_out(e, 0, NULL); + evas_event_feed_mouse_in(e, 0, NULL); + evas_event_feed_mouse_move(e, 200, 100, 0, NULL); + evas_event_feed_mouse_down(e, 1, 0, 0, NULL); + real_timer_add(elm_config_longpress_timeout_get() + 0.1, end_test, NULL); +} + +static void +norendered(void *data EINA_UNUSED, Evas *e, void *event_info EINA_UNUSED) +{ + ecore_job_add(mag_job, e); + evas_event_callback_del(e, EVAS_CALLBACK_RENDER_POST, norendered); +} + +EFL_START_TEST(elm_entry_magnifier) +{ + Evas_Object *win, *entry; + char buf[4096]; + + win = win_add_focused(NULL, "entry", ELM_WIN_BASIC); + evas_object_size_hint_weight_set(win, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + entry = elm_entry_add(win); + elm_entry_line_wrap_set(entry, ELM_WRAP_NONE); + snprintf(buf, sizeof(buf), + "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)
" + + "Also (size + ascent): " + "" + " (full) " + "" + " (before this)
" + + "And as well (absize + ascent): " + "" + " (full) " + "" + " or even paths to image files on disk too like: " + "" + " ... end." + , elm_app_data_dir_get() + ); + elm_object_text_set(entry, buf); + evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_show(entry); + elm_win_resize_object_add(win, entry); + evas_object_show(win); + evas_object_resize(entry, 600, 400); + evas_object_resize(win, 600, 400); + evas_smart_objects_calculate(evas_object_evas_get(win)); + evas_event_callback_add(evas_object_evas_get(win), EVAS_CALLBACK_RENDER_POST, norendered, NULL); + ecore_main_loop_begin(); +} +EFL_END_TEST + +EFL_START_TEST(elm_entry_text_set) +{ + Evas_Object *win, *entry; + const char *entry_text = "hello world"; + const char *entry_text2 = "scrollable"; + + win = win_add(NULL, "entry", ELM_WIN_BASIC); + + entry = elm_entry_add(win); + + ck_assert(elm_layout_text_set(entry, NULL, entry_text)); + ck_assert_str_eq(elm_object_text_get(entry), entry_text); + + elm_entry_scrollable_set(entry, EINA_TRUE); + ck_assert(elm_layout_text_set(entry, NULL, entry_text2)); + ck_assert_str_eq(elm_object_text_get(entry), entry_text2); +} +EFL_END_TEST + void elm_test_entry(TCase *tc) { tcase_add_test(tc, elm_entry_legacy_type_check); @@ -407,4 +505,6 @@ void elm_test_entry(TCase *tc) tcase_add_test(tc, elm_entry_atspi_text_text_get); tcase_add_test(tc, elm_entry_atspi_text_selections); tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_entry_text_set); + tcase_add_test(tc, elm_entry_magnifier); } diff --git a/src/tests/elementary/elm_test_layout.c b/src/tests/elementary/elm_test_layout.c index b5ee17a30c..5184086538 100644 --- a/src/tests/elementary/elm_test_layout.c +++ b/src/tests/elementary/elm_test_layout.c @@ -70,22 +70,9 @@ EFL_START_TEST(elm_layout_test_swallows) } EFL_END_TEST -EFL_START_TEST(elm_layout_test_text_set) -{ - Evas_Object *win, *layout; - - win = win_add(NULL, "layout", ELM_WIN_BASIC); - - layout = elm_layout_add(win); - ck_assert(!elm_layout_text_set(layout, "blahblah", "test")); -} -EFL_END_TEST - - void elm_test_layout(TCase *tc) { tcase_add_test(tc, elm_layout_test_legacy_type_check); tcase_add_test(tc, elm_atspi_role_get); tcase_add_test(tc, elm_layout_test_swallows); - tcase_add_test(tc, elm_layout_test_text_set); } diff --git a/src/tests/elementary/elm_test_photocam.c b/src/tests/elementary/elm_test_photocam.c index b2bf4ecc12..8313fdb0d2 100644 --- a/src/tests/elementary/elm_test_photocam.c +++ b/src/tests/elementary/elm_test_photocam.c @@ -41,8 +41,25 @@ EFL_START_TEST(elm_atspi_role_get) } EFL_END_TEST +EFL_START_TEST(elm_photocam_file) +{ + Evas_Object *win, *photocam; + const char *buf = ELM_IMAGE_DATA_DIR "/images/logo_small.png"; + + win = win_add(NULL, "photocam", ELM_WIN_BASIC); + photocam = elm_photocam_add(win); + + ck_assert_int_eq(elm_photocam_file_set(photocam, buf), EVAS_LOAD_ERROR_NONE); + ck_assert_str_eq(elm_photocam_file_get(photocam), buf); + + ck_assert_int_eq(elm_photocam_file_set(photocam, "non_existing.png"), EVAS_LOAD_ERROR_DOES_NOT_EXIST); + ck_assert_str_eq(elm_photocam_file_get(photocam), "non_existing.png"); +} +EFL_END_TEST + void elm_test_photocam(TCase *tc) { tcase_add_test(tc, elm_photocam_legacy_type_check); tcase_add_test(tc, elm_atspi_role_get); + tcase_add_test(tc, elm_photocam_file); } diff --git a/src/tests/elementary/elm_test_popup.c b/src/tests/elementary/elm_test_popup.c index d4dc75e79c..ba3143eb17 100644 --- a/src/tests/elementary/elm_test_popup.c +++ b/src/tests/elementary/elm_test_popup.c @@ -70,9 +70,24 @@ EFL_START_TEST(elm_popup_focus_get) } EFL_END_TEST +EFL_START_TEST(elm_popup_text_set) +{ + Evas_Object *win, *popup; + const char *popup_text = "hello world"; + + win = win_add(NULL, "popup", ELM_WIN_BASIC); + + popup = elm_popup_add(win); + + ck_assert(elm_layout_text_set(popup, NULL, popup_text)); + ck_assert_str_eq(elm_object_text_get(popup), popup_text); +} +EFL_END_TEST + void elm_test_popup(TCase *tc) { tcase_add_test(tc, elm_popup_focus_get); tcase_add_test(tc, elm_popup_legacy_type_check); + tcase_add_test(tc, elm_popup_text_set); tcase_add_test(tc, elm_atspi_role_get); } diff --git a/src/tests/elementary/elm_test_win.c b/src/tests/elementary/elm_test_win.c index e08e0d3be5..9327327f6e 100644 --- a/src/tests/elementary/elm_test_win.c +++ b/src/tests/elementary/elm_test_win.c @@ -449,6 +449,20 @@ EFL_START_TEST(efl_ui_win_multi_touch_inputs) } EFL_END_TEST +EFL_START_TEST(elm_win_test_rotation) +{ + Evas_Object *win; + + win = win_add(NULL, "win", ELM_WIN_BASIC); + + elm_win_rotation_set(win, 90); + ck_assert_int_eq(elm_win_rotation_get(win), 90); + elm_win_rotation_with_resize_set(win, 180); + ck_assert_int_eq(elm_win_rotation_get(win), 180); + ck_assert_int_eq(elm_win_rotation_get(NULL), -1); +} +EFL_END_TEST + void elm_test_win(TCase *tc) { tcase_add_test(tc, elm_win_legacy_type_check); @@ -458,6 +472,7 @@ void elm_test_win(TCase *tc) tcase_add_test(tc, elm_win_test_exit_on_close); tcase_add_test(tc, elm_win_test_app_exit_on_windows_close); tcase_add_test(tc, efl_ui_win_multi_touch_inputs); + tcase_add_test(tc, elm_win_test_rotation); #ifdef HAVE_ELEMENTARY_X tcase_add_test(tc, elm_win_autohide); tcase_add_test(tc, elm_win_autohide_and_policy_quit_last_window_hidden); diff --git a/src/tests/elementary/meson.build b/src/tests/elementary/meson.build index e9be0b2a41..987913aef2 100644 --- a/src/tests/elementary/meson.build +++ b/src/tests/elementary/meson.build @@ -126,6 +126,7 @@ efl_ui_suite_src = [ 'efl_ui_test_focus_sub.c', 'efl_ui_test_box.c', 'efl_ui_test_box_flow.c', + 'efl_ui_test_box_stack.c', 'efl_ui_test_table.c', 'efl_ui_test_grid.c', 'efl_ui_test_relative_layout.c', @@ -149,6 +150,11 @@ efl_ui_suite = executable('efl_ui_suite', ] ) +efl_ui_compile_test = executable('efl_ui_compile_test', + 'efl_ui_compile_test.c', + dependencies: [elementary, eio], +) + test('elementary-suite', elementary_suite, env : test_env ) diff --git a/src/tests/elementary/suite_helpers.c b/src/tests/elementary/suite_helpers.c index 2427ccfcaf..a57ae493fa 100644 --- a/src/tests/elementary/suite_helpers.c +++ b/src/tests/elementary/suite_helpers.c @@ -7,6 +7,9 @@ #include "eo_internal.h" #include "../efl_check.h" #include "elm_widget.h" +#include "ecore_private.h" +#include "ecore_evas_private.h" + static int main_pid = -1; static Eina_Bool did_shutdown; @@ -125,6 +128,12 @@ timer_add(double in, Ecore_Task_Cb cb, void *data) return ecore_timer_add(in * TIMER_SCALE, cb, data); } +void * +real_timer_add(double in, Ecore_Task_Cb cb, void *data) +{ + return ecore_timer_add(in, cb, data); +} + static void _win_manual_render(void *data, const Efl_Event *event EINA_UNUSED) { @@ -132,6 +141,7 @@ _win_manual_render(void *data, const Efl_Event *event EINA_UNUSED) ecore_loop_time_set(t + LOOP_INCREMENT); ecore_animator_custom_tick(); + ecore_evas_render_prepare(ecore_evas_ecore_evas_get(evas_object_evas_get(data))); evas_norender(evas_object_evas_get(data)); } @@ -161,7 +171,8 @@ _win_hide(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *e static void _ui_win_visibility_change(void *data EINA_UNUSED, const Efl_Event *ev) { - if (ev->info) + Eina_Bool *visible = ev->info; + if (*visible) _win_show(NULL, NULL, ev->object, NULL); else { diff --git a/src/tests/elementary/suite_helpers.h b/src/tests/elementary/suite_helpers.h index ae49265ef4..903fa02929 100644 --- a/src/tests/elementary/suite_helpers.h +++ b/src/tests/elementary/suite_helpers.h @@ -6,5 +6,6 @@ int suite_setup(Eina_Bool legacy); void _elm2_suite_init(void); void _elm_suite_shutdown(void); +void *real_timer_add(double in, Ecore_Task_Cb cb, void *data); #endif diff --git a/src/tests/emotion/emotion_test_main-eo.c b/src/tests/emotion/emotion_test_main-eo.c index 8304979cf2..2ddfb272ca 100644 --- a/src/tests/emotion/emotion_test_main-eo.c +++ b/src/tests/emotion/emotion_test_main-eo.c @@ -1,7 +1,6 @@ #ifdef HAVE_CONFIG_H #include "config.h" #else -#define EFL_EO_API_SUPPORT #define EFL_BETA_API_SUPPORT #endif diff --git a/src/tests/eolian_cxx/callback.eo b/src/tests/eolian_cxx/callback.eo index 3f4cd9effe..a62ec0031b 100644 --- a/src/tests/eolian_cxx/callback.eo +++ b/src/tests/eolian_cxx/callback.eo @@ -11,7 +11,7 @@ class Callback extends Efl.Object prefix,event1: void; prefix,event2: Callback; prefix,event3: int; - prefix,event4: list; + prefix,event4: const(array); prefix,event5: Callback_Event; } } diff --git a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc index 9d1734c94d..069e876ba5 100644 --- a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc +++ b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc @@ -203,7 +203,7 @@ EFL_START_TEST(eolian_cxx_test_type_callback) event3 = true; ck_assert(v == 42); }); - efl::eolian::event_add(g.prefix_event4_event, g, [&] (nonamespace::Generic, efl::eina::range_list e) + efl::eolian::event_add(g.prefix_event4_event, g, [&] (nonamespace::Generic, efl::eina::range_array e) { event4 = true; ck_assert(e.size() == 1); diff --git a/src/tests/eolian_cxx/generic.c b/src/tests/eolian_cxx/generic.c index ee3a0c3e87..65f8025b57 100644 --- a/src/tests/eolian_cxx/generic.c +++ b/src/tests/eolian_cxx/generic.c @@ -115,10 +115,10 @@ static void _generic_call_event3(Eo *obj, Generic_Data* pd EINA_UNUSED) static void _generic_call_event4(Eo *obj, Generic_Data* pd EINA_UNUSED) { int i = 42; - Eina_List* p = eina_list_append(NULL, &i); - ck_assert(p != NULL); + Eina_Array* p = eina_array_new(1); + ck_assert(eina_array_push(p, &i)); efl_event_callback_call(obj, GENERIC_EVENT_PREFIX_EVENT4, p); - eina_list_free(p); + eina_array_free(p); } static void _generic_call_event5(Eo *obj, Generic_Data* pd EINA_UNUSED) { diff --git a/src/tests/eolian_cxx/generic.eo b/src/tests/eolian_cxx/generic.eo index 7f367a975b..192765d7df 100644 --- a/src/tests/eolian_cxx/generic.eo +++ b/src/tests/eolian_cxx/generic.eo @@ -108,7 +108,7 @@ class Generic extends Efl.Object implements Generic_Interface prefix,event1: void; prefix,event2: Generic; prefix,event3: int; - prefix,event4: list; + prefix,event4: const(array); prefix,event5: Generic.Event; protected,event1 @protected: void; beta,event1 @beta: void; diff --git a/src/tests/evas/evas_test_object.c b/src/tests/evas/evas_test_object.c index ac4424e327..d2de52a58a 100644 --- a/src/tests/evas/evas_test_object.c +++ b/src/tests/evas/evas_test_object.c @@ -30,7 +30,29 @@ EFL_START_TEST(evas_object_various) } EFL_END_TEST +EFL_START_TEST(evas_object_freeze_events) +{ + Evas *evas = EVAS_TEST_INIT_EVAS(); + Evas_Object *obj = evas_object_rectangle_add(evas); + + evas_object_freeze_events_set(obj, EINA_TRUE); + ck_assert_int_eq(evas_object_freeze_events_get(obj), EINA_TRUE); + evas_object_freeze_events_set(obj, EINA_FALSE); + ck_assert_int_eq(evas_object_freeze_events_get(obj), EINA_FALSE); + + evas_object_freeze_events_set(obj, EINA_TRUE); + evas_object_freeze_events_set(obj, EINA_TRUE); + ck_assert_int_eq(evas_object_freeze_events_get(obj), EINA_TRUE); + evas_object_freeze_events_set(obj, EINA_FALSE); + ck_assert_int_eq(evas_object_freeze_events_get(obj), EINA_FALSE); + evas_object_freeze_events_set(obj, EINA_FALSE); + evas_object_freeze_events_set(obj, EINA_TRUE); + ck_assert_int_eq(evas_object_freeze_events_get(obj), EINA_TRUE); +} +EFL_END_TEST + void evas_test_object(TCase *tc) { tcase_add_test(tc, evas_object_various); + tcase_add_test(tc, evas_object_freeze_events); }