diff --git a/Makefile.am b/Makefile.am index d08f9b950c..9f2d6976f8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -519,7 +519,7 @@ pkgbuild:: clean-local: rm -rf benchmark coverage - @find . -name '*eo.legacy.c' -delete + @find . -name '*.eo.legacy.c' -delete DISTCLEANFILES= \ ./src/lib/emile/Makefile \ diff --git a/configure.ac b/configure.ac index 81f29dddde..e99492ce0e 100644 --- a/configure.ac +++ b/configure.ac @@ -1581,8 +1581,6 @@ fi EFL_CHECK_LIBS([EMILE], [zlib]) EFL_INTERNAL_DEPEND_PKG([EMILE], [eina]) -requirements_cflags_emile="${requirements_cflags_emile} -I\${top_srcdir}/src/lib/efl -I\${top_builddir}/src/lib/efl" -requirements_pc_emile="efl >= ${PACKAGE_VERSION} ${requirements_pc_emile}" EFL_EVAL_PKGS([EMILE]) @@ -1634,8 +1632,6 @@ fi EFL_INTERNAL_DEPEND_PKG([EET], [eina]) EFL_INTERNAL_DEPEND_PKG([EET], [emile]) -requirements_pc_eet="${requirements_pc_eet} ${requirements_pc_emile}" -requirements_cflags_eet="${requirements_cflags_eet} ${requirements_cflags_emile}" EFL_EVAL_PKGS([EET]) @@ -2542,19 +2538,6 @@ AC_ARG_ENABLE([pixman-image-scale-sample], ], [have_pixman_image_scale_sample="no"]) -# Tile rotate -AC_ARG_ENABLE([tile-rotate], - [AS_HELP_STRING([--enable-tile-rotate],[Enable tiled rotate algorithm. @<:@default=disabled@:>@])], - [ - if test "x${enableval}" = "xyes" ; then - have_tile_rotate="yes" - CFOPT_WARNING="xyes" - else - have_tile_rotate="no" - fi - ], - [have_tile_rotate="no"]) - # Ecore Buffer AC_ARG_ENABLE([ecore-buffer], [AS_HELP_STRING([--enable-ecore-buffer],[enable ecore-buffer. @<:@default=disabled@:>@])], @@ -2989,13 +2972,6 @@ AC_CHECK_LIB([m], [lround], ### Configuration -## Tile rotation - -if test "x${have_tile_rotate}" = "xyes" ; then - AC_DEFINE(TILE_ROTATE, 1, [Enable tiled rotate algorithm]) -fi - - ## dither options AC_ARG_WITH([evas-dither-mask], diff --git a/examples_checks.py b/examples_checks.py new file mode 100755 index 0000000000..fa9badc728 --- /dev/null +++ b/examples_checks.py @@ -0,0 +1,142 @@ +#!/usr/bin/python3 +import os +import sys +import subprocess +import json +import time +import concurrent.futures +import argparse +import tempfile + +# +# preparation calls for the examples +# + +def prep_eina_file_02(): + f = tempfile.NamedTemporaryFile(delete=False) + f.write(b"Simulation") + return [f.name, "/tmp/copy_file"] + +def prep_eina_xattr_01(): + f = tempfile.NamedTemporaryFile(delete=False) + f.write(b"Simulation") + return ["list", f.name] + +def prep_eina_xattr_02(): + f1 = tempfile.NamedTemporaryFile(delete=False) + f1.write(b"Simulation") + f2 = tempfile.NamedTemporaryFile(delete=False) + f2.write(b"Simulation2") + return [f1.name, f2.name] + +def prep_eet_data_simple(): + f1 = tempfile.NamedTemporaryFile(delete=False) + f1.write(b"Simulation") + f2 = tempfile.NamedTemporaryFile(delete=False) + f2.write(b"Simulation2") + return [f1.name, f2.name] + +def prep_eet_data_nested(): + f1 = tempfile.NamedTemporaryFile(delete=False) + f1.write(b"Simulation") + f2 = tempfile.NamedTemporaryFile(delete=False) + f2.write(b"Simulation2") + return [f1.name, f2.name] + +def prep_eet_data_file_descriptor_01(): + f1 = tempfile.NamedTemporaryFile(delete=False) + f1.write(b"Simulation") + f2 = tempfile.NamedTemporaryFile(delete=False) + f2.write(b"Simulation2") + return [f1.name, f2.name, "acc", "Example-Simulation"] + +def prep_eet_data_file_descriptor_02(): + f1 = tempfile.NamedTemporaryFile(delete=False) + f1.write(b"Simulation") + f2 = tempfile.NamedTemporaryFile(delete=False) + f2.write(b"Simulation2") + return [f1.name, f2.name, "union", "5", "Example-Simulation"] + +example_preparation = { + "eina_file_02" : prep_eina_file_02, + "eina_xattr_01" : prep_eina_xattr_01, + "eina_xattr_02" : prep_eina_xattr_02, + "eet-data-simple" : prep_eet_data_simple, + "eet-data-nested" : prep_eet_data_nested, + "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, +} + +# +# Holds up the state of the ran examples +# + +class State: + def __init__(self, examples): + self.max_n = examples + self.n = 1 + self.count_fail = 0 + self.count_success = 0 + self.count_err_output = 0 + print("Found "+str(self.max_n)+" Examples") + + def add_run(self, command, error_in_output, exitcode): + print("{}/{} {} {} {} ".format(self.n, self.max_n, ("SUCCESS" if exitcode == 0 else "FAIL"), ("CLEAN" if error_in_output == False else "ERR"), command)) + self.n = self.n + 1 + if exitcode != 0: + self.count_fail += 1 + if error_in_output == True: + self.count_err_output += 1 + if exitcode == 0 and error_in_output == False: + self.count_success += 1 + + def print_summary(self): + print("Summary") + print(" Failed: "+str(self.count_fail)+"/"+str(self.max_n)) + print(" Errored: "+str(self.count_err_output)+"/"+str(self.max_n)) + print(" Success: "+str(self.count_success)+"/"+str(self.max_n)) + +# +# this simulates the startup of the example, and the closing after 1s +# + +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, + stdout = subprocess.PIPE, + stderr = subprocess.PIPE, + ) + time.sleep(1) + run.terminate() + try: + outs, errs = run.communicate(timeout=2) + except Exception as e: + run.kill() + return (example, True, -1) + else: + return (example, True if b'ERR' in outs or b'ERR' in errs else False, run.poll()) + + +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"], + stdout = subprocess.PIPE, + stderr = subprocess.PIPE, +) +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"] +state = State(len(examples)) +#simulate all examples in parallel with up to 5 runners +with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor: + futures = [executor.submit(simulate_example, example) for example in examples] + for future in concurrent.futures.as_completed(futures): + example_run = future.result() + state.add_run(example_run[0], example_run[1], example_run[2]) +state.print_summary() diff --git a/src/Makefile_Ector.am b/src/Makefile_Ector.am index ccd96d14d1..c74346a9d9 100644 --- a/src/Makefile_Ector.am +++ b/src/Makefile_Ector.am @@ -163,6 +163,7 @@ lib_ector_libector_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/ector\" \ +-DEFL_BETA_API_SUPPORT=1 \ @VALGRIND_CFLAGS@ \ @SSE3_CFLAGS@ diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index edc977363a..fe6a821257 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -1822,6 +1822,7 @@ TESTS += tests/elementary/elm_suite tests/elementary/efl_ui_suite tests_elementary_elm_suite_SOURCES = \ tests/elementary/suite_helpers.c \ tests/elementary/elm_suite.c \ + tests/elementary/elm_suite_build.c \ tests/elementary/elm_test_atspi.c \ tests/elementary/elm_test_check.c \ tests/elementary/elm_test_colorselector.c \ @@ -1922,6 +1923,7 @@ tests_elementary_efl_ui_suite_SOURCES = \ tests/elementary/suite_helpers.c \ tests/elementary/suite_helpers.h \ tests/elementary/efl_ui_suite.c \ + tests/elementary/efl_ui_build.c \ tests/elementary/elm_test_init.c \ tests/elementary/efl_ui_test_atspi.c \ tests/elementary/efl_ui_test_focus_common.c \ @@ -1929,6 +1931,7 @@ tests_elementary_efl_ui_suite_SOURCES = \ tests/elementary/efl_ui_test_focus.c \ 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_table.c \ tests/elementary/efl_ui_test_relative_layout.c \ tests/elementary/efl_ui_test_grid.c \ diff --git a/src/Makefile_Eolian.am b/src/Makefile_Eolian.am index c3a6d7b364..06c7638c8e 100644 --- a/src/Makefile_Eolian.am +++ b/src/Makefile_Eolian.am @@ -159,13 +159,10 @@ tests/eolian/data/struct_ref.h \ tests/eolian/data/struct_ref_stub.h \ tests/eolian/data/owning.eo.c \ tests/eolian/data/class_simple_ref.c \ -tests/eolian/data/class_simple_ref.legacy.c \ tests/eolian/data/override_ref.c \ tests/eolian/data/class_simple_ref_eo.h \ -tests/eolian/data/class_simple_ref_legacy.h \ tests/eolian/data/import_types_ref.h \ tests/eolian/data/docs_ref.h \ -tests/eolian/data/docs_ref_legacy.h \ tests/eolian/data/function_types_ref.h \ tests/eolian/data/function_as_argument_impl_ref.c \ tests/eolian/data/function_as_argument_ref.c \ diff --git a/src/bin/eeze/eeze_scanner/eeze_scanner.c b/src/bin/eeze/eeze_scanner/eeze_scanner.c index c4d23ea34f..9236b6ab3b 100644 --- a/src/bin/eeze/eeze_scanner/eeze_scanner.c +++ b/src/bin/eeze/eeze_scanner/eeze_scanner.c @@ -513,7 +513,7 @@ main(void) } efl_event_callback_add(server, EFL_NET_SERVER_EVENT_CLIENT_ADD, cl_add, NULL); - efl_event_callback_add(server, EFL_NET_SERVER_EVENT_ERROR, server_error, NULL); + efl_event_callback_add(server, EFL_NET_SERVER_EVENT_SERVER_ERROR, server_error, NULL); #ifdef EFL_NET_SERVER_UNIX_CLASS { diff --git a/src/bin/efl/efl_debugd.c b/src/bin/efl/efl_debugd.c index fd2bc9e426..7baffd464d 100644 --- a/src/bin/efl/efl_debugd.c +++ b/src/bin/efl/efl_debugd.c @@ -570,7 +570,7 @@ _local_server_create(void) } efl_event_callback_add(_local_server, EFL_NET_SERVER_EVENT_CLIENT_ADD, _client_add, NULL); - efl_event_callback_add(_local_server, EFL_NET_SERVER_EVENT_ERROR, _error, NULL); + efl_event_callback_add(_local_server, EFL_NET_SERVER_EVENT_SERVER_ERROR, _error, NULL); #ifdef EFL_NET_SERVER_UNIX_CLASS { @@ -620,7 +620,7 @@ _remote_server_create(void) efl_net_server_fd_reuse_address_set(inner_server, EINA_TRUE); } efl_event_callback_add(_remote_server, EFL_NET_SERVER_EVENT_CLIENT_ADD, _client_add, NULL); - efl_event_callback_add(_remote_server, EFL_NET_SERVER_EVENT_ERROR, _error, NULL); + efl_event_callback_add(_remote_server, EFL_NET_SERVER_EVENT_SERVER_ERROR, _error, NULL); sprintf(address, "127.0.0.1:%d", REMOTE_SERVER_PORT); err = efl_net_server_serve(_remote_server, address); diff --git a/src/bin/elementary/test_ui_box.c b/src/bin/elementary/test_ui_box.c index c5b9db8d56..0021be5603 100644 --- a/src/bin/elementary/test_ui_box.c +++ b/src/bin/elementary/test_ui_box.c @@ -179,15 +179,7 @@ homo_check_cb(void *data, const Efl_Event *event) { Eina_Bool chk = elm_check_selected_get(event->object); Eo *box = efl_key_wref_get(data, "box"); - efl_ui_box_flow_homogenous_set(box, chk); -} - -static void -max_size_check_cb(void *data, const Efl_Event *event) -{ - Eina_Bool chk = elm_check_selected_get(event->object); - Eo *box = efl_key_wref_get(data, "box"); - efl_ui_box_flow_max_size_set(box, chk); + efl_ui_box_homogeneous_set(box, chk); } static void @@ -358,14 +350,6 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in efl_pack(bx, o); efl_gfx_entity_visible_set(o, 1); - o = elm_check_add(win); - elm_check_selected_set(o, 0); - elm_object_text_set(o, "Homogenous + Max"); - efl_event_callback_add(o, EFL_UI_CHECK_EVENT_CHANGED, max_size_check_cb, win); - efl_gfx_hint_align_set(o, 0, 0); - efl_pack(bx, o); - efl_gfx_entity_visible_set(o, 1); - o = elm_check_add(win); elm_check_selected_set(o, 0); elm_object_text_set(o, "Custom layout"); diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c index 5690594230..39fa89a429 100644 --- a/src/bin/eolian/docs.c +++ b/src/bin/eolian/docs.c @@ -111,7 +111,7 @@ _generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf, if (!fn) goto noref; - Eina_Stringshare *fcn = eolian_function_full_c_name_get(fn, ftype, use_legacy); + Eina_Stringshare *fcn = eolian_function_full_c_name_get(fn, ftype); if (!fcn) goto noref; eina_strbuf_append(wbuf, fcn); eina_stringshare_del(fcn); @@ -408,8 +408,7 @@ eo_gen_docs_event_gen(const Eolian_State *state, const Eolian_Event *ev, Eina_Strbuf * eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, - Eolian_Function_Type ftype, int indent, - Eina_Bool use_legacy) + Eolian_Function_Type ftype, int indent) { const Eolian_Function_Parameter *par = NULL; const Eolian_Function_Parameter *vpar = NULL; @@ -427,28 +426,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, int curl = 0; - const char *group = NULL; - char legacy_group_name[1024]; - if (use_legacy) - { - // Generate legacy doxygen group name - const char *prefix = - eolian_class_legacy_prefix_get(eolian_function_class_get(fid)); - unsigned int i; - snprintf(legacy_group_name, sizeof(legacy_group_name), - "%s_Group", prefix); - for (i = 0; i < strlen(legacy_group_name); i++) - { - if ((i == 0) || (legacy_group_name[i - 1] == '_')) - legacy_group_name[i] = toupper(legacy_group_name[i]); - } - group = legacy_group_name; - } - else - { - group = eolian_class_name_get(eolian_function_class_get(fid)); - } - + const char *group = eolian_class_name_get(eolian_function_class_get(fid)); const Eolian_Implement *fimp = eolian_function_implement_get(fid); if (ftype == EOLIAN_METHOD) @@ -539,7 +517,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, if (!desc && !par && !vpar && !rdoc && (ftype == EOLIAN_METHOD || !pdoc)) { _gen_doc_brief(state, sum ? sum : "No description supplied.", since, group, - NULL, indent, buf, use_legacy); + NULL, indent, buf, EINA_FALSE); return buf; } @@ -550,7 +528,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, eina_strbuf_append(buf, " * @brief "); curl += sizeof(" * @brief ") - 1; _append_section(state, sum ? sum : "No description supplied.", - indent, curl, buf, wbuf, use_legacy); + indent, curl, buf, wbuf, EINA_FALSE); eina_strbuf_append_char(buf, '\n'); if (desc || since || par || rdoc || pdoc) @@ -563,7 +541,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, { curl = _indent_line(buf, indent); eina_strbuf_append(buf, " * "); - _append_section(state, desc, indent, curl + 3, buf, wbuf, use_legacy); + _append_section(state, desc, indent, curl + 3, buf, wbuf, EINA_FALSE); eina_strbuf_append_char(buf, '\n'); if (par || rdoc || pdoc || since) { @@ -578,7 +556,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, curl = _indent_line(buf, indent); eina_strbuf_append(buf, " * "); _append_section(state, eolian_documentation_summary_get(pdoc), indent, - curl + 3, buf, wbuf, use_legacy); + curl + 3, buf, wbuf, EINA_FALSE); eina_strbuf_append_char(buf, '\n'); if (pdesc) { @@ -586,7 +564,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, eina_strbuf_append(buf, " *\n"); curl = _indent_line(buf, indent); eina_strbuf_append(buf, " * "); - _append_section(state, pdesc, indent, curl + 3, buf, wbuf, use_legacy); + _append_section(state, pdesc, indent, curl + 3, buf, wbuf, EINA_FALSE); eina_strbuf_append_char(buf, '\n'); } if (par || rdoc || since) @@ -641,7 +619,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, eina_strbuf_append_char(buf, ' '); curl += 1; _append_section(state, eolian_documentation_summary_get(adoc), - indent, curl, buf, wbuf, use_legacy); + indent, curl, buf, wbuf, EINA_FALSE); } eina_strbuf_append_char(buf, '\n'); @@ -674,7 +652,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, eina_strbuf_append(buf, " * @return "); curl += sizeof(" * @return ") - 1; _append_section(state, eolian_documentation_summary_get(rdoc), indent, - curl, buf, wbuf, use_legacy); + curl, buf, wbuf, EINA_FALSE); eina_strbuf_append_char(buf, '\n'); if (since) { diff --git a/src/bin/eolian/docs.h b/src/bin/eolian/docs.h index 79112f9758..91866ec012 100644 --- a/src/bin/eolian/docs.h +++ b/src/bin/eolian/docs.h @@ -22,12 +22,11 @@ Eina_Strbuf *eo_gen_docs_full_gen(const Eolian_State *state, const Eolian_Docume * @param[in] fid te function * @param[in] type the function type (either METHOD, PROP_GET, PROP_SET) * @param[in] indent by how many spaces to indent the comment from second line - * @param[in] use_legacy whether to use legacy names * * @return A documentation comment * */ -Eina_Strbuf *eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, Eolian_Function_Type ftype, int indent, Eina_Bool use_legacy); +Eina_Strbuf *eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, Eolian_Function_Type ftype, int indent); /* * @brief Generate event documentation diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c index 7fbd576082..cc3b0ee293 100644 --- a/src/bin/eolian/headers.c +++ b/src/bin/eolian/headers.c @@ -67,10 +67,9 @@ eo_gen_params(Eina_Iterator *itr, Eina_Strbuf *buf, static void _gen_func(const Eolian_State *state, const Eolian_Function *fid, - Eolian_Function_Type ftype, Eina_Strbuf *buf, char *cname, - char *cnameu, Eina_Bool legacy) + Eolian_Function_Type ftype, Eina_Strbuf *buf, char *cnameu) { - Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype, legacy); + Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype); if (!fcn) return; @@ -90,11 +89,9 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid, Eolian_Object_Scope fsc = eolian_function_scope_get(fid, ftype); - /* this one will never be satisfied in legacy */ if (eolian_function_is_beta(fid)) eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n"); - /* XXX: is this right? we expose potentially internal stuff into legacy */ - if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED)) + if (fsc == EOLIAN_SCOPE_PROTECTED) eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu); const Eolian_Implement *fimp = eolian_function_implement_get(fid); @@ -104,12 +101,12 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid, hasdoc = !!eolian_implement_documentation_get(fimp, EOLIAN_PROPERTY); if (hasdoc) { - Eina_Strbuf *dbuf = eo_gen_docs_func_gen(state, fid, ftype, 0, legacy); + Eina_Strbuf *dbuf = eo_gen_docs_func_gen(state, fid, ftype, 0); eina_strbuf_append(buf, eina_strbuf_string_get(dbuf)); eina_strbuf_append_char(buf, '\n'); eina_strbuf_free(dbuf); } - eina_strbuf_append(buf, legacy ? "EAPI " : "EOAPI "); + eina_strbuf_append(buf, "EOAPI "); if (rtp) { Eina_Stringshare *rtps = eolian_type_c_type_get(rtp, EOLIAN_C_TYPE_RETURN); @@ -135,10 +132,7 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid, { eina_strbuf_append(buf, "const "); } - if (legacy) - eina_strbuf_append_printf(buf, "%s *obj", cname); - else - eina_strbuf_append(buf, "Eo *obj"); + eina_strbuf_append(buf, "Eo *obj"); } eo_gen_params(eolian_property_keys_get(fid, ftype), buf, &flagbuf, &nidx, EOLIAN_PROPERTY); @@ -174,7 +168,7 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid, } eina_strbuf_append(buf, ";\n"); - if (!legacy && (fsc == EOLIAN_SCOPE_PROTECTED)) + if (fsc == EOLIAN_SCOPE_PROTECTED) eina_strbuf_append_printf(buf, "#endif\n"); if (eolian_function_is_beta(fid)) eina_strbuf_append_printf(buf, "#endif /* EFL_BETA_API_SUPPORT */\n"); @@ -184,129 +178,119 @@ void eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Bool legacy) { - if (!cl) + if (!cl || legacy) return; - char *cname = NULL, *cnameu = NULL; - eo_gen_class_names_get(cl, &cname, &cnameu, NULL); + Eina_Iterator *itr; + Eolian_Event *ev; + char *cnameu = NULL; + eo_gen_class_names_get(cl, NULL, &cnameu, NULL); /* class definition */ - if (!legacy && eolian_class_is_beta(cl)) + if (eolian_class_is_beta(cl)) { eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n"); } - if (!legacy) + const Eolian_Documentation *doc = eolian_class_documentation_get(cl); + if (doc) { - const Eolian_Documentation *doc = eolian_class_documentation_get(cl); - if (doc) + Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc, + eolian_class_name_get(cl), 0, EINA_FALSE); + if (cdoc) { - Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc, - eolian_class_name_get(cl), 0, EINA_FALSE); - if (cdoc) - { - eina_strbuf_append(buf, eina_strbuf_string_get(cdoc)); - eina_strbuf_append_char(buf, '\n'); - eina_strbuf_free(cdoc); - } + eina_strbuf_append(buf, eina_strbuf_string_get(cdoc)); + eina_strbuf_append_char(buf, '\n'); + eina_strbuf_free(cdoc); } - - Eina_Stringshare *mname = eolian_class_c_name_get(cl); - Eina_Stringshare *gname = eolian_class_c_get_function_name_get(cl); - eina_strbuf_append_printf(buf, "#define %s %s()\n\n", mname, gname); - eina_stringshare_del(mname); - - eina_strbuf_append_printf(buf, "EWAPI const Efl_Class *%s(void);\n", gname); - eina_stringshare_del(gname); } - /* method section */ - { - Eina_Iterator *itr = eolian_class_implements_get(cl); - if (!itr) - goto events; + Eina_Stringshare *mname = eolian_class_c_name_get(cl); + Eina_Stringshare *gname = eolian_class_c_get_function_name_get(cl); + eina_strbuf_append_printf(buf, "#define %s %s()\n\n", mname, gname); + eina_stringshare_del(mname); - const Eolian_Implement *imp; - EINA_ITERATOR_FOREACH(itr, imp) - { - if (eolian_implement_class_get(imp) != cl) - continue; - Eolian_Function_Type ftype = EOLIAN_UNRESOLVED; - const Eolian_Function *fid = eolian_implement_function_get(imp, &ftype); - /* beta can only exist for eo api */ - if (legacy && eolian_function_is_beta(fid)) - continue; - eina_strbuf_append_char(buf, '\n'); - switch (ftype) - { - case EOLIAN_PROP_GET: - case EOLIAN_PROP_SET: - _gen_func(state, fid, ftype, buf, cname, cnameu, legacy); - break; - case EOLIAN_PROPERTY: - _gen_func(state, fid, EOLIAN_PROP_SET, buf, cname, cnameu, legacy); - eina_strbuf_append_char(buf, '\n'); - _gen_func(state, fid, EOLIAN_PROP_GET, buf, cname, cnameu, legacy); - break; - default: - _gen_func(state, fid, EOLIAN_METHOD, buf, cname, cnameu, legacy); - } - } - eina_iterator_free(itr); - } + eina_strbuf_append_printf(buf, "EWAPI const Efl_Class *%s(void);\n", gname); + eina_stringshare_del(gname); + + /* method section */ + itr = eolian_class_implements_get(cl); + if (!itr) + goto events; + + const Eolian_Implement *imp; + EINA_ITERATOR_FOREACH(itr, imp) + { + if (eolian_implement_class_get(imp) != cl) + continue; + Eolian_Function_Type ftype = EOLIAN_UNRESOLVED; + const Eolian_Function *fid = eolian_implement_function_get(imp, &ftype); + eina_strbuf_append_char(buf, '\n'); + switch (ftype) + { + case EOLIAN_PROP_GET: + case EOLIAN_PROP_SET: + _gen_func(state, fid, ftype, buf, cnameu); + break; + case EOLIAN_PROPERTY: + _gen_func(state, fid, EOLIAN_PROP_SET, buf, cnameu); + eina_strbuf_append_char(buf, '\n'); + _gen_func(state, fid, EOLIAN_PROP_GET, buf, cnameu); + break; + default: + _gen_func(state, fid, EOLIAN_METHOD, buf, cnameu); + } + } + eina_iterator_free(itr); events: /* event section */ - if (!legacy) + itr = eolian_class_events_get(cl); + EINA_ITERATOR_FOREACH(itr, ev) { - Eina_Iterator *itr = eolian_class_events_get(cl); - Eolian_Event *ev; - EINA_ITERATOR_FOREACH(itr, ev) + Eina_Stringshare *evn = eolian_event_c_name_get(ev); + Eolian_Object_Scope evs = eolian_event_scope_get(ev); + + if (evs == EOLIAN_SCOPE_PRIVATE) + continue; + + if (eolian_event_is_beta(ev)) { - Eina_Stringshare *evn = eolian_event_c_name_get(ev); - Eolian_Object_Scope evs = eolian_event_scope_get(ev); - - if (evs == EOLIAN_SCOPE_PRIVATE) - continue; - - if (eolian_event_is_beta(ev)) - { - eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n"); - } - if (evs == EOLIAN_SCOPE_PROTECTED) - { - if (!eolian_event_is_beta(ev)) - eina_strbuf_append_char(buf, '\n'); - eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu); - } - - if (!eolian_event_is_beta(ev) && evs == EOLIAN_SCOPE_PUBLIC) - eina_strbuf_append_char(buf, '\n'); - - eina_strbuf_append_printf(buf, "EWAPI extern const " - "Efl_Event_Description _%s;\n\n", evn); - - Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(state, ev, - eolian_class_name_get(cl)); - eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf)); - eina_strbuf_append_char(buf, '\n'); - eina_strbuf_free(evdbuf); - eina_strbuf_append_printf(buf, "#define %s (&(_%s))\n", evn, evn); - - if (evs == EOLIAN_SCOPE_PROTECTED) - eina_strbuf_append(buf, "#endif\n"); - if (eolian_event_is_beta(ev)) - eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n"); - - eina_stringshare_del(evn); + eina_strbuf_append(buf, "#ifdef EFL_BETA_API_SUPPORT\n"); } - eina_iterator_free(itr); + if (evs == EOLIAN_SCOPE_PROTECTED) + { + if (!eolian_event_is_beta(ev)) + eina_strbuf_append_char(buf, '\n'); + eina_strbuf_append_printf(buf, "#ifdef %s_PROTECTED\n", cnameu); + } + + if (!eolian_event_is_beta(ev) && evs == EOLIAN_SCOPE_PUBLIC) + eina_strbuf_append_char(buf, '\n'); + + eina_strbuf_append_printf(buf, "EWAPI extern const " + "Efl_Event_Description _%s;\n\n", evn); + + Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(state, ev, + eolian_class_name_get(cl)); + eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf)); + eina_strbuf_append_char(buf, '\n'); + eina_strbuf_free(evdbuf); + eina_strbuf_append_printf(buf, "#define %s (&(_%s))\n", evn, evn); + + if (evs == EOLIAN_SCOPE_PROTECTED) + eina_strbuf_append(buf, "#endif\n"); + if (eolian_event_is_beta(ev)) + eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n"); + + eina_stringshare_del(evn); } - if (!legacy && eolian_class_is_beta(cl)) + eina_iterator_free(itr); + + if (eolian_class_is_beta(cl)) { eina_strbuf_append(buf, "#endif /* EFL_BETA_API_SUPPORT */\n"); } - free(cname); free(cnameu); } diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c index c847b0cb9f..06f32fd418 100644 --- a/src/bin/eolian/main.c +++ b/src/bin/eolian/main.c @@ -396,47 +396,20 @@ _write_source(const Eolian_State *eos, const char *ofname, { INF("generating source: %s", ofname); Eina_Strbuf *buf = eina_strbuf_new(); - Eina_Strbuf *lbuf = eina_strbuf_new(); - Eina_Strbuf *oflname = eina_strbuf_new(); Eina_Bool ret = EINA_FALSE; - const char *lext = strrchr(ofname, '.'); - if (!lext) - { - eina_strbuf_append(oflname, ofname); - eina_strbuf_append(oflname, ".legacy.c"); - } - else - { - eina_strbuf_append_length(oflname, ofname, strlen(ofname) - strlen(lext)); - eina_strbuf_append(oflname, ".legacy"); - eina_strbuf_append(oflname, lext); - } - const char *lfname = eina_strbuf_string_get(oflname); - { - const char *p1 = strrchr(lfname, '/'); - const char *p2 = strrchr(lfname, '\\'); - lfname = (p1 || p2) ? ((p1 > p2) ? (p1 + 1) : (p2 + 1)) : lfname; - } const Eolian_Class *cl = eolian_state_class_by_file_get(eos, ifname); eo_gen_types_source_gen(eolian_state_objects_by_file_get(eos, ifname), buf); - eo_gen_source_gen(cl, buf, lbuf, lfname); + eo_gen_source_gen(cl, buf); if (cl || (eot && eina_strbuf_length_get(buf))) { if (!_write_file(ofname, buf)) goto done; - if (eina_strbuf_length_get(lbuf)) - { - if (!_write_file(eina_strbuf_string_get(oflname), lbuf)) - goto done; - } ret = EINA_TRUE; } done: eina_strbuf_free(buf); - eina_strbuf_free(lbuf); - eina_strbuf_free(oflname); return ret; } diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c index a973dd35f5..923c7ba14f 100644 --- a/src/bin/eolian/sources.c +++ b/src/bin/eolian/sources.c @@ -351,14 +351,14 @@ _gen_reflect_get(Eina_Strbuf *buf, const char *cnamel, const Eolian_Type *valt, eina_hash_set(refh, &fid, (void *)EOLIAN_PROP_GET); eina_strbuf_append(buf, "\nstatic Eina_Value\n"); - eina_strbuf_append_printf(buf, "__eolian_%s_%s_get_reflect(Eo *obj)\n", + eina_strbuf_append_printf(buf, "__eolian_%s_%s_get_reflect(const Eo *obj)\n", cnamel, eolian_function_name_get(fid)); eina_strbuf_append(buf, "{\n"); Eina_Stringshare *ct = eolian_type_c_type_get(valt, EOLIAN_C_TYPE_RETURN); const char *starsp = (ct[strlen(ct) - 1] != '*') ? " " : ""; - Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_GET, EINA_FALSE); + Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_GET); eina_strbuf_append_printf(buf, " %s%sval = %s(obj);\n", ct, starsp, fcn); eina_stringshare_del(fcn); eina_stringshare_del(ct); @@ -402,7 +402,7 @@ _gen_reflect_set(Eina_Strbuf *buf, const char *cnamel, const Eolian_Type *valt, eina_strbuf_append(buf, " goto end;\n"); eina_strbuf_append(buf, " }\n"); - Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_SET, EINA_FALSE); + Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, EOLIAN_PROP_SET); eina_strbuf_append_printf(buf, " %s(obj, cval);\n", fcn); eina_stringshare_del(fcn); @@ -449,8 +449,7 @@ _emit_class_function(Eina_Strbuf *buf, const Eolian_Function *fid, const Eolian_ static void _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, Eolian_Function_Type ftype, Eina_Strbuf *buf, - const Eolian_Implement *impl, Eina_Strbuf *lbuf, - Eina_Hash *refh) + const Eolian_Implement *impl, Eina_Hash *refh) { Eina_Bool is_empty = eolian_implement_is_empty(impl, ftype); Eina_Bool is_auto = eolian_implement_is_auto(impl, ftype); @@ -819,7 +818,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, { //we have owned parameters we need to take care of eina_strbuf_append_printf(buf, "static void\n"); - eina_strbuf_append_printf(buf, "_%s_ownership_fallback(%s)\n{\n", eolian_function_full_c_name_get(fid, ftype, EINA_FALSE), eina_strbuf_string_get(params_full) + 2); + eina_strbuf_append_printf(buf, "_%s_ownership_fallback(%s)\n{\n", eolian_function_full_c_name_get(fid, ftype), eina_strbuf_string_get(params_full) + 2); eina_strbuf_append_buffer(buf, fallback_free_ownership); eina_strbuf_append_printf(buf, "}\n\n"); @@ -842,7 +841,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, eina_strbuf_append_char(buf, '('); - Eina_Stringshare *eofn = eolian_function_full_c_name_get(fid, ftype, EINA_FALSE); + Eina_Stringshare *eofn = eolian_function_full_c_name_get(fid, ftype); eina_strbuf_append(buf, eofn); if (strcmp(rtpn, "void")) @@ -852,7 +851,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, } if (fallback_free_ownership) - eina_strbuf_append_printf(buf, ", _%s_ownership_fallback(%s);", eolian_function_full_c_name_get(fid, ftype, EINA_FALSE), eina_strbuf_string_get(params)); + eina_strbuf_append_printf(buf, ", _%s_ownership_fallback(%s);", eolian_function_full_c_name_get(fid, ftype), eina_strbuf_string_get(params)); if (has_params) { @@ -864,59 +863,10 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, eina_strbuf_append(buf, ");\n"); - /* now try legacy */ - Eina_Stringshare *lfn = eolian_function_full_c_name_get(fid, ftype, EINA_TRUE); - if (!eolian_function_is_beta(fid) && lfn) - { - eina_strbuf_append(lbuf, "\nEAPI "); - eina_strbuf_append(lbuf, rtpn); - eina_strbuf_append_char(lbuf, '\n'); - eina_strbuf_append(lbuf, lfn); - /* param list */ - eina_strbuf_append_char(lbuf, '('); - /* for class funcs, offset the params to remove comma */ - int poff = 2; - if (!eolian_function_is_class(fid)) - { - /* non-class funcs have the obj though */ - poff = 0; - if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid)) - eina_strbuf_append(lbuf, "const "); - eina_strbuf_append_printf(lbuf, "%s *obj", cname); - } - eina_strbuf_append(lbuf, eina_strbuf_string_get(params_full) + poff); - eina_strbuf_append(lbuf, ")\n{\n"); - /* body */ - if (strcmp(rtpn, "void")) - eina_strbuf_append(lbuf, " return "); - else - eina_strbuf_append(lbuf, " "); - eina_strbuf_append(lbuf, eofn); - eina_strbuf_append_char(lbuf, '('); - if (!eolian_function_is_class(fid)) - eina_strbuf_append(lbuf, "obj"); - else - { - Eina_Stringshare *mname = eolian_class_c_name_get(cl); - eina_strbuf_append(lbuf, mname); - eina_stringshare_del(mname); - } - if (has_params) - eina_strbuf_append_printf(lbuf, ", %s", eina_strbuf_string_get(params)); - eina_strbuf_append(lbuf, ");\n}\n"); - } - - eina_stringshare_del(lfn); eina_stringshare_del(eofn); } if (impl_same_class && eolian_function_is_class(fid)) - { - const char *legacy_name = eolian_function_full_c_name_get(fid, ftype, EINA_TRUE); - - _emit_class_function(buf, fid, rtp, params_full, ocnamel, func_suffix, params, eolian_function_full_c_name_get(fid, ftype, EINA_FALSE)); - if (legacy_name) - _emit_class_function(buf, fid, rtp, params_full, ocnamel, func_suffix, params, legacy_name); - } + _emit_class_function(buf, fid, rtp, params_full, ocnamel, func_suffix, params, eolian_function_full_c_name_get(fid, ftype)); free(cname); free(cnamel); @@ -937,7 +887,7 @@ _gen_opfunc(const Eolian_Function *fid, Eolian_Function_Type ftype, Eina_Strbuf *buf, const Eolian_Implement *impl, Eina_Bool pinit, const char *cnamel, const char *ocnamel) { - Eina_Stringshare *fnm = eolian_function_full_c_name_get(fid, ftype, EINA_FALSE); + Eina_Stringshare *fnm = eolian_function_full_c_name_get(fid, ftype); eina_strbuf_append(buf, " EFL_OBJECT_OP_FUNC("); eina_strbuf_append(buf, fnm); eina_strbuf_append(buf, ", "); @@ -1086,8 +1036,7 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Hash *refh) } void -eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf, - const char *lfname) +eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf) { if (!cl) return; @@ -1135,14 +1084,14 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf, { case EOLIAN_PROP_GET: case EOLIAN_PROP_SET: - _gen_func(cl, fid, ftype, buf, imp, lbuf, refh); + _gen_func(cl, fid, ftype, buf, imp, refh); break; case EOLIAN_PROPERTY: - _gen_func(cl, fid, EOLIAN_PROP_SET, buf, imp, lbuf, refh); - _gen_func(cl, fid, EOLIAN_PROP_GET, buf, imp, lbuf, refh); + _gen_func(cl, fid, EOLIAN_PROP_SET, buf, imp, refh); + _gen_func(cl, fid, EOLIAN_PROP_GET, buf, imp, refh); break; default: - _gen_func(cl, fid, EOLIAN_METHOD, buf, imp, lbuf, refh); + _gen_func(cl, fid, EOLIAN_METHOD, buf, imp, refh); } } eina_iterator_free(itr); @@ -1230,10 +1179,6 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf, /* terminate inherits */ eina_strbuf_append(buf, ", NULL);\n"); - /* append legacy include if there */ - if (eina_strbuf_length_get(lbuf)) - eina_strbuf_append_printf(buf, "\n#include \"%s\"\n", lfname); - /* and we're done */ free(cnamel); eina_hash_free(_funcs_params_init_get); @@ -1395,7 +1340,7 @@ _gen_proto(const Eolian_Class *cl, const Eolian_Function *fid, if (strlen(efname) >= (sizeof("destructor") - 1) && !impl_same_class) if (!strcmp(efname + strlen(efname) - sizeof("destructor") + 1, "destructor")) { - Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype, EINA_FALSE); + Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype); Eina_Stringshare *mname = eolian_class_c_name_get(cl); eina_strbuf_append(buf, " "); eina_strbuf_append(buf, fcn); diff --git a/src/bin/eolian/sources.h b/src/bin/eolian/sources.h index 04d6988a0e..05d711458b 100644 --- a/src/bin/eolian/sources.h +++ b/src/bin/eolian/sources.h @@ -3,7 +3,7 @@ #include "main.h" -void eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Strbuf *lbuf, const char *lfname); +void eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf *buf); void eo_gen_impl_gen(const Eolian_Class *cl, Eina_Strbuf *buf); #endif diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c index b8f7b98452..c2a2ea654f 100644 --- a/src/bin/eolian/types.c +++ b/src/bin/eolian/types.c @@ -156,6 +156,12 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp, eina_strbuf_reset(buf); break; } + eina_strbuf_append_char(buf, ';'); + if (eolian_typedecl_is_beta(tp)) + { + eina_strbuf_prepend(buf, "#ifdef EFL_BETA_API_SUPPORT\n"); + eina_strbuf_append(buf, "\n#endif /* EFL_BETA_API_SUPPORT */"); + } return buf; } @@ -200,6 +206,11 @@ _var_generate(const Eolian_State *state, const Eolian_Variable *vr, Eina_Bool le eina_stringshare_del(ct); } free(fn); + if (eolian_variable_is_beta(vr)) + { + eina_strbuf_prepend(buf, "#ifdef EFL_BETA_API_SUPPORT\n"); + eina_strbuf_append(buf, "\n#endif /* EFL_BETA_API_SUPPORT */"); + } return buf; } @@ -252,7 +263,7 @@ void eo_gen_types_header_gen(const Eolian_State *state, if (tbuf) { eina_strbuf_append(buf, eina_strbuf_string_get(tbuf)); - eina_strbuf_append(buf, ";\n\n"); + eina_strbuf_append(buf, "\n\n"); eina_strbuf_free(tbuf); } } diff --git a/src/bin/eolian_mono/eolian/mono/documentation.hh b/src/bin/eolian_mono/eolian/mono/documentation.hh index 764ecb8f36..bb746ffe9a 100644 --- a/src/bin/eolian_mono/eolian/mono/documentation.hh +++ b/src/bin/eolian_mono/eolian/mono/documentation.hh @@ -50,7 +50,7 @@ struct documentation_generator { case ::EOLIAN_METHOD: if (blacklist::is_function_blacklisted( - ::eolian_function_full_c_name_get(function, ftype, EINA_FALSE))) return ""; + ::eolian_function_full_c_name_get(function, ftype))) return ""; name += "."; name += name_helpers::managed_method_name( ::eolian_object_short_name_get(klass), eo_name); diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh index 2a2aa4c9eb..76e82bdbb1 100644 --- a/src/bin/eolian_mono/eolian/mono/events.hh +++ b/src/bin/eolian_mono/eolian/mono/events.hh @@ -51,6 +51,7 @@ struct unpack_event_args_visitor , {"int", [&arg] { return arg + ".ToInt32()"; }} , {"uint", [&arg] { return "(uint)" + arg + ".ToInt32()";}} , {"string", [&arg] { return "Eina.StringConversion.NativeUtf8ToManagedString(" + arg + ")"; }} + , {"stringshare", [&arg] { return "Eina.StringConversion.NativeUtf8ToManagedString(" + arg + ")"; }} , {"Eina.Error", [&arg] { return "(Eina.Error)Marshal.PtrToStructure(" + arg + ", typeof(Eina.Error))"; }} }; diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index 0e72db3c05..4d17e4790d 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -295,6 +295,7 @@ ffi.cdef [[ const char *eolian_object_name_get(const Eolian_Object *obj); const char *eolian_object_short_name_get(const Eolian_Object *obj); Eina_Iterator *eolian_object_namespaces_get(const Eolian_Object *obj); + Eina_Bool eolian_object_is_beta(const Eolian_Object *obj); Eina_Bool eolian_state_directory_add(Eolian_State *state, const char *dir); Eina_Bool eolian_state_system_directory_add(Eolian_State *state); Eina_Iterator *eolian_state_eo_file_paths_get(const Eolian_State *state); @@ -334,7 +335,6 @@ ffi.cdef [[ Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass); const Eolian_Documentation *eolian_class_documentation_get(const Eolian_Class *klass); - const char *eolian_class_legacy_prefix_get(const Eolian_Class *klass); const char *eolian_class_eo_prefix_get(const Eolian_Class *klass); const char *eolian_class_data_type_get(const Eolian_Class *klass); const Eolian_Class *eolian_class_parent_get(const Eolian_Class *klass); @@ -342,13 +342,10 @@ ffi.cdef [[ Eina_Iterator *eolian_class_functions_get(const Eolian_Class *klass, Eolian_Function_Type func_type); Eolian_Function_Type eolian_function_type_get(const Eolian_Function *function_id); Eolian_Object_Scope eolian_function_scope_get(const Eolian_Function *function_id, Eolian_Function_Type ftype); - const char *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype, Eina_Bool use_legacy); + const char *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype); const Eolian_Function *eolian_class_function_by_name_get(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type); - const char *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type); const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id); - Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype); Eina_Bool eolian_function_is_class(const Eolian_Function *function_id); - Eina_Bool eolian_function_is_beta(const Eolian_Function *function_id); Eina_Bool eolian_function_is_constructor(const Eolian_Function *function_id, const Eolian_Class *klass); Eina_Bool eolian_function_is_function_pointer(const Eolian_Function *function_id); Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype); @@ -385,7 +382,6 @@ ffi.cdef [[ const Eolian_Class *eolian_event_class_get(const Eolian_Event *event); const Eolian_Documentation *eolian_event_documentation_get(const Eolian_Event *event); Eolian_Object_Scope eolian_event_scope_get(const Eolian_Event *event); - Eina_Bool eolian_event_is_beta(const Eolian_Event *event); Eina_Bool eolian_event_is_hot(const Eolian_Event *event); Eina_Bool eolian_event_is_restart(const Eolian_Event *event); const char *eolian_event_c_name_get(const Eolian_Event *event); @@ -573,6 +569,10 @@ local object_idx, wrap_object = gen_wrap { namespaces_get = function(self) return iterator.String_Iterator( eolian.eolian_object_namespaces_get(cast_obj(self))) + end, + + is_beta = function(self) + return eolian.eolian_object_is_beta(cast_obj(self)) ~= 0 end } @@ -1063,36 +1063,22 @@ M.Function = ffi.metatype("Eolian_Function", { return tonumber(eolian.eolian_function_scope_get(self, ftype)) end, - full_c_name_get = function(self, ftype, use_legacy) - local v = eolian.eolian_function_full_c_name_get(self, ftype, use_legacy or false) + full_c_name_get = function(self, ftype) + local v = eolian.eolian_function_full_c_name_get(self, ftype) if v == nil then return nil end return ffi_stringshare(v) end, - legacy_get = function(self, ftype) - local v = eolian.eolian_function_legacy_get(self, ftype) - if v == nil then return nil end - return ffi.string(v) - end, - implement_get = function(self) local v = eolian.eolian_function_implement_get(self) if v == nil then return nil end return v end, - is_legacy_only = function(self, ftype) - return eolian.eolian_function_is_legacy_only(self, ftype) ~= 0 - end, - is_class = function(self) return eolian.eolian_function_is_class(self) ~= 0 end, - is_beta = function(self) - return eolian.eolian_function_is_beta(self) ~= 0 - end, - is_constructor = function(self, klass) return eolian.eolian_function_is_constructor(self, klass) ~= 0 end, @@ -1289,10 +1275,6 @@ ffi.metatype("Eolian_Event", { return ffi_stringshare(v) end, - is_beta = function(self) - return eolian.eolian_event_is_beta(self) ~= 0 - end, - is_hot = function(self) return eolian.eolian_event_is_hot(self) ~= 0 end, @@ -1323,12 +1305,6 @@ M.Class = ffi.metatype("Eolian_Class", { return v end, - legacy_prefix_get = function(self) - local v = eolian.eolian_class_legacy_prefix_get(self) - if v == nil then return nil end - return ffi.string(v) - end, - eo_prefix_get = function(self) local v = eolian.eolian_class_eo_prefix_get(self) if v == nil then diff --git a/src/examples/ecore/efl_io_buffered_stream_example.c b/src/examples/ecore/efl_io_buffered_stream_example.c index c7fe102890..1f816c7072 100644 --- a/src/examples/ecore/efl_io_buffered_stream_example.c +++ b/src/examples/ecore/efl_io_buffered_stream_example.c @@ -236,7 +236,7 @@ efl_main(void *data EINA_UNUSED, /* The TCP client to use to send/receive network data */ dialer = efl_add(EFL_NET_DIALER_TCP_CLASS, ev->object, efl_name_set(efl_added, "dialer"), - efl_event_callback_add(efl_added, EFL_NET_DIALER_EVENT_CONNECTED, _dialer_connected, NULL)); + efl_event_callback_add(efl_added, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _dialer_connected, NULL)); if (!dialer) { fprintf(stderr, "ERROR: could not create Efl_Net_Dialer_Tcp\n"); diff --git a/src/examples/ecore/efl_io_copier_example.c b/src/examples/ecore/efl_io_copier_example.c index 13f26b8577..d4e36b7070 100644 --- a/src/examples/ecore/efl_io_copier_example.c +++ b/src/examples/ecore/efl_io_copier_example.c @@ -77,9 +77,9 @@ _dialer_connected(void *data EINA_UNUSED, const Efl_Event *event) } EFL_CALLBACKS_ARRAY_DEFINE(dialer_cbs, - { EFL_NET_DIALER_EVENT_RESOLVED, _dialer_resolved }, - { EFL_NET_DIALER_EVENT_ERROR, _dialer_error }, - { EFL_NET_DIALER_EVENT_CONNECTED, _dialer_connected }); + { EFL_NET_DIALER_EVENT_DIALER_RESOLVED, _dialer_resolved }, + { EFL_NET_DIALER_EVENT_DIALER_ERROR, _dialer_error }, + { EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _dialer_connected }); static void _http_headers_done(void *data EINA_UNUSED, const Efl_Event *event) diff --git a/src/examples/ecore/efl_io_queue_example.c b/src/examples/ecore/efl_io_queue_example.c index 62e6035450..7a22feb631 100644 --- a/src/examples/ecore/efl_io_queue_example.c +++ b/src/examples/ecore/efl_io_queue_example.c @@ -305,7 +305,7 @@ efl_main(void *data EINA_UNUSED, /* The TCP client to use to send/receive network data */ dialer = efl_add(EFL_NET_DIALER_TCP_CLASS, loop, efl_name_set(efl_added, "dialer"), - efl_event_callback_add(efl_added, EFL_NET_DIALER_EVENT_CONNECTED, _dialer_connected, NULL)); + efl_event_callback_add(efl_added, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _dialer_connected, NULL)); if (!dialer) { fprintf(stderr, "ERROR: could not create Efl_Net_Dialer_Tcp\n"); diff --git a/src/examples/ecore/efl_net_dialer_http_example.c b/src/examples/ecore/efl_net_dialer_http_example.c index 02783dc165..1289fb01ba 100644 --- a/src/examples/ecore/efl_net_dialer_http_example.c +++ b/src/examples/ecore/efl_net_dialer_http_example.c @@ -71,9 +71,9 @@ _http_headers_done(void *data EINA_UNUSED, const Efl_Event *event) EFL_CALLBACKS_ARRAY_DEFINE(dialer_cbs, { EFL_NET_DIALER_HTTP_EVENT_HEADERS_DONE, _http_headers_done }, - { EFL_NET_DIALER_EVENT_CONNECTED, _connected }, - { EFL_NET_DIALER_EVENT_RESOLVED, _resolved }, - { EFL_NET_DIALER_EVENT_ERROR, _error }, + { EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _connected }, + { EFL_NET_DIALER_EVENT_DIALER_RESOLVED, _resolved }, + { EFL_NET_DIALER_EVENT_DIALER_ERROR, _error }, { EFL_IO_CLOSER_EVENT_CLOSED, _closed }, { EFL_IO_READER_EVENT_EOS, _eos }); diff --git a/src/examples/ecore/efl_net_dialer_simple_example.c b/src/examples/ecore/efl_net_dialer_simple_example.c index 1285dae2f1..40243cc11f 100644 --- a/src/examples/ecore/efl_net_dialer_simple_example.c +++ b/src/examples/ecore/efl_net_dialer_simple_example.c @@ -176,8 +176,8 @@ _done(void *data EINA_UNUSED, const Efl_Event *event) } EFL_CALLBACKS_ARRAY_DEFINE(dialer_cbs, - { EFL_NET_DIALER_EVENT_CONNECTED, _connected }, /* optional */ - { EFL_NET_DIALER_EVENT_RESOLVED, _resolved }, /* optional */ + { EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _connected }, /* optional */ + { EFL_NET_DIALER_EVENT_DIALER_RESOLVED, _resolved }, /* optional */ { EFL_IO_READER_EVENT_CAN_READ_CHANGED, _can_read }, /* optional, can be used to read data, here just for monitoring */ { EFL_IO_READER_EVENT_EOS, _eos }, /* recommended, notifies no more incoming data */ { EFL_IO_BUFFERED_STREAM_EVENT_LINE, _line }, /* optional, could use 'slice,changed' or 'can_read,changed' instead */ diff --git a/src/examples/ecore/efl_net_dialer_udp_example.c b/src/examples/ecore/efl_net_dialer_udp_example.c index bb01b58f8a..3fef035eef 100644 --- a/src/examples/ecore/efl_net_dialer_udp_example.c +++ b/src/examples/ecore/efl_net_dialer_udp_example.c @@ -156,9 +156,9 @@ _error(void *data EINA_UNUSED, const Efl_Event *event) } EFL_CALLBACKS_ARRAY_DEFINE(dialer_cbs, - { EFL_NET_DIALER_EVENT_CONNECTED, _connected }, - { EFL_NET_DIALER_EVENT_RESOLVED, _resolved }, - { EFL_NET_DIALER_EVENT_ERROR, _error }, + { EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _connected }, + { EFL_NET_DIALER_EVENT_DIALER_RESOLVED, _resolved }, + { EFL_NET_DIALER_EVENT_DIALER_ERROR, _error }, { EFL_IO_READER_EVENT_CAN_READ_CHANGED, _can_read }, { EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, _can_write } ); diff --git a/src/examples/ecore/efl_net_dialer_unix_example.c b/src/examples/ecore/efl_net_dialer_unix_example.c index f0298aed4a..8cfb2213e1 100644 --- a/src/examples/ecore/efl_net_dialer_unix_example.c +++ b/src/examples/ecore/efl_net_dialer_unix_example.c @@ -108,9 +108,9 @@ _error(void *data EINA_UNUSED, const Efl_Event *event) } EFL_CALLBACKS_ARRAY_DEFINE(dialer_cbs, - { EFL_NET_DIALER_EVENT_CONNECTED, _connected }, - { EFL_NET_DIALER_EVENT_RESOLVED, _resolved }, - { EFL_NET_DIALER_EVENT_ERROR, _error }, + { EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _connected }, + { EFL_NET_DIALER_EVENT_DIALER_RESOLVED, _resolved }, + { EFL_NET_DIALER_EVENT_DIALER_ERROR, _error }, { EFL_IO_READER_EVENT_EOS, _eos }, { EFL_IO_READER_EVENT_CAN_READ_CHANGED, _can_read }, { EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, _can_write } diff --git a/src/examples/ecore/efl_net_dialer_websocket_autobahntestee.c b/src/examples/ecore/efl_net_dialer_websocket_autobahntestee.c index 037a0aca52..45a3ed2ae4 100644 --- a/src/examples/ecore/efl_net_dialer_websocket_autobahntestee.c +++ b/src/examples/ecore/efl_net_dialer_websocket_autobahntestee.c @@ -247,8 +247,8 @@ EFL_CALLBACKS_ARRAY_DEFINE(dialer_cbs, { EFL_NET_DIALER_WEBSOCKET_EVENT_CLOSED_REASON, _ws_closed_reason }, { EFL_NET_DIALER_WEBSOCKET_EVENT_MESSAGE_TEXT, _ws_message_text }, { EFL_NET_DIALER_WEBSOCKET_EVENT_MESSAGE_BINARY, _ws_message_binary }, - { EFL_NET_DIALER_EVENT_CONNECTED, _connected }, - { EFL_NET_DIALER_EVENT_ERROR, _error }, + { EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _connected }, + { EFL_NET_DIALER_EVENT_DIALER_ERROR, _error }, { EFL_IO_CLOSER_EVENT_CLOSED, _closed }, { EFL_IO_READER_EVENT_EOS, _eos }, { EFL_EVENT_DEL, _del }); diff --git a/src/examples/ecore/efl_net_dialer_websocket_example.c b/src/examples/ecore/efl_net_dialer_websocket_example.c index e46a8c78a9..a74323b3db 100644 --- a/src/examples/ecore/efl_net_dialer_websocket_example.c +++ b/src/examples/ecore/efl_net_dialer_websocket_example.c @@ -145,9 +145,9 @@ EFL_CALLBACKS_ARRAY_DEFINE(dialer_cbs, { EFL_NET_DIALER_WEBSOCKET_EVENT_CLOSED_REASON, _ws_closed_reason }, { EFL_NET_DIALER_WEBSOCKET_EVENT_MESSAGE_TEXT, _ws_message_text }, { EFL_NET_DIALER_WEBSOCKET_EVENT_MESSAGE_BINARY, _ws_message_binary }, - { EFL_NET_DIALER_EVENT_CONNECTED, _connected }, - { EFL_NET_DIALER_EVENT_RESOLVED, _resolved }, - { EFL_NET_DIALER_EVENT_ERROR, _error }, + { EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _connected }, + { EFL_NET_DIALER_EVENT_DIALER_RESOLVED, _resolved }, + { EFL_NET_DIALER_EVENT_DIALER_ERROR, _error }, { EFL_IO_CLOSER_EVENT_CLOSED, _closed }, { EFL_IO_READER_EVENT_EOS, _eos }); diff --git a/src/examples/ecore/efl_net_dialer_windows_example.c b/src/examples/ecore/efl_net_dialer_windows_example.c index 44daab0bfa..e5be598eac 100644 --- a/src/examples/ecore/efl_net_dialer_windows_example.c +++ b/src/examples/ecore/efl_net_dialer_windows_example.c @@ -106,9 +106,9 @@ _error(void *data EINA_UNUSED, const Efl_Event *event) } EFL_CALLBACKS_ARRAY_DEFINE(dialer_cbs, - { EFL_NET_DIALER_EVENT_CONNECTED, _connected }, - { EFL_NET_DIALER_EVENT_RESOLVED, _resolved }, - { EFL_NET_DIALER_EVENT_ERROR, _error }, + { EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _connected }, + { EFL_NET_DIALER_EVENT_DIALER_RESOLVED, _resolved }, + { EFL_NET_DIALER_EVENT_DIALER_ERROR, _error }, { EFL_IO_READER_EVENT_EOS, _eos }, { EFL_IO_READER_EVENT_CAN_READ_CHANGED, _can_read }, { EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, _can_write } diff --git a/src/examples/ecore/efl_net_server_example.c b/src/examples/ecore/efl_net_server_example.c index b599336960..4c3f200339 100644 --- a/src/examples/ecore/efl_net_server_example.c +++ b/src/examples/ecore/efl_net_server_example.c @@ -450,7 +450,7 @@ _server_serving(void *data EINA_UNUSED, const Efl_Event *event) EFL_CALLBACKS_ARRAY_DEFINE(server_cbs, { EFL_NET_SERVER_EVENT_CLIENT_ADD, _server_client_add }, { EFL_NET_SERVER_EVENT_CLIENT_REJECTED, _server_client_rejected }, - { EFL_NET_SERVER_EVENT_ERROR, _server_error }, + { EFL_NET_SERVER_EVENT_SERVER_ERROR, _server_error }, { EFL_NET_SERVER_EVENT_SERVING, _server_serving }); static const char * protocols[] = { diff --git a/src/examples/ecore/efl_net_server_simple_example.c b/src/examples/ecore/efl_net_server_simple_example.c index 6477ad2a3d..36a2d8c06d 100644 --- a/src/examples/ecore/efl_net_server_simple_example.c +++ b/src/examples/ecore/efl_net_server_simple_example.c @@ -254,7 +254,7 @@ _server_serving(void *data EINA_UNUSED, const Efl_Event *event) EFL_CALLBACKS_ARRAY_DEFINE(server_cbs, { EFL_NET_SERVER_EVENT_CLIENT_ADD, _server_client_add }, { EFL_NET_SERVER_EVENT_CLIENT_REJECTED, _server_client_rejected }, - { EFL_NET_SERVER_EVENT_ERROR, _server_error }, + { EFL_NET_SERVER_EVENT_SERVER_ERROR, _server_error }, { EFL_NET_SERVER_EVENT_SERVING, _server_serving }); static const char * protocols[] = { diff --git a/src/examples/ecore/efl_net_socket_ssl_dialer_example.c b/src/examples/ecore/efl_net_socket_ssl_dialer_example.c index 0bc77c3477..1ade6bc9c2 100644 --- a/src/examples/ecore/efl_net_socket_ssl_dialer_example.c +++ b/src/examples/ecore/efl_net_socket_ssl_dialer_example.c @@ -177,9 +177,9 @@ _error(void *data EINA_UNUSED, const Efl_Event *event) } EFL_CALLBACKS_ARRAY_DEFINE(dialer_cbs, - { EFL_NET_DIALER_EVENT_CONNECTED, _connected }, - { EFL_NET_DIALER_EVENT_RESOLVED, _resolved }, - { EFL_NET_DIALER_EVENT_ERROR, _error }); + { EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _connected }, + { EFL_NET_DIALER_EVENT_DIALER_RESOLVED, _resolved }, + { EFL_NET_DIALER_EVENT_DIALER_ERROR, _error }); static char * diff --git a/src/examples/ecore/efl_net_socket_ssl_server_example.c b/src/examples/ecore/efl_net_socket_ssl_server_example.c index 33b67d2b21..6d826b6047 100644 --- a/src/examples/ecore/efl_net_socket_ssl_server_example.c +++ b/src/examples/ecore/efl_net_socket_ssl_server_example.c @@ -153,7 +153,7 @@ _server_serving(void *data EINA_UNUSED, const Efl_Event *event) EFL_CALLBACKS_ARRAY_DEFINE(server_cbs, { EFL_NET_SERVER_EVENT_CLIENT_ADD, _server_client_add }, - { EFL_NET_SERVER_EVENT_ERROR, _server_error }, + { EFL_NET_SERVER_EVENT_SERVER_ERROR, _server_error }, { EFL_NET_SERVER_EVENT_SERVING, _server_serving }); static const char *ciphers_strs[] = { diff --git a/src/examples/ecore/efl_thread.c b/src/examples/ecore/efl_thread.c index 48a20e9ccc..a0b1a3a4eb 100644 --- a/src/examples/ecore/efl_thread.c +++ b/src/examples/ecore/efl_thread.c @@ -53,11 +53,11 @@ _th_read_change(void *data EINA_UNUSED, const Efl_Event *ev) if (!strcmp(s, "one")) efl_add(EFL_LOOP_TIMER_CLASS, obj, efl_loop_timer_interval_set(efl_added, 2.0), - efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _th_timeout, obj)); + efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _th_timeout, obj)); else efl_add(EFL_LOOP_TIMER_CLASS, obj, efl_loop_timer_interval_set(efl_added, 1.0), - efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _th_timeout, obj)); + efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _th_timeout, obj)); eina_accessor_free(args_access); } } diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c index bf22dfb441..cad8e112ad 100644 --- a/src/examples/elementary/efl_ui_list_example_1.c +++ b/src/examples/elementary/efl_ui_list_example_1.c @@ -126,8 +126,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_SELECTED, _list_selected, NULL); - efl_event_callback_add(list, EFL_UI_EVENT_UNSELECTED, _list_unselected, NULL); + 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_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/eolian_cxx/ns_colourable.eo b/src/examples/eolian_cxx/ns_colourable.eo index 8fce408cf6..977dc4f3fc 100644 --- a/src/examples/eolian_cxx/ns_colourable.eo +++ b/src/examples/eolian_cxx/ns_colourable.eo @@ -5,7 +5,6 @@ class Ns.Colourable extends Efl.Object methods { rgb_24bits_constructor { [[RGB Constructor.]] - legacy: null; params { @in rgb: int; [[24-bit RGB Component.]] } diff --git a/src/examples/eolian_cxx/ns_colourablesquare.eo b/src/examples/eolian_cxx/ns_colourablesquare.eo index 733701f705..7ebc260798 100644 --- a/src/examples/eolian_cxx/ns_colourablesquare.eo +++ b/src/examples/eolian_cxx/ns_colourablesquare.eo @@ -14,7 +14,6 @@ class Ns.ColourableSquare extends Ns.Colourable } } size_constructor { - legacy: null; params { @in size: int; } diff --git a/src/lib/ecore/Ecore.h b/src/lib/ecore/Ecore.h index e31252a380..28b7af2d08 100644 --- a/src/lib/ecore/Ecore.h +++ b/src/lib/ecore/Ecore.h @@ -274,7 +274,10 @@ #include #include + +#ifdef EFL_BETA_API_SUPPORT #include +#endif #ifdef EAPI # undef EAPI diff --git a/src/lib/ecore/Efl_Core.h b/src/lib/ecore/Efl_Core.h index 6ae81904ea..ab82063bef 100644 --- a/src/lib/ecore/Efl_Core.h +++ b/src/lib/ecore/Efl_Core.h @@ -5,8 +5,9 @@ #include #include +#ifdef EFL_BETA_API_SUPPORT #include - +#endif #ifdef EAPI # undef EAPI #endif diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c index af81e0751c..1c8c6ec960 100644 --- a/src/lib/ecore/ecore.c +++ b/src/lib/ecore/ecore.c @@ -321,7 +321,7 @@ ecore_init(void) efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(), efl_loop_timer_interval_set(efl_added, sec / 2), efl_event_callback_add(efl_added, - EFL_LOOP_TIMER_EVENT_TICK, + EFL_LOOP_TIMER_EVENT_TIMER_TICK, _systemd_watchdog_cb, NULL)); unsetenv("WATCHDOG_USEC"); diff --git a/src/lib/ecore/ecore_exe_posix.c b/src/lib/ecore/ecore_exe_posix.c index a9332d1832..6a0cc3b79e 100644 --- a/src/lib/ecore/ecore_exe_posix.c +++ b/src/lib/ecore/ecore_exe_posix.c @@ -858,7 +858,7 @@ _impl_ecore_exe_kill(Ecore_Exe *obj EINA_UNUSED, Ecore_Exe_Data *exe) efl_del(exe->doomsday_clock); exe->doomsday_clock = efl_add(EFL_LOOP_TIMER_CLASS, obj, efl_event_callback_add(efl_added, - EFL_LOOP_TIMER_EVENT_TICK, + EFL_LOOP_TIMER_EVENT_TIMER_TICK, _ecore_exe_make_sure_its_really_dead, obj), efl_loop_timer_interval_set(efl_added, 10.0)); @@ -896,7 +896,7 @@ _ecore_exe_make_sure_its_dead(void *data, const Efl_Event *event) INF("Sending KILL signal to allegedly dead PID %d.", exe->pid); exe->doomsday_clock = efl_add(EFL_LOOP_TIMER_CLASS, exe_obj, efl_event_callback_add(efl_added, - EFL_LOOP_TIMER_EVENT_TICK, + EFL_LOOP_TIMER_EVENT_TIMER_TICK, _ecore_exe_make_sure_its_really_dead, exe_obj), efl_loop_timer_interval_set(efl_added, 10.0)); @@ -1295,7 +1295,7 @@ _ecore_exe_dead_attach(Ecore_Exe *obj) if (exe->doomsday_clock) return; exe->doomsday_clock = efl_add(EFL_LOOP_TIMER_CLASS, obj, efl_event_callback_add(efl_added, - EFL_LOOP_TIMER_EVENT_TICK, + EFL_LOOP_TIMER_EVENT_TIMER_TICK, _ecore_exe_make_sure_its_dead, obj), efl_loop_timer_interval_set(efl_added, 10.0)); diff --git a/src/lib/ecore/ecore_signal.c b/src/lib/ecore/ecore_signal.c index 1138c7be53..e16694b55a 100644 --- a/src/lib/ecore/ecore_signal.c +++ b/src/lib/ecore/ecore_signal.c @@ -447,7 +447,7 @@ _ecore_signal_waitpid(Eina_Bool once, siginfo_t info) efl_add(EFL_LOOP_TIMER_CLASS, ML_OBJ, efl_loop_timer_interval_set(efl_added, 0.1), efl_event_callback_add - (efl_added, EFL_LOOP_TIMER_EVENT_TICK, + (efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _ecore_signal_exe_exit_delay, e)); _ecore_exe_doomsday_clock_set(e->exe, doomsday_clock); } diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c index cf9be54239..37280e8ee3 100644 --- a/src/lib/ecore/ecore_timer.c +++ b/src/lib/ecore/ecore_timer.c @@ -79,7 +79,7 @@ _check_timer_event_catcher_add(void *data, const Efl_Event *event) for (i = 0; array[i].desc != NULL; i++) { - if (array[i].desc == EFL_LOOP_TIMER_EVENT_TICK) + if (array[i].desc == EFL_LOOP_TIMER_EVENT_TIMER_TICK) { if (timer->listening++ > 0) return; _efl_loop_timer_util_instanciate(timer->loop_data, timer); @@ -99,7 +99,7 @@ _check_timer_event_catcher_del(void *data, const Efl_Event *event) for (i = 0; array[i].desc != NULL; i++) { - if (array[i].desc == EFL_LOOP_TIMER_EVENT_TICK) + if (array[i].desc == EFL_LOOP_TIMER_EVENT_TIMER_TICK) { if ((--timer->listening) > 0) return; _efl_loop_timer_util_instanciate(timer->loop_data, timer); @@ -164,7 +164,7 @@ _ecore_timer_legacy_tick(void *data, const Efl_Event *event) } EFL_CALLBACKS_ARRAY_DEFINE(legacy_timer, - { EFL_LOOP_TIMER_EVENT_TICK, _ecore_timer_legacy_tick }, + { EFL_LOOP_TIMER_EVENT_TIMER_TICK, _ecore_timer_legacy_tick }, { EFL_EVENT_DEL, _ecore_timer_legacy_del }); EAPI Ecore_Timer * @@ -240,26 +240,26 @@ ecore_timer_del(Ecore_Timer *timer) } EOLIAN static void -_efl_loop_timer_interval_set(Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *timer, double in) +_efl_loop_timer_timer_interval_set(Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *timer, double in) { if (in < 0.0) in = 0.0; timer->in = in; } EOLIAN static double -_efl_loop_timer_interval_get(const Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *timer) +_efl_loop_timer_timer_interval_get(const Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *timer) { return timer->in; } EOLIAN static void -_efl_loop_timer_delay(Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *pd, double add) +_efl_loop_timer_timer_delay(Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *pd, double add) { _efl_loop_timer_util_delay(pd, add); } EOLIAN static void -_efl_loop_timer_reset(Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *timer) +_efl_loop_timer_timer_reset(Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *timer) { double now, add; @@ -280,7 +280,7 @@ _efl_loop_timer_reset(Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *timer) } EOLIAN static void -_efl_loop_timer_loop_reset(Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *timer) +_efl_loop_timer_timer_loop_reset(Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *timer) { double now, add; @@ -301,7 +301,7 @@ _efl_loop_timer_loop_reset(Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *timer) } EOLIAN static double -_efl_loop_timer_pending_get(const Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *timer) +_efl_loop_timer_time_pending_get(const Eo *obj EINA_UNUSED, Efl_Loop_Timer_Data *timer) { double now, ret = 0.0; @@ -639,7 +639,7 @@ _efl_loop_timer_expired_call(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd, double when efl_ref(timer->object); eina_evlog("+timer", timer, 0.0, NULL); - efl_event_callback_call(timer->object, EFL_LOOP_TIMER_EVENT_TICK, NULL); + efl_event_callback_call(timer->object, EFL_LOOP_TIMER_EVENT_TIMER_TICK, NULL); eina_evlog("-timer", timer, 0.0, NULL); // may have changed in recursive main loops diff --git a/src/lib/ecore/efl_exe.eo b/src/lib/ecore/efl_exe.eo index 01ba9a34bf..9f72137ed4 100644 --- a/src/lib/ecore/efl_exe.eo +++ b/src/lib/ecore/efl_exe.eo @@ -1,4 +1,4 @@ -enum Efl.Exe_Signal { +enum @beta Efl.Exe_Signal { [[ ]] int, quit, @@ -11,7 +11,7 @@ enum Efl.Exe_Signal { usr2 } -enum Efl.Exe_Flags { +enum @beta Efl.Exe_Flags { [[ ]] none = 0, group_leader = 1, diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c index 9b36b5b613..7a61cabdd7 100644 --- a/src/lib/ecore/efl_loop.c +++ b/src/lib/ecore/efl_loop.c @@ -192,7 +192,7 @@ _check_event_catcher_add(void *data, const Efl_Event *event) pd->poll_high = efl_add (EFL_LOOP_TIMER_CLASS, event->object, efl_event_callback_add(efl_added, - EFL_LOOP_TIMER_EVENT_TICK, + EFL_LOOP_TIMER_EVENT_TIMER_TICK, _poll_trigger, EFL_LOOP_EVENT_POLL_HIGH), efl_loop_timer_interval_set(efl_added, 1.0 / 60.0)); @@ -206,7 +206,7 @@ _check_event_catcher_add(void *data, const Efl_Event *event) pd->poll_medium = efl_add (EFL_LOOP_TIMER_CLASS, event->object, efl_event_callback_add(efl_added, - EFL_LOOP_TIMER_EVENT_TICK, + EFL_LOOP_TIMER_EVENT_TIMER_TICK, _poll_trigger, EFL_LOOP_EVENT_POLL_MEDIUM), efl_loop_timer_interval_set(efl_added, 6)); @@ -220,7 +220,7 @@ _check_event_catcher_add(void *data, const Efl_Event *event) pd->poll_low = efl_add (EFL_LOOP_TIMER_CLASS, event->object, efl_event_callback_add(efl_added, - EFL_LOOP_TIMER_EVENT_TICK, + EFL_LOOP_TIMER_EVENT_TIMER_TICK, _poll_trigger, EFL_LOOP_EVENT_POLL_LOW), efl_loop_timer_interval_set(efl_added, 66)); @@ -493,7 +493,7 @@ _efl_loop_timeout(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED, double tim) d->timer = efl_add(EFL_LOOP_TIMER_CLASS, obj, efl_loop_timer_interval_set(efl_added, tim), efl_event_callback_add(efl_added, - EFL_LOOP_TIMER_EVENT_TICK, + EFL_LOOP_TIMER_EVENT_TIMER_TICK, _efl_loop_timeout_done, d), efl_event_callback_add(efl_added, EFL_EVENT_DEL, diff --git a/src/lib/ecore/efl_loop_handler.eo b/src/lib/ecore/efl_loop_handler.eo index 148759d0c0..8779324ef3 100644 --- a/src/lib/ecore/efl_loop_handler.eo +++ b/src/lib/ecore/efl_loop_handler.eo @@ -1,4 +1,4 @@ -enum Efl.Loop_Handler_Flags { +enum @beta Efl.Loop_Handler_Flags { [[ A set of flags that can be OR'd together to indicate which are desired ]] none = 0, [[ No I/O is desired (generally useless) ]] diff --git a/src/lib/ecore/efl_loop_timer.eo b/src/lib/ecore/efl_loop_timer.eo index 97812a976d..059ac345cc 100644 --- a/src/lib/ecore/efl_loop_timer.eo +++ b/src/lib/ecore/efl_loop_timer.eo @@ -10,7 +10,7 @@ class @beta Efl.Loop_Timer extends Efl.Loop_Consumer The @Efl.Object.event_freeze and @Efl.Object.event_thaw calls are used to pause and unpause the timer. ]] methods { - @property interval { + @property timer_interval { [[Interval the timer ticks on.]] set { [[If set during a timer call this will affect the next interval.]] @@ -21,13 +21,13 @@ class @beta Efl.Loop_Timer extends Efl.Loop_Consumer in: double(-1.0); [[The new interval in seconds]] } } - @property pending { + @property time_pending { [[Pending time regarding a timer.]] get { return: double; [[Pending time]] } } - reset { + timer_reset { [[Resets a timer to its full interval. This effectively makes the timer start ticking off from zero now. @@ -36,12 +36,12 @@ class @beta Efl.Loop_Timer extends Efl.Loop_Consumer @since 1.2 ]] } - loop_reset { + timer_loop_reset { [[This effectively resets a timer but based on the time when this iteration of the main loop started. @since 1.18 ]] } - delay { + timer_delay { [[Adds a delay to the next occurrence of a timer. This doesn't affect the timer interval. ]] @@ -51,10 +51,10 @@ class @beta Efl.Loop_Timer extends Efl.Loop_Consumer } } events { - tick: void; [[Event triggered when the specified time as passed.]] + timer,tick: void; [[Event triggered when the specified time as passed.]] } constructors { - .interval; + .timer_interval; } implements { Efl.Object.constructor; diff --git a/src/lib/ecore/efl_loop_timer_eo.legacy.c b/src/lib/ecore/efl_loop_timer_eo.legacy.c index a479bdb6f5..b3d2765122 100644 --- a/src/lib/ecore/efl_loop_timer_eo.legacy.c +++ b/src/lib/ecore/efl_loop_timer_eo.legacy.c @@ -14,7 +14,7 @@ ecore_timer_interval_get(const Efl_Loop_Timer *obj) EAPI double ecore_timer_pending_get(const Efl_Loop_Timer *obj) { - return efl_loop_timer_pending_get(obj); + return efl_loop_timer_time_pending_get(obj); } EAPI void diff --git a/src/lib/ecore/efl_threadio.eo b/src/lib/ecore/efl_threadio.eo index 25b1ba29a7..2049ad86d6 100644 --- a/src/lib/ecore/efl_threadio.eo +++ b/src/lib/ecore/efl_threadio.eo @@ -1,13 +1,13 @@ import efl_object; -function EFlThreadIOCall { +function @beta EFlThreadIOCall { [[ A Function to call on the "other end" of a thread obvject ]] params { @cref event: Efl.Event; [[ ]] } }; -function EFlThreadIOCallSync { +function @beta EFlThreadIOCallSync { [[ A Function to call on the "other end" of a thread obvject ]] params { @cref event: Efl.Event; [[ ]] diff --git a/src/lib/ecore/efl_view_model.c b/src/lib/ecore/efl_view_model.c index 76f2405b28..7bb9a34673 100644 --- a/src/lib/ecore/efl_view_model.c +++ b/src/lib/ecore/efl_view_model.c @@ -304,7 +304,7 @@ _efl_view_model_property_changed(void *data, const Efl_Event *event) eina_array_push(nev.changed_properties, property); - src = eina_stringshare_add(property); + src = eina_stringshare_ref(property); bind = _efl_view_model_property_bind_lookup(pd, src); if (bind) { diff --git a/src/lib/ecore/efl_view_model.eo b/src/lib/ecore/efl_view_model.eo index 432bfe8499..d7092b3b7a 100644 --- a/src/lib/ecore/efl_view_model.eo +++ b/src/lib/ecore/efl_view_model.eo @@ -1,4 +1,4 @@ -function EflViewModelPropertyGet { +function @beta EflViewModelPropertyGet { [[Function called when a property is get.]] params { @in view_model: const(Efl.View_Model); [[The ViewModel object the @.property.get is issued on.]] @@ -7,7 +7,7 @@ function EflViewModelPropertyGet { return: any_value_ptr; [[The property value.]] }; -function EflViewModelPropertySet { +function @beta EflViewModelPropertySet { [[Function called when a property is set.]] params { @in view_model: Efl.View_Model; [[The ViewModel object the @.property.set is issued on.]] diff --git a/src/lib/ecore_audio/ecore_audio.eo b/src/lib/ecore_audio/ecore_audio.eo index dff009eea9..af668fbe32 100644 --- a/src/lib/ecore_audio/ecore_audio.eo +++ b/src/lib/ecore_audio/ecore_audio.eo @@ -1,7 +1,7 @@ type @extern Ecore.Audio.Vio: __undefined_type; [[Ecore audio vio type]] /* FIXME: Had function pointer members. */ type @extern efl_key_data_free_func: __undefined_type; [[Efl key data free function type]] /* FIXME: Function pointers not allowed. */ -enum Ecore.Audio.Format { +enum @beta Ecore.Audio.Format { [[Ecore audio format type]] auto, [[Automatically detect the format (for inputs)]] raw, [[RAW samples (float)]] diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c index 0e241b7fa9..5cbb39bf65 100644 --- a/src/lib/ecore_con/ecore_con_legacy.c +++ b/src/lib/ecore_con/ecore_con_legacy.c @@ -1420,9 +1420,9 @@ EFL_CALLBACKS_ARRAY_DEFINE(_ecore_con_server_dialer_cbs, { EFL_IO_BUFFERED_STREAM_EVENT_READ_FINISHED, _ecore_con_server_dialer_read_finished }, { EFL_IO_BUFFERED_STREAM_EVENT_FINISHED, _ecore_con_server_dialer_finished }, { EFL_IO_BUFFERED_STREAM_EVENT_ERROR, _ecore_con_server_dialer_error }, - { EFL_NET_DIALER_EVENT_ERROR, _ecore_con_server_dialer_error }, - { EFL_NET_DIALER_EVENT_RESOLVED, _ecore_con_server_dialer_resolved }, - { EFL_NET_DIALER_EVENT_CONNECTED, _ecore_con_server_dialer_connected }); + { EFL_NET_DIALER_EVENT_DIALER_ERROR, _ecore_con_server_dialer_error }, + { EFL_NET_DIALER_EVENT_DIALER_RESOLVED, _ecore_con_server_dialer_resolved }, + { EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _ecore_con_server_dialer_connected }); static void _ecore_con_server_server_client_add(void *data, const Efl_Event *event) @@ -1495,7 +1495,7 @@ _ecore_con_server_server_error(void *data, const Efl_Event *event) EFL_CALLBACKS_ARRAY_DEFINE(_ecore_con_server_server_cbs, { EFL_NET_SERVER_EVENT_CLIENT_ADD, _ecore_con_server_server_client_add }, { EFL_NET_SERVER_EVENT_SERVING, _ecore_con_server_server_serving }, - { EFL_NET_SERVER_EVENT_ERROR, _ecore_con_server_server_error }); + { EFL_NET_SERVER_EVENT_SERVER_ERROR, _ecore_con_server_server_error }); /** * @addtogroup Ecore_Con_Server_Group Ecore Connection Server Functions diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c index b78498aa0e..27b391c32d 100644 --- a/src/lib/ecore_con/ecore_con_url.c +++ b/src/lib/ecore_con/ecore_con_url.c @@ -508,7 +508,7 @@ _ecore_con_url_dialer_headers_done(void *data, const Efl_Event *event EINA_UNUSE EFL_CALLBACKS_ARRAY_DEFINE(ecore_con_url_dialer_cbs, { EFL_IO_READER_EVENT_CAN_READ_CHANGED, _ecore_con_url_dialer_can_read_changed }, { EFL_IO_READER_EVENT_EOS, _ecore_con_url_dialer_eos }, - { EFL_NET_DIALER_EVENT_ERROR, _ecore_con_url_dialer_error }, + { EFL_NET_DIALER_EVENT_DIALER_ERROR, _ecore_con_url_dialer_error }, { EFL_NET_DIALER_HTTP_EVENT_HEADERS_DONE, _ecore_con_url_dialer_headers_done }); static Eina_Bool 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 7d3d9364ac..a2c9206fcc 100644 --- a/src/lib/ecore_con/efl_net_control_access_point.eo +++ b/src/lib/ecore_con/efl_net_control_access_point.eo @@ -1,4 +1,4 @@ -enum Efl.Net.Control.Access_Point_State { +enum @beta Efl.Net.Control.Access_Point_State { [[Provides the access point state. @since 1.19 @@ -12,7 +12,7 @@ enum Efl.Net.Control.Access_Point_State { failure, [[The connection attempt failed, @Efl.Net.Control.Access_Point.error will provide more details]] } -enum Efl.Net.Control.Access_Point_Error { +enum @beta Efl.Net.Control.Access_Point_Error { [[The reason for the connection error. @since 1.19 @@ -25,7 +25,7 @@ enum Efl.Net.Control.Access_Point_Error { login_failed, [[Login or authentication information was incorrect, agent_request_input event may be emitted.]] } -enum Efl.Net.Control.Access_Point_Security { +enum @beta Efl.Net.Control.Access_Point_Security { [[Bitwise-able securities supported by an access point. @since 1.19 @@ -37,7 +37,7 @@ enum Efl.Net.Control.Access_Point_Security { ieee802_1x = (1 << 3), [[IEEE 802.1X]] } -enum Efl.Net.Control.Access_Point_Ipv4_Method { +enum @beta Efl.Net.Control.Access_Point_Ipv4_Method { [[The method used to configure IPv4 @since 1.19 @@ -48,7 +48,7 @@ enum Efl.Net.Control.Access_Point_Ipv4_Method { unset, [[Only to be used with @Efl.Net.Control.Access_Point.configuration_ipv4]] } -enum Efl.Net.Control.Access_Point_Ipv6_Method { +enum @beta Efl.Net.Control.Access_Point_Ipv6_Method { [[The method used to configure IPv6 @since 1.19 @@ -63,7 +63,7 @@ enum Efl.Net.Control.Access_Point_Ipv6_Method { unset, [[Only to be used with @Efl.Net.Control.Access_Point.configuration_ipv6]] } -enum Efl.Net.Control.Access_Point_Proxy_Method { +enum @beta Efl.Net.Control.Access_Point_Proxy_Method { [[The method used to configure Proxies. @since 1.19 diff --git a/src/lib/ecore_con/efl_net_control_manager.eo b/src/lib/ecore_con/efl_net_control_manager.eo index 448bdba362..e0f769bac7 100644 --- a/src/lib/ecore_con/efl_net_control_manager.eo +++ b/src/lib/ecore_con/efl_net_control_manager.eo @@ -2,7 +2,7 @@ import eina_types; import efl_net_control_access_point; import efl_net_control_technology; -enum Efl.Net.Control.State { +enum @beta Efl.Net.Control.State { [[Provides the global network connectivity state. For more details, use @Efl.Net.Control.Manager access points and @@ -15,7 +15,7 @@ enum Efl.Net.Control.State { online, [[At least one access point is connected and the internet has been verified]] } -enum Efl.Net.Control.Agent_Request_Input_Field { +enum @beta Efl.Net.Control.Agent_Request_Input_Field { [[Bitwise-able fields requested to the agent. @since 1.19 @@ -27,7 +27,7 @@ enum Efl.Net.Control.Agent_Request_Input_Field { wps = (1 << 4), [[Use WPS authentication. If passphrase is present, this is an alternative to that.]] } -struct Efl.Net.Control.Agent_Request_Input_Information { +struct @beta Efl.Net.Control.Agent_Request_Input_Information { [[Name-value information pair provided to the agent. @since 1.19 @@ -36,7 +36,7 @@ struct Efl.Net.Control.Agent_Request_Input_Information { value: string; [[The contents of the information]] } -struct Efl.Net.Control.Agent_Request_Input { +struct @beta Efl.Net.Control.Agent_Request_Input { [[Requests input to the agent. @since 1.19 @@ -47,7 +47,7 @@ struct Efl.Net.Control.Agent_Request_Input { informational: list; [[Such as the previous passphrase, VPN host]] } -struct Efl.Net.Control.Agent_Error { +struct @beta Efl.Net.Control.Agent_Error { [[Reports error to the agent. @since 1.19 @@ -56,7 +56,7 @@ struct Efl.Net.Control.Agent_Error { message: string; [[The error message.]] } -struct Efl.Net.Control.Agent_Browser_Url { +struct @beta Efl.Net.Control.Agent_Browser_Url { [[Reports to agent that it should open a browser at a given URL. @since 1.19 diff --git a/src/lib/ecore_con/efl_net_control_technology.eo b/src/lib/ecore_con/efl_net_control_technology.eo index 947aa11ac3..1c651a0d57 100644 --- a/src/lib/ecore_con/efl_net_control_technology.eo +++ b/src/lib/ecore_con/efl_net_control_technology.eo @@ -1,4 +1,4 @@ -enum Efl.Net.Control.Technology_Type { +enum @beta Efl.Net.Control.Technology_Type { [[Technology types @since 1.19 diff --git a/src/lib/ecore_con/efl_net_dialer.eo b/src/lib/ecore_con/efl_net_dialer.eo index 7abba99b1a..fb79de10ce 100644 --- a/src/lib/ecore_con/efl_net_dialer.eo +++ b/src/lib/ecore_con/efl_net_dialer.eo @@ -112,7 +112,7 @@ interface @beta Efl.Net.Dialer extends Efl.Net.Socket { events { /* FIXME: Might be NULL, but @nullable does not work on event types */ - resolved: string; [[Notifies @.address_dial was resolved to + dialer,resolved: string; [[Notifies @.address_dial was resolved to @Efl.Net.Socket.address_remote. This is emitted before "connected" and may @@ -124,9 +124,9 @@ interface @beta Efl.Net.Dialer extends Efl.Net.Socket { may be emitted multiple times, such as HTTP. ]] - error: Eina.Error; [[Some error happened and the socket + dialer,error: Eina.Error; [[Some error happened and the socket stopped working. ]] - connected: void; [[Notifies the socket is connected to the remote peer.]] + dialer,connected: void; [[Notifies the socket is connected to the remote peer.]] } } diff --git a/src/lib/ecore_con/efl_net_dialer_http.c b/src/lib/ecore_con/efl_net_dialer_http.c index 40503c83c0..64947a1fc4 100644 --- a/src/lib/ecore_con/efl_net_dialer_http.c +++ b/src/lib/ecore_con/efl_net_dialer_http.c @@ -318,7 +318,7 @@ _efl_net_dialer_http_curlm_check(Efl_Net_Dialer_Http_Curlm *cm) efl_ref(dialer); pd = efl_data_scope_get(dialer, MY_CLASS); if (pd->error) - efl_event_callback_call(dialer, EFL_NET_DIALER_EVENT_ERROR, &pd->error); + efl_event_callback_call(dialer, EFL_NET_DIALER_EVENT_DIALER_ERROR, &pd->error); if (pd->recv.used > 0) pd->pending_eos = EINA_TRUE; else { @@ -369,7 +369,7 @@ _efl_net_dialer_http_curlm_timer_schedule(CURLM *multi EINA_UNUSED, long timeout { cm->timer = efl_add(EFL_LOOP_TIMER_CLASS, cm->loop, efl_loop_timer_interval_set(efl_added, seconds), - efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _efl_net_dialer_http_curlm_timer_do, cm)); + efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _efl_net_dialer_http_curlm_timer_do, cm)); EINA_SAFETY_ON_NULL_RETURN_VAL(cm->timer, -1); } @@ -1460,7 +1460,7 @@ _efl_net_dialer_http_efl_net_dialer_connected_set(Eo *o, Efl_Net_Dialer_Http_Dat * allow_redirects will trigger more than once */ pd->connected = connected; - if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_CONNECTED, NULL); + if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, NULL); } EOLIAN static Eina_Bool @@ -1524,7 +1524,7 @@ EOLIAN static void _efl_net_dialer_http_efl_net_socket_address_remote_set(Eo *o, Efl_Net_Dialer_Http_Data *pd, const char *address) { if (eina_stringshare_replace(&pd->address_remote, address)) - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_RESOLVED, NULL); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_RESOLVED, NULL); } EOLIAN static const char * diff --git a/src/lib/ecore_con/efl_net_dialer_http.eo b/src/lib/ecore_con/efl_net_dialer_http.eo index 032c5c7bbb..4edff59178 100644 --- a/src/lib/ecore_con/efl_net_dialer_http.eo +++ b/src/lib/ecore_con/efl_net_dialer_http.eo @@ -1,6 +1,6 @@ import efl_net_http_types; -enum Efl.Net.Dialer_Http_Primary_Mode { +enum @beta Efl.Net.Dialer_Http_Primary_Mode { [[Primary HTTP mode]] auto, [[HTTP auto mode]] download, [[HTTP download mode]] diff --git a/src/lib/ecore_con/efl_net_dialer_simple.c b/src/lib/ecore_con/efl_net_dialer_simple.c index 71e99e8736..775621a97a 100644 --- a/src/lib/ecore_con/efl_net_dialer_simple.c +++ b/src/lib/ecore_con/efl_net_dialer_simple.c @@ -33,14 +33,14 @@ 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_RESOLVED, event->info); + 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_ERROR, event->info); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, event->info); } static void @@ -48,13 +48,13 @@ _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_CONNECTED, event->info); + 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_RESOLVED, _efl_net_dialer_simple_inner_io_resolved }, - { EFL_NET_DIALER_EVENT_ERROR, _efl_net_dialer_simple_inner_io_error }, - { EFL_NET_DIALER_EVENT_CONNECTED, _efl_net_dialer_simple_inner_io_connected }); + { 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) diff --git a/src/lib/ecore_con/efl_net_dialer_ssl.c b/src/lib/ecore_con/efl_net_dialer_ssl.c index 33d314f2f4..ffc36a6f58 100644 --- a/src/lib/ecore_con/efl_net_dialer_ssl.c +++ b/src/lib/ecore_con/efl_net_dialer_ssl.c @@ -50,7 +50,7 @@ _efl_net_dialer_ssl_error(void *data EINA_UNUSED, const Efl_Event *event) { Eo *o = event->object; Eina_Error *perr = event->info; - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, perr); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, perr); } EFL_CALLBACKS_ARRAY_DEFINE(_efl_net_dialer_ssl_cbs, @@ -134,7 +134,7 @@ _efl_net_dialer_ssl_connect_timeout(Eo *o, void *data EINA_UNUSED, const Eina_Va efl_ref(o); efl_io_reader_eos_set(o, EINA_TRUE); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, &err); efl_unref(o); return v; } @@ -205,7 +205,7 @@ _efl_net_dialer_ssl_efl_net_dialer_connected_set(Eo *o, Efl_Net_Dialer_Ssl_Data eina_future_cancel(pd->connect_timeout); if (pd->connected == connected) return; pd->connected = connected; - if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_CONNECTED, NULL); + if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, NULL); } EOLIAN static Eina_Bool diff --git a/src/lib/ecore_con/efl_net_dialer_tcp.c b/src/lib/ecore_con/efl_net_dialer_tcp.c index 9a7a795faa..ba93fc4c74 100644 --- a/src/lib/ecore_con/efl_net_dialer_tcp.c +++ b/src/lib/ecore_con/efl_net_dialer_tcp.c @@ -99,7 +99,7 @@ _efl_net_dialer_tcp_connect_timeout(Eo *o, void *data EINA_UNUSED, const Eina_Va efl_ref(o); efl_io_reader_eos_set(o, EINA_TRUE); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, &err); efl_unref(o); return v; } @@ -128,7 +128,7 @@ _efl_net_dialer_tcp_connected(void *data, const struct sockaddr *addr, socklen_t efl_loop_fd_set(o, sockfd); if (efl_net_socket_address_remote_get(o)) { - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_RESOLVED, NULL); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_RESOLVED, NULL); efl_net_dialer_connected_set(o, EINA_TRUE); } else @@ -148,11 +148,11 @@ _efl_net_dialer_tcp_connected(void *data, const struct sockaddr *addr, socklen_t if (efl_net_ip_port_fmt(buf, sizeof(buf), addr)) { efl_net_socket_address_remote_set(o, buf); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_RESOLVED, NULL); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_RESOLVED, NULL); } } efl_io_reader_eos_set(o, EINA_TRUE); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, &err); } efl_unref(o); @@ -245,7 +245,7 @@ _efl_net_dialer_tcp_efl_net_dialer_connected_set(Eo *o, Efl_Net_Dialer_Tcp_Data if (!connected) _efl_net_dialer_tcp_async_stop(pd); if (pd->connected == connected) return; pd->connected = connected; - if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_CONNECTED, NULL); + if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, NULL); } EOLIAN static Eina_Bool diff --git a/src/lib/ecore_con/efl_net_dialer_udp.c b/src/lib/ecore_con/efl_net_dialer_udp.c index b42e9d414e..e75ed24fed 100644 --- a/src/lib/ecore_con/efl_net_dialer_udp.c +++ b/src/lib/ecore_con/efl_net_dialer_udp.c @@ -95,7 +95,7 @@ _efl_net_dialer_udp_resolver_timeout(Eo *o, void *data EINA_UNUSED, const Eina_V efl_ref(o); efl_io_reader_eos_set(o, EINA_TRUE); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, &err); efl_unref(o); return v; } @@ -184,7 +184,7 @@ _efl_net_dialer_udp_resolved_bind(Eo *o, Efl_Net_Dialer_Udp_Data *pd EINA_UNUSED if (remote_address) { efl_net_socket_udp_init(o, remote_address); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_RESOLVED, NULL); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_RESOLVED, NULL); efl_del(remote_address); } efl_net_dialer_connected_set(o, EINA_TRUE); @@ -230,12 +230,12 @@ _efl_net_dialer_udp_resolved(void *data, const char *host EINA_UNUSED, const cha if (efl_net_ip_port_fmt(buf, sizeof(buf), result->ai_addr)) { efl_net_socket_address_remote_set(o, buf); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_RESOLVED, NULL); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_RESOLVED, NULL); } } efl_io_reader_eos_set(o, EINA_TRUE); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, &err); } freeaddrinfo(result); @@ -319,7 +319,7 @@ _efl_net_dialer_udp_efl_net_dialer_connected_set(Eo *o, Efl_Net_Dialer_Udp_Data if (pd->resolver.timeout) eina_future_cancel(pd->resolver.timeout); if (pd->connected == connected) return; pd->connected = connected; - if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_CONNECTED, NULL); + if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, NULL); } EOLIAN static Eina_Bool diff --git a/src/lib/ecore_con/efl_net_dialer_unix.c b/src/lib/ecore_con/efl_net_dialer_unix.c index 95e2b06457..b2d3dfce39 100644 --- a/src/lib/ecore_con/efl_net_dialer_unix.c +++ b/src/lib/ecore_con/efl_net_dialer_unix.c @@ -84,7 +84,7 @@ _efl_net_dialer_unix_connect_timeout(Eo *o, void *data EINA_UNUSED, const Eina_V efl_ref(o); efl_io_reader_eos_set(o, EINA_TRUE); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, &err); efl_unref(o); return v; } @@ -105,7 +105,7 @@ _efl_net_dialer_unix_connected(void *data, const struct sockaddr *addr, socklen_ efl_loop_fd_set(o, sockfd); if (efl_net_socket_address_remote_get(o)) { - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_RESOLVED, NULL); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_RESOLVED, NULL); efl_net_dialer_connected_set(o, EINA_TRUE); } else @@ -120,7 +120,7 @@ _efl_net_dialer_unix_connected(void *data, const struct sockaddr *addr, socklen_ if (err) { efl_io_reader_eos_set(o, EINA_TRUE); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, &err); } efl_unref(o); @@ -222,7 +222,7 @@ _efl_net_dialer_unix_efl_net_dialer_connected_set(Eo *o, Efl_Net_Dialer_Unix_Dat if (pd->connect.timeout) eina_future_cancel(pd->connect.timeout); if (pd->connected == connected) return; pd->connected = connected; - if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_CONNECTED, NULL); + if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, NULL); } EOLIAN static Eina_Bool diff --git a/src/lib/ecore_con/efl_net_dialer_websocket.c b/src/lib/ecore_con/efl_net_dialer_websocket.c index 8d8719ad04..78ab750756 100644 --- a/src/lib/ecore_con/efl_net_dialer_websocket.c +++ b/src/lib/ecore_con/efl_net_dialer_websocket.c @@ -350,7 +350,7 @@ _efl_net_dialer_websocket_job_send(Eo *o, Efl_Net_Dialer_Websocket_Data *pd) if ((err) && (err != EAGAIN)) { ERR("could not write to HTTP socket #%d '%s'", err, eina_error_msg_get(err)); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, &err); } } @@ -730,7 +730,7 @@ _efl_net_dialer_websocket_job_receive(Eo *o, Efl_Net_Dialer_Websocket_Data *pd) eina_error_msg_get(err)); efl_ref(o); efl_io_closer_close(pd->http); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, &err); efl_unref(o); } @@ -819,7 +819,7 @@ _efl_net_dialer_websocket_http_error(void *data, const Efl_Event *event) return; efl_ref(o); if (!efl_io_closer_closed_get(o)) efl_io_closer_close(o); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, perr); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, perr); efl_unref(o); } @@ -846,7 +846,7 @@ _efl_net_dialer_websocket_http_headers_done(void *data, const Efl_Event *event E status, EFL_NET_HTTP_STATUS_SWITCHING_PROTOCOLS); efl_ref(o); efl_io_closer_close(pd->http); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, &err); efl_unref(o); return; } @@ -887,7 +887,7 @@ _efl_net_dialer_websocket_http_headers_done(void *data, const Efl_Event *event E upgraded, connection_websocket, accepted); efl_ref(o); efl_io_closer_close(pd->http); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_ERROR, &err); efl_unref(o); return; } @@ -934,7 +934,7 @@ EFL_CALLBACKS_ARRAY_DEFINE(_efl_net_dialer_websocket_http_cbs, {EFL_IO_READER_EVENT_CAN_READ_CHANGED, _efl_net_dialer_websocket_http_can_read_changed}, {EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, _efl_net_dialer_websocket_http_can_write_changed}, {EFL_IO_CLOSER_EVENT_CLOSED, _efl_net_dialer_websocket_http_closed}, - {EFL_NET_DIALER_EVENT_ERROR, _efl_net_dialer_websocket_http_error}, + {EFL_NET_DIALER_EVENT_DIALER_ERROR, _efl_net_dialer_websocket_http_error}, {EFL_NET_DIALER_HTTP_EVENT_HEADERS_DONE, _efl_net_dialer_websocket_http_headers_done}); EOLIAN static Efl_Object * @@ -1182,7 +1182,7 @@ _efl_net_dialer_websocket_efl_net_dialer_connected_set(Eo *o, Efl_Net_Dialer_Web if (pd->connected == connected) return; pd->connected = connected; if (connected) - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_CONNECTED, NULL); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, NULL); } EOLIAN static Eina_Bool @@ -1225,7 +1225,7 @@ EOLIAN static void _efl_net_dialer_websocket_efl_net_socket_address_remote_set(Eo *o EINA_UNUSED, Efl_Net_Dialer_Websocket_Data *pd, const char *address) { if (eina_stringshare_replace(&pd->address_remote, address)) - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_RESOLVED, NULL); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_RESOLVED, NULL); } EOLIAN static const char * diff --git a/src/lib/ecore_con/efl_net_dialer_websocket.eo b/src/lib/ecore_con/efl_net_dialer_websocket.eo index d400b02261..4a29fc30d5 100644 --- a/src/lib/ecore_con/efl_net_dialer_websocket.eo +++ b/src/lib/ecore_con/efl_net_dialer_websocket.eo @@ -1,7 +1,7 @@ import eina_types; import efl_net_http_types; -enum Efl.Net.Dialer_Websocket_Streaming_Mode { +enum @beta Efl.Net.Dialer_Websocket_Streaming_Mode { [[How to map WebSocket to EFL I/O Interfaces. @since 1.19 @@ -11,7 +11,7 @@ enum Efl.Net.Dialer_Websocket_Streaming_Mode { text, [[@Efl.Io.Writer.write will result in @Efl.Net.Dialer_Websocket.text_send]] } -enum Efl.Net.Dialer_Websocket_Close_Reason { +enum @beta Efl.Net.Dialer_Websocket_Close_Reason { [[Registered reasons for the CLOSE (opcode=0x8). These are the well known reasons, with some ranges being defined @@ -38,7 +38,7 @@ enum Efl.Net.Dialer_Websocket_Close_Reason { private_end = 4999, [[Applications can use range 4000-4999]] } -struct Efl.Net.Dialer_Websocket_Closed_Reason { +struct @beta Efl.Net.Dialer_Websocket_Closed_Reason { [[Close reason event payload. @since 1.19 diff --git a/src/lib/ecore_con/efl_net_dialer_windows.c b/src/lib/ecore_con/efl_net_dialer_windows.c index 8e78446b6f..bf6d525e36 100644 --- a/src/lib/ecore_con/efl_net_dialer_windows.c +++ b/src/lib/ecore_con/efl_net_dialer_windows.c @@ -100,7 +100,7 @@ _efl_net_dialer_windows_efl_net_dialer_dial(Eo *o, Efl_Net_Dialer_Windows_Data * efl_net_socket_address_remote_set(o, sstr); efl_net_socket_address_local_set(o, cstr); - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_RESOLVED, NULL); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_RESOLVED, NULL); efl_net_dialer_connected_set(o, EINA_TRUE); return _efl_net_socket_windows_io_start(o); @@ -125,7 +125,7 @@ _efl_net_dialer_windows_efl_net_dialer_connected_set(Eo *o, Efl_Net_Dialer_Windo { if (pd->connected == connected) return; pd->connected = connected; - if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_CONNECTED, NULL); + if (connected) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, NULL); } EOLIAN static Eina_Bool diff --git a/src/lib/ecore_con/efl_net_http_types.eot b/src/lib/ecore_con/efl_net_http_types.eot index f2e5aaa0e7..d86b9e368f 100644 --- a/src/lib/ecore_con/efl_net_http_types.eot +++ b/src/lib/ecore_con/efl_net_http_types.eot @@ -1,6 +1,6 @@ import eina_types; -enum Efl.Net.Http.Version { +enum @beta Efl.Net.Http.Version { [[HTTP protocol versions]] v1_0 = 100, [[HTTP version 1.0]] @@ -8,7 +8,7 @@ enum Efl.Net.Http.Version { v2_0 = 200, [[HTTP version 2.0]] } -enum Efl.Net.Http.Authentication_Method { +enum @beta Efl.Net.Http.Authentication_Method { [[HTTP authentication methods]] none = 0, [[HTTP authentication method none]] @@ -21,7 +21,7 @@ enum Efl.Net.Http.Authentication_Method { any = Efl.Net.Http.Authentication_Method.any_safe | Efl.Net.Http.Authentication_Method.basic, [[HTTP authentication method any]] } -enum Efl.Net.Http.Status { +enum @beta Efl.Net.Http.Status { [[Common HTTP status codes. A more detailed description on the various HTTPS status codes can be found one Wikipedia: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes]] @@ -109,7 +109,7 @@ enum Efl.Net.Http.Status { network_authentication_required = 511, [[HTTP status code: network authentication required]] } -struct Efl.Net.Http.Header { +struct @beta Efl.Net.Http.Header { [[An HTTP Header. Do not assume strings are Eina_Stringshare and they may be diff --git a/src/lib/ecore_con/efl_net_ip_address.eo b/src/lib/ecore_con/efl_net_ip_address.eo index 9b00a66ca3..b1cdd466c6 100644 --- a/src/lib/ecore_con/efl_net_ip_address.eo +++ b/src/lib/ecore_con/efl_net_ip_address.eo @@ -1,6 +1,6 @@ import eina_types; -struct Efl.Net.Ip_Address_Resolve_Results { +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. diff --git a/src/lib/ecore_con/efl_net_server.eo b/src/lib/ecore_con/efl_net_server.eo index 141cf9d0ae..0f23e5af54 100644 --- a/src/lib/ecore_con/efl_net_server.eo +++ b/src/lib/ecore_con/efl_net_server.eo @@ -26,7 +26,7 @@ interface @beta Efl.Net.Server { excess, see @.clients_limit. ]] - error: Eina.Error; [[An error has occurred and the server needs + server,error: Eina.Error; [[An error has occurred and the server needs to be stopped. ]] serving: void; [[Notifies the server is ready to accept clients. diff --git a/src/lib/ecore_con/efl_net_server_fd.c b/src/lib/ecore_con/efl_net_server_fd.c index 28626b0712..e4e6461576 100644 --- a/src/lib/ecore_con/efl_net_server_fd.c +++ b/src/lib/ecore_con/efl_net_server_fd.c @@ -81,7 +81,7 @@ _efl_net_server_fd_event_error(void *data EINA_UNUSED, const Efl_Event *event) Eina_Error err = EBADF; efl_net_server_serving_set(o, EINA_FALSE); - efl_event_callback_call(o, EFL_NET_SERVER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_SERVER_EVENT_SERVER_ERROR, &err); } EOLIAN static Efl_Object * @@ -474,7 +474,7 @@ _efl_net_server_fd_process_incoming_data(Eo *o, Efl_Net_Server_Fd_Data *pd) { Eina_Error err = efl_net_socket_error_get(); ERR("accept(" SOCKET_FMT "): %s", fd, eina_error_msg_get(err)); - efl_event_callback_call(o, EFL_NET_SERVER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_SERVER_EVENT_SERVER_ERROR, &err); return; } diff --git a/src/lib/ecore_con/efl_net_server_simple.c b/src/lib/ecore_con/efl_net_server_simple.c index 8c0c4a6732..46924fae25 100644 --- a/src/lib/ecore_con/efl_net_server_simple.c +++ b/src/lib/ecore_con/efl_net_server_simple.c @@ -109,7 +109,7 @@ static void _efl_net_server_simple_inner_server_error(void *data, const Efl_Event *event) { Eo *o = data; - efl_event_callback_call(o, EFL_NET_SERVER_EVENT_ERROR, event->info); + efl_event_callback_call(o, EFL_NET_SERVER_EVENT_SERVER_ERROR, event->info); } static void @@ -122,7 +122,7 @@ _efl_net_server_simple_inner_server_serving(void *data, const Efl_Event *event) EFL_CALLBACKS_ARRAY_DEFINE(_efl_net_server_simple_inner_server_cbs, { EFL_NET_SERVER_EVENT_CLIENT_ADD, _efl_net_server_simple_inner_server_client_add }, { EFL_NET_SERVER_EVENT_CLIENT_REJECTED, _efl_net_server_simple_inner_server_client_rejected }, - { EFL_NET_SERVER_EVENT_ERROR, _efl_net_server_simple_inner_server_error }, + { EFL_NET_SERVER_EVENT_SERVER_ERROR, _efl_net_server_simple_inner_server_error }, { EFL_NET_SERVER_EVENT_SERVING, _efl_net_server_simple_inner_server_serving }); EOLIAN static Efl_Object * diff --git a/src/lib/ecore_con/efl_net_server_tcp.c b/src/lib/ecore_con/efl_net_server_tcp.c index e4e5bcb377..b4bda04192 100644 --- a/src/lib/ecore_con/efl_net_server_tcp.c +++ b/src/lib/ecore_con/efl_net_server_tcp.c @@ -138,7 +138,7 @@ _efl_net_server_tcp_resolved(void *data, const char *host EINA_UNUSED, const cha freeaddrinfo(result); end: - if (err) efl_event_callback_call(o, EFL_NET_SERVER_EVENT_ERROR, &err); + if (err) efl_event_callback_call(o, EFL_NET_SERVER_EVENT_SERVER_ERROR, &err); efl_unref(o); } diff --git a/src/lib/ecore_con/efl_net_server_udp.c b/src/lib/ecore_con/efl_net_server_udp.c index 50a0c97908..0f0b2287e9 100644 --- a/src/lib/ecore_con/efl_net_server_udp.c +++ b/src/lib/ecore_con/efl_net_server_udp.c @@ -142,7 +142,7 @@ _efl_net_server_udp_resolved_bind(Eo *o, Efl_Net_Server_Udp_Data *pd, const stru if (mr) { ERR("could not join pending multicast group '%s': %s", mcast_addr, eina_error_msg_get(mr)); - efl_event_callback_call(o, EFL_NET_SERVER_EVENT_ERROR, &mr); + efl_event_callback_call(o, EFL_NET_SERVER_EVENT_SERVER_ERROR, &mr); } } @@ -191,7 +191,7 @@ _efl_net_server_udp_resolved(void *data, const char *host EINA_UNUSED, const cha freeaddrinfo(result); end: - if (err) efl_event_callback_call(o, EFL_NET_SERVER_EVENT_ERROR, &err); + if (err) efl_event_callback_call(o, EFL_NET_SERVER_EVENT_SERVER_ERROR, &err); efl_unref(o); } @@ -328,7 +328,7 @@ _efl_net_server_udp_efl_net_server_fd_process_incoming_data(Eo *o, Efl_Net_Serve Eina_Error err = efl_net_socket_error_get(); ERR("recvfrom(" SOCKET_FMT ", %p, %zu, 0, %p, %d): %s", fd, buf, buflen, &addr, addrlen, eina_error_msg_get(err)); free(buf); - efl_event_callback_call(o, EFL_NET_SERVER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_SERVER_EVENT_SERVER_ERROR, &err); return; } if ((size_t)r < buflen) @@ -341,7 +341,7 @@ _efl_net_server_udp_efl_net_server_fd_process_incoming_data(Eo *o, Efl_Net_Serve free(buf); ERR("Out of memory on efl net udp data incoming"); - efl_event_callback_call(o, EFL_NET_SERVER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_SERVER_EVENT_SERVER_ERROR, &err); return; } } diff --git a/src/lib/ecore_con/efl_net_server_unix.c b/src/lib/ecore_con/efl_net_server_unix.c index 38280c27c8..ed8735fb0b 100644 --- a/src/lib/ecore_con/efl_net_server_unix.c +++ b/src/lib/ecore_con/efl_net_server_unix.c @@ -165,7 +165,7 @@ _efl_net_server_unix_bind(Eo *o, Efl_Net_Server_Unix_Data *pd) error: if (err) { - efl_event_callback_call(o, EFL_NET_SERVER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_SERVER_EVENT_SERVER_ERROR, &err); if (fd != INVALID_SOCKET) closesocket(fd); efl_loop_fd_set(o, SOCKET_TO_LOOP_FD(INVALID_SOCKET)); } diff --git a/src/lib/ecore_con/efl_net_server_windows.c b/src/lib/ecore_con/efl_net_server_windows.c index 68e7fe9906..454e87c547 100644 --- a/src/lib/ecore_con/efl_net_server_windows.c +++ b/src/lib/ecore_con/efl_net_server_windows.c @@ -151,7 +151,7 @@ _efl_net_server_windows_client_listen_failure(void *data, Eo *client EINA_UNUSED } if (err) - efl_event_callback_call(o, EFL_NET_SERVER_EVENT_ERROR, &err); + efl_event_callback_call(o, EFL_NET_SERVER_EVENT_SERVER_ERROR, &err); // TODO: create a new one on failure? diff --git a/src/lib/ecore_con/efl_net_session.eo b/src/lib/ecore_con/efl_net_session.eo index ed968667ef..81ef902a47 100644 --- a/src/lib/ecore_con/efl_net_session.eo +++ b/src/lib/ecore_con/efl_net_session.eo @@ -1,4 +1,4 @@ -enum Efl.Net.Session_State { +enum @beta Efl.Net.Session_State { [[Provides the session connectivity state. @since 1.19 @@ -9,7 +9,7 @@ enum Efl.Net.Session_State { } /* keep in sync with efl_net_control_technology.eo, comment what doesn't make sense */ -enum Efl.Net.Session_Technology { +enum @beta Efl.Net.Session_Technology { [[Bitwise-able technologies to allow for a network session. @since 1.9 diff --git a/src/lib/ecore_con/efl_net_socket_ssl.c b/src/lib/ecore_con/efl_net_socket_ssl.c index 912a8cbb87..4d2c0c08f4 100644 --- a/src/lib/ecore_con/efl_net_socket_ssl.c +++ b/src/lib/ecore_con/efl_net_socket_ssl.c @@ -225,7 +225,7 @@ efl_net_socket_ssl_sock_resolved(void *data, const Efl_Event *event EINA_UNUSED) if (pd->torndown) return; - efl_event_callback_call(o, EFL_NET_DIALER_EVENT_RESOLVED, NULL); + efl_event_callback_call(o, EFL_NET_DIALER_EVENT_DIALER_RESOLVED, NULL); } static void @@ -250,8 +250,8 @@ efl_net_socket_ssl_sock_connected(void *data, const Efl_Event *event EINA_UNUSED } EFL_CALLBACKS_ARRAY_DEFINE(efl_net_socket_ssl_sock_dialer_cbs, - {EFL_NET_DIALER_EVENT_RESOLVED, efl_net_socket_ssl_sock_resolved}, - {EFL_NET_DIALER_EVENT_CONNECTED, efl_net_socket_ssl_sock_connected}); + {EFL_NET_DIALER_EVENT_DIALER_RESOLVED, efl_net_socket_ssl_sock_resolved}, + {EFL_NET_DIALER_EVENT_DIALER_CONNECTED, efl_net_socket_ssl_sock_connected}); static void _efl_net_socket_ssl_context_del(void *data, const Efl_Event *event EINA_UNUSED) diff --git a/src/lib/ecore_con/efl_net_ssl_types.eot b/src/lib/ecore_con/efl_net_ssl_types.eot index 5c41b921c5..8b7d1a1231 100644 --- a/src/lib/ecore_con/efl_net_ssl_types.eot +++ b/src/lib/ecore_con/efl_net_ssl_types.eot @@ -1,4 +1,4 @@ -enum Efl.Net.Ssl.Verify_Mode { +enum @beta Efl.Net.Ssl.Verify_Mode { [[Defines how remote peers should be verified. @since 1.19 @@ -8,7 +8,7 @@ enum Efl.Net.Ssl.Verify_Mode { required, [[Always verify and fail if certificate wasn't provided]] } -enum Efl.Net.Ssl.Cipher { +enum @beta Efl.Net.Ssl.Cipher { [[Defines the SSL/TLS version to use. Prefer 'auto' or one of the TLS variants. diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c index 094e95aed1..97b263784b 100644 --- a/src/lib/ecore_ipc/ecore_ipc.c +++ b/src/lib/ecore_ipc/ecore_ipc.c @@ -607,8 +607,8 @@ _ecore_ipc_dialer_connected(void *data, const Efl_Event *event EINA_UNUSED) EFL_CALLBACKS_ARRAY_DEFINE(_ecore_ipc_dialer_cbs, { EFL_IO_READER_EVENT_EOS, _ecore_ipc_dialer_eos }, - { EFL_NET_DIALER_EVENT_ERROR, _ecore_ipc_dialer_error }, - { EFL_NET_DIALER_EVENT_CONNECTED, _ecore_ipc_dialer_connected }); + { EFL_NET_DIALER_EVENT_DIALER_ERROR, _ecore_ipc_dialer_error }, + { EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _ecore_ipc_dialer_connected }); static Eina_Bool ecore_ipc_server_data_process(Ecore_Ipc_Server *svr, void *data, int size, Eina_Bool *stolen); diff --git a/src/lib/ector/Ector.h b/src/lib/ector/Ector.h index e2268f3ad8..729f4e5280 100644 --- a/src/lib/ector/Ector.h +++ b/src/lib/ector/Ector.h @@ -3,8 +3,9 @@ #include #include +#ifdef EFL_BETA_API_SUPPORT #include - +#endif #ifdef EAPI # undef EAPI #endif diff --git a/src/lib/ector/ector_buffer.eo b/src/lib/ector/ector_buffer.eo index 9d0aaf4040..505442cdff 100644 --- a/src/lib/ector/ector_buffer.eo +++ b/src/lib/ector/ector_buffer.eo @@ -1,6 +1,6 @@ import efl_gfx_types; -enum Ector.Buffer.Flag { +enum @beta Ector.Buffer.Flag { [[Buffer capabilities]] none = 0x00, [[Buffer may not have any backing, indicates an invalid buffer.]] cpu_readable = 0x01, [[Can be read from the CPU after map. Reading may still be very slow.]] @@ -13,7 +13,7 @@ enum Ector.Buffer.Flag { /* non_coherent = 0x80, [[Memory may be mapped but will not be coherent between GPU and CPU. Call flush or invalidate to synchronize it.]] */ } -enum Ector.Buffer.Access_Flag { +enum @beta Ector.Buffer.Access_Flag { [[Buffer access permissions]] none = 0x0, [[No access permission]] read = 0x1, [[Read access permission]] diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h index 863c9e69be..8f657827a3 100644 --- a/src/lib/edje/Edje_Legacy.h +++ b/src/lib/edje/Edje_Legacy.h @@ -1533,16 +1533,32 @@ EAPI double edje_object_base_scale_get(const Evas_Object *obj); * @{ */ -/** Dragable properties values */ -typedef Efl_Ui_Drag_Dir Edje_Drag_Dir; -/** Not dragable */ -#define EDJE_DRAG_DIR_NONE EFL_UI_DRAG_DIR_NONE -/** Dragable horizontally */ -#define EDJE_DRAG_DIR_X EFL_UI_DRAG_DIR_X -/** Dragable verically */ -#define EDJE_DRAG_DIR_Y EFL_UI_DRAG_DIR_Y -/** Dragable in both directions */ -#define EDJE_DRAG_DIR_XY EFL_UI_DRAG_DIR_XY +/** + * @defgroup Edje_Part_Drag Edje Drag + * + * @brief Functions that deal with dragable parts. + * + * To create a movable part it must be declared as dragable + * in EDC file. To do so, one must define a "dragable" block inside + * the "part" block. + * + * These functions are used to set dragging properties to a + * part or get dragging information about it. + * + * @see @ref tutorial_edje_drag + * + * @ingroup Edje_Object_Part + * + * @{ + */ + +typedef enum _Edje_Drag_Dir +{ + EDJE_DRAG_DIR_NONE = 0, + EDJE_DRAG_DIR_X = 1, + EDJE_DRAG_DIR_Y = 2, + EDJE_DRAG_DIR_XY = 3 +} Edje_Drag_Dir; /** diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c index 5783fabbc7..b5397b2c91 100644 --- a/src/lib/edje/edje_entry.c +++ b/src/lib/edje/edje_entry.c @@ -2889,9 +2889,9 @@ _edje_entry_init(Edje *ed) _edje_key_down_cb, ed); evas_object_event_callback_add(ed->obj, EVAS_CALLBACK_KEY_UP, _edje_key_up_cb, ed); - efl_event_callback_add(ed->base.evas, EFL_CANVAS_SCENE_EVENT_FOCUS_IN, + efl_event_callback_add(ed->base.evas, EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_IN, _evas_focus_in_cb, ed); - efl_event_callback_add(ed->base.evas, EFL_CANVAS_SCENE_EVENT_FOCUS_OUT, + efl_event_callback_add(ed->base.evas, EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_OUT, _evas_focus_out_cb, ed); } @@ -2910,9 +2910,9 @@ _edje_entry_shutdown(Edje *ed) _edje_key_down_cb); evas_object_event_callback_del(ed->obj, EVAS_CALLBACK_KEY_UP, _edje_key_up_cb); - efl_event_callback_del(ed->base.evas, EFL_CANVAS_SCENE_EVENT_FOCUS_IN, + efl_event_callback_del(ed->base.evas, EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_IN, _evas_focus_in_cb, ed); - efl_event_callback_del(ed->base.evas, EFL_CANVAS_SCENE_EVENT_FOCUS_OUT, + efl_event_callback_del(ed->base.evas, EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_OUT, _evas_focus_out_cb, ed); } diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c index 0d0baf334a..7b97bd303e 100644 --- a/src/lib/edje/edje_smart.c +++ b/src/lib/edje/edje_smart.c @@ -454,7 +454,7 @@ edje_object_file_get(const Edje_Object *obj, const char **file, const char **gro } EOLIAN static void -_efl_canvas_layout_efl_canvas_object_paragraph_direction_set(Eo *obj, Edje *ed, Evas_BiDi_Direction dir) +_efl_canvas_layout_efl_canvas_object_paragraph_direction_set(Eo *obj, Edje *ed, Efl_Text_Bidirectional_Type dir) { efl_canvas_object_paragraph_direction_set(efl_super(obj, MY_CLASS), dir); diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c index f3be77313c..95d7676989 100644 --- a/src/lib/edje/edje_text.c +++ b/src/lib/edje/edje_text.c @@ -499,7 +499,7 @@ arrange_text: FLOAT_T align_x; if (params->type.text->align.x < FROM_INT(0)) { - if (evas_object_text_direction_get(ep->object) == + if ((Evas_BiDi_Direction)evas_object_text_direction_get(ep->object) == EVAS_BIDI_DIRECTION_RTL) { align_x = FROM_INT(1); diff --git a/src/lib/edje/efl_canvas_layout_part_text.eo b/src/lib/edje/efl_canvas_layout_part_text.eo index 09213c663e..a46326391c 100644 --- a/src/lib/edje/efl_canvas_layout_part_text.eo +++ b/src/lib/edje/efl_canvas_layout_part_text.eo @@ -1,4 +1,4 @@ -enum Efl.Canvas.Layout_Part_Text_Expand +enum @beta Efl.Canvas.Layout_Part_Text_Expand { [[Text layout policy to enforce. If none is set, min/max descriptions are taken in considerations solely. diff --git a/src/lib/edje/efl_layout_calc.eo b/src/lib/edje/efl_layout_calc.eo index cf4f45ebde..b5b45c540d 100644 --- a/src/lib/edje/efl_layout_calc.eo +++ b/src/lib/edje/efl_layout_calc.eo @@ -1,6 +1,6 @@ import eina_types; -interface @beta Efl.Layout.Calc +interface Efl.Layout.Calc { [[This interface defines a common set of APIs used to trigger calculations with layout objects. diff --git a/src/lib/edje/efl_layout_group.eo b/src/lib/edje/efl_layout_group.eo index 2f9aa95f04..8c75204671 100644 --- a/src/lib/edje/efl_layout_group.eo +++ b/src/lib/edje/efl_layout_group.eo @@ -1,6 +1,6 @@ import eina_types; -interface @beta Efl.Layout.Group +interface Efl.Layout.Group { [[APIs representing static data from a group in an edje file. diff --git a/src/lib/edje/efl_layout_signal.eo b/src/lib/edje/efl_layout_signal.eo index 90709fb8d0..3b4562e596 100644 --- a/src/lib/edje/efl_layout_signal.eo +++ b/src/lib/edje/efl_layout_signal.eo @@ -17,7 +17,7 @@ function EflLayoutSignalCb { } }; -interface @beta Efl.Layout.Signal +interface Efl.Layout.Signal { [[Layouts asynchronous messaging and signaling interface. diff --git a/src/lib/efl/interfaces/efl_canvas_pointer.eo b/src/lib/efl/interfaces/efl_canvas_pointer.eo index 3ea8cddfc7..9dbaef00fd 100644 --- a/src/lib/efl/interfaces/efl_canvas_pointer.eo +++ b/src/lib/efl/interfaces/efl_canvas_pointer.eo @@ -1,10 +1,11 @@ import efl_input_device; -interface @beta Efl.Canvas.Pointer +interface Efl.Canvas.Pointer { [[Efl Canvas Pointer interface]] methods { - @property pointer_inside { + /* FIXME Efl.Input.Device is not stable yet*/ + @property pointer_inside @beta { get { [[Returns whether the mouse pointer is logically inside the canvas. diff --git a/src/lib/efl/interfaces/efl_canvas_scene.eo b/src/lib/efl/interfaces/efl_canvas_scene.eo index 75b64d54f3..469f63aac2 100644 --- a/src/lib/efl/interfaces/efl_canvas_scene.eo +++ b/src/lib/efl/interfaces/efl_canvas_scene.eo @@ -1,7 +1,7 @@ import efl_input_device; import efl_gfx_types; -interface @beta Efl.Canvas.Scene +interface Efl.Canvas.Scene { [[Interface containing basic canvas-related methods and events.]] methods { @@ -142,7 +142,8 @@ interface @beta Efl.Canvas.Scene ]] } } - seats { + /* FIXME Efl.Input.Device is not stable yet*/ + seats @beta { [[Iterate over the available input device seats for the canvas. A "seat" is the term used for a group of input devices, typically including @@ -154,7 +155,8 @@ interface @beta Efl.Canvas.Scene return: iterator @owned; [[An iterator over the attached seats.]] } - @property device { + /* FIXME Efl.Input.Device is not stable yet*/ + @property device @beta{ [[An input device attached to this canvas, found by name. Note: This function is meant to find seats and not individual @@ -172,7 +174,8 @@ interface @beta Efl.Canvas.Scene seat: Efl.Input.Device; [[The device or seat, $null if not found.]] } } - @property seat { + /* FIXME Efl.Input.Device is not stable yet*/ + @property seat @beta { [[Get a seat attached to this canvas using the seat's id property. Seats are associated with an arbitrary integer id. The id is not a @@ -191,7 +194,8 @@ interface @beta Efl.Canvas.Scene seat: Efl.Input.Device; [[The seat or $null if not found.]] } } - @property seat_default { + /* FIXME Efl.Input.Device is not stable yet*/ + @property seat_default @beta { [[Get the default seat attached to this canvas. A canvas may have exactly one default seat. @@ -206,7 +210,8 @@ interface @beta Efl.Canvas.Scene seat: Efl.Input.Device; [[The default seat or $null if one does not exist.]] } } - @property pointer_position { + /* FIXME Efl.Input.Device is not stable yet*/ + @property pointer_position @beta { get { [[This function returns the current known pointer coordinates @@ -224,15 +229,15 @@ interface @beta Efl.Canvas.Scene } } events { - focus,in: Efl.Input.Focus; [[Called when canvas got focus]] - focus,out: Efl.Input.Focus; [[Called when canvas lost focus]] + scene,focus,in: Efl.Input.Focus; [[Called when scene got focus]] + scene,focus,out: Efl.Input.Focus; [[Called when scene lost focus]] object,focus,in: Efl.Input.Focus; [[Called when object got focus]] object,focus,out: Efl.Input.Focus; [[Called when object lost focus]] render,pre: void; [[Called when pre render happens]] /* FIXME: event_info can be NULL, but @nullable tag does not work on events yet */ render,post: Efl.Gfx.Event.Render_Post; [[Called when post render happens]] - device,changed: Efl.Input.Device; [[Called when input device changed]] - device,added: Efl.Input.Device; [[Called when input device was added]] - device,removed: Efl.Input.Device; [[Called when input device was removed]] + device,changed @beta : Efl.Input.Device; [[Called when input device changed]] + device,added @beta: Efl.Input.Device; [[Called when input device was added]] + device,removed @beta : Efl.Input.Device; [[Called when input device was removed]] } } diff --git a/src/lib/efl/interfaces/efl_container.eo b/src/lib/efl/interfaces/efl_container.eo index 42e4d6a2f1..88664432a0 100644 --- a/src/lib/efl/interfaces/efl_container.eo +++ b/src/lib/efl/interfaces/efl_container.eo @@ -1,4 +1,4 @@ -interface @beta Efl.Container +interface Efl.Container { [[Common interface for objects that have multiple contents (sub objects). diff --git a/src/lib/efl/interfaces/efl_content.eo b/src/lib/efl/interfaces/efl_content.eo index 961bce9fb8..4f84abac4b 100644 --- a/src/lib/efl/interfaces/efl_content.eo +++ b/src/lib/efl/interfaces/efl_content.eo @@ -1,4 +1,4 @@ -interface @beta Efl.Content +interface Efl.Content { [[Common interface for objects that have a (single) content. diff --git a/src/lib/efl/interfaces/efl_file.eo b/src/lib/efl/interfaces/efl_file.eo index 985b3fd687..ef45ce37c4 100644 --- a/src/lib/efl/interfaces/efl_file.eo +++ b/src/lib/efl/interfaces/efl_file.eo @@ -1,7 +1,7 @@ import eina_types; import efl_gfx_types; -mixin @beta Efl.File requires Efl.Object { +mixin Efl.File requires Efl.Object { [[Efl file interface]] methods { @property mmap { @@ -62,7 +62,7 @@ mixin @beta Efl.File requires Efl.Object { You must not modify the strings on the returned pointers.]] } values { - key: string; [[The group that the image belongs to, in case + key: string; [[The group that the image belongs to, in case it's an EET(including Edje case) file. This can be used as a key inside evas image cache if this is a normal image file not eet file.]] diff --git a/src/lib/efl/interfaces/efl_file_save.eo b/src/lib/efl/interfaces/efl_file_save.eo index 43c8d4c8f6..715f3a215b 100644 --- a/src/lib/efl/interfaces/efl_file_save.eo +++ b/src/lib/efl/interfaces/efl_file_save.eo @@ -9,7 +9,7 @@ struct Efl.File_Save_Info encoding: string; [[The encoding to use when saving the file.]] } -interface @beta Efl.File_Save { +interface Efl.File_Save { [[Efl file saving interface]] methods { save @const { diff --git a/src/lib/efl/interfaces/efl_gfx_buffer.eo b/src/lib/efl/interfaces/efl_gfx_buffer.eo index 795b6663bc..074dd7843a 100644 --- a/src/lib/efl/interfaces/efl_gfx_buffer.eo +++ b/src/lib/efl/interfaces/efl_gfx_buffer.eo @@ -2,7 +2,7 @@ import efl_gfx_types; import eina_types; /* FIXME: this is very very low level. expose to apps? */ -enum Efl.Gfx.Buffer_Access_Mode { +enum @beta Efl.Gfx.Buffer_Access_Mode { [[Graphics buffer access mode]] none = 0x0, [[No buffer access]] read = 0x1, [[Read access to buffer]] diff --git a/src/lib/efl/interfaces/efl_gfx_color.eo b/src/lib/efl/interfaces/efl_gfx_color.eo index a72cae23db..d3c41e1e31 100644 --- a/src/lib/efl/interfaces/efl_gfx_color.eo +++ b/src/lib/efl/interfaces/efl_gfx_color.eo @@ -1,6 +1,6 @@ import efl_gfx_types; -mixin @beta Efl.Gfx.Color +mixin Efl.Gfx.Color { [[Efl Gfx Color mixin class]] data: null; diff --git a/src/lib/efl/interfaces/efl_gfx_entity.eo b/src/lib/efl/interfaces/efl_gfx_entity.eo index 6f6c808e46..48caf1ecb3 100644 --- a/src/lib/efl/interfaces/efl_gfx_entity.eo +++ b/src/lib/efl/interfaces/efl_gfx_entity.eo @@ -1,6 +1,6 @@ import eina_types; -interface @beta Efl.Gfx.Entity { +interface Efl.Gfx.Entity { [[Efl graphics interface]] eo_prefix: efl_gfx_entity; methods { diff --git a/src/lib/efl/interfaces/efl_gfx_frame_controller.eo b/src/lib/efl/interfaces/efl_gfx_frame_controller.eo index b2a164ca23..1b53f3a454 100644 --- a/src/lib/efl/interfaces/efl_gfx_frame_controller.eo +++ b/src/lib/efl/interfaces/efl_gfx_frame_controller.eo @@ -1,7 +1,7 @@ /* FIXME: invalid type from evas/emile! */ /* type @extern Evas.Animated_Loop_Hint: int; */ -enum Efl.Gfx.Frame_Controller_Loop_Hint { +enum @beta Efl.Gfx.Frame_Controller_Loop_Hint { [[Frame loop modes]] none = 0, [[No looping order specified.]] loop = 1, [[Standard loop: 1->2->3->1->2->3->1]] diff --git a/src/lib/efl/interfaces/efl_gfx_hint.eo b/src/lib/efl/interfaces/efl_gfx_hint.eo index 72ab35ebb3..c45f97633c 100644 --- a/src/lib/efl/interfaces/efl_gfx_hint.eo +++ b/src/lib/efl/interfaces/efl_gfx_hint.eo @@ -4,7 +4,7 @@ import efl_gfx_types; const Efl.Gfx.Hint_Expand: double = 1.0; [[Use with @Efl.Gfx.Hint.hint_weight.]] -interface @beta Efl.Gfx.Hint +interface Efl.Gfx.Hint { [[Efl graphics hint interface]] event_prefix: efl_gfx_entity; diff --git a/src/lib/efl/interfaces/efl_gfx_image.eo b/src/lib/efl/interfaces/efl_gfx_image.eo index 5d42432aba..3167b3ec3b 100644 --- a/src/lib/efl/interfaces/efl_gfx_image.eo +++ b/src/lib/efl/interfaces/efl_gfx_image.eo @@ -1,7 +1,7 @@ import efl_gfx_types; import eina_types; -enum Efl.Gfx.Image_Content_Hint +enum @beta Efl.Gfx.Image_Content_Hint { [[How an image's data is to be treated by EFL, for optimization.]] none = 0, [[No hint on the content (default).]] @@ -9,7 +9,7 @@ enum Efl.Gfx.Image_Content_Hint static = 2 [[The content won't change over time.]] } -enum Efl.Gfx.Image_Scale_Hint +enum @beta Efl.Gfx.Image_Scale_Hint { /* FIXME: Legacy is in Emile, where it does not belong. */ [[How an image's data is to be treated by EFL, with regard to scaling cache.]] @@ -18,7 +18,7 @@ enum Efl.Gfx.Image_Scale_Hint static = 2 [[Image will not be re-scaled over time, thus turning scaling cache ON for its data.]] } -enum Efl.Gfx.Image_Scale_Type +enum @beta Efl.Gfx.Image_Scale_Type { [[Enumeration that defines scale types of an image.]] fill, [[Scale the image so that it matches @@ -213,9 +213,9 @@ interface @beta Efl.Gfx.Image } } events { - preload: void; [[Image data has been preloaded.]] - resize: void; [[Image was resized (its pixel data).]] - unload: void; [[Image data has been unloaded (by some mechanism in + image,preload: void; [[Image data has been preloaded.]] + image,resize: void; [[Image was resized (its pixel data).]] + image,unload: void; [[Image data has been unloaded (by some mechanism in EFL that threw out the original image data).]] } } 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 1727e578e6..d0cef46b35 100644 --- a/src/lib/efl/interfaces/efl_gfx_image_load_controller.eo +++ b/src/lib/efl/interfaces/efl_gfx_image_load_controller.eo @@ -2,7 +2,7 @@ import eina_types; import efl_gfx_types; /* -enum Efl.Gfx.Image_Load_Controller_State +enum @beta Efl.Gfx.Image_Load_Controller_State { none = 0, [[Not loading any image.]] loaded = 1, [[Image data is loaded, nothing is pending.]] diff --git a/src/lib/efl/interfaces/efl_gfx_stack.eo b/src/lib/efl/interfaces/efl_gfx_stack.eo index 3784358720..bfe6d1106c 100644 --- a/src/lib/efl/interfaces/efl_gfx_stack.eo +++ b/src/lib/efl/interfaces/efl_gfx_stack.eo @@ -1,7 +1,7 @@ const Efl.Gfx.Stack_Layer_Min: short = -32768; [[bottom-most layer number]] const Efl.Gfx.Stack_Layer_Max: short = 32767; [[top-most layer number]] -interface @beta Efl.Gfx.Stack +interface Efl.Gfx.Stack { [[Efl graphics stack interface]] event_prefix: efl_gfx_entity; diff --git a/src/lib/efl/interfaces/efl_gfx_types.eot b/src/lib/efl/interfaces/efl_gfx_types.eot index 283c9286dd..af9d3d6bb6 100644 --- a/src/lib/efl/interfaces/efl_gfx_types.eot +++ b/src/lib/efl/interfaces/efl_gfx_types.eot @@ -1,6 +1,6 @@ import eina_types; -enum Efl.Gfx.Colorspace { +enum @beta Efl.Gfx.Colorspace { [[Graphics colorspace type]] argb8888, [[ARGB 32 bits per pixel, high-byte is Alpha, accessed one 32bit word at a time.]] ycbcr422p601_pl, [[YCbCr 4:2:2 Planar, ITU.BT-601 specifications. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows.]] @@ -78,7 +78,7 @@ enum Efl.Gfx.Gradient_Spread last [[Sentinel value to indicate last enum field during iteration]] } -enum Efl.Gfx.Fill_Rule +enum @beta Efl.Gfx.Fill_Rule { [[Type defining how an image content get filled. @since 1.14 @@ -109,7 +109,7 @@ struct Efl.Gfx.Gradient_Stop a: int; [[The component A color of the gradient stop]] } -struct Efl.Gfx.Stroke_Color +struct @beta Efl.Gfx.Stroke_Color { [[Internal structure for @Efl.Gfx.Stroke.]] r: int; [[The component R color of the stroke]] @@ -118,7 +118,7 @@ struct Efl.Gfx.Stroke_Color a: int; [[The component A color of the stroke]] } -struct Efl.Gfx.Stroke +struct @beta Efl.Gfx.Stroke { [[Type defining stroke information. Describes the properties to define the path stroke. @@ -134,13 +134,13 @@ struct Efl.Gfx.Stroke join: Efl.Gfx.Join; [[Stroke join]] } -struct Efl.Gfx.Shape_Public +struct @beta Efl.Gfx.Shape_Public { [[Public shape]] stroke: Efl.Gfx.Stroke; [[Internal representation as stroke]] } -enum Efl.Gfx.Border_Fill_Mode +enum @beta Efl.Gfx.Border_Fill_Mode { [[How an image's center region (the complement to the border region) should be rendered by EFL]] none = 0, [[Image's center region is $not to be rendered]] @@ -188,14 +188,14 @@ enum Efl.Gfx.Hint_Aspect aspect.]] } -enum Efl.Gfx.Color_Class_Layer { +enum @beta Efl.Gfx.Color_Class_Layer { [[Efl Gfx Color Class layer enum]] normal = 0, [[Default color]] outline, [[Outline color]] shadow [[Shadow color]] } -type Efl.Font.Size: int; [[Efl font size type]] +type @beta Efl.Font.Size: int; [[Efl font size type]] var Efl.Gfx.Image.Load_Error.NONE: Eina.Error; [[No error on load]] var Efl.Gfx.Image.Load_Error.GENERIC: Eina.Error; [[A non-specific error occurred]] diff --git a/src/lib/efl/interfaces/efl_input_device.eo b/src/lib/efl/interfaces/efl_input_device.eo index 86091a2d11..90f507af21 100644 --- a/src/lib/efl/interfaces/efl_input_device.eo +++ b/src/lib/efl/interfaces/efl_input_device.eo @@ -1,4 +1,4 @@ -enum Efl.Input.Device_Type +enum @beta Efl.Input.Device_Type { [[General type of input device. diff --git a/src/lib/efl/interfaces/efl_input_types.eot b/src/lib/efl/interfaces/efl_input_types.eot index a06f6044f7..bad3eb30fc 100644 --- a/src/lib/efl/interfaces/efl_input_types.eot +++ b/src/lib/efl/interfaces/efl_input_types.eot @@ -1,4 +1,4 @@ -enum Efl.Pointer.Action +enum @beta Efl.Pointer.Action { [[Pointer event type. Represents which kind of event this is. @@ -18,7 +18,7 @@ enum Efl.Pointer.Action axis, [[Axis event (pen, stick, ...).]] } -enum Efl.Pointer.Flags +enum @beta Efl.Pointer.Flags { [[Pointer flags indicating whether a double or triple click is under way. @@ -74,7 +74,7 @@ enum Efl.Input.Object_Pointer_Mode { ]] } -enum Efl.Input.Value { +enum @beta Efl.Input.Value { [[Keys for the generic values of all events. @since 1.19 diff --git a/src/lib/efl/interfaces/efl_io_closer.eo b/src/lib/efl/interfaces/efl_io_closer.eo index 42be3284ba..2ba4323085 100644 --- a/src/lib/efl/interfaces/efl_io_closer.eo +++ b/src/lib/efl/interfaces/efl_io_closer.eo @@ -1,6 +1,6 @@ import eina_types; -interface @beta Efl.Io.Closer { +interface Efl.Io.Closer { [[Generic interface for objects that can close themselves. This interface allows external objects to transparently close an diff --git a/src/lib/efl/interfaces/efl_io_positioner.eo b/src/lib/efl/interfaces/efl_io_positioner.eo index ace155f400..f1f3f201ce 100644 --- a/src/lib/efl/interfaces/efl_io_positioner.eo +++ b/src/lib/efl/interfaces/efl_io_positioner.eo @@ -1,6 +1,6 @@ import eina_types; -enum Efl.Io.Positioner_Whence { +enum @beta Efl.Io.Positioner_Whence { [[Seek position modes]] start, [[Seek from start of the stream/file]] current, [[Seek from current position]] diff --git a/src/lib/efl/interfaces/efl_io_reader.eo b/src/lib/efl/interfaces/efl_io_reader.eo index ca5aea0b09..c173538a16 100644 --- a/src/lib/efl/interfaces/efl_io_reader.eo +++ b/src/lib/efl/interfaces/efl_io_reader.eo @@ -1,6 +1,6 @@ import eina_types; -interface @beta Efl.Io.Reader { +interface Efl.Io.Reader { [[Generic interface for objects that can read data into a provided memory. This interface allows external objects to transparently monitor diff --git a/src/lib/efl/interfaces/efl_io_writer.eo b/src/lib/efl/interfaces/efl_io_writer.eo index 443f7b2c78..593c81e4fc 100644 --- a/src/lib/efl/interfaces/efl_io_writer.eo +++ b/src/lib/efl/interfaces/efl_io_writer.eo @@ -1,6 +1,6 @@ import eina_types; -interface @beta Efl.Io.Writer { +interface Efl.Io.Writer { [[Generic interface for objects that can write data from a provided memory. This interface allows external objects to transparently write diff --git a/src/lib/efl/interfaces/efl_model.eo b/src/lib/efl/interfaces/efl_model.eo index e7ff4aa05f..29dbf9775c 100644 --- a/src/lib/efl/interfaces/efl_model.eo +++ b/src/lib/efl/interfaces/efl_model.eo @@ -1,10 +1,10 @@ -struct Efl.Model_Property_Event { +struct @beta Efl.Model_Property_Event { [[EFL model property event data structure]] - changed_properties: array; [[List of changed properties]] - invalidated_properties: array; [[Removed properties identified by name]] + changed_properties: array; [[List of changed properties]] + invalidated_properties: array; [[Removed properties identified by name]] } -struct Efl.Model_Children_Event { +struct @beta Efl.Model_Children_Event { [[Every time a child is added the event @[Efl.Model.child,added] is dispatched passing along this structure.]] index: uint; [[index is a hint and is intended to provide a way for applications diff --git a/src/lib/efl/interfaces/efl_mvvm_common.c b/src/lib/efl/interfaces/efl_mvvm_common.c index 2fb9118ebd..a2c7fa4f8d 100644 --- a/src/lib/efl/interfaces/efl_mvvm_common.c +++ b/src/lib/efl/interfaces/efl_mvvm_common.c @@ -62,6 +62,7 @@ _efl_model_properties_changed_internal(const Efl_Model *model, ...) { Efl_Model_Property_Event ev = { 0 }; Eina_Array *properties = eina_array_new(1); + Eina_Stringshare *sp; const char *property; va_list args; @@ -69,7 +70,7 @@ _efl_model_properties_changed_internal(const Efl_Model *model, ...) while ((property = (const char*) va_arg(args, const char*))) { - eina_array_push(properties, property); + eina_array_push(properties, eina_stringshare_add(property)); } va_end(args); @@ -78,6 +79,8 @@ _efl_model_properties_changed_internal(const Efl_Model *model, ...) efl_event_callback_call((Efl_Model *) model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, &ev); + while ((sp = eina_array_pop(properties))) + eina_stringshare_del(sp); eina_array_free(properties); } @@ -87,13 +90,16 @@ efl_model_property_invalidated_notify(Efl_Model *model, const char *property) Eina_Array *invalidated_properties = eina_array_new(1); EINA_SAFETY_ON_NULL_RETURN(invalidated_properties); - Eina_Bool ret = eina_array_push(invalidated_properties, property); + Eina_Stringshare *sp = eina_stringshare_add(property); + + Eina_Bool ret = eina_array_push(invalidated_properties, sp); EINA_SAFETY_ON_FALSE_GOTO(ret, on_error); Efl_Model_Property_Event evt = {.invalidated_properties = invalidated_properties}; efl_event_callback_call(model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, &evt); on_error: + eina_stringshare_del(sp); eina_array_free(invalidated_properties); } diff --git a/src/lib/efl/interfaces/efl_observable.eo b/src/lib/efl/interfaces/efl_observable.eo index 2ac6ed750b..12686c15e9 100644 --- a/src/lib/efl/interfaces/efl_observable.eo +++ b/src/lib/efl/interfaces/efl_observable.eo @@ -1,6 +1,6 @@ import efl_types; -struct @free(efl_observable_tuple_free) Efl.Observable_Tuple +struct @beta @free(efl_observable_tuple_free) Efl.Observable_Tuple { [[This type describes an observable touple]] key: string; [[Touple key]] diff --git a/src/lib/efl/interfaces/efl_orientation.eo b/src/lib/efl/interfaces/efl_orientation.eo index 8eb4f55b4a..e874dcfdb7 100644 --- a/src/lib/efl/interfaces/efl_orientation.eo +++ b/src/lib/efl/interfaces/efl_orientation.eo @@ -1,6 +1,6 @@ parse efl_ui_direction; -enum Efl.Orient +enum @beta Efl.Orient { [[An orientation type, to rotate visual objects. @@ -17,7 +17,7 @@ enum Efl.Orient left = 270, [[Orient left, rotate 90 degrees clock-wise.]] } -enum Efl.Flip +enum @beta Efl.Flip { [[A flip type, to flip visual objects. diff --git a/src/lib/efl/interfaces/efl_part.eo b/src/lib/efl/interfaces/efl_part.eo index 04bfd2bc4f..1f37e7e4ab 100644 --- a/src/lib/efl/interfaces/efl_part.eo +++ b/src/lib/efl/interfaces/efl_part.eo @@ -1,6 +1,6 @@ import efl_object; -interface @beta Efl.Part +interface Efl.Part { [[Interface for objects supporting named parts. diff --git a/src/lib/efl/interfaces/efl_screen.eo b/src/lib/efl/interfaces/efl_screen.eo index 43cf8b318e..44f72f337a 100644 --- a/src/lib/efl/interfaces/efl_screen.eo +++ b/src/lib/efl/interfaces/efl_screen.eo @@ -1,6 +1,6 @@ import eina_types; -interface @beta Efl.Screen +interface Efl.Screen { [[Efl screen interface]] methods { diff --git a/src/lib/efl/interfaces/efl_text.eo b/src/lib/efl/interfaces/efl_text.eo index 8d0851048a..13733b0d4e 100644 --- a/src/lib/efl/interfaces/efl_text.eo +++ b/src/lib/efl/interfaces/efl_text.eo @@ -1,4 +1,4 @@ -interface @beta Efl.Text +interface Efl.Text { [[Efl text interface]] methods { diff --git a/src/lib/efl/interfaces/efl_text_cursor.eo b/src/lib/efl/interfaces/efl_text_cursor.eo index 1f8b4ed59b..f8ad8c5e81 100644 --- a/src/lib/efl/interfaces/efl_text_cursor.eo +++ b/src/lib/efl/interfaces/efl_text_cursor.eo @@ -1,7 +1,7 @@ import eina_types; import efl_text_types; -enum Efl.Text_Cursor_Get_Type { +enum @beta Efl.Text_Cursor_Get_Type { [[All available cursor states]] default = 0, [[Main cursor state (alias to "main")]] main, [[Main cursor state]] @@ -13,7 +13,7 @@ enum Efl.Text_Cursor_Get_Type { user_extra [[User extra cursor state]] } -enum Efl.Text_Cursor_Type +enum @beta Efl.Text_Cursor_Type { [[Text cursor types]] before, [[Cursor type before]] diff --git a/src/lib/efl/interfaces/efl_text_font.eo b/src/lib/efl/interfaces/efl_text_font.eo index bcbc837439..6eb36ce676 100644 --- a/src/lib/efl/interfaces/efl_text_font.eo +++ b/src/lib/efl/interfaces/efl_text_font.eo @@ -1,6 +1,6 @@ // src/lib/efl/interfaces/efl_text_font.eo import efl_gfx_types; -enum Efl.Text_Font_Weight { +enum @beta Efl.Text_Font_Weight { [[Type of font weight]] normal, [[Normal font weight]] thin, [[Thin font weight]] @@ -17,7 +17,7 @@ enum Efl.Text_Font_Weight { extrablack, [[Extrablack font weight]] } -enum Efl.Text_Font_Width { +enum @beta Efl.Text_Font_Width { [[Type of font width]] normal, [[Normal font width]] ultracondensed, [[Ultracondensed font width]] @@ -30,7 +30,7 @@ enum Efl.Text_Font_Width { ultraexpanded, [[Ultraexpanded font width]] } -enum Efl.Text_Font_Slant { +enum @beta Efl.Text_Font_Slant { [[Type of font slant]] normal, [[Normal font slant]] oblique, [[Oblique font slant]] @@ -40,7 +40,7 @@ enum Efl.Text_Font_Slant { /* FIXME: It needs to support "normal" option for non-color bitmap font. For supporting "normal" option, S/W glyph drawing engine should be updated. */ -enum Efl.Text_Font_Bitmap_Scalable { +enum @beta Efl.Text_Font_Bitmap_Scalable { [[Scalable of bitmap fonts @since 1.21 diff --git a/src/lib/efl/interfaces/efl_text_format.eo b/src/lib/efl/interfaces/efl_text_format.eo index f474258c55..31c0b9c862 100644 --- a/src/lib/efl/interfaces/efl_text_format.eo +++ b/src/lib/efl/interfaces/efl_text_format.eo @@ -1,4 +1,4 @@ -enum Efl.Text_Format_Wrap { +enum @beta Efl.Text_Format_Wrap { [[Wrap mode of the text (not in effect if not multiline)]] none, [[No wrapping]] char, [[Wrap mode character]] @@ -7,7 +7,7 @@ enum Efl.Text_Format_Wrap { hyphenation [[Wrap mode hyphenation]] } -enum Efl.Text_Format_Horizontal_Alignment_Auto_Type { +enum @beta Efl.Text_Format_Horizontal_Alignment_Auto_Type { [[Auto-horizontal alignment of the text]] none, [[No auto-alignment rule]] normal, [[Respects LTR/RTL (bidirectional) settings]] diff --git a/src/lib/efl/interfaces/efl_text_style.eo b/src/lib/efl/interfaces/efl_text_style.eo index d6952cd53b..71220608fe 100644 --- a/src/lib/efl/interfaces/efl_text_style.eo +++ b/src/lib/efl/interfaces/efl_text_style.eo @@ -1,18 +1,18 @@ -enum Efl.Text_Style_Backing_Type +enum @beta Efl.Text_Style_Backing_Type { [[Whether to apply backing style to the displayed text or not]] disabled = 0, [[Do not use backing]] enabled, [[Use backing style]] } -enum Efl.Text_Style_Strikethrough_Type +enum @beta Efl.Text_Style_Strikethrough_Type { [[Whether to apply strikethrough style to the displayed text or not]] disabled = 0, [[Do not use strikethrough]] enabled, [[Use strikethrough style]] } -enum Efl.Text_Style_Effect_Type +enum @beta Efl.Text_Style_Effect_Type { [[Effect to apply to the displayed text]] none = 0, [[No effect]] @@ -32,7 +32,7 @@ enum Efl.Text_Style_Effect_Type outline_soft_shadow, [[Outline soft shadow effect]] } -enum Efl.Text_Style_Shadow_Direction +enum @beta Efl.Text_Style_Shadow_Direction { [[Direction of the shadow style, if used]] bottom_right = 0, [[Shadow towards bottom right]] @@ -45,7 +45,7 @@ enum Efl.Text_Style_Shadow_Direction right, [[Shadow towards right]] } -enum Efl.Text_Style_Underline_Type +enum @beta Efl.Text_Style_Underline_Type { [[Underline type of the displayed text]] off = 0, [[Text without underline]] diff --git a/src/lib/efl/interfaces/efl_text_types.eot b/src/lib/efl/interfaces/efl_text_types.eot index 61003586b9..1e1d59fd1e 100644 --- a/src/lib/efl/interfaces/efl_text_types.eot +++ b/src/lib/efl/interfaces/efl_text_types.eot @@ -7,7 +7,7 @@ enum Efl.Text_Bidirectional_Type { inherit [[Inherit text type]] } -struct Efl.Ui.Text_Change_Info { +struct @beta Efl.Ui.Text_Change_Info { [[This structure includes all the information about content changes. It's meant to be used to implement undo/redo. diff --git a/src/lib/efl/interfaces/efl_ui_direction.eo b/src/lib/efl/interfaces/efl_ui_direction.eo index 9a0ad01847..a75872eb85 100644 --- a/src/lib/efl/interfaces/efl_ui_direction.eo +++ b/src/lib/efl/interfaces/efl_ui_direction.eo @@ -3,7 +3,7 @@ parse efl_orientation; -enum Efl.Ui.Dir +enum @beta Efl.Ui.Dir { [[Direction for UI objects and layouts. diff --git a/src/lib/efl/interfaces/efl_ui_factory.eo b/src/lib/efl/interfaces/efl_ui_factory.eo index 6f6735a6d9..e2c2ae3318 100644 --- a/src/lib/efl/interfaces/efl_ui_factory.eo +++ b/src/lib/efl/interfaces/efl_ui_factory.eo @@ -1,4 +1,4 @@ -struct Efl.Ui.Factory_Item_Created_Event { +struct @beta Efl.Ui.Factory_Item_Created_Event { [[EFL Ui Factory event structure provided when an item was just created.]] model: Efl.Model; [[The model already set on the new item.]] item: Efl.Gfx.Entity; [[The item that was just created.]] diff --git a/src/lib/efl/interfaces/efl_ui_format.eo b/src/lib/efl/interfaces/efl_ui_format.eo index 07e51ce28e..c4cf9a311d 100644 --- a/src/lib/efl/interfaces/efl_ui_format.eo +++ b/src/lib/efl/interfaces/efl_ui_format.eo @@ -1,4 +1,4 @@ -function Efl.Ui.Format_Func_Cb { +function @beta Efl.Ui.Format_Func_Cb { [[Function pointer for format function hook]] params { @in str: strbuf; [[the formated string to be appended by user.]] diff --git a/src/lib/efl/interfaces/efl_ui_multi_selectable.eo b/src/lib/efl/interfaces/efl_ui_multi_selectable.eo index 4285c2dee7..a99ff458f4 100644 --- a/src/lib/efl/interfaces/efl_ui_multi_selectable.eo +++ b/src/lib/efl/interfaces/efl_ui_multi_selectable.eo @@ -1,4 +1,4 @@ -enum Efl.Ui.Select_Mode { +enum @beta Efl.Ui.Select_Mode { [[Type of multi selectable object.]] single, [[Only single child is selected. if the child is selected, previous selected child will be unselected.]] diff --git a/src/lib/efl/interfaces/efl_ui_property_bind.eo b/src/lib/efl/interfaces/efl_ui_property_bind.eo index 5134bd2916..e60de731a1 100644 --- a/src/lib/efl/interfaces/efl_ui_property_bind.eo +++ b/src/lib/efl/interfaces/efl_ui_property_bind.eo @@ -1,5 +1,11 @@ import eina_types; +struct Efl.Ui.Property_Event { + [[EFL Ui property event data structure triggered when an object property change due + to the interaction on the object.]] + changed_properties: array; [[List of changed properties]] +} + interface @beta Efl.Ui.Property_Bind { [[Efl UI Property_Bind interface. @@ -18,4 +24,8 @@ interface @beta Efl.Ui.Property_Bind return: Eina.Error; [[0 when it succeed, an error code otherwise.]] } } + events { + properties,changed: Efl.Ui.Property_Event; [[Event dispatched when a property on the object has changed due to an user interaction on the object that a model could be interested in.]] + property,bound: stringshare; [[Event dispatched when a property on the object is bound to a model. This is useful to not overgenerate event.]] + } } diff --git a/src/lib/efl/interfaces/efl_ui_scrollable.eo b/src/lib/efl/interfaces/efl_ui_scrollable.eo index 3b30a25ccb..664ab6f47d 100644 --- a/src/lib/efl/interfaces/efl_ui_scrollable.eo +++ b/src/lib/efl/interfaces/efl_ui_scrollable.eo @@ -1,4 +1,4 @@ -enum Efl.Ui.Scroll_Block +enum @beta Efl.Ui.Scroll_Block { [[Direction in which a scroller should be blocked. diff --git a/src/lib/efl/interfaces/efl_ui_scrollbar.eo b/src/lib/efl/interfaces/efl_ui_scrollbar.eo index 8d2fd49d48..50b2b2f34c 100644 --- a/src/lib/efl/interfaces/efl_ui_scrollbar.eo +++ b/src/lib/efl/interfaces/efl_ui_scrollbar.eo @@ -1,4 +1,4 @@ -enum Efl.Ui.Scrollbar_Mode +enum @beta Efl.Ui.Scrollbar_Mode { auto = 0, [[Visible if necessary]] on, [[Always visible]] @@ -6,7 +6,7 @@ enum Efl.Ui.Scrollbar_Mode last [[For internal use only]] } -enum Efl.Ui.Scrollbar_Direction +enum @beta Efl.Ui.Scrollbar_Direction { horizontal = 0, vertical, diff --git a/src/lib/efl/interfaces/efl_ui_selectable.eo b/src/lib/efl/interfaces/efl_ui_selectable.eo index 770e5e2132..a3dd4ac548 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! */ - selected: void; [[Called when selected]] + selectable,selected: void; [[Called when selected]] /* FIXME: Called with multiple types of event_info! */ - unselected: void; [[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]] + 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]] } } diff --git a/src/lib/efl/interfaces/efl_ui_types.eot b/src/lib/efl/interfaces/efl_ui_types.eot index 59cf1abf7f..2622e4225f 100644 --- a/src/lib/efl/interfaces/efl_ui_types.eot +++ b/src/lib/efl/interfaces/efl_ui_types.eot @@ -1,4 +1,4 @@ -enum Efl.Ui.Drag_Dir { +enum @beta Efl.Ui.Drag_Dir { [[Permitted directions for dragging objects.]] none = 0, [[Not draggable in any direction.]] x = 1, [[Draggable horizontally.]] diff --git a/src/lib/efl/interfaces/efl_ui_zoom.eo b/src/lib/efl/interfaces/efl_ui_zoom.eo index d42e1ab5e7..b3d949aa5f 100644 --- a/src/lib/efl/interfaces/efl_ui_zoom.eo +++ b/src/lib/efl/interfaces/efl_ui_zoom.eo @@ -1,4 +1,4 @@ -enum Efl.Ui.Zoom_Mode +enum @beta Efl.Ui.Zoom_Mode { [[Types of zoom available.]] manual = 0, [[Zoom controlled normally by efl_ui_zoom_set]] diff --git a/src/lib/eio/efl_io_manager.eo b/src/lib/eio/efl_io_manager.eo index 8213591b87..2ce5fbe978 100644 --- a/src/lib/eio/efl_io_manager.eo +++ b/src/lib/eio/efl_io_manager.eo @@ -1,20 +1,20 @@ import eina_types; -struct Eio.Data +struct @beta Eio.Data { [[A structure to handle arbitrary data to be sent over Promises.]] data: void_ptr; [[Private data pointer]] size: uint; [[Size of private data]] } -function EflIoPath { +function @beta EflIoPath { [[EflIoPath function]] params { @in paths: array; [[Accessor to an array of path.]] } }; -function EflIoDirectInfo { +function @beta EflIoDirectInfo { [[EflIoDirectInfo function]] params { @in entries: array; [[Accessor to an array of info.]] diff --git a/src/lib/eio/efl_io_model.eo b/src/lib/eio/efl_io_model.eo index 0d881fe6e2..206ba07dc5 100644 --- a/src/lib/eio/efl_io_model.eo +++ b/src/lib/eio/efl_io_model.eo @@ -1,6 +1,6 @@ import eina_types; -function EflIoFilter { +function @beta EflIoFilter { [[EflIoFilter function]] params { @in model: Efl.Io.Model; diff --git a/src/lib/eio/eio_sentry.eo b/src/lib/eio/eio_sentry.eo index bd0d19a82a..1b3845532f 100644 --- a/src/lib/eio/eio_sentry.eo +++ b/src/lib/eio/eio_sentry.eo @@ -1,4 +1,4 @@ -struct Eio.Sentry.Event +struct @beta Eio.Sentry.Event { [[Wraps the data about a monitor event on a file.]] trigger: string; [[The cause of the event.]] diff --git a/src/lib/eldbus/Eldbus.h b/src/lib/eldbus/Eldbus.h index ac88fd51cf..c69c056c41 100644 --- a/src/lib/eldbus/Eldbus.h +++ b/src/lib/eldbus/Eldbus.h @@ -80,8 +80,9 @@ #include #include #include +#ifdef EFL_BETA_API_SUPPORT #include - +#endif #ifdef EAPI # undef EAPI #endif diff --git a/src/lib/eldbus/Eldbus_Model.h b/src/lib/eldbus/Eldbus_Model.h index 4f4aca2576..0bf925c2d4 100644 --- a/src/lib/eldbus/Eldbus_Model.h +++ b/src/lib/eldbus/Eldbus_Model.h @@ -2,7 +2,6 @@ #define _ELDBUS_MODEL_H #include -#include #include #ifdef __cplusplus @@ -10,7 +9,7 @@ extern "C" { #endif #ifdef EFL_BETA_API_SUPPORT - +#include #include #include #include diff --git a/src/lib/eldbus/eldbus_model_proxy.c b/src/lib/eldbus/eldbus_model_proxy.c index 32253e36a7..d571732fc8 100644 --- a/src/lib/eldbus/eldbus_model_proxy.c +++ b/src/lib/eldbus/eldbus_model_proxy.c @@ -530,6 +530,7 @@ _eldbus_model_proxy_property_get_all_load(const Eldbus_Message *msg, Eldbus_Mode Eldbus_Message_Iter *values = NULL; Eldbus_Message_Iter *entry; Eina_Array *changed_properties; + Eina_Stringshare *tmp = NULL; const char *error_name, *error_text; if (eldbus_message_error_get(msg, &error_name, &error_text)) @@ -547,7 +548,6 @@ _eldbus_model_proxy_property_get_all_load(const Eldbus_Message *msg, Eldbus_Mode changed_properties = eina_array_new(1); while (eldbus_message_iter_get_and_next(values, 'e', &entry)) { - Eina_Stringshare *tmp; const char *property; Eldbus_Message_Iter *variant; Eina_Value *struct_value; @@ -567,7 +567,6 @@ _eldbus_model_proxy_property_get_all_load(const Eldbus_Message *msg, Eldbus_Mode tmp = eina_stringshare_add(property); prop_value = eina_hash_find(pd->properties, tmp); - eina_stringshare_del(tmp); if (!prop_value) goto on_error; ret = eina_value_copy(&arg0, prop_value); @@ -575,14 +574,20 @@ _eldbus_model_proxy_property_get_all_load(const Eldbus_Message *msg, Eldbus_Mode eina_value_flush(&arg0); - ret = eina_array_push(changed_properties, property); + ret = eina_array_push(changed_properties, tmp); if (!ret) goto on_error; + + // Reset tmp to NULL to avoid double free. + tmp = NULL; } pd->is_loaded = EINA_TRUE; return changed_properties; on_error: + eina_stringshare_del(tmp); + while ((tmp = eina_array_pop(changed_properties))) + eina_stringshare_del(tmp); eina_array_free(changed_properties); return NULL; } @@ -603,6 +608,7 @@ _eldbus_model_proxy_property_get_all_cb(void *data, { Eldbus_Model_Proxy_Data *pd = (Eldbus_Model_Proxy_Data*)data; Eldbus_Property_Promise* p; + Eina_Stringshare *sp; Eina_Array *properties; Efl_Model_Property_Event evt; @@ -623,6 +629,8 @@ _eldbus_model_proxy_property_get_all_cb(void *data, evt.changed_properties = properties; efl_event_callback_call(pd->obj, EFL_MODEL_EVENT_PROPERTIES_CHANGED, &evt); + while ((sp = eina_array_pop(properties))) + eina_stringshare_del(sp); eina_array_free(properties); } @@ -635,6 +643,7 @@ _eldbus_model_proxy_property_set_load_cb(void *data, Eldbus_Model_Proxy_Property_Set_Data *set_data = (Eldbus_Model_Proxy_Property_Set_Data *)data; Eldbus_Model_Proxy_Data *pd = set_data->pd; Eina_Array *properties; + Eina_Stringshare *sp; const char *signature; pd->pendings = eina_list_remove(pd->pendings, pending); @@ -645,16 +654,18 @@ _eldbus_model_proxy_property_set_load_cb(void *data, if (!signature || !properties) { eina_promise_reject(set_data->promise, EFL_MODEL_ERROR_UNKNOWN); - eina_array_free(properties); _eldbus_model_proxy_property_set_data_free(set_data); - return; + goto end; } - eina_array_free(properties); pending = eldbus_proxy_property_value_set(pd->proxy, set_data->property, signature, set_data->value, _eldbus_model_proxy_property_set_cb, set_data); pd->pendings = eina_list_append(pd->pendings, pending); + end: + while ((sp = eina_array_pop(properties))) + eina_stringshare_del(sp); + eina_array_free(properties); } diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h index e4784eca57..e61390880b 100644 --- a/src/lib/elementary/Elementary.h +++ b/src/lib/elementary/Elementary.h @@ -70,7 +70,6 @@ #include #include #include -#include #ifdef ELM_ELOCATION #include @@ -148,6 +147,7 @@ EAPI extern Elm_Version *elm_version; #include #if defined (EFL_EO_API_SUPPORT) && defined (EFL_BETA_API_SUPPORT) +#include /* FIXME: wtf? */ #ifndef EFL_UI_RADIO_EVENT_CHANGED # define EFL_UI_RADIO_EVENT_CHANGED EFL_UI_NSTATE_EVENT_CHANGED diff --git a/src/lib/elementary/efl_access_object.eo b/src/lib/elementary/efl_access_object.eo index 4f54020558..933533663a 100644 --- a/src/lib/elementary/efl_access_object.eo +++ b/src/lib/elementary/efl_access_object.eo @@ -1,4 +1,4 @@ -enum Efl.Access.Type +enum @beta Efl.Access.Type { [[Type of accessibility object]] regular, [[default accessible object]] @@ -6,7 +6,7 @@ enum Efl.Access.Type skipped [[skip object in accessibility hierarchy]] } -enum Efl.Access.Role +enum @beta Efl.Access.Role { [[Describes the role of an object visible to Accessibility Clients.]] invalid, [[Role: invalid]] @@ -115,7 +115,7 @@ enum Efl.Access.Role last_defined, [[Last enum entry sentinel]] } -enum Efl.Access.State_Type +enum @beta Efl.Access.State_Type { [[Describes the possible states for an object visible to accessibility clients.]] invalid, [[State: invalid]] @@ -162,7 +162,7 @@ enum Efl.Access.State_Type last_defined, [[Last enum entry sentinel]] } -enum Efl.Access.Relation_Type +enum @beta Efl.Access.Relation_Type { [[Describes the relationship between two objects.]] null, [[No relation]] @@ -187,7 +187,7 @@ enum Efl.Access.Relation_Type last_defined, [[Last enum entry sentinel]] } -enum Efl.Access.Reading.Info.Type +enum @beta Efl.Access.Reading.Info.Type { [[The accessible Reading information type that can be read.]] name = 1 << 0, [[Name should be read]] @@ -196,18 +196,18 @@ enum Efl.Access.Reading.Info.Type state = 1 << 3, [[State should be read.]] } -type Efl.Access.State_Set: uint64; [[Accessibility object state set.]] +type @beta Efl.Access.State_Set: uint64; [[Accessibility object state set.]] -struct Efl.Access.Event.Handler; [[Accessibility event listener]] +struct @beta Efl.Access.Event.Handler; [[Accessibility event listener]] -struct Efl.Access.Event.State_Changed.Data +struct @beta Efl.Access.Event.State_Changed.Data { [[Accessibility state changed event data]] type: Efl.Access.State_Type; [[Type of the state changed event]] new_value: bool; [[New value]] } -struct Efl.Access.Event.Geometry_Changed.Data +struct @beta Efl.Access.Event.Geometry_Changed.Data { [[Accessibility geometry changed event data]] x: int; [[X coordinate]] @@ -216,7 +216,7 @@ struct Efl.Access.Event.Geometry_Changed.Data height: int; [[Height]] } -struct Efl.Access.Event.Children_Changed.Data +struct @beta Efl.Access.Event.Children_Changed.Data { [[Accessibility children changed event data]] is_added: bool; [[Child is added or not]] @@ -230,7 +230,7 @@ struct @free(efl_access_attribute_free) Efl.Access.Attribute value: string; [[Attribute value]] } -struct Efl.Access.Relation +struct @beta Efl.Access.Relation { [[Accessibility Relation]] type: Efl.Access.Relation_Type; [[Relation type]] diff --git a/src/lib/elementary/efl_access_selection.eo b/src/lib/elementary/efl_access_selection.eo index 4f199ff73a..3b2d703ed2 100644 --- a/src/lib/elementary/efl_access_selection.eo +++ b/src/lib/elementary/efl_access_selection.eo @@ -55,6 +55,6 @@ interface @beta Efl.Access.Selection } } events { - selection,changed: void; [[Called when selection has been changed.]] + access,selection,changed: void; [[Called when selection has been changed.]] } } diff --git a/src/lib/elementary/efl_access_text.eo b/src/lib/elementary/efl_access_text.eo index d16874fb2f..0d42c02c7b 100644 --- a/src/lib/elementary/efl_access_text.eo +++ b/src/lib/elementary/efl_access_text.eo @@ -1,6 +1,6 @@ import eina_types; -enum Efl.Access.Text_Granularity +enum @beta Efl.Access.Text_Granularity { [[Text accessibility granularity]] char, [[Character granularity]] @@ -10,7 +10,7 @@ enum Efl.Access.Text_Granularity paragraph [[Paragraph granularity]] } -enum Efl.Access.Text_Clip_Type +enum @beta Efl.Access.Text_Clip_Type { [[Text clip type]] none, [[No clip type]] @@ -34,7 +34,7 @@ struct @free(elm_atspi_text_text_range_free) Efl.Access.Text_Range content: ptr(char); [[Range content]] } -struct Efl.Access.Text_Change_Info +struct @beta Efl.Access.Text_Change_Info { [[Text change information]] content: string; [[Change content]] diff --git a/src/lib/elementary/efl_text_interactive.eo b/src/lib/elementary/efl_text_interactive.eo index 8d2d444a34..4d8d96d832 100644 --- a/src/lib/elementary/efl_text_interactive.eo +++ b/src/lib/elementary/efl_text_interactive.eo @@ -48,6 +48,6 @@ interface @beta Efl.Text_Interactive extends Efl.Text, Efl.Text_Font, } } events { - selection,changed: void; [[The selection on the object has changed. Query using @.selection_cursors]] + text,selection,changed: void; [[The selection on the object has changed. Query using @.selection_cursors]] } } diff --git a/src/lib/elementary/efl_ui.eot b/src/lib/elementary/efl_ui.eot index bc9c2bcce7..f0b5e6ce44 100644 --- a/src/lib/elementary/efl_ui.eot +++ b/src/lib/elementary/efl_ui.eot @@ -25,13 +25,13 @@ enum Efl.Ui.Focus.Move_Policy @since 1.10]] click, [[Move focus by mouse click or touch. Elementary focus is set on mouse click and this is checked at mouse up time. (default)]] - in, [[Move focus by mouse in. Elementary focus is set on mouse move when the + move_in, [[Move focus by mouse in. Elementary focus is set on mouse move when the mouse pointer is moved into an object.]] key_only, [[Move focus by key. Elementary focus is set on key input like Left, Right, Up, Down, Tab, or Shift+Tab.]] } -enum Efl.Ui.Slider_Indicator_Visible_Mode +enum @beta Efl.Ui.Slider_Indicator_Visible_Mode { [[Slider's indicator visibility mode. @@ -54,7 +54,7 @@ enum Efl.Ui.Focus.Autoscroll_Mode bring_in [[Bring in the focused region or item automatically which might invole the scrolling.]] } -enum Efl.Ui.Softcursor_Mode +enum @beta Efl.Ui.Softcursor_Mode { [[Software cursor mode. @@ -66,7 +66,7 @@ enum Efl.Ui.Softcursor_Mode } /* 'on_access_activate' is beta API in the Widget class */ -enum Efl.Ui.Activate +enum @beta Efl.Ui.Activate { [[Accessibility ]] default = 0, [[Activate default]] @@ -77,7 +77,7 @@ enum Efl.Ui.Activate back, [[Activate back]] } -enum Efl.Ui.Widget_Orientation_Mode +enum @beta Efl.Ui.Widget_Orientation_Mode { [[Widget orientation mode, or how the theme handles screen orientation. @@ -92,4 +92,4 @@ enum Efl.Ui.Widget_Orientation_Mode } /* Types for A11Y (internal/beta API) */ -type @extern Efl.Access.Action_Data: __undefined_type; [[Internal struct for accesssibility.]] +type @beta @extern Efl.Access.Action_Data: __undefined_type; [[Internal struct for accesssibility.]] diff --git a/src/lib/elementary/efl_ui_alert_popup.eo b/src/lib/elementary/efl_ui_alert_popup.eo index 9b2e911592..48e6bbae51 100644 --- a/src/lib/elementary/efl_ui_alert_popup.eo +++ b/src/lib/elementary/efl_ui_alert_popup.eo @@ -1,11 +1,11 @@ -enum Efl.Ui.Alert_Popup_Button { +enum @beta Efl.Ui.Alert_Popup_Button { [[Defines the type of the alert button.]] positive = 0, [[Button having positive meaning. e.g. "Yes"]] negative, [[Button having negative meaning. e.g. "No"]] user [[Button having user-defined meaning. e.g. "Cancel"]] } -struct Efl.Ui.Alert_Popup_Button_Clicked_Event { +struct @beta Efl.Ui.Alert_Popup_Button_Clicked_Event { [[Information of clicked event]] button_type: Efl.Ui.Alert_Popup_Button; [[Clicked button type]] } diff --git a/src/lib/elementary/efl_ui_box.c b/src/lib/elementary/efl_ui_box.c index c577bb8e9d..eec5a645d8 100644 --- a/src/lib/elementary/efl_ui_box.c +++ b/src/lib/elementary/efl_ui_box.c @@ -81,9 +81,13 @@ _evas_box_custom_layout(Evas_Object *evas_box EINA_UNUSED, } EOLIAN static void -_efl_ui_box_homogeneous_set(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd, Eina_Bool homogeneous) +_efl_ui_box_homogeneous_set(Eo *obj, Efl_Ui_Box_Data *pd, Eina_Bool homogeneous) { + if (pd->homogeneous == !!homogeneous) + return; + pd->homogeneous = !!homogeneous; + efl_pack_layout_request(obj); } EOLIAN static Eina_Bool diff --git a/src/lib/elementary/efl_ui_box_flow.c b/src/lib/elementary/efl_ui_box_flow.c index a93ccc9e49..38bcb7d626 100644 --- a/src/lib/elementary/efl_ui_box_flow.c +++ b/src/lib/elementary/efl_ui_box_flow.c @@ -1,4 +1,5 @@ #include "efl_ui_box_private.h" +#include "efl_ui_container_layout.h" #define MY_CLASS EFL_UI_BOX_FLOW_CLASS @@ -6,75 +7,356 @@ typedef struct _Efl_Ui_Box_Flow_Data Efl_Ui_Box_Flow_Data; struct _Efl_Ui_Box_Flow_Data { - Eina_Bool homogenous; - Eina_Bool max_size; }; -EOLIAN static void -_efl_ui_box_flow_box_flow_homogenous_set(Eo *obj EINA_UNUSED, Efl_Ui_Box_Flow_Data *pd, Eina_Bool val) +typedef struct _Item_Calc Item_Calc; +typedef struct _Row_Calc Row_Calc; + +struct _Item_Calc { - pd->homogenous = val; + EINA_INLIST; + + Evas_Object *obj; + Row_Calc *row; + double weight_factor; + Efl_Ui_Container_Item_Hints hints[2]; /* 0 is x-axis, 1 is y-axis */ +}; + +struct _Row_Calc +{ + EINA_INLIST; + + Evas_Object *obj; + int item_count; + int min_sum; + int hgsize; + double weight_sum; + double cross_weight; + double cross_space; + double cur_pos; + double weight_factor; + Efl_Ui_Container_Item_Hints hint; +}; + +static int +_item_weight_sort_cb(const void *l1, const void *l2) +{ + Item_Calc *it1, *it2; + + it1 = EINA_INLIST_CONTAINER_GET(l1, Item_Calc); + it2 = EINA_INLIST_CONTAINER_GET(l2, Item_Calc); + + return it2->weight_factor <= it1->weight_factor ? -1 : 1; } -EOLIAN static Eina_Bool -_efl_ui_box_flow_box_flow_homogenous_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box_Flow_Data *pd) +static int +_row_weight_sort_cb(const void *l1, const void *l2) { - return pd->homogenous; + Row_Calc *it1, *it2; + + it1 = EINA_INLIST_CONTAINER_GET(l1, Row_Calc); + it2 = EINA_INLIST_CONTAINER_GET(l2, Row_Calc); + + return it2->weight_factor <= it1->weight_factor ? -1 : 1; } EOLIAN static void -_efl_ui_box_flow_box_flow_max_size_set(Eo *obj EINA_UNUSED, Efl_Ui_Box_Flow_Data *pd, Eina_Bool val) +_efl_ui_box_flow_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Box_Flow_Data *pd EINA_UNUSED) { - pd->max_size = val; -} - -EOLIAN static Eina_Bool -_efl_ui_box_flow_box_flow_max_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box_Flow_Data *pd) -{ - return pd->max_size; -} - -EOLIAN static void -_efl_ui_box_flow_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Box_Flow_Data *pd) -{ - void (*func)(Evas_Box *obj, Evas_Object_Box_Data *priv, void *data); Evas_Object_Box_Data *bd; - Eina_Bool homo = EINA_FALSE, maxsize = EINA_FALSE; - 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); + Efl_Ui_Box_Data *bcd = efl_data_scope_get(obj, EFL_UI_BOX_CLASS); + Evas_Object_Box_Option *opt; + Eina_List *li; + Eina_Inlist *inlist = NULL; + Item_Calc *items, *item; + Row_Calc *rows, *row; + Efl_Ui_Container_Item_Hints *hints, *hint; + Eina_Bool axis = !efl_ui_dir_is_horizontal(bcd->dir, EINA_FALSE); + Eina_Bool c_axis = !axis; + int want[2] = { 0, 0 }; + int rc = 0, count, i = 0, id, item_last = 0; + double cur_pos, cross_weight_sum = 0, cross_min_sum = 0, min_sum = 0; + Efl_Ui_Container_Layout_Calc box_calc[2]; /* 0 is x-axis, 1 is y-axis */ - homo = pd->homogenous; - maxsize = pd->max_size; - - // This makes it horizontal by default, as opposed to the standard box. - if (efl_ui_dir_is_horizontal(efl_ui_direction_get(obj), EINA_TRUE)) + count = eina_list_count(bd->children); + if (!count) { - if (homo) - { - if (maxsize) - func = evas_object_box_layout_homogeneous_max_size_horizontal; - else - func = evas_object_box_layout_homogeneous_horizontal; - } - else - func = evas_object_box_layout_flow_horizontal; - } - else - { - if (homo) - { - if (maxsize) - func = evas_object_box_layout_homogeneous_max_size_vertical; - else - func = evas_object_box_layout_homogeneous_vertical; - } - else - func = evas_object_box_layout_flow_vertical; + efl_gfx_hint_size_min_set(obj, EINA_SIZE2D(0, 0)); + return; } - func(wd->resize_obj, bd, NULL); + _efl_ui_container_layout_init(obj, box_calc); + + items = alloca(count * sizeof(*items)); + rows = alloca(count * sizeof(*rows)); + memset(rows, 0, count * sizeof(*rows)); + +#ifdef DEBUG + memset(items, 0, count * sizeof(*items)); +#endif + + // scan all items, get their properties, calculate total weight & min size + EINA_LIST_FOREACH(bd->children, li, opt) + { + item = &items[i++]; + item->obj = opt->obj; + hints = item->hints; + + _efl_ui_container_layout_item_init(item->obj, hints); + + if ((bcd->homogeneous && !axis) || box_calc[0].fill) + hints[0].weight = 1; + else if (hints[0].weight < 0) + hints[0].weight = 0; + + if ((bcd->homogeneous && axis) || box_calc[1].fill) + hints[1].weight = 1; + else if (hints[1].weight < 0) + hints[1].weight = 0; + + if (want[axis] < hints[axis].space) + want[axis] = hints[axis].space; + + if (bcd->homogeneous) + continue; + + if (i == 1) + { + min_sum = hints[axis].space; + } + else if (box_calc[axis].size < (min_sum + hints[axis].space + box_calc[axis].pad)) + { + min_sum = hints[axis].space; + rc++; + } + else + { + min_sum += (hints[axis].space + box_calc[axis].pad); + } + + row = &rows[rc]; + item->row = row; + + if (row->cross_weight < hints[c_axis].weight) + row->cross_weight = hints[c_axis].weight; + if (row->cross_space < hints[c_axis].space) + row->cross_space = hints[c_axis].space; + row->weight_sum += hints[axis].weight; + row->min_sum += hints[axis].space; + row->item_count++; + } + + // initialize homogeneous properties + if (bcd->homogeneous) + { + min_sum = 0; + for (i = 0; i < count; i++) + { + item = &items[i]; + hints = items[i].hints; + + if (i == 0) + { + min_sum = want[axis]; + } + else if (box_calc[axis].size < (min_sum + want[axis] + box_calc[axis].pad)) + { + min_sum = want[axis]; + rc++; + } + else + { + min_sum += (want[axis] + box_calc[axis].pad); + } + + row = &rows[rc]; + item->row = row; + + if (row->cross_weight < hints[c_axis].weight) + row->cross_weight = hints[c_axis].weight; + if (row->cross_space < hints[c_axis].space) + row->cross_space = hints[c_axis].space; + row->item_count++; + } + } + + // calculate item space of each row + for (id = 0, i = 0; id <= rc; id++) + { + int box_size; + + row = &rows[id]; + row->cur_pos = box_calc[axis].pos; + + box_size = box_calc[axis].size - + (box_calc[axis].pad * (row->item_count - 1)); + row->hgsize = box_size / row->item_count; + + cross_min_sum += row->cross_space; + cross_weight_sum += row->cross_weight; + + if (bcd->homogeneous) + continue; + + if (row->weight_sum > 0) + { + int calc_size; + double orig_weight = row->weight_sum; + + calc_size = box_size; + inlist = NULL; + + item_last += row->item_count; + for (; i < item_last; i++) + { + double denom; + hint = &items[i].hints[axis]; + + denom = (hint->weight * box_size) - (orig_weight * hint->space); + if (denom > 0) + { + items[i].weight_factor = (hint->weight * box_size) / denom; + inlist = eina_inlist_sorted_insert(inlist, EINA_INLIST_GET(&items[i]), + _item_weight_sort_cb); + + } + else + { + calc_size -= hint->space; + row->weight_sum -= hint->weight; + } + } + + EINA_INLIST_FOREACH(inlist, item) + { + double weight_len; + hint = &item->hints[axis]; + + weight_len = (calc_size * hint->weight) / row->weight_sum; + if (hint->space < weight_len) + { + hint->space = weight_len; + } + else + { + row->weight_sum -= hint->weight; + calc_size -= hint->space; + } + } + } + else if (EINA_DBL_EQ(row->weight_sum, 0)) + { + row->cur_pos += (box_size - row->min_sum) * box_calc[axis].align; + } + } + + // calculate row space + box_calc[c_axis].size -= (box_calc[c_axis].pad * rc); + cur_pos = box_calc[c_axis].pos; + if ((box_calc[c_axis].size > cross_min_sum)) + { + if (cross_weight_sum > 0) + { + int orig_size, calc_size; + double orig_weight = cross_weight_sum; + + calc_size = orig_size = box_calc[c_axis].size; + inlist = NULL; + + for (i = 0; i <= rc; i++) + { + double denom; + row = &rows[i]; + + denom = (row->cross_weight * orig_size) - + (orig_weight * row->cross_space); + if (denom > 0) + { + row->weight_factor = (row->cross_weight * orig_size) / denom; + inlist = eina_inlist_sorted_insert(inlist, EINA_INLIST_GET(row), + _row_weight_sort_cb); + + } + else + { + calc_size -= row->cross_space; + cross_weight_sum -= row->cross_weight; + } + } + + EINA_INLIST_FOREACH(inlist, row) + { + double weight_len; + + weight_len = (calc_size * row->cross_weight) / cross_weight_sum; + if (row->cross_space < weight_len) + { + row->cross_space = weight_len; + } + else + { + cross_weight_sum -= row->cross_weight; + calc_size -= row->cross_space; + } + } + } + else if (EINA_DBL_EQ(cross_weight_sum, 0)) + { + cur_pos += (box_calc[c_axis].size - cross_min_sum) * box_calc[c_axis].align; + } + } + + // calculate item geometry + int item_size[2], item_pos[2], sw, sh; + + row = NULL; + for (i = 0; i < count; i++) + { + item = &items[i]; + hints = items[i].hints; + + if (row && (row != item->row)) + cur_pos += row->cross_space + box_calc[c_axis].pad; + + row = item->row; + + if (bcd->homogeneous) + hints[axis].space = row->hgsize; + hints[c_axis].space = row->cross_space; + sw = hints[0].space - (hints[0].margin[0] + hints[0].margin[1]); + sh = hints[1].space - (hints[1].margin[0] + hints[1].margin[1]); + + item_size[0] = ((hints[0].weight > 0) && hints[0].fill) ? sw : 0; + item_size[1] = ((hints[1].weight > 0) && hints[1].fill) ? sh : 0; + + _efl_ui_container_layout_min_max_calc(hints, &item_size[0], &item_size[1], + (hints[0].aspect > 0) && (hints[1].aspect > 0)); + + item_pos[axis] = row->cur_pos + 0.5; + item_pos[c_axis] = cur_pos + 0.5; + + item_pos[0] += (hints[0].margin[0] + + ((sw - item_size[0]) * hints[0].align)); + item_pos[1] += (hints[1].margin[0] + + ((sh - item_size[1]) * hints[1].align)); + + row->cur_pos += hints[axis].space + box_calc[axis].pad; + + efl_gfx_entity_geometry_set(items[i].obj, + EINA_RECT(item_pos[0], item_pos[1], + item_size[0], item_size[1])); + } + + want[axis] += (box_calc[axis].margin[0] + box_calc[axis].margin[1]); + want[c_axis] = (box_calc[c_axis].margin[0] + box_calc[c_axis].margin[1]) + + (box_calc[c_axis].pad * rc) + cross_min_sum; + + efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(want[0], want[1])); + + efl_event_callback_call(obj, EFL_PACK_EVENT_LAYOUT_UPDATED, NULL); } #include "efl_ui_box_flow.eo.c" diff --git a/src/lib/elementary/efl_ui_box_flow.eo b/src/lib/elementary/efl_ui_box_flow.eo index 3ba120b6fb..91336525dc 100644 --- a/src/lib/elementary/efl_ui_box_flow.eo +++ b/src/lib/elementary/efl_ui_box_flow.eo @@ -1,24 +1,6 @@ class @beta Efl.Ui.Box_Flow extends Efl.Ui.Box { [[A custom layout engine for @Efl.Ui.Box.]] - methods { - @property box_flow_homogenous { - [[Box flow homogenous property]] - set {} - get {} - values { - val: bool; [[$true if the box flow layout is homogenous, $false otherwise]] - } - } - @property box_flow_max_size { - [[Box flow maximum size property]] - set {} - get {} - values { - val: bool; [[$true if the box flow layout has the maximal size, $false otherwise]] - } - } - } implements { Efl.Pack_Layout.layout_update; } diff --git a/src/lib/elementary/efl_ui_calendar.eo b/src/lib/elementary/efl_ui_calendar.eo index 7bf81da305..888319d382 100644 --- a/src/lib/elementary/efl_ui_calendar.eo +++ b/src/lib/elementary/efl_ui_calendar.eo @@ -1,6 +1,6 @@ import efl_types; -enum Efl.Ui.Calendar_Weekday +enum @beta Efl.Ui.Calendar_Weekday { [[A weekday diff --git a/src/lib/elementary/efl_ui_clock.eo b/src/lib/elementary/efl_ui_clock.eo index 7f8486684a..e2c7fdec6e 100644 --- a/src/lib/elementary/efl_ui_clock.eo +++ b/src/lib/elementary/efl_ui_clock.eo @@ -1,6 +1,6 @@ import efl_types; -enum Efl.Ui.Clock_Type +enum @beta Efl.Ui.Clock_Type { [[Identifies a clock field, The widget supports 6 fields : Year, month, Date, Hour, Minute, AM/PM diff --git a/src/lib/elementary/efl_ui_dnd_types.eot b/src/lib/elementary/efl_ui_dnd_types.eot index f07de0bc33..9f24c6682d 100644 --- a/src/lib/elementary/efl_ui_dnd_types.eot +++ b/src/lib/elementary/efl_ui_dnd_types.eot @@ -1,6 +1,6 @@ import efl_ui_selection_types; -function Efl.Dnd.Drag_Icon_Create { +function @beta Efl.Dnd.Drag_Icon_Create { [[Function pointer for creating icon at the drag side.]] params { @in win: Efl.Canvas.Object; [[The window to create the objects relative to]] @@ -10,7 +10,7 @@ function Efl.Dnd.Drag_Icon_Create { return: Efl.Canvas.Object; [[The drag icon object]] }; -function Efl.Dnd.Drag_Data_Get { +function @beta Efl.Dnd.Drag_Data_Get { [[Function pointer for getting data and format at the drag side.]] params { @in obj: Efl.Canvas.Object; [[The container object]] @@ -20,7 +20,7 @@ function Efl.Dnd.Drag_Data_Get { } }; -function Efl.Dnd.Item_Get { +function @beta Efl.Dnd.Item_Get { [[Function pointer to find out which item is under position (x, y)]] params { @in obj: Efl.Canvas.Object; [[The container object]] @@ -30,7 +30,7 @@ function Efl.Dnd.Item_Get { return: Efl.Object; [[Object under x,y coordinates or NULL if not found]] }; -function Efl.Dnd.Drag_Icon_List_Create { +function @beta Efl.Dnd.Drag_Icon_List_Create { [[Function pointer to create list of icons at the drag side. These icons are used for animation on combining selection icons to one icon.]] @@ -40,18 +40,18 @@ function Efl.Dnd.Drag_Icon_List_Create { return: list; }; -struct Efl.Dnd.Drag_Accept { +struct @beta Efl.Dnd.Drag_Accept { accepted: bool; } -struct Efl.Dnd.Drag_Pos { +struct @beta Efl.Dnd.Drag_Pos { pos: Eina.Position2D; [[Evas Coordinate]] action: Efl.Ui.Selection_Action; [[The drag action]] format: Efl.Ui.Selection_Format; [[The drag format]] item: Efl.Canvas.Object; [[The item object. It is only available for container object.]] } -struct Efl.Dnd.Drag_Item_Container_Drop { +struct @beta Efl.Dnd.Drag_Item_Container_Drop { item: Efl.Canvas.Object; [[The item object]] data: Efl.Ui.Selection_Data; [[The selection data]] pos: Eina.Position2D; [[Position relative to item (left (-1), middle (0), right (1)]] diff --git a/src/lib/elementary/efl_ui_flip.eo b/src/lib/elementary/efl_ui_flip.eo index e98a982190..fb5a931067 100644 --- a/src/lib/elementary/efl_ui_flip.eo +++ b/src/lib/elementary/efl_ui_flip.eo @@ -1,6 +1,6 @@ import efl_ui_direction; -enum Efl.Ui.Flip_Mode +enum @beta Efl.Ui.Flip_Mode { [[Efl UI flip mode ]] rotate_y_center_axis, [[Rotate Y center axis flip mode]] @@ -18,7 +18,7 @@ enum Efl.Ui.Flip_Mode cross_fade, [[Cross fade flip mode]] } -enum Efl.Ui.Flip_Interaction +enum @beta Efl.Ui.Flip_Interaction { [[Efl UI flip interaction]] none, [[No interaction]] diff --git a/src/lib/elementary/efl_ui_focus_manager.eo b/src/lib/elementary/efl_ui_focus_manager.eo index 7db8439048..e0e8ff1625 100644 --- a/src/lib/elementary/efl_ui_focus_manager.eo +++ b/src/lib/elementary/efl_ui_focus_manager.eo @@ -1,7 +1,7 @@ import efl_ui; import eina_types; -struct @free(efl_ui_focus_relation_free) Efl.Ui.Focus.Relations { +struct @beta @free(efl_ui_focus_relation_free) Efl.Ui.Focus.Relations { [[Structure holding the graph of relations between focusable objects. @since 1.20 @@ -24,11 +24,11 @@ struct Efl.Ui.Focus.Manager_Logical_End_Detail { @since 1.21 ]] - is_regular_end : bool; [[$true if logical end, $false otherwise]] - element : Efl.Ui.Focus.Object; [[Focus object element]] + 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]] } -interface @beta Efl.Ui.Focus.Manager { +interface Efl.Ui.Focus.Manager { [[Interface for managing focus objects This interface is built in order to support movement of the focus property in a set of widgets. @@ -139,7 +139,7 @@ interface @beta Efl.Ui.Focus.Manager { } return : Efl.Ui.Focus.Object; [[Child of passed parameter.]] } - fetch { + fetch @beta { [[This will fetch the data from a registered node. Be aware this function will trigger a computation of all dirty nodes. 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 18eed60eda..201e3bffc1 100644 --- a/src/lib/elementary/efl_ui_focus_manager_window_root.eo +++ b/src/lib/elementary/efl_ui_focus_manager_window_root.eo @@ -1,4 +1,4 @@ -interface @beta Efl.Ui.Focus.Manager_Window_Root { +interface Efl.Ui.Focus.Manager_Window_Root { [[ A interface to indicate the end of a focus chain. Focusmanagers are ensuring that if they give focus to something, that they are registered in the upper focus manager. diff --git a/src/lib/elementary/efl_ui_focus_object.eo b/src/lib/elementary/efl_ui_focus_object.eo index d80c0a2754..5a5fc1e590 100644 --- a/src/lib/elementary/efl_ui_focus_object.eo +++ b/src/lib/elementary/efl_ui_focus_object.eo @@ -1,6 +1,6 @@ import eina_types; -mixin @beta Efl.Ui.Focus.Object +mixin Efl.Ui.Focus.Object { [[Functions of focusable objects. diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c index 18e9144077..58cacdd6f3 100644 --- a/src/lib/elementary/efl_ui_grid.c +++ b/src/lib/elementary/efl_ui_grid.c @@ -902,7 +902,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_SELECTED, item); + efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_SELECTED, item); } static void @@ -915,7 +915,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_UNSELECTED, item); + efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_UNSELECTED, item); } static void @@ -944,8 +944,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_SELECTED, _grid_item_selected, obj); - efl_event_callback_add(it, EFL_UI_EVENT_UNSELECTED, _grid_item_unselected, 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_EVENT_DEL, _grid_item_deleted, obj); return EINA_TRUE; @@ -970,8 +970,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_SELECTED, _grid_item_selected, obj); - efl_event_callback_del(it, EFL_UI_EVENT_UNSELECTED, _grid_item_unselected, 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_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 a29ce753a7..56be05583e 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -595,6 +595,8 @@ _efl_ui_image_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Image_Data *priv) EOLIAN static void _efl_ui_image_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Image_Data *sd) { + Efl_Model *model; + if (elm_widget_is_legacy(obj)) efl_event_callback_del(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, _on_size_hints_changed, sd); @@ -607,12 +609,11 @@ _efl_ui_image_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Image_Data *sd) if (sd->remote.binbuf) ELM_SAFE_FREE(sd->remote.binbuf, eina_binbuf_free); ELM_SAFE_FREE(sd->remote.key, eina_stringshare_del); - if (sd->property.model) + model = efl_ui_view_model_get(obj); + if (model) { - efl_event_callback_del(sd->property.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, + efl_event_callback_del(model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, _efl_ui_image_model_properties_changed_cb, obj); - efl_unref(sd->property.model); - sd->property.model = NULL; } efl_canvas_group_del(efl_super(obj, MY_CLASS)); @@ -1849,12 +1850,14 @@ _update_viewmodel(Eo *obj, Efl_Ui_Image_Data *pd) Eina_File *f = NULL; char *file = NULL; char *key = NULL; + Efl_Model *model; - if (!pd->property.model) return ; + model = efl_ui_view_model_get(obj); + if (!model) return ; - vfile = efl_model_property_get(pd->property.model, pd->property.file); + vfile = efl_model_property_get(model, pd->property.file); if (!vfile) return; - vkey = efl_model_property_get(pd->property.model, pd->property.key); + vkey = efl_model_property_get(model, pd->property.key); if (eina_value_type_get(vfile) == EINA_VALUE_TYPE_ERROR) goto err; @@ -1926,32 +1929,32 @@ _efl_ui_image_model_properties_changed_cb(void *data, const Efl_Event *event) EOLIAN static void _efl_ui_image_efl_ui_view_model_set(Eo *obj, Efl_Ui_Image_Data *pd, Efl_Model *model) { - if (pd->property.model) + Efl_Model *setted; + + setted = efl_ui_view_model_get(obj); + if (setted) { - efl_event_callback_del(pd->property.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, + efl_event_callback_del(setted, EFL_MODEL_EVENT_PROPERTIES_CHANGED, _efl_ui_image_model_properties_changed_cb, obj); } - efl_replace(&pd->property.model, model); + efl_ui_view_model_set(efl_super(obj, EFL_UI_IMAGE_CLASS), model); - if (model) + setted = efl_ui_view_model_get(obj); + if (setted) { - efl_event_callback_add(model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, + efl_event_callback_add(setted, EFL_MODEL_EVENT_PROPERTIES_CHANGED, _efl_ui_image_model_properties_changed_cb, obj); } _update_viewmodel(obj, pd); } -EOLIAN static Efl_Model * -_efl_ui_image_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *pd) -{ - return pd->property.model; -} - EOLIAN static Eina_Error _efl_ui_image_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Image_Data *pd, const char *key, const char *property) { + Eina_Stringshare *sk; + if (strcmp(key, "filename") == 0) { pd->property.icon = EINA_FALSE; @@ -1967,9 +1970,17 @@ _efl_ui_image_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Image_Data *pd, { eina_stringshare_replace(&pd->property.key, property); } - else return EINA_FALSE; + else + { + return efl_ui_property_bind(efl_super(obj, EFL_UI_IMAGE_CLASS), key, property); + } _update_viewmodel(obj, pd); + + sk = eina_stringshare_add(key); + efl_event_callback_call(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND, (void*) sk); + eina_stringshare_del(sk); + return 0; } diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo index ad48c3d76d..3e876e02be 100644 --- a/src/lib/elementary/efl_ui_image.eo +++ b/src/lib/elementary/efl_ui_image.eo @@ -1,4 +1,4 @@ -struct Efl.Ui.Image_Progress +struct @beta Efl.Ui.Image_Progress { [[ Structure associated with smart callback 'download,progress'. @@ -8,7 +8,7 @@ struct Efl.Ui.Image_Progress total: double; [[Total percentage]] } -struct Efl.Ui.Image_Error +struct @beta Efl.Ui.Image_Error { [[ Structure associated with smart callback 'download,progress'. @@ -22,7 +22,7 @@ class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl. Efl.File, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller, Efl.Player, Efl.Gfx.View, Efl.Access.Component, Efl.Access.Widget.Action, Efl.Gfx.Color, Efl.Orientation, - Efl.Ui.View, Efl.Ui.Property_Bind, Efl.Layout.Calc, + Efl.Layout.Calc, Efl.Layout.Group, Efl.Layout.Signal { [[ Efl UI image class]] @@ -119,7 +119,7 @@ class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl. Efl.Canvas.Group.group_member_add; Efl.Ui.Draggable.drag_target { get; set; } Efl.Ui.Property_Bind.property_bind; - Efl.Ui.View.model { get; set; } + Efl.Ui.View.model { set; } Efl.Ui.Widget.theme_apply; Efl.Ui.Widget.widget_input_event_handler; Efl.Access.Component.extents { get; } diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c index e7326d8b82..b821c441a7 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.c +++ b/src/lib/elementary/efl_ui_image_zoomable.c @@ -143,7 +143,7 @@ _calc_job_cb(void *data) sd->minw = minw; sd->minh = minh; - efl_event_callback_call(sd->pan_obj, EFL_UI_PAN_EVENT_CONTENT_CHANGED, NULL); + efl_event_callback_call(sd->pan_obj, EFL_UI_PAN_EVENT_PAN_CONTENT_CHANGED, NULL); _sizing_eval(obj); } sd->calc_job = NULL; @@ -398,7 +398,7 @@ _efl_ui_image_zoomable_pan_efl_ui_pan_pan_position_set(Eo *obj, Efl_Ui_Image_Zoo psd->wsd->pan_y = pos.y; evas_object_smart_changed(obj); - efl_event_callback_call(obj, EFL_UI_PAN_EVENT_POSITION_CHANGED, NULL); + efl_event_callback_call(obj, EFL_UI_PAN_EVENT_PAN_POSITION_CHANGED, NULL); } EOLIAN static Eina_Position2D diff --git a/src/lib/elementary/efl_ui_internal_text_interactive.c b/src/lib/elementary/efl_ui_internal_text_interactive.c index eaada5c2a4..9d7fdedf6f 100644 --- a/src/lib/elementary/efl_ui_internal_text_interactive.c +++ b/src/lib/elementary/efl_ui_internal_text_interactive.c @@ -558,7 +558,7 @@ _sel_extend(Evas_Textblock_Cursor *c, Evas_Object *o, Efl_Ui_Internal_Text_Inter free(en->selection); en->selection = NULL; } - efl_event_callback_call(o, EFL_TEXT_INTERACTIVE_EVENT_SELECTION_CHANGED, NULL); + efl_event_callback_call(o, EFL_TEXT_INTERACTIVE_EVENT_TEXT_SELECTION_CHANGED, NULL); } static void @@ -574,7 +574,7 @@ _sel_clear(Evas_Object *o EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *en { en->have_selection = EINA_FALSE; efl_text_cursor_copy(o, en->sel_start, en->sel_end); - efl_event_callback_call(o, EFL_TEXT_INTERACTIVE_EVENT_SELECTION_CHANGED, NULL); + efl_event_callback_call(o, EFL_TEXT_INTERACTIVE_EVENT_TEXT_SELECTION_CHANGED, NULL); } } diff --git a/src/lib/elementary/efl_ui_internal_text_scroller.eo b/src/lib/elementary/efl_ui_internal_text_scroller.eo index 4b46694b6b..4e20e9bea7 100644 --- a/src/lib/elementary/efl_ui_internal_text_scroller.eo +++ b/src/lib/elementary/efl_ui_internal_text_scroller.eo @@ -1,4 +1,4 @@ -enum Efl.Ui.Text_Scroller_Mode +enum @beta Efl.Ui.Text_Scroller_Mode { default = 0, singleline = 0, diff --git a/src/lib/elementary/efl_ui_item.c b/src/lib/elementary/efl_ui_item.c index 6070bda7a9..e4d616c2be 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_SELECTED, NULL); + efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_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_UNSELECTED, NULL); + efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_UNSELECTED, NULL); } /* Mouse Controls */ diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index 67c9a59de4..8c6e69abcf 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -758,6 +758,7 @@ _efl_ui_layout_base_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Layout_Data *sd) Edje_Signal_Data *esd; Evas_Object *child; Eina_List *l; + Efl_Model *model; ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); @@ -782,12 +783,11 @@ _efl_ui_layout_base_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Layout_Data *sd) free(esd); } - if(sd->connect.model) + model = efl_ui_view_model_get(obj); + if(model) { - efl_event_callback_del(sd->connect.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, + efl_event_callback_del(model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, _efl_model_properties_changed_cb, sd); - efl_unref(sd->connect.model); - sd->connect.model = NULL; } eina_hash_free(sd->connect.properties); @@ -1236,6 +1236,7 @@ _efl_ui_layout_text_generic_set(Eo *obj, Efl_Ui_Layout_Data *sd, const char *par Efl_Ui_Layout_Sub_Object_Data *sub_d = NULL; Eina_List *l; + Efl_Model *model; EINA_LIST_FOREACH(sd->subs, l, sub_d) { @@ -1292,7 +1293,8 @@ _efl_ui_layout_text_generic_set(Eo *obj, Efl_Ui_Layout_Data *sd, const char *par sub_d->obj = _elm_access_edje_object_part_object_register (obj, elm_layout_edje_get(obj), part); - if (sd->connect.model && !sd->connect.updating) + model = efl_ui_view_model_get(obj); + if (model && !sd->connect.updating) { char *property = eina_hash_find(sd->connect.properties, sub_d->part); @@ -1303,7 +1305,7 @@ _efl_ui_layout_text_generic_set(Eo *obj, Efl_Ui_Layout_Data *sd, const char *par eina_value_setup(&v, EINA_VALUE_TYPE_STRING); eina_value_set(&v, text); - efl_model_property_set(sd->connect.model, property, &v); + efl_model_property_set(model, property, &v); } } @@ -1978,8 +1980,10 @@ _efl_ui_layout_view_model_property_update(Efl_Ui_Layout_Data *pd, const char *pa { Eina_Value *v = NULL; char *value = NULL; + Efl_Model *model; - v = efl_model_property_get(pd->connect.model, fetch); + model = efl_ui_view_model_get(pd->obj); + v = efl_model_property_get(model, fetch); if (!v) return; if (eina_value_type_get(v) != EINA_VALUE_TYPE_ERROR) @@ -1999,10 +2003,12 @@ _efl_ui_layout_view_model_signal_update(Efl_Ui_Layout_Data *pd, const char *sign Eina_Value *v = NULL; Eina_Strbuf *buf; char *value = NULL; + Efl_Model *model; Eina_Bool eval = EINA_FALSE; Eina_Bool is_bool = EINA_FALSE; - v = efl_model_property_get(pd->connect.model, fetch); + model = efl_ui_view_model_get(pd->obj); + v = efl_model_property_get(model, fetch); if (!v) return; if (eina_value_type_get(v) == EINA_VALUE_TYPE_ERROR) @@ -2112,6 +2118,7 @@ _efl_ui_layout_view_model_content_update(Efl_Ui_Layout_Data *pd, Efl_Ui_Layout_F { Efl_Ui_Layout_Factory_Request *request = calloc(1, sizeof (Efl_Ui_Layout_Factory_Request)); Eina_Future *f; + Efl_Model *model; if (!request) return ; @@ -2122,7 +2129,8 @@ _efl_ui_layout_view_model_content_update(Efl_Ui_Layout_Data *pd, Efl_Ui_Layout_F request->factory = efl_ref(tracking->factory); request->tracking = tracking; - f = efl_ui_view_factory_create_with_event(tracking->factory, pd->connect.model, pd->obj); + model = efl_ui_view_model_get(pd->obj); + f = efl_ui_view_factory_create_with_event(tracking->factory, model, pd->obj); f = efl_future_then(pd->obj, f, .success = _content_created, .success_type = EINA_VALUE_TYPE_OBJECT, @@ -2136,7 +2144,7 @@ _efl_ui_layout_view_model_update(Efl_Ui_Layout_Data *pd) Eina_Hash_Tuple *tuple; Eina_Iterator *it; - if (!pd->connect.model) return ; + if (!efl_ui_view_model_get(pd->obj)) return ; it = eina_hash_iterator_tuple_new(pd->connect.properties); EINA_ITERATOR_FOREACH(it, tuple) @@ -2171,21 +2179,18 @@ _efl_model_properties_changed_cb(void *data, const Efl_Event *event) EINA_ARRAY_ITER_NEXT(evt->changed_properties, i, prop, it) { - Eina_Stringshare *sprop = eina_stringshare_add(prop); const char *part; const char *signal; Efl_Ui_Layout_Factory_Tracking *factory; - part = eina_hash_find(pd->connect.properties, sprop); - if (part) _efl_ui_layout_view_model_property_update(pd, part, sprop); + part = eina_hash_find(pd->connect.properties, prop); + if (part) _efl_ui_layout_view_model_property_update(pd, part, prop); - signal = eina_hash_find(pd->connect.signals, sprop); - if (signal) _efl_ui_layout_view_model_signal_update(pd, signal, sprop); + signal = eina_hash_find(pd->connect.signals, prop); + if (signal) _efl_ui_layout_view_model_signal_update(pd, signal, prop); - factory = eina_hash_find(pd->connect.factories, sprop); - if (factory) _efl_ui_layout_view_model_content_update(pd, factory, sprop); - - eina_stringshare_del(sprop); + factory = eina_hash_find(pd->connect.factories, prop); + if (factory) _efl_ui_layout_view_model_content_update(pd, factory, prop); } } @@ -2214,17 +2219,18 @@ _efl_ui_layout_base_efl_ui_view_model_set(Eo *obj, Efl_Ui_Layout_Data *pd, Efl_M Eina_Stringshare *key; Eina_Hash_Tuple *tuple; Eina_Iterator *it; + Efl_Model *setted; - if (pd->connect.model && pd->connect.model != model) - efl_event_callback_del(pd->connect.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, - _efl_model_properties_changed_cb, pd); + setted = efl_ui_view_model_get(obj); + if (setted) + efl_event_callback_del(setted, EFL_MODEL_EVENT_PROPERTIES_CHANGED, + _efl_model_properties_changed_cb, pd); - if (!efl_replace(&pd->connect.model, model)) - return; + efl_ui_view_model_set(efl_super(obj, EFL_UI_LAYOUT_BASE_CLASS), model); if (model) - efl_event_callback_add(pd->connect.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, - _efl_model_properties_changed_cb, pd); + efl_event_callback_add(model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, + _efl_model_properties_changed_cb, pd); _efl_ui_layout_connect_hash(pd); @@ -2261,20 +2267,22 @@ _efl_ui_layout_base_efl_ui_view_model_set(Eo *obj, Efl_Ui_Layout_Data *pd, Efl_M _efl_ui_layout_view_model_update(pd); } -EOLIAN static Efl_Model * -_efl_ui_layout_base_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Data *pd) -{ - return pd->connect.model; -} - EOLIAN static Eina_Error -_efl_ui_layout_base_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Data *pd, const char *key, const char *property) +_efl_ui_layout_base_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Layout_Data *pd, const char *key, const char *property) { EINA_SAFETY_ON_NULL_RETURN_VAL(key, EFL_PROPERTY_ERROR_INVALID_KEY); Eina_Stringshare *sprop; + Eina_Stringshare *sk; Eina_Hash *hash = NULL; char *data = NULL; + Efl_Model *model; + Eina_Error r; + // First try binding with property on the Widget + r = efl_ui_property_bind(efl_super(obj, EFL_UI_LAYOUT_BASE_CLASS), key, property); + if (!r) return r; + + // Before trying to bind on the part of this object. if (!_elm_layout_part_aliasing_eval(obj, &key, EINA_TRUE)) return EFL_PROPERTY_ERROR_INVALID_KEY; @@ -2304,7 +2312,8 @@ _efl_ui_layout_base_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSED, Efl_ } // Update display right away if possible - if (pd->connect.model) + model = efl_ui_view_model_get(obj); + if (model) { if (hash == pd->connect.signals) _efl_ui_layout_view_model_signal_update(pd, data, sprop); @@ -2312,6 +2321,10 @@ _efl_ui_layout_base_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSED, Efl_ _efl_ui_layout_view_model_property_update(pd, data, sprop); } + sk = eina_stringshare_add(key); + efl_event_callback_call(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND, (void*) sk); + eina_stringshare_del(sk); + if (!sprop) free(data); diff --git a/src/lib/elementary/efl_ui_layout.eo b/src/lib/elementary/efl_ui_layout.eo index 35f239e8c1..40ab958928 100644 --- a/src/lib/elementary/efl_ui_layout.eo +++ b/src/lib/elementary/efl_ui_layout.eo @@ -1,6 +1,6 @@ import efl_ui; -class @beta Efl.Ui.Layout extends Efl.Ui.Layout_Base implements Efl.File +class Efl.Ui.Layout extends Efl.Ui.Layout_Base implements Efl.File { [[Elementary layout class]] data: null; diff --git a/src/lib/elementary/efl_ui_layout_base.eo b/src/lib/elementary/efl_ui_layout_base.eo index 31cf7034cd..14688f1af5 100644 --- a/src/lib/elementary/efl_ui_layout_base.eo +++ b/src/lib/elementary/efl_ui_layout_base.eo @@ -1,8 +1,8 @@ import efl_ui; import efl_orientation; -abstract @beta Efl.Ui.Layout_Base extends Efl.Ui.Widget implements Efl.Container, - Efl.Ui.View, Efl.Ui.Property_Bind, Efl.Ui.Factory_Bind, +abstract Efl.Ui.Layout_Base extends Efl.Ui.Widget implements Efl.Container, + Efl.Ui.Factory_Bind, Efl.Layout.Calc, Efl.Layout.Signal, Efl.Layout.Group { @@ -85,9 +85,9 @@ abstract @beta Efl.Ui.Layout_Base extends Efl.Ui.Widget implements Efl.Container Efl.Container.content_count; Efl.Container.content_iterate; Efl.Part.part_get; - Efl.Ui.View.model { get; set; } Efl.Ui.Property_Bind.property_bind; Efl.Ui.Factory_Bind.factory_bind; + Efl.Ui.View.model { set; } } events { theme,changed: void; [[Called when theme changed]] diff --git a/src/lib/elementary/efl_ui_layout_factory.c b/src/lib/elementary/efl_ui_layout_factory.c index 3c93116711..709a31fc85 100644 --- a/src/lib/elementary/efl_ui_layout_factory.c +++ b/src/lib/elementary/efl_ui_layout_factory.c @@ -133,18 +133,16 @@ _efl_ui_layout_factory_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSED, E if (property == NULL) { eina_hash_del(pd->bind.properties, ss_key, NULL); - eina_stringshare_del(ss_key); - return 0; + goto end; } ss_prop = eina_stringshare_add(property); ss_old = eina_hash_set(pd->bind.properties, ss_key, ss_prop); - if (ss_old) - { - eina_stringshare_del(ss_old); - eina_stringshare_del(ss_key); - } + if (ss_old) eina_stringshare_del(ss_old); + end: + efl_event_callback_call(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND, (void*) ss_key); + eina_stringshare_del(ss_key); return 0; } diff --git a/src/lib/elementary/efl_ui_list.c b/src/lib/elementary/efl_ui_list.c index bcaca6e10b..ff08383e39 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_SELECTED, item); + efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_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_UNSELECTED, item); + efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_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_SELECTED, _list_item_selected, obj); - efl_event_callback_add(it, EFL_UI_EVENT_UNSELECTED, _list_item_unselected, 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); 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_SELECTED, _list_item_selected, obj); - efl_event_callback_del(it, EFL_UI_EVENT_UNSELECTED, _list_item_unselected, 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); } /* Pack APIs */ diff --git a/src/lib/elementary/efl_ui_list_view.c b/src/lib/elementary/efl_ui_list_view.c index 055d3714e2..b0300db7c9 100644 --- a/src/lib/elementary/efl_ui_list_view.c +++ b/src/lib/elementary/efl_ui_list_view.c @@ -58,7 +58,7 @@ _efl_ui_list_view_pan_efl_ui_pan_pan_position_set(Eo *obj EINA_UNUSED, Efl_Ui_Li psd->gmt.x = pos.x; psd->gmt.y = pos.y; - efl_event_callback_call(obj, EFL_UI_PAN_EVENT_POSITION_CHANGED, NULL); + efl_event_callback_call(obj, EFL_UI_PAN_EVENT_PAN_POSITION_CHANGED, NULL); evas_object_smart_changed(psd->wobj); } @@ -865,7 +865,7 @@ _efl_ui_list_view_efl_ui_list_view_model_min_size_set(Eo *obj, Efl_Ui_List_View_ pd->min.h = min.h; evas_object_size_hint_min_set(wd->resize_obj, pd->min.w, pd->min.h); - efl_event_callback_call(pd->pan_obj, EFL_UI_PAN_EVENT_CONTENT_CHANGED, NULL); + efl_event_callback_call(pd->pan_obj, EFL_UI_PAN_EVENT_PAN_CONTENT_CHANGED, NULL); } EOLIAN static void diff --git a/src/lib/elementary/efl_ui_list_view.eo b/src/lib/elementary/efl_ui_list_view.eo index f3a4b33468..9112e6fc78 100644 --- a/src/lib/elementary/efl_ui_list_view.eo +++ b/src/lib/elementary/efl_ui_list_view.eo @@ -1,6 +1,6 @@ import elm_general; -struct Efl.Ui.List_View_Item_Event +struct @beta Efl.Ui.List_View_Item_Event { layout: Efl.Ui.Layout; child: Efl.Model; diff --git a/src/lib/elementary/efl_ui_list_view_types.eot b/src/lib/elementary/efl_ui_list_view_types.eot index b733b28dc7..b53190752d 100644 --- a/src/lib/elementary/efl_ui_list_view_types.eot +++ b/src/lib/elementary/efl_ui_list_view_types.eot @@ -1,4 +1,4 @@ -struct @free(free) Efl.Ui.List_View_Layout_Item { +struct @beta @free(free) Efl.Ui.List_View_Layout_Item { layout: Efl.Ui.Layout; layout_request: future; children: Efl.Model; @@ -9,4 +9,4 @@ struct @free(free) Efl.Ui.List_View_Layout_Item { pos: Eina.Position2D; } -struct Efl_Ui_List_View_Seg_Array; +struct @beta Efl_Ui_List_View_Seg_Array; diff --git a/src/lib/elementary/efl_ui_pager.eo b/src/lib/elementary/efl_ui_pager.eo index a183ba3a92..5a3a974adf 100644 --- a/src/lib/elementary/efl_ui_pager.eo +++ b/src/lib/elementary/efl_ui_pager.eo @@ -1,4 +1,4 @@ -enum Efl.Ui.Pager_Loop +enum @beta Efl.Ui.Pager_Loop { [[Efl ui pager loop mode]] disabled, diff --git a/src/lib/elementary/efl_ui_pan.c b/src/lib/elementary/efl_ui_pan.c index fcbe6dd728..f56cae3c88 100644 --- a/src/lib/elementary/efl_ui_pan.c +++ b/src/lib/elementary/efl_ui_pan.c @@ -47,7 +47,7 @@ _efl_ui_pan_efl_gfx_entity_size_set(Eo *obj, Efl_Ui_Pan_Data *psd, Eina_Size2D s psd->h = sz.h; evas_object_smart_changed(obj); - efl_event_callback_call(obj, EFL_UI_PAN_EVENT_VIEWPORT_CHANGED, NULL); + efl_event_callback_call(obj, EFL_UI_PAN_EVENT_PAN_VIEWPORT_CHANGED, NULL); } EOLIAN static void @@ -68,7 +68,7 @@ _efl_ui_pan_pan_position_set(Eo *obj EINA_UNUSED, Efl_Ui_Pan_Data *psd, Eina_Pos psd->py = pos.y; evas_object_smart_changed(obj); - efl_event_callback_call(obj, EFL_UI_PAN_EVENT_POSITION_CHANGED, NULL); + efl_event_callback_call(obj, EFL_UI_PAN_EVENT_PAN_POSITION_CHANGED, NULL); } EOLIAN static Eina_Position2D @@ -126,7 +126,7 @@ _efl_ui_pan_content_del_cb(void *data, psd->content = NULL; psd->content_w = psd->content_h = psd->px = psd->py = 0; - efl_event_callback_call(pobj, EFL_UI_PAN_EVENT_CONTENT_CHANGED, NULL); + efl_event_callback_call(pobj, EFL_UI_PAN_EVENT_PAN_CONTENT_CHANGED, NULL); } static void @@ -145,7 +145,7 @@ _efl_ui_pan_content_resize_cb(void *data, psd->content_h = sz.h; evas_object_smart_changed(pobj); } - efl_event_callback_call(pobj, EFL_UI_PAN_EVENT_CONTENT_CHANGED, NULL); + efl_event_callback_call(pobj, EFL_UI_PAN_EVENT_PAN_CONTENT_CHANGED, NULL); } EOLIAN static Eina_Bool @@ -179,7 +179,7 @@ _efl_ui_pan_efl_content_content_set(Evas_Object *obj, Efl_Ui_Pan_Data *psd, Evas end: efl_event_callback_call(obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, content); - efl_event_callback_call(obj, EFL_UI_PAN_EVENT_CONTENT_CHANGED, NULL); + efl_event_callback_call(obj, EFL_UI_PAN_EVENT_PAN_CONTENT_CHANGED, NULL); return EINA_TRUE; } @@ -203,7 +203,7 @@ _efl_ui_pan_efl_content_content_unset(Eo *obj EINA_UNUSED, Efl_Ui_Pan_Data *pd) pd->content = NULL; pd->content_w = pd->content_h = pd->px = pd->py = 0; efl_event_callback_call(obj, EFL_CONTENT_EVENT_CONTENT_CHANGED, NULL); - efl_event_callback_call(obj, EFL_UI_PAN_EVENT_CONTENT_CHANGED, NULL); + efl_event_callback_call(obj, EFL_UI_PAN_EVENT_PAN_CONTENT_CHANGED, NULL); return old_content; } diff --git a/src/lib/elementary/efl_ui_pan.eo b/src/lib/elementary/efl_ui_pan.eo index 84d2e0df81..9923a39463 100644 --- a/src/lib/elementary/efl_ui_pan.eo +++ b/src/lib/elementary/efl_ui_pan.eo @@ -48,8 +48,8 @@ class @beta Efl.Ui.Pan extends Efl.Canvas.Group implements Efl.Content Efl.Canvas.Group.group_calculate; } events { - content,changed: void; [[Called when pan content changed]] - viewport,changed: void; [[Called when pan viewport changed]] - position,changed: void; [[Called when pan position changed]] + pan,content,changed: void; [[Called when pan content changed]] + pan,viewport,changed: void; [[Called when pan viewport changed]] + pan,position,changed: void; [[Called when pan position changed]] } } diff --git a/src/lib/elementary/efl_ui_panel.eo b/src/lib/elementary/efl_ui_panel.eo index 2d93f2b54a..fffe726ccb 100644 --- a/src/lib/elementary/efl_ui_panel.eo +++ b/src/lib/elementary/efl_ui_panel.eo @@ -1,4 +1,4 @@ -enum Efl.Ui.Panel_Orient +enum @beta Efl.Ui.Panel_Orient { [[Panel orientation mode]] @@ -8,7 +8,7 @@ enum Efl.Ui.Panel_Orient right [[Panel (dis)appears from the right]] } -struct Efl.Ui.Panel_Scroll_Info +struct @beta Efl.Ui.Panel_Scroll_Info { [[Panel scroll information]] rel_x: double; [[content scrolled position (0.0 ~ 1.0) in the panel]] diff --git a/src/lib/elementary/efl_ui_popup.eo b/src/lib/elementary/efl_ui_popup.eo index edc408120a..4fc5548e6b 100644 --- a/src/lib/elementary/efl_ui_popup.eo +++ b/src/lib/elementary/efl_ui_popup.eo @@ -1,4 +1,4 @@ -enum Efl.Ui.Popup_Align { +enum @beta Efl.Ui.Popup_Align { [[Popup alignment type]] none = 0, [[Popup not aligned]] center, [[Popup aligned to center]] diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c index 56ed183031..2d1ecfc230 100644 --- a/src/lib/elementary/efl_ui_progressbar.c +++ b/src/lib/elementary/efl_ui_progressbar.c @@ -702,7 +702,7 @@ _efl_ui_progressbar_efl_part_part_get(const Eo *obj, Efl_Ui_Progressbar_Data *sd ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); // Progress bars are dragable types - if (edje_object_part_drag_dir_get(wd->resize_obj, part) != EFL_UI_DRAG_DIR_NONE) + if (edje_object_part_drag_dir_get(wd->resize_obj, part) != (Edje_Drag_Dir)EFL_UI_DRAG_DIR_NONE) return ELM_PART_IMPLEMENT(EFL_UI_PROGRESSBAR_PART_CLASS, obj, part); return efl_part_get(efl_super(obj, MY_CLASS), part); diff --git a/src/lib/elementary/efl_ui_scroll_manager.c b/src/lib/elementary/efl_ui_scroll_manager.c index e3711109ed..98da2fd830 100644 --- a/src/lib/elementary/efl_ui_scroll_manager.c +++ b/src/lib/elementary/efl_ui_scroll_manager.c @@ -2247,11 +2247,11 @@ _efl_ui_scroll_manager_pan_set(Eo *obj, Efl_Ui_Scroll_Manager_Data *sd, Eo *pan) if (sd->pan_obj) { efl_event_callback_del - (sd->pan_obj, EFL_UI_PAN_EVENT_CONTENT_CHANGED, _efl_ui_scroll_manager_pan_content_changed_cb, sd); + (sd->pan_obj, EFL_UI_PAN_EVENT_PAN_CONTENT_CHANGED, _efl_ui_scroll_manager_pan_content_changed_cb, sd); efl_event_callback_del - (sd->pan_obj, EFL_UI_PAN_EVENT_VIEWPORT_CHANGED, _efl_ui_scroll_manager_pan_viewport_changed_cb, sd); + (sd->pan_obj, EFL_UI_PAN_EVENT_PAN_VIEWPORT_CHANGED, _efl_ui_scroll_manager_pan_viewport_changed_cb, sd); efl_event_callback_del - (sd->pan_obj, EFL_UI_PAN_EVENT_POSITION_CHANGED, _efl_ui_scroll_manager_pan_position_changed_cb, sd); + (sd->pan_obj, EFL_UI_PAN_EVENT_PAN_POSITION_CHANGED, _efl_ui_scroll_manager_pan_position_changed_cb, sd); } if (!pan) @@ -2260,11 +2260,11 @@ _efl_ui_scroll_manager_pan_set(Eo *obj, Efl_Ui_Scroll_Manager_Data *sd, Eo *pan) sd->pan_obj = pan; efl_event_callback_add - (sd->pan_obj, EFL_UI_PAN_EVENT_CONTENT_CHANGED, _efl_ui_scroll_manager_pan_content_changed_cb, sd); + (sd->pan_obj, EFL_UI_PAN_EVENT_PAN_CONTENT_CHANGED, _efl_ui_scroll_manager_pan_content_changed_cb, sd); efl_event_callback_add - (sd->pan_obj, EFL_UI_PAN_EVENT_VIEWPORT_CHANGED, _efl_ui_scroll_manager_pan_viewport_changed_cb, sd); + (sd->pan_obj, EFL_UI_PAN_EVENT_PAN_VIEWPORT_CHANGED, _efl_ui_scroll_manager_pan_viewport_changed_cb, sd); efl_event_callback_add - (sd->pan_obj, EFL_UI_PAN_EVENT_POSITION_CHANGED, _efl_ui_scroll_manager_pan_position_changed_cb, sd); + (sd->pan_obj, EFL_UI_PAN_EVENT_PAN_POSITION_CHANGED, _efl_ui_scroll_manager_pan_position_changed_cb, sd); evas_object_event_callback_add(sd->pan_obj, EVAS_CALLBACK_RESIZE, _efl_ui_scroll_manager_pan_resized_cb, obj); evas_object_event_callback_add(sd->pan_obj, EVAS_CALLBACK_MOVE, @@ -2452,11 +2452,11 @@ _efl_ui_scroll_manager_efl_object_destructor(Eo *obj, Efl_Ui_Scroll_Manager_Data evas_object_event_callback_del_full(sd->pan_obj, EVAS_CALLBACK_MOVE, _efl_ui_scroll_manager_pan_moved_cb, obj); efl_event_callback_del - (sd->pan_obj, EFL_UI_PAN_EVENT_CONTENT_CHANGED, _efl_ui_scroll_manager_pan_content_changed_cb, sd); + (sd->pan_obj, EFL_UI_PAN_EVENT_PAN_CONTENT_CHANGED, _efl_ui_scroll_manager_pan_content_changed_cb, sd); efl_event_callback_del - (sd->pan_obj, EFL_UI_PAN_EVENT_VIEWPORT_CHANGED, _efl_ui_scroll_manager_pan_viewport_changed_cb, sd); + (sd->pan_obj, EFL_UI_PAN_EVENT_PAN_VIEWPORT_CHANGED, _efl_ui_scroll_manager_pan_viewport_changed_cb, sd); efl_event_callback_del - (sd->pan_obj, EFL_UI_PAN_EVENT_POSITION_CHANGED, _efl_ui_scroll_manager_pan_position_changed_cb, sd); + (sd->pan_obj, EFL_UI_PAN_EVENT_PAN_POSITION_CHANGED, _efl_ui_scroll_manager_pan_position_changed_cb, sd); } efl_destructor(efl_super(obj, MY_CLASS)); } diff --git a/src/lib/elementary/efl_ui_selection_types.eot b/src/lib/elementary/efl_ui_selection_types.eot index cab30d8b69..98bbfbdc5a 100644 --- a/src/lib/elementary/efl_ui_selection_types.eot +++ b/src/lib/elementary/efl_ui_selection_types.eot @@ -1,4 +1,4 @@ -enum Efl.Ui.Selection_Type +enum @beta Efl.Ui.Selection_Type { [[Selection type]] primary, [[Primary text selection (highlighted or selected text)]] @@ -7,7 +7,7 @@ enum Efl.Ui.Selection_Type clipboard [[Clipboard selection (ctrl+C)]] } -enum Efl.Ui.Selection_Format +enum @beta Efl.Ui.Selection_Format { [[Selection format]] targets = -1, [[For matching every possible atom]] @@ -19,7 +19,7 @@ enum Efl.Ui.Selection_Format html = 0x10 [[Raw HTML-like data (eg. webkit)]] } -enum Efl.Ui.Selection_Action +enum @beta Efl.Ui.Selection_Action { [[Defines the kind of action associated with the drop data]] unknown, [[Action type is unknown]] @@ -32,7 +32,7 @@ enum Efl.Ui.Selection_Action description [[Describe the data]] } -struct Efl.Ui.Selection_Data +struct @beta Efl.Ui.Selection_Data { [[Structure holding the info about selected data]] pos: Eina.Position2D; [[Coordinates of the drop (DND operations only)]] @@ -42,7 +42,7 @@ struct Efl.Ui.Selection_Data item: Efl.Object; [[Item under the drag position. It is only available for container]] } -function Efl.Ui.Selection_Data_Ready { +function @beta Efl.Ui.Selection_Data_Ready { [[Function pointer for getting selection]] params { @in obj: Efl.Object; [[Object which requested for the selection]] @@ -50,7 +50,7 @@ function Efl.Ui.Selection_Data_Ready { } }; -struct Efl.Ui.Selection_Changed +struct @beta Efl.Ui.Selection_Changed { type: Efl.Ui.Selection_Type; [[Selection type]] seat: int; [[The seat on which the selection changed, or NULL for "default"]] diff --git a/src/lib/elementary/efl_ui_spin.eo b/src/lib/elementary/efl_ui_spin.eo index 7fa515b38f..be06558691 100644 --- a/src/lib/elementary/efl_ui_spin.eo +++ b/src/lib/elementary/efl_ui_spin.eo @@ -1,4 +1,4 @@ -struct Efl.Ui.Spin_Special_Value +struct @beta Efl.Ui.Spin_Special_Value { [[Special value]] value: double; [[Target value]] diff --git a/src/lib/elementary/efl_ui_stack.eo b/src/lib/elementary/efl_ui_stack.eo index 2351a3869b..8fbc2cf2ed 100644 --- a/src/lib/elementary/efl_ui_stack.eo +++ b/src/lib/elementary/efl_ui_stack.eo @@ -1,19 +1,19 @@ -struct Efl.Ui.Stack_Event_Loaded { +struct @beta Efl.Ui.Stack_Event_Loaded { [[Information of loaded event.]] content: Efl.Canvas.Object; [[Loaded content.]] } -struct Efl.Ui.Stack_Event_Unloaded { +struct @beta Efl.Ui.Stack_Event_Unloaded { [[Information of unloaded event.]] content: Efl.Canvas.Object; [[Unloaded content.]] } -struct Efl.Ui.Stack_Event_Activated { +struct @beta Efl.Ui.Stack_Event_Activated { [[Information of activated event.]] content: Efl.Canvas.Object; [[Activated content.]] } -struct Efl.Ui.Stack_Event_Deactivated { +struct @beta Efl.Ui.Stack_Event_Deactivated { [[Information of deactivated event.]] content: Efl.Canvas.Object; [[Deactivated content.]] } diff --git a/src/lib/elementary/efl_ui_tab_bar.c b/src/lib/elementary/efl_ui_tab_bar.c index 077212cb1c..0cc849c8ce 100644 --- a/src/lib/elementary/efl_ui_tab_bar.c +++ b/src/lib/elementary/efl_ui_tab_bar.c @@ -187,7 +187,7 @@ _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_SELECTED, (void *)(intptr_t)index); + efl_event_callback_call(tp, EFL_UI_EVENT_SELECTABLE_SELECTED, (void *)(intptr_t)index); sd->cur = index; } diff --git a/src/lib/elementary/efl_ui_tab_page.eo b/src/lib/elementary/efl_ui_tab_page.eo index e20a7e6870..818277cfad 100644 --- a/src/lib/elementary/efl_ui_tab_page.eo +++ b/src/lib/elementary/efl_ui_tab_page.eo @@ -1,9 +1,9 @@ -enum Efl.Ui.Tab_Page_Tab_Changed { +enum @beta Efl.Ui.Tab_Page_Tab_Changed { label = 0, [[Label changed]] icon [[Icon changed]] } -struct Efl.Ui.Tab_Page_Tab_Changed_Event { +struct @beta Efl.Ui.Tab_Page_Tab_Changed_Event { [[Information of changed event]] changed_info: Efl.Ui.Tab_Page_Tab_Changed; } diff --git a/src/lib/elementary/efl_ui_tab_pager.c b/src/lib/elementary/efl_ui_tab_pager.c index 45758cbc98..3edbf1a0f4 100644 --- a/src/lib/elementary/efl_ui_tab_pager.c +++ b/src/lib/elementary/efl_ui_tab_pager.c @@ -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_SELECTED, _tab_select_cb, obj); + efl_event_callback_del(sd->tab_bar, EFL_UI_EVENT_SELECTABLE_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_SELECTED, _tab_select_cb, obj); + efl_event_callback_add(sd->tab_bar, EFL_UI_EVENT_SELECTABLE_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_SELECTED, _tab_select_cb, obj); + efl_event_callback_del(sd->tab_bar, EFL_UI_EVENT_SELECTABLE_SELECTED, _tab_select_cb, obj); efl_destructor(efl_super(obj, MY_CLASS)); } diff --git a/src/lib/elementary/efl_ui_table.c b/src/lib/elementary/efl_ui_table.c index cc3d240411..7fe398d1ed 100644 --- a/src/lib/elementary/efl_ui_table.c +++ b/src/lib/elementary/efl_ui_table.c @@ -123,10 +123,15 @@ _custom_table_calc(Eo *obj, Custom_Table_Data *pd) /* End of custom table class */ EOLIAN static void -_efl_ui_table_homogeneous_set(Eo *obj EINA_UNUSED, Efl_Ui_Table_Data *pd, Eina_Bool homogeneoush, Eina_Bool homogeneousv) +_efl_ui_table_homogeneous_set(Eo *obj, Efl_Ui_Table_Data *pd, Eina_Bool homogeneoush, Eina_Bool homogeneousv) { + if ((pd->homogeneoush == !!homogeneoush) && + (pd->homogeneousv == !!homogeneousv)) + return; + pd->homogeneoush = !!homogeneoush; pd->homogeneousv = !!homogeneousv; + efl_pack_layout_request(obj); } EOLIAN static void diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c index 53dddbeba0..f5a2ddedb1 100644 --- a/src/lib/elementary/efl_ui_text.c +++ b/src/lib/elementary/efl_ui_text.c @@ -1120,7 +1120,7 @@ _hoversel_item_paste_cb(void *data, } static void -_selection_clear(void *data, Elm_Sel_Type selection) +_selection_clear(void *data, Efl_Ui_Selection_Type selection) { EFL_UI_TEXT_DATA_GET(data, sd); @@ -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_SELECTION_CUT, NULL); + efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_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_SELECTION_COPY, NULL); + efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_COPY, NULL); sd->sel_mode = EINA_FALSE; if (!_elm_config->desktop_entry) { @@ -2131,7 +2131,7 @@ _efl_ui_text_efl_object_constructor(Eo *obj, Efl_Ui_Text_Data *sd) text_obj = efl_add(EFL_UI_INTERNAL_TEXT_INTERACTIVE_CLASS, obj); efl_event_callback_forwarder_add(text_obj, EFL_UI_TEXT_EVENT_CHANGED_USER, obj); efl_event_callback_forwarder_add(text_obj, EFL_UI_TEXT_EVENT_CHANGED, obj); - efl_event_callback_forwarder_add(text_obj, EFL_TEXT_INTERACTIVE_EVENT_SELECTION_CHANGED, obj); + efl_event_callback_forwarder_add(text_obj, EFL_TEXT_INTERACTIVE_EVENT_TEXT_SELECTION_CHANGED, obj); sd->text_obj = text_obj; sd->text_guide_obj = efl_add(EFL_CANVAS_TEXT_CLASS, obj); sd->text_table = efl_add(EFL_UI_TABLE_CLASS, obj); @@ -2199,7 +2199,7 @@ _efl_ui_text_efl_object_finalize(Eo *obj, _efl_ui_text_changed_user_cb, obj); efl_event_callback_add(sd->text_obj, EFL_CANVAS_TEXT_EVENT_CHANGED, _efl_ui_text_changed_cb, obj); - efl_event_callback_add(sd->text_obj, EFL_TEXT_INTERACTIVE_EVENT_SELECTION_CHANGED, + efl_event_callback_add(sd->text_obj, EFL_TEXT_INTERACTIVE_EVENT_TEXT_SELECTION_CHANGED, _efl_ui_text_selection_changed_cb, obj); efl_event_callback_add(sd->text_obj, EFL_CANVAS_TEXT_EVENT_CURSOR_CHANGED, _efl_ui_text_cursor_changed_cb, obj); @@ -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_SELECTION_CLEARED, NULL); + efl_event_callback_call(obj, EFL_UI_EVENT_SELECTABLE_CLEARED, NULL); sd->have_selection = EINA_FALSE; _edje_signal_emit(sd, "selection,cleared", "efl.text"); diff --git a/src/lib/elementary/efl_ui_textpath.eo b/src/lib/elementary/efl_ui_textpath.eo index fc4642bb62..b403d149f5 100644 --- a/src/lib/elementary/efl_ui_textpath.eo +++ b/src/lib/elementary/efl_ui_textpath.eo @@ -1,4 +1,4 @@ -enum Efl.Ui.Textpath_Direction { +enum @beta Efl.Ui.Textpath_Direction { [[Textpath direction]] cw, [[Clockwise]] ccw [[Counter-clockwise]] diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index e39bea0065..ed959eb479 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -1151,10 +1151,6 @@ elm_widget_focus_region_show(Eo *obj) } } -EOLIAN static void -_efl_ui_widget_widget_parent_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Evas_Object *parent EINA_UNUSED) -{ -} EAPI Eina_Bool elm_widget_api_check(int ver) @@ -1378,74 +1374,27 @@ elm_widget_sub_object_parent_add(Evas_Object *sobj) return elm_widget_sub_object_add(parent, sobj); } -/* - * @internal - * - * Add sobj to obj's sub object. - * - * What does elementary sub object mean? This is unique in elementary, it - * handles overall elementary policies between parent and sub objects. - * focus, access, deletion, theme, scale, mirror, scrollable child get, - * translate, name find, display mode set, orientation set, tree dump - * AUTOMATICALLY. - * - * @see elm_widget_sub_object_parent_add() - */ -EOLIAN static Eina_Bool -_efl_ui_widget_widget_sub_object_add(Eo *obj, Elm_Widget_Smart_Data *sd, 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); - Elm_Widget_Smart_Data *sdc = NULL; - - EINA_SAFETY_ON_TRUE_RETURN_VAL(obj == sobj, EINA_FALSE); - - if (_elm_widget_is(sobj)) - sdc = efl_data_scope_get(sobj, MY_CLASS); - - if (sobj == sd->parent_obj) + Efl_Ui_Widget *old_parent; + //check if we are in the subobject list of parents + if (parent) { - /* in this case, sobj must be an elm widget, or something - * very wrong is happening */ - if (!sdc) return EINA_FALSE; - - if (!elm_widget_sub_object_del(sobj, obj)) return EINA_FALSE; - WRN("You passed a parent object of obj = %p as the sub object = %p!", - obj, sobj); + ELM_WIDGET_DATA_GET_OR_RETURN(parent, ppd); + EINA_SAFETY_ON_FALSE_RETURN(eina_list_data_find(ppd->subobjs, obj)); } - if (sdc) - { - if (sdc->parent_obj == obj) goto end; - if (sdc->parent_obj) - { - if (!elm_widget_sub_object_del(sdc->parent_obj, sobj)) - return EINA_FALSE; - } - sdc->parent_obj = obj; + old_parent = pd->parent_obj; + pd->parent_obj = parent; - _full_eval(sobj, sdc); - efl_ui_widget_disabled_set(sobj, efl_ui_widget_disabled_get(obj)); + // now lets sync up all states - _elm_widget_top_win_focused_set(sobj, sd->top_win_focused); - } - else - { - void *data = evas_object_data_get(sobj, "elm-parent"); - - if (data) - { - if (data == obj) goto end; - if (!elm_widget_sub_object_del(data, sobj)) return EINA_FALSE; - } - } - sd->subobjs = eina_list_append(sd->subobjs, sobj); - evas_object_data_set(sobj, "elm-parent", obj); - - _callbacks_add(sobj, obj); - if (sdc) + 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 + * 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 @@ -1453,33 +1402,85 @@ _efl_ui_widget_widget_sub_object_add(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Ob * 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(sobj); - Elm_Theme *th, *pth = elm_widget_theme_get(sobj); + double scale, pscale = efl_gfx_entity_scale_get(obj); + Elm_Theme *th, *pth = elm_widget_theme_get(obj); - scale = efl_gfx_entity_scale_get(sobj); - th = elm_widget_theme_get(sobj); - mirrored = efl_ui_mirrored_get(sobj); + scale = efl_gfx_entity_scale_get(obj); + th = elm_widget_theme_get(obj); + mirrored = efl_ui_mirrored_get(obj); - if (!sdc->on_create) + if (!pd->on_create) { if ((scale != pscale) || (th != pth) || (pmirrored != mirrored)) - elm_widget_theme(sobj); - } - - if (_is_focused(sobj)) _parents_focus(obj); - - elm_widget_display_mode_set(sobj, - evas_object_size_hint_display_mode_get(obj)); - if (_elm_config->atspi_mode && !sd->on_create) - { - Efl_Access_Object *aparent; - aparent = efl_provider_find(efl_parent_get(sobj), EFL_ACCESS_OBJECT_MIXIN); - if (aparent) - efl_access_children_changed_added_signal_emit(aparent, sobj); + elm_widget_theme(obj); } + if (_is_focused(obj)) _parents_focus(parent); + elm_widget_display_mode_set(obj, evas_object_size_hint_display_mode_get(parent)); + elm_widget_disabled_set(obj, efl_ui_widget_disabled_get(parent)); + _elm_widget_top_win_focused_set(obj, _elm_widget_top_win_focused_get(parent)); } -end: + _full_eval(obj, pd); + + if (old_parent && _elm_config->atspi_mode) + { + Efl_Access_Object *aparent; + aparent = efl_provider_find(efl_parent_get(obj), EFL_ACCESS_OBJECT_MIXIN); + if (aparent) + efl_access_children_changed_del_signal_emit(aparent, obj); + } + + if (pd->parent_obj && _elm_config->atspi_mode && efl_finalized_get(parent)) + { + Efl_Access_Object *aparent; + aparent = efl_provider_find(efl_parent_get(obj), EFL_ACCESS_OBJECT_MIXIN); + if (aparent) + efl_access_children_changed_added_signal_emit(aparent, obj); + } +} + +static void +_widget_add_sub(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj) +{ + sd->subobjs = eina_list_append(sd->subobjs, sobj); + evas_object_data_set(sobj, "elm-parent", obj); + _callbacks_add(sobj, obj); +} + +static void +_widget_del_sub(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj) +{ + sd->subobjs = eina_list_remove(sd->subobjs, sobj); + evas_object_data_del(sobj, "elm-parent"); + _callbacks_del(sobj, obj); +} + +EOLIAN static Eina_Bool +_efl_ui_widget_widget_sub_object_add(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj) +{ + Efl_Ui_Widget *parent; + + //first make sure that we unregister the sobj from the parent + if (elm_widget_is(sobj)) + parent = efl_ui_widget_parent_get(sobj); + else + parent = evas_object_data_get(sobj, "elm-parent"); + if (parent == obj) return EINA_TRUE; + if (parent) + { + if (!efl_ui_widget_sub_object_del(parent, sobj)) + return EINA_FALSE; + } + + //sobj does not have a parent here + //first add it to our own children list + _widget_add_sub(obj, sd, sobj); + + //and if it is a widget, please set the correct parent on the widget itself + //the parent set method will take care of the property syncing etc. + if (elm_widget_is(sobj)) + efl_ui_widget_parent_set(sobj, obj); + return EINA_TRUE; } @@ -1519,25 +1520,13 @@ _efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Ob elm_widget_tree_unfocusable_set(sobj, EINA_TRUE); elm_widget_tree_unfocusable_set(sobj, EINA_FALSE); } - if (_elm_config->atspi_mode && !sd->on_destroy) - { - Efl_Access_Object *aparent; - aparent = efl_provider_find(efl_parent_get(sobj), EFL_ACCESS_OBJECT_MIXIN); - if (aparent) - efl_access_children_changed_del_signal_emit(aparent, sobj); - } - ELM_WIDGET_DATA_GET(sobj, sdc); - sdc->parent_obj = NULL; - - _full_eval(sobj, sdc); + efl_ui_widget_parent_set(sobj, NULL); } if (sd->resize_obj == sobj) sd->resize_obj = NULL; - sd->subobjs = eina_list_remove(sd->subobjs, sobj); - - _callbacks_del(sobj, obj); + _widget_del_sub(obj, sd, sobj); return EINA_TRUE; } @@ -5023,16 +5012,17 @@ elm_widget_tree_dot_dump(const Evas_Object *top, EOLIAN static Eo * _efl_ui_widget_efl_object_constructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED) { - Eo *parent = NULL; - sd->on_create = EINA_TRUE; _efl_ui_focus_event_redirector(obj, obj); efl_canvas_group_clipped_set(obj, EINA_FALSE); 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); - parent = efl_parent_get(obj); - efl_ui_widget_parent_set(obj, parent); + if (!efl_isa(obj, EFL_UI_WIN_CLASS)) + { + efl_ui_widget_sub_object_add(efl_parent_get(obj), obj); + } + sd->on_create = EINA_FALSE; efl_access_object_role_set(obj, EFL_ACCESS_ROLE_UNKNOWN); @@ -5940,6 +5930,189 @@ _efl_ui_widget_part_bg_efl_gfx_image_scale_type_get(const Eo *obj, void *pd EINA return efl_gfx_image_scale_type_get(bg_obj); } +typedef struct _Efl_Ui_Property_Bound Efl_Ui_Property_Bound; +struct _Efl_Ui_Property_Bound +{ + Eina_Stringshare *key; // Local object property + Eina_Stringshare *property; // Model property + Eina_Future *f; +}; + +static void +_efl_ui_property_bind_free(void *data) +{ + Efl_Ui_Property_Bound *prop = data; + + eina_stringshare_del(prop->key); + eina_stringshare_del(prop->property); + free(prop); +} + +static void +_efl_ui_property_bind_clean(Eo *obj EINA_UNUSED, + void *data, + const Eina_Future *f EINA_UNUSED) +{ + Efl_Ui_Property_Bound *prop = data; + + prop->f = NULL; +} + +static void +_efl_ui_property_bind_get(Efl_Ui_Widget_Data *pd, Efl_Ui_Property_Bound *prop) +{ + Eina_Value *value = efl_model_property_get(pd->properties.model, prop->property); + Eina_Future *f; + Eina_Error err; + + err = efl_property_reflection_set(pd->obj, prop->key, eina_value_reference_copy(value)); + eina_value_free(value); + + if (!err) return ; + + // Report back the error to the model + if (prop->f) eina_future_cancel(prop->f); + f = efl_model_property_set(pd->properties.model, prop->property, + eina_value_error_new(err)); + prop->f = efl_future_then(pd->obj, f, .free = _efl_ui_property_bind_clean, .data = prop); +} + +static void +_efl_ui_property_bind_set(Efl_Ui_Widget_Data *pd, Efl_Ui_Property_Bound *prop) +{ + Eina_Value value = efl_property_reflection_get(pd->obj, prop->key); + Eina_Future *f; + + if (prop->f) eina_future_cancel(prop->f); + f = efl_model_property_set(pd->properties.model, prop->property, eina_value_dup(&value)); + prop->f = efl_future_then(pd->obj, f, .free = _efl_ui_property_bind_clean, .data = prop); + eina_value_flush(&value); +} + +static void +_efl_ui_model_property_bind_changed(void *data, const Efl_Event *event) +{ + Efl_Model_Property_Event *evt = event->info; + Efl_Ui_Widget_Data *pd = data; + Eina_Array_Iterator it; + const char *prop; + unsigned int i; + + EINA_ARRAY_ITER_NEXT(evt->changed_properties, i, prop, it) + { + Efl_Ui_Property_Bound *lookup; + + lookup = eina_hash_find(pd->properties.model_lookup, prop); + if (lookup) _efl_ui_property_bind_get(pd, lookup); + } +} + +static void +_efl_ui_view_property_bind_changed(void *data, const Efl_Event *event) +{ + Efl_Ui_Property_Event *evt = event->info; + Efl_Ui_Widget_Data *pd = data; + Eina_Array_Iterator it; + Eina_Stringshare *prop; + unsigned int i; + + EINA_ARRAY_ITER_NEXT(evt->changed_properties, i, prop, it) + { + Efl_Ui_Property_Bound *lookup; + + lookup = eina_hash_find(pd->properties.view_lookup, prop); + if (lookup) _efl_ui_property_bind_set(pd, lookup); + } +} + +static Eina_Error +_efl_ui_widget_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Widget_Data *pd, + const char *key, const char *property) +{ + Efl_Ui_Property_Bound *prop; + + // Check if the property is available from the reflection table of the object. + if (!efl_property_reflection_exist(obj, key)) return EFL_PROPERTY_ERROR_INVALID_KEY; + + if (!pd->properties.model_lookup) + { + pd->properties.model_lookup = eina_hash_stringshared_new(_efl_ui_property_bind_free); + pd->properties.view_lookup = eina_hash_stringshared_new(NULL); + if (pd->properties.model) + { + efl_event_callback_add(pd->properties.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, + _efl_ui_model_property_bind_changed, pd); + efl_event_callback_add(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED, + _efl_ui_view_property_bind_changed, pd); + } + } + + prop = calloc(1, sizeof (Efl_Ui_Property_Bound)); + if (!prop) return ENOMEM; + prop->key = eina_stringshare_add(key); + prop->property = eina_stringshare_add(property); + + eina_hash_direct_add(pd->properties.model_lookup, prop->property, prop); + eina_hash_direct_add(pd->properties.view_lookup, prop->key, prop); + + _efl_ui_property_bind_get(pd, prop); + + efl_event_callback_call(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND, (void*) prop->key); + + return 0; +} + +static void +_efl_ui_widget_efl_ui_view_model_set(Eo *obj, + Efl_Ui_Widget_Data *pd, + Efl_Model *model) +{ + if (pd->properties.model) + { + // Remove any existing handler that might exist for any reason + efl_event_callback_del(pd->properties.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, + _efl_ui_model_property_bind_changed, pd); + efl_event_callback_del(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED, + _efl_ui_view_property_bind_changed, pd); + } + + efl_replace(&pd->properties.model, model); + + if (pd->properties.model && pd->properties.model_lookup) + { + // Set the properties handler just in case + efl_event_callback_add(pd->properties.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, + _efl_ui_model_property_bind_changed, pd); + efl_event_callback_add(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED, + _efl_ui_view_property_bind_changed, pd); + } +} + +static Efl_Model * +_efl_ui_widget_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Efl_Ui_Widget_Data *pd) +{ + return pd->properties.model; +} + +static void +_efl_ui_widget_efl_object_invalidate(Eo *obj, Efl_Ui_Widget_Data *pd) +{ + efl_invalidate(efl_super(obj, EFL_UI_WIDGET_CLASS)); + + if (pd->properties.model) + { + efl_event_callback_del(pd->properties.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, + _efl_ui_model_property_bind_changed, pd); + efl_event_callback_del(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTIES_CHANGED, + _efl_ui_view_property_bind_changed, pd); + efl_replace(&pd->properties.model, NULL); + } + if (pd->properties.view_lookup) eina_hash_free(pd->properties.view_lookup); + pd->properties.view_lookup = NULL; + if (pd->properties.model_lookup) eina_hash_free(pd->properties.model_lookup); + pd->properties.model_lookup = NULL; +} + #include "efl_ui_widget_part_bg.eo.c" /* Efl.Part Bg end */ diff --git a/src/lib/elementary/efl_ui_widget.eo b/src/lib/elementary/efl_ui_widget.eo index 3d94b504bd..c06587a533 100644 --- a/src/lib/elementary/efl_ui_widget.eo +++ b/src/lib/elementary/efl_ui_widget.eo @@ -1,4 +1,4 @@ -function Efl.Ui.Scrollable_On_Show_Region { +function @beta Efl.Ui.Scrollable_On_Show_Region { [[Function pointer for on show region hook]] params { @in obj: Efl.Canvas.Object; [[Canvas object]] @@ -7,16 +7,17 @@ function Efl.Ui.Scrollable_On_Show_Region { }; struct Efl.Ui.Widget_Focus_State { - [[All relevant fields needed for the current state of focus registeration]] + [[All relevant fields needed for the current state of focus registration]] 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]] } -abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object, +abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object, Efl.Access.Component, Efl.Part, Efl.Ui.Focus.Object, Efl.Ui.L10n, - Efl.Ui.Selection, Efl.Ui.Dnd + Efl.Ui.Selection, Efl.Ui.Dnd, + Efl.Ui.Property_Bind, Efl.Ui.View { [[Efl UI widget abstract class]] //eo_prefix: efl_ui_widget; @@ -388,6 +389,7 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje class.constructor; Efl.Object.constructor; Efl.Object.finalize; + Efl.Object.invalidate; Efl.Object.destructor; Efl.Object.provider_find; Efl.Object.debug_name_override; @@ -415,6 +417,8 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje Efl.Ui.Focus.Object.on_focus_update; Efl.Ui.L10n.translation_update; [[This implements the calls to $gettext() and $text_set().]] Efl.Part.part_get; [[Returns @Efl.Ui.Widget_Part.]] + Efl.Ui.View.model { get; set; } + Efl.Ui.Property_Bind.property_bind; } constructors { .style @optional; diff --git a/src/lib/elementary/efl_ui_widget_factory.c b/src/lib/elementary/efl_ui_widget_factory.c index 1059cefb4e..a04bdcbb23 100644 --- a/src/lib/elementary/efl_ui_widget_factory.c +++ b/src/lib/elementary/efl_ui_widget_factory.c @@ -115,13 +115,16 @@ _efl_ui_widget_factory_efl_ui_factory_release(Eo *obj EINA_UNUSED, efl_del(ui_view); } +Eina_Stringshare *_property_style_ss = NULL; + static Eina_Error _efl_ui_widget_factory_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Widget_Factory_Data *pd, const char *target, const char *property) { - if (!strcmp(target, "style")) + if (_property_style_ss == target || !strcmp(target, _property_style_ss)) { eina_stringshare_replace(&pd->style, property); + efl_event_callback_call(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND, (void*) _property_style_ss); return 0; } diff --git a/src/lib/elementary/efl_ui_widget_focus_manager.eo b/src/lib/elementary/efl_ui_widget_focus_manager.eo index dacc6e9c23..4ffc1353d0 100644 --- a/src/lib/elementary/efl_ui_widget_focus_manager.eo +++ b/src/lib/elementary/efl_ui_widget_focus_manager.eo @@ -1,4 +1,4 @@ -mixin @beta Efl.Ui.Widget_Focus_Manager requires Efl.Ui.Widget extends Efl.Ui.Focus.Manager +mixin Efl.Ui.Widget_Focus_Manager requires Efl.Ui.Widget extends Efl.Ui.Focus.Manager { methods { focus_manager_create @protected @pure_virtual { diff --git a/src/lib/elementary/efl_ui_widget_image.h b/src/lib/elementary/efl_ui_widget_image.h index 8fae00f950..5bdb566add 100644 --- a/src/lib/elementary/efl_ui_widget_image.h +++ b/src/lib/elementary/efl_ui_widget_image.h @@ -80,7 +80,6 @@ struct _Efl_Ui_Image_Data const char *stdicon; struct { - Efl_Model *model; Eina_Stringshare *file; Eina_Stringshare *key; diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 4989adf344..553e42aed9 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -2025,7 +2025,7 @@ _elm_win_evas_focus_in(void *data, Eo *win = data; _elm_win_throttle_ok = EINA_TRUE; - efl_event_callback_legacy_call(win, EFL_CANVAS_SCENE_EVENT_FOCUS_IN, NULL); + efl_event_callback_legacy_call(win, EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_IN, NULL); } static void @@ -2035,7 +2035,7 @@ _elm_win_evas_focus_out(void *data, { Eo *win = data; - efl_event_callback_legacy_call(win, EFL_CANVAS_SCENE_EVENT_FOCUS_OUT, NULL); + efl_event_callback_legacy_call(win, EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_OUT, NULL); } static void @@ -2170,13 +2170,13 @@ _win_event_add_cb(void *data, const Efl_Event *ev) evas_event_callback_add(sd->evas, EVAS_CALLBACK_RENDER_PRE, _elm_win_evas_render_pre, win); } - else if (array[i].desc == EFL_CANVAS_SCENE_EVENT_FOCUS_IN) + else if (array[i].desc == EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_IN) { if (!(sd->event_forward.focus_in++)) evas_event_callback_add(sd->evas, EVAS_CALLBACK_FOCUS_IN, _elm_win_evas_focus_in, win); } - else if (array[i].desc == EFL_CANVAS_SCENE_EVENT_FOCUS_OUT) + else if (array[i].desc == EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_OUT) { if (!(sd->event_forward.focus_out++)) evas_event_callback_add(sd->evas, EVAS_CALLBACK_FOCUS_OUT, @@ -2301,13 +2301,13 @@ _win_event_del_cb(void *data, const Efl_Event *ev) evas_event_callback_del_full(sd->evas, EVAS_CALLBACK_RENDER_PRE, _elm_win_evas_render_pre, win); } - else if (array[i].desc == EFL_CANVAS_SCENE_EVENT_FOCUS_IN) + else if (array[i].desc == EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_IN) { if (!(--sd->event_forward.focus_in)) evas_event_callback_del_full(sd->evas, EVAS_CALLBACK_FOCUS_IN, _elm_win_evas_focus_in, win); } - else if (array[i].desc == EFL_CANVAS_SCENE_EVENT_FOCUS_OUT) + else if (array[i].desc == EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_OUT) { if (!(--sd->event_forward.focus_out)) evas_event_callback_del_full(sd->evas, EVAS_CALLBACK_FOCUS_OUT, diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index 13a3306f72..1766aff987 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -1,4 +1,4 @@ -enum Efl.Ui.Win_Type +enum @beta Efl.Ui.Win_Type { [[Defines the types of window that can be created @@ -46,7 +46,7 @@ enum Efl.Ui.Win_Type ]] } -enum Efl.Ui.Win_Keyboard_Mode +enum @beta Efl.Ui.Win_Keyboard_Mode { [[The different layouts that can be requested for the virtual keyboard. @@ -87,7 +87,7 @@ enum Efl.Ui.Win_Indicator_Mode If user flicks the upper side of window, the indicator is shown temporarily.]] } -enum Efl.Ui.Win_Modal_Mode +enum @beta Efl.Ui.Win_Modal_Mode { [[Defines the mode of a modal window]] @@ -95,7 +95,7 @@ enum Efl.Ui.Win_Modal_Mode modal [[The window is modal window.]] } -enum Efl.Ui.Win_Urgent_Mode +enum @beta Efl.Ui.Win_Urgent_Mode { [[Defines the mode of a urgent window.]] @@ -133,7 +133,7 @@ enum Efl.Ui.Win_Move_Resize_Mode right = (1 << 4) [[Start resizing window to the right]] } -class @beta Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.Window, +class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.Window, Efl.Access.Component, Efl.Access.Widget.Action, Efl.Content, Efl.Input.State, Efl.Input.Interface, Efl.Screen, Efl.Text, Efl.Config, diff --git a/src/lib/elementary/elc_ctxpopup.c b/src/lib/elementary/elc_ctxpopup.c index 926c80e563..ac5a91905a 100644 --- a/src/lib/elementary/elc_ctxpopup.c +++ b/src/lib/elementary/elc_ctxpopup.c @@ -1101,13 +1101,6 @@ _elm_ctxpopup_efl_canvas_group_group_del(Eo *obj, Elm_Ctxpopup_Data *sd) efl_canvas_group_del(efl_super(obj, MY_CLASS)); } -EOLIAN static void -_elm_ctxpopup_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Ctxpopup_Data *_pd EINA_UNUSED, Evas_Object *parent) -{ - //default parent is to be hover parent - elm_ctxpopup_hover_parent_set(obj, parent); -} - EAPI Evas_Object * elm_ctxpopup_add(Evas_Object *parent) { @@ -1129,7 +1122,8 @@ _elm_ctxpopup_efl_object_constructor(Eo *obj, Elm_Ctxpopup_Data *_pd EINA_UNUSED 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_POPUP_MENU); - + //default parent is to be hover parent + elm_ctxpopup_hover_parent_set(obj, efl_parent_get(obj)); return obj; } diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c index 5f5a49c760..18615b90b8 100644 --- a/src/lib/elementary/elc_fileselector.c +++ b/src/lib/elementary/elc_fileselector.c @@ -1214,7 +1214,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_SELECTED, it_data->model, it_data->path); + (data, EFL_UI_EVENT_SELECTABLE_SELECTED, it_data->model, it_data->path); } else if (sd->multi && it_data->is_dir && sd->double_tap_navigation) { @@ -1466,7 +1466,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_SELECTED, model, str); + _model_event_call(fs, EFL_UI_EVENT_SELECTABLE_SELECTED, model, str); end: _text_activated_free_fs_data(fs); @@ -1606,9 +1606,9 @@ _files_list_add(Evas_Object *obj) efl_ui_mirrored_automatic_set(li, EINA_FALSE); efl_event_callback_add - (li, EFL_UI_EVENT_SELECTED, _on_item_selected, obj); + (li, EFL_UI_EVENT_SELECTABLE_SELECTED, _on_item_selected, obj); efl_event_callback_add - (li, EFL_UI_EVENT_UNSELECTED, _on_item_unselected, obj); + (li, EFL_UI_EVENT_SELECTABLE_UNSELECTED, _on_item_unselected, obj); efl_event_callback_add (li, ELM_GENLIST_EVENT_ACTIVATED, _on_item_activated, obj); efl_event_callback_add @@ -1643,9 +1643,9 @@ _files_grid_add(Evas_Object *obj) elm_gengrid_align_set(grid, 0.0, 0.0); efl_event_callback_add - (grid, EFL_UI_EVENT_SELECTED, _on_item_selected, obj); + (grid, EFL_UI_EVENT_SELECTABLE_SELECTED, _on_item_selected, obj); efl_event_callback_add - (grid, EFL_UI_EVENT_UNSELECTED, _on_item_unselected, obj); + (grid, EFL_UI_EVENT_SELECTABLE_UNSELECTED, _on_item_unselected, obj); efl_event_callback_add (grid, ELM_GENGRID_EVENT_ACTIVATED, _on_item_activated, obj); efl_event_callback_add @@ -1994,7 +1994,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_SELECTED; + evt_desc = EFL_UI_EVENT_SELECTABLE_SELECTED; else if (strcmp(desc->name, "activated") == 0) evt_desc = ELM_FILESELECTOR_EVENT_ACTIVATED; else if (strcmp(desc->name, "directory,open") == 0) @@ -2009,7 +2009,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_SELECTED || + if (desc == EFL_UI_EVENT_SELECTABLE_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_entry.c b/src/lib/elementary/elc_fileselector_entry.c index 2df184ea4a..c5c6edf48b 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_SELECTION_PASTE) -SIG_FWD(SELECTION_COPY, EFL_UI_EVENT_SELECTION_COPY) -SIG_FWD(SELECTION_CUT, EFL_UI_EVENT_SELECTION_CUT) +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(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_SELECTION_PASTE); - SIG_FWD(SELECTION_COPY, EFL_UI_EVENT_SELECTION_COPY); - SIG_FWD(SELECTION_CUT, EFL_UI_EVENT_SELECTION_CUT); + 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); #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 1314ffb1ef..0e45d16a85 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_SELECTED, eo_it); + efl_event_callback_legacy_call(obj2, EFL_UI_EVENT_SELECTABLE_SELECTED, eo_it); evas_object_event_callback_add(sd->hover, EVAS_CALLBACK_DEL, _auto_update, item); @@ -682,12 +682,6 @@ _elm_hoversel_efl_gfx_entity_visible_set(Eo *obj, Elm_Hoversel_Data *sd, Eina_Bo efl_gfx_entity_visible_set(sd->hover, vis); } -EOLIAN static void -_elm_hoversel_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Hoversel_Data *_pd EINA_UNUSED, Evas_Object *parent) -{ - elm_hoversel_hover_parent_set(obj, parent); -} - EOLIAN static Eina_Bool _elm_hoversel_efl_ui_autorepeat_autorepeat_supported_get(const Eo *obj EINA_UNUSED, Elm_Hoversel_Data *sd EINA_UNUSED) { @@ -709,6 +703,7 @@ _elm_hoversel_efl_object_constructor(Eo *obj, Elm_Hoversel_Data *_pd EINA_UNUSED evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); efl_access_object_role_set(obj, EFL_ACCESS_ROLE_PUSH_BUTTON); legacy_object_focus_handle(obj); + elm_hoversel_hover_parent_set(obj, efl_parent_get(obj)); return obj; } diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c index 7c011b740a..a967661e61 100644 --- a/src/lib/elementary/elc_popup.c +++ b/src/lib/elementary/elc_popup.c @@ -1496,10 +1496,11 @@ _parent_geom_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_i evas_object_resize(popup, w, h); } -EOLIAN static void -_elm_popup_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Popup_Data *sd, Evas_Object *parent) +static void +_parent_setup(Eo *obj, Elm_Popup_Data *sd, Evas_Object *parent) { Evas_Coord x, y, w, h; + evas_object_geometry_get(parent, &x, &y, &w, &h); if (efl_isa(parent, EFL_UI_WIN_CLASS)) @@ -1541,6 +1542,7 @@ _elm_popup_efl_object_constructor(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED) evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); efl_access_object_role_set(obj, EFL_ACCESS_ROLE_DIALOG); legacy_object_focus_handle(obj); + _parent_setup(obj, _pd, efl_parent_get(obj)); return obj; } diff --git a/src/lib/elementary/elm_actionslider.c b/src/lib/elementary/elm_actionslider.c index f83bdca156..852a817a06 100644 --- a/src/lib/elementary/elm_actionslider.c +++ b/src/lib/elementary/elm_actionslider.c @@ -240,15 +240,15 @@ _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_SELECTED, (char *)left); + (obj, EFL_UI_EVENT_SELECTABLE_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_SELECTED, (char *)center); + (obj, EFL_UI_EVENT_SELECTABLE_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_SELECTED, (char *)right); + (obj, EFL_UI_EVENT_SELECTABLE_SELECTED, (char *)right); sd->button_animator = NULL; @@ -286,7 +286,7 @@ _drag_button_up_cb(void *data, { sd->final_position = 0; efl_event_callback_legacy_call - (obj, EFL_UI_EVENT_SELECTED, (char *)left); + (obj, EFL_UI_EVENT_SELECTABLE_SELECTED, (char *)left); return; } @@ -296,7 +296,7 @@ _drag_button_up_cb(void *data, { sd->final_position = 0.5; efl_event_callback_legacy_call - (obj, EFL_UI_EVENT_SELECTED, (char *)center); + (obj, EFL_UI_EVENT_SELECTABLE_SELECTED, (char *)center); ecore_animator_del(sd->button_animator); sd->button_animator = ecore_evas_animator_add(obj, _button_animator, obj); @@ -310,7 +310,7 @@ _drag_button_up_cb(void *data, { sd->final_position = 1; efl_event_callback_legacy_call - (obj, EFL_UI_EVENT_SELECTED, (char *)right); + (obj, EFL_UI_EVENT_SELECTABLE_SELECTED, (char *)right); return; } diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index 53e79cc3fa..d9f271f3dd 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -164,7 +164,7 @@ static const Elm_Atspi_Bridge_Event_Handler event_handlers[] = { { EFL_ACCESS_WINDOW_EVENT_WINDOW_MAXIMIZED, _window_signal_send}, { EFL_ACCESS_WINDOW_EVENT_WINDOW_MINIMIZED, _window_signal_send}, { EFL_ACCESS_WINDOW_EVENT_WINDOW_RESTORED, _window_signal_send}, - { EFL_ACCESS_SELECTION_EVENT_SELECTION_CHANGED, _selection_signal_send}, + { EFL_ACCESS_SELECTION_EVENT_ACCESS_SELECTION_CHANGED, _selection_signal_send}, { EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, _text_caret_moved_send }, { EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_INSERTED, _text_text_inserted_send }, { EFL_ACCESS_TEXT_EVENT_ACCESS_TEXT_REMOVED, _text_text_removed_send }, diff --git a/src/lib/elementary/elm_box_eo.c b/src/lib/elementary/elm_box_eo.c index b99a6d1caa..397d7f49a7 100644 --- a/src/lib/elementary/elm_box_eo.c +++ b/src/lib/elementary/elm_box_eo.c @@ -27,7 +27,7 @@ Eina_Bool _elm_box_homogeneous_get(const Eo *obj, Elm_Box_Data *pd); static Eina_Value -__eolian_elm_box_homogeneous_get_reflect(Eo *obj) +__eolian_elm_box_homogeneous_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_box_homogeneous_get(obj); return eina_value_bool_init(val); @@ -67,7 +67,7 @@ Eina_Bool _elm_box_horizontal_get(const Eo *obj, Elm_Box_Data *pd); static Eina_Value -__eolian_elm_box_horizontal_get_reflect(Eo *obj) +__eolian_elm_box_horizontal_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_box_horizontal_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_calendar_eo.c b/src/lib/elementary/elm_calendar_eo.c index ec10664558..2bb920f78f 100644 --- a/src/lib/elementary/elm_calendar_eo.c +++ b/src/lib/elementary/elm_calendar_eo.c @@ -43,7 +43,7 @@ double _elm_calendar_interval_get(const Eo *obj, Elm_Calendar_Data *pd); static Eina_Value -__eolian_elm_calendar_interval_get_reflect(Eo *obj) +__eolian_elm_calendar_interval_get_reflect(const Eo *obj) { double val = elm_obj_calendar_interval_get(obj); return eina_value_double_init(val); diff --git a/src/lib/elementary/elm_calendar_item_eo.c b/src/lib/elementary/elm_calendar_item_eo.c index f16163aaf5..8c98817768 100644 --- a/src/lib/elementary/elm_calendar_item_eo.c +++ b/src/lib/elementary/elm_calendar_item_eo.c @@ -23,7 +23,7 @@ int _elm_calendar_item_day_number_get(const Eo *obj, Elm_Calendar_Item_Data *pd) static Eina_Value -__eolian_elm_calendar_item_day_number_get_reflect(Eo *obj) +__eolian_elm_calendar_item_day_number_get_reflect(const Eo *obj) { int val = elm_calendar_item_day_number_get(obj); return eina_value_int_init(val); diff --git a/src/lib/elementary/elm_clock_eo.c b/src/lib/elementary/elm_clock_eo.c index e30f3e650d..b5bfc9f099 100644 --- a/src/lib/elementary/elm_clock_eo.c +++ b/src/lib/elementary/elm_clock_eo.c @@ -25,7 +25,7 @@ Eina_Bool _elm_clock_show_am_pm_get(const Eo *obj, Elm_Clock_Data *pd); static Eina_Value -__eolian_elm_clock_show_am_pm_get_reflect(Eo *obj) +__eolian_elm_clock_show_am_pm_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_clock_show_am_pm_get(obj); return eina_value_bool_init(val); @@ -57,7 +57,7 @@ double _elm_clock_first_interval_get(const Eo *obj, Elm_Clock_Data *pd); static Eina_Value -__eolian_elm_clock_first_interval_get_reflect(Eo *obj) +__eolian_elm_clock_first_interval_get_reflect(const Eo *obj) { double val = elm_obj_clock_first_interval_get(obj); return eina_value_double_init(val); @@ -89,7 +89,7 @@ Eina_Bool _elm_clock_show_seconds_get(const Eo *obj, Elm_Clock_Data *pd); static Eina_Value -__eolian_elm_clock_show_seconds_get_reflect(Eo *obj) +__eolian_elm_clock_show_seconds_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_clock_show_seconds_get(obj); return eina_value_bool_init(val); @@ -121,7 +121,7 @@ Eina_Bool _elm_clock_edit_get(const Eo *obj, Elm_Clock_Data *pd); static Eina_Value -__eolian_elm_clock_edit_get_reflect(Eo *obj) +__eolian_elm_clock_edit_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_clock_edit_get(obj); return eina_value_bool_init(val); @@ -153,7 +153,7 @@ Eina_Bool _elm_clock_pause_get(const Eo *obj, Elm_Clock_Data *pd); static Eina_Value -__eolian_elm_clock_pause_get_reflect(Eo *obj) +__eolian_elm_clock_pause_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_clock_pause_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_cnp.h b/src/lib/elementary/elm_cnp.h index 12fd39a1a3..5feda3acc0 100644 --- a/src/lib/elementary/elm_cnp.h +++ b/src/lib/elementary/elm_cnp.h @@ -57,41 +57,49 @@ EAPI extern int ELM_CNP_EVENT_SELECTION_CHANGED; * @see http://www.x.org/docs/X11/xlib.pdf * for more details. */ -typedef Efl_Ui_Selection_Type Elm_Sel_Type; -#define ELM_SEL_TYPE_PRIMARY EFL_UI_SELECTION_TYPE_PRIMARY -#define ELM_SEL_TYPE_SECONDARY EFL_UI_SELECTION_TYPE_SECONDARY -#define ELM_SEL_TYPE_XDND EFL_UI_SELECTION_TYPE_DND -#define ELM_SEL_TYPE_CLIPBOARD EFL_UI_SELECTION_TYPE_CLIPBOARD +typedef enum +{ + ELM_SEL_TYPE_PRIMARY = 0, /**< Primary text selection (highlighted or + * selected text) */ + ELM_SEL_TYPE_SECONDARY, /**< Used when primary selection is in use */ + ELM_SEL_TYPE_XDND, /**< Drag and Drop */ + ELM_SEL_TYPE_CLIPBOARD /**< Clipboard selection (ctrl+C) */ +} Elm_Sel_Type; /** * Defines the types of content. */ -typedef Efl_Ui_Selection_Format Elm_Sel_Format; - -#define ELM_SEL_FORMAT_TARGETS EFL_UI_SELECTION_FORMAT_TARGETS -#define ELM_SEL_FORMAT_NONE EFL_UI_SELECTION_FORMAT_NONE -#define ELM_SEL_FORMAT_TEXT EFL_UI_SELECTION_FORMAT_TEXT -#define ELM_SEL_FORMAT_MARKUP EFL_UI_SELECTION_FORMAT_MARKUP -#define ELM_SEL_FORMAT_IMAGE EFL_UI_SELECTION_FORMAT_IMAGE -#define ELM_SEL_FORMAT_VCARD EFL_UI_SELECTION_FORMAT_VCARD -#define ELM_SEL_FORMAT_HTML EFL_UI_SELECTION_FORMAT_HTML +typedef enum +{ + ELM_SEL_FORMAT_TARGETS = -1 /* +1 */, /**< For matching every + * possible atom */ + ELM_SEL_FORMAT_NONE = 0, /**< Content is from outside of Elementary + */ + ELM_SEL_FORMAT_TEXT = 1, /**< Plain unformatted text: Used for things + * that don't want rich markup */ + ELM_SEL_FORMAT_MARKUP = 2, /**< Edje textblock markup, including + * inline images */ + ELM_SEL_FORMAT_IMAGE = 4, /**< Images */ + ELM_SEL_FORMAT_VCARD = 8, /**< Vcards */ + ELM_SEL_FORMAT_HTML = 16 /**< Raw HTML-like data (eg. webkit) */ +} Elm_Sel_Format; /** * Defines the kind of action associated with the drop data if for XDND * @since 1.8 */ -typedef Efl_Ui_Selection_Action Elm_Xdnd_Action; - -#define ELM_XDND_ACTION_UNKNOWN EFL_UI_SELECTION_ACTION_UNKNOWN -#define ELM_XDND_ACTION_COPY EFL_UI_SELECTION_ACTION_COPY -#define ELM_XDND_ACTION_MOVE EFL_UI_SELECTION_ACTION_MOVE -#define ELM_XDND_ACTION_PRIVATE EFL_UI_SELECTION_ACTION_PRIVATE -#define ELM_XDND_ACTION_ASK EFL_UI_SELECTION_ACTION_ASK -#define ELM_XDND_ACTION_LIST EFL_UI_SELECTION_ACTION_LIST -#define ELM_XDND_ACTION_LINK EFL_UI_SELECTION_ACTION_LINK -#define ELM_XDND_ACTION_DESCRIPTION EFL_UI_SELECTION_ACTION_DESCRIPTION - +typedef enum +{ + ELM_XDND_ACTION_UNKNOWN = 0, /**< Action type is unknown */ + ELM_XDND_ACTION_COPY, /**< Copy the data */ + ELM_XDND_ACTION_MOVE, /**< Move the data */ + ELM_XDND_ACTION_PRIVATE, /**< Private action type */ + ELM_XDND_ACTION_ASK, /**< Ask the user what to do */ + ELM_XDND_ACTION_LIST, /**< List the data */ + ELM_XDND_ACTION_LINK, /**< Link the data */ + ELM_XDND_ACTION_DESCRIPTION /**< Describe the data */ +} Elm_Xdnd_Action; /** * Structure holding the info about selected data. */ diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c index 4456eb48f7..0720a5253b 100644 --- a/src/lib/elementary/elm_code_widget.c +++ b/src/lib/elementary/elm_code_widget.c @@ -2429,8 +2429,8 @@ _elm_code_widget_efl_canvas_group_group_add(Eo *obj, Elm_Code_Widget_Data *pd) efl_event_callback_add(obj, &ELM_CODE_EVENT_LINE_LOAD_DONE, _elm_code_widget_line_cb, obj); efl_event_callback_add(obj, &ELM_CODE_EVENT_FILE_LOAD_DONE, _elm_code_widget_file_cb, obj); - efl_event_callback_add(obj, EFL_UI_CODE_WIDGET_EVENT_SELECTION_CHANGED, _elm_code_widget_selection_cb, obj); - efl_event_callback_add(obj, EFL_UI_CODE_WIDGET_EVENT_SELECTION_CLEARED, _elm_code_widget_selection_clear_cb, obj); + efl_event_callback_add(obj, EFL_UI_CODE_WIDGET_EVENT_CODE_SELECTION_CHANGED, _elm_code_widget_selection_cb, obj); + efl_event_callback_add(obj, EFL_UI_CODE_WIDGET_EVENT_CODE_SELECTION_CLEARED, _elm_code_widget_selection_clear_cb, obj); } /* Internal EO APIs and hidden overrides */ diff --git a/src/lib/elementary/elm_code_widget.eo b/src/lib/elementary/elm_code_widget.eo index c43adfd52b..5258621f5e 100644 --- a/src/lib/elementary/elm_code_widget.eo +++ b/src/lib/elementary/elm_code_widget.eo @@ -1,5 +1,5 @@ /* FIXME: this widget should just implement a scroller */ -enum Elm.Code_Widget_Scroller_Policy +enum @beta Elm.Code_Widget_Scroller_Policy { [[Type that controls when scrollbars should appear. @@ -334,11 +334,11 @@ class Elm.Code_Widget extends Efl.Ui.Layout_Base changed,user: void; [[Called when object changed due to user interaction]] /* FIXME: All events below send the obj in the event_info, which is redundant */ cursor,changed: Elm.Code_Widget; [[Called when cursor changed]] - selection,start: Elm.Code_Widget; [[Called when a selection is started]] - selection,changed: Elm.Code_Widget; [[Called when selection changed]] - selection,cleared: Elm.Code_Widget; [[Called when selection was cleared]] - selection,cut: Elm.Code_Widget; [[Called when a cut action is performed]] - selection,copy: Elm.Code_Widget; [[Called when a copy action is performed]] - selection,paste: Elm.Code_Widget; [[Called when a paste action is performed]] + code,selection,start: Elm.Code_Widget; [[Called when a selection is started]] + code,selection,changed: Elm.Code_Widget; [[Called when selection changed]] + code,selection,cleared: Elm.Code_Widget; [[Called when selection was cleared]] + code,selection,cut: Elm.Code_Widget; [[Called when a cut action is performed]] + code,selection,copy: Elm.Code_Widget; [[Called when a copy action is performed]] + code,selection,paste: Elm.Code_Widget; [[Called when a paste action is performed]] } } diff --git a/src/lib/elementary/elm_code_widget_selection.c b/src/lib/elementary/elm_code_widget_selection.c index 7ee3964a21..674f466c33 100644 --- a/src/lib/elementary/elm_code_widget_selection.c +++ b/src/lib/elementary/elm_code_widget_selection.c @@ -62,7 +62,7 @@ elm_code_widget_selection_start(Evas_Object *widget, pd->selection->start_line = line; pd->selection->start_col = col; - efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_SELECTION_START, widget); + efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_CODE_SELECTION_START, widget); } EAPI void @@ -90,7 +90,7 @@ elm_code_widget_selection_end(Evas_Object *widget, pd->selection->end_line = line; pd->selection->end_col = col; - efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_SELECTION_CHANGED, widget); + efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_CODE_SELECTION_CHANGED, widget); } EAPI void @@ -110,7 +110,7 @@ elm_code_widget_selection_select_all(Evas_Object *widget) elm_code_widget_selection_end(widget, maxrow, last_col); - efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_SELECTION_CHANGED, widget); + efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_CODE_SELECTION_CHANGED, widget); } EAPI Elm_Code_Widget_Selection_Data * @@ -166,7 +166,7 @@ elm_code_widget_selection_clear(Evas_Object *widget) free(pd->selection); pd->selection = NULL; - efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_SELECTION_CLEARED, widget); + efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_CODE_SELECTION_CLEARED, widget); } static void @@ -292,7 +292,7 @@ _elm_code_widget_selection_delete_do(Evas_Object *widget, Eina_Bool undo) pd->selection = NULL; free(selection); - efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_SELECTION_CLEARED, widget); + efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_CODE_SELECTION_CLEARED, widget); elm_code_widget_cursor_position_set(widget, row, col); } @@ -425,7 +425,7 @@ elm_code_widget_selection_cut(Evas_Object *widget) elm_code_widget_selection_delete(widget); - efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_SELECTION_CUT, widget); + efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_CODE_SELECTION_CUT, widget); efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_CHANGED_USER, NULL); } @@ -442,7 +442,7 @@ elm_code_widget_selection_copy(Evas_Object *widget) elm_cnp_selection_loss_callback_set(widget, ELM_SEL_TYPE_CLIPBOARD, _selection_loss_cb, widget); free(text); - efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_SELECTION_COPY, widget); + efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_CODE_SELECTION_COPY, widget); } static Eina_Bool @@ -454,7 +454,7 @@ _selection_paste_cb(void *data, Evas_Object *obj EINA_UNUSED, Elm_Selection_Data elm_code_widget_text_at_cursor_insert(widget, ev->data); - efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_SELECTION_PASTE, widget); + efl_event_callback_legacy_call(widget, EFL_UI_CODE_WIDGET_EVENT_CODE_SELECTION_PASTE, widget); return EINA_TRUE; } diff --git a/src/lib/elementary/elm_color_class.c b/src/lib/elementary/elm_color_class.c index 6c87d6f6f2..9227794cf0 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_SELECTED, _colorclass_activate, cc); + (gl, EFL_UI_EVENT_SELECTABLE_SELECTED, _colorclass_activate, cc); cc->reset = bt = elm_button_add(ly); elm_object_style_set(bt, "colorclass"); diff --git a/src/lib/elementary/elm_color_item_eo.c b/src/lib/elementary/elm_color_item_eo.c index 64c6bf6763..f0657c5f58 100644 --- a/src/lib/elementary/elm_color_item_eo.c +++ b/src/lib/elementary/elm_color_item_eo.c @@ -31,7 +31,7 @@ Eina_Bool _elm_color_item_selected_get(const Eo *obj, Elm_Color_Item_Data *pd); static Eina_Value -__eolian_elm_color_item_selected_get_reflect(Eo *obj) +__eolian_elm_color_item_selected_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_color_item_selected_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_colorselector_eo.c b/src/lib/elementary/elm_colorselector_eo.c index 2fd6bbd1a8..aba3685bd4 100644 --- a/src/lib/elementary/elm_colorselector_eo.c +++ b/src/lib/elementary/elm_colorselector_eo.c @@ -39,7 +39,7 @@ const char *_elm_colorselector_palette_name_get(const Eo *obj, Elm_Colorselector static Eina_Value -__eolian_elm_colorselector_palette_name_get_reflect(Eo *obj) +__eolian_elm_colorselector_palette_name_get_reflect(const Eo *obj) { const char *val = elm_obj_colorselector_palette_name_get(obj); return eina_value_string_init(val); diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c index 12208dd2b9..a6d943e356 100644 --- a/src/lib/elementary/elm_config.c +++ b/src/lib/elementary/elm_config.c @@ -4897,7 +4897,7 @@ static const struct { const char *str; } _enum_map_focus_move_policy[] = { { EFL_UI_FOCUS_MOVE_POLICY_CLICK, "click" }, -{ EFL_UI_FOCUS_MOVE_POLICY_IN, "in" }, +{ EFL_UI_FOCUS_MOVE_POLICY_MOVE_IN, "in" }, { EFL_UI_FOCUS_MOVE_POLICY_KEY_ONLY, "key_only" } }; diff --git a/src/lib/elementary/elm_conform.c b/src/lib/elementary/elm_conform.c index a3c87cd5fa..3f3549f1dc 100644 --- a/src/lib/elementary/elm_conform.c +++ b/src/lib/elementary/elm_conform.c @@ -965,9 +965,19 @@ _elm_conformant_efl_canvas_group_group_del(Eo *obj, Elm_Conformant_Data *sd) efl_canvas_group_del(efl_super(obj, MY_CLASS)); } -EOLIAN static void -_elm_conformant_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Conformant_Data *sd, Evas_Object *parent) +EAPI Evas_Object * +elm_conformant_add(Evas_Object *parent) { + EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); + return elm_legacy_add(MY_CLASS, parent); +} + +EOLIAN static Eo * +_elm_conformant_efl_object_constructor(Eo *obj, Elm_Conformant_Data *sd) +{ + Eo *parent; + obj = efl_constructor(efl_super(obj, MY_CLASS)); + parent = efl_parent_get(obj); #ifdef HAVE_ELEMENTARY_X Evas_Object *top = elm_widget_top_get(parent); Ecore_X_Window xwin = elm_win_xwindow_get(parent); @@ -986,18 +996,7 @@ _elm_conformant_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Conformant_Data *sd (void)sd; (void)parent; #endif -} -EAPI Evas_Object * -elm_conformant_add(Evas_Object *parent) -{ - EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); - return elm_legacy_add(MY_CLASS, parent); -} - -EOLIAN static Eo * -_elm_conformant_efl_object_constructor(Eo *obj, Elm_Conformant_Data *sd) -{ 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); diff --git a/src/lib/elementary/elm_conformant_eo.c b/src/lib/elementary/elm_conformant_eo.c index 188cc208ac..379426c52f 100644 --- a/src/lib/elementary/elm_conformant_eo.c +++ b/src/lib/elementary/elm_conformant_eo.c @@ -10,9 +10,6 @@ EWAPI const Efl_Event_Description _ELM_CONFORMANT_EVENT_CLIPBOARD_STATE_OFF = Efl_Object *_elm_conformant_efl_object_constructor(Eo *obj, Elm_Conformant_Data *pd); -void _elm_conformant_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Conformant_Data *pd, Efl_Ui_Widget *parent); - - Eina_Error _elm_conformant_efl_ui_widget_theme_apply(Eo *obj, Elm_Conformant_Data *pd); @@ -29,7 +26,6 @@ _elm_conformant_class_initializer(Efl_Class *klass) EFL_OPS_DEFINE(ops, EFL_OBJECT_OP_FUNC(efl_constructor, _elm_conformant_efl_object_constructor), - EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_set, _elm_conformant_efl_ui_widget_widget_parent_set), EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_conformant_efl_ui_widget_theme_apply), ELM_CONFORMANT_EXTRA_OPS ); diff --git a/src/lib/elementary/elm_ctxpopup_eo.c b/src/lib/elementary/elm_ctxpopup_eo.c index a3cd0e7105..ebd83c53fb 100644 --- a/src/lib/elementary/elm_ctxpopup_eo.c +++ b/src/lib/elementary/elm_ctxpopup_eo.c @@ -43,7 +43,7 @@ Eina_Bool _elm_ctxpopup_horizontal_get(const Eo *obj, Elm_Ctxpopup_Data *pd); static Eina_Value -__eolian_elm_ctxpopup_horizontal_get_reflect(Eo *obj) +__eolian_elm_ctxpopup_horizontal_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_ctxpopup_horizontal_get(obj); return eina_value_bool_init(val); @@ -75,7 +75,7 @@ Eina_Bool _elm_ctxpopup_auto_hide_disabled_get(const Eo *obj, Elm_Ctxpopup_Data static Eina_Value -__eolian_elm_ctxpopup_auto_hide_disabled_get_reflect(Eo *obj) +__eolian_elm_ctxpopup_auto_hide_disabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_ctxpopup_auto_hide_disabled_get(obj); return eina_value_bool_init(val); @@ -130,9 +130,6 @@ EOAPI EFL_FUNC_BODYV(elm_obj_ctxpopup_item_prepend, Elm_Widget_Item *, NULL, EFL Efl_Object *_elm_ctxpopup_efl_object_constructor(Eo *obj, Elm_Ctxpopup_Data *pd); -void _elm_ctxpopup_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Ctxpopup_Data *pd, Efl_Ui_Widget *parent); - - Eina_Bool _elm_ctxpopup_efl_ui_widget_widget_sub_object_add(Eo *obj, Elm_Ctxpopup_Data *pd, Efl_Canvas_Object *sub_obj); @@ -189,7 +186,6 @@ _elm_ctxpopup_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(elm_obj_ctxpopup_item_append, _elm_ctxpopup_item_append), EFL_OBJECT_OP_FUNC(elm_obj_ctxpopup_item_prepend, _elm_ctxpopup_item_prepend), EFL_OBJECT_OP_FUNC(efl_constructor, _elm_ctxpopup_efl_object_constructor), - EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_set, _elm_ctxpopup_efl_ui_widget_widget_parent_set), EFL_OBJECT_OP_FUNC(efl_ui_widget_sub_object_add, _elm_ctxpopup_efl_ui_widget_widget_sub_object_add), EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_ctxpopup_efl_ui_l10n_translation_update), EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_ctxpopup_efl_ui_widget_theme_apply), diff --git a/src/lib/elementary/elm_ctxpopup_item_eo.c b/src/lib/elementary/elm_ctxpopup_item_eo.c index 02b8c16bbd..837c69bbf6 100644 --- a/src/lib/elementary/elm_ctxpopup_item_eo.c +++ b/src/lib/elementary/elm_ctxpopup_item_eo.c @@ -31,7 +31,7 @@ Eina_Bool _elm_ctxpopup_item_selected_get(const Eo *obj, Elm_Ctxpopup_Item_Data static Eina_Value -__eolian_elm_ctxpopup_item_selected_get_reflect(Eo *obj) +__eolian_elm_ctxpopup_item_selected_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_ctxpopup_item_selected_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_dayselector_eo.c b/src/lib/elementary/elm_dayselector_eo.c index a05052e3d5..83b478502f 100644 --- a/src/lib/elementary/elm_dayselector_eo.c +++ b/src/lib/elementary/elm_dayselector_eo.c @@ -31,7 +31,7 @@ unsigned int _elm_dayselector_weekend_length_get(const Eo *obj, Elm_Dayselector_ static Eina_Value -__eolian_elm_dayselector_weekend_length_get_reflect(Eo *obj) +__eolian_elm_dayselector_weekend_length_get_reflect(const Eo *obj) { unsigned int val = elm_obj_dayselector_weekend_length_get(obj); return eina_value_uint_init(val); diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c index 373b398dc2..d8ebb9018d 100644 --- a/src/lib/elementary/elm_diskselector.c +++ b/src/lib/elementary/elm_diskselector.c @@ -92,7 +92,7 @@ _item_select(Elm_Diskselector_Item_Data *it) 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_SELECTED, eo_it); + (WIDGET(it), EFL_UI_EVENT_SELECTABLE_SELECTED, eo_it); } static int diff --git a/src/lib/elementary/elm_diskselector_eo.c b/src/lib/elementary/elm_diskselector_eo.c index a016e724c3..b44f2a0f9f 100644 --- a/src/lib/elementary/elm_diskselector_eo.c +++ b/src/lib/elementary/elm_diskselector_eo.c @@ -23,7 +23,7 @@ int _elm_diskselector_side_text_max_length_get(const Eo *obj, Elm_Diskselector_D static Eina_Value -__eolian_elm_diskselector_side_text_max_length_get_reflect(Eo *obj) +__eolian_elm_diskselector_side_text_max_length_get_reflect(const Eo *obj) { int val = elm_obj_diskselector_side_text_max_length_get(obj); return eina_value_int_init(val); @@ -55,7 +55,7 @@ Eina_Bool _elm_diskselector_round_enabled_get(const Eo *obj, Elm_Diskselector_Da static Eina_Value -__eolian_elm_diskselector_round_enabled_get_reflect(Eo *obj) +__eolian_elm_diskselector_round_enabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_diskselector_round_enabled_get(obj); return eina_value_bool_init(val); @@ -87,7 +87,7 @@ int _elm_diskselector_display_item_num_get(const Eo *obj, Elm_Diskselector_Data static Eina_Value -__eolian_elm_diskselector_display_item_num_get_reflect(Eo *obj) +__eolian_elm_diskselector_display_item_num_get_reflect(const Eo *obj) { int val = elm_obj_diskselector_display_item_num_get(obj); return eina_value_int_init(val); diff --git a/src/lib/elementary/elm_diskselector_item_eo.c b/src/lib/elementary/elm_diskselector_item_eo.c index 806113c4c9..7b58d2c15e 100644 --- a/src/lib/elementary/elm_diskselector_item_eo.c +++ b/src/lib/elementary/elm_diskselector_item_eo.c @@ -31,7 +31,7 @@ Eina_Bool _elm_diskselector_item_selected_get(const Eo *obj, Elm_Diskselector_It static Eina_Value -__eolian_elm_diskselector_item_selected_get_reflect(Eo *obj) +__eolian_elm_diskselector_item_selected_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_diskselector_item_selected_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index 0334881fbf..7b41a72017 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -1567,7 +1567,7 @@ _paste_cb(void *data, if (!sd) return; efl_event_callback_legacy_call - (data, EFL_UI_EVENT_SELECTION_PASTE, NULL); + (data, EFL_UI_EVENT_SELECTABLE_PASTE, NULL); sd->selection_asked = EINA_TRUE; @@ -1622,7 +1622,7 @@ _cut_cb(void *data, if (!sd) return; efl_event_callback_legacy_call - (data, EFL_UI_EVENT_SELECTION_CUT, NULL); + (data, EFL_UI_EVENT_SELECTABLE_CUT, NULL); /* Store it */ sd->sel_mode = EINA_FALSE; if (!_elm_config->desktop_entry) @@ -1646,7 +1646,7 @@ _copy_cb(void *data, if (!sd) return; efl_event_callback_legacy_call - (data, EFL_UI_EVENT_SELECTION_COPY, NULL); + (data, EFL_UI_EVENT_SELECTABLE_COPY, NULL); sd->sel_mode = EINA_FALSE; if (!_elm_config->desktop_entry) { @@ -2317,7 +2317,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_SELECTION_START, NULL); + (data, EFL_UI_EVENT_SELECTABLE_START, NULL); elm_object_focus_set(data, EINA_TRUE); } @@ -2361,7 +2361,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_SELECTION_CHANGED, NULL); + (data, EFL_UI_EVENT_SELECTABLE_CHANGED, NULL); // XXX: still try primary selection even if on wl in case it's // supported // if (!_entry_win_is_wl(data)) @@ -2384,7 +2384,7 @@ _entry_selection_cleared_signal_cb(void *data, sd->have_selection = EINA_FALSE; efl_event_callback_legacy_call - (data, EFL_UI_EVENT_SELECTION_CLEARED, NULL); + (data, EFL_UI_EVENT_SELECTABLE_CLEARED, NULL); // XXX: still try primary selection even if on wl in case it's // supported // if (!_entry_win_is_wl(data)) @@ -2425,7 +2425,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_SELECTION_PASTE, NULL); + (data, EFL_UI_EVENT_SELECTABLE_PASTE, NULL); top = _entry_win_get(data); if (top) @@ -4412,7 +4412,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_SELECTION_CLEARED, NULL); + (obj, EFL_UI_EVENT_SELECTABLE_CLEARED, NULL); sd->have_selection = EINA_FALSE; edje_object_part_text_select_none(sd->entry_edje, "elm.text"); diff --git a/src/lib/elementary/elm_entry_eo.c b/src/lib/elementary/elm_entry_eo.c index 6df71f9e0a..196d03a81e 100644 --- a/src/lib/elementary/elm_entry_eo.c +++ b/src/lib/elementary/elm_entry_eo.c @@ -65,7 +65,7 @@ Eina_Bool _elm_entry_scrollable_get(const Eo *obj, Elm_Entry_Data *pd); static Eina_Value -__eolian_elm_entry_scrollable_get_reflect(Eo *obj) +__eolian_elm_entry_scrollable_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_entry_scrollable_get(obj); return eina_value_bool_init(val); @@ -97,7 +97,7 @@ Eina_Bool _elm_entry_input_panel_show_on_demand_get(const Eo *obj, Elm_Entry_Dat static Eina_Value -__eolian_elm_entry_input_panel_show_on_demand_get_reflect(Eo *obj) +__eolian_elm_entry_input_panel_show_on_demand_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_entry_input_panel_show_on_demand_get(obj); return eina_value_bool_init(val); @@ -129,7 +129,7 @@ Eina_Bool _elm_entry_context_menu_disabled_get(const Eo *obj, Elm_Entry_Data *pd static Eina_Value -__eolian_elm_entry_context_menu_disabled_get_reflect(Eo *obj) +__eolian_elm_entry_context_menu_disabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_entry_context_menu_disabled_get(obj); return eina_value_bool_init(val); @@ -181,7 +181,7 @@ Eina_Bool _elm_entry_selection_handler_disabled_get(const Eo *obj, Elm_Entry_Dat static Eina_Value -__eolian_elm_entry_selection_handler_disabled_get_reflect(Eo *obj) +__eolian_elm_entry_selection_handler_disabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_entry_selection_handler_disabled_get(obj); return eina_value_bool_init(val); @@ -213,7 +213,7 @@ int _elm_entry_input_panel_layout_variation_get(const Eo *obj, Elm_Entry_Data *p static Eina_Value -__eolian_elm_entry_input_panel_layout_variation_get_reflect(Eo *obj) +__eolian_elm_entry_input_panel_layout_variation_get_reflect(const Eo *obj) { int val = elm_obj_entry_input_panel_layout_variation_get(obj); return eina_value_int_init(val); @@ -253,7 +253,7 @@ Eina_Bool _elm_entry_editable_get(const Eo *obj, Elm_Entry_Data *pd); static Eina_Value -__eolian_elm_entry_editable_get_reflect(Eo *obj) +__eolian_elm_entry_editable_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_entry_editable_get(obj); return eina_value_bool_init(val); @@ -285,7 +285,7 @@ const char *_elm_entry_anchor_hover_style_get(const Eo *obj, Elm_Entry_Data *pd) static Eina_Value -__eolian_elm_entry_anchor_hover_style_get_reflect(Eo *obj) +__eolian_elm_entry_anchor_hover_style_get_reflect(const Eo *obj) { const char *val = elm_obj_entry_anchor_hover_style_get(obj); return eina_value_string_init(val); @@ -317,7 +317,7 @@ Eina_Bool _elm_entry_single_line_get(const Eo *obj, Elm_Entry_Data *pd); static Eina_Value -__eolian_elm_entry_single_line_get_reflect(Eo *obj) +__eolian_elm_entry_single_line_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_entry_single_line_get(obj); return eina_value_bool_init(val); @@ -349,7 +349,7 @@ Eina_Bool _elm_entry_password_get(const Eo *obj, Elm_Entry_Data *pd); static Eina_Value -__eolian_elm_entry_password_get_reflect(Eo *obj) +__eolian_elm_entry_password_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_entry_password_get(obj); return eina_value_bool_init(val); @@ -381,7 +381,7 @@ Eina_Bool _elm_entry_input_panel_return_key_disabled_get(const Eo *obj, Elm_Entr static Eina_Value -__eolian_elm_entry_input_panel_return_key_disabled_get_reflect(Eo *obj) +__eolian_elm_entry_input_panel_return_key_disabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_entry_input_panel_return_key_disabled_get(obj); return eina_value_bool_init(val); @@ -413,7 +413,7 @@ Eina_Bool _elm_entry_autosave_get(const Eo *obj, Elm_Entry_Data *pd); static Eina_Value -__eolian_elm_entry_autosave_get_reflect(Eo *obj) +__eolian_elm_entry_autosave_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_entry_autosave_get(obj); return eina_value_bool_init(val); @@ -453,7 +453,7 @@ Eina_Bool _elm_entry_prediction_allow_get(const Eo *obj, Elm_Entry_Data *pd); static Eina_Value -__eolian_elm_entry_prediction_allow_get_reflect(Eo *obj) +__eolian_elm_entry_prediction_allow_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_entry_prediction_allow_get(obj); return eina_value_bool_init(val); @@ -509,7 +509,7 @@ Eina_Bool _elm_entry_input_panel_enabled_get(const Eo *obj, Elm_Entry_Data *pd); static Eina_Value -__eolian_elm_entry_input_panel_enabled_get_reflect(Eo *obj) +__eolian_elm_entry_input_panel_enabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_entry_input_panel_enabled_get(obj); return eina_value_bool_init(val); @@ -549,7 +549,7 @@ int _elm_entry_cursor_pos_get(const Eo *obj, Elm_Entry_Data *pd); static Eina_Value -__eolian_elm_entry_cursor_pos_get_reflect(Eo *obj) +__eolian_elm_entry_cursor_pos_get_reflect(const Eo *obj) { int val = elm_obj_entry_cursor_pos_get(obj); return eina_value_int_init(val); @@ -693,7 +693,7 @@ Eina_Bool _elm_entry_select_allow_get(const Eo *obj, Elm_Entry_Data *pd); static Eina_Value -__eolian_elm_entry_select_allow_get_reflect(Eo *obj) +__eolian_elm_entry_select_allow_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_entry_select_allow_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_fileselector_eo.c b/src/lib/elementary/elm_fileselector_eo.c index 36e7484546..fa3e9d6408 100644 --- a/src/lib/elementary/elm_fileselector_eo.c +++ b/src/lib/elementary/elm_fileselector_eo.c @@ -31,7 +31,7 @@ Eina_Bool _elm_fileselector_buttons_ok_cancel_get(const Eo *obj, Elm_Fileselecto static Eina_Value -__eolian_elm_fileselector_buttons_ok_cancel_get_reflect(Eo *obj) +__eolian_elm_fileselector_buttons_ok_cancel_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_fileselector_buttons_ok_cancel_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_flipselector.c b/src/lib/elementary/elm_flipselector.c index 98535b4acd..59109dac8f 100644 --- a/src/lib/elementary/elm_flipselector.c +++ b/src/lib/elementary/elm_flipselector.c @@ -234,7 +234,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_SELECTED, eo_item); + (sd->obj, EFL_UI_EVENT_SELECTABLE_SELECTED, eo_item); } static void diff --git a/src/lib/elementary/elm_flipselector_eo.c b/src/lib/elementary/elm_flipselector_eo.c index 083cc58e4e..f4bdae836b 100644 --- a/src/lib/elementary/elm_flipselector_eo.c +++ b/src/lib/elementary/elm_flipselector_eo.c @@ -43,7 +43,7 @@ double _elm_flipselector_first_interval_get(const Eo *obj, Elm_Flipselector_Data static Eina_Value -__eolian_elm_flipselector_first_interval_get_reflect(Eo *obj) +__eolian_elm_flipselector_first_interval_get_reflect(const Eo *obj) { double val = elm_obj_flipselector_first_interval_get(obj); return eina_value_double_init(val); diff --git a/src/lib/elementary/elm_flipselector_item_eo.c b/src/lib/elementary/elm_flipselector_item_eo.c index a9fb16250b..fc53dcdef4 100644 --- a/src/lib/elementary/elm_flipselector_item_eo.c +++ b/src/lib/elementary/elm_flipselector_item_eo.c @@ -23,7 +23,7 @@ Eina_Bool _elm_flipselector_item_selected_get(const Eo *obj, Elm_Flipselector_It static Eina_Value -__eolian_elm_flipselector_item_selected_get_reflect(Eo *obj) +__eolian_elm_flipselector_item_selected_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_flipselector_item_selected_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index d1851b184a..07ceb89b7b 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -722,7 +722,7 @@ _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_UNSELECTED, eo_it); + (WIDGET(it), EFL_UI_EVENT_SELECTABLE_UNSELECTED, eo_it); if (_elm_config->atspi_mode) efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_TYPE_SELECTED, EINA_FALSE); } @@ -3958,7 +3958,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_SELECTED, eo_it); + efl_event_callback_legacy_call(WIDGET(it), EFL_UI_EVENT_SELECTABLE_SELECTED, eo_it); if (_elm_config->atspi_mode) efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_TYPE_SELECTED, EINA_TRUE); } diff --git a/src/lib/elementary/elm_gengrid_eo.c b/src/lib/elementary/elm_gengrid_eo.c index e22bd63cb3..e87ad58aef 100644 --- a/src/lib/elementary/elm_gengrid_eo.c +++ b/src/lib/elementary/elm_gengrid_eo.c @@ -65,7 +65,7 @@ Eina_Bool _elm_gengrid_filled_get(const Eo *obj, Elm_Gengrid_Data *pd); static Eina_Value -__eolian_elm_gengrid_filled_get_reflect(Eo *obj) +__eolian_elm_gengrid_filled_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_gengrid_filled_get(obj); return eina_value_bool_init(val); @@ -97,7 +97,7 @@ Eina_Bool _elm_gengrid_multi_select_get(const Eo *obj, Elm_Gengrid_Data *pd); static Eina_Value -__eolian_elm_gengrid_multi_select_get_reflect(Eo *obj) +__eolian_elm_gengrid_multi_select_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_gengrid_multi_select_get(obj); return eina_value_bool_init(val); @@ -145,7 +145,7 @@ Eina_Bool _elm_gengrid_reorder_mode_get(const Eo *obj, Elm_Gengrid_Data *pd); static Eina_Value -__eolian_elm_gengrid_reorder_mode_get_reflect(Eo *obj) +__eolian_elm_gengrid_reorder_mode_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_gengrid_reorder_mode_get(obj); return eina_value_bool_init(val); @@ -177,7 +177,7 @@ Eina_Bool _elm_gengrid_highlight_mode_get(const Eo *obj, Elm_Gengrid_Data *pd); static Eina_Value -__eolian_elm_gengrid_highlight_mode_get_reflect(Eo *obj) +__eolian_elm_gengrid_highlight_mode_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_gengrid_highlight_mode_get(obj); return eina_value_bool_init(val); @@ -229,7 +229,7 @@ Eina_Bool _elm_gengrid_horizontal_get(const Eo *obj, Elm_Gengrid_Data *pd); static Eina_Value -__eolian_elm_gengrid_horizontal_get_reflect(Eo *obj) +__eolian_elm_gengrid_horizontal_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_gengrid_horizontal_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_gengrid_item_eo.c b/src/lib/elementary/elm_gengrid_item_eo.c index fec70ea5be..2fc58db983 100644 --- a/src/lib/elementary/elm_gengrid_item_eo.c +++ b/src/lib/elementary/elm_gengrid_item_eo.c @@ -31,7 +31,7 @@ Eina_Bool _elm_gengrid_item_selected_get(const Eo *obj, Elm_Gen_Item *pd); static Eina_Value -__eolian_elm_gengrid_item_selected_get_reflect(Eo *obj) +__eolian_elm_gengrid_item_selected_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_gengrid_item_selected_get(obj); return eina_value_bool_init(val); @@ -47,7 +47,7 @@ int _elm_gengrid_item_index_get(const Eo *obj, Elm_Gen_Item *pd); static Eina_Value -__eolian_elm_gengrid_item_index_get_reflect(Eo *obj) +__eolian_elm_gengrid_item_index_get_reflect(const Eo *obj) { int val = elm_obj_gengrid_item_index_get(obj); return eina_value_int_init(val); diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 2ba846e00d..a42eea90b9 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -3932,7 +3932,7 @@ _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_UNSELECTED, EO_OBJ(it)); + (WIDGET(it), EFL_UI_EVENT_SELECTABLE_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_SELECTED, eo_it); + efl_event_callback_legacy_call(WIDGET(it), EFL_UI_EVENT_SELECTABLE_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_genlist_eo.c b/src/lib/elementary/elm_genlist_eo.c index 0ebe35fef0..ca2fd5669e 100644 --- a/src/lib/elementary/elm_genlist_eo.c +++ b/src/lib/elementary/elm_genlist_eo.c @@ -93,7 +93,7 @@ Eina_Bool _elm_genlist_homogeneous_get(const Eo *obj, Elm_Genlist_Data *pd); static Eina_Value -__eolian_elm_genlist_homogeneous_get_reflect(Eo *obj) +__eolian_elm_genlist_homogeneous_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_genlist_homogeneous_get(obj); return eina_value_bool_init(val); @@ -133,7 +133,7 @@ Eina_Bool _elm_genlist_focus_on_selection_get(const Eo *obj, Elm_Genlist_Data *p static Eina_Value -__eolian_elm_genlist_focus_on_selection_get_reflect(Eo *obj) +__eolian_elm_genlist_focus_on_selection_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_genlist_focus_on_selection_get(obj); return eina_value_bool_init(val); @@ -165,7 +165,7 @@ double _elm_genlist_longpress_timeout_get(const Eo *obj, Elm_Genlist_Data *pd); static Eina_Value -__eolian_elm_genlist_longpress_timeout_get_reflect(Eo *obj) +__eolian_elm_genlist_longpress_timeout_get_reflect(const Eo *obj) { double val = elm_obj_genlist_longpress_timeout_get(obj); return eina_value_double_init(val); @@ -197,7 +197,7 @@ Eina_Bool _elm_genlist_multi_select_get(const Eo *obj, Elm_Genlist_Data *pd); static Eina_Value -__eolian_elm_genlist_multi_select_get_reflect(Eo *obj) +__eolian_elm_genlist_multi_select_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_genlist_multi_select_get(obj); return eina_value_bool_init(val); @@ -229,7 +229,7 @@ Eina_Bool _elm_genlist_reorder_mode_get(const Eo *obj, Elm_Genlist_Data *pd); static Eina_Value -__eolian_elm_genlist_reorder_mode_get_reflect(Eo *obj) +__eolian_elm_genlist_reorder_mode_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_genlist_reorder_mode_get(obj); return eina_value_bool_init(val); @@ -261,7 +261,7 @@ Eina_Bool _elm_genlist_decorate_mode_get(const Eo *obj, Elm_Genlist_Data *pd); static Eina_Value -__eolian_elm_genlist_decorate_mode_get_reflect(Eo *obj) +__eolian_elm_genlist_decorate_mode_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_genlist_decorate_mode_get(obj); return eina_value_bool_init(val); @@ -301,7 +301,7 @@ int _elm_genlist_block_count_get(const Eo *obj, Elm_Genlist_Data *pd); static Eina_Value -__eolian_elm_genlist_block_count_get_reflect(Eo *obj) +__eolian_elm_genlist_block_count_get_reflect(const Eo *obj) { int val = elm_obj_genlist_block_count_get(obj); return eina_value_int_init(val); @@ -333,7 +333,7 @@ Eina_Bool _elm_genlist_tree_effect_enabled_get(const Eo *obj, Elm_Genlist_Data * static Eina_Value -__eolian_elm_genlist_tree_effect_enabled_get_reflect(Eo *obj) +__eolian_elm_genlist_tree_effect_enabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_genlist_tree_effect_enabled_get(obj); return eina_value_bool_init(val); @@ -365,7 +365,7 @@ Eina_Bool _elm_genlist_highlight_mode_get(const Eo *obj, Elm_Genlist_Data *pd); static Eina_Value -__eolian_elm_genlist_highlight_mode_get_reflect(Eo *obj) +__eolian_elm_genlist_highlight_mode_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_genlist_highlight_mode_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_genlist_item_eo.c b/src/lib/elementary/elm_genlist_item_eo.c index 6b7dfe46af..236c6ac994 100644 --- a/src/lib/elementary/elm_genlist_item_eo.c +++ b/src/lib/elementary/elm_genlist_item_eo.c @@ -39,7 +39,7 @@ Eina_Bool _elm_genlist_item_selected_get(const Eo *obj, Elm_Gen_Item *pd); static Eina_Value -__eolian_elm_genlist_item_selected_get_reflect(Eo *obj) +__eolian_elm_genlist_item_selected_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_genlist_item_selected_get(obj); return eina_value_bool_init(val); @@ -71,7 +71,7 @@ Eina_Bool _elm_genlist_item_expanded_get(const Eo *obj, Elm_Gen_Item *pd); static Eina_Value -__eolian_elm_genlist_item_expanded_get_reflect(Eo *obj) +__eolian_elm_genlist_item_expanded_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_genlist_item_expanded_get(obj); return eina_value_bool_init(val); @@ -83,7 +83,7 @@ int _elm_genlist_item_expanded_depth_get(const Eo *obj, Elm_Gen_Item *pd); static Eina_Value -__eolian_elm_genlist_item_expanded_depth_get_reflect(Eo *obj) +__eolian_elm_genlist_item_expanded_depth_get_reflect(const Eo *obj) { int val = elm_obj_genlist_item_expanded_depth_get(obj); return eina_value_int_init(val); @@ -99,7 +99,7 @@ int _elm_genlist_item_index_get(const Eo *obj, Elm_Gen_Item *pd); static Eina_Value -__eolian_elm_genlist_item_index_get_reflect(Eo *obj) +__eolian_elm_genlist_item_index_get_reflect(const Eo *obj) { int val = elm_obj_genlist_item_index_get(obj); return eina_value_int_init(val); @@ -111,7 +111,7 @@ const char *_elm_genlist_item_decorate_mode_get(const Eo *obj, Elm_Gen_Item *pd) static Eina_Value -__eolian_elm_genlist_item_decorate_mode_get_reflect(Eo *obj) +__eolian_elm_genlist_item_decorate_mode_get_reflect(const Eo *obj) { const char *val = elm_obj_genlist_item_decorate_mode_get(obj); return eina_value_string_init(val); @@ -143,7 +143,7 @@ Eina_Bool _elm_genlist_item_flip_get(const Eo *obj, Elm_Gen_Item *pd); static Eina_Value -__eolian_elm_genlist_item_flip_get_reflect(Eo *obj) +__eolian_elm_genlist_item_flip_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_genlist_item_flip_get(obj); return eina_value_bool_init(val); @@ -187,7 +187,7 @@ Eina_Bool _elm_genlist_item_pin_get(const Eo *obj, Elm_Gen_Item *pd); static Eina_Value -__eolian_elm_genlist_item_pin_get_reflect(Eo *obj) +__eolian_elm_genlist_item_pin_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_genlist_item_pin_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_gesture_layer_eo.c b/src/lib/elementary/elm_gesture_layer_eo.c index 9cdae6c1fe..d83e663601 100644 --- a/src/lib/elementary/elm_gesture_layer_eo.c +++ b/src/lib/elementary/elm_gesture_layer_eo.c @@ -23,7 +23,7 @@ double _elm_gesture_layer_zoom_step_get(const Eo *obj, Elm_Gesture_Layer_Data *p static Eina_Value -__eolian_elm_gesture_layer_zoom_step_get_reflect(Eo *obj) +__eolian_elm_gesture_layer_zoom_step_get_reflect(const Eo *obj) { double val = elm_obj_gesture_layer_zoom_step_get(obj); return eina_value_double_init(val); @@ -55,7 +55,7 @@ int _elm_gesture_layer_tap_finger_size_get(const Eo *obj, Elm_Gesture_Layer_Data static Eina_Value -__eolian_elm_gesture_layer_tap_finger_size_get_reflect(Eo *obj) +__eolian_elm_gesture_layer_tap_finger_size_get_reflect(const Eo *obj) { int val = elm_obj_gesture_layer_tap_finger_size_get(obj); return eina_value_int_init(val); @@ -87,7 +87,7 @@ Eina_Bool _elm_gesture_layer_hold_events_get(const Eo *obj, Elm_Gesture_Layer_Da static Eina_Value -__eolian_elm_gesture_layer_hold_events_get_reflect(Eo *obj) +__eolian_elm_gesture_layer_hold_events_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_gesture_layer_hold_events_get(obj); return eina_value_bool_init(val); @@ -119,7 +119,7 @@ double _elm_gesture_layer_rotate_step_get(const Eo *obj, Elm_Gesture_Layer_Data static Eina_Value -__eolian_elm_gesture_layer_rotate_step_get_reflect(Eo *obj) +__eolian_elm_gesture_layer_rotate_step_get_reflect(const Eo *obj) { double val = elm_obj_gesture_layer_rotate_step_get(obj); return eina_value_double_init(val); diff --git a/src/lib/elementary/elm_hover.c b/src/lib/elementary/elm_hover.c index e831ca5f8b..e5019fed78 100644 --- a/src/lib/elementary/elm_hover.c +++ b/src/lib/elementary/elm_hover.c @@ -689,6 +689,29 @@ elm_hover_add(Evas_Object *parent) return elm_legacy_add(MY_CLASS, parent); } +static void +_parent_setup(Eo *obj, Elm_Hover_Data *sd, Evas_Object *parent) +{ + _elm_hover_parent_detach(obj); + + sd->parent = parent; + if (sd->parent) + { + evas_object_event_callback_add + (sd->parent, EVAS_CALLBACK_MOVE, _parent_move_cb, obj); + evas_object_event_callback_add + (sd->parent, EVAS_CALLBACK_RESIZE, _parent_resize_cb, obj); + evas_object_event_callback_add + (sd->parent, EVAS_CALLBACK_SHOW, _parent_show_cb, obj); + evas_object_event_callback_add + (sd->parent, EVAS_CALLBACK_HIDE, _parent_hide_cb, obj); + evas_object_event_callback_add + (sd->parent, EVAS_CALLBACK_DEL, _parent_del_cb, obj); + } + + elm_layout_sizing_eval(obj); +} + EOLIAN static Eo * _elm_hover_efl_object_constructor(Eo *obj, Elm_Hover_Data *pd EINA_UNUSED) { @@ -697,6 +720,7 @@ _elm_hover_efl_object_constructor(Eo *obj, Elm_Hover_Data *pd EINA_UNUSED) evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); efl_access_object_role_set(obj, EFL_ACCESS_ROLE_POPUP_MENU); legacy_child_focus_handle(obj); + _parent_setup(obj, pd, efl_parent_get(obj)); return obj; } @@ -735,30 +759,9 @@ elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent) { ELM_HOVER_CHECK(obj); - efl_ui_widget_parent_set(obj, parent); -} - -EOLIAN static void -_elm_hover_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Hover_Data *sd, Evas_Object *parent) -{ - _elm_hover_parent_detach(obj); - - sd->parent = parent; - if (sd->parent) - { - evas_object_event_callback_add - (sd->parent, EVAS_CALLBACK_MOVE, _parent_move_cb, obj); - evas_object_event_callback_add - (sd->parent, EVAS_CALLBACK_RESIZE, _parent_resize_cb, obj); - evas_object_event_callback_add - (sd->parent, EVAS_CALLBACK_SHOW, _parent_show_cb, obj); - evas_object_event_callback_add - (sd->parent, EVAS_CALLBACK_HIDE, _parent_hide_cb, obj); - evas_object_event_callback_add - (sd->parent, EVAS_CALLBACK_DEL, _parent_del_cb, obj); - } - - elm_layout_sizing_eval(obj); + ELM_HOVER_DATA_GET(obj, sd); + efl_ui_widget_sub_object_add(parent, obj); + _parent_setup(obj, sd, parent); } EOLIAN static Evas_Object* @@ -774,12 +777,6 @@ elm_hover_parent_get(const Evas_Object *obj) return efl_ui_widget_parent_get((Eo *) obj); } -EOLIAN static Evas_Object* -_elm_hover_efl_ui_widget_widget_parent_get(const Eo *obj EINA_UNUSED, Elm_Hover_Data *sd) -{ - return sd->parent; -} - EOLIAN static const char* _elm_hover_best_content_location_get(const Eo *obj EINA_UNUSED, Elm_Hover_Data *sd, Elm_Hover_Axis pref_axis) { diff --git a/src/lib/elementary/elm_hover_eo.c b/src/lib/elementary/elm_hover_eo.c index 41abfd3865..5ca798a132 100644 --- a/src/lib/elementary/elm_hover_eo.c +++ b/src/lib/elementary/elm_hover_eo.c @@ -37,12 +37,6 @@ Eina_Error _elm_hover_efl_ui_widget_theme_apply(Eo *obj, Elm_Hover_Data *pd); Eina_Bool _elm_hover_efl_ui_widget_widget_sub_object_add(Eo *obj, Elm_Hover_Data *pd, Efl_Canvas_Object *sub_obj); -void _elm_hover_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Hover_Data *pd, Efl_Ui_Widget *parent); - - -Efl_Ui_Widget *_elm_hover_efl_ui_widget_widget_parent_get(const Eo *obj, Elm_Hover_Data *pd); - - Eina_Bool _elm_hover_efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_Hover_Data *pd, Efl_Canvas_Object *sub_obj); @@ -77,8 +71,6 @@ _elm_hover_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_hover_efl_gfx_entity_size_set), EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_hover_efl_ui_widget_theme_apply), EFL_OBJECT_OP_FUNC(efl_ui_widget_sub_object_add, _elm_hover_efl_ui_widget_widget_sub_object_add), - EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_set, _elm_hover_efl_ui_widget_widget_parent_set), - EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_get, _elm_hover_efl_ui_widget_widget_parent_get), EFL_OBJECT_OP_FUNC(efl_ui_widget_sub_object_del, _elm_hover_efl_ui_widget_widget_sub_object_del), EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_hover_efl_access_widget_action_elm_actions_get), EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_hover_efl_access_object_state_set_get), diff --git a/src/lib/elementary/elm_hoversel_eo.c b/src/lib/elementary/elm_hoversel_eo.c index d5eada96c3..a9a04effc4 100644 --- a/src/lib/elementary/elm_hoversel_eo.c +++ b/src/lib/elementary/elm_hoversel_eo.c @@ -31,7 +31,7 @@ Eina_Bool _elm_hoversel_horizontal_get(const Eo *obj, Elm_Hoversel_Data *pd); static Eina_Value -__eolian_elm_hoversel_horizontal_get_reflect(Eo *obj) +__eolian_elm_hoversel_horizontal_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_hoversel_horizontal_get(obj); return eina_value_bool_init(val); @@ -79,7 +79,7 @@ Eina_Bool _elm_hoversel_auto_update_get(const Eo *obj, Elm_Hoversel_Data *pd); static Eina_Value -__eolian_elm_hoversel_auto_update_get_reflect(Eo *obj) +__eolian_elm_hoversel_auto_update_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_hoversel_auto_update_get(obj); return eina_value_bool_init(val); @@ -112,9 +112,6 @@ void _elm_hoversel_efl_object_destructor(Eo *obj, Elm_Hoversel_Data *pd); void _elm_hoversel_efl_gfx_entity_visible_set(Eo *obj, Elm_Hoversel_Data *pd, Eina_Bool v); -void _elm_hoversel_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Hoversel_Data *pd, Efl_Ui_Widget *parent); - - Eina_Error _elm_hoversel_efl_ui_widget_theme_apply(Eo *obj, Elm_Hoversel_Data *pd); @@ -160,7 +157,6 @@ _elm_hoversel_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_constructor, _elm_hoversel_efl_object_constructor), EFL_OBJECT_OP_FUNC(efl_destructor, _elm_hoversel_efl_object_destructor), EFL_OBJECT_OP_FUNC(efl_gfx_entity_visible_set, _elm_hoversel_efl_gfx_entity_visible_set), - EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_set, _elm_hoversel_efl_ui_widget_widget_parent_set), EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_hoversel_efl_ui_widget_theme_apply), EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_hoversel_efl_ui_l10n_translation_update), EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_hoversel_efl_ui_widget_widget_input_event_handler), diff --git a/src/lib/elementary/elm_index.c b/src/lib/elementary/elm_index.c index 70d2ee0a71..8fa7e8a740 100644 --- a/src/lib/elementary/elm_index.c +++ b/src/lib/elementary/elm_index.c @@ -864,7 +864,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_SELECTED, eo_item); + (data, EFL_UI_EVENT_SELECTABLE_SELECTED, eo_item); eo_id_item = eo_item; ELM_INDEX_ITEM_DATA_GET(eo_id_item, id_item); if (id_item->func) @@ -1299,7 +1299,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_SELECTED, eo_it); + (obj, EFL_UI_EVENT_SELECTABLE_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_index_eo.c b/src/lib/elementary/elm_index_eo.c index db4af4fe54..9c935c7f92 100644 --- a/src/lib/elementary/elm_index_eo.c +++ b/src/lib/elementary/elm_index_eo.c @@ -31,7 +31,7 @@ Eina_Bool _elm_index_autohide_disabled_get(const Eo *obj, Elm_Index_Data *pd); static Eina_Value -__eolian_elm_index_autohide_disabled_get_reflect(Eo *obj) +__eolian_elm_index_autohide_disabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_index_autohide_disabled_get(obj); return eina_value_bool_init(val); @@ -63,7 +63,7 @@ Eina_Bool _elm_index_omit_enabled_get(const Eo *obj, Elm_Index_Data *pd); static Eina_Value -__eolian_elm_index_omit_enabled_get_reflect(Eo *obj) +__eolian_elm_index_omit_enabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_index_omit_enabled_get(obj); return eina_value_bool_init(val); @@ -95,7 +95,7 @@ int _elm_index_standard_priority_get(const Eo *obj, Elm_Index_Data *pd); static Eina_Value -__eolian_elm_index_standard_priority_get_reflect(Eo *obj) +__eolian_elm_index_standard_priority_get_reflect(const Eo *obj) { int val = elm_obj_index_standard_priority_get(obj); return eina_value_int_init(val); @@ -127,7 +127,7 @@ double _elm_index_delay_change_time_get(const Eo *obj, Elm_Index_Data *pd); static Eina_Value -__eolian_elm_index_delay_change_time_get_reflect(Eo *obj) +__eolian_elm_index_delay_change_time_get_reflect(const Eo *obj) { double val = elm_obj_index_delay_change_time_get(obj); return eina_value_double_init(val); @@ -159,7 +159,7 @@ Eina_Bool _elm_index_indicator_disabled_get(const Eo *obj, Elm_Index_Data *pd); static Eina_Value -__eolian_elm_index_indicator_disabled_get_reflect(Eo *obj) +__eolian_elm_index_indicator_disabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_index_indicator_disabled_get(obj); return eina_value_bool_init(val); @@ -191,7 +191,7 @@ int _elm_index_item_level_get(const Eo *obj, Elm_Index_Data *pd); static Eina_Value -__eolian_elm_index_item_level_get_reflect(Eo *obj) +__eolian_elm_index_item_level_get_reflect(const Eo *obj) { int val = elm_obj_index_item_level_get(obj); return eina_value_int_init(val); diff --git a/src/lib/elementary/elm_interface_fileselector_eo.c b/src/lib/elementary/elm_interface_fileselector_eo.c index d24b1dc54d..1f6636b664 100644 --- a/src/lib/elementary/elm_interface_fileselector_eo.c +++ b/src/lib/elementary/elm_interface_fileselector_eo.c @@ -17,7 +17,7 @@ __eolian_elm_interface_fileselector_folder_only_set_reflect(Eo *obj, Eina_Value EOAPI EFL_VOID_FUNC_BODYV(elm_interface_fileselector_folder_only_set, EFL_FUNC_CALL(only), Eina_Bool only); static Eina_Value -__eolian_elm_interface_fileselector_folder_only_get_reflect(Eo *obj) +__eolian_elm_interface_fileselector_folder_only_get_reflect(const Eo *obj) { Eina_Bool val = elm_interface_fileselector_folder_only_get(obj); return eina_value_bool_init(val); @@ -45,7 +45,7 @@ __eolian_elm_interface_fileselector_hidden_visible_set_reflect(Eo *obj, Eina_Val EOAPI EFL_VOID_FUNC_BODYV(elm_interface_fileselector_hidden_visible_set, EFL_FUNC_CALL(hidden), Eina_Bool hidden); static Eina_Value -__eolian_elm_interface_fileselector_hidden_visible_get_reflect(Eo *obj) +__eolian_elm_interface_fileselector_hidden_visible_get_reflect(const Eo *obj) { Eina_Bool val = elm_interface_fileselector_hidden_visible_get(obj); return eina_value_bool_init(val); @@ -73,7 +73,7 @@ __eolian_elm_interface_fileselector_multi_select_set_reflect(Eo *obj, Eina_Value EOAPI EFL_VOID_FUNC_BODYV(elm_interface_fileselector_multi_select_set, EFL_FUNC_CALL(multi), Eina_Bool multi); static Eina_Value -__eolian_elm_interface_fileselector_multi_select_get_reflect(Eo *obj) +__eolian_elm_interface_fileselector_multi_select_get_reflect(const Eo *obj) { Eina_Bool val = elm_interface_fileselector_multi_select_get(obj); return eina_value_bool_init(val); @@ -99,7 +99,7 @@ __eolian_elm_interface_fileselector_expandable_set_reflect(Eo *obj, Eina_Value v EOAPI EFL_VOID_FUNC_BODYV(elm_interface_fileselector_expandable_set, EFL_FUNC_CALL(expand), Eina_Bool expand); static Eina_Value -__eolian_elm_interface_fileselector_expandable_get_reflect(Eo *obj) +__eolian_elm_interface_fileselector_expandable_get_reflect(const Eo *obj) { Eina_Bool val = elm_interface_fileselector_expandable_get(obj); return eina_value_bool_init(val); @@ -127,7 +127,7 @@ __eolian_elm_interface_fileselector_is_save_set_reflect(Eo *obj, Eina_Value val) EOAPI EFL_VOID_FUNC_BODYV(elm_interface_fileselector_is_save_set, EFL_FUNC_CALL(is_save), Eina_Bool is_save); static Eina_Value -__eolian_elm_interface_fileselector_is_save_get_reflect(Eo *obj) +__eolian_elm_interface_fileselector_is_save_get_reflect(const Eo *obj) { Eina_Bool val = elm_interface_fileselector_is_save_get(obj); return eina_value_bool_init(val); @@ -154,7 +154,7 @@ __eolian_elm_interface_fileselector_current_name_set_reflect(Eo *obj, Eina_Value EOAPI EFL_VOID_FUNC_BODYV(elm_interface_fileselector_current_name_set, EFL_FUNC_CALL(name), const char *name); static Eina_Value -__eolian_elm_interface_fileselector_current_name_get_reflect(Eo *obj) +__eolian_elm_interface_fileselector_current_name_get_reflect(const Eo *obj) { const char *val = elm_interface_fileselector_current_name_get(obj); return eina_value_string_init(val); diff --git a/src/lib/elementary/elm_inwin.c b/src/lib/elementary/elm_inwin.c index bb6db93217..54d2c4d775 100644 --- a/src/lib/elementary/elm_inwin.c +++ b/src/lib/elementary/elm_inwin.c @@ -57,14 +57,6 @@ _elm_inwin_efl_canvas_group_group_add(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED) CRI("Failed to set layout!"); } -EOLIAN static void -_elm_inwin_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED, Evas_Object *parent) -{ - elm_win_resize_object_add(parent, obj); - - elm_layout_sizing_eval(obj); -} - EAPI Evas_Object * elm_win_inwin_add(Evas_Object *parent) { @@ -86,6 +78,8 @@ _elm_inwin_efl_object_constructor(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED) } obj = efl_constructor(efl_super(obj, MY_CLASS)); + elm_win_resize_object_add(efl_parent_get(obj), obj); + elm_layout_sizing_eval(obj); efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY); efl_access_object_role_set(obj, EFL_ACCESS_ROLE_GLASS_PANE); diff --git a/src/lib/elementary/elm_inwin_eo.c b/src/lib/elementary/elm_inwin_eo.c index 0cd70e6640..887f9ee453 100644 --- a/src/lib/elementary/elm_inwin_eo.c +++ b/src/lib/elementary/elm_inwin_eo.c @@ -6,9 +6,6 @@ EOAPI EFL_VOID_FUNC_BODY(elm_obj_win_inwin_activate); Efl_Object *_elm_inwin_efl_object_constructor(Eo *obj, Elm_Inwin_Data *pd); -void _elm_inwin_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Inwin_Data *pd, Efl_Ui_Widget *parent); - - Eina_Bool _elm_inwin_efl_content_content_set(Eo *obj, Elm_Inwin_Data *pd, Efl_Gfx_Entity *content); @@ -32,7 +29,6 @@ _elm_inwin_class_initializer(Efl_Class *klass) EFL_OPS_DEFINE(ops, EFL_OBJECT_OP_FUNC(elm_obj_win_inwin_activate, _elm_inwin_activate), EFL_OBJECT_OP_FUNC(efl_constructor, _elm_inwin_efl_object_constructor), - EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_set, _elm_inwin_efl_ui_widget_widget_parent_set), EFL_OBJECT_OP_FUNC(efl_content_set, _elm_inwin_efl_content_content_set), EFL_OBJECT_OP_FUNC(efl_content_get, _elm_inwin_efl_content_content_get), EFL_OBJECT_OP_FUNC(efl_content_unset, _elm_inwin_efl_content_content_unset), diff --git a/src/lib/elementary/elm_label_eo.c b/src/lib/elementary/elm_label_eo.c index f16ea83ffd..d19545f842 100644 --- a/src/lib/elementary/elm_label_eo.c +++ b/src/lib/elementary/elm_label_eo.c @@ -25,7 +25,7 @@ int _elm_label_wrap_width_get(const Eo *obj, Elm_Label_Data *pd); static Eina_Value -__eolian_elm_label_wrap_width_get_reflect(Eo *obj) +__eolian_elm_label_wrap_width_get_reflect(const Eo *obj) { int val = elm_obj_label_wrap_width_get(obj); return eina_value_int_init(val); @@ -57,7 +57,7 @@ double _elm_label_slide_speed_get(const Eo *obj, Elm_Label_Data *pd); static Eina_Value -__eolian_elm_label_slide_speed_get_reflect(Eo *obj) +__eolian_elm_label_slide_speed_get_reflect(const Eo *obj) { double val = elm_obj_label_slide_speed_get(obj); return eina_value_double_init(val); @@ -97,7 +97,7 @@ double _elm_label_slide_duration_get(const Eo *obj, Elm_Label_Data *pd); static Eina_Value -__eolian_elm_label_slide_duration_get_reflect(Eo *obj) +__eolian_elm_label_slide_duration_get_reflect(const Eo *obj) { double val = elm_obj_label_slide_duration_get(obj); return eina_value_double_init(val); @@ -137,7 +137,7 @@ Eina_Bool _elm_label_ellipsis_get(const Eo *obj, Elm_Label_Data *pd); static Eina_Value -__eolian_elm_label_ellipsis_get_reflect(Eo *obj) +__eolian_elm_label_ellipsis_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_label_ellipsis_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c index 17b2b93746..5047330de3 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_SELECTED, eo_it); + efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SELECTABLE_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; @@ -1524,7 +1524,7 @@ _item_unselect(Elm_List_Item_Data *it) if (!(it->base->disabled || (sd->select_mode == ELM_OBJECT_SELECT_MODE_NONE))) efl_event_callback_legacy_call - (WIDGET(it), EFL_UI_EVENT_UNSELECTED, EO_OBJ(it)); + (WIDGET(it), EFL_UI_EVENT_SELECTABLE_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_list_eo.c b/src/lib/elementary/elm_list_eo.c index 077fcac301..9668aa5e07 100644 --- a/src/lib/elementary/elm_list_eo.c +++ b/src/lib/elementary/elm_list_eo.c @@ -43,7 +43,7 @@ Eina_Bool _elm_list_horizontal_get(const Eo *obj, Elm_List_Data *pd); static Eina_Value -__eolian_elm_list_horizontal_get_reflect(Eo *obj) +__eolian_elm_list_horizontal_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_list_horizontal_get(obj); return eina_value_bool_init(val); @@ -83,7 +83,7 @@ Eina_Bool _elm_list_focus_on_selection_get(const Eo *obj, Elm_List_Data *pd); static Eina_Value -__eolian_elm_list_focus_on_selection_get_reflect(Eo *obj) +__eolian_elm_list_focus_on_selection_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_list_focus_on_selection_get(obj); return eina_value_bool_init(val); @@ -115,7 +115,7 @@ Eina_Bool _elm_list_multi_select_get(const Eo *obj, Elm_List_Data *pd); static Eina_Value -__eolian_elm_list_multi_select_get_reflect(Eo *obj) +__eolian_elm_list_multi_select_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_list_multi_select_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_list_item_eo.c b/src/lib/elementary/elm_list_item_eo.c index 358b9a2284..6e66802e6c 100644 --- a/src/lib/elementary/elm_list_item_eo.c +++ b/src/lib/elementary/elm_list_item_eo.c @@ -23,7 +23,7 @@ Eina_Bool _elm_list_item_separator_get(const Eo *obj, Elm_List_Item_Data *pd); static Eina_Value -__eolian_elm_list_item_separator_get_reflect(Eo *obj) +__eolian_elm_list_item_separator_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_list_item_separator_get(obj); return eina_value_bool_init(val); @@ -55,7 +55,7 @@ Eina_Bool _elm_list_item_selected_get(const Eo *obj, Elm_List_Item_Data *pd); static Eina_Value -__eolian_elm_list_item_selected_get_reflect(Eo *obj) +__eolian_elm_list_item_selected_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_list_item_selected_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c index ce403942ad..50aa58c3a8 100644 --- a/src/lib/elementary/elm_main.c +++ b/src/lib/elementary/elm_main.c @@ -809,6 +809,7 @@ elm_quicklaunch_init(int argc EINA_UNUSED, } if (!_elm_data_dir) _elm_data_dir = eina_stringshare_add("/"); if (!_elm_lib_dir) _elm_lib_dir = eina_stringshare_add("/"); + if (!_property_style_ss) _property_style_ss = eina_stringshare_add("style"); eina_log_timing(_elm_log_dom, EINA_LOG_STATE_STOP, EINA_LOG_STATE_INIT); @@ -925,6 +926,7 @@ elm_quicklaunch_shutdown(void) pfx = NULL; ELM_SAFE_FREE(_elm_data_dir, eina_stringshare_del); ELM_SAFE_FREE(_elm_lib_dir, eina_stringshare_del); + ELM_SAFE_FREE(_property_style_ss, eina_stringshare_del); ELM_SAFE_FREE(_elm_appname, free); ELM_SAFE_FREE(_elm_exit_handler, ecore_event_handler_del); diff --git a/src/lib/elementary/elm_map_eo.c b/src/lib/elementary/elm_map_eo.c index 3bc322b303..62ed9c2861 100644 --- a/src/lib/elementary/elm_map_eo.c +++ b/src/lib/elementary/elm_map_eo.c @@ -49,7 +49,7 @@ int _elm_map_zoom_min_get(const Eo *obj, Elm_Map_Data *pd); static Eina_Value -__eolian_elm_map_zoom_min_get_reflect(Eo *obj) +__eolian_elm_map_zoom_min_get_reflect(const Eo *obj) { int val = elm_obj_map_zoom_min_get(obj); return eina_value_int_init(val); @@ -89,7 +89,7 @@ const char *_elm_map_user_agent_get(const Eo *obj, Elm_Map_Data *pd); static Eina_Value -__eolian_elm_map_user_agent_get_reflect(Eo *obj) +__eolian_elm_map_user_agent_get_reflect(const Eo *obj) { const char *val = elm_obj_map_user_agent_get(obj); return eina_value_string_init(val); @@ -121,7 +121,7 @@ int _elm_map_zoom_max_get(const Eo *obj, Elm_Map_Data *pd); static Eina_Value -__eolian_elm_map_zoom_max_get_reflect(Eo *obj) +__eolian_elm_map_zoom_max_get_reflect(const Eo *obj) { int val = elm_obj_map_zoom_max_get(obj); return eina_value_int_init(val); diff --git a/src/lib/elementary/elm_mapbuf_eo.c b/src/lib/elementary/elm_mapbuf_eo.c index a480b77cc1..c84bc21fb3 100644 --- a/src/lib/elementary/elm_mapbuf_eo.c +++ b/src/lib/elementary/elm_mapbuf_eo.c @@ -23,7 +23,7 @@ Eina_Bool _elm_mapbuf_auto_get(const Eo *obj, Elm_Mapbuf_Data *pd); static Eina_Value -__eolian_elm_mapbuf_auto_get_reflect(Eo *obj) +__eolian_elm_mapbuf_auto_get_reflect(const Eo *obj) { Eina_Bool val = elm_private_mapbuf_auto_get(obj); return eina_value_bool_init(val); @@ -55,7 +55,7 @@ Eina_Bool _elm_mapbuf_smooth_get(const Eo *obj, Elm_Mapbuf_Data *pd); static Eina_Value -__eolian_elm_mapbuf_smooth_get_reflect(Eo *obj) +__eolian_elm_mapbuf_smooth_get_reflect(const Eo *obj) { Eina_Bool val = elm_private_mapbuf_smooth_get(obj); return eina_value_bool_init(val); @@ -87,7 +87,7 @@ Eina_Bool _elm_mapbuf_alpha_get(const Eo *obj, Elm_Mapbuf_Data *pd); static Eina_Value -__eolian_elm_mapbuf_alpha_get_reflect(Eo *obj) +__eolian_elm_mapbuf_alpha_get_reflect(const Eo *obj) { Eina_Bool val = elm_private_mapbuf_alpha_get(obj); return eina_value_bool_init(val); @@ -119,7 +119,7 @@ Eina_Bool _elm_mapbuf_enabled_get(const Eo *obj, Elm_Mapbuf_Data *pd); static Eina_Value -__eolian_elm_mapbuf_enabled_get_reflect(Eo *obj) +__eolian_elm_mapbuf_enabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_private_mapbuf_enabled_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c index aebcd7dd37..df38939c1c 100644 --- a/src/lib/elementary/elm_menu.c +++ b/src/lib/elementary/elm_menu.c @@ -498,7 +498,7 @@ _menu_item_activate_cb(void *data, if (eo_item2 != EO_OBJ(item)) elm_menu_item_selected_set(eo_item2, 0); } - efl_access_object_event_emit(EO_OBJ(item->parent), EFL_ACCESS_SELECTION_EVENT_SELECTION_CHANGED, NULL); + efl_access_object_event_emit(EO_OBJ(item->parent), EFL_ACCESS_SELECTION_EVENT_ACCESS_SELECTION_CHANGED, NULL); } else { @@ -513,7 +513,7 @@ _menu_item_activate_cb(void *data, elm_menu_item_selected_set(eo_item2, 0); } } - efl_access_object_event_emit(WIDGET(item), EFL_ACCESS_SELECTION_EVENT_SELECTION_CHANGED, NULL); + efl_access_object_event_emit(WIDGET(item), EFL_ACCESS_SELECTION_EVENT_ACCESS_SELECTION_CHANGED, NULL); if (sd->menu_bar && was_open) _menu_item_select_cb(item, NULL, NULL, NULL); } @@ -815,54 +815,8 @@ _elm_menu_efl_ui_widget_focus_manager_focus_manager_create(Eo *obj EINA_UNUSED, return manager; } -EOLIAN static Eo * -_elm_menu_efl_object_constructor(Eo *obj, Elm_Menu_Data *sd) -{ - Eo *parent = NULL; - - 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); - parent = efl_parent_get(obj); - efl_access_object_role_set(obj, EFL_ACCESS_ROLE_MENU); - - elm_menu_parent_set(obj, parent); - elm_hover_target_set(sd->hv, sd->location); - elm_layout_content_set - (sd->hv, elm_hover_best_content_location_get - (sd->hv, ELM_HOVER_AXIS_VERTICAL), sd->bx); - - _sizing_eval(obj); - efl_event_callback_add - (obj, ELM_MENU_EVENT_ELM_ACTION_BLOCK_MENU, _block_menu, sd); - efl_event_callback_add - (obj, ELM_MENU_EVENT_ELM_ACTION_UNBLOCK_MENU, _unblock_menu, sd); - - sd->obj = obj; - return obj; -} - -EOLIAN static void -_elm_menu_efl_object_destructor(Eo *obj, Elm_Menu_Data *sd) -{ - Eina_List *itr, *itr2; - Elm_Object_Item *eo_item; - EINA_LIST_FOREACH_SAFE(sd->items, itr, itr2, eo_item) - efl_del(eo_item); - - efl_destructor(efl_super(obj, MY_CLASS)); -} - -EAPI void -elm_menu_parent_set(Evas_Object *obj, - Evas_Object *parent) -{ - ELM_MENU_CHECK(obj); - efl_ui_widget_parent_set(obj, parent); -} - -EOLIAN static void -_elm_menu_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Menu_Data *sd, Evas_Object *parent) +static void +_parent_setup(Eo *obj, Elm_Menu_Data *sd, Evas_Object *parent) { Eina_List *l, *_l, *_ll, *ll = NULL; Elm_Object_Item *eo_item; @@ -904,6 +858,55 @@ _elm_menu_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Menu_Data *sd, Evas_Objec _sizing_eval(obj); } +EOLIAN static Eo * +_elm_menu_efl_object_constructor(Eo *obj, Elm_Menu_Data *sd) +{ + Eo *parent = NULL; + + obj = efl_constructor(efl_super(obj, MY_CLASS)); + _parent_setup(obj, sd, efl_parent_get(obj)); + efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY); + evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); + parent = efl_parent_get(obj); + efl_access_object_role_set(obj, EFL_ACCESS_ROLE_MENU); + + elm_menu_parent_set(obj, parent); + elm_hover_target_set(sd->hv, sd->location); + elm_layout_content_set + (sd->hv, elm_hover_best_content_location_get + (sd->hv, ELM_HOVER_AXIS_VERTICAL), sd->bx); + + _sizing_eval(obj); + efl_event_callback_add + (obj, ELM_MENU_EVENT_ELM_ACTION_BLOCK_MENU, _block_menu, sd); + efl_event_callback_add + (obj, ELM_MENU_EVENT_ELM_ACTION_UNBLOCK_MENU, _unblock_menu, sd); + + sd->obj = obj; + return obj; +} + +EOLIAN static void +_elm_menu_efl_object_destructor(Eo *obj, Elm_Menu_Data *sd) +{ + Eina_List *itr, *itr2; + Elm_Object_Item *eo_item; + EINA_LIST_FOREACH_SAFE(sd->items, itr, itr2, eo_item) + efl_del(eo_item); + + efl_destructor(efl_super(obj, MY_CLASS)); +} + +EAPI void +elm_menu_parent_set(Evas_Object *obj, + Evas_Object *parent) +{ + ELM_MENU_CHECK(obj); + ELM_MENU_DATA_GET(obj, sd); + efl_ui_widget_sub_object_add(parent, obj); + _parent_setup(obj, sd, parent); +} + EAPI Evas_Object * elm_menu_parent_get(const Evas_Object *obj) { @@ -911,12 +914,6 @@ elm_menu_parent_get(const Evas_Object *obj) return efl_ui_widget_parent_get(obj); } -EOLIAN static Evas_Object* -_elm_menu_efl_ui_widget_widget_parent_get(const Eo *obj EINA_UNUSED, Elm_Menu_Data *sd) -{ - return sd->parent; -} - EOLIAN static void _elm_menu_relative_move(Eo *obj, Elm_Menu_Data *sd, Evas_Coord x, Evas_Coord y) { diff --git a/src/lib/elementary/elm_menu_eo.c b/src/lib/elementary/elm_menu_eo.c index e0440405b8..1bc7f988da 100644 --- a/src/lib/elementary/elm_menu_eo.c +++ b/src/lib/elementary/elm_menu_eo.c @@ -50,12 +50,6 @@ void _elm_menu_efl_object_destructor(Eo *obj, Elm_Menu_Data *pd); void _elm_menu_efl_gfx_entity_visible_set(Eo *obj, Elm_Menu_Data *pd, Eina_Bool v); -void _elm_menu_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Menu_Data *pd, Efl_Ui_Widget *parent); - - -Efl_Ui_Widget *_elm_menu_efl_ui_widget_widget_parent_get(const Eo *obj, Elm_Menu_Data *pd); - - Eina_Error _elm_menu_efl_ui_widget_theme_apply(Eo *obj, Elm_Menu_Data *pd); @@ -101,8 +95,6 @@ _elm_menu_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_constructor, _elm_menu_efl_object_constructor), EFL_OBJECT_OP_FUNC(efl_destructor, _elm_menu_efl_object_destructor), EFL_OBJECT_OP_FUNC(efl_gfx_entity_visible_set, _elm_menu_efl_gfx_entity_visible_set), - EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_set, _elm_menu_efl_ui_widget_widget_parent_set), - EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_get, _elm_menu_efl_ui_widget_widget_parent_get), EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_menu_efl_ui_widget_theme_apply), EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_menu_efl_ui_l10n_translation_update), EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_manager_create, _elm_menu_efl_ui_widget_focus_manager_focus_manager_create), diff --git a/src/lib/elementary/elm_menu_item_eo.c b/src/lib/elementary/elm_menu_item_eo.c index 40d2fd8aed..aceea71676 100644 --- a/src/lib/elementary/elm_menu_item_eo.c +++ b/src/lib/elementary/elm_menu_item_eo.c @@ -23,7 +23,7 @@ const char *_elm_menu_item_icon_name_get(const Eo *obj, Elm_Menu_Item_Data *pd); static Eina_Value -__eolian_elm_menu_item_icon_name_get_reflect(Eo *obj) +__eolian_elm_menu_item_icon_name_get_reflect(const Eo *obj) { const char *val = elm_obj_menu_item_icon_name_get(obj); return eina_value_string_init(val); @@ -63,7 +63,7 @@ Eina_Bool _elm_menu_item_selected_get(const Eo *obj, Elm_Menu_Item_Data *pd); static Eina_Value -__eolian_elm_menu_item_selected_get_reflect(Eo *obj) +__eolian_elm_menu_item_selected_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_menu_item_selected_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_multibuttonentry_eo.c b/src/lib/elementary/elm_multibuttonentry_eo.c index 0819d7a6f3..24dfb7fc45 100644 --- a/src/lib/elementary/elm_multibuttonentry_eo.c +++ b/src/lib/elementary/elm_multibuttonentry_eo.c @@ -39,7 +39,7 @@ Eina_Bool _elm_multibuttonentry_editable_get(const Eo *obj, Elm_Multibuttonentry static Eina_Value -__eolian_elm_multibuttonentry_editable_get_reflect(Eo *obj) +__eolian_elm_multibuttonentry_editable_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_multibuttonentry_editable_get(obj); return eina_value_bool_init(val); @@ -71,7 +71,7 @@ Eina_Bool _elm_multibuttonentry_expanded_get(const Eo *obj, Elm_Multibuttonentry static Eina_Value -__eolian_elm_multibuttonentry_expanded_get_reflect(Eo *obj) +__eolian_elm_multibuttonentry_expanded_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_multibuttonentry_expanded_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_multibuttonentry_item_eo.c b/src/lib/elementary/elm_multibuttonentry_item_eo.c index 0fcd277b69..153de11cf1 100644 --- a/src/lib/elementary/elm_multibuttonentry_item_eo.c +++ b/src/lib/elementary/elm_multibuttonentry_item_eo.c @@ -23,7 +23,7 @@ Eina_Bool _elm_multibuttonentry_item_selected_get(const Eo *obj, Elm_Multibutton static Eina_Value -__eolian_elm_multibuttonentry_item_selected_get_reflect(Eo *obj) +__eolian_elm_multibuttonentry_item_selected_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_multibuttonentry_item_selected_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_naviframe_eo.c b/src/lib/elementary/elm_naviframe_eo.c index c4ecbba429..5bbd65f531 100644 --- a/src/lib/elementary/elm_naviframe_eo.c +++ b/src/lib/elementary/elm_naviframe_eo.c @@ -31,7 +31,7 @@ Eina_Bool _elm_naviframe_event_enabled_get(const Eo *obj, Elm_Naviframe_Data *pd static Eina_Value -__eolian_elm_naviframe_event_enabled_get_reflect(Eo *obj) +__eolian_elm_naviframe_event_enabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_naviframe_event_enabled_get(obj); return eina_value_bool_init(val); @@ -63,7 +63,7 @@ Eina_Bool _elm_naviframe_content_preserve_on_pop_get(const Eo *obj, Elm_Navifram static Eina_Value -__eolian_elm_naviframe_content_preserve_on_pop_get_reflect(Eo *obj) +__eolian_elm_naviframe_content_preserve_on_pop_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_naviframe_content_preserve_on_pop_get(obj); return eina_value_bool_init(val); @@ -95,7 +95,7 @@ Eina_Bool _elm_naviframe_prev_btn_auto_pushed_get(const Eo *obj, Elm_Naviframe_D static Eina_Value -__eolian_elm_naviframe_prev_btn_auto_pushed_get_reflect(Eo *obj) +__eolian_elm_naviframe_prev_btn_auto_pushed_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_naviframe_prev_btn_auto_pushed_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_notify.c b/src/lib/elementary/elm_notify.c index f5e9122668..8a98c32f9b 100644 --- a/src/lib/elementary/elm_notify.c +++ b/src/lib/elementary/elm_notify.c @@ -474,26 +474,9 @@ elm_notify_add(Evas_Object *parent) return elm_legacy_add(MY_CLASS, parent); } -EOLIAN static Eo * -_elm_notify_efl_object_constructor(Eo *obj, Elm_Notify_Data *sd EINA_UNUSED) -{ - obj = efl_constructor(efl_super(obj, MY_CLASS)); - efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY); - efl_access_object_role_set(obj, EFL_ACCESS_ROLE_NOTIFICATION); - return obj; -} - -EAPI void -elm_notify_parent_set(Evas_Object *obj, - Evas_Object *parent) -{ - ELM_NOTIFY_CHECK(obj); - efl_ui_widget_parent_set(obj, parent); -} - -EOLIAN static void -_elm_notify_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Notify_Data *sd, Evas_Object *parent) +static void +_parent_setup(Eo *obj, Elm_Notify_Data *sd, Evas_Object *parent) { if (sd->parent) { @@ -530,6 +513,27 @@ _elm_notify_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Notify_Data *sd, Evas_O _calc(obj); } +EOLIAN static Eo * +_elm_notify_efl_object_constructor(Eo *obj, Elm_Notify_Data *sd EINA_UNUSED) +{ + obj = efl_constructor(efl_super(obj, MY_CLASS)); + efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY); + efl_access_object_role_set(obj, EFL_ACCESS_ROLE_NOTIFICATION); + _parent_setup(obj, sd, efl_parent_get(obj)); + + return obj; +} + +EAPI void +elm_notify_parent_set(Evas_Object *obj, + Evas_Object *parent) +{ + ELM_NOTIFY_CHECK(obj); + ELM_NOTIFY_DATA_GET(obj, sd); + efl_ui_widget_sub_object_add(parent, obj); + _parent_setup(obj, sd, parent); +} + EAPI Evas_Object * elm_notify_parent_get(const Evas_Object *obj) { @@ -539,12 +543,6 @@ elm_notify_parent_get(const Evas_Object *obj) return ret; } -EOLIAN static Evas_Object* -_elm_notify_efl_ui_widget_widget_parent_get(const Eo *obj EINA_UNUSED, Elm_Notify_Data *sd) -{ - return sd->parent; -} - EINA_DEPRECATED EAPI void elm_notify_orient_set(Evas_Object *obj, Elm_Notify_Orient orient) diff --git a/src/lib/elementary/elm_notify_eo.c b/src/lib/elementary/elm_notify_eo.c index b4974fabb6..b38b2a02a5 100644 --- a/src/lib/elementary/elm_notify_eo.c +++ b/src/lib/elementary/elm_notify_eo.c @@ -37,7 +37,7 @@ Eina_Bool _elm_notify_allow_events_get(const Eo *obj, Elm_Notify_Data *pd); static Eina_Value -__eolian_elm_notify_allow_events_get_reflect(Eo *obj) +__eolian_elm_notify_allow_events_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_notify_allow_events_get(obj); return eina_value_bool_init(val); @@ -69,7 +69,7 @@ double _elm_notify_timeout_get(const Eo *obj, Elm_Notify_Data *pd); static Eina_Value -__eolian_elm_notify_timeout_get_reflect(Eo *obj) +__eolian_elm_notify_timeout_get_reflect(const Eo *obj) { double val = elm_obj_notify_timeout_get(obj); return eina_value_double_init(val); @@ -93,12 +93,6 @@ void _elm_notify_efl_gfx_entity_position_set(Eo *obj, Elm_Notify_Data *pd, Eina_ void _elm_notify_efl_gfx_entity_size_set(Eo *obj, Elm_Notify_Data *pd, Eina_Size2D size); -void _elm_notify_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Notify_Data *pd, Efl_Ui_Widget *parent); - - -Efl_Ui_Widget *_elm_notify_efl_ui_widget_widget_parent_get(const Eo *obj, Elm_Notify_Data *pd); - - Eina_Error _elm_notify_efl_ui_widget_theme_apply(Eo *obj, Elm_Notify_Data *pd); @@ -140,8 +134,6 @@ _elm_notify_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_gfx_entity_visible_set, _elm_notify_efl_gfx_entity_visible_set), EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_notify_efl_gfx_entity_position_set), EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_notify_efl_gfx_entity_size_set), - EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_set, _elm_notify_efl_ui_widget_widget_parent_set), - EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_get, _elm_notify_efl_ui_widget_widget_parent_get), EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_notify_efl_ui_widget_theme_apply), EFL_OBJECT_OP_FUNC(efl_ui_widget_sub_object_del, _elm_notify_efl_ui_widget_widget_sub_object_del), EFL_OBJECT_OP_FUNC(efl_content_set, _elm_notify_efl_content_content_set), diff --git a/src/lib/elementary/elm_panel_eo.c b/src/lib/elementary/elm_panel_eo.c index d54be07afe..d8b60f37e6 100644 --- a/src/lib/elementary/elm_panel_eo.c +++ b/src/lib/elementary/elm_panel_eo.c @@ -33,7 +33,7 @@ Eina_Bool _elm_panel_hidden_get(const Eo *obj, Elm_Panel_Data *pd); static Eina_Value -__eolian_elm_panel_hidden_get_reflect(Eo *obj) +__eolian_elm_panel_hidden_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_panel_hidden_get(obj); return eina_value_bool_init(val); @@ -65,7 +65,7 @@ Eina_Bool _elm_panel_scrollable_get(const Eo *obj, Elm_Panel_Data *pd); static Eina_Value -__eolian_elm_panel_scrollable_get_reflect(Eo *obj) +__eolian_elm_panel_scrollable_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_panel_scrollable_get(obj); return eina_value_bool_init(val); @@ -97,7 +97,7 @@ double _elm_panel_scrollable_content_size_get(const Eo *obj, Elm_Panel_Data *pd) static Eina_Value -__eolian_elm_panel_scrollable_content_size_get_reflect(Eo *obj) +__eolian_elm_panel_scrollable_content_size_get_reflect(const Eo *obj) { double val = elm_obj_panel_scrollable_content_size_get(obj); return eina_value_double_init(val); diff --git a/src/lib/elementary/elm_popup_eo.c b/src/lib/elementary/elm_popup_eo.c index 6f2b4785cd..928638419d 100644 --- a/src/lib/elementary/elm_popup_eo.c +++ b/src/lib/elementary/elm_popup_eo.c @@ -41,7 +41,7 @@ Eina_Bool _elm_popup_allow_events_get(const Eo *obj, Elm_Popup_Data *pd); static Eina_Value -__eolian_elm_popup_allow_events_get_reflect(Eo *obj) +__eolian_elm_popup_allow_events_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_popup_allow_events_get(obj); return eina_value_bool_init(val); @@ -89,7 +89,7 @@ double _elm_popup_timeout_get(const Eo *obj, Elm_Popup_Data *pd); static Eina_Value -__eolian_elm_popup_timeout_get_reflect(Eo *obj) +__eolian_elm_popup_timeout_get_reflect(const Eo *obj) { double val = elm_obj_popup_timeout_get(obj); return eina_value_double_init(val); @@ -121,7 +121,7 @@ Eina_Bool _elm_popup_scrollable_get(const Eo *obj, Elm_Popup_Data *pd); static Eina_Value -__eolian_elm_popup_scrollable_get_reflect(Eo *obj) +__eolian_elm_popup_scrollable_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_popup_scrollable_get(obj); return eina_value_bool_init(val); @@ -146,9 +146,6 @@ Eina_Error _elm_popup_efl_ui_widget_theme_apply(Eo *obj, Elm_Popup_Data *pd); void _elm_popup_efl_ui_widget_on_access_update(Eo *obj, Elm_Popup_Data *pd, Eina_Bool enable); -void _elm_popup_efl_ui_widget_widget_parent_set(Eo *obj, Elm_Popup_Data *pd, Efl_Ui_Widget *parent); - - void _elm_popup_efl_ui_l10n_translation_update(Eo *obj, Elm_Popup_Data *pd); @@ -202,7 +199,6 @@ _elm_popup_class_initializer(Efl_Class *klass) EFL_OBJECT_OP_FUNC(efl_constructor, _elm_popup_efl_object_constructor), EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_popup_efl_ui_widget_theme_apply), EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_popup_efl_ui_widget_on_access_update), - EFL_OBJECT_OP_FUNC(efl_ui_widget_parent_set, _elm_popup_efl_ui_widget_widget_parent_set), EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_popup_efl_ui_l10n_translation_update), EFL_OBJECT_OP_FUNC(efl_ui_widget_sub_object_del, _elm_popup_efl_ui_widget_widget_sub_object_del), EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_popup_efl_ui_widget_widget_input_event_handler), diff --git a/src/lib/elementary/elm_prefs_eo.c b/src/lib/elementary/elm_prefs_eo.c index f56f214b2e..5cb10d01a8 100644 --- a/src/lib/elementary/elm_prefs_eo.c +++ b/src/lib/elementary/elm_prefs_eo.c @@ -41,7 +41,7 @@ Eina_Bool _elm_prefs_autosave_get(const Eo *obj, Elm_Prefs_Data *pd); static Eina_Value -__eolian_elm_prefs_autosave_get_reflect(Eo *obj) +__eolian_elm_prefs_autosave_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_prefs_autosave_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h index 2131bd8edf..cf9b553c12 100644 --- a/src/lib/elementary/elm_priv.h +++ b/src/lib/elementary/elm_priv.h @@ -899,6 +899,8 @@ extern const char SIG_WIDGET_ACCESS_CHANGED[]; extern const char SIG_LAYOUT_FOCUSED[]; extern const char SIG_LAYOUT_UNFOCUSED[]; +extern Eina_Stringshare *_property_style_ss; + extern Eina_Bool _config_profile_lock; # ifdef HAVE_ELEMENTARY_WL2 diff --git a/src/lib/elementary/elm_separator_eo.c b/src/lib/elementary/elm_separator_eo.c index 1f8206fe6b..5dc45a041a 100644 --- a/src/lib/elementary/elm_separator_eo.c +++ b/src/lib/elementary/elm_separator_eo.c @@ -23,7 +23,7 @@ Eina_Bool _elm_separator_horizontal_get(const Eo *obj, Elm_Separator_Data *pd); static Eina_Value -__eolian_elm_separator_horizontal_get_reflect(Eo *obj) +__eolian_elm_separator_horizontal_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_separator_horizontal_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_slideshow_eo.c b/src/lib/elementary/elm_slideshow_eo.c index 145b94babf..8860bf95e6 100644 --- a/src/lib/elementary/elm_slideshow_eo.c +++ b/src/lib/elementary/elm_slideshow_eo.c @@ -27,7 +27,7 @@ int _elm_slideshow_cache_after_get(const Eo *obj, Elm_Slideshow_Data *pd); static Eina_Value -__eolian_elm_slideshow_cache_after_get_reflect(Eo *obj) +__eolian_elm_slideshow_cache_after_get_reflect(const Eo *obj) { int val = elm_obj_slideshow_cache_after_get(obj); return eina_value_int_init(val); @@ -59,7 +59,7 @@ int _elm_slideshow_cache_before_get(const Eo *obj, Elm_Slideshow_Data *pd); static Eina_Value -__eolian_elm_slideshow_cache_before_get_reflect(Eo *obj) +__eolian_elm_slideshow_cache_before_get_reflect(const Eo *obj) { int val = elm_obj_slideshow_cache_before_get(obj); return eina_value_int_init(val); @@ -91,7 +91,7 @@ const char *_elm_slideshow_layout_get(const Eo *obj, Elm_Slideshow_Data *pd); static Eina_Value -__eolian_elm_slideshow_layout_get_reflect(Eo *obj) +__eolian_elm_slideshow_layout_get_reflect(const Eo *obj) { const char *val = elm_obj_slideshow_layout_get(obj); return eina_value_string_init(val); @@ -123,7 +123,7 @@ const char *_elm_slideshow_transition_get(const Eo *obj, Elm_Slideshow_Data *pd) static Eina_Value -__eolian_elm_slideshow_transition_get_reflect(Eo *obj) +__eolian_elm_slideshow_transition_get_reflect(const Eo *obj) { const char *val = elm_obj_slideshow_transition_get(obj); return eina_value_string_init(val); @@ -155,7 +155,7 @@ Eina_Bool _elm_slideshow_items_loop_get(const Eo *obj, Elm_Slideshow_Data *pd); static Eina_Value -__eolian_elm_slideshow_items_loop_get_reflect(Eo *obj) +__eolian_elm_slideshow_items_loop_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_slideshow_items_loop_get(obj); return eina_value_bool_init(val); @@ -187,7 +187,7 @@ double _elm_slideshow_timeout_get(const Eo *obj, Elm_Slideshow_Data *pd); static Eina_Value -__eolian_elm_slideshow_timeout_get_reflect(Eo *obj) +__eolian_elm_slideshow_timeout_get_reflect(const Eo *obj) { double val = elm_obj_slideshow_timeout_get(obj); return eina_value_double_init(val); diff --git a/src/lib/elementary/elm_spinner_eo.c b/src/lib/elementary/elm_spinner_eo.c index 3a616dcd04..d8ac147ba0 100644 --- a/src/lib/elementary/elm_spinner_eo.c +++ b/src/lib/elementary/elm_spinner_eo.c @@ -35,7 +35,7 @@ Eina_Bool _elm_spinner_wrap_get(const Eo *obj, Elm_Spinner_Data *pd); static Eina_Value -__eolian_elm_spinner_wrap_get_reflect(Eo *obj) +__eolian_elm_spinner_wrap_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_spinner_wrap_get(obj); return eina_value_bool_init(val); @@ -67,7 +67,7 @@ double _elm_spinner_interval_get(const Eo *obj, Elm_Spinner_Data *pd); static Eina_Value -__eolian_elm_spinner_interval_get_reflect(Eo *obj) +__eolian_elm_spinner_interval_get_reflect(const Eo *obj) { double val = elm_obj_spinner_interval_get(obj); return eina_value_double_init(val); @@ -99,7 +99,7 @@ int _elm_spinner_round_get(const Eo *obj, Elm_Spinner_Data *pd); static Eina_Value -__eolian_elm_spinner_round_get_reflect(Eo *obj) +__eolian_elm_spinner_round_get_reflect(const Eo *obj) { int val = elm_obj_spinner_round_get(obj); return eina_value_int_init(val); @@ -131,7 +131,7 @@ Eina_Bool _elm_spinner_editable_get(const Eo *obj, Elm_Spinner_Data *pd); static Eina_Value -__eolian_elm_spinner_editable_get_reflect(Eo *obj) +__eolian_elm_spinner_editable_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_spinner_editable_get(obj); return eina_value_bool_init(val); @@ -163,7 +163,7 @@ double _elm_spinner_base_get(const Eo *obj, Elm_Spinner_Data *pd); static Eina_Value -__eolian_elm_spinner_base_get_reflect(Eo *obj) +__eolian_elm_spinner_base_get_reflect(const Eo *obj) { double val = elm_obj_spinner_base_get(obj); return eina_value_double_init(val); @@ -195,7 +195,7 @@ const char *_elm_spinner_label_format_get(const Eo *obj, Elm_Spinner_Data *pd); static Eina_Value -__eolian_elm_spinner_label_format_get_reflect(Eo *obj) +__eolian_elm_spinner_label_format_get_reflect(const Eo *obj) { const char *val = elm_obj_spinner_label_format_get(obj); return eina_value_string_init(val); diff --git a/src/lib/elementary/elm_systray_eo.c b/src/lib/elementary/elm_systray_eo.c index 0207773f38..ca5dba3c93 100644 --- a/src/lib/elementary/elm_systray_eo.c +++ b/src/lib/elementary/elm_systray_eo.c @@ -23,7 +23,7 @@ const char *_elm_systray_id_get(const Eo *obj, void *pd); static Eina_Value -__eolian_elm_systray_id_get_reflect(Eo *obj) +__eolian_elm_systray_id_get_reflect(const Eo *obj) { const char *val = elm_obj_systray_id_get(obj); return eina_value_string_init(val); @@ -63,7 +63,7 @@ const char *_elm_systray_icon_theme_path_get(const Eo *obj, void *pd); static Eina_Value -__eolian_elm_systray_icon_theme_path_get_reflect(Eo *obj) +__eolian_elm_systray_icon_theme_path_get_reflect(const Eo *obj) { const char *val = elm_obj_systray_icon_theme_path_get(obj); return eina_value_string_init(val); @@ -103,7 +103,7 @@ const char *_elm_systray_att_icon_name_get(const Eo *obj, void *pd); static Eina_Value -__eolian_elm_systray_att_icon_name_get_reflect(Eo *obj) +__eolian_elm_systray_att_icon_name_get_reflect(const Eo *obj) { const char *val = elm_obj_systray_att_icon_name_get(obj); return eina_value_string_init(val); @@ -143,7 +143,7 @@ const char *_elm_systray_icon_name_get(const Eo *obj, void *pd); static Eina_Value -__eolian_elm_systray_icon_name_get_reflect(Eo *obj) +__eolian_elm_systray_icon_name_get_reflect(const Eo *obj) { const char *val = elm_obj_systray_icon_name_get(obj); return eina_value_string_init(val); @@ -175,7 +175,7 @@ const char *_elm_systray_title_get(const Eo *obj, void *pd); static Eina_Value -__eolian_elm_systray_title_get_reflect(Eo *obj) +__eolian_elm_systray_title_get_reflect(const Eo *obj) { const char *val = elm_obj_systray_title_get(obj); return eina_value_string_init(val); diff --git a/src/lib/elementary/elm_table_eo.c b/src/lib/elementary/elm_table_eo.c index d850fa4931..9f0e01f5d7 100644 --- a/src/lib/elementary/elm_table_eo.c +++ b/src/lib/elementary/elm_table_eo.c @@ -23,7 +23,7 @@ Eina_Bool _elm_table_homogeneous_get(const Eo *obj, void *pd); static Eina_Value -__eolian_elm_table_homogeneous_get_reflect(Eo *obj) +__eolian_elm_table_homogeneous_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_table_homogeneous_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index 8affc3c597..9e0358bfd4 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_UNSELECTED, EO_OBJ(item)); + efl_event_callback_legacy_call(WIDGET(item), EFL_UI_EVENT_SELECTABLE_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_SELECTED, EO_OBJ(it)); + efl_event_callback_legacy_call(obj, EFL_UI_EVENT_SELECTABLE_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_toolbar_eo.c b/src/lib/elementary/elm_toolbar_eo.c index ee20e4605e..0589b9aa71 100644 --- a/src/lib/elementary/elm_toolbar_eo.c +++ b/src/lib/elementary/elm_toolbar_eo.c @@ -43,7 +43,7 @@ Eina_Bool _elm_toolbar_homogeneous_get(const Eo *obj, Elm_Toolbar_Data *pd); static Eina_Value -__eolian_elm_toolbar_homogeneous_get_reflect(Eo *obj) +__eolian_elm_toolbar_homogeneous_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_toolbar_homogeneous_get(obj); return eina_value_bool_init(val); @@ -75,7 +75,7 @@ double _elm_toolbar_align_get(const Eo *obj, Elm_Toolbar_Data *pd); static Eina_Value -__eolian_elm_toolbar_align_get_reflect(Eo *obj) +__eolian_elm_toolbar_align_get_reflect(const Eo *obj) { double val = elm_obj_toolbar_align_get(obj); return eina_value_double_init(val); @@ -115,7 +115,7 @@ int _elm_toolbar_icon_size_get(const Eo *obj, Elm_Toolbar_Data *pd); static Eina_Value -__eolian_elm_toolbar_icon_size_get_reflect(Eo *obj) +__eolian_elm_toolbar_icon_size_get_reflect(const Eo *obj) { int val = elm_obj_toolbar_icon_size_get(obj); return eina_value_int_init(val); @@ -163,7 +163,7 @@ int _elm_toolbar_standard_priority_get(const Eo *obj, Elm_Toolbar_Data *pd); static Eina_Value -__eolian_elm_toolbar_standard_priority_get_reflect(Eo *obj) +__eolian_elm_toolbar_standard_priority_get_reflect(const Eo *obj) { int val = elm_obj_toolbar_standard_priority_get(obj); return eina_value_int_init(val); diff --git a/src/lib/elementary/elm_toolbar_item_eo.c b/src/lib/elementary/elm_toolbar_item_eo.c index 59d22dbcd3..14a916d508 100644 --- a/src/lib/elementary/elm_toolbar_item_eo.c +++ b/src/lib/elementary/elm_toolbar_item_eo.c @@ -31,7 +31,7 @@ Eina_Bool _elm_toolbar_item_selected_get(const Eo *obj, Elm_Toolbar_Item_Data *p static Eina_Value -__eolian_elm_toolbar_item_selected_get_reflect(Eo *obj) +__eolian_elm_toolbar_item_selected_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_toolbar_item_selected_get(obj); return eina_value_bool_init(val); @@ -63,7 +63,7 @@ int _elm_toolbar_item_priority_get(const Eo *obj, Elm_Toolbar_Item_Data *pd); static Eina_Value -__eolian_elm_toolbar_item_priority_get_reflect(Eo *obj) +__eolian_elm_toolbar_item_priority_get_reflect(const Eo *obj) { int val = elm_obj_toolbar_item_priority_get(obj); return eina_value_int_init(val); @@ -95,7 +95,7 @@ const char *_elm_toolbar_item_icon_get(const Eo *obj, Elm_Toolbar_Item_Data *pd) static Eina_Value -__eolian_elm_toolbar_item_icon_get_reflect(Eo *obj) +__eolian_elm_toolbar_item_icon_get_reflect(const Eo *obj) { const char *val = elm_obj_toolbar_item_icon_get(obj); return eina_value_string_init(val); @@ -135,7 +135,7 @@ Eina_Bool _elm_toolbar_item_separator_get(const Eo *obj, Elm_Toolbar_Item_Data * static Eina_Value -__eolian_elm_toolbar_item_separator_get_reflect(Eo *obj) +__eolian_elm_toolbar_item_separator_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_toolbar_item_separator_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_web_eo.c b/src/lib/elementary/elm_web_eo.c index 20d25eef52..227698359c 100644 --- a/src/lib/elementary/elm_web_eo.c +++ b/src/lib/elementary/elm_web_eo.c @@ -17,7 +17,7 @@ __eolian_elm_web_text_matches_highlight_set_reflect(Eo *obj, Eina_Value val) EOAPI EFL_FUNC_BODYV(elm_obj_web_text_matches_highlight_set, Eina_Bool, 0, EFL_FUNC_CALL(highlight), Eina_Bool highlight); static Eina_Value -__eolian_elm_web_text_matches_highlight_get_reflect(Eo *obj) +__eolian_elm_web_text_matches_highlight_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_web_text_matches_highlight_get(obj); return eina_value_bool_init(val); @@ -43,7 +43,7 @@ __eolian_elm_web_useragent_set_reflect(Eo *obj, Eina_Value val) EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_useragent_set, EFL_FUNC_CALL(user_agent), const char *user_agent); static Eina_Value -__eolian_elm_web_useragent_get_reflect(Eo *obj) +__eolian_elm_web_useragent_get_reflect(const Eo *obj) { const char *val = elm_obj_web_useragent_get(obj); return eina_value_string_init(val); @@ -69,7 +69,7 @@ __eolian_elm_web_url_set_reflect(Eo *obj, Eina_Value val) EOAPI EFL_FUNC_BODYV(elm_obj_web_url_set, Eina_Bool, 0, EFL_FUNC_CALL(url), const char *url); static Eina_Value -__eolian_elm_web_url_get_reflect(Eo *obj) +__eolian_elm_web_url_get_reflect(const Eo *obj) { const char *val = elm_obj_web_url_get(obj); return eina_value_string_init(val); @@ -97,7 +97,7 @@ __eolian_elm_web_inwin_mode_set_reflect(Eo *obj, Eina_Value val) EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_inwin_mode_set, EFL_FUNC_CALL(value), Eina_Bool value); static Eina_Value -__eolian_elm_web_inwin_mode_get_reflect(Eo *obj) +__eolian_elm_web_inwin_mode_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_web_inwin_mode_get(obj); return eina_value_bool_init(val); @@ -123,7 +123,7 @@ __eolian_elm_web_tab_propagate_set_reflect(Eo *obj, Eina_Value val) EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_tab_propagate_set, EFL_FUNC_CALL(propagate), Eina_Bool propagate); static Eina_Value -__eolian_elm_web_tab_propagate_get_reflect(Eo *obj) +__eolian_elm_web_tab_propagate_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_web_tab_propagate_get(obj); return eina_value_bool_init(val); @@ -149,7 +149,7 @@ __eolian_elm_web_history_enabled_set_reflect(Eo *obj, Eina_Value val) EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_history_enabled_set, EFL_FUNC_CALL(enable), Eina_Bool enable); static Eina_Value -__eolian_elm_web_history_enabled_get_reflect(Eo *obj) +__eolian_elm_web_history_enabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_obj_web_history_enabled_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h index 0b8a5df5cb..f6eb21cec7 100644 --- a/src/lib/elementary/elm_widget.h +++ b/src/lib/elementary/elm_widget.h @@ -383,6 +383,11 @@ typedef struct _Elm_Widget_Smart_Data Evas_Object *prev, *next, *up, *down, *right, *left; Elm_Object_Item *item_prev, *item_next, *item_up, *item_down, *item_right, *item_left; } legacy_focus; + struct { + Efl_Model *model; + Eina_Hash *model_lookup; + Eina_Hash *view_lookup; + } properties; Eina_Bool scroll_x_locked : 1; Eina_Bool scroll_y_locked : 1; diff --git a/src/lib/elementary/elm_widget_item_eo.c b/src/lib/elementary/elm_widget_item_eo.c index 45a874259a..eba2455017 100644 --- a/src/lib/elementary/elm_widget_item_eo.c +++ b/src/lib/elementary/elm_widget_item_eo.c @@ -23,7 +23,7 @@ Eina_Bool _elm_widget_item_tooltip_window_mode_get(const Eo *obj, Elm_Widget_Ite static Eina_Value -__eolian_elm_widget_item_tooltip_window_mode_get_reflect(Eo *obj) +__eolian_elm_widget_item_tooltip_window_mode_get_reflect(const Eo *obj) { Eina_Bool val = elm_wdg_item_tooltip_window_mode_get(obj); return eina_value_bool_init(val); @@ -55,7 +55,7 @@ const char *_elm_widget_item_tooltip_style_get(const Eo *obj, Elm_Widget_Item_Da static Eina_Value -__eolian_elm_widget_item_tooltip_style_get_reflect(Eo *obj) +__eolian_elm_widget_item_tooltip_style_get_reflect(const Eo *obj) { const char *val = elm_wdg_item_tooltip_style_get(obj); return eina_value_string_init(val); @@ -87,7 +87,7 @@ const char *_elm_widget_item_cursor_get(const Eo *obj, Elm_Widget_Item_Data *pd) static Eina_Value -__eolian_elm_widget_item_cursor_get_reflect(Eo *obj) +__eolian_elm_widget_item_cursor_get_reflect(const Eo *obj) { const char *val = elm_wdg_item_cursor_get(obj); return eina_value_string_init(val); @@ -119,7 +119,7 @@ const char *_elm_widget_item_cursor_style_get(const Eo *obj, Elm_Widget_Item_Dat static Eina_Value -__eolian_elm_widget_item_cursor_style_get_reflect(Eo *obj) +__eolian_elm_widget_item_cursor_style_get_reflect(const Eo *obj) { const char *val = elm_wdg_item_cursor_style_get(obj); return eina_value_string_init(val); @@ -151,7 +151,7 @@ Eina_Bool _elm_widget_item_cursor_engine_only_get(const Eo *obj, Elm_Widget_Item static Eina_Value -__eolian_elm_widget_item_cursor_engine_only_get_reflect(Eo *obj) +__eolian_elm_widget_item_cursor_engine_only_get_reflect(const Eo *obj) { Eina_Bool val = elm_wdg_item_cursor_engine_only_get(obj); return eina_value_bool_init(val); @@ -207,7 +207,7 @@ Eina_Bool _elm_widget_item_item_focus_get(const Eo *obj, Elm_Widget_Item_Data *p static Eina_Value -__eolian_elm_widget_item_item_focus_get_reflect(Eo *obj) +__eolian_elm_widget_item_item_focus_get_reflect(const Eo *obj) { Eina_Bool val = elm_wdg_item_focus_get(obj); return eina_value_bool_init(val); @@ -239,7 +239,7 @@ const char *_elm_widget_item_style_get(const Eo *obj, Elm_Widget_Item_Data *pd); static Eina_Value -__eolian_elm_widget_item_style_get_reflect(Eo *obj) +__eolian_elm_widget_item_style_get_reflect(const Eo *obj) { const char *val = elm_wdg_item_style_get(obj); return eina_value_string_init(val); @@ -271,7 +271,7 @@ Eina_Bool _elm_widget_item_disabled_get(const Eo *obj, Elm_Widget_Item_Data *pd) static Eina_Value -__eolian_elm_widget_item_disabled_get_reflect(Eo *obj) +__eolian_elm_widget_item_disabled_get_reflect(const Eo *obj) { Eina_Bool val = elm_wdg_item_disabled_get(obj); return eina_value_bool_init(val); diff --git a/src/lib/elementary/elm_widget_layout.h b/src/lib/elementary/elm_widget_layout.h index 827398fec6..4fda71cdba 100644 --- a/src/lib/elementary/elm_widget_layout.h +++ b/src/lib/elementary/elm_widget_layout.h @@ -58,7 +58,6 @@ typedef struct _Elm_Layout_Smart_Data Eina_Hash *properties; /**< The list of properties connected to layout parts. */ Eina_Hash *signals; /**< The list of signals connected. */ Eina_Hash *factories; /**< The hash with parts connected to factories. */ - Efl_Model *model; /**< The model */ Eina_Bool updating : 1; } connect; diff --git a/src/lib/emile/Emile.h b/src/lib/emile/Emile.h index 741905ef2f..e517b6bb48 100644 --- a/src/lib/emile/Emile.h +++ b/src/lib/emile/Emile.h @@ -20,7 +20,6 @@ #define EMILE_H_ #include -#include #ifdef EAPI # undef EAPI diff --git a/src/lib/emile/emile_image.h b/src/lib/emile/emile_image.h index 3c1c6f2333..8877a6008e 100644 --- a/src/lib/emile/emile_image.h +++ b/src/lib/emile/emile_image.h @@ -9,29 +9,39 @@ * @{ */ -typedef Efl_Gfx_Colorspace Emile_Colorspace; - -#define EMILE_COLORSPACE_ARGB8888 EFL_GFX_COLORSPACE_ARGB8888 -#define EMILE_COLORSPACE_YCBCR422P601_PL EFL_GFX_COLORSPACE_YCBCR422P601_PL -#define EMILE_COLORSPACE_YCBCR422P709_PL EFL_GFX_COLORSPACE_YCBCR422P709_PL -#define EMILE_COLORSPACE_RGB565_A5P EFL_GFX_COLORSPACE_RGB565_A5P -#define EMILE_COLORSPACE_GRY8 EFL_GFX_COLORSPACE_GRY8 -#define EMILE_COLORSPACE_YCBCR422601_PL EFL_GFX_COLORSPACE_YCBCR422601_PL -#define EMILE_COLORSPACE_YCBCR420NV12601_PL EFL_GFX_COLORSPACE_YCBCR420NV12601_PL -#define EMILE_COLORSPACE_YCBCR420TM12601_PL EFL_GFX_COLORSPACE_YCBCR420TM12601_PL -#define EMILE_COLORSPACE_AGRY88 EFL_GFX_COLORSPACE_AGRY88 - // ETC1/2 support -#define EMILE_COLORSPACE_ETC1 EFL_GFX_COLORSPACE_ETC1 -#define EMILE_COLORSPACE_RGB8_ETC2 EFL_GFX_COLORSPACE_RGB8_ETC2 -#define EMILE_COLORSPACE_RGBA8_ETC2_EAC EFL_GFX_COLORSPACE_RGBA8_ETC2_EAC -#define EMILE_COLORSPACE_ETC1_ALPHA EFL_GFX_COLORSPACE_ETC1_ALPHA - // S3TC support -#define EMILE_COLORSPACE_RGB_S3TC_DXT1 EFL_GFX_COLORSPACE_RGB_S3TC_DXT1 -#define EMILE_COLORSPACE_RGBA_S3TC_DXT1 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT1 -#define EMILE_COLORSPACE_RGBA_S3TC_DXT2 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT2 -#define EMILE_COLORSPACE_RGBA_S3TC_DXT3 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT3 -#define EMILE_COLORSPACE_RGBA_S3TC_DXT4 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT4 -#define EMILE_COLORSPACE_RGBA_S3TC_DXT5 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT5 +/** + * @typedef Emile_Colorspace + * + * Flags that describe all colorspace known by EFL. Some routine may not know all of them. + * All the value from below enum should be the same as in Evas_Loader.h + * + * @see Evas_Colorspace + * @see Eet_Colorspace + * + * @since 1.14 + */ +typedef enum _Emile_Colorspace +{ + EMILE_COLORSPACE_ARGB8888,/**< ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */ + EMILE_COLORSPACE_YCBCR422P601_PL, /**< YCbCr 4:2:2 Planar, ITU.BT-601 specifications. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */ + EMILE_COLORSPACE_YCBCR422P709_PL, /**< YCbCr 4:2:2 Planar, ITU.BT-709 specifications. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */ + EMILE_COLORSPACE_RGB565_A5P, /**< 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */ + EMILE_COLORSPACE_GRY8 = 4, + EMILE_COLORSPACE_YCBCR422601_PL, /**< YCbCr 4:2:2, ITU.BT-601 specifications. The data pointed to is just an array of row pointer, pointing to line of Y,Cb,Y,Cr bytes */ + EMILE_COLORSPACE_YCBCR420NV12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb,Cr rows. */ + EMILE_COLORSPACE_YCBCR420TM12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of tiled row pointer, pointing to the Y rows, then the Cb,Cr rows. */ + EMILE_COLORSPACE_AGRY88 = 8, /**< AY 8bits Alpha and 8bits Grey, accessed 1 16bits at a time */ + EMILE_COLORSPACE_ETC1 = 9, /**< OpenGL ETC1 encoding of RGB texture (4 bit per pixel) @since 1.10 */ + EMILE_COLORSPACE_RGB8_ETC2 = 10, /**< OpenGL GL_COMPRESSED_RGB8_ETC2 texture compression format (4 bit per pixel) @since 1.10 */ + EMILE_COLORSPACE_RGBA8_ETC2_EAC = 11, /**< OpenGL GL_COMPRESSED_RGBA8_ETC2_EAC texture compression format, supports alpha (8 bit per pixel) @since 1.10 */ + EMILE_COLORSPACE_ETC1_ALPHA = 12, /**< ETC1 with alpha support using two planes: ETC1 RGB and ETC1 grey for alpha @since 1.11 */ + EMILE_COLORSPACE_RGB_S3TC_DXT1 = 13, /**< OpenGL COMPRESSED_RGB_S3TC_DXT1_EXT format with RGB only. @since 1.11 */ + EMILE_COLORSPACE_RGBA_S3TC_DXT1 = 14, /**< OpenGL COMPRESSED_RGBA_S3TC_DXT1_EXT format with RGBA punchthrough. @since 1.11 */ + EMILE_COLORSPACE_RGBA_S3TC_DXT2 = 15, /**< DirectDraw DXT2 format with premultiplied RGBA. Not supported by OpenGL itself. @since 1.11 */ + EMILE_COLORSPACE_RGBA_S3TC_DXT3 = 16, /**< OpenGL COMPRESSED_RGBA_S3TC_DXT3_EXT format with RGBA. @since 1.11 */ + EMILE_COLORSPACE_RGBA_S3TC_DXT4 = 17, /**< DirectDraw DXT4 format with premultiplied RGBA. Not supported by OpenGL itself. @since 1.11 */ + EMILE_COLORSPACE_RGBA_S3TC_DXT5 = 18 /**< OpenGL COMPRESSED_RGBA_S3TC_DXT5_EXT format with RGBA. @since 1.11 */ +} Emile_Colorspace; /** * @typedef Emile_Image_Encoding diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index a43baef9b5..ea865a8d2d 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -832,7 +832,7 @@ typedef Eina_Error (*Efl_Object_Property_Reflection_Setter)(Eo *obj, Eina_Value /** * Getter type which is used to get an #Eina_Value, this function should access one particular property field */ -typedef Eina_Value (*Efl_Object_Property_Reflection_Getter)(Eo *obj); +typedef Eina_Value (*Efl_Object_Property_Reflection_Getter)(const Eo *obj); /** * @struct _Efl_Object_Property_Reflection @@ -1997,7 +1997,7 @@ EAPI Eina_Error efl_property_reflection_set(Eo *obj, const char *property_name, * * @see efl_property_reflection_set() and efl_property_reflection_exist() */ -EAPI Eina_Value efl_property_reflection_get(Eo *obj, const char *property_name); +EAPI Eina_Value efl_property_reflection_get(const Eo *obj, const char *property_name); /** * @brief Check if a property exist for reflection. diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 76bebef023..301a015859 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -3630,7 +3630,10 @@ _efl_class_reflection_find(const _Efl_Class *klass, const char *property_name) for (; *klass_iter; klass_iter++) { - return _efl_class_reflection_find(*klass_iter, property_name); + const Efl_Object_Property_Reflection *ref; + + ref = _efl_class_reflection_find(*klass_iter, property_name); + if (ref) return ref; } return NULL; @@ -3658,7 +3661,7 @@ efl_property_reflection_set(Eo *obj_id, const char *property_name, Eina_Value va } EAPI Eina_Value -efl_property_reflection_get(Eo *obj_id, const char *property_name) +efl_property_reflection_get(const Eo *obj_id, const char *property_name) { Eina_Value r = eina_value_error_init(EINA_ERROR_NOT_IMPLEMENTED); diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index aebe165f57..20979ec99b 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -702,6 +702,19 @@ EAPI const char *eolian_object_short_name_get(const Eolian_Object *obj); */ EAPI Eina_Iterator *eolian_object_namespaces_get(const Eolian_Object *obj); +/* + * @brief Get whether an object is beta. + * + * This applies to toplevel objects (classes, types) as well as some + * others such as functions and events. + * + * @param[in] obj The object. + * @return EINA_TRUE and EINA_FALSE respectively + * + * @ingroup Eolian + */ +EAPI Eina_Bool eolian_object_is_beta(const Eolian_Object *obj); + /* * @brief Scan the given directory for .eo and .eot files. * @@ -1407,16 +1420,6 @@ EAPI Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass); */ EAPI const Eolian_Documentation *eolian_class_documentation_get(const Eolian_Class *klass); -/* - * @brief Returns the legacy prefix of a class - * - * @param[in] klass the class - * @return the legacy prefix - * - * @ingroup Eolian - */ -EAPI Eina_Stringshare *eolian_class_legacy_prefix_get(const Eolian_Class *klass); - /* * @brief Returns the eo prefix of a class * @@ -1546,22 +1549,20 @@ eolian_function_name_get(const Eolian_Function *fid) * * @param[in] function_id Id of the function * @param[in] ftype The type of function to get the name for - * @param[in] use_legacy If true, legacy prefix or name will be used when available * @return the function name * * It's here because the C API names are deduplicated (prefix of function and * suffix of prefix merge if applicable) and this helps generators not write * the same code over and over. * - * If legacy name is supplied for the given type and use_legacy is set, it - * will be used. Also, if the given type is PROP_GET or PROPERTY, a "_get" - * suffix will be applied when not using legacy name, and "_set" for PROP_SET. + * If the given type is PROP_GET or PROPERTY, a "_get" suffix will be applied, + * and "_set" for PROP_SET. * * Also, you're responsible for deleting the stringshare. * * @ingroup Eolian */ -EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype, Eina_Bool use_legacy); +EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype); /* * @brief Get a function in a class by its name and type @@ -1579,19 +1580,6 @@ EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *fu */ EAPI const Eolian_Function *eolian_class_function_by_name_get(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type); -/* - * @brief Returns a legacy name for a function. - * - * @param[in] function_id Id of the function - * @param[in] f_type The function type, for property get/set distinction. - * @return the legacy name or NULL. - * - * Acceptable input types are METHOD, PROP_GET and PROP_SET. - * - * @ingroup Eolian - */ -EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type); - /* * @brief Returns the implement for a function. * @@ -1602,19 +1590,6 @@ EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *functio */ EAPI const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id); -/* - * @brief Indicates if a function is legacy only. - * - * @param[in] function_id Id of the function - * @param[in] f_type The function type, for property get/set distinction. - * @return EINA_TRUE if legacy only, EINA_FALSE otherwise. - * - * Acceptable input types are METHOD, PROP_GET and PROP_SET. - * - * @ingroup Eolian - */ -EAPI Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype); - /* * @brief Get whether a function is a class method/property. * @@ -1628,12 +1603,15 @@ EAPI Eina_Bool eolian_function_is_class(const Eolian_Function *function_id); /* * @brief Get whether a function is beta. * - * @param[in] function_id Id of the function - * @return EINA_TRUE and EINA_FALSE respectively + * @see eolian_object_is_beta * * @ingroup Eolian */ -EAPI Eina_Bool eolian_function_is_beta(const Eolian_Function *function_id); +static inline Eina_Bool +eolian_function_is_beta(const Eolian_Function *function_id) +{ + return eolian_object_is_beta(EOLIAN_OBJECT(function_id)); +} /* * @brief Indicates if a function is a constructing function of a given class. @@ -2133,12 +2111,15 @@ EAPI Eolian_Object_Scope eolian_event_scope_get(const Eolian_Event *event); /* * @brief Get whether an event is beta. * - * @param[in] event the event handle - * @return EINA_TRUE and EINA_FALSE respectively + * @see eolian_object_is_beta * * @ingroup Eolian */ -EAPI Eina_Bool eolian_event_is_beta(const Eolian_Event *event); +static inline Eina_Bool +eolian_event_is_beta(const Eolian_Event *event) +{ + return eolian_object_is_beta(EOLIAN_OBJECT(event)); +} /* * @brief Get whether an event is hot (unfreezable). @@ -2303,12 +2284,15 @@ EAPI Eina_Stringshare *eolian_class_c_data_type_get(const Eolian_Class *klass); /* * @brief Get whether a class is beta. * - * @param[in] klass the class - * @return EINA_TRUE if the class has been marked as BETA + * @see eolian_object_is_beta * * @ingroup Eolian */ -EAPI Eina_Bool eolian_class_is_beta(const Eolian_Class *klass); +static inline Eina_Bool +eolian_class_is_beta(const Eolian_Class *klass) +{ + return eolian_object_is_beta(EOLIAN_OBJECT(klass)); +} /* * @brief Get the type of a type declaration. @@ -2505,6 +2489,19 @@ EAPI const Eolian_Type *eolian_typedecl_aliased_base_get(const Eolian_Typedecl * */ EAPI Eina_Bool eolian_typedecl_is_extern(const Eolian_Typedecl *tp); +/* + * @brief Get whether a typedecl is beta. + * + * @see eolian_object_is_beta + * + * @ingroup Eolian + */ +static inline Eina_Bool +eolian_typedecl_is_beta(const Eolian_Typedecl *tp) +{ + return eolian_object_is_beta(EOLIAN_OBJECT(tp)); +} + /* * @brief Get the full C type name of the given type. * @@ -3006,6 +3003,19 @@ eolian_variable_namespaces_get(const Eolian_Variable *tp) */ EAPI Eina_Bool eolian_variable_is_extern(const Eolian_Variable *var); +/* + * @brief Get whether a variable is beta. + * + * @see eolian_object_is_beta + * + * @ingroup Eolian + */ +static inline Eina_Bool +eolian_variable_is_beta(const Eolian_Variable *var) +{ + return eolian_object_is_beta(EOLIAN_OBJECT(var)); +} + /* * @brief Get the summary of the documentation. * diff --git a/src/lib/eolian/database_class.c b/src/lib/eolian/database_class.c index a28d36b42e..34551d3c80 100644 --- a/src/lib/eolian/database_class.c +++ b/src/lib/eolian/database_class.c @@ -33,7 +33,6 @@ database_class_del(Eolian_Class *cl) eina_list_free(cl->callables); eina_list_free(cl->composite); - if (cl->legacy_prefix) eina_stringshare_del(cl->legacy_prefix); if (cl->eo_prefix) eina_stringshare_del(cl->eo_prefix); if (cl->ev_prefix) eina_stringshare_del(cl->ev_prefix); if (cl->data_type) eina_stringshare_del(cl->data_type); diff --git a/src/lib/eolian/database_class_api.c b/src/lib/eolian/database_class_api.c index 73d013672b..fa7d36b541 100644 --- a/src/lib/eolian/database_class_api.c +++ b/src/lib/eolian/database_class_api.c @@ -20,13 +20,6 @@ eolian_class_documentation_get(const Eolian_Class *cl) return cl->doc; } -EAPI Eina_Stringshare* -eolian_class_legacy_prefix_get(const Eolian_Class *cl) -{ - EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL); - return cl->legacy_prefix; -} - EAPI Eina_Stringshare* eolian_class_eo_prefix_get(const Eolian_Class *cl) { @@ -228,10 +221,3 @@ eolian_class_c_data_type_get(const Eolian_Class *cl) *p = '_'; return eina_stringshare_add(buf); } - -EAPI Eina_Bool -eolian_class_is_beta(const Eolian_Class *cl) -{ - EINA_SAFETY_ON_NULL_RETURN_VAL(cl, EINA_FALSE); - return cl->is_beta; -} diff --git a/src/lib/eolian/database_event_api.c b/src/lib/eolian/database_event_api.c index 97c8df8b9c..74f69cd411 100644 --- a/src/lib/eolian/database_event_api.c +++ b/src/lib/eolian/database_event_api.c @@ -35,13 +35,6 @@ eolian_event_scope_get(const Eolian_Event *event) return event->scope; } -EAPI Eina_Bool -eolian_event_is_beta(const Eolian_Event *event) -{ - EINA_SAFETY_ON_NULL_RETURN_VAL(event, EINA_FALSE); - return event->is_beta; -} - EAPI Eina_Bool eolian_event_is_hot(const Eolian_Event *event) { diff --git a/src/lib/eolian/database_function.c b/src/lib/eolian/database_function.c index 15187e93d7..c3b45d3954 100644 --- a/src/lib/eolian/database_function.c +++ b/src/lib/eolian/database_function.c @@ -25,8 +25,6 @@ database_function_del(Eolian_Function *fid) database_type_del(fid->set_ret_type); database_expr_del(fid->get_ret_val); database_expr_del(fid->set_ret_val); - if (fid->get_legacy) eina_stringshare_del(fid->get_legacy); - if (fid->set_legacy) eina_stringshare_del(fid->set_legacy); database_doc_del(fid->get_return_doc); database_doc_del(fid->set_return_doc); free(fid); diff --git a/src/lib/eolian/database_function_api.c b/src/lib/eolian/database_function_api.c index 05e7bf9e51..8a38443359 100644 --- a/src/lib/eolian/database_function_api.c +++ b/src/lib/eolian/database_function_api.c @@ -38,12 +38,10 @@ eolian_function_type_get(const Eolian_Function *fid) } static const char * -_get_eo_prefix(const Eolian_Function *foo_id, char *buf, Eina_Bool use_legacy) +_get_eo_prefix(const Eolian_Function *foo_id, char *buf) { char *tmp = buf; - if (use_legacy) - return foo_id->klass->legacy_prefix; - else if (foo_id->klass->eo_prefix) + if (foo_id->klass->eo_prefix) return foo_id->klass->eo_prefix; strcpy(buf, foo_id->klass->base.name); eina_str_tolower(&buf); @@ -86,36 +84,11 @@ _get_abbreviated_name(const char *prefix, const char *fname) EAPI Eina_Stringshare * eolian_function_full_c_name_get(const Eolian_Function *foo_id, - Eolian_Function_Type ftype, - Eina_Bool use_legacy) + Eolian_Function_Type ftype) { - switch (ftype) - { - case EOLIAN_UNRESOLVED: - case EOLIAN_METHOD: - case EOLIAN_PROPERTY: - case EOLIAN_PROP_GET: - case EOLIAN_FUNCTION_POINTER: - if (foo_id->get_legacy && use_legacy) - { - if (!strcmp(foo_id->get_legacy, "null")) - return NULL; - return eina_stringshare_ref(foo_id->get_legacy); - } - break; - case EOLIAN_PROP_SET: - if (foo_id->set_legacy && use_legacy) - { - if (!strcmp(foo_id->set_legacy, "null")) - return NULL; - return eina_stringshare_ref(foo_id->set_legacy); - } - break; - } - char tbuf[512]; tbuf[0] = '\0'; - const char *prefix = (ftype != EOLIAN_FUNCTION_POINTER) ? _get_eo_prefix(foo_id, tbuf, use_legacy): tbuf; + const char *prefix = (ftype != EOLIAN_FUNCTION_POINTER) ? _get_eo_prefix(foo_id, tbuf): tbuf; if (!prefix) return NULL; @@ -124,22 +97,6 @@ eolian_function_full_c_name_get(const Eolian_Function *foo_id, Eina_Strbuf *buf = eina_strbuf_new(); Eina_Stringshare *ret; - if (use_legacy) - { - eina_strbuf_append(buf, prefix); - eina_strbuf_append_char(buf, '_'); - eina_strbuf_append(buf, funcn); - - if ((ftype == EOLIAN_PROP_GET) || (ftype == EOLIAN_PROPERTY)) - eina_strbuf_append(buf, "_get"); - else if (ftype == EOLIAN_PROP_SET) - eina_strbuf_append(buf, "_set"); - - ret = eina_stringshare_add(eina_strbuf_string_get(buf)); - eina_strbuf_free(buf); - return ret; - } - char *abbr = _get_abbreviated_name(prefix, funcn); eina_strbuf_append(buf, abbr); free(abbr); @@ -154,31 +111,6 @@ eolian_function_full_c_name_get(const Eolian_Function *foo_id, return ret; } -EAPI Eina_Stringshare * -eolian_function_legacy_get(const Eolian_Function *fid, Eolian_Function_Type ftype) -{ - EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL); - EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, NULL); - EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, NULL); - switch (ftype) - { - case EOLIAN_METHOD: - if (fid->type != EOLIAN_METHOD) - return NULL; - return fid->get_legacy; - case EOLIAN_PROP_GET: - if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY)) - return NULL; - return fid->get_legacy; - case EOLIAN_PROP_SET: - if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY)) - return NULL; - return fid->set_legacy; - default: - return NULL; - } -} - EAPI const Eolian_Implement * eolian_function_implement_get(const Eolian_Function *fid) { @@ -186,31 +118,6 @@ eolian_function_implement_get(const Eolian_Function *fid) return fid->impl; } -EAPI Eina_Bool -eolian_function_is_legacy_only(const Eolian_Function *fid, Eolian_Function_Type ftype) -{ - EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE); - EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE); - EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE); - switch (ftype) - { - case EOLIAN_METHOD: - if (fid->type != EOLIAN_METHOD) - return EINA_FALSE; - return fid->get_only_legacy; - case EOLIAN_PROP_GET: - if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY)) - return EINA_FALSE; - return fid->get_only_legacy; - case EOLIAN_PROP_SET: - if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY)) - return EINA_FALSE; - return fid->set_only_legacy; - default: - return EINA_FALSE; - } -} - EAPI Eina_Bool eolian_function_is_class(const Eolian_Function *fid) { @@ -394,10 +301,3 @@ eolian_function_class_get(const Eolian_Function *fid) EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL); return fid->klass; } - -EAPI Eina_Bool -eolian_function_is_beta(const Eolian_Function *fid) -{ - EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE); - return fid->is_beta; -} diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c index 79343a39d4..529617e348 100644 --- a/src/lib/eolian/database_type.c +++ b/src/lib/eolian/database_type.c @@ -26,7 +26,6 @@ database_typedecl_del(Eolian_Typedecl *tp) database_type_del(tp->base_type); if (tp->fields) eina_hash_free(tp->fields); if (tp->field_list) eina_list_free(tp->field_list); - if (tp->legacy) eina_stringshare_del(tp->legacy); if (tp->freefunc) eina_stringshare_del(tp->freefunc); database_doc_del(tp->doc); free(tp); diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c index cdc31b0ebb..704299542b 100644 --- a/src/lib/eolian/database_validate.c +++ b/src/lib/eolian/database_validate.c @@ -11,10 +11,26 @@ typedef struct _Validate_State { Eina_Bool warned; + Eina_Bool stable; Eina_Bool event_redef; Eina_Bool unimplemented; } Validate_State; +static Eina_Bool +_set_stable(Validate_State *vals, Eina_Bool newval) +{ + Eina_Bool ret = vals->stable; + vals->stable = newval; + return ret; +} + +static Eina_Bool +_reset_stable(Validate_State *vals, Eina_Bool oldval, Eina_Bool ret) +{ + vals->stable = oldval; + return ret; +} + static Eina_Bool _validate(Eolian_Object *obj) { @@ -78,21 +94,6 @@ _class_is_legacy(Eolian_Class *klass) return !!strncmp(klass->base.name, "Efl.", strlen("Efl.")); } -static Eina_Bool -_validate_beta_usage(Eolian_Class *klass, Eolian_Type *type) -{ - if (!klass) return EINA_TRUE; - if (_class_is_legacy(klass)) return EINA_TRUE; - if (klass->is_beta) return EINA_TRUE; - - if (type->type == EOLIAN_TYPE_CLASS && type->klass->is_beta) - { - _eo_parser_log(&type->base, "beta class used in public API"); - return EINA_FALSE; - } - return EINA_TRUE; -} - static Eina_Bool _validate_doc(Eolian_Documentation *doc) { @@ -163,39 +164,48 @@ _validate_typedecl(Validate_State *vals, Eolian_Typedecl *tp) if (!_validate_doc(tp->doc)) return EINA_FALSE; + /* for the time being assume all typedecls are beta unless overridden */ + Eina_Bool was_stable = _set_stable(vals, !tp->base.is_beta); + switch (tp->type) { case EOLIAN_TYPEDECL_ALIAS: if (!_validate_type(vals, tp->base_type)) - return EINA_FALSE; + return _reset_stable(vals, was_stable, EINA_FALSE); if (!tp->freefunc && tp->base_type->freefunc) tp->freefunc = eina_stringshare_ref(tp->base_type->freefunc); + _reset_stable(vals, was_stable, EINA_TRUE); return _validate(&tp->base); case EOLIAN_TYPEDECL_STRUCT: { Cb_Ret rt = { vals, EINA_TRUE }; eina_hash_foreach(tp->fields, (Eina_Hash_Foreach)_sf_map_cb, &rt); if (!rt.succ) - return EINA_FALSE; + return _reset_stable(vals, was_stable, EINA_FALSE); + _reset_stable(vals, was_stable, EINA_TRUE); return _validate(&tp->base); } case EOLIAN_TYPEDECL_STRUCT_OPAQUE: + _reset_stable(vals, was_stable, EINA_TRUE); return _validate(&tp->base); case EOLIAN_TYPEDECL_ENUM: { Cb_Ret rt = { vals, EINA_TRUE }; eina_hash_foreach(tp->fields, (Eina_Hash_Foreach)_ef_map_cb, &rt); if (!rt.succ) - return EINA_FALSE; + return _reset_stable(vals, was_stable, EINA_FALSE); + _reset_stable(vals, was_stable, EINA_TRUE); return _validate(&tp->base); } case EOLIAN_TYPEDECL_FUNCTION_POINTER: if (!_validate_function(vals, tp->function_pointer, NULL)) - return EINA_FALSE; + return _reset_stable(vals, was_stable, EINA_FALSE); + _reset_stable(vals, was_stable, EINA_TRUE); return _validate(&tp->base); default: - return EINA_FALSE; + return _reset_stable(vals, was_stable, EINA_FALSE); } + _reset_stable(vals, was_stable, EINA_TRUE); return _validate(&tp->base); } @@ -236,7 +246,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp) return EINA_FALSE; } - if (tp->is_ptr && !tp->legacy) + if (tp->is_ptr) { tp->is_ptr = EINA_FALSE; Eina_Bool still_ownable = database_type_is_ownable(src, tp, EINA_FALSE); @@ -316,6 +326,13 @@ _validate_type(Validate_State *vals, Eolian_Type *tp) _eo_parser_log(&tp->base, "undefined type %s", tp->base.name); return EINA_FALSE; } + else if (vals->stable && tp->tdecl->base.is_beta) + { + /* we should enable this by default, but can't for now */ + _eo_parser_log(&tp->base, "beta type declaration '%s' used in stable context", + tp->tdecl->base.name); + return EINA_FALSE; + } if (!_validate_typedecl(vals, tp->tdecl)) return EINA_FALSE; if (tp->tdecl->freefunc && !tp->freefunc) @@ -331,6 +348,12 @@ _validate_type(Validate_State *vals, Eolian_Type *tp) "(likely wrong namespacing)", tp->base.name); return EINA_FALSE; } + else if (vals->stable && tp->klass->base.is_beta) + { + _eo_parser_log(&tp->base, "beta class '%s' used in stable context", + tp->klass->base.name); + return EINA_FALSE; + } if (!tp->freefunc) tp->freefunc = eina_stringshare_add(eo_obj_free); return _validate_ownable(tp); @@ -383,7 +406,7 @@ _validate_function(Validate_State *vals, Eolian_Function *func, Eina_Hash *nhash { _eo_parser_log(&func->base, "%sfunction '%s' conflicts with another symbol (at %s:%d:%d)", - func->is_beta ? "beta " : "", func->base.name, oobj->file, + func->base.is_beta ? "beta " : "", func->base.name, oobj->file, oobj->line, oobj->column); vals->warned = EINA_TRUE; } @@ -399,24 +422,27 @@ _validate_function(Validate_State *vals, Eolian_Function *func, Eina_Hash *nhash return EINA_TRUE; } - if (func->get_ret_type && (!_validate_type(vals, func->get_ret_type) || !_validate_beta_usage(func->klass, func->get_ret_type))) - return EINA_FALSE; + /* need to preserve stable flag set from the class */ + Eina_Bool was_stable = _set_stable(vals, !func->base.is_beta && vals->stable); - if (func->set_ret_type && (!_validate_type(vals, func->set_ret_type) || !_validate_beta_usage(func->klass, func->set_ret_type))) - return EINA_FALSE; + if (func->get_ret_type && !_validate_type(vals, func->get_ret_type)) + return _reset_stable(vals, was_stable, EINA_FALSE); + + if (func->set_ret_type && !_validate_type(vals, func->set_ret_type)) + return _reset_stable(vals, was_stable, EINA_FALSE); if (func->get_ret_val && !_validate_expr(func->get_ret_val, func->get_ret_type, 0)) - return EINA_FALSE; + return _reset_stable(vals, was_stable, EINA_FALSE); if (func->set_ret_val && !_validate_expr(func->set_ret_val, func->set_ret_type, 0)) - return EINA_FALSE; + return _reset_stable(vals, was_stable, EINA_FALSE); #define EOLIAN_PARAMS_VALIDATE(params) \ EINA_LIST_FOREACH(params, l, param) \ - if (!_validate_param(vals, param) || !_validate_beta_usage(func->klass, param->type)) \ - return EINA_FALSE; + if (!_validate_param(vals, param)) \ + return _reset_stable(vals, was_stable, EINA_FALSE); EOLIAN_PARAMS_VALIDATE(func->prop_values); EOLIAN_PARAMS_VALIDATE(func->prop_values_get); @@ -428,14 +454,15 @@ _validate_function(Validate_State *vals, Eolian_Function *func, Eina_Hash *nhash #undef EOLIAN_PARAMS_VALIDATE if (!_validate_doc(func->get_return_doc)) - return EINA_FALSE; + return _reset_stable(vals, was_stable, EINA_FALSE); if (!_validate_doc(func->set_return_doc)) - return EINA_FALSE; + return _reset_stable(vals, was_stable, EINA_FALSE); /* just for now, when dups become errors there will be no need to check */ if (!oobj && nhash) eina_hash_add(nhash, &func->base.name, &func->base); + _reset_stable(vals, was_stable, EINA_TRUE); return _validate(&func->base); } @@ -503,15 +530,18 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash) return EINA_TRUE; } - if (!_validate_type(vals, event->type) || !_validate_beta_usage(event->klass, event->type)) - return EINA_FALSE; + Eina_Bool was_stable = _set_stable(vals, !event->base.is_beta && vals->stable); + + if (!_validate_type(vals, event->type)) + return _reset_stable(vals, was_stable, EINA_FALSE); if (!_validate_doc(event->doc)) - return EINA_FALSE; + return _reset_stable(vals, was_stable, EINA_FALSE); if (vals->event_redef && !oobj) eina_hash_add(nhash, &event->base.name, &event->base); + _reset_stable(vals, was_stable, EINA_TRUE); return _validate(&event->base); } @@ -1180,7 +1210,7 @@ _validate_class(Validate_State *vals, Eolian_Class *cl, default: break; } - if (!_class_is_legacy(cl) && !cl->is_beta && cl->parent->is_beta) + if (!_class_is_legacy(cl) && !cl->base.is_beta && cl->parent->base.is_beta) { _eo_parser_log(&cl->base, "non-beta class cannot have beta parent"); return EINA_FALSE; @@ -1247,6 +1277,8 @@ _validate_class(Validate_State *vals, Eolian_Class *cl, } } + /* we are not verifying betaness for any legacy class */ + _set_stable(vals, !cl->base.is_beta && !_class_is_legacy(cl)); EINA_LIST_FOREACH(cl->properties, l, func) if (!_validate_function(vals, func, nhash)) @@ -1291,15 +1323,18 @@ _validate_variable(Validate_State *vals, Eolian_Variable *var) if (var->base.validated) return EINA_TRUE; + Eina_Bool was_stable = _set_stable(vals, !var->base.is_beta && vals->stable); + if (!_validate_type(vals, var->base_type)) - return EINA_FALSE; + return _reset_stable(vals, was_stable, EINA_FALSE); if (var->value && !_validate_expr(var->value, var->base_type, 0)) - return EINA_FALSE; + return _reset_stable(vals, was_stable, EINA_FALSE); if (!_validate_doc(var->doc)) - return EINA_FALSE; + return _reset_stable(vals, was_stable, EINA_FALSE); + _reset_stable(vals, was_stable, EINA_TRUE); return _validate(&var->base); } @@ -1324,8 +1359,9 @@ database_validate(const Eolian_Unit *src) Validate_State vals = { EINA_FALSE, + EINA_TRUE, !!getenv("EOLIAN_EVENT_REDEF_WARN"), - !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_WARN") + !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_WARN"), }; /* do an initial pass to refill inherits */ diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h index dc8d171b02..90a79c2158 100644 --- a/src/lib/eolian/eo_lexer.h +++ b/src/lib/eolian/eo_lexer.h @@ -25,9 +25,9 @@ enum Tokens #define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \ \ KW(abstract), KW(composite), KW(constructor), KW(constructors), KW(data), \ - KW(destructor), KW(eo), KW(eo_prefix), KW(event_prefix), KW(events), \ + KW(destructor), KW(eo_prefix), KW(event_prefix), KW(events), \ KW(extends), KW(free), KW(get), KW(implements), KW(import), KW(interface), \ - KW(keys), KW(legacy), KW(legacy_prefix), KW(methods), KW(mixin), KW(params), \ + KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \ KW(parse), KW(parts), KW(ptr), KW(set), KW(type), KW(values), KW(var), KW(requires), \ \ KWAT(auto), KWAT(beta), KWAT(class), KWAT(const), KWAT(cref), KWAT(empty), \ diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 626e75b2ab..454e634e8c 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -433,11 +433,12 @@ _struct_field_free(Eolian_Struct_Type_Field *def) static Eolian_Typedecl * parse_struct(Eo_Lexer *ls, const char *name, Eina_Bool is_extern, - int line, int column, const char *freefunc) + Eina_Bool is_beta, int line, int column, const char *freefunc) { int bline = ls->line_number, bcolumn = ls->column; Eolian_Typedecl *def = eo_lexer_typedecl_new(ls); def->is_extern = is_extern; + def->base.is_beta = is_beta; def->base.name = name; def->type = EOLIAN_TYPEDECL_STRUCT; def->fields = eina_hash_string_small_new(EINA_FREE_CB(_struct_field_free)); @@ -491,11 +492,12 @@ _enum_field_free(Eolian_Enum_Type_Field *def) static Eolian_Typedecl * parse_enum(Eo_Lexer *ls, const char *name, Eina_Bool is_extern, - int line, int column) + Eina_Bool is_beta, int line, int column) { int bline = ls->line_number, bcolumn = ls->column; Eolian_Typedecl *def = eo_lexer_typedecl_new(ls); def->is_extern = is_extern; + def->base.is_beta = is_beta; def->base.name = name; def->type = EOLIAN_TYPEDECL_ENUM; def->fields = eina_hash_string_small_new(EINA_FREE_CB(_enum_field_free)); @@ -629,19 +631,6 @@ parse_type_void(Eo_Lexer *ls, Eina_Bool allow_ptr) check_match(ls, ')', '(', pline, pcol); return def; } - case KW_legacy: - { - int pline, pcol; - eo_lexer_get(ls); - pline = ls->line_number; - pcol = ls->column; - check_next(ls, '('); - def = parse_type_void(ls, allow_ptr); - FILL_BASE(def->base, ls, line, col, TYPE); - def->legacy = EINA_TRUE; - check_match(ls, ')', '(', pline, pcol); - return def; - } case KW_free: { int pline, pcolumn; @@ -747,11 +736,23 @@ parse_typedef(Eo_Lexer *ls) Eolian_Typedecl *def = eo_lexer_typedecl_new(ls); Eina_Strbuf *buf; eo_lexer_get(ls); - if (ls->t.kw == KW_at_extern) + Eina_Bool has_extern = EINA_FALSE, has_beta = EINA_FALSE; + for (;;) switch (ls->t.kw) { + case KW_at_extern: + CASE_LOCK(ls, extern, "extern qualifier"); def->is_extern = EINA_TRUE; eo_lexer_get(ls); + break; + case KW_at_beta: + CASE_LOCK(ls, beta, "beta qualifier"); + def->base.is_beta = EINA_TRUE; + eo_lexer_get(ls); + break; + default: + goto tags_done; } +tags_done: def->type = EOLIAN_TYPEDECL_ALIAS; buf = eina_strbuf_new(); eo_lexer_dtor_push(ls, EINA_FREE_CB(eina_strbuf_free), buf); @@ -780,11 +781,23 @@ parse_variable(Eo_Lexer *ls, Eina_Bool global) Eolian_Variable *def = eo_lexer_variable_new(ls); Eina_Strbuf *buf; eo_lexer_get(ls); - if (ls->t.kw == KW_at_extern) + Eina_Bool has_extern = EINA_FALSE, has_beta = EINA_FALSE; + for (;;) switch (ls->t.kw) { + case KW_at_extern: + CASE_LOCK(ls, extern, "extern qualifier"); def->is_extern = EINA_TRUE; eo_lexer_get(ls); + break; + case KW_at_beta: + CASE_LOCK(ls, beta, "beta qualifier"); + def->base.is_beta = EINA_TRUE; + eo_lexer_get(ls); + break; + default: + goto tags_done; } +tags_done: def->type = global ? EOLIAN_VAR_GLOBAL : EOLIAN_VAR_CONSTANT; buf = eina_strbuf_new(); eo_lexer_dtor_push(ls, EINA_FREE_CB(eina_strbuf_free), buf); @@ -957,17 +970,6 @@ end: FILL_DOC(ls, par, doc); } -static void -parse_legacy(Eo_Lexer *ls, const char **out) -{ - eo_lexer_get(ls); - check_next(ls, ':'); - check(ls, TOK_VALUE); - *out = eina_stringshare_ref(ls->t.value.s); - eo_lexer_get(ls); - check_next(ls, ';'); -} - static void parse_params(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout, Eina_Bool is_vals) @@ -992,8 +994,7 @@ static void parse_accessor(Eo_Lexer *ls, Eolian_Function *prop) { int line, col; - Eina_Bool has_return = EINA_FALSE, has_legacy = EINA_FALSE, - has_eo = EINA_FALSE, has_keys = EINA_FALSE, + Eina_Bool has_return = EINA_FALSE, has_keys = EINA_FALSE, has_values = EINA_FALSE, has_protected = EINA_FALSE, has_virtp = EINA_FALSE; Eina_Bool is_get = (ls->t.kw == KW_get); @@ -1087,24 +1088,6 @@ parse_accessor: prop->set_ret_type->owned = ret.owned; } break; - case KW_legacy: - CASE_LOCK(ls, legacy, "legacy name") - if (is_get) - parse_legacy(ls, &prop->get_legacy); - else - parse_legacy(ls, &prop->set_legacy); - break; - case KW_eo: - CASE_LOCK(ls, eo, "eo name") - eo_lexer_get(ls); - check_next(ls, ':'); - check_kw_next(ls, KW_null); - check_next(ls, ';'); - if (is_get) - prop->get_only_legacy = EINA_TRUE; - else - prop->set_only_legacy = EINA_TRUE; - break; case KW_keys: { Eina_List **stor; @@ -1189,7 +1172,7 @@ parse_property(Eo_Lexer *ls) break; case KW_at_beta: CASE_LOCK(ls, beta, "beta qualifier"); - prop->is_beta = EINA_TRUE; + prop->base.is_beta = EINA_TRUE; eo_lexer_get(ls); break; case KW_at_pure_virtual: @@ -1255,10 +1238,23 @@ parse_function_pointer(Eo_Lexer *ls) eo_lexer_get(ls); def->type = EOLIAN_TYPEDECL_FUNCTION_POINTER; - def->is_extern = (ls->t.kw == KW_at_extern); - if (def->is_extern) - eo_lexer_get(ls); - + Eina_Bool has_extern = EINA_FALSE, has_beta = EINA_FALSE; + for (;;) switch (ls->t.kw) + { + case KW_at_extern: + CASE_LOCK(ls, extern, "extern qualifier"); + def->is_extern = EINA_TRUE; + eo_lexer_get(ls); + break; + case KW_at_beta: + CASE_LOCK(ls, beta, "beta qualifier"); + def->base.is_beta = EINA_TRUE; + eo_lexer_get(ls); + break; + default: + goto tags_done; + } +tags_done: parse_name(ls, buf); def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf)); eo_lexer_dtor_pop(ls); @@ -1272,8 +1268,8 @@ parse_function_pointer(Eo_Lexer *ls) def->function_pointer = meth; eolian_object_ref(&meth->base); - meth->is_beta = (ls->t.kw == KW_at_beta); - if (meth->is_beta) + meth->base.is_beta = (ls->t.kw == KW_at_beta); + if (meth->base.is_beta) eo_lexer_get(ls); bline = ls->line_number; @@ -1313,9 +1309,8 @@ parse_method(Eo_Lexer *ls) Eolian_Function *meth = NULL; Eolian_Implement *impl = NULL; Eina_Bool has_const = EINA_FALSE, has_params = EINA_FALSE, - has_return = EINA_FALSE, has_legacy = EINA_FALSE, - has_protected = EINA_FALSE, has_class = EINA_FALSE, - has_eo = EINA_FALSE, has_beta = EINA_FALSE, + has_return = EINA_FALSE, has_protected = EINA_FALSE, + has_class = EINA_FALSE, has_beta = EINA_FALSE, has_virtp = EINA_FALSE; meth = calloc(1, sizeof(Eolian_Function)); meth->klass = ls->klass; @@ -1359,7 +1354,7 @@ parse_method(Eo_Lexer *ls) break; case KW_at_beta: CASE_LOCK(ls, beta, "beta qualifier"); - meth->is_beta = EINA_TRUE; + meth->base.is_beta = EINA_TRUE; eo_lexer_get(ls); break; case KW_at_pure_virtual: @@ -1389,18 +1384,6 @@ body: meth->get_return_warn_unused = ret.warn_unused; meth->get_ret_type->owned = ret.owned; break; - case KW_legacy: - CASE_LOCK(ls, legacy, "legacy name") - parse_legacy(ls, &meth->get_legacy); - break; - case KW_eo: - CASE_LOCK(ls, eo, "eo name") - eo_lexer_get(ls); - check_next(ls, ':'); - check_kw_next(ls, KW_null); - check_next(ls, ';'); - meth->get_only_legacy = EINA_TRUE; - break; case KW_params: CASE_LOCK(ls, params, "params definition") parse_params(ls, &meth->params, EINA_TRUE, EINA_FALSE); @@ -1718,7 +1701,7 @@ parse_event(Eo_Lexer *ls) break; case KW_at_beta: CASE_LOCK(ls, beta, "beta qualifier") - ev->is_beta = EINA_TRUE; + ev->base.is_beta = EINA_TRUE; eo_lexer_get(ls); break; case KW_at_hot: @@ -1882,8 +1865,7 @@ error: static void parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type) { - Eina_Bool has_legacy_prefix = EINA_FALSE, - has_eo_prefix = EINA_FALSE, + Eina_Bool has_eo_prefix = EINA_FALSE, has_event_prefix = EINA_FALSE, has_data = EINA_FALSE, has_methods = EINA_FALSE, @@ -1899,15 +1881,6 @@ parse_class_body(Eo_Lexer *ls, Eolian_Class_Type type) } for (;;) switch (ls->t.kw) { - case KW_legacy_prefix: - CASE_LOCK(ls, legacy_prefix, "legacy prefix definition") - eo_lexer_get(ls); - check_next(ls, ':'); - _validate_pfx(ls); - ls->klass->legacy_prefix = eina_stringshare_ref(ls->t.value.s); - eo_lexer_get(ls); - check_next(ls, ';'); - break; case KW_eo_prefix: CASE_LOCK(ls, eo_prefix, "eo prefix definition") eo_lexer_get(ls); @@ -2060,7 +2033,7 @@ parse_class(Eo_Lexer *ls, Eolian_Class_Type type) eo_lexer_context_push(ls); if (ls->t.kw == KW_at_beta) { - ls->klass->is_beta = EINA_TRUE; + ls->klass->base.is_beta = EINA_TRUE; eo_lexer_get(ls); } parse_name(ls, buf); @@ -2212,13 +2185,17 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot) const char *freefunc = NULL; Eina_Strbuf *buf; eo_lexer_get(ls); - Eina_Bool has_extern = EINA_FALSE, has_free = EINA_FALSE; + Eina_Bool has_extern = EINA_FALSE, has_free = EINA_FALSE, has_beta = EINA_FALSE; for (;;) switch (ls->t.kw) { case KW_at_extern: CASE_LOCK(ls, extern, "@extern qualifier") eo_lexer_get(ls); break; + case KW_at_beta: + CASE_LOCK(ls, beta, "@beta qualifier") + eo_lexer_get(ls); + break; case KW_at_free: { if (is_enum) @@ -2264,6 +2241,7 @@ postparams: { Eolian_Typedecl *def = eo_lexer_typedecl_new(ls); def->is_extern = has_extern; + def->base.is_beta = has_beta; def->type = EOLIAN_TYPEDECL_STRUCT_OPAQUE; if (freefunc) { @@ -2278,9 +2256,9 @@ postparams: break; } if (is_enum) - parse_enum(ls, name, has_extern, line, col); + parse_enum(ls, name, has_extern, has_beta, line, col); else - parse_struct(ls, name, has_extern, line, col, freefunc); + parse_struct(ls, name, has_extern, has_beta, line, col, freefunc); break; } def: diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c index eb6e896bab..4ce5b00f63 100644 --- a/src/lib/eolian/eolian_database.c +++ b/src/lib/eolian/eolian_database.c @@ -119,6 +119,13 @@ eolian_object_namespaces_get(const Eolian_Object *obj) return &it->itr; } +EAPI Eina_Bool +eolian_object_is_beta(const Eolian_Object *obj) +{ + if (!obj) return EINA_FALSE; + return obj->is_beta; +} + void database_doc_del(Eolian_Documentation *doc) { if (!doc) return; diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index b70f2b4f1e..8c1b02bd2a 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -89,7 +89,8 @@ struct _Eolian_Object int column; int refcount; Eolian_Object_Type type; - Eina_Bool validated; + Eina_Bool validated: 1; + Eina_Bool is_beta: 1; }; static inline void @@ -176,7 +177,6 @@ struct _Eolian_Class Eolian_Object base; Eolian_Class_Type type; Eolian_Documentation *doc; - Eina_Stringshare *legacy_prefix; Eina_Stringshare *eo_prefix; Eina_Stringshare *ev_prefix; Eina_Stringshare *data_type; @@ -196,7 +196,6 @@ struct _Eolian_Class Eina_List *callables; /* internal for now */ Eina_Bool class_ctor_enable:1; Eina_Bool class_dtor_enable:1; - Eina_Bool is_beta :1; }; struct _Eolian_Function @@ -222,17 +221,12 @@ struct _Eolian_Function Eolian_Expression *get_ret_val; Eolian_Expression *set_ret_val; Eolian_Implement *impl; - Eina_Stringshare *get_legacy; - Eina_Stringshare *set_legacy; Eolian_Documentation *get_return_doc; Eolian_Documentation *set_return_doc; Eina_Bool obj_is_const :1; /* True if the object has to be const. Useful for a few methods. */ Eina_Bool get_return_warn_unused :1; /* also used for methods */ Eina_Bool set_return_warn_unused :1; - Eina_Bool get_only_legacy: 1; - Eina_Bool set_only_legacy: 1; Eina_Bool is_class :1; - Eina_Bool is_beta :1; Eina_List *ctor_of; Eolian_Class *klass; }; @@ -277,7 +271,6 @@ struct _Eolian_Type Eina_Bool is_const :1; Eina_Bool is_ptr :1; Eina_Bool owned :1; - Eina_Bool legacy :1; }; struct _Eolian_Typedecl @@ -328,7 +321,6 @@ struct _Eolian_Event Eolian_Type *type; Eolian_Class *klass; Eolian_Object_Scope scope; - Eina_Bool is_beta :1; Eina_Bool is_hot :1; Eina_Bool is_restart :1; }; diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp index 9969e89075..42b720d05d 100644 --- a/src/lib/eolian_cxx/grammar/klass_def.hpp +++ b/src/lib/eolian_cxx/grammar/klass_def.hpp @@ -757,7 +757,7 @@ struct function_def else parameters.insert(parameters.end(), values.begin(), values.end()); } - c_name = eolian_function_full_c_name_get(function, type, EINA_FALSE); + c_name = eolian_function_full_c_name_get(function, type); if (type != EOLIAN_FUNCTION_POINTER) { const Eolian_Class *eolian_klass = eolian_function_class_get(function); @@ -1253,8 +1253,7 @@ struct klass_def efl::eina::optional getter(nullptr); efl::eina::optional setter(nullptr); try { - if(! ::eolian_function_is_legacy_only(function, EOLIAN_PROP_GET) - && ::eolian_function_scope_get(function, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PRIVATE) + if(::eolian_function_scope_get(function, EOLIAN_PROP_GET) != EOLIAN_SCOPE_PRIVATE) { function_def f(function, EOLIAN_PROP_GET, NULL, unit); functions.push_back(f); @@ -1262,8 +1261,7 @@ struct klass_def } } catch(std::exception const&) {} try { - if(! ::eolian_function_is_legacy_only(function, EOLIAN_PROP_SET) - && ::eolian_function_scope_get(function, EOLIAN_PROP_SET) != EOLIAN_SCOPE_PRIVATE) + if(::eolian_function_scope_get(function, EOLIAN_PROP_SET) != EOLIAN_SCOPE_PRIVATE) { function_def f(function, EOLIAN_PROP_SET, NULL, unit); functions.push_back(f); @@ -1275,8 +1273,7 @@ struct klass_def } else try { - if(! ::eolian_function_is_legacy_only(function, func_type) - && ::eolian_function_scope_get(function, func_type) != EOLIAN_SCOPE_PRIVATE) + if(::eolian_function_scope_get(function, func_type) != EOLIAN_SCOPE_PRIVATE) { efl::eina::optional getter(nullptr); efl::eina::optional setter(nullptr); @@ -1297,8 +1294,7 @@ struct klass_def try { Eolian_Function const* function = &*eolian_functions; Eolian_Function_Type func_type = eolian_function_type_get(function); - if(! ::eolian_function_is_legacy_only(function, EOLIAN_METHOD) - && ::eolian_function_scope_get(function, func_type) != EOLIAN_SCOPE_PRIVATE) + if(::eolian_function_scope_get(function, func_type) != EOLIAN_SCOPE_PRIVATE) functions.push_back({function, EOLIAN_METHOD, NULL, unit}); } catch(std::exception const&) {} } diff --git a/src/lib/evas/Evas.h b/src/lib/evas/Evas.h index ad3f16fe4a..525ca7d785 100644 --- a/src/lib/evas/Evas.h +++ b/src/lib/evas/Evas.h @@ -168,10 +168,11 @@ #include -/* This include has been added to support Eo in Evas */ #include +#ifdef EFL_BETA_API_SUPPORT +/* This include has been added to support Eo in Evas */ #include - +#endif #include @@ -205,11 +206,19 @@ extern "C" { #endif +#include +#include +#include +#include #include + + #ifndef EFL_NOLEGACY_API_SUPPORT #include #endif +#ifdef EFL_BETA_API_SUPPORT #include +#endif #ifdef __cplusplus } diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h index 9e8e1e21ab..bb710a9825 100644 --- a/src/lib/evas/Evas_Common.h +++ b/src/lib/evas/Evas_Common.h @@ -246,10 +246,12 @@ typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source /* Opaque types */ typedef Eo Evas_Device; /**< A source device handle - where the event came from */ -typedef Efl_Gfx_Image_Content_Hint Evas_Image_Content_Hint; -#define EVAS_IMAGE_CONTENT_HINT_NONE EFL_GFX_IMAGE_CONTENT_HINT_NONE -#define EVAS_IMAGE_CONTENT_HINT_DYNAMIC EFL_GFX_IMAGE_CONTENT_HINT_DYNAMIC -#define EVAS_IMAGE_CONTENT_HINT_STATIC EFL_GFX_IMAGE_CONTENT_HINT_STATIC +typedef enum _Evas_Image_Content_Hint +{ + EVAS_IMAGE_CONTENT_HINT_NONE = 0, /**< No hint at all */ + EVAS_IMAGE_CONTENT_HINT_DYNAMIC = 1, /**< The contents will change over time */ + EVAS_IMAGE_CONTENT_HINT_STATIC = 2 /**< The contents won't change over time */ +} Evas_Image_Content_Hint; /**< How an image's data is to be treated by Evas, for optimization */ typedef enum _Evas_Alloc_Error { @@ -295,17 +297,18 @@ typedef enum _Evas_Engine_Render_Mode typedef Efl_Gfx_Event_Render_Post Evas_Event_Render_Post; /**< Event info sent after a frame was rendered. @since 1.18 */ -typedef Efl_Input_Device_Type Evas_Device_Class; - -#define EVAS_DEVICE_CLASS_NONE EFL_INPUT_DEVICE_TYPE_NONE /**< Not a device @since 1.8 */ -#define EVAS_DEVICE_CLASS_SEAT EFL_INPUT_DEVICE_TYPE_SEAT /**< The user/seat (the user themselves) @since 1.8 */ -#define EVAS_DEVICE_CLASS_KEYBOARD EFL_INPUT_DEVICE_TYPE_KEYBOARD /**< A regular keyboard, numberpad or attached buttons @since 1.8 */ -#define EVAS_DEVICE_CLASS_MOUSE EFL_INPUT_DEVICE_TYPE_MOUSE /**< A mouse, trackball or touchpad relative motion device @since 1.8 */ -#define EVAS_DEVICE_CLASS_TOUCH EFL_INPUT_DEVICE_TYPE_TOUCH /**< A touchscreen with fingers or stylus @since 1.8 */ -#define EVAS_DEVICE_CLASS_PEN EFL_INPUT_DEVICE_TYPE_PEN /**< A special pen device @since 1.8 */ -#define EVAS_DEVICE_CLASS_POINTER EFL_INPUT_DEVICE_TYPE_WAND /**< A laser pointer, wii-style or "minority report" pointing device @since 1.8 */ -#define EVAS_DEVICE_CLASS_WAND EFL_INPUT_DEVICE_TYPE_WAND /**< A synonym for EVAS_DEVICE_CLASS_POINTER @since 1.18 */ -#define EVAS_DEVICE_CLASS_GAMEPAD EFL_INPUT_DEVICE_TYPE_GAMEPAD /**< A gamepad controller or joystick @since 1.8 */ +typedef enum _Evas_Device_Class +{ + EVAS_DEVICE_CLASS_NONE, /**< Not a device @since 1.8 */ + EVAS_DEVICE_CLASS_SEAT, /**< The user/seat (the user themselves) @since 1.8 */ + EVAS_DEVICE_CLASS_KEYBOARD, /**< A regular keyboard, numberpad or attached buttons @since 1.8 */ + EVAS_DEVICE_CLASS_MOUSE, /**< A mouse, trackball or touchpad relative motion device @since 1.8 */ + EVAS_DEVICE_CLASS_TOUCH, /**< A touchscreen with fingers or stylus @since 1.8 */ + EVAS_DEVICE_CLASS_PEN, /**< A special pen device @since 1.8 */ +#define EVAS_DEVICE_CLASS_WAND EVAS_DEVICE_CLASS_POINTER + EVAS_DEVICE_CLASS_POINTER, /**< A laser pointer, wii-style or "minority report" pointing device @since 1.8 */ + EVAS_DEVICE_CLASS_GAMEPAD /**< A gamepad controller or joystick @since 1.8 */ +} Evas_Device_Class; /**< A general class of device @since 1.8 */ /** * @brief Specific type of input device. @@ -329,39 +332,65 @@ typedef enum EVAS_DEVICE_SUBCLASS_TRACKBALL /**< A trackball style mouse. */ } Evas_Device_Subclass; -typedef Efl_Pointer_Flags Evas_Button_Flags; +/** + * Flags for Mouse Button events + */ +typedef enum _Evas_Button_Flags +{ + EVAS_BUTTON_NONE = 0, /**< No extra mouse button data */ + EVAS_BUTTON_DOUBLE_CLICK = (1 << 0), /**< This mouse button press was the 2nd press of a double click */ + EVAS_BUTTON_TRIPLE_CLICK = (1 << 1) /**< This mouse button press was the 3rd press of a triple click */ +} Evas_Button_Flags; /**< Flags for Mouse Button events */ -#define EVAS_BUTTON_NONE EFL_POINTER_FLAGS_NONE -#define EVAS_BUTTON_DOUBLE_CLICK EFL_POINTER_FLAGS_DOUBLE_CLICK -#define EVAS_BUTTON_TRIPLE_CLICK EFL_POINTER_FLAGS_TRIPLE_CLICK +/** + * Flags for Events + */ +typedef enum _Evas_Event_Flags +{ + EVAS_EVENT_FLAG_NONE = 0, /**< No fancy flags set */ + EVAS_EVENT_FLAG_ON_HOLD = (1 << 0), /**< This event is being delivered but should be put "on hold" until the on hold flag is unset. The event should be used for informational purposes and maybe some indications visually, but not actually perform anything */ + EVAS_EVENT_FLAG_ON_SCROLL = (1 << 1) /**< This event flag indicates the event occurs while scrolling; for example, DOWN event occurs during scrolling; the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */ +} Evas_Event_Flags; /**< Flags for Events */ -typedef Efl_Input_Flags Evas_Event_Flags; +typedef enum _Evas_Aspect_Control +{ + EVAS_ASPECT_CONTROL_NONE = 0, /**< Preference on scaling unset */ + EVAS_ASPECT_CONTROL_NEITHER = 1, /**< Same effect as unset preference on scaling */ + EVAS_ASPECT_CONTROL_HORIZONTAL = 2, /**< Use all horizontal container space to place an object, using the given aspect */ + EVAS_ASPECT_CONTROL_VERTICAL = 3, /**< Use all vertical container space to place an object, using the given aspect */ + EVAS_ASPECT_CONTROL_BOTH = 4 /**< Use all horizontal @b and vertical container spaces to place an object (never growing it out of those bounds), using the given aspect */ +} Evas_Aspect_Control; /**< Aspect types/policies for scaling size hints, used for evas_object_size_hint_aspect_set() */ -#define EVAS_EVENT_FLAG_NONE EFL_INPUT_FLAGS_NONE -#define EVAS_EVENT_FLAG_ON_HOLD EFL_INPUT_FLAGS_PROCESSED -#define EVAS_EVENT_FLAG_ON_SCROLL EFL_INPUT_FLAGS_SCROLLING +typedef enum _Evas_BiDi_Direction +{ + EVAS_BIDI_DIRECTION_NATURAL, + EVAS_BIDI_DIRECTION_NEUTRAL = EVAS_BIDI_DIRECTION_NATURAL, + EVAS_BIDI_DIRECTION_LTR, + EVAS_BIDI_DIRECTION_RTL, + EVAS_BIDI_DIRECTION_INHERIT +} Evas_BiDi_Direction; -typedef Efl_Gfx_Hint_Aspect Evas_Aspect_Control; /**< Aspect types/policies for scaling size hints, used for evas_object_size_hint_aspect_set */ - -#define EVAS_ASPECT_CONTROL_NONE EFL_GFX_HINT_ASPECT_NONE -#define EVAS_ASPECT_CONTROL_NEITHER EFL_GFX_HINT_ASPECT_NEITHER -#define EVAS_ASPECT_CONTROL_HORIZONTAL EFL_GFX_HINT_ASPECT_HORIZONTAL -#define EVAS_ASPECT_CONTROL_VERTICAL EFL_GFX_HINT_ASPECT_VERTICAL -#define EVAS_ASPECT_CONTROL_BOTH EFL_GFX_HINT_ASPECT_BOTH - -typedef Efl_Text_Bidirectional_Type Evas_BiDi_Direction; - -#define EVAS_BIDI_DIRECTION_NATURAL EFL_TEXT_BIDIRECTIONAL_TYPE_NATURAL -#define EVAS_BIDI_DIRECTION_NEUTRAL EFL_TEXT_BIDIRECTIONAL_TYPE_NEUTRAL -#define EVAS_BIDI_DIRECTION_LTR EFL_TEXT_BIDIRECTIONAL_TYPE_LTR -#define EVAS_BIDI_DIRECTION_RTL EFL_TEXT_BIDIRECTIONAL_TYPE_RTL -#define EVAS_BIDI_DIRECTION_INHERIT EFL_TEXT_BIDIRECTIONAL_TYPE_INHERIT - -typedef Efl_Input_Object_Pointer_Mode Evas_Object_Pointer_Mode; - -#define EVAS_OBJECT_POINTER_MODE_AUTOGRAB EFL_INPUT_OBJECT_POINTER_MODE_AUTO_GRAB -#define EVAS_OBJECT_POINTER_MODE_NOGRAB EFL_INPUT_OBJECT_POINTER_MODE_NO_GRAB -#define EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN EFL_INPUT_OBJECT_POINTER_MODE_NO_GRAB_NO_REPEAT_UPDOWN +/** + * How the mouse pointer should be handled by Evas. + * + * In the mode #EVAS_OBJECT_POINTER_MODE_AUTOGRAB, when a mouse button + * is pressed down over an object and held, with the mouse pointer + * being moved outside of it, the pointer still behaves as being bound + * to that object, albeit out of its drawing region. When the button + * is released, the event will be fed to the object, that may check if + * the final position is over it or not and do something about it. + * + * In the mode #EVAS_OBJECT_POINTER_MODE_NOGRAB, the pointer will + * always be bound to the object right below it. + * + * @ingroup Evas_Object_Group_Extras + */ +typedef enum _Evas_Object_Pointer_Mode +{ + EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */ + EVAS_OBJECT_POINTER_MODE_NOGRAB, /**< pointer always bound to the object right below it */ + EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN /**< useful on object with "repeat events" enabled, where mouse/touch up and down events WONT be repeated to objects and these objects wont be auto-grabbed. @since 1.2 */ +} Evas_Object_Pointer_Mode; /**< How the mouse pointer should be handled by Evas. */ // FIXME: Move to Evas_Legacy.h /** Identifier of callbacks to be set for Evas canvases or Evas objects. */ @@ -3454,6 +3483,40 @@ typedef Eo Efl_Animation_Group_Sequential; #define EFL_ANIMATION_REPEAT_INFINITE -1 #define EFL_ANIMATION_PLAYER_REPEAT_INFINITE -1 +#ifndef _EFL_INPUT_DEVICE_EO_H_ +#define _EFL_INPUT_DEVICE_EO_H_ +typedef Eo Efl_Input_Device; +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_ + +#ifndef _EFL_GFX_ENTITY_EO_CLASS_TYPE +#define _EFL_GFX_ENTITY_EO_CLASS_TYPE + +typedef Eo Efl_Gfx_Entity; + +#endif +#endif + /** * @} */ diff --git a/src/lib/evas/Evas_Loader.h b/src/lib/evas/Evas_Loader.h index 2e61f1bf60..787df4e81f 100644 --- a/src/lib/evas/Evas_Loader.h +++ b/src/lib/evas/Evas_Loader.h @@ -162,29 +162,29 @@ typedef Emile_Image_Scale_Hint Evas_Image_Scale_Hint; /**< How an image's data i * Colorspaces for pixel data supported by Evas * @ingroup Evas_Object_Image */ -typedef Efl_Gfx_Colorspace Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */ +typedef Emile_Colorspace Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */ -#define EVAS_COLORSPACE_ARGB8888 EFL_GFX_COLORSPACE_ARGB8888 -#define EVAS_COLORSPACE_YCBCR422P601_PL EFL_GFX_COLORSPACE_YCBCR422P601_PL -#define EVAS_COLORSPACE_YCBCR422P709_PL EFL_GFX_COLORSPACE_YCBCR422P709_PL -#define EVAS_COLORSPACE_RGB565_A5P EFL_GFX_COLORSPACE_RGB565_A5P -#define EVAS_COLORSPACE_GRY8 EFL_GFX_COLORSPACE_GRY8 -#define EVAS_COLORSPACE_YCBCR422601_PL EFL_GFX_COLORSPACE_YCBCR422601_PL -#define EVAS_COLORSPACE_YCBCR420NV12601_PL EFL_GFX_COLORSPACE_YCBCR420NV12601_PL -#define EVAS_COLORSPACE_YCBCR420TM12601_PL EFL_GFX_COLORSPACE_YCBCR420TM12601_PL -#define EVAS_COLORSPACE_AGRY88 EFL_GFX_COLORSPACE_AGRY88 +#define EVAS_COLORSPACE_ARGB8888 EMILE_COLORSPACE_ARGB8888 +#define EVAS_COLORSPACE_YCBCR422P601_PL EMILE_COLORSPACE_YCBCR422P601_PL +#define EVAS_COLORSPACE_YCBCR422P709_PL EMILE_COLORSPACE_YCBCR422P709_PL +#define EVAS_COLORSPACE_RGB565_A5P EMILE_COLORSPACE_RGB565_A5P +#define EVAS_COLORSPACE_GRY8 EMILE_COLORSPACE_GRY8 +#define EVAS_COLORSPACE_YCBCR422601_PL EMILE_COLORSPACE_YCBCR422601_PL +#define EVAS_COLORSPACE_YCBCR420NV12601_PL EMILE_COLORSPACE_YCBCR420NV12601_PL +#define EVAS_COLORSPACE_YCBCR420TM12601_PL EMILE_COLORSPACE_YCBCR420TM12601_PL +#define EVAS_COLORSPACE_AGRY88 EMILE_COLORSPACE_AGRY88 // ETC1/2 support -#define EVAS_COLORSPACE_ETC1 EFL_GFX_COLORSPACE_ETC1 -#define EVAS_COLORSPACE_RGB8_ETC2 EFL_GFX_COLORSPACE_RGB8_ETC2 -#define EVAS_COLORSPACE_RGBA8_ETC2_EAC EFL_GFX_COLORSPACE_RGBA8_ETC2_EAC -#define EVAS_COLORSPACE_ETC1_ALPHA EFL_GFX_COLORSPACE_ETC1_ALPHA +#define EVAS_COLORSPACE_ETC1 EMILE_COLORSPACE_ETC1 +#define EVAS_COLORSPACE_RGB8_ETC2 EMILE_COLORSPACE_RGB8_ETC2 +#define EVAS_COLORSPACE_RGBA8_ETC2_EAC EMILE_COLORSPACE_RGBA8_ETC2_EAC +#define EVAS_COLORSPACE_ETC1_ALPHA EMILE_COLORSPACE_ETC1_ALPHA // S3TC support -#define EVAS_COLORSPACE_RGB_S3TC_DXT1 EFL_GFX_COLORSPACE_RGB_S3TC_DXT1 -#define EVAS_COLORSPACE_RGBA_S3TC_DXT1 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT1 -#define EVAS_COLORSPACE_RGBA_S3TC_DXT2 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT2 -#define EVAS_COLORSPACE_RGBA_S3TC_DXT3 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT3 -#define EVAS_COLORSPACE_RGBA_S3TC_DXT4 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT4 -#define EVAS_COLORSPACE_RGBA_S3TC_DXT5 EFL_GFX_COLORSPACE_RGBA_S3TC_DXT5 +#define EVAS_COLORSPACE_RGB_S3TC_DXT1 EMILE_COLORSPACE_RGB_S3TC_DXT1 +#define EVAS_COLORSPACE_RGBA_S3TC_DXT1 EMILE_COLORSPACE_RGBA_S3TC_DXT1 +#define EVAS_COLORSPACE_RGBA_S3TC_DXT2 EMILE_COLORSPACE_RGBA_S3TC_DXT2 +#define EVAS_COLORSPACE_RGBA_S3TC_DXT3 EMILE_COLORSPACE_RGBA_S3TC_DXT3 +#define EVAS_COLORSPACE_RGBA_S3TC_DXT4 EMILE_COLORSPACE_RGBA_S3TC_DXT4 +#define EVAS_COLORSPACE_RGBA_S3TC_DXT5 EMILE_COLORSPACE_RGBA_S3TC_DXT5 struct _Evas_Image_Load_Func { diff --git a/src/lib/evas/canvas/efl_canvas_animation_types.eot b/src/lib/evas/canvas/efl_canvas_animation_types.eot index ad3aecc637..23e89aef0d 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_types.eot +++ b/src/lib/evas/canvas/efl_canvas_animation_types.eot @@ -1,9 +1,9 @@ // ---------------------------------------------------------------------------- // All the below types are for Efl Animation -struct Efl.Canvas.Animation_Player_Event_Running; [[Information of event running]] +struct @beta Efl.Canvas.Animation_Player_Event_Running; [[Information of event running]] -enum Efl.Canvas.Animation_Repeat_Mode +enum @beta Efl.Canvas.Animation_Repeat_Mode { [[Animation repeat mode]] diff --git a/src/lib/evas/canvas/efl_canvas_filter_internal.eo b/src/lib/evas/canvas/efl_canvas_filter_internal.eo index fc8ac18a0e..052c327d9c 100644 --- a/src/lib/evas/canvas/efl_canvas_filter_internal.eo +++ b/src/lib/evas/canvas/efl_canvas_filter_internal.eo @@ -3,7 +3,7 @@ /* Everything in this file is internal to Evas. It is not meant to be used from outside EFL itself! */ -struct Efl.Gfx.Color32 +struct @beta Efl.Gfx.Color32 { [[32 bit color data structure]] r: uint8; [[Red component of the color]] @@ -12,14 +12,14 @@ struct Efl.Gfx.Color32 a: uint8; [[Translucent component of the color]] } -struct Efl.Canvas.Filter.State_Name +struct @beta Efl.Canvas.Filter.State_Name { [[Filter state name structure]] name: string; [[Filter state name]] value: double; [[Filter state value]] } -struct Efl.Canvas.Filter.State_Text +struct @beta Efl.Canvas.Filter.State_Text { [[Filter state text structure]] outline: Efl.Gfx.Color32; [[Text outline color]] @@ -28,7 +28,7 @@ struct Efl.Canvas.Filter.State_Text glow2: Efl.Gfx.Color32; [[Text glow2 color]] } -struct Efl.Canvas.Filter.State +struct @beta Efl.Canvas.Filter.State { [[Internal structure representing the state of a Gfx Filter]] text: Efl.Canvas.Filter.State_Text; [[Text state]] diff --git a/src/lib/evas/canvas/efl_canvas_group.eo b/src/lib/evas/canvas/efl_canvas_group.eo index e7d12ff033..3dcee10c00 100644 --- a/src/lib/evas/canvas/efl_canvas_group.eo +++ b/src/lib/evas/canvas/efl_canvas_group.eo @@ -1,4 +1,4 @@ -class @beta Efl.Canvas.Group extends Efl.Canvas.Object +class Efl.Canvas.Group extends Efl.Canvas.Object { [[A group object is a container for other canvas objects. Its children move along their parent and are often clipped with a common clipper. diff --git a/src/lib/evas/canvas/efl_canvas_image.c b/src/lib/evas/canvas/efl_canvas_image.c index c89ee213f8..434c427bb0 100644 --- a/src/lib/evas/canvas/efl_canvas_image.c +++ b/src/lib/evas/canvas/efl_canvas_image.c @@ -598,7 +598,7 @@ _image_pixels_set(Evas_Object_Protected_Data *obj, ENFN->image_size_get(ENC, o->engine_data, &iw, &ih); ics = ENFN->image_colorspace_get(ENC, o->engine_data); alpha = ENFN->image_alpha_get(ENC, o->engine_data); - if ((w != iw) || (h != ih) || (ics != cspace) || (alpha != o->cur->has_alpha)) + if ((w != iw) || (h != ih) || (ics != (Evas_Colorspace)cspace) || (alpha != o->cur->has_alpha)) { ENFN->image_free(ENC, o->engine_data); o->engine_data = NULL; @@ -639,7 +639,7 @@ _image_pixels_set(Evas_Object_Protected_Data *obj, ENFN->image_stride_get(ENC, o->engine_data, &int_stride); if (resized || o->cur->f || o->cur->key || - (o->cur->image.stride != int_stride) || (cspace != o->cur->cspace)) + (o->cur->image.stride != int_stride) || (cspace != (Efl_Gfx_Colorspace)o->cur->cspace)) { EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, cur) { diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo index d449c803d8..3f2bd0d2e7 100644 --- a/src/lib/evas/canvas/efl_canvas_object.eo +++ b/src/lib/evas/canvas/efl_canvas_object.eo @@ -1,12 +1,12 @@ import efl_text_types; -struct Efl.Canvas.Object_Animation_Event; [[Information of animation events]] +struct @beta Efl.Canvas.Object_Animation_Event; [[Information of animation events]] struct Efl.Event_Animator_Tick { [[EFL event animator tick data structure]] update_area: Eina.Rect; [[Area of the canvas that will be pushed to screen.]] } -abstract @beta Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, +abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, Efl.Input.Interface, Efl.Gfx.Hint, Efl.Gfx.Mapping, Efl.Ui.I18n, Efl.Canvas.Pointer { @@ -195,14 +195,16 @@ abstract @beta Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.En focus: bool; [[$true if focused by at least one seat or $false otherwise.]] } } - seat_focus_check { + /* 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 ]] params { @in seat: Efl.Input.Device; [[The seat to check if the object is focused. Use $null for the default seat.]] } return: bool; [[$true if focused or $false otherwise.]] } - seat_focus_add { + /* FIXME Efl.Input.Device is not stable yet*/ + seat_focus_add @beta { [[ Add a seat to the focus list. Evas allows the Efl.Canvas.Object to be focused by multiple seats @@ -218,7 +220,8 @@ abstract @beta Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.En } return: bool; [[$true if the focus has been set or $false otherwise.]] } - seat_focus_del { + /* FIXME Efl.Input.Device is not stable yet*/ + seat_focus_del @beta { [[ Remove a seat from the focus list. @since 1.19 diff --git a/src/lib/evas/canvas/efl_canvas_surface_x11.eo b/src/lib/evas/canvas/efl_canvas_surface_x11.eo index 6572a8e04f..129429c06e 100644 --- a/src/lib/evas/canvas/efl_canvas_surface_x11.eo +++ b/src/lib/evas/canvas/efl_canvas_surface_x11.eo @@ -1,4 +1,4 @@ -struct Efl.Canvas.Surface_X11_Pixmap +struct @beta Efl.Canvas.Surface_X11_Pixmap { [[The type used by @Efl.Canvas.Surface.native_buffer.]] visual: void_ptr; [[X11 Visual for this Pixmap.]] diff --git a/src/lib/evas/canvas/efl_canvas_text.eo b/src/lib/evas/canvas/efl_canvas_text.eo index ef53030272..d6c350eef2 100644 --- a/src/lib/evas/canvas/efl_canvas_text.eo +++ b/src/lib/evas/canvas/efl_canvas_text.eo @@ -1,6 +1,6 @@ import efl_text_types; -struct Efl.Canvas.Text_Style; [[EFL text style data structure]] +struct @beta Efl.Canvas.Text_Style; [[EFL text style data structure]] class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text, Efl.Canvas.Filter.Internal, Efl.Text_Font, diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.eo b/src/lib/evas/canvas/efl_canvas_vg_object.eo index e79e0a27a1..98766e8af6 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_object.eo +++ b/src/lib/evas/canvas/efl_canvas_vg_object.eo @@ -1,4 +1,4 @@ -enum Efl.Canvas.Vg.Fill_Mode +enum @beta Efl.Canvas.Vg.Fill_Mode { [[Enumeration that defines how viewbox will be filled int the vg canvs's viewport. default Fill_Mode is $none]] diff --git a/src/lib/evas/canvas/efl_gfx_mapping.eo b/src/lib/evas/canvas/efl_gfx_mapping.eo index 11a4ad273f..0ca0d33a81 100644 --- a/src/lib/evas/canvas/efl_gfx_mapping.eo +++ b/src/lib/evas/canvas/efl_gfx_mapping.eo @@ -1,4 +1,4 @@ -mixin @beta Efl.Gfx.Mapping requires Efl.Object +mixin Efl.Gfx.Mapping requires Efl.Object { [[Texture UV mapping for all objects (rotation, perspective, 3d, ...). diff --git a/src/lib/evas/canvas/efl_input_focus.eo b/src/lib/evas/canvas/efl_input_focus.eo index 2adb226f71..d15685a339 100644 --- a/src/lib/evas/canvas/efl_input_focus.eo +++ b/src/lib/evas/canvas/efl_input_focus.eo @@ -1,4 +1,4 @@ -class @beta Efl.Input.Focus extends Efl.Object implements Efl.Input.Event +class Efl.Input.Focus extends Efl.Object implements Efl.Input.Event { [[Represents a focus event. @since 1.19]] methods { diff --git a/src/lib/evas/canvas/efl_input_state.eo b/src/lib/evas/canvas/efl_input_state.eo index 51b8155082..6aa88e37e0 100644 --- a/src/lib/evas/canvas/efl_input_state.eo +++ b/src/lib/evas/canvas/efl_input_state.eo @@ -1,11 +1,12 @@ import efl_input_types; -interface @beta Efl.Input.State +interface Efl.Input.State { [[Efl input state interface]] eo_prefix: efl_input; methods { - @property modifier_enabled { + /* FIXME Efl.Input.Device is not stable yet*/ + @property modifier_enabled @beta { [[Indicates whether a key modifier is on, such as Ctrl, Shift, ...]] get {} keys { @@ -16,7 +17,8 @@ interface @beta Efl.Input.State is_set: bool; [[$true if the key modifier is pressed.]] } } - @property lock_enabled { + /* FIXME Efl.Input.Device is not stable yet*/ + @property lock_enabled @beta { [[Indicates whether a key lock is on, such as NumLock, CapsLock, ...]] get {} keys { diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c index c8cbb56640..f5dbb15353 100644 --- a/src/lib/evas/canvas/evas_callbacks.c +++ b/src/lib/evas/canvas/evas_callbacks.c @@ -56,17 +56,17 @@ DEFINE_EVAS_CALLBACKS(_legacy_evas_callback_table, EVAS_CALLBACK_LAST, EVAS_OBJECT_EVENT_DEL, EFL_EVENT_HOLD, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, - EFL_GFX_IMAGE_EVENT_PRELOAD, - EFL_CANVAS_SCENE_EVENT_FOCUS_IN, - EFL_CANVAS_SCENE_EVENT_FOCUS_OUT, + EFL_GFX_IMAGE_EVENT_IMAGE_PRELOAD, + EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_IN, + EFL_CANVAS_SCENE_EVENT_SCENE_FOCUS_OUT, EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE, EVAS_CANVAS_EVENT_RENDER_FLUSH_POST, EFL_CANVAS_SCENE_EVENT_OBJECT_FOCUS_IN, EFL_CANVAS_SCENE_EVENT_OBJECT_FOCUS_OUT, - EFL_GFX_IMAGE_EVENT_UNLOAD, + EFL_GFX_IMAGE_EVENT_IMAGE_UNLOAD, EFL_CANVAS_SCENE_EVENT_RENDER_PRE, EFL_CANVAS_SCENE_EVENT_RENDER_POST, - EFL_GFX_IMAGE_EVENT_RESIZE, + EFL_GFX_IMAGE_EVENT_IMAGE_RESIZE, EFL_CANVAS_SCENE_EVENT_DEVICE_CHANGED, EFL_EVENT_POINTER_AXIS, EVAS_CANVAS_EVENT_VIEWPORT_RESIZE ); diff --git a/src/lib/evas/canvas/evas_canvas3d_types.eot b/src/lib/evas/canvas/evas_canvas3d_types.eot index a050af3be9..81e3030e19 100644 --- a/src/lib/evas/canvas/evas_canvas3d_types.eot +++ b/src/lib/evas/canvas/evas_canvas3d_types.eot @@ -1,9 +1,9 @@ // ---------------------------------------------------------------------------- // All the below types are for Evas 3D -type Evas.Real: double; [[A type for floating value]] +type @beta Evas.Real: double; [[A type for floating value]] -enum Evas.Canvas3D.Object_Type +enum @beta Evas.Canvas3D.Object_Type { [[Type of 3D Object @@ -21,7 +21,7 @@ enum Evas.Canvas3D.Object_Type @since 1.15]] } -enum Evas.Canvas3D.State +enum @beta Evas.Canvas3D.State { [[State of the Evas 3D @@ -94,7 +94,7 @@ enum Evas.Canvas3D.State @since 1.18]] } -enum Evas.Canvas3D.Space +enum @beta Evas.Canvas3D.Space { [[Transform space @@ -104,7 +104,7 @@ enum Evas.Canvas3D.Space world [[World coordinate space]] } -enum Evas.Canvas3D.Node_Type +enum @beta Evas.Canvas3D.Node_Type { [[Types of a node @@ -116,7 +116,7 @@ enum Evas.Canvas3D.Node_Type mesh [[Node which can contain mesh objects]] } -enum Evas.Canvas3D.Node_Orientation_Type +enum @beta Evas.Canvas3D.Node_Orientation_Type { [[Types of node orientation @@ -128,7 +128,7 @@ enum Evas.Canvas3D.Node_Orientation_Type quaternion [[Node orientation is given as a quaternion]] } -enum Evas.Canvas3D.Index_Format +enum @beta Evas.Canvas3D.Index_Format { [[Index formats @@ -138,7 +138,7 @@ enum Evas.Canvas3D.Index_Format unsigned_short [[Index is of type unsigned short]] } -enum Evas.Canvas3D.Frustum_Mode +enum @beta Evas.Canvas3D.Frustum_Mode { [[Frustum modes @@ -148,7 +148,7 @@ enum Evas.Canvas3D.Frustum_Mode central_point [[Central point]] } -enum Evas.Canvas3D.Vertex_Assembly +enum @beta Evas.Canvas3D.Vertex_Assembly { [[Vertex assembly modes. Vertex assembly represents how the vertices are organized into geometric primitives. @@ -162,7 +162,7 @@ enum Evas.Canvas3D.Vertex_Assembly triangle_fan [[Vertices are organized as a triangle fan]] } -enum Evas.Canvas3D.Comparison +enum @beta Evas.Canvas3D.Comparison { [[Comparsion functions for testing(alpha, depth, stencil) in fragment shader @@ -177,7 +177,7 @@ enum Evas.Canvas3D.Comparison always [[Always passes (initial value)]] } -enum Evas.Canvas3D.Wrap_Mode +enum @beta Evas.Canvas3D.Wrap_Mode { [[Wrap modes for texture units @@ -187,7 +187,7 @@ enum Evas.Canvas3D.Wrap_Mode reflect [[Values will be repeated in a reflected manner]] } -enum Evas.Canvas3D.Texture_Filter +enum @beta Evas.Canvas3D.Texture_Filter { [[Filters for texture units @@ -200,7 +200,7 @@ enum Evas.Canvas3D.Texture_Filter linear_mipmap_linear [[Linear sampling in mipmap and interpolate]] } -enum Evas.Canvas3D.Mesh_Primitive +enum @beta Evas.Canvas3D.Mesh_Primitive { [[Mesh primitive @@ -217,7 +217,7 @@ enum Evas.Canvas3D.Mesh_Primitive count [[Sentinel value to indicate last enum field during iteration]] } -enum Evas.Canvas3D.Primitive_Mode +enum @beta Evas.Canvas3D.Primitive_Mode { [[Mode of mesh primitive @@ -227,7 +227,7 @@ enum Evas.Canvas3D.Primitive_Mode alternative_uv [[Ptimitive with alternative uv (supported for sphere)]] } -enum Evas.Canvas3D.Shader_Mode +enum @beta Evas.Canvas3D.Shader_Mode { [[Shader shade modes @@ -243,7 +243,7 @@ enum Evas.Canvas3D.Shader_Mode post_processing_FXAA [[Render full screen quard]] } -enum Evas.Canvas3D.Vertex_Attrib +enum @beta Evas.Canvas3D.Vertex_Attrib { [[Vertex attribute IDs @@ -255,7 +255,7 @@ enum Evas.Canvas3D.Vertex_Attrib texcoord [[vertex texture coordinate]] } -enum Evas.Canvas3D.Blend_Func +enum @beta Evas.Canvas3D.Blend_Func { [[Blending function @@ -278,7 +278,7 @@ enum Evas.Canvas3D.Blend_Func src_alpha_saturate [[The scale factors for color components is (i, i, i, 1) where i = min(as, ka, ad)/ka]] } -enum Evas.Canvas3D.Material_Attrib +enum @beta Evas.Canvas3D.Material_Attrib { [[Material attributes @@ -290,4 +290,4 @@ enum Evas.Canvas3D.Material_Attrib normal [[Normal map term]] } -type Evas.Canvas3D.Surface_Func: __undefined_type; [[Evas 3D canvas surface function type]] +type @beta Evas.Canvas3D.Surface_Func: __undefined_type; [[Evas 3D canvas surface function type]] diff --git a/src/lib/evas/canvas/evas_canvas_eo.c b/src/lib/evas/canvas/evas_canvas_eo.c index e5ba384d43..5ec573bdcd 100644 --- a/src/lib/evas/canvas/evas_canvas_eo.c +++ b/src/lib/evas/canvas/evas_canvas_eo.c @@ -23,7 +23,7 @@ int _evas_canvas_image_cache_get(const Eo *obj, Evas_Public_Data *pd); static Eina_Value -__eolian_evas_canvas_image_cache_get_reflect(Eo *obj) +__eolian_evas_canvas_image_cache_get_reflect(const Eo *obj) { int val = evas_canvas_image_cache_get(obj); return eina_value_int_init(val); @@ -63,7 +63,7 @@ int _evas_canvas_font_cache_get(const Eo *obj, Evas_Public_Data *pd); static Eina_Value -__eolian_evas_canvas_font_cache_get_reflect(Eo *obj) +__eolian_evas_canvas_font_cache_get_reflect(const Eo *obj) { int val = evas_canvas_font_cache_get(obj); return eina_value_int_init(val); diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c index 617e323be0..0d6319457c 100644 --- a/src/lib/evas/canvas/evas_device.c +++ b/src/lib/evas/canvas/evas_device.c @@ -50,7 +50,7 @@ _new_default_device_find(Evas_Public_Data *e, Evas_Device *old_dev) EINA_LIST_FOREACH(e->devices, l, dev) { - if (efl_input_device_type_get(dev) != old_class) + if ((Evas_Device_Class)efl_input_device_type_get(dev) != old_class) continue; def = dev; @@ -400,7 +400,7 @@ evas_device_class_set(Evas_Device *dev, Evas_Device_Class clas) Efl_Input_Device_Data *d = efl_data_scope_get(dev, EFL_INPUT_DEVICE_CLASS); Evas_Public_Data *edata = efl_data_scope_get(d->evas, EVAS_CANVAS_CLASS); - if (d->klass == clas) + if ((Evas_Device_Class)d->klass == clas) return; if (_is_pointer(d->klass)) diff --git a/src/lib/evas/canvas/evas_object_inform.c b/src/lib/evas/canvas/evas_object_inform.c index 8e1ea01ac4..f13b3bfbae 100644 --- a/src/lib/evas/canvas/evas_object_inform.c +++ b/src/lib/evas/canvas/evas_object_inform.c @@ -93,7 +93,7 @@ evas_object_inform_call_image_preloaded(Evas_Object *eo_obj) (preload & EVAS_IMAGE_PRELOAD_CANCEL)) { event_id = _evas_object_event_new(); - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL, event_id, EFL_GFX_IMAGE_EVENT_PRELOAD); + evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL, event_id, EFL_GFX_IMAGE_EVENT_IMAGE_PRELOAD); _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id); } } @@ -104,7 +104,7 @@ evas_object_inform_call_image_unloaded(Evas_Object *eo_obj) Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); int event_id = _evas_object_event_new(); - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL, event_id, EFL_GFX_IMAGE_EVENT_UNLOAD); + evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL, event_id, EFL_GFX_IMAGE_EVENT_IMAGE_UNLOAD); _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id); } @@ -114,6 +114,6 @@ evas_object_inform_call_image_resize(Evas_Object *eo_obj) Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); int event_id = _evas_object_event_new(); - evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_RESIZE, NULL, event_id, EFL_GFX_IMAGE_EVENT_RESIZE); + evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_RESIZE, NULL, event_id, EFL_GFX_IMAGE_EVENT_IMAGE_RESIZE); _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id); } diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 2f4b7a0c4c..ad0eaf82d6 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -1554,7 +1554,7 @@ _efl_canvas_object_efl_gfx_hint_hint_aspect_set(Eo *eo_obj, Evas_Object_Protecte if (!sz.w && !sz.h) return; _evas_object_size_hint_alloc(eo_obj, obj); } - if ((obj->size_hints->aspect.mode == aspect) && + if ((obj->size_hints->aspect.mode == (Evas_Aspect_Control)aspect) && (obj->size_hints->aspect.size.w == sz.w) && (obj->size_hints->aspect.size.h == sz.h)) return; obj->size_hints->aspect.mode = aspect; @@ -2354,15 +2354,15 @@ _efl_canvas_object_render_parent_get(const Eo *eo_obj EINA_UNUSED, Evas_Object_P } EOLIAN static void -_efl_canvas_object_paragraph_direction_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, Evas_BiDi_Direction dir EINA_UNUSED) +_efl_canvas_object_paragraph_direction_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, Efl_Text_Bidirectional_Type dir EINA_UNUSED) { return; } -EOLIAN static Evas_BiDi_Direction +EOLIAN static Efl_Text_Bidirectional_Type _efl_canvas_object_paragraph_direction_get(const Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED) { - return EVAS_BIDI_DIRECTION_NEUTRAL; + return (Efl_Text_Bidirectional_Type)EVAS_BIDI_DIRECTION_NEUTRAL; } EOLIAN static void @@ -2426,7 +2426,7 @@ EAPI void evas_object_size_hint_aspect_get(const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h) { Eina_Size2D sz = { 0, 0 }; - efl_gfx_hint_aspect_get(obj, aspect, &sz); + efl_gfx_hint_aspect_get(obj, (Efl_Gfx_Hint_Aspect*)aspect, &sz); if (w) *w = sz.w; if (h) *h = sz.h; } diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 46dee1df9d..289b61a878 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -1798,16 +1798,16 @@ _efl_canvas_group_group_paragraph_direction_set_internal(Eo *eo_obj, EOLIAN static void _efl_canvas_group_efl_canvas_object_paragraph_direction_set(Eo *eo_obj, Evas_Smart_Data *o, - Evas_BiDi_Direction dir) + Efl_Text_Bidirectional_Type dir) { Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); Evas_Smart_Data *parent; - if ((!(o->inherit_paragraph_direction) && (o->paragraph_direction == dir)) || - (o->inherit_paragraph_direction && (dir == EVAS_BIDI_DIRECTION_INHERIT))) + if ((!(o->inherit_paragraph_direction) && (o->paragraph_direction == (Evas_BiDi_Direction)dir)) || + (o->inherit_paragraph_direction && ((Evas_BiDi_Direction)dir == EVAS_BIDI_DIRECTION_INHERIT))) return; - if (dir == EVAS_BIDI_DIRECTION_INHERIT) + if (dir == (Efl_Text_Bidirectional_Type)EVAS_BIDI_DIRECTION_INHERIT) { o->inherit_paragraph_direction = EINA_TRUE; Evas_BiDi_Direction parent_dir = EVAS_BIDI_DIRECTION_NEUTRAL; @@ -1836,10 +1836,10 @@ _efl_canvas_group_efl_canvas_object_paragraph_direction_set(Eo *eo_obj, Evas_Sma _efl_canvas_group_group_paragraph_direction_set_internal(eo_obj, o->paragraph_direction); } -EOLIAN static Evas_BiDi_Direction +EOLIAN static Efl_Text_Bidirectional_Type _efl_canvas_group_efl_canvas_object_paragraph_direction_get(const Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *o) { - return o->paragraph_direction; + return (Efl_Text_Bidirectional_Type)o->paragraph_direction; } EOLIAN static const Eo * diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c index 021b817548..cac8602100 100644 --- a/src/lib/evas/canvas/evas_object_text.c +++ b/src/lib/evas/canvas/evas_object_text.c @@ -1108,7 +1108,7 @@ _evas_text_efl_text_text_get(const Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o) return o->cur.utf8_text; } -EOLIAN static Evas_BiDi_Direction +EOLIAN static Efl_Text_Bidirectional_Type _evas_text_direction_get(const Eo *eo_obj, Evas_Text_Data *o) { #ifdef BIDI_SUPPORT @@ -1137,7 +1137,7 @@ _evas_text_direction_get(const Eo *eo_obj, Evas_Text_Data *o) } #endif - return o->bidi_dir; + return (Efl_Text_Bidirectional_Type)o->bidi_dir; } EOLIAN static Evas_Coord @@ -2376,16 +2376,16 @@ evas_object_text_filter_source_set(Evas_Object *obj, const char *name, Evas_Obje EOLIAN static void _evas_text_efl_canvas_object_paragraph_direction_set(Eo *eo_obj, Evas_Text_Data *o, - Evas_BiDi_Direction dir) + Efl_Text_Bidirectional_Type dir) { #ifdef BIDI_SUPPORT Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); - if ((!(o->inherit_paragraph_direction) && (o->paragraph_direction == dir)) || - (o->inherit_paragraph_direction && (dir == EVAS_BIDI_DIRECTION_INHERIT))) + if ((!(o->inherit_paragraph_direction) && (o->paragraph_direction == (Evas_BiDi_Direction)dir)) || + (o->inherit_paragraph_direction && ((Evas_BiDi_Direction)dir == EVAS_BIDI_DIRECTION_INHERIT))) return; - if (dir == EVAS_BIDI_DIRECTION_INHERIT) + if (dir == (Efl_Text_Bidirectional_Type)EVAS_BIDI_DIRECTION_INHERIT) { o->inherit_paragraph_direction = EINA_TRUE; Evas_BiDi_Direction parent_dir = EVAS_BIDI_DIRECTION_NEUTRAL; @@ -2414,11 +2414,11 @@ _evas_text_efl_canvas_object_paragraph_direction_set(Eo *eo_obj, Evas_Text_Data #endif } -EOLIAN static Evas_BiDi_Direction +EOLIAN static Efl_Text_Bidirectional_Type _evas_text_efl_canvas_object_paragraph_direction_get(const Eo *eo_obj EINA_UNUSED, Evas_Text_Data *o) { - return o->paragraph_direction; + return (Efl_Text_Bidirectional_Type)o->paragraph_direction; } EOLIAN static void diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index ce96dc9997..63eddd46a3 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -14987,16 +14987,16 @@ _evas_object_textblock_rehint(Evas_Object *eo_obj) EOLIAN static void _efl_canvas_text_efl_canvas_object_paragraph_direction_set(Eo *eo_obj, Efl_Canvas_Text_Data *o, - Evas_BiDi_Direction dir) + Efl_Text_Bidirectional_Type dir) { #ifdef BIDI_SUPPORT Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); - if ((!(o->inherit_paragraph_direction) && (o->paragraph_direction == dir)) || - (o->inherit_paragraph_direction && (dir == EVAS_BIDI_DIRECTION_INHERIT))) + if ((!(o->inherit_paragraph_direction) && (o->paragraph_direction == (Evas_BiDi_Direction)dir)) || + (o->inherit_paragraph_direction && ((Evas_BiDi_Direction)dir == EVAS_BIDI_DIRECTION_INHERIT))) return; - if (dir == EVAS_BIDI_DIRECTION_INHERIT) + if (dir == (Efl_Text_Bidirectional_Type)EVAS_BIDI_DIRECTION_INHERIT) { o->inherit_paragraph_direction = EINA_TRUE; Evas_BiDi_Direction parent_dir = EVAS_BIDI_DIRECTION_NEUTRAL; @@ -15027,11 +15027,11 @@ _efl_canvas_text_efl_canvas_object_paragraph_direction_set(Eo *eo_obj, #endif } -EOLIAN static Evas_BiDi_Direction +EOLIAN static Efl_Text_Bidirectional_Type _efl_canvas_text_efl_canvas_object_paragraph_direction_get(const Eo *eo_obj EINA_UNUSED, Efl_Canvas_Text_Data *o) { - return o->paragraph_direction; + return (Efl_Text_Bidirectional_Type)o->paragraph_direction; } static int diff --git a/src/lib/evas/canvas/evas_text_eo.c b/src/lib/evas/canvas/evas_text_eo.c index 2632a10d33..9285d46114 100644 --- a/src/lib/evas/canvas/evas_text_eo.c +++ b/src/lib/evas/canvas/evas_text_eo.c @@ -31,7 +31,7 @@ double _evas_text_ellipsis_get(const Eo *obj, Evas_Text_Data *pd); static Eina_Value -__eolian_evas_text_ellipsis_get_reflect(Eo *obj) +__eolian_evas_text_ellipsis_get_reflect(const Eo *obj) { double val = evas_obj_text_ellipsis_get(obj); return eina_value_double_init(val); @@ -63,7 +63,7 @@ const char *_evas_text_bidi_delimiters_get(const Eo *obj, Evas_Text_Data *pd); static Eina_Value -__eolian_evas_text_bidi_delimiters_get_reflect(Eo *obj) +__eolian_evas_text_bidi_delimiters_get_reflect(const Eo *obj) { const char *val = evas_obj_text_bidi_delimiters_get(obj); return eina_value_string_init(val); diff --git a/src/lib/evas/common/evas_convert_rgb_32.c b/src/lib/evas/common/evas_convert_rgb_32.c index 89789b2ac5..11671466b2 100644 --- a/src/lib/evas/common/evas_convert_rgb_32.c +++ b/src/lib/evas/common/evas_convert_rgb_32.c @@ -1,9 +1,13 @@ #include "evas_common_private.h" #include "evas_convert_rgb_32.h" #ifdef BUILD_NEON -#include +# include #endif +// tiled rotate is faster in every case i've tested, so just use this +// by default. +#define TILE_ROTATE 1 + void evas_common_convert_rgba_to_32bpp_rgb_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { @@ -19,9 +23,9 @@ evas_common_convert_rgba_to_32bpp_rgb_8888 (DATA32 *src, DATA8 *dst, int src_jum for (y = 0; y < h; y++) { - func(src_ptr, dst_ptr, w); - src_ptr += w + src_jump; - dst_ptr += w + dst_jump; + func(src_ptr, dst_ptr, w); + src_ptr += w + src_jump; + dst_ptr += w + dst_jump; } return; } @@ -44,234 +48,205 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int } #ifdef TILE_ROTATE -#ifdef BUILD_NEON -#define ROT90_QUAD_COPY_LOOP(pix_type) \ - if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) \ - { \ - if((w%4) == 0) \ - { \ - int klght = 4 * src_stride; \ - for(y = 0; y < h; y++) \ - { \ - const pix_type *s = &(src[(h - y - 1)]); \ - pix_type *d = &(dst[(dst_stride * y)]); \ - pix_type *ptr1 = s; \ - pix_type *ptr2 = ptr1 + src_stride; \ - pix_type *ptr3 = ptr2 + src_stride; \ - pix_type *ptr4 = ptr3 + src_stride; \ - for(x = 0; x < w; x+=4) \ - { \ - pix_type s_array[4] = {*ptr1, *ptr2, *ptr3, *ptr4}; \ - vst1q_s32(d, vld1q_s32(s_array)); \ - d += 4; \ - ptr1 += klght; \ - ptr2 += klght; \ - ptr3 += klght; \ - ptr4 += klght; \ - } \ - } \ +# ifdef BUILD_NEON +# define ROT90_QUAD_COPY_LOOP(pix_type) \ + if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) { \ + if ((w % 4) == 0) { \ + int klght = 4 * src_stride; \ + for (y = 0; y < h; y++) { \ + const pix_type *s = &(src[h - y - 1]); \ + pix_type *d = &(dst[dst_stride * y]); \ + pix_type *ptr1 = s; \ + pix_type *ptr2 = ptr1 + src_stride; \ + pix_type *ptr3 = ptr2 + src_stride; \ + pix_type *ptr4 = ptr3 + src_stride; \ + for(x = 0; x < w; x += 4) { \ + pix_type s_array[4] = { *ptr1, *ptr2, *ptr3, *ptr4 }; \ + vst1q_s32(d, vld1q_s32(s_array)); \ + d += 4; \ + ptr1 += klght; \ + ptr2 += klght; \ + ptr3 += klght; \ + ptr4 += klght; \ + } \ + } \ } \ - else \ - { \ - for (y = 0; y < h; y++) \ - { \ - const pix_type *s = &(src[(h - y - 1)]); \ - pix_type *d = &(dst[(dst_stride * y)]); \ - for (x = 0; x < w; x++) \ - { \ - *d++ = *s; \ - s += src_stride; \ - } \ - } \ + else { \ + for (y = 0; y < h; y++) { \ + const pix_type *s = &(src[h - y - 1]); \ + pix_type *d = &(dst[dst_stride * y]); \ + for (x = 0; x < w; x++) { \ + *d++ = *s; \ + s += src_stride; \ + } \ + } \ } \ } \ else -#define ROT270_QUAD_COPY_LOOP(pix_type) \ - if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) \ - { \ - if((w%4) == 0) \ - { \ - int klght = 4 * src_stride; \ - for(y = 0; y < h; y++) \ - { \ - const pix_type *s = &(src[(src_stride * (w - 1)) + y]); \ - pix_type *d = &(dst[(dst_stride * y)]); \ - pix_type *ptr1 = s; \ - pix_type *ptr2 = ptr1 + src_stride; \ - pix_type *ptr3 = ptr2 + src_stride; \ - pix_type *ptr4 = ptr3 + src_stride; \ - for(x = 0; x < w; x+=4) \ - { \ - pix_type s_array[4] = {*ptr1, *ptr2, *ptr3, *ptr4}; \ - vst1q_s32(d, vld1q_s32(s_array)); \ - d += 4; \ - ptr1 += klght; \ - ptr2 += klght; \ - ptr3 += klght; \ - ptr4 += klght; \ - } \ - } \ +# define ROT270_QUAD_COPY_LOOP(pix_type) \ + if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) { \ + if ((w % 4) == 0) { \ + int klght = 4 * src_stride; \ + for (y = 0; y < h; y++) { \ + const pix_type *s = &(src[(src_stride * (w - 1)) + y]); \ + pix_type *d = &(dst[dst_stride * y]); \ + pix_type *ptr1 = s; \ + pix_type *ptr2 = ptr1 + src_stride; \ + pix_type *ptr3 = ptr2 + src_stride; \ + pix_type *ptr4 = ptr3 + src_stride; \ + for(x = 0; x < w; x+=4) { \ + pix_type s_array[4] = { *ptr1, *ptr2, *ptr3, *ptr4 }; \ + vst1q_s32(d, vld1q_s32(s_array)); \ + d += 4; \ + ptr1 += klght; \ + ptr2 += klght; \ + ptr3 += klght; \ + ptr4 += klght; \ + } \ + } \ } \ - else \ - { \ - for (y = 0; y < h; y++) \ - { \ - const pix_type *s = &(src[(src_stride * (w - 1)) + y]); \ - pix_type *d = &(dst[(dst_stride * y)]); \ - for (x = 0; x < w; x++) \ - { \ - *d++ = *s; \ - s += src_stride; \ - } \ - } \ - } \ - } \ - else -#else -#define ROT90_QUAD_COPY_LOOP(pix_type) -#define ROT270_QUAD_COPY_LOOP(pix_type) -#endif -#define FAST_SIMPLE_ROTATE(suffix, pix_type) \ - static void \ - blt_rotated_90_trivial_##suffix(pix_type * restrict dst, \ - int dst_stride, \ - const pix_type * restrict src, \ - int src_stride, \ - int w, \ - int h) \ - { \ - int x, y; \ - ROT90_QUAD_COPY_LOOP(pix_type) \ - { \ - for (y = 0; y < h; y++) \ - { \ - const pix_type *s = &(src[(h - y - 1)]); \ - pix_type *d = &(dst[(dst_stride * y)]); \ - for (x = 0; x < w; x++) \ - { \ - *d++ = *s; \ - s += src_stride; \ - } \ - } \ - } \ - } \ - static void \ - blt_rotated_270_trivial_##suffix(pix_type * restrict dst, \ - int dst_stride, \ - const pix_type * restrict src, \ - int src_stride, \ - int w, \ - int h) \ - { \ - int x, y; \ - ROT270_QUAD_COPY_LOOP(pix_type) \ - { \ - for(y = 0; y < h; y++) \ - { \ + else { \ + for (y = 0; y < h; y++) { \ const pix_type *s = &(src[(src_stride * (w - 1)) + y]); \ - pix_type *d = &(dst[(dst_stride * y)]); \ - for (x = 0; x < w; x++) \ - { \ + pix_type *d = &(dst[dst_stride * y]); \ + for (x = 0; x < w; x++) { \ *d++ = *s; \ - s -= src_stride; \ + s += src_stride; \ } \ } \ } \ } \ + else +# else +# define ROT90_QUAD_COPY_LOOP(pix_type) +# define ROT270_QUAD_COPY_LOOP(pix_type) +# endif + +# define FAST_SIMPLE_ROTATE(suffix, pix_type) \ static void \ - blt_rotated_90_##suffix(pix_type * restrict dst, \ - int dst_stride, \ + blt_rotated_90_trivial_##suffix(pix_type * restrict dst, \ + int dst_stride, \ + const pix_type * restrict src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, y; \ + ROT90_QUAD_COPY_LOOP(pix_type) { \ + for (y = 0; y < h; y++) { \ + const pix_type *s = &(src[h - y - 1]); \ + pix_type *d = &(dst[dst_stride * y]); \ + for (x = 0; x < w; x++) { \ + *d++ = *s; \ + s += src_stride; \ + } \ + } \ + } \ + } \ + static void \ + blt_rotated_270_trivial_##suffix(pix_type * restrict dst, \ + int dst_stride, \ + const pix_type * restrict src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, y; \ + ROT270_QUAD_COPY_LOOP(pix_type) { \ + for (y = 0; y < h; y++) { \ + const pix_type *s = &(src[(src_stride * (w - 1)) + y]); \ + pix_type *d = &(dst[dst_stride * y]); \ + for (x = 0; x < w; x++) { \ + *d++ = *s; \ + s -= src_stride; \ + } \ + } \ + } \ + } \ + static void \ + blt_rotated_90_##suffix(pix_type * restrict dst, \ + int dst_stride, \ const pix_type * restrict src, \ - int src_stride, \ - int w, \ - int h) \ + int src_stride, \ + int w, \ + int h) \ { \ int x, leading_pixels = 0, trailing_pixels = 0; \ const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \ - if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \ - { \ - leading_pixels = TILE_SIZE - \ - (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ - if (leading_pixels > w) \ - leading_pixels = w; \ - blt_rotated_90_trivial_##suffix(dst, \ - dst_stride, \ - src, \ - src_stride, \ - leading_pixels, \ - h); \ - dst += leading_pixels; \ - src += leading_pixels * src_stride; \ - w -= leading_pixels; \ - } \ - if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \ - { \ - trailing_pixels = (((uintptr_t)(dst + w) & \ - (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ - if (trailing_pixels > w) \ - trailing_pixels = w; \ - w -= trailing_pixels; \ - } \ - for (x = 0; x < w; x += TILE_SIZE) \ - { \ - blt_rotated_90_trivial_##suffix(dst + x, \ - dst_stride, \ - &(src[(src_stride * x)]), \ - src_stride, \ - TILE_SIZE, \ - h); \ - } \ + if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) { \ + leading_pixels = TILE_SIZE - \ + (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (leading_pixels > w) leading_pixels = w; \ + blt_rotated_90_trivial_##suffix(dst, \ + dst_stride, \ + src, \ + src_stride, \ + leading_pixels, \ + h); \ + dst += leading_pixels; \ + src += leading_pixels * src_stride; \ + w -= leading_pixels; \ + } \ + if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) { \ + trailing_pixels = (((uintptr_t)(dst + w) & \ + (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (trailing_pixels > w) trailing_pixels = w; \ + w -= trailing_pixels; \ + } \ + for (x = 0; x < w; x += TILE_SIZE) { \ + blt_rotated_90_trivial_##suffix(dst + x, \ + dst_stride, \ + &(src[src_stride * x]), \ + src_stride, \ + TILE_SIZE, \ + h); \ + } \ if (trailing_pixels) \ blt_rotated_90_trivial_##suffix(dst + w, \ dst_stride, \ - &(src[(w * src_stride)]), \ + &(src[src_stride * w]), \ src_stride, \ trailing_pixels, \ h); \ } \ static void \ - blt_rotated_270_##suffix(pix_type * restrict dst, \ - int dst_stride, \ + blt_rotated_270_##suffix(pix_type * restrict dst, \ + int dst_stride, \ const pix_type * restrict src, \ - int src_stride, \ - int w, \ - int h) \ + int src_stride, \ + int w, \ + int h) \ { \ int x, leading_pixels = 0, trailing_pixels = 0; \ const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \ - if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \ - { \ - leading_pixels = TILE_SIZE - \ - (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ - if (leading_pixels > w) \ - leading_pixels = w; \ - blt_rotated_270_trivial_##suffix(dst, \ - dst_stride, \ - &(src[(src_stride * (w - leading_pixels))]), \ - src_stride, \ - leading_pixels, \ - h); \ - dst += leading_pixels; \ - w -= leading_pixels; \ - } \ - if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \ - { \ - trailing_pixels = (((uintptr_t)(dst + w) & \ - (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ - if (trailing_pixels > w) \ - trailing_pixels = w; \ - w -= trailing_pixels; \ - src += trailing_pixels * src_stride; \ - } \ - for (x = 0; x < w; x += TILE_SIZE) \ - { \ - blt_rotated_270_trivial_##suffix(dst + x, \ - dst_stride, \ - &(src[(src_stride * (w - x - TILE_SIZE))]), \ - src_stride, \ - TILE_SIZE, \ - h); \ - } \ + if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) { \ + leading_pixels = TILE_SIZE - \ + (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (leading_pixels > w) leading_pixels = w; \ + blt_rotated_270_trivial_##suffix(dst, \ + dst_stride, \ + &(src[src_stride * (w - leading_pixels)]), \ + src_stride, \ + leading_pixels, \ + h); \ + dst += leading_pixels; \ + w -= leading_pixels; \ + } \ + if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) { \ + trailing_pixels = (((uintptr_t)(dst + w) & \ + (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (trailing_pixels > w) trailing_pixels = w; \ + w -= trailing_pixels; \ + src += trailing_pixels * src_stride; \ + } \ + for (x = 0; x < w; x += TILE_SIZE) { \ + blt_rotated_270_trivial_##suffix(dst + x, \ + dst_stride, \ + &(src[src_stride * (w - x - TILE_SIZE)]), \ + src_stride, \ + TILE_SIZE, \ + h); \ + } \ if (trailing_pixels) \ blt_rotated_270_trivial_##suffix(dst + w, \ dst_stride, \ @@ -288,12 +263,13 @@ void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { #ifdef TILE_ROTATE - blt_rotated_270_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; + blt_rotated_270_8888((DATA32 *)dst, dst_jump + w, + src, src_jump + h, + w, h); #else - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr *dst_ptr; int x, y; - + dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_270(); @@ -305,15 +281,32 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int return; } +/* speed measuring code - enable when optimizing to compare +#include +static double +get_time(void) +{ + struct timespec t; + + clock_gettime(CLOCK_MONOTONIC, &t); + return (double)t.tv_sec + (((double)t.tv_nsec) / 1000000000.0); +} +*/ + void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { +/* + static double tt = 0.0; + static unsigned long long pt = 0; + double t0 = get_time(); + */ #ifdef TILE_ROTATE - blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; + blt_rotated_90_8888((DATA32 *)dst, dst_jump + w, + src, src_jump + h, + w, h); #else -# ifndef BUILD_NEON - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; @@ -322,117 +315,19 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int *dst_ptr = *src_ptr; CONVERT_LOOP_END_ROT_90(); -# elif defined BUILD_NEON_INTRINSICS - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - CONVERT_LOOP_START_ROT_90(); - - *dst_ptr = *src_ptr; - - CONVERT_LOOP_END_ROT_90(); -# else - if ((w & 1) || (h & 1)) - { - /* Rarely (if ever) if ever: so slow path is fine */ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - CONVERT_LOOP_START_ROT_90(); - - *dst_ptr = *src_ptr; - - CONVERT_LOOP_END_ROT_90(); - } - else - { -# define AP "convert_rgba32_rot_90_" - asm volatile ( - ".fpu neon \n\t" - " mov %[s1], %[src] \n\t" - " add %[s1], %[s1], %[h],lsl #2 \n\t" - " sub %[s1], #8 \n\t" - - " mov %[s2], %[src] \n\t" - " add %[s2], %[s2], %[h], lsl #3 \n\t" - " add %[s2], %[s2], %[sjmp], lsr #1 \n\t" - " sub %[s2], #8 \n\t" - - " mov %[d1], %[dst] \n\t" - - " add %[d2], %[d1], %[djmp] \n\t" - " add %[d2], %[d2], %[w], lsl #2 \n\t" - - " mov %[sadv], %[h], lsl #3 \n\t" - " add %[sadv], %[sadv], %[sjmp], lsl #1\n\t" - - " mov %[y], #0 \n\t" - " mov %[x], #0 \n\t" - AP"loop: \n\t" - " vld1.u32 d0, [%[s1]] \n\t" - " vld1.u32 d1, [%[s2]] \n\t" - " add %[x], #2 \n\t" - " add %[s1], %[sadv] \n\t" - " add %[s2], %[sadv] \n\t" - " vtrn.u32 d0, d1 \n\t" - " cmp %[x], %[w] \n\t" - " vst1.u32 d1, [%[d1]]! \n\t" - " vst1.u32 d0, [%[d2]]! \n\t" - " blt "AP"loop \n\t" - - " mov %[x], #0 \n\t" - " add %[d1], %[djmp] \n\t" - " add %[d1], %[d1], %[w], lsl #2 \n\t" - " add %[d2], %[djmp] \n\t" - " add %[d2], %[d2], %[w], lsl #2 \n\t" - - " mov %[s1], %[src] \n\t" - " add %[s1], %[s1], %[h], lsl #2 \n\t" - " sub %[s1], %[s1], %[y], lsl #2 \n\t" - " sub %[s1], #16 \n\t" - - " add %[s2], %[s1], %[h], lsl #2 \n\t" - " add %[s2], %[s2], %[sjmp], lsl #2 \n\t" - - " add %[y], #2 \n\t" - - " cmp %[y], %[h] \n\t" - " blt "AP"loop \n\t" - - : // Out - : [s1] "r" (1), - [s2] "r" (11), - [d1] "r" (2), - [d2] "r" (12), - [src] "r" (src), - [dst] "r" (dst), - [x] "r" (3), - [y] "r" (4), - [w] "r" (w), - [h] "r" (h), - [sadv] "r" (5), - [sjmp] "r" (src_jump * 4), - [djmp] "r" (dst_jump * 4 * 2) - : "d0", "d1", "memory", "cc"// Clober - - - ); - } -# undef AP -# endif #endif - return; +/* + double t1 = get_time(); + tt += t1 - t0; + pt += (w * h); + printf("%1.2f mpix/sec (%1.9f @ %1.9f)\n", (double)pt / (tt * 1000000), tt, t1); +*/ } void evas_common_convert_rgba_to_32bpp_rgbx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; @@ -449,8 +344,7 @@ evas_common_convert_rgba_to_32bpp_rgbx_8888 (DATA32 *src, DATA8 *dst, int src_ju void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; @@ -467,8 +361,7 @@ evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180 (DATA32 *src, DATA8 *dst, in void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; @@ -485,8 +378,7 @@ evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270 (DATA32 *src, DATA8 *dst, in void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; @@ -503,8 +395,7 @@ evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90 (DATA32 *src, DATA8 *dst, int void evas_common_convert_rgba_to_32bpp_bgr_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; @@ -520,8 +411,7 @@ evas_common_convert_rgba_to_32bpp_bgr_8888 (DATA32 *src, DATA8 *dst, int src_jum void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; @@ -537,8 +427,7 @@ evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180 (DATA32 *src, DATA8 *dst, int void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; @@ -554,8 +443,7 @@ evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270 (DATA32 *src, DATA8 *dst, int void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; @@ -571,8 +459,7 @@ evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90 (DATA32 *src, DATA8 *dst, int void evas_common_convert_rgba_to_32bpp_bgrx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; @@ -588,8 +475,7 @@ evas_common_convert_rgba_to_32bpp_bgrx_8888 (DATA32 *src, DATA8 *dst, int src_ju void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; @@ -605,8 +491,7 @@ evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180 (DATA32 *src, DATA8 *dst, in void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; @@ -622,8 +507,7 @@ evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270 (DATA32 *src, DATA8 *dst, in void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; @@ -639,8 +523,7 @@ evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90 (DATA32 *src, DATA8 *dst, int void evas_common_convert_rgba_to_32bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x EINA_UNUSED, int dith_y EINA_UNUSED, DATA8 *pal EINA_UNUSED) { - DATA32 *src_ptr; - DATA32 *dst_ptr; + DATA32 *src_ptr, *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_types.eot b/src/lib/evas/gesture/efl_canvas_gesture_types.eot index 4dbf88c727..8be4528405 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_types.eot +++ b/src/lib/evas/gesture/efl_canvas_gesture_types.eot @@ -1,4 +1,4 @@ -enum Efl.Canvas.Gesture_Touch_State +enum @beta Efl.Canvas.Gesture_Touch_State { [[ This enum type describes the state of a touch event. ]] legacy: efl_gesture_touch; @@ -8,7 +8,7 @@ enum Efl.Canvas.Gesture_Touch_State end, [[Last fingure touch up]] } -enum Efl.Canvas.Gesture_State +enum @beta Efl.Canvas.Gesture_State { [[ This enum type describes the state of a gesture. ]] legacy: efl_gesture; @@ -19,7 +19,7 @@ enum Efl.Canvas.Gesture_State canceled, [[A gesture was canceled.]] } -enum Efl.Canvas.Gesture_Recognizer_Result +enum @beta Efl.Canvas.Gesture_Recognizer_Result { [[ This enum type describes the state of a gesture recognizer. ]] legacy: efl_gesture; diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c index c7a854f34d..ffe29e39b2 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_image.c +++ b/src/modules/evas/engines/gl_common/evas_gl_image.c @@ -904,9 +904,9 @@ evas_gl_common_image_surface_update(Evas_GL_Image *im) if (!im || !im->gc || !im->im || !im->im->image.data) goto fail; - if (im->im->cache_entry.space == EFL_GFX_COLORSPACE_ARGB8888) + if (im->im->cache_entry.space == (Evas_Colorspace)EFL_GFX_COLORSPACE_ARGB8888) alpha = EINA_FALSE; - else if (im->im->cache_entry.space == EFL_GFX_COLORSPACE_GRY8) + else if (im->im->cache_entry.space == (Evas_Colorspace)EFL_GFX_COLORSPACE_GRY8) alpha = EINA_TRUE; else goto fail; diff --git a/src/modules/evas/image_savers/png/evas_image_save_png.c b/src/modules/evas/image_savers/png/evas_image_save_png.c index a34b0b9c58..bd6b5c31a1 100644 --- a/src/modules/evas/image_savers/png/evas_image_save_png.c +++ b/src/modules/evas/image_savers/png/evas_image_save_png.c @@ -40,9 +40,9 @@ save_image_png(RGBA_Image *im, const char *file, int do_compress, int interlace) if (!im || !im->image.data || !file) return 0; - if ((im->cache_entry.space != EFL_GFX_COLORSPACE_ARGB8888) && - (im->cache_entry.space != EFL_GFX_COLORSPACE_AGRY88) && - (im->cache_entry.space != EFL_GFX_COLORSPACE_GRY8)) + if (((Efl_Gfx_Colorspace)im->cache_entry.space != EFL_GFX_COLORSPACE_ARGB8888) && + ((Efl_Gfx_Colorspace)im->cache_entry.space != EFL_GFX_COLORSPACE_AGRY88) && + ((Efl_Gfx_Colorspace)im->cache_entry.space != EFL_GFX_COLORSPACE_GRY8)) return 0; f = fopen(file, "wb"); @@ -76,7 +76,7 @@ save_image_png(RGBA_Image *im, const char *file, int do_compress, int interlace) else interlace = PNG_INTERLACE_NONE; - if (im->cache_entry.space == EFL_GFX_COLORSPACE_GRY8) + if ((Efl_Gfx_Colorspace)im->cache_entry.space == EFL_GFX_COLORSPACE_GRY8) { gry8 = EINA_TRUE; pixel_size = 1; @@ -86,7 +86,7 @@ save_image_png(RGBA_Image *im, const char *file, int do_compress, int interlace) PNG_COLOR_TYPE_GRAY, interlace, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); } - else if (im->cache_entry.space == EFL_GFX_COLORSPACE_AGRY88) + else if ((Efl_Gfx_Colorspace)im->cache_entry.space == EFL_GFX_COLORSPACE_AGRY88) { agry88 = EINA_TRUE; pixel_size = 2; diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py index 0df6ee8884..70ab733ce5 100644 --- a/src/scripts/pyolian/eolian.py +++ b/src/scripts/pyolian/eolian.py @@ -622,6 +622,10 @@ class Object(EolianBaseObject): def column(self): return int(lib.eolian_object_column_get(self)) + @cached_property + def is_beta(self): + return bool(lib.eolian_object_is_beta(self)) + class Class(Object): def __repr__(self): @@ -656,10 +660,6 @@ class Class(Object): lib.eina_stringshare_del(c_void_p(s)) return ret - @cached_property - def legacy_prefix(self): - return _str_to_py(lib.eolian_class_legacy_prefix_get(self)) - @cached_property def eo_prefix(self): return _str_to_py(lib.eolian_class_eo_prefix_get(self)) @@ -810,10 +810,6 @@ class Event(Object): def scope(self): return Eolian_Object_Scope(lib.eolian_event_scope_get(self)) - @cached_property - def is_beta(self): - return bool(lib.eolian_event_is_beta(self)) - @cached_property def is_hot(self): return bool(lib.eolian_event_is_hot(self)) @@ -827,8 +823,8 @@ class Function(Object): def __repr__(self): return "".format(self) - def full_c_name_get(self, ftype, use_legacy=False): - s = lib.eolian_function_full_c_name_get(self, ftype, use_legacy) + def full_c_name_get(self, ftype): + s = lib.eolian_function_full_c_name_get(self, ftype) ret = _str_to_py(s) lib.eina_stringshare_del(c_void_p(s)) return ret @@ -845,18 +841,6 @@ class Function(Object): def full_c_setter_name(self): return self.full_c_name_get(Eolian_Function_Type.PROP_SET) - @cached_property - def full_c_method_name_legacy(self): - return self.full_c_name_get(Eolian_Function_Type.METHOD, True) - - @cached_property - def full_c_getter_name_legacy(self): - return self.full_c_name_get(Eolian_Function_Type.PROP_GET, True) - - @cached_property - def full_c_setter_name_legacy(self): - return self.full_c_name_get(Eolian_Function_Type.PROP_SET, True) - @cached_property def type(self): return Eolian_Function_Type(lib.eolian_function_type_get(self)) @@ -876,20 +860,10 @@ class Function(Object): def setter_scope(self): return self.scope_get(Eolian_Function_Type.PROP_SET) - def legacy_get(self, ftype): - return _str_to_py(lib.eolian_function_legacy_get(self, ftype)) - - def is_legacy_only(self, ftype): - return bool(lib.eolian_function_is_legacy_only(self, ftype)) - @cached_property def is_class(self): return bool(lib.eolian_function_is_class(self)) - @cached_property - def is_beta(self): - return bool(lib.eolian_function_is_beta(self)) - @cached_property def object_is_const(self): return bool(lib.eolian_function_object_is_const(self)) diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py index 1f6a2f3d71..9edebd0199 100644 --- a/src/scripts/pyolian/eolian_lib.py +++ b/src/scripts/pyolian/eolian_lib.py @@ -228,6 +228,10 @@ lib.eolian_object_short_name_get.restype = c_char_p lib.eolian_object_namespaces_get.argtypes = (c_void_p,) lib.eolian_object_namespaces_get.restype = c_void_p +# EAPI Eina_Bool eolian_object_is_beta(const Eolian_Object *obj); +lib.eolian_object_is_beta.argtypes = (c_void_p,) +lib.eolian_object_is_beta.restype = c_bool + ### Eolian_Class ############################################################ # EAPI Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass); @@ -238,10 +242,6 @@ lib.eolian_class_type_get.restype = c_int lib.eolian_class_documentation_get.argtypes = (c_void_p,) lib.eolian_class_documentation_get.restype = c_void_p -# EAPI Eina_Stringshare *eolian_class_legacy_prefix_get(const Eolian_Class *klass); -lib.eolian_class_legacy_prefix_get.argtypes = (c_void_p,) -lib.eolian_class_legacy_prefix_get.restype = c_char_p - # EAPI Eina_Stringshare *eolian_class_eo_prefix_get(const Eolian_Class *klass); lib.eolian_class_eo_prefix_get.argtypes = (c_void_p,) lib.eolian_class_eo_prefix_get.restype = c_char_p @@ -320,30 +320,18 @@ lib.eolian_function_type_get.restype = c_int lib.eolian_function_scope_get.argtypes = (c_void_p, c_int) lib.eolian_function_scope_get.restype = c_int -# EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype, Eina_Bool use_legacy); -lib.eolian_function_full_c_name_get.argtypes = (c_void_p, c_int, c_bool) +# EAPI Eina_Stringshare *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype); +lib.eolian_function_full_c_name_get.argtypes = (c_void_p, c_int) lib.eolian_function_full_c_name_get.restype = c_void_p # Stringshare TO BE FREED -# EAPI Eina_Stringshare *eolian_function_legacy_get(const Eolian_Function *function_id, Eolian_Function_Type f_type); -lib.eolian_function_legacy_get.argtypes = (c_void_p, c_int) -lib.eolian_function_legacy_get.restype = c_char_p - # EAPI const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id); lib.eolian_function_implement_get.argtypes = (c_void_p,) lib.eolian_function_implement_get.restype = c_void_p -# EAPI Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype); -lib.eolian_function_is_legacy_only.argtypes = (c_void_p, c_int) -lib.eolian_function_is_legacy_only.restype = c_bool - # EAPI Eina_Bool eolian_function_is_class(const Eolian_Function *function_id); lib.eolian_function_is_class.argtypes = (c_void_p,) lib.eolian_function_is_class.restype = c_bool -# EAPI Eina_Bool eolian_function_is_beta(const Eolian_Function *function_id); -lib.eolian_function_is_beta.argtypes = (c_void_p,) -lib.eolian_function_is_beta.restype = c_bool - # EAPI Eina_Bool eolian_function_is_constructor(const Eolian_Function *function_id, const Eolian_Class *klass); lib.eolian_function_is_constructor.argtypes = (c_void_p,c_void_p,) lib.eolian_function_is_constructor.restype = c_bool @@ -485,10 +473,6 @@ lib.eolian_event_documentation_get.restype = c_void_p lib.eolian_event_scope_get.argtypes = (c_void_p,) lib.eolian_event_scope_get.restype = c_int -# EAPI Eina_Bool eolian_event_is_beta(const Eolian_Event *event); -lib.eolian_event_is_beta.argtypes = (c_void_p,) -lib.eolian_event_is_beta.restype = c_bool - # EAPI Eina_Bool eolian_event_is_hot(const Eolian_Event *event); lib.eolian_event_is_hot.argtypes = (c_void_p,) lib.eolian_event_is_hot.restype = c_bool diff --git a/src/scripts/pyolian/test_eolian.py b/src/scripts/pyolian/test_eolian.py index 2a30cbeefe..990fcfc6c9 100755 --- a/src/scripts/pyolian/test_eolian.py +++ b/src/scripts/pyolian/test_eolian.py @@ -413,7 +413,7 @@ class TestEolianEvent(unittest.TestCase): ev = cls.event_by_name_get('tick') self.assertIsInstance(ev, eolian.Event) self.assertEqual(ev.name, 'tick') - self.assertEqual(ev.c_name, 'EFL_LOOP_TIMER_EVENT_TICK') + self.assertEqual(ev.c_name, 'EFL_LOOP_TIMER_EVENT_TIMER_TICK') self.assertIsNone(ev.type) # TODO is this correct self.assertIsInstance(ev.documentation, eolian.Documentation) self.assertEqual(ev.scope, eolian.Eolian_Object_Scope.PUBLIC) diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c index c55a05775b..d960d9d042 100644 --- a/src/static_libs/vg_common/vg_common_svg.c +++ b/src/static_libs/vg_common/vg_common_svg.c @@ -566,9 +566,9 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F if (g->type == SVG_LINEAR_GRADIENT) { - grad_obj = evas_vg_gradient_linear_add(parent); - evas_vg_gradient_linear_start_set(grad_obj, g->linear->x1 * r.w + r.x, g->linear->y1 * r.h + r.y); - evas_vg_gradient_linear_end_set(grad_obj, g->linear->x2 * r.w + r.x, g->linear->y2 * r.h + r.y); + grad_obj = efl_add(EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS, parent); + efl_gfx_gradient_linear_start_set(grad_obj, g->linear->x1 * r.w + r.x, g->linear->y1 * r.h + r.y); + efl_gfx_gradient_linear_end_set(grad_obj, g->linear->x2 * r.w + r.x, g->linear->y2 * r.h + r.y); } else if (g->type == SVG_RADIAL_GRADIENT) { @@ -583,10 +583,10 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F int min = (r.h > r.w) ? r.w : r.h; radius = sqrt(pow(min, 2) + pow(min, 2)) / sqrt(2.0); } - grad_obj = evas_vg_gradient_radial_add(parent); - evas_vg_gradient_radial_center_set(grad_obj, g->radial->cx * r.w + r.x, g->radial->cy * r.h + r.y); - evas_vg_gradient_radial_radius_set(grad_obj, g->radial->r * radius); - evas_vg_gradient_radial_focal_set(grad_obj, g->radial->fx * r.w + r.x, g->radial->fy * r.h + r.y); + grad_obj = efl_add(EFL_CANVAS_VG_GRADIENT_RADIAL_CLASS, parent); + efl_gfx_gradient_radial_center_set(grad_obj, g->radial->cx * r.w + r.x, g->radial->cy * r.h + r.y); + efl_gfx_gradient_radial_radius_set(grad_obj, g->radial->r * radius); + efl_gfx_gradient_radial_focal_set(grad_obj, g->radial->fx * r.w + r.x, g->radial->fy * r.h + r.y); /* in case of objectBoundingBox it need proper scaling */ if (!g->user_space) @@ -635,7 +635,7 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F return NULL; } // apply common prperty - evas_vg_gradient_spread_set(grad_obj, g->spread); + efl_gfx_gradient_spread_set(grad_obj, g->spread); // update the stops stop_count = eina_list_count(g->stops); if (stop_count) @@ -651,7 +651,7 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F stops[i].offset = stop->offset; i++; } - evas_vg_gradient_stop_set(grad_obj, stops, stop_count); + efl_gfx_gradient_stop_set(grad_obj, stops, stop_count); free(stops); } return grad_obj; @@ -669,7 +669,7 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_ // apply the transformation if (node->transform) - evas_vg_node_transformation_set(vg, node->transform); + efl_canvas_vg_node_transformation_set(vg, node->transform); if ((node->type == SVG_NODE_G) || (node->type == SVG_NODE_DOC)) return; @@ -683,25 +683,25 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_ else if (style->fill.paint.gradient) { // if the fill has gradient then apply. - evas_vg_shape_fill_set(vg, _apply_gradient_property(style->fill.paint.gradient, vg, parent, vg_data)); + efl_canvas_vg_shape_fill_set(vg, _apply_gradient_property(style->fill.paint.gradient, vg, parent, vg_data)); } else if (style->fill.paint.cur_color) { // apply the current style color - evas_vg_node_color_set(vg, style->r, style->g, - style->b, style->fill.opacity); + efl_gfx_color_set(vg, style->r, style->g, + style->b, style->fill.opacity); } else { // apply the fill color - evas_vg_node_color_set(vg, style->fill.paint.r, style->fill.paint.g, - style->fill.paint.b, style->fill.opacity); + efl_gfx_color_set(vg, style->fill.paint.r, style->fill.paint.g, + style->fill.paint.b, style->fill.opacity); } - evas_vg_shape_stroke_width_set(vg, style->stroke.width); - evas_vg_shape_stroke_cap_set(vg, style->stroke.cap); - evas_vg_shape_stroke_join_set(vg, style->stroke.join); - evas_vg_shape_stroke_scale_set(vg, style->stroke.scale); + efl_gfx_shape_stroke_width_set(vg, style->stroke.width); + efl_gfx_shape_stroke_cap_set(vg, style->stroke.cap); + efl_gfx_shape_stroke_join_set(vg, style->stroke.join); + efl_gfx_shape_stroke_scale_set(vg, style->stroke.scale); // if stroke property is NULL then do nothing if (style->stroke.paint.none) { @@ -710,7 +710,7 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_ else if (style->stroke.paint.gradient) { // if the fill has gradient then apply. - evas_vg_shape_stroke_fill_set(vg, _apply_gradient_property(style->stroke.paint.gradient, vg, parent, vg_data)); + efl_canvas_vg_shape_stroke_fill_set(vg, _apply_gradient_property(style->stroke.paint.gradient, vg, parent, vg_data)); } else if (style->stroke.paint.url) { @@ -720,13 +720,13 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_ else if (style->stroke.paint.cur_color) { // apply the current style color - evas_vg_shape_stroke_color_set(vg, style->r, style->g, + efl_gfx_shape_stroke_color_set(vg, style->r, style->g, style->b, style->stroke.opacity); } else { // apply the stroke color - evas_vg_shape_stroke_color_set(vg, style->stroke.paint.r, style->stroke.paint.g, + efl_gfx_shape_stroke_color_set(vg, style->stroke.paint.r, style->stroke.paint.g, style->stroke.paint.b, style->stroke.opacity); } } @@ -738,12 +738,12 @@ _add_polyline(Efl_VG *vg, double *array, int size, Eina_Bool polygon) if (size < 2) return; - evas_vg_shape_append_move_to(vg, array[0], array[1]); + efl_gfx_path_append_move_to(vg, array[0], array[1]); for (i=2; i < size; i+=2) - evas_vg_shape_append_line_to(vg, array[i], array[i+1]); + efl_gfx_path_append_line_to(vg, array[i], array[i+1]); if (polygon) - evas_vg_shape_append_close(vg); + efl_gfx_path_append_close(vg); } static Efl_VG * @@ -764,48 +764,46 @@ vg_common_create_vg_node_helper(Svg_Node *node, Efl_VG *parent, Vg_File_Data *vg vg = efl_add(EFL_CANVAS_VG_CONTAINER_CLASS, parent); _apply_vg_property(node, vg, parent, vg_data); EINA_LIST_FOREACH(node->child, l, child) - { - vg_common_create_vg_node_helper(child, vg, vg_data); - } + vg_common_create_vg_node_helper(child, vg, vg_data); return vg; } break; case SVG_NODE_PATH: - vg = evas_vg_shape_add(parent); - evas_vg_shape_append_svg_path(vg, node->node.path.path); + vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); + efl_gfx_path_append_svg_path(vg, node->node.path.path); break; case SVG_NODE_POLYGON: - vg = evas_vg_shape_add(parent); + vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); _add_polyline(vg, node->node.polygon.points, node->node.polygon.points_count, EINA_TRUE); break; case SVG_NODE_POLYLINE: - vg = evas_vg_shape_add(parent); + vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); _add_polyline(vg, node->node.polygon.points, node->node.polygon.points_count, EINA_FALSE); break; case SVG_NODE_ELLIPSE: - vg = evas_vg_shape_add(parent); - evas_vg_shape_append_arc(vg, node->node.ellipse.cx - node->node.ellipse.rx, - node->node.ellipse.cy - node->node.ellipse.ry, - 2*node->node.ellipse.rx, 2*node->node.ellipse.ry, 0, 360); - evas_vg_shape_append_close(vg); + vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); + efl_gfx_path_append_arc(vg, node->node.ellipse.cx - node->node.ellipse.rx, + node->node.ellipse.cy - node->node.ellipse.ry, + 2*node->node.ellipse.rx, 2*node->node.ellipse.ry, 0, 360); + efl_gfx_path_append_close(vg); break; case SVG_NODE_CIRCLE: - vg = evas_vg_shape_add(parent); - evas_vg_shape_append_circle(vg, node->node.circle.cx, node->node.circle.cy, node->node.circle.r); + vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); + efl_gfx_path_append_circle(vg, node->node.circle.cx, node->node.circle.cy, node->node.circle.r); break; case SVG_NODE_RECT: - vg = evas_vg_shape_add(parent); - evas_vg_shape_append_rect(vg, node->node.rect.x, node->node.rect.y, node->node.rect.w, node->node.rect.h, - node->node.rect.rx, node->node.rect.ry); + vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); + efl_gfx_path_append_rect(vg, node->node.rect.x, node->node.rect.y, node->node.rect.w, node->node.rect.h, + node->node.rect.rx, node->node.rect.ry); break; case SVG_NODE_LINE: - vg = evas_vg_shape_add(parent); - evas_vg_shape_append_move_to(vg, node->node.line.x1, node->node.line.y1); - evas_vg_shape_append_line_to(vg, node->node.line.x2, node->node.line.y2); + vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); + efl_gfx_path_append_move_to(vg, node->node.line.x1, node->node.line.y1); + efl_gfx_path_append_line_to(vg, node->node.line.x2, node->node.line.y2); break; case SVG_NODE_CUSTOME_COMMAND: - vg = evas_vg_shape_add(parent); - evas_vg_shape_path_set(vg, node->node.command.commands, node->node.command.points); + vg = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent); + efl_gfx_path_set(vg, node->node.command.commands, node->node.command.points); break; default: break; @@ -895,8 +893,8 @@ _create_gradient_node(Efl_VG *vg) Svg_Style_Gradient *grad = calloc(1, sizeof(Svg_Style_Gradient)); EINA_SAFETY_ON_NULL_RETURN_VAL(grad, NULL); - grad->spread = evas_vg_gradient_spread_get(vg); - evas_vg_gradient_stop_get(vg, &stops, &count); + grad->spread = efl_gfx_gradient_spread_get(vg); + efl_gfx_gradient_stop_get(vg, &stops, &count); for (i = 0; i < count; i++) { new_stop = calloc(1, sizeof(Efl_Gfx_Gradient_Stop)); @@ -910,17 +908,17 @@ _create_gradient_node(Efl_VG *vg) grad->type = SVG_LINEAR_GRADIENT; grad->linear = calloc(1, sizeof(Svg_Linear_Gradient)); if (!grad->linear) goto oom_error; - evas_vg_gradient_linear_start_get(vg, &grad->linear->x1, &grad->linear->y1); - evas_vg_gradient_linear_end_get(vg, &grad->linear->x2, &grad->linear->y2); + efl_gfx_gradient_linear_start_get(vg, &grad->linear->x1, &grad->linear->y1); + efl_gfx_gradient_linear_end_get(vg, &grad->linear->x2, &grad->linear->y2); } else { grad->type = SVG_RADIAL_GRADIENT; grad->radial = calloc(1, sizeof(Svg_Radial_Gradient)); if (!grad->radial) goto oom_error; - evas_vg_gradient_radial_center_get(vg, &grad->radial->cx, &grad->radial->cy); - evas_vg_gradient_radial_focal_get(vg, &grad->radial->fx, &grad->radial->fy); - grad->radial->r = evas_vg_gradient_radial_radius_get(vg); + efl_gfx_gradient_radial_center_get(vg, &grad->radial->cx, &grad->radial->cy); + efl_gfx_gradient_radial_focal_get(vg, &grad->radial->fx, &grad->radial->fy); + grad->radial->r = efl_gfx_gradient_radial_radius_get(vg); } return grad; @@ -939,7 +937,7 @@ _apply_svg_property(Svg_Node *node, Efl_VG *vg) Svg_Style_Property *style = node->style; // transformation - if ((matrix = evas_vg_node_transformation_get(vg))) + if ((matrix = efl_canvas_vg_node_transformation_get(vg))) { node->transform = calloc(1, sizeof(Eina_Matrix3)); eina_matrix3_copy(node->transform, matrix); @@ -956,36 +954,36 @@ _apply_svg_property(Svg_Node *node, Efl_VG *vg) // apply the fill style property style->fill.fill_rule = efl_gfx_shape_fill_rule_get(vg); style->fill.paint.none = EINA_FALSE; - if (evas_vg_shape_fill_get(vg)) + if (efl_canvas_vg_shape_fill_get(vg)) { // if the fill has gradient then apply. - style->fill.paint.gradient = _create_gradient_node(evas_vg_shape_fill_get(vg)); + style->fill.paint.gradient = _create_gradient_node(efl_canvas_vg_shape_fill_get(vg)); } else { - evas_vg_node_color_get(vg, &style->fill.paint.r, &style->fill.paint.g, - &style->fill.paint.b, &style->fill.opacity); + efl_gfx_color_get(vg, &style->fill.paint.r, &style->fill.paint.g, + &style->fill.paint.b, &style->fill.opacity); } // apply stroke style property style->stroke.paint.none = EINA_FALSE; - if (evas_vg_shape_stroke_fill_get(vg)) + if (efl_canvas_vg_shape_stroke_fill_get(vg)) { // if the stroke has gradient then apply. - style->stroke.paint.gradient = _create_gradient_node(evas_vg_shape_stroke_fill_get(vg)); + style->stroke.paint.gradient = _create_gradient_node(efl_canvas_vg_shape_stroke_fill_get(vg)); } else { // apply the stroke color - evas_vg_shape_stroke_color_get(vg, &style->stroke.paint.r, &style->stroke.paint.g, + efl_gfx_shape_stroke_color_get(vg, &style->stroke.paint.r, &style->stroke.paint.g, &style->stroke.paint.b, &style->stroke.opacity); } - style->stroke.width = (evas_vg_shape_stroke_width_get(vg)); - style->stroke.cap = evas_vg_shape_stroke_cap_get(vg); - style->stroke.join = evas_vg_shape_stroke_join_get(vg); - style->stroke.scale = evas_vg_shape_stroke_scale_get(vg); + style->stroke.width = efl_gfx_shape_stroke_width_get(vg); + style->stroke.cap = efl_gfx_shape_stroke_cap_get(vg); + style->stroke.join = efl_gfx_shape_stroke_join_get(vg); + style->stroke.scale = efl_gfx_shape_stroke_scale_get(vg); } @@ -1014,8 +1012,8 @@ vg_common_create_svg_node_helper(Efl_VG *vg, Svg_Node *parent) else if (efl_isa(vg, EFL_CANVAS_VG_SHAPE_CLASS)) { svg_node = _create_node(parent, SVG_NODE_CUSTOME_COMMAND); - evas_vg_shape_path_get(vg, &commands, &points); - evas_vg_shape_path_length_get(vg, &commands_count, &points_count); + efl_gfx_path_get(vg, &commands, &points); + efl_gfx_path_length_get(vg, &commands_count, &points_count); svg_node->node.command.commands_count = commands_count; svg_node->node.command.points_count = points_count; svg_node->node.command.points = calloc(points_count, sizeof(double)); diff --git a/src/tests/ecore/efl_app_test_loop.c b/src/tests/ecore/efl_app_test_loop.c index 4325be2a9e..88b4dd2fd5 100644 --- a/src/tests/ecore/efl_app_test_loop.c +++ b/src/tests/ecore/efl_app_test_loop.c @@ -79,11 +79,11 @@ EFL_START_TEST(efl_app_test_efl_loop_concentric) efl_event_callback_add(loop, EFL_LOOP_EVENT_IDLE_ENTER, loop_idle_enter, NULL); timer = efl_add(EFL_LOOP_TIMER_CLASS, loop2, efl_loop_timer_interval_set(efl_added, 0.01), - efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, loop_timer_tick, loop) + efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, loop_timer_tick, loop) ); timer2 = efl_add(EFL_LOOP_TIMER_CLASS, loop, efl_loop_timer_interval_set(efl_added, 0.5), - efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, efl_app_test_efl_loop_concentric_fail, NULL) + efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, efl_app_test_efl_loop_concentric_fail, NULL) ); exitcode = efl_loop_exit_code_process(efl_loop_begin(loop)); ck_assert_int_eq(exitcode, 0); diff --git a/src/tests/ecore/efl_app_test_loop_timer.c b/src/tests/ecore/efl_app_test_loop_timer.c index 38d16a9728..e866689012 100644 --- a/src/tests/ecore/efl_app_test_loop_timer.c +++ b/src/tests/ecore/efl_app_test_loop_timer.c @@ -47,7 +47,7 @@ EFL_START_TEST(ecore_test_timer_lifecycle) efl_event_callback_add((Eo*) t, EFL_EVENT_DEL, _test_death_cb, &dl); et = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(), - efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _test_run_cb, &re), + efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _test_run_cb, &re), efl_event_callback_add(efl_added, EFL_EVENT_DEL, _test_death_cb, &de), efl_loop_timer_interval_set(efl_added, 1.0)); efl_ref(et); diff --git a/src/tests/ecore/efl_app_test_promise.c b/src/tests/ecore/efl_app_test_promise.c index 610851045c..276629754a 100644 --- a/src/tests/ecore/efl_app_test_promise.c +++ b/src/tests/ecore/efl_app_test_promise.c @@ -176,7 +176,7 @@ _future_get(PromiseCtx *ctx, double timeout) f = eina_future_new(ctx->p); fail_if(!f); ctx->t = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(), - efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _simple_timeout, ctx), + efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _simple_timeout, ctx), efl_loop_timer_interval_set(efl_added, timeout)); fail_if(!ctx->t); return f; diff --git a/src/tests/elementary/efl_ui_build.c b/src/tests/elementary/efl_ui_build.c new file mode 100644 index 0000000000..923310fc66 --- /dev/null +++ b/src/tests/elementary/efl_ui_build.c @@ -0,0 +1,7 @@ +#ifndef EFL_BETA_API_SUPPORT +#define EFL_BETA_API_SUPPORT +#endif +#ifndef EFL_NOLEGACY_API_SUPPORT +#define EFL_NOLEGACY_API_SUPPORT +#endif +#include diff --git a/src/tests/elementary/efl_ui_suite.c b/src/tests/elementary/efl_ui_suite.c index aa5de44f60..5783c203ce 100644 --- a/src/tests/elementary/efl_ui_suite.c +++ b/src/tests/elementary/efl_ui_suite.c @@ -13,6 +13,7 @@ static const Efl_Test_Case etc[] = { { "efl_ui_focus", efl_ui_test_focus}, { "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_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 4f5e529af0..1f393828f4 100644 --- a/src/tests/elementary/efl_ui_suite.h +++ b/src/tests/elementary/efl_ui_suite.h @@ -20,6 +20,7 @@ } void efl_ui_test_box(TCase *tc); +void efl_ui_test_box_flow(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_box_flow.c b/src/tests/elementary/efl_ui_test_box_flow.c new file mode 100644 index 0000000000..4b4c7a0152 --- /dev/null +++ b/src/tests/elementary/efl_ui_test_box_flow.c @@ -0,0 +1,416 @@ +#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.8, (200 - 70) * 0.2, 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.2, 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.2, 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.8, 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.8, (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.2, 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.8, 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.8, (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.2, 70, 70 * 3), "[13]" }, +}; + +static Hint hints2[][2] = { + { + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.3, 0.7, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_FALSE, EINA_FALSE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT((150 - 70) * 0.3, (150 - 70) * 0.7, 70, 70), "[1/1 weight btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_FALSE, EINA_FALSE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT((150 - 70) * 0.8, (150 - 70) * 0.2 + 150, 70, 70), "[1/1 weight btn2]" } + }, + { + { 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_FALSE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT((150 - 70) * 0.3, 0, 70, 70), "[0/1 weight btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_VERTICAL, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT((150 - ((300 - 70) / 3)) * 0.8, 70, (300 - 70) / 3, (300 - 70)), "[0/1 weight btn2]" } + }, + { + { 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_FALSE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT((150 - 70) * 0.3, (300 - 280) * 0.2, 70, 70), "[0/0 weight btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 0, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_HORIZONTAL, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_FALSE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT((150 - 70) * 0.8, (300 - 280) * 0.2 + 70, 70, 70 * 3), "[0/0 weight btn2]" } + }, +}; + +static Hint hints3[][3] = { + { + { EINA_SIZE2D(-1, -1), 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(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT(0, 0, 150, 100), "[1/1/1 weight_l btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 100), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT(0, 100, 150, 100), "[1/1/1 weight_l btn2]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 300), EINA_SIZE2D(150, 300), + EINA_RECT(0, 100 + 100, 150, 100), "[1/1/1 weight_l btn3]" } + }, + { + { EINA_SIZE2D(-1, -1), 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(150, 270), EINA_SIZE2D(150, 270), + EINA_RECT(0, 0, 150, 85), "[1/1/1 weight_m btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 100), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 270), EINA_SIZE2D(150, 270), + EINA_RECT(0, 85, 150, 100), "[1/1/1 weight_m btn2]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 270), EINA_SIZE2D(150, 270), + EINA_RECT(0, 100 + 85, 150, 85), "[1/1/1 weight_m btn3]" } + }, + { + { EINA_SIZE2D(-1, -1), 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(150, 200), EINA_SIZE2D(150, 200), + EINA_RECT(0, 0, 75, 100), "[1/1/1 weight_s btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 100), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 200), EINA_SIZE2D(150, 200), + EINA_RECT(0, 100, 75, 100), "[1/1/1 weight_s btn2]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(70, 70), 1, 1, 0.8, 0.2, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_NONE, EINA_SIZE2D(0, 0), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(150, 200), EINA_SIZE2D(150, 200), + EINA_RECT(75, 0, 75, 200), "[1/1/1 weight_s btn3]" } + }, + { + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(0, 0), 1, 1, 0.5, 0.5, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(300, 900), EINA_SIZE2D(300, 900), + EINA_RECT(100, 0, 100, 300), "[aspect resize btn]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(0, 0), 1, 1, 0.5, 0.5, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(300, 900), EINA_SIZE2D(300, 900), + EINA_RECT(100, 300, 100, 300), "[aspect resize btn2]" }, + { EINA_SIZE2D(-1, -1), EINA_SIZE2D(0, 0), 1, 1, 0.5, 0.5, 0, 0, 0, 0, + EFL_GFX_HINT_ASPECT_BOTH, EINA_SIZE2D(1, 3), EINA_TRUE, EINA_TRUE, + EINA_SIZE2D(300, 900), EINA_SIZE2D(300, 900), + EINA_RECT(100, 300 + 300, 100, 300), "[aspect resize btn3]" } + }, +}; + +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_min_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_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_FLOW_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_flow_class_check) +{ + const char *class; + + class = efl_class_name_get(layout); + + ck_assert(class != NULL); + ck_assert(!strcmp(class, "Efl.Ui.Box_Flow")); +} +EFL_END_TEST + +EFL_START_TEST (efl_ui_box_flow_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_flow_layout_update_pack) +{ + int i, max_index2, max_index3; + Eo *btn, *btn2, *btn3; + + max_index2 = ((sizeof(hints2) / sizeof(Hint)) / 2); + max_index3 = ((sizeof(hints3) / sizeof(Hint)) / 3); + + btn = efl_add(EFL_UI_BUTTON_CLASS, layout, + efl_pack_end(layout, efl_added)); + btn2 = efl_add(EFL_UI_BUTTON_CLASS, layout, + efl_pack_end(layout, efl_added)); + + for (i = 0; i < max_index2; i++) + { + btn_hint_set(btn, &hints2[i][0]); + btn_hint_set(btn2, &hints2[i][1]); + btn_geom_assert(&hints2[i][0], efl_gfx_entity_geometry_get(btn)); + btn_geom_assert(&hints2[i][1], efl_gfx_entity_geometry_get(btn2)); + } + + btn3 = efl_add(EFL_UI_BUTTON_CLASS, layout, + efl_pack_end(layout, efl_added)); + + for (i = 0; i < max_index3; i++) + { + btn_hint_set(btn, &hints3[i][0]); + btn_hint_set(btn2, &hints3[i][1]); + btn_hint_set(btn3, &hints3[i][2]); + btn_geom_assert(&hints3[i][0], efl_gfx_entity_geometry_get(btn)); + btn_geom_assert(&hints3[i][1], efl_gfx_entity_geometry_get(btn2)); + btn_geom_assert(&hints3[i][2], efl_gfx_entity_geometry_get(btn3)); + } + + // aspect resize test + hints3[3][0].layout_expected = hints3[3][0].layout_size = EINA_SIZE2D(150, 450); + hints3[3][1].layout_expected = hints3[3][1].layout_size = EINA_SIZE2D(150, 450); + hints3[3][2].layout_expected = hints3[3][2].layout_size = EINA_SIZE2D(150, 450); + hints3[3][0].expected = EINA_RECT(50, 0, 50, 150); + hints3[3][1].expected = EINA_RECT(50, 150, 50, 150); + hints3[3][2].expected = EINA_RECT(50, 300, 50, 150); + + btn_hint_set(btn, &hints3[3][0]); + btn_hint_set(btn2, &hints3[3][1]); + btn_hint_set(btn3, &hints3[3][2]); + btn_geom_assert(&hints3[3][0], efl_gfx_entity_geometry_get(btn)); + btn_geom_assert(&hints3[3][1], efl_gfx_entity_geometry_get(btn2)); + btn_geom_assert(&hints3[3][2], efl_gfx_entity_geometry_get(btn3)); + + efl_ui_direction_set(layout, EFL_UI_DIR_HORIZONTAL); + hints3[3][0].layout_expected = hints3[3][0].layout_size = EINA_SIZE2D(300, 900); + hints3[3][1].layout_expected = hints3[3][1].layout_size = EINA_SIZE2D(300, 900); + hints3[3][2].layout_expected = hints3[3][2].layout_size = EINA_SIZE2D(300, 900); + hints3[3][0].expected = EINA_RECT(0, 300, 100, 300); + hints3[3][1].expected = EINA_RECT(100, 300, 100, 300); + hints3[3][2].expected = EINA_RECT(200, 300, 100, 300); + + btn_hint_set(btn, &hints3[3][0]); + btn_hint_set(btn2, &hints3[3][1]); + btn_hint_set(btn3, &hints3[3][2]); + btn_geom_assert(&hints3[3][0], efl_gfx_entity_geometry_get(btn)); + btn_geom_assert(&hints3[3][1], efl_gfx_entity_geometry_get(btn2)); + btn_geom_assert(&hints3[3][2], efl_gfx_entity_geometry_get(btn3)); + + hints3[3][0].layout_expected = hints3[3][0].layout_size = EINA_SIZE2D(150, 450); + hints3[3][1].layout_expected = hints3[3][1].layout_size = EINA_SIZE2D(150, 450); + hints3[3][2].layout_expected = hints3[3][2].layout_size = EINA_SIZE2D(150, 450); + hints3[3][0].expected = EINA_RECT(0, 150, 50, 150); + hints3[3][1].expected = EINA_RECT(50, 150, 50, 150); + hints3[3][2].expected = EINA_RECT(100, 150, 50, 150); + + btn_hint_set(btn, &hints3[3][0]); + btn_hint_set(btn2, &hints3[3][1]); + btn_hint_set(btn3, &hints3[3][2]); + btn_geom_assert(&hints3[3][0], efl_gfx_entity_geometry_get(btn)); + btn_geom_assert(&hints3[3][1], efl_gfx_entity_geometry_get(btn2)); + btn_geom_assert(&hints3[3][2], efl_gfx_entity_geometry_get(btn3)); +} +EFL_END_TEST + +EFL_START_TEST (efl_ui_box_flow_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(100, 100)), + efl_pack_end(layout, efl_added)); + btn3 = 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(300, 100); + + efl_pack_unpack(layout, btn2); + USERMIN_CHECK(0, 0); + MIN_CHECK(200, 100); + + 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, 200); + +#undef USERMIN_ASSERT +#undef MIN_ASSERT +} +EFL_END_TEST + +void efl_ui_test_box_flow(TCase *tc) +{ + tcase_add_checked_fixture(tc, layout_setup, layout_teardown); + tcase_add_test(tc, efl_ui_box_flow_class_check); + tcase_add_test(tc, efl_ui_box_flow_layout_update); + tcase_add_test(tc, efl_ui_box_flow_layout_update_pack); + tcase_add_test(tc, efl_ui_box_flow_size); +} diff --git a/src/tests/elementary/efl_ui_test_grid.c b/src/tests/elementary/efl_ui_test_grid.c index 1df8e4ad1b..07b8cd0aca 100644 --- a/src/tests/elementary/efl_ui_test_grid.c +++ b/src/tests/elementary/efl_ui_test_grid.c @@ -298,7 +298,7 @@ EFL_START_TEST(efl_ui_grid_scroll) item = efl_pack_content_get(grid, 50); timer = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(), - efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, grid_timer_cb, NULL), + efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, grid_timer_cb, NULL), efl_loop_timer_loop_reset(efl_added), efl_loop_timer_interval_set(efl_added, 3.0)); diff --git a/src/tests/elementary/elm_suite_build.c b/src/tests/elementary/elm_suite_build.c new file mode 100644 index 0000000000..614f7816da --- /dev/null +++ b/src/tests/elementary/elm_suite_build.c @@ -0,0 +1,3 @@ +#undef EFL_BETA_API_SUPPORT +#undef EFL_EO_API_SUPPORT +#include diff --git a/src/tests/elementary/elm_test_config.c b/src/tests/elementary/elm_test_config.c index 636120f1df..c6745c16a8 100644 --- a/src/tests/elementary/elm_test_config.c +++ b/src/tests/elementary/elm_test_config.c @@ -96,7 +96,7 @@ EFL_START_TEST(elm_config_eoapi) CONFIG_CHKB(focus_highlight_enabled, !old); CONFIG_CHKB(focus_highlight_animate, 0); CONFIG_CHKB(focus_highlight_clip_disabled, !old); - CONFIG_CHKE(focus_move_policy, EFL_UI_FOCUS_MOVE_POLICY_IN, "in"); + CONFIG_CHKE(focus_move_policy, EFL_UI_FOCUS_MOVE_POLICY_MOVE_IN, "in"); CONFIG_CHKB(item_select_on_focus_disabled, !old); CONFIG_CHKB(first_item_focus_on_first_focusin, 0); CONFIG_CHKB(mirrored, 0); diff --git a/src/tests/elementary/meson.build b/src/tests/elementary/meson.build index eaffab6d6b..e9be0b2a41 100644 --- a/src/tests/elementary/meson.build +++ b/src/tests/elementary/meson.build @@ -19,6 +19,7 @@ endforeach elementary_suite_src = [ 'elm_suite.c', + 'elm_suite_build.c', 'suite_helpers.c', 'elm_test_atspi.c', 'elm_test_check.c', @@ -114,6 +115,7 @@ elementary_suite = executable('elementary_suite', efl_ui_suite_src = [ 'efl_ui_suite.c', + 'efl_ui_build.c', 'suite_helpers.c', 'suite_helpers.h', 'elm_test_init.c', @@ -123,6 +125,7 @@ efl_ui_suite_src = [ 'efl_ui_test_focus.c', 'efl_ui_test_focus_sub.c', 'efl_ui_test_box.c', + 'efl_ui_test_box_flow.c', 'efl_ui_test_table.c', 'efl_ui_test_grid.c', 'efl_ui_test_relative_layout.c', diff --git a/src/tests/elementary/suite_helpers.c b/src/tests/elementary/suite_helpers.c index 682a30753e..2427ccfcaf 100644 --- a/src/tests/elementary/suite_helpers.c +++ b/src/tests/elementary/suite_helpers.c @@ -187,7 +187,7 @@ _elm_suite_win_create() timer = efl_add(EFL_LOOP_TIMER_CLASS, loop, efl_loop_timer_interval_set(efl_added, BUFFER_RENDER_INTERVAL), efl_event_freeze(efl_added), - efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _win_manual_render, win) + efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _win_manual_render, win) ); evas_object_data_set(win, "timer", timer); ecore_evas_manual_render_set(ecore_evas_ecore_evas_get(evas_object_evas_get(win)), EINA_TRUE); diff --git a/src/tests/eo/suite/eo_test_class_simple.c b/src/tests/eo/suite/eo_test_class_simple.c index f374575ee4..846c2f2cb0 100644 --- a/src/tests/eo/suite/eo_test_class_simple.c +++ b/src/tests/eo/suite/eo_test_class_simple.c @@ -36,7 +36,7 @@ _a_set_reflect(Eo *obj, Eina_Value value) } static int -_a_get(Eo *obj EINA_UNUSED, void *class_data) +_a_get(const Eo *obj EINA_UNUSED, void *class_data) { Simple_Public_Data *pd = class_data; @@ -44,7 +44,7 @@ _a_get(Eo *obj EINA_UNUSED, void *class_data) } static Eina_Value -_a_get_reflect(Eo *obj) +_a_get_reflect(const Eo *obj) { int a = simple_a_get(obj); @@ -94,7 +94,7 @@ _dbg_info_get(Eo *eo_obj, void *_pd EINA_UNUSED, Efl_Dbg_Info *root) } EFL_VOID_FUNC_BODYV(simple_a_set, EFL_FUNC_CALL(a), int a); -EFL_FUNC_BODY(simple_a_get, int, 0); +EFL_FUNC_BODY_CONST(simple_a_get, int, 0); EFL_FUNC_BODY(simple_a_print, Eina_Bool, EINA_FALSE); EFL_VOID_FUNC_BODY(simple_pure_virtual); EFL_VOID_FUNC_BODY(simple_no_implementation); diff --git a/src/tests/eo/suite/eo_test_class_simple.h b/src/tests/eo/suite/eo_test_class_simple.h index 57e6c8fe12..b438b14d97 100644 --- a/src/tests/eo/suite/eo_test_class_simple.h +++ b/src/tests/eo/suite/eo_test_class_simple.h @@ -7,7 +7,7 @@ typedef struct } Simple_Public_Data; EAPI void simple_a_set(Eo *obj, int a); -EAPI int simple_a_get(Eo *obj); +EAPI int simple_a_get(const Eo *obj); EAPI Eina_Bool simple_a_print(Eo *obj); EAPI Eina_Bool simple_class_hi_print(const Eo *obj); EAPI void simple_recursive(Eo *obj, int n); diff --git a/src/tests/eo/suite/eo_test_reflection.c b/src/tests/eo/suite/eo_test_reflection.c index 9175785f14..c5a5b16929 100644 --- a/src/tests/eo/suite/eo_test_reflection.c +++ b/src/tests/eo/suite/eo_test_reflection.c @@ -8,6 +8,7 @@ #include "eo_suite.h" #include "eo_test_class_simple.h" +#include "eo_test_reflection_complex_class_structure.h" EFL_START_TEST(eo_test_reflection_invalid) @@ -66,9 +67,25 @@ EFL_START_TEST(eo_test_reflection_simple) } EFL_END_TEST +EFL_START_TEST(eo_test_reflection_complex_class_structure) +{ + const int numb = 42; + Eina_Value numb_val = eina_value_int_init(numb); + Eo *simple = efl_new(COMPLEX_CLASS_CLASS); + + efl_property_reflection_set(simple, "m_test", numb_val); + efl_property_reflection_set(simple, "i_test", numb_val); + + ck_assert_int_eq(complex_mixin_m_test_get(simple), numb); + ck_assert_int_eq(complex_interface_i_test_get(simple), numb); +} +EFL_END_TEST + void eo_test_reflection(TCase *tc) { tcase_add_test(tc, eo_test_reflection_simple); tcase_add_test(tc, eo_test_reflection_inherited); tcase_add_test(tc, eo_test_reflection_invalid); + tcase_add_test(tc, eo_test_reflection_complex_class_structure); } +#include "eo_test_reflection_complex_class_structure.c" diff --git a/src/tests/eo/suite/eo_test_reflection_complex_class_structure.c b/src/tests/eo/suite/eo_test_reflection_complex_class_structure.c new file mode 100644 index 0000000000..19727ca879 --- /dev/null +++ b/src/tests/eo/suite/eo_test_reflection_complex_class_structure.c @@ -0,0 +1,211 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include + +#include + +#include "eo_suite.h" +#include "eo_test_class_simple.h" +#include "eo_test_reflection_complex_class_structure.h" + +typedef struct { + int i; +} Complex_Class_Data; + +typedef struct { + int i; +} Complex_Mixin_Data; + +static void +_complex_class_complex_interface_i_test_set(Eo *obj EINA_UNUSED, Complex_Class_Data *pd, int i) +{ + pd->i = i; +} + +static int +_complex_class_complex_interface_i_test_get(const Eo *obj EINA_UNUSED, Complex_Class_Data *pd) +{ + return pd->i; +} + +static int +_complex_mixin_m_test_get(const Eo *obj EINA_UNUSED, Complex_Mixin_Data *pd) +{ + return pd->i; +} + +static void +_complex_mixin_m_test_set(Eo *obj EINA_UNUSED, Complex_Mixin_Data *pd, int i) +{ + pd->i = i; +} + +static Eina_Bool +_complex_class_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef COMPLEX_CLASS_EXTRA_OPS +#define COMPLEX_CLASS_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(complex_interface_i_test_set, _complex_class_complex_interface_i_test_set), + EFL_OBJECT_OP_FUNC(complex_interface_i_test_get, _complex_class_complex_interface_i_test_get), + COMPLEX_CLASS_EXTRA_OPS + ); + opsp = &ops; + + return efl_class_functions_set(klass, opsp, ropsp); +} + +static const Efl_Class_Description _complex_class_class_desc = { + EO_VERSION, + "Complex_Class", + EFL_CLASS_TYPE_REGULAR, + sizeof(Complex_Class_Data), + _complex_class_class_initializer, + NULL, + NULL +}; + +EFL_DEFINE_CLASS(complex_class_class_get, &_complex_class_class_desc, EO_CLASS, COMPLEX_INTERFACE_INTERFACE, COMPLEX_MIXIN_MIXIN, NULL); + +static Eina_Error +__eolian_complex_interface_i_test_set_reflect(Eo *obj, Eina_Value val) +{ + Eina_Error r = 0; int cval; + if (!eina_value_int_convert(&val, &cval)) + { + r = EINA_ERROR_VALUE_FAILED; + goto end; + } + complex_interface_i_test_set(obj, cval); + end: + eina_value_flush(&val); + return r; +} + +EOAPI EFL_VOID_FUNC_BODYV(complex_interface_i_test_set, EFL_FUNC_CALL(i), int i); + +static Eina_Value +__eolian_complex_interface_i_test_get_reflect(const Eo *obj) +{ + int val = complex_interface_i_test_get(obj); + return eina_value_int_init(val); +} + +EOAPI EFL_FUNC_BODY_CONST(complex_interface_i_test_get, int, 0); + +static Eina_Bool +_complex_interface_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef COMPLEX_INTERFACE_EXTRA_OPS +#define COMPLEX_INTERFACE_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(complex_interface_i_test_set, NULL), + EFL_OBJECT_OP_FUNC(complex_interface_i_test_get, NULL), + COMPLEX_INTERFACE_EXTRA_OPS + ); + opsp = &ops; + + static const Efl_Object_Property_Reflection refl_table[] = { + {"i_test", __eolian_complex_interface_i_test_set_reflect, __eolian_complex_interface_i_test_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 _complex_interface_class_desc = { + EO_VERSION, + "Complex_Interface", + EFL_CLASS_TYPE_INTERFACE, + 0, + _complex_interface_class_initializer, + NULL, + NULL +}; + +EFL_DEFINE_CLASS(complex_interface_interface_get, &_complex_interface_class_desc, NULL, NULL); + +static Eina_Error +__eolian_complex_mixin_m_test_set_reflect(Eo *obj, Eina_Value val) +{ + Eina_Error r = 0; int cval; + if (!eina_value_int_convert(&val, &cval)) + { + r = EINA_ERROR_VALUE_FAILED; + goto end; + } + complex_mixin_m_test_set(obj, cval); + end: + eina_value_flush(&val); + return r; +} + +EOAPI EFL_VOID_FUNC_BODYV(complex_mixin_m_test_set, EFL_FUNC_CALL(i), int i); + + +static Eina_Value +__eolian_complex_mixin_m_test_get_reflect(const Eo *obj) +{ + int val = complex_mixin_m_test_get(obj); + return eina_value_int_init(val); +} + +EOAPI EFL_FUNC_BODY_CONST(complex_mixin_m_test_get, int, 0); + +static Eina_Bool +_complex_mixin_class_initializer(Efl_Class *klass) +{ + const Efl_Object_Ops *opsp = NULL; + + const Efl_Object_Property_Reflection_Ops *ropsp = NULL; + +#ifndef COMPLEX_MIXIN_EXTRA_OPS +#define COMPLEX_MIXIN_EXTRA_OPS +#endif + + EFL_OPS_DEFINE(ops, + EFL_OBJECT_OP_FUNC(complex_mixin_m_test_set, _complex_mixin_m_test_set), + EFL_OBJECT_OP_FUNC(complex_mixin_m_test_get, _complex_mixin_m_test_get), + COMPLEX_MIXIN_EXTRA_OPS + ); + opsp = &ops; + + static const Efl_Object_Property_Reflection refl_table[] = { + {"m_test", __eolian_complex_mixin_m_test_set_reflect, __eolian_complex_mixin_m_test_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 _complex_mixin_class_desc = { + EO_VERSION, + "Complex_Mixin", + EFL_CLASS_TYPE_MIXIN, + sizeof(Complex_Mixin_Data), + _complex_mixin_class_initializer, + NULL, + NULL +}; + +EFL_DEFINE_CLASS(complex_mixin_mixin_get, &_complex_mixin_class_desc, NULL, NULL); diff --git a/src/tests/eo/suite/eo_test_reflection_complex_class_structure.h b/src/tests/eo/suite/eo_test_reflection_complex_class_structure.h new file mode 100644 index 0000000000..ae615c9428 --- /dev/null +++ b/src/tests/eo/suite/eo_test_reflection_complex_class_structure.h @@ -0,0 +1,20 @@ +#ifndef EO_TEST_REFLECTION_COMPLEX_CLASS_STRCUTURE_H +#define EO_TEST_REFLECTION_COMPLEX_CLASS_STRCUTURE_H + +typedef Eo Complex_Mixin; +#define COMPLEX_MIXIN_MIXIN complex_mixin_mixin_get() +EWAPI const Efl_Class *complex_mixin_mixin_get(void); +EOAPI void complex_mixin_m_test_set(Eo *obj, int i); +EOAPI int complex_mixin_m_test_get(const Eo *obj); + +typedef Eo Complex_Interface; +#define COMPLEX_INTERFACE_INTERFACE complex_interface_interface_get() +EWAPI const Efl_Class *complex_interface_interface_get(void); +EOAPI void complex_interface_i_test_set(Eo *obj, int i); +EOAPI int complex_interface_i_test_get(const Eo *obj); + +typedef Eo Complex_Class; +#define COMPLEX_CLASS_CLASS complex_class_class_get() +EWAPI const Efl_Class *complex_class_class_get(void); + +#endif diff --git a/src/tests/eolian/data/class_simple.eo b/src/tests/eolian/data/class_simple.eo index 6d9e59ddd7..0a89c5eea7 100644 --- a/src/tests/eolian/data/class_simple.eo +++ b/src/tests/eolian/data/class_simple.eo @@ -8,7 +8,6 @@ var @extern Bah: double; // not generated class Class_Simple { [[Class Desc Simple]] - legacy_prefix: evas_object_simple; eo_prefix: efl_canvas_object_simple; data: Evas_Simple_Data; methods { @@ -24,11 +23,6 @@ class Class_Simple { value: int (100); [[Value description]] } } - @property b { - set { - eo: null; - } - } foo @beta { [[comment foo]] params { @@ -39,12 +33,5 @@ class Class_Simple { } return: ptr(char) (null); [[comment for method return]] } - bar { - eo: null; - params { - x: int; - } - return: ptr(int); - } } } diff --git a/src/tests/eolian/data/class_simple_ref.c b/src/tests/eolian/data/class_simple_ref.c index 5d1af350e6..4fec41fb02 100644 --- a/src/tests/eolian/data/class_simple_ref.c +++ b/src/tests/eolian/data/class_simple_ref.c @@ -24,7 +24,7 @@ int _class_simple_a_get(const Eo *obj, Evas_Simple_Data *pd); static Eina_Value -__eolian_class_simple_a_get_reflect(Eo *obj) +__eolian_class_simple_a_get_reflect(const Eo *obj) { int val = efl_canvas_object_simple_a_get(obj); return eina_value_int_init(val); @@ -32,10 +32,6 @@ __eolian_class_simple_a_get_reflect(Eo *obj) EOAPI EFL_FUNC_BODY_CONST(efl_canvas_object_simple_a_get, int, 100); -void _class_simple_b_set(Eo *obj, Evas_Simple_Data *pd); - -EOAPI EFL_VOID_FUNC_BODY(efl_canvas_object_simple_b_set); - char *_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, char *b, double *c, int *d); static char *__eolian_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, char *b, double *c, int *d) @@ -46,10 +42,6 @@ static char *__eolian_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, cha EOAPI EFL_FUNC_BODYV(efl_canvas_object_simple_foo, char *, NULL /* null */, EFL_FUNC_CALL(a, b, c, d), int a, char *b, double *c, int *d); -int *_class_simple_bar(Eo *obj, Evas_Simple_Data *pd, int x); - -EOAPI EFL_FUNC_BODYV(efl_canvas_object_simple_bar, int *, NULL, EFL_FUNC_CALL(x), int x); - static Eina_Bool _class_simple_class_initializer(Efl_Class *klass) { @@ -64,9 +56,7 @@ _class_simple_class_initializer(Efl_Class *klass) EFL_OPS_DEFINE(ops, EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_a_set, _class_simple_a_set), EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_a_get, _class_simple_a_get), - EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_b_set, _class_simple_b_set), EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_foo, __eolian_class_simple_foo), - EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_bar, _class_simple_bar), CLASS_SIMPLE_EXTRA_OPS ); opsp = &ops; @@ -93,5 +83,3 @@ static const Efl_Class_Description _class_simple_class_desc = { }; EFL_DEFINE_CLASS(class_simple_class_get, &_class_simple_class_desc, NULL, NULL); - -#include "eolian_class_simple.eo.legacy.c" diff --git a/src/tests/eolian/data/class_simple_ref.legacy.c b/src/tests/eolian/data/class_simple_ref.legacy.c deleted file mode 100644 index b0f922864a..0000000000 --- a/src/tests/eolian/data/class_simple_ref.legacy.c +++ /dev/null @@ -1,12 +0,0 @@ - -EAPI void -evas_object_simple_b_set(Class_Simple *obj) -{ - efl_canvas_object_simple_b_set(obj); -} - -EAPI int * -evas_object_simple_bar(Class_Simple *obj, int x) -{ - return efl_canvas_object_simple_bar(obj, x); -} diff --git a/src/tests/eolian/data/class_simple_ref_eo.h b/src/tests/eolian/data/class_simple_ref_eo.h index 1b63422e7b..60e6fe27e2 100644 --- a/src/tests/eolian/data/class_simple_ref_eo.h +++ b/src/tests/eolian/data/class_simple_ref_eo.h @@ -70,8 +70,6 @@ EOAPI Eina_Bool efl_canvas_object_simple_a_set(Eo *obj, int value); EOAPI int efl_canvas_object_simple_a_get(const Eo *obj); #endif /* EFL_BETA_API_SUPPORT */ -EOAPI void efl_canvas_object_simple_b_set(Eo *obj); - #ifdef EFL_BETA_API_SUPPORT /** * @brief comment foo @@ -89,6 +87,4 @@ EOAPI void efl_canvas_object_simple_b_set(Eo *obj); EOAPI char *efl_canvas_object_simple_foo(Eo *obj, int a, char *b, double *c, int *d); #endif /* EFL_BETA_API_SUPPORT */ -EOAPI int *efl_canvas_object_simple_bar(Eo *obj, int x); - #endif diff --git a/src/tests/eolian/data/class_simple_ref_legacy.h b/src/tests/eolian/data/class_simple_ref_legacy.h deleted file mode 100644 index 39320a4ddb..0000000000 --- a/src/tests/eolian/data/class_simple_ref_legacy.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _EOLIAN_CLASS_SIMPLE_EO_LEGACY_H_ -#define _EOLIAN_CLASS_SIMPLE_EO_LEGACY_H_ - -#ifndef _CLASS_SIMPLE_EO_CLASS_TYPE -#define _CLASS_SIMPLE_EO_CLASS_TYPE - -typedef Eo Class_Simple; - -#endif - -#ifndef _CLASS_SIMPLE_EO_TYPES -#define _CLASS_SIMPLE_EO_TYPES - -#ifndef FOO -/** doc for constant - * - * @ingroup Foo - */ -#define FOO 5 -#endif - -/** doc for global - * - * @ingroup Bar - */ -EWAPI extern float BAR; - -/** in header but not in source - * - * @ingroup Baz - */ -EWAPI extern long BAZ; - - -#endif - -EAPI void evas_object_simple_b_set(Class_Simple *obj); - -EAPI int *evas_object_simple_bar(Class_Simple *obj, int x); - -#endif diff --git a/src/tests/eolian/data/docs.eo b/src/tests/eolian/data/docs.eo index f6bea43744..c81c6e2851 100644 --- a/src/tests/eolian/data/docs.eo +++ b/src/tests/eolian/data/docs.eo @@ -53,7 +53,6 @@ class Docs { @since 1.18 ]] - legacy_prefix: docs; methods { meth { [[Method documentation.]] diff --git a/src/tests/eolian/data/docs_ref_legacy.h b/src/tests/eolian/data/docs_ref_legacy.h deleted file mode 100644 index 8057c7aa7c..0000000000 --- a/src/tests/eolian/data/docs_ref_legacy.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef _EOLIAN_DOCS_EO_LEGACY_H_ -#define _EOLIAN_DOCS_EO_LEGACY_H_ - -#ifndef _DOCS_EO_CLASS_TYPE -#define _DOCS_EO_CLASS_TYPE - -typedef Eo Docs; - -#endif - -#ifndef _DOCS_EO_TYPES -#define _DOCS_EO_TYPES - -/** - * @brief This is struct Foo. It does stuff. - * - * @note This is a note. - * - * This is a longer description for struct Foo. - * - * @warning This is a warning. You can only use Warning: and Note: at the - * beginning of a paragraph. - * - * This is another paragraph. - * - * @since 1.66 - * - * @ingroup Foo - */ -typedef struct _Foo -{ - int field1; /**< Field documentation. */ - float field2; - short field3; /**< Another field documentation. */ -} Foo; - -/** Docs for enum Bar. - * - * @ingroup Bar - */ -typedef enum -{ - BAR_BLAH = 0, - BAR_FOO = 1, /**< Docs for foo. */ - BAR_BAR = 2 /**< Docs for bar. */ -} Bar; - -/** - * @brief Docs for typedef. - * - * More docs for typedef. See @ref Bar. - * - * @since 2.0 - * - * @ingroup Alias - */ -typedef Bar Alias; - -/** Docs for var. - * - * @ingroup pants - */ -EWAPI extern int PANTS; - -/** Opaque struct docs. See @ref Foo for another struct. - * - * @ingroup Opaque - */ -typedef struct _Opaque Opaque; - - -#endif - -/** - * @brief Method documentation. - * - * @param[in] obj The object. - * @param[in] a Param documentation. - * @param[out] b - * @param[out] c Another param documentation. - * - * @return Return documentation. - * - * @since 1.18 - * - * @ingroup Docs_Group - */ -EAPI int docs_meth(Docs *obj, int a, float *b, long *c); - -/** - * @brief Property common documentation. - * - * Set documentation. - * - * @param[in] obj The object. - * @param[in] val Value documentation. - * - * @since 1.18 - * - * @ingroup Docs_Group - */ -EAPI void docs_prop_set(Docs *obj, int val); - -/** - * @brief Property common documentation. - * - * Get documentation. - * - * @param[in] obj The object. - * - * @return Value documentation. - * - * @since 1.18 - * - * @ingroup Docs_Group - */ -EAPI int docs_prop_get(const Docs *obj); - -#endif diff --git a/src/tests/eolian/eolian_generation.c b/src/tests/eolian/eolian_generation.c index 6a43f1fc23..2fe0be6267 100644 --- a/src/tests/eolian/eolian_generation.c +++ b/src/tests/eolian/eolian_generation.c @@ -141,7 +141,6 @@ EFL_START_TEST(eolian_default_values_generation) _remove_ref(output_filepath, "eo.c"); fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gc", output_filepath)); fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref.c", output_filepath, "eo.c")); - fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref.legacy.c", output_filepath, "eo.legacy.c")); } EFL_END_TEST @@ -164,9 +163,7 @@ EFL_START_TEST(eolian_functions_descriptions) _remove_ref(output_filepath, "eo.h"); fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gh", output_filepath)); fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref_eo.h", output_filepath, "eo.h")); - _remove_ref(output_filepath, "eo.legacy.h"); fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", "-gl", output_filepath)); - fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref_legacy.h", output_filepath, "eo.legacy.h")); } EFL_END_TEST @@ -189,9 +186,7 @@ EFL_START_TEST(eolian_docs) _remove_ref(output_filepath, "eo.h"); fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/docs.eo", "-gh", output_filepath)); fail_if(!_files_compare(TESTS_SRC_DIR"/data/docs_ref.h", output_filepath, "eo.h")); - _remove_ref(output_filepath, "eo.legacy.h"); fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/docs.eo", "-gl", output_filepath)); - fail_if(!_files_compare(TESTS_SRC_DIR"/data/docs_ref_legacy.h", output_filepath, "eo.legacy.h")); } EFL_END_TEST diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index 3d2b4dbcfe..de1a740aa5 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -563,7 +563,6 @@ EFL_START_TEST(eolian_simple_parsing) fail_if(eolian_class_type_get(class) != EOLIAN_CLASS_REGULAR); fail_if(eolian_class_parent_get(class) != NULL); fail_if(eolian_class_extensions_get(class) != NULL); - fail_if(strcmp(eolian_class_legacy_prefix_get(class), "evas_object_simple")); fail_if(strcmp(eolian_class_eo_prefix_get(class), "efl_canvas_object_simple")); fail_if(strcmp(eolian_class_data_type_get(class), "Evas_Simple_Data")); Eina_Stringshare *dt = eolian_class_c_data_type_get(class); @@ -613,13 +612,6 @@ EFL_START_TEST(eolian_simple_parsing) fail_if(v.type != EOLIAN_EXPR_INT); fail_if(v.value.i != 100); - /* legacy only + c only */ - fail_if(eolian_class_function_by_name_get(class, "b", EOLIAN_PROPERTY)); - fail_if(!(fid = eolian_class_function_by_name_get(class, "b", EOLIAN_PROP_SET))); - fail_if(eolian_function_is_legacy_only(fid, EOLIAN_PROP_GET)); - fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_PROP_SET)); - fail_if(eolian_function_is_beta(fid)); - /* Method */ fail_if(!(fid = eolian_class_function_by_name_get(class, "foo", EOLIAN_METHOD))); fail_if(!eolian_function_is_beta(fid)); @@ -635,7 +627,6 @@ EFL_START_TEST(eolian_simple_parsing) fail_if(!expr); v = eolian_expression_eval(expr, EOLIAN_MASK_NULL); fail_if(v.type != EOLIAN_EXPR_NULL); - fail_if(eolian_function_is_legacy_only(fid, EOLIAN_METHOD)); /* Function parameters */ fail_if(!(iter = eolian_function_parameters_get(fid))); @@ -666,12 +657,6 @@ EFL_START_TEST(eolian_simple_parsing) fail_if(eina_iterator_next(iter, &dummy)); eina_iterator_free(iter); - /* legacy only + c only */ - fail_if(!(fid = eolian_class_function_by_name_get(class, "bar", EOLIAN_METHOD))); - fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_METHOD)); - fail_if(eolian_function_is_beta(fid)); - fail_if(!eolian_type_is_ptr(eolian_function_return_type_get(fid, EOLIAN_METHOD))); - eolian_state_free(eos); } EFL_END_TEST diff --git a/src/tests/eolian_cxx/docs.eo b/src/tests/eolian_cxx/docs.eo index 5ca93f02f2..5249b7196e 100644 --- a/src/tests/eolian_cxx/docs.eo +++ b/src/tests/eolian_cxx/docs.eo @@ -53,7 +53,6 @@ class Docs { @since 1.17 ]] - legacy_prefix: docs; methods { meth { [[Method documentation.]] diff --git a/src/tests/evas/evas_test_object_smart.c b/src/tests/evas/evas_test_object_smart.c index dd72980cd0..188e9c244b 100644 --- a/src/tests/evas/evas_test_object_smart.c +++ b/src/tests/evas/evas_test_object_smart.c @@ -122,7 +122,7 @@ EFL_START_TEST(evas_object_smart_paragraph_direction) evas_textblock_cursor_geometry_get(cur, &x, &y, &w, &h, &dir, EVAS_TEXTBLOCK_CURSOR_UNDER); fail_if(dir == EVAS_BIDI_DIRECTION_RTL); - fail_if(evas_object_text_direction_get(to) == EVAS_BIDI_DIRECTION_RTL); + fail_if((Evas_BiDi_Direction)evas_object_text_direction_get(to) == EVAS_BIDI_DIRECTION_RTL); /* Change paragraph direction of smart parent object */ evas_object_paragraph_direction_set(smart_obj, EVAS_BIDI_DIRECTION_RTL); @@ -131,7 +131,7 @@ EFL_START_TEST(evas_object_smart_paragraph_direction) EVAS_TEXTBLOCK_CURSOR_UNDER); fail_if(dir != EVAS_BIDI_DIRECTION_RTL); fail_if((x >= xx) || (y != yy) || (w != ww) || (h != hh)); - fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_RTL); + fail_if((Evas_BiDi_Direction)evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_RTL); /* The paragraph direction of smart member object has to be reset if smart member object is removed from smart parent. */ @@ -142,7 +142,7 @@ EFL_START_TEST(evas_object_smart_paragraph_direction) EVAS_TEXTBLOCK_CURSOR_UNDER); fail_if(dir == EVAS_BIDI_DIRECTION_RTL); fail_if((x >= xx) || (y != yy) || (w != ww) || (h != hh)); - fail_if(evas_object_text_direction_get(to) == EVAS_BIDI_DIRECTION_RTL); + fail_if((Evas_BiDi_Direction)evas_object_text_direction_get(to) == EVAS_BIDI_DIRECTION_RTL); /* The paragraph direction of smart member object has to be changed if smart member object is appended to smart parent. */ @@ -153,7 +153,7 @@ EFL_START_TEST(evas_object_smart_paragraph_direction) EVAS_TEXTBLOCK_CURSOR_UNDER); fail_if(dir != EVAS_BIDI_DIRECTION_RTL); fail_if((x >= xx) || (y != yy) || (w != ww) || (h != hh)); - fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_RTL); + fail_if((Evas_BiDi_Direction)evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_RTL); /* Ignore smart parent's paragraph direction */ evas_object_paragraph_direction_set(tb, EVAS_BIDI_DIRECTION_NEUTRAL); @@ -163,7 +163,7 @@ EFL_START_TEST(evas_object_smart_paragraph_direction) EVAS_TEXTBLOCK_CURSOR_UNDER); fail_if(dir == EVAS_BIDI_DIRECTION_RTL); fail_if((x >= xx) || (y != yy) || (w != ww) || (h != hh)); - fail_if(evas_object_text_direction_get(to) == EVAS_BIDI_DIRECTION_RTL); + fail_if((Evas_BiDi_Direction)evas_object_text_direction_get(to) == EVAS_BIDI_DIRECTION_RTL); evas_object_smart_member_del(tb); evas_object_smart_member_del(to); diff --git a/src/tests/evas/evas_test_text.c b/src/tests/evas/evas_test_text.c index 7c66fc96c0..929c88ddab 100644 --- a/src/tests/evas/evas_test_text.c +++ b/src/tests/evas/evas_test_text.c @@ -387,26 +387,26 @@ EFL_START_TEST(evas_text_set_get) /* Direction of an empty text should be NEUTRAL */ evas_object_text_text_set(to, ""); - fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_NEUTRAL); + fail_if((Evas_BiDi_Direction)evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_NEUTRAL); /* LTR paragraphs */ evas_object_text_text_set(to, "Test נסיון"); - fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_LTR); + fail_if((Evas_BiDi_Direction)evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_LTR); /* RTL paragraphs */ evas_object_text_text_set(to, "נסיון test"); #ifdef HAVE_FRIBIDI - fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_RTL); + fail_if((Evas_BiDi_Direction)evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_RTL); #else - fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_LTR); + fail_if((Evas_BiDi_Direction)evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_LTR); #endif #ifdef HAVE_FRIBIDI /* Check direction with evas_object_paragraph_direction_set API */ evas_object_text_text_set(to, "12345"); - fail_if(evas_object_text_direction_get(to) == EVAS_BIDI_DIRECTION_RTL); + fail_if((Evas_BiDi_Direction)evas_object_text_direction_get(to) == EVAS_BIDI_DIRECTION_RTL); evas_object_paragraph_direction_set(to, EVAS_BIDI_DIRECTION_RTL); - fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_RTL); + fail_if((Evas_BiDi_Direction)evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_RTL); evas_object_paragraph_direction_set(to, EVAS_BIDI_DIRECTION_NEUTRAL); #endif @@ -478,9 +478,9 @@ EFL_START_TEST(evas_text_bidi) evas_object_text_font_set(to, font, size); evas_object_text_text_set(to, buf); - fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_LTR); + fail_if((Evas_BiDi_Direction)evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_LTR); evas_object_text_text_set(to, "בדיקה"); - fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_RTL); + fail_if((Evas_BiDi_Direction)evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_RTL); /* With RTL text coords should be monotontically decreasing. */ evas_object_text_text_set(to, "נסיון...");