[EGIT] [core/efl] master 02/02: eio-cxx: Added Eio.hh to .gitignore file
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=310af39d61e02b2c4ca4c2291e1cc021f6ddfc27 commit 310af39d61e02b2c4ca4c2291e1cc021f6ddfc27 Author: Felipe Magno de Almeida fel...@expertisesolutions.com.br Date: Tue Apr 14 09:10:56 2015 -0300 eio-cxx: Added Eio.hh to .gitignore file Since Eio.hh is a generated file, added it to .gitignore file so it doesn't pollute git statuses. --- src/lib/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/.gitignore b/src/lib/.gitignore index f313989..df511ac 100644 --- a/src/lib/.gitignore +++ b/src/lib/.gitignore @@ -7,3 +7,4 @@ /evas/Evas.hh /edje/Edje.hh /edje/Edje.eo.hh +/eio/Eio.hh --
[EGIT] [core/efl] master 01/01: Fix uninitialized member by coverity CID 1294558
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5791065d29571e01916b60af3c77379ec9cdc6d1 commit 5791065d29571e01916b60af3c77379ec9cdc6d1 Author: Felipe Magno de Almeida fel...@expertisesolutions.com.br Date: Thu Apr 23 21:24:06 2015 -0300 Fix uninitialized member by coverity CID 1294558 Initialize the scope member in the default constructor. --- src/lib/eolian_cxx/eo_types.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/eolian_cxx/eo_types.hh b/src/lib/eolian_cxx/eo_types.hh index 987be69..843c2fa 100644 --- a/src/lib/eolian_cxx/eo_types.hh +++ b/src/lib/eolian_cxx/eo_types.hh @@ -294,6 +294,8 @@ struct eo_function struct eo_event { + eo_event() : scope(eolian_scope::public_) {} + eolian_scope scope; std::string name; std::string eo_name; --
[EGIT] [core/efl] master 01/01: eolian-cxx: Removed unused function
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=51d9760fe648179aa660c893dbb965a7e5cc7f18 commit 51d9760fe648179aa660c893dbb965a7e5cc7f18 Author: Felipe Magno de Almeida fel...@expertisesolutions.com.br Date: Tue Jun 2 14:32:45 2015 -0300 eolian-cxx: Removed unused function Removed unused function and consequent warning --- src/bin/eolian_cxx/convert.cc | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/bin/eolian_cxx/convert.cc b/src/bin/eolian_cxx/convert.cc index 0b75183..051c6e3 100644 --- a/src/bin/eolian_cxx/convert.cc +++ b/src/bin/eolian_cxx/convert.cc @@ -108,13 +108,6 @@ _convert_eolian_parameters(Eina_Iterator *parameters, } static efl::eolian::parameters_container_type -_convert_eolian_parameters(Eolian_Function const func, getter_t func_type) -{ - return _convert_eolian_parameters - (::eolian_function_parameters_get(func), func_type.value); -} - -static efl::eolian::parameters_container_type _convert_eolian_parameters(Eina_Iterator *parameters, getter_t func_type) { return _convert_eolian_parameters(parameters, func_type.value); --
[EGIT] [core/elementary] master 01/01: Remove #include for config.h from C++ public header
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=3e29939dba0698d7729c85ae4c53f798e44c3239 commit 3e29939dba0698d7729c85ae4c53f798e44c3239 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Mon Nov 2 19:39:55 2015 -0200 Remove #include for config.h from C++ public header Removed #include for elementary_config.h if HAVE_CONFIG_H is defined. Which causes errors with external projects. Instead, defined the necessary macros to use the Eo API. --- src/lib/Elementary.hh.in | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/Elementary.hh.in b/src/lib/Elementary.hh.in index 9075c3c..51f3127 100644 --- a/src/lib/Elementary.hh.in +++ b/src/lib/Elementary.hh.in @@ -11,12 +11,8 @@ #error Do not include Elm C API headers before including Elementary.hh #endif -#ifdef HAVE_CONFIG_H -extern "C" { -#include -} -#endif - +#define EFL_BETA_API_SUPPORT 1 +#define EFL_EO_API_SUPPORT 1 #define ELM_INTERNAL_API_ARGESFSDFEFC #define ELM_WIDGET_ITEM_PROTECTED --
[EGIT] [core/efl] master 02/02: eolian-cxx: Fixed possible exception escaping main
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=932b6e74635ede0bb1a1f8b86ebfc7efac724ef4 commit 932b6e74635ede0bb1a1f8b86ebfc7efac724ef4 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Fri Oct 9 13:54:32 2015 -0300 eolian-cxx: Fixed possible exception escaping main Added try/catch around main to show the reason for the generation failure. @fix CID 1265600 --- src/bin/eolian_cxx/eolian_cxx.cc | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc index 38084f4..cb33de4 100644 --- a/src/bin/eolian_cxx/eolian_cxx.cc +++ b/src/bin/eolian_cxx/eolian_cxx.cc @@ -366,10 +366,19 @@ opts_get(int argc, char **argv) int main(int argc, char **argv) { - efl::eina::eina_init eina_init; - efl::eolian::eolian_init eolian_init; - eolian_cxx::options_type opts = opts_get(argc, argv); - eolian_cxx::database_load(opts); - eolian_cxx::run(opts); + try + { +efl::eina::eina_init eina_init; +efl::eolian::eolian_init eolian_init; +eolian_cxx::options_type opts = opts_get(argc, argv); +eolian_cxx::database_load(opts); +eolian_cxx::run(opts); + } + catch(std::exception const& e) + { + std::cerr << "EOLCXX: Eolian C++ failed generation for the following reason: " << e.what() << std::endl; + std::cout << "EOLCXX: Eolian C++ failed generation for the following reason: " << e.what() << std::endl; + return -1; + } return 0; } --
[EGIT] [core/efl] master 01/02: eolian-cxx: Fixed assert which was a tautology
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=13606c46474364e9dafa7aa6c1addf3be89950ce commit 13606c46474364e9dafa7aa6c1addf3be89950ce Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Fri Oct 9 13:48:17 2015 -0300 eolian-cxx: Fixed assert which was a tautology Fixed the assert to the correct check @fix CID 1316018 --- src/lib/eolian_cxx/eo_validate.hh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/eolian_cxx/eo_validate.hh b/src/lib/eolian_cxx/eo_validate.hh index 0b6f5cf..8ffa7dc 100644 --- a/src/lib/eolian_cxx/eo_validate.hh +++ b/src/lib/eolian_cxx/eo_validate.hh @@ -71,10 +71,10 @@ eo_class_validate(const eo_class& cls) { // class name and type _validate(cls.name, cls); - assert(cls.type != eo_class::regular_ || - cls.type != eo_class::regular_noninst_ || - cls.type != eo_class::interface_ || - cls.type != eo_class::mixin_); + assert(cls.type == eo_class::regular_ || + cls.type == eo_class::regular_noninst_ || + cls.type == eo_class::interface_ || + cls.type == eo_class::mixin_); // constructors for (auto it = cls.constructors.cbegin(), last = cls.constructors.cend(); --
[EGIT] [core/elementary] master 01/01: Added elm_general.eot file to EXTRA_DIST
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=dfb979950cfcebc21d1b0e933d4f02ab2084e304 commit dfb979950cfcebc21d1b0e933d4f02ab2084e304 Author: Felipe Magno de Almeida fel...@expertisesolutions.com.br Date: Tue Aug 25 02:37:42 2015 -0300 Added elm_general.eot file to EXTRA_DIST Fixes distcheck --- src/lib/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 41f5ec3..d965c1c 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -651,7 +651,7 @@ BUILT_SOURCES = \ $(elm_eolian_legacy_h) elementaryeolianfilesdir = $(datadir)/eolian/include/elementary-@VMAJ@ -elementaryeolianfiles_DATA = $(elm_eolian_files) +elementaryeolianfiles_DATA = $(elm_eolian_files) $(elm_eolian_type_files) EXTRA_DIST += ${elementaryeolianfiles_DATA} nodist_includesunstable_HEADERS = $(elm_eolian_h) $(elm_eolian_legacy_h) $(elm_eolian_eot_h) --
[EGIT] [core/efl] master 01/01: eolian-cxx: Fix inheritance from C++ classes after Eo ABI breakage
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c2132a0666daf3d6dd99e710f8a7f100643fe731 commit c2132a0666daf3d6dd99e710f8a7f100643fe731 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Wed Sep 30 17:55:16 2015 -0500 eolian-cxx: Fix inheritance from C++ classes after Eo ABI breakage Fixed removal of op field from Eo_Op_Description and removed unnecessary use of internal Eo API to implement the Eo API function for theh constructor of the inherited class. --- src/bindings/eo_cxx/eo_inherit_bindings.hh | 26 +- .../grammar/inheritance_base_generator.hh | 1 - 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/src/bindings/eo_cxx/eo_inherit_bindings.hh b/src/bindings/eo_cxx/eo_inherit_bindings.hh index 9d8ca6d..cbd2bc8 100644 --- a/src/bindings/eo_cxx/eo_inherit_bindings.hh +++ b/src/bindings/eo_cxx/eo_inherit_bindings.hh @@ -61,29 +61,7 @@ void inherit_constructor_impl(Eo*, Inherit_Private_Data* self, void* this_) /// @param this_ The user data to be passed to the resolved function. /// @param args An heterogeneous sequence of arguments. /// -EAPI inline -void inherit_constructor(void* this_) -{ - typedef void (*func_t)(Eo *, void *, void*); - Eo_Op_Call_Data ___call; - static Eo_Op op = EO_NOOP; - if ( op == EO_NOOP ) - op = _eo_api_op_id_get - (reinterpret_cast<void*> -(::inherit_constructor), -::eina_main_loop_is(), __FILE__, __LINE__); - if (!_eo_call_resolve("detail::inherit_constructor", op, &___call, - ::eina_main_loop_is(), __FILE__, __LINE__)) - { -assert(_eo_call_resolve("detail::inherit_constructor", op, &___call, -::eina_main_loop_is(), __FILE__, __LINE__)); -return; - } - func_t func = (func_t) ___call.func; - EO_HOOK_CALL_PREPARE(eo_hook_call_pre, ""); - func(___call.obj, ___call.data, this_); - EO_HOOK_CALL_PREPARE(eo_hook_call_post, ""); -} +inline EOAPI EO_VOID_FUNC_BODYV(inherit_constructor, EO_FUNC_CALL(this_), void* this_); template int initialize_operation_description(detail::tag, void*); @@ -136,12 +114,10 @@ Eo_Class const* create_class(eina::index_sequence) ( ::inherit_constructor ); - op_descs[detail::operation_description_size::value].op = EO_NOOP; op_descs[detail::operation_description_size::value].op_type = EO_OP_TYPE_REGULAR; op_descs[detail::operation_description_size::value+1].func = 0; op_descs[detail::operation_description_size::value+1].api_func = 0; - op_descs[detail::operation_description_size::value+1].op = 0; op_descs[detail::operation_description_size::value+1].op_type = EO_OP_TYPE_INVALID; typedef inherit<D, E...> inherit_type; diff --git a/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh b/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh index 536c9e3..561ce8c 100644 --- a/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh +++ b/src/lib/eolian_cxx/grammar/inheritance_base_generator.hh @@ -47,7 +47,6 @@ operator<<(std::ostream& out, inheritance_operation const& x) << x._cls.name << "_" << func.name << "_wrapper);" << endl << tab(1) << "ops[i].api_func = reinterpret_cast<void*>(& ::" << func.impl << ");" << endl - << tab(1) << "ops[i].op = EO_OP_OVERRIDE;" << endl << tab(1) << "ops[i].op_type = EO_OP_TYPE_REGULAR;" << endl // XXX class ops << tab(1) << "++i;" << endl << scope_guard_tail(x._cls, func) --
[EGIT] [core/efl] master 01/04: eina: add EINA_VALUE_TYPE_OPTIONAL, a single-element container that can be empty.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5d4038d74d877ca88f2abccb4a67ebc84f06ffc7 commit 5d4038d74d877ca88f2abccb4a67ebc84f06ffc7 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Thu Jul 9 00:57:38 2015 -0300 eina: add EINA_VALUE_TYPE_OPTIONAL, a single-element container that can be empty. Eina Value Optional can be used to create a eina value that can be set or be empty and can be embedded in a eina_value_struct. Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/eina/eina_inline_value.x | 68 src/lib/eina/eina_value.c| 227 +++ src/lib/eina/eina_value.h| 90 src/tests/eina/eina_test_value.c | 144 + 4 files changed, 529 insertions(+) diff --git a/src/lib/eina/eina_inline_value.x b/src/lib/eina/eina_inline_value.x index 9aff401..a9ceea1 100644 --- a/src/lib/eina/eina_inline_value.x +++ b/src/lib/eina/eina_inline_value.x @@ -1652,6 +1652,74 @@ eina_value_struct_member_value_set(Eina_Value *dst, const Eina_Value_Struct_Memb #undef EINA_VALUE_TYPE_STRUCT_CHECK_RETURN_VAL +#define EINA_VALUE_TYPE_OPTIONAL_CHECK_RETURN_VAL(value, retval) \ + EINA_SAFETY_ON_NULL_RETURN_VAL(value, retval);\ + EINA_SAFETY_ON_FALSE_RETURN_VAL(value->type->setup == EINA_VALUE_TYPE_OPTIONAL->setup, retval) + +static inline Eina_Value* +eina_value_optional_empty_new() +{ + return eina_value_new(EINA_VALUE_TYPE_OPTIONAL); +} + +struct _Eina_Value_Optional_Outer +{ + Eina_Value_Type const* subtype; + void* value; +}; +typedef struct _Eina_Value_Optional_Outer Eina_Value_Optional_Outer; + +struct _Eina_Value_Optional_Inner +{ + Eina_Value_Type const* subtype; + char value[]; +}; +typedef struct _Eina_Value_Optional_Inner Eina_Value_Optional_Inner; + +static inline Eina_Bool +eina_value_optional_empty_is(const Eina_Value *value, Eina_Bool *is_empty) +{ + EINA_VALUE_TYPE_OPTIONAL_CHECK_RETURN_VAL(value, EINA_FALSE); + EINA_SAFETY_ON_NULL_RETURN_VAL(is_empty, EINA_FALSE); + + void *mem = eina_value_memory_get(value); + if (!mem) + return EINA_FALSE; + if(2*sizeof(void*) <= sizeof(Eina_Value_Union)) + { + Eina_Value_Optional_Outer* opt = (Eina_Value_Optional_Outer*)mem; + *is_empty = !opt->subtype; + } + else + { + *is_empty = ! *(void**)mem; + } + return EINA_TRUE; +} + +static inline const Eina_Value_Type * +eina_value_optional_type_get(Eina_Value *value) +{ + EINA_VALUE_TYPE_OPTIONAL_CHECK_RETURN_VAL(value, (const Eina_Value_Type *)NULL); + + void *mem = eina_value_memory_get(value); + if (!mem) + return EINA_FALSE; + + if(2*sizeof(void*) <= sizeof(Eina_Value_Union)) + { + Eina_Value_Optional_Outer* opt = (Eina_Value_Optional_Outer*)mem; + return opt->subtype; + } + else + { + Eina_Value_Optional_Inner* opt = *(Eina_Value_Optional_Inner**)mem; + if(!opt) + return NULL; + return opt->subtype; + } +} +#undef EINA_VALUE_TYPE_OPTIONAL_CHECK_RETURN_VAL static inline Eina_Bool eina_value_type_setup(const Eina_Value_Type *type, void *mem) diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c index 824f11d..8b45856 100644 --- a/src/lib/eina/eina_value.c +++ b/src/lib/eina/eina_value.c @@ -4349,6 +4349,229 @@ static const Eina_Value_Type _EINA_VALUE_TYPE_STRUCT = { _eina_value_type_struct_pget }; +static Eina_Bool +_eina_value_type_optional_setup(const Eina_Value_Type *type EINA_UNUSED, void *mem) +{ + memset(mem, 0, type->value_size); + return EINA_TRUE; +} + +static Eina_Bool +_eina_value_type_optional_flush(const Eina_Value_Type *type EINA_UNUSED, void *mem EINA_UNUSED) +{ + if(sizeof(Eina_Value_Optional_Outer) <= sizeof(Eina_Value_Union)) + { +Eina_Value_Optional_Outer* opt = mem; +if(opt->subtype) + { + if(!eina_value_type_flush(opt->subtype, opt->value)) + return EINA_FALSE; + free(opt->value); + memset(mem, 0, sizeof(Eina_Value_Optional_Outer)); + } + } + else + { +Eina_Value_Optional_Inner* opt = *(void**)mem; +if(opt) + { + if(!eina_value_type_flush(opt->subtype, opt->value)) + return EINA_FALSE; + free(*(void**)mem); + *(void**)mem = NULL; + } + } + return EINA_TRUE; +} + +EAPI Eina_Bool +eina_value_optional_reset(Eina_Value *value) +{ + void *mem = eina_value_memory_get(value); + if (!mem) + return EINA_FALSE; + return _eina_value_type_optional_flush(EINA_VALUE_TYPE_OPTIONAL, mem); +} + +EAPI Eina_Value* +eina_value_optional_new(Eina_Value_Type const *subtype, +const void* initial_value) EINA_ARG_NONNULL(1, 2) +{ + Eina_Value *val
[EGIT] [core/elementary] master 01/01: efl-js: JavaScript Eolian binding
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=9dbba7412358ac31af2f8e962d30438681b0f097 commit 9dbba7412358ac31af2f8e962d30438681b0f097 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Tue Dec 9 16:41:16 2014 -0200 efl-js: JavaScript Eolian binding To configure elementary sources with bindings to use in nodejs add ––with-js=nodejs in configure flags in EFL compilation to generate node files, then compile elementary normally: path/to/efl$ configure --with-js=nodejs path/to/efl$ make path/to/efl$ make install path/to/elm$ configure path/to/efl$ make path/to/efl$ make install To use, you have to require elm: elm = require('elm') The bindings is divided in two parts: generated and manually written. The generation uses the Eolian library for parsing Eo files and generate C++ code that is compiled against V8 interpreter library to create a elm.node file that can be required in a node.js instance. @feature --- Makefile_Eolian_Cxx_Helper.am|2 +- Makefile_Eolian_Js_Helper.am | 15 + configure.ac | 80 ++- doc/Doxyfile.in |2 +- doc/examples-js.dox | 1022 ++ m4/ac_define_if.m4 |7 + src/examples/Makefile.am |8 +- src/examples/bg_example_01.js| 15 + src/examples/bg_example_02.js| 19 + src/examples/box_js_example_01.js| 34 ++ src/examples/box_js_example_02.js| 86 +++ src/examples/bubble_example_01.js| 54 ++ src/examples/button_example_00.js| 21 + src/examples/button_example_01.js| 208 +++ src/examples/calendar_example_01.js | 14 + src/examples/calendar_example_02.js | 17 + src/examples/calendar_example_03.js | 15 + src/examples/calendar_example_04.js | 32 ++ src/examples/calendar_example_05.js | 29 + src/examples/clock_example.js| 43 ++ src/examples/datetime_example.js | 42 ++ src/examples/icon_example_01.js | 33 ++ src/examples/menu_example_01.js | 37 ++ src/examples/popup_example_01.js | 32 ++ src/examples/radio_example_01.js | 65 +++ src/examples/separator_example_01.js | 41 ++ src/examples/slider_example.js | 104 src/examples/spinner_example.js | 90 +++ src/examples/table_example_01.js | 34 ++ src/examples/table_example_02.js | 38 ++ src/examples/thumb_example_01.js | 38 ++ src/examples/twitter_example_01.edc | 89 +++ src/examples/twitter_example_01.js | 82 +++ src/lib/Makefile.am | 47 ++ src/lib/elc_fileselector_entry.c |2 +- src/lib/elc_multibuttonentry.c |2 +- src/lib/elc_naviframe.c |2 +- src/lib/elc_popup.c |2 +- src/lib/elementary_js.cc | 288 ++ src/lib/elm_actionslider.c |2 +- src/lib/elm_actionslider.eo |4 +- src/lib/elm_bubble.eo|2 +- src/lib/elm_entry.c |2 +- src/lib/elm_entry.eo |4 +- src/lib/elm_fileselector.eo |2 +- src/lib/elm_fileselector_entry.eo|4 +- src/lib/elm_label.eo |2 +- src/lib/elm_layout.c |2 +- src/lib/elm_layout.eo| 24 +- src/lib/elm_multibuttonentry.eo |4 +- src/lib/elm_naviframe.eo |4 +- src/lib/elm_popup.eo |4 +- 52 files changed, 2805 insertions(+), 46 deletions(-) diff --git a/Makefile_Eolian_Cxx_Helper.am b/Makefile_Eolian_Cxx_Helper.am index 8b792e0..bbae6f0 100644 --- a/Makefile_Eolian_Cxx_Helper.am +++ b/Makefile_Eolian_Cxx_Helper.am @@ -6,7 +6,7 @@ AM_V_EOLCXX = $(am__v_EOLCXX_@AM_V@) am__v_EOLCXX_ = $(am__v_EOLCXX_@AM_DEFAULT_V@) am__v_EOLCXX_0 = @echo " EOLCXX " $@; -SUFFIXES += .eo.hh +SUFFIXES += .eo.hh .eo.impl.hh %.eo.impl.hh %.eo.hh: %.eo $(_EOLIAN_CXX_DEP) $(AM_V_EOLCXX) \ diff --git a/Makefile_Eolian_Js_Helper.am b/Makefile_Eolian_Js_Helper.am new file mode 100644 index 000..11c3134 --- /dev/null +++ b/Makefile_Eolian_Js_Helper.am @@ -0,0 +1,15 @@ + +if HAVE_JS +EOLIAN_JS = @eolian_js@ +_EOLIAN_JS_DEP = @eolian_js@ +endif + +AM_V_EOLJS = $(am__v_EOLJS_@AM_V@) +am__v_EOLJS_ = $(am__v_EOLJS_@AM_DEFAULT_V@) +am__v_EOLJS_0 = @echo " EOLJS " $@; + +SUFFIXES += .eo.js.cc + +%.eo.js.cc: %.eo $(_EOLIAN_JS_DEP) + $(AM_V_EOLJS)$(EOLIAN_JS) $(EOLIAN_FLAGS) -o $@ $< + diff --git a/configure.ac b/configure.ac index 1271665..60dd3df 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,12 @@ AC_ARG_ENABLE([cxx-bindings], [want_cxx11="${enableval}"], [want_cxx11="yes"]) +AC_ARG_ENABLE([js-bindings], + [AS_HELP_STRING([--enable-js-bi
[EGIT] [core/efl] master 01/01: eina-cxx: Remove Eo classes defined manually
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=88cce73f90a9920e0dafe34f7b99dbd215c1d4ab commit 88cce73f90a9920e0dafe34f7b99dbd215c1d4ab Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Mon Jan 11 16:10:55 2016 -0200 eina-cxx: Remove Eo classes defined manually Use Eolian to generate the Eo classes for the tests. This should fix T2940. @fix --- src/Makefile_Eina_Cxx.am | 25 +++-- src/tests/eina_cxx/eina_cxx_test_accessor.cc | 22 src/tests/eina_cxx/eina_cxx_test_ptrarray.cc | 54 +-- src/tests/eina_cxx/eina_cxx_test_ptrlist.cc | 77 +--- src/tests/eina_cxx/simple.c | 21 src/tests/eina_cxx/simple.eo | 8 +++ 6 files changed, 113 insertions(+), 94 deletions(-) diff --git a/src/Makefile_Eina_Cxx.am b/src/Makefile_Eina_Cxx.am index e9f7c13..166429a 100644 --- a/src/Makefile_Eina_Cxx.am +++ b/src/Makefile_Eina_Cxx.am @@ -59,13 +59,33 @@ tests/eina_cxx/eina_cxx_test_error.cc \ tests/eina_cxx/eina_cxx_test_accessor.cc \ tests/eina_cxx/eina_cxx_test_thread.cc \ tests/eina_cxx/eina_cxx_test_optional.cc \ -tests/eina_cxx/eina_cxx_test_value.cc +tests/eina_cxx/eina_cxx_test_value.cc \ +tests/eina_cxx/simple.c -tests_eina_cxx_eina_cxx_suite_CXXFLAGS = -I$(top_builddir)/src/lib/efl \ +tests/eina_cxx/tests_eina_cxx_eina_cxx_suite-eina_cxx_test_accessor.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h +tests/eina_cxx/tests_eina_cxx_eina_cxx_suite-eina_cxx_test_ptrarray.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h +tests/eina_cxx/tests_eina_cxx_eina_cxx_suite-eina_cxx_test_ptrlist.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h + +tests/eina_cxx/tests_eina_cxx_eina_cxx_suite-simple.$(OBJEXT): tests/eina_cxx/simple.eo.c tests/eina_cxx/simple.eo.h + +CLEANFILES += \ +tests/eina_cxx/simple.eo.c \ +tests/eina_cxx/simple.eo.h \ +tests/eina_cxx/simple.eo.hh \ +tests/eina_cxx/simple.eo.impl.hh + +EXTRA_DIST += \ +tests/eina_cxx/simple.eo + +tests_eina_cxx_eina_cxx_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ -DTESTS_WD=\"`pwd`\" \ -DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/eina_cxx\" \ -DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)/src/tests/eina_cxx\" \ -DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eina_cxx\" \ +-I$(top_builddir)/src/lib/efl \ +-I$(top_builddir)/src/lib/efl/interfaces \ +-I$(top_srcdir)/src/bin/eina_cxx \ +-I$(top_builddir)/src/tests/eina_cxx \ @CHECK_CFLAGS@ \ @EO_CFLAGS@ \ @ECORE_CFLAGS@ \ @@ -76,4 +96,3 @@ tests_eina_cxx_eina_cxx_suite_DEPENDENCIES = @USE_EINA_INTERNAL_LIBS@ @USE_EO_IN endif endif - diff --git a/src/tests/eina_cxx/eina_cxx_test_accessor.cc b/src/tests/eina_cxx/eina_cxx_test_accessor.cc index 39b85f0..af49fb9 100644 --- a/src/tests/eina_cxx/eina_cxx_test_accessor.cc +++ b/src/tests/eina_cxx/eina_cxx_test_accessor.cc @@ -10,9 +10,9 @@ #include - -const Eo_Class *simple_class_get(void); -#define MY_CLASS simple_class_get() +extern "C" { +#include "simple.eo.h" +} struct wrapper : efl::eo::concrete { @@ -46,10 +46,10 @@ START_TEST(eina_cxx_eo_accessor_indexing) efl::eina::list list; - wrapper const w1(eo_add(MY_CLASS, NULL)); - wrapper const w2(eo_add(MY_CLASS, NULL)); - wrapper const w3(eo_add(MY_CLASS, NULL)); - wrapper const w4(eo_add(MY_CLASS, NULL)); + wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); + wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); + wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); + wrapper const w4(eo_add(SIMPLE_CLASS, NULL)); list.push_back(w1); list.push_back(w2); @@ -100,10 +100,10 @@ START_TEST(eina_cxx_eo_accessor_iterator) efl::eina::list list; - wrapper const w1(eo_add(MY_CLASS, NULL)); - wrapper const w2(eo_add(MY_CLASS, NULL)); - wrapper const w3(eo_add(MY_CLASS, NULL)); - wrapper const w4(eo_add(MY_CLASS, NULL)); + wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); + wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); + wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); + wrapper const w4(eo_add(SIMPLE_CLASS, NULL)); list.push_back(w1); list.push_back(w2); diff --git a/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc b/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc index 67d4722..2bf8bb5 100644 --- a/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc +++ b/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc @@ -11,9 +11,9 @@ #include #include - -const Eo_Class *simple_class_get(void); -#define MY_CLASS simple_class_get() +extern "C" { +#include "simple.eo.h" +} struct wrapper : efl::eo::concrete { @@ -29,9 +29,9 @@ START_TEST(eina_cxx_ptrarray_push_back) int result[] = {5, 10, 15}; int rresult[] = {15, 10, 5}; - wrapper const w1(eo_add(MY_CLASS, NULL)); - wrapper const w2(eo_add(MY_CLASS, NULL)); - wrapper const w3(eo_add(MY_CLASS, NULL)); +
[EGIT] [core/elementary] master 02/02: js: Added layout example
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=13e2ed7cd8f3499ed1b0e68a877243f044becb7f commit 13e2ed7cd8f3499ed1b0e68a877243f044becb7f Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Wed Feb 3 21:19:51 2016 -0200 js: Added layout example --- src/examples/layout_example.js | 63 ++ 1 file changed, 63 insertions(+) diff --git a/src/examples/layout_example.js b/src/examples/layout_example.js new file mode 100644 index 000..d6e5dd7 --- /dev/null +++ b/src/examples/layout_example.js @@ -0,0 +1,63 @@ + +Elm = require('elm').Elm; +efl = require('efl'); +Evas = efl.Evas; + +win = new Elm.WinStandard(null); +win.setTitle("Layout"); +win.setAutohide(true); + +box = new Elm.Box(win); +box.setSizeHintWeight(1.0, 1.0); +win.addResizeObject(box); +box.setVisible(true); + +ly = new Elm.Layout(box); + +if (!ly.setTheme("layout", "application", "titlebar")) +{ +console.log('Error setting layout'); +} + +ly.setPartText('elm.text', 'Some title'); +ly.setSizeHintWeight(1.0, 1.0); +ly.setSizeHintAlign(1.0, 1.0); +box.packEnd(ly); +ly.setVisible(true); + +bt = new Elm.Icon(ly); +bt.setStandard('chat'); +bt.setSizeHintMin(20, 20); +// elm_layout_icon_set(ly, bt); +ly.setContent('elm.swallow.icon', bt); +ly.emitSignal('elm,state,icon,visible', 'elm'); + +bt = new Elm.Icon(ly); +bt.setStandard('close'); +bt.setSizeHintMin(20, 20); +// elm_layout_end_set(ly, bt); +ly.setContent('elm.swallow.end', bt); +ly.emitSignal('elm,state,end,visible', 'elm'); + +ly = new Elm.Layout(box); +ly.setFile('/home/felipe/dev/samsung/upstream/elementary/build/data/objects/test.edj', "layout"); +ly.setSizeHintWeight(1.0, 1.0); +box.packEnd(ly); +ly.setVisible(true); + +//elm_layout_signal_callback_add(ly, "*", "*", _cb_signal, NULL); +// I hope to translate to: +//ly.on_layout('*', '*', function(emission, source) +// { console.log("signal: '" + emission + "' '" + source + "'");}); + +bt = new Elm.Button(ly); +bt.setPartText(null, "Button 1"); +ly.setContent("element1", bt); + +bt.on("clicked", function() { console.log('button clicked'); }); + +ly.setPartCursor("text", 'watch'); +ly.on('mouse,down', function() { console.log('layout mouse down') }); +ly.on('mouse,up', function() { console.log('layout mouse up') }); + +win.setVisible(true); --
[EGIT] [core/efl] master 02/03: eolian-js: Modified formating to replace verb position in method names
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8ff1194d32f28717e37177af4501e3fbd62fdf41 commit 8ff1194d32f28717e37177af4501e3fbd62fdf41 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Sun Jan 17 14:09:55 2016 -0200 eolian-js: Modified formating to replace verb position in method names Formatting now checks if the last function is a known verb and changes its position to the first word of the method if it is. Making the method use the same coding standard as node.js. --- src/bin/eolian_js/eolian/js/format.hh | 181 +++--- src/bin/eolian_js/main.cc | 24 ++--- 2 files changed, 178 insertions(+), 27 deletions(-) diff --git a/src/bin/eolian_js/eolian/js/format.hh b/src/bin/eolian_js/eolian/js/format.hh index a07d541..e1f02c3 100644 --- a/src/bin/eolian_js/eolian/js/format.hh +++ b/src/bin/eolian_js/eolian/js/format.hh @@ -11,24 +11,175 @@ namespace eolian { namespace js { namespace format { -std::string generic(std::string const& in) +const char* verbs[] = + { +"add", +"get", +"is", +"del", +"thaw", +"freeze", +"save", +"wait", +"eject", +"raise", +"lower", +"load", +"dup", +"reset", +"unload", +"close", +"set", +"interpolate", +"has", +"grab", +"check", +"find", +"ungrab", +"unset", +"clear", +"pop", +"new", +"peek", +"push", +"update", +"show", +"move", +"hide", +"calculate", +"resize", +"attach", +"pack", +"unpack", +"emit" + }; + +const char* not_verbs[] = + { +"below", +"above", +"name", +"unfreezable", +"value", +"r", +"g", +"b", +"a", +"finalize", +"destructor", +"to", +"circle", +"rect", +"path", +"commands", +"type", +"colorspace" +"op", +"type", +"properties", +"status", +"status", +"relative", +"ptr", +"pair", +"pos", +"end" + }; + +std::string format_method(std::string const& in) { - std::string s = in; - auto i = s.find('_'); - while (i != std::string::npos) + std::string r; + std::string::const_iterator current = in.begin(), last = in.end(); + do { -if (i <= 0 || i+1 >= s.size() || -!::isalnum(s[i-1]) || !::isalnum(s[i+1])) - { - EINA_CXX_DOM_LOG_WARN(eolian::js::domain) << "Entity '" << in - << "' can't be conveniently converted to a JavaScript name."; - return in; - } -s[i+1] = static_cast(::toupper(s[i+1])); -s.erase(i, 1); -i = s.find('_', i); + std::string::const_iterator word_end = std::find(current, last, '_'); + if(word_end == last) + { + bool found_verb = false, found_not_verb = false; + std::string v(current, word_end); + for(const char** verb = ::verbs[0]; verb != ::verbs + [sizeof(format::verbs)/sizeof(format::verbs[0])]; ++verb) + { + if(!std::lexicographical_compare + (current, word_end, *verb, *verb + std::strlen(*verb)) + && !std::lexicographical_compare + (*verb, *verb + std::strlen(*verb), current, word_end)) + { + found_verb = true; + } + } + if(!found_verb) + { + for(const char** not_verb = ::not_verbs[0]; not_verb != ::not_verbs + [sizeof(format::not_verbs)/sizeof(format::not_verbs[0])]; ++not_verb) + { + if(!std::lexicographical_compare +(current, word_end, *not_verb, *not_verb + std::strlen(*not_verb)) +&& !std::lexicographical_compare +(*not_verb, *not_verb + std::strlen(*not_verb), current, word_end)) + { + found_not_verb = true; + } + } + if(!found_not_verb) + EINA_CXX_DOM_LOG_WARN(eolian::js::domain) + << "Last word is NOT a not-verb &
[EGIT] [core/efl] master 01/03: eina-cxx: Fix instantiating eina domain without eina_init
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3a33ef45bd90cc17b484cedddc8b2df3736e015a commit 3a33ef45bd90cc17b484cedddc8b2df3736e015a Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Sun Jan 17 14:07:17 2016 -0200 eina-cxx: Fix instantiating eina domain without eina_init Added eina_init to eina_domain initialization as to force eina_init to happen before initialization of global eina domains. This fixes eolian_js domain in src/bin/eolian_js. --- src/bindings/eina_cxx/eina_log.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bindings/eina_cxx/eina_log.hh b/src/bindings/eina_cxx/eina_log.hh index 77e30e5..5ec0744 100644 --- a/src/bindings/eina_cxx/eina_log.hh +++ b/src/bindings/eina_cxx/eina_log.hh @@ -148,7 +148,7 @@ struct log_domain : _domain_base * @param color Color of the domain name. */ log_domain(char const* name, char const* color = "black") -: _domain( ::eina_log_domain_register(name, color)) +: _domain( (::eina_init(), ::eina_log_domain_register(name, color)) ) { } @@ -158,6 +158,7 @@ struct log_domain : _domain_base ~log_domain() { ::eina_log_domain_unregister(_domain); +::eina_shutdown(); } int domain_raw() const { return _domain; } private: --
[EGIT] [core/efl] master 03/03: eolian-js: Remove replacing commas by underscores in events.
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c9bc6fb4cd903a40f9d4494e70e1feae0c5a4e80 commit c9bc6fb4cd903a40f9d4494e70e1feae0c5a4e80 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Wed Feb 3 21:06:17 2016 -0200 eolian-js: Remove replacing commas by underscores in events. This was done before when the identifier was used to generate methods. Now using strings to denote events this is not needed anymore. --- src/bin/eolian_js/main.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/bin/eolian_js/main.cc b/src/bin/eolian_js/main.cc index b144a45..c8dc1f0 100644 --- a/src/bin/eolian_js/main.cc +++ b/src/bin/eolian_js/main.cc @@ -928,7 +928,6 @@ int main(int argc, char** argv) , last; first != last; ++first) { std::string event_name (::eolian_event_name_get(&*first)); - std::replace(event_name.begin(), event_name.end(), ',', '_'); if (!eolian_event_is_beta(&*first) && event_member_names.find(event_name) == event_member_names.end()) --
[EGIT] [core/efl] master 01/01: eolian-cxx: Fix C++ events with new Eo_Event_Cb signature
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d40b046685263b1a3afec595dc08b91e2dcc9371 commit d40b046685263b1a3afec595dc08b91e2dcc9371 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Mon Feb 29 11:01:04 2016 -0300 eolian-cxx: Fix C++ events with new Eo_Event_Cb signature --- src/bindings/eo_cxx/eo_cxx_interop.hh | 6 ++ src/bindings/eo_cxx/eo_event.hh | 8 src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh | 2 +- src/lib/eolian_cxx/grammar/parameters_generator.hh| 2 +- src/tests/eolian_cxx/callback.c | 6 ++ 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/bindings/eo_cxx/eo_cxx_interop.hh b/src/bindings/eo_cxx/eo_cxx_interop.hh index e0fd2ed..7cd7b35 100644 --- a/src/bindings/eo_cxx/eo_cxx_interop.hh +++ b/src/bindings/eo_cxx/eo_cxx_interop.hh @@ -438,11 +438,9 @@ C get_callback() } template -Eina_Bool free_callback_calback(void* data, Eo* obj EINA_UNUSED -, Eo_Event_Description const* e EINA_UNUSED -, void* event_info EINA_UNUSED) +Eina_Bool free_callback_callback(void* data, ::Eo_Event2 const*) { - delete (F*) data; + delete static_cast<F*>(data); return EO_CALLBACK_CONTINUE; } diff --git a/src/bindings/eo_cxx/eo_event.hh b/src/bindings/eo_cxx/eo_event.hh index 965a2c6..d0b335e 100644 --- a/src/bindings/eo_cxx/eo_event.hh +++ b/src/bindings/eo_cxx/eo_event.hh @@ -137,12 +137,12 @@ Eina_Bool really_call_event(T& wrapper, F& f, Eo_Event_Description const& desc, template Eina_Bool -event_callback(void *data, Eo *obj, Eo_Event_Description const* desc, void *info) +event_callback(void *data, ::Eo_Event2 const* event) { - T wrapper(::eo_ref(obj)); + T wrapper(::eo_ref(event->obj)); F *f = static_cast<F*>(data); - return _detail::really_call_event(wrapper, *f, *desc, info - , std::is_void<decltype((*f)(wrapper, *desc, info))>()); + return _detail::really_call_event(wrapper, *f, *event->desc, event->event_info + , std::is_void<decltype((*f)(wrapper, *event->desc, event->event_info))>()); } } diff --git a/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh b/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh index ab64936..73847a8 100644 --- a/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh +++ b/src/lib/eolian_cxx/grammar/eo_class_constructors_generator.hh @@ -174,7 +174,7 @@ operator<<(std::ostream& out, functors_constructor_methods const& x) d.out << tab(3) << "eo_do(_eoptr," << endl << tab(4) << "eo_event_callback_add(EO_BASE_EVENT_DEL, " -<< "&::efl::eolian::free_callback_calback<" +<< "&::efl::eolian::free_callback_callback<" << parameter_no_ref_type(d.type, d.name) << ">, " << callback_tmp(d.name) << "));" << endl; }) diff --git a/src/lib/eolian_cxx/grammar/parameters_generator.hh b/src/lib/eolian_cxx/grammar/parameters_generator.hh index 3b59ea0..ecda9d8 100644 --- a/src/lib/eolian_cxx/grammar/parameters_generator.hh +++ b/src/lib/eolian_cxx/grammar/parameters_generator.hh @@ -122,7 +122,7 @@ inline std::ostream& operator<<(std::ostream& out, callback_parameter_free_ev_add const& x) { out << "eo_do(" << x._eo_raw_expr - << ", eo_event_callback_add(EO_BASE_EVENT_DEL, &::efl::eolian::free_callback_calback<" + << ", eo_event_callback_add(EO_BASE_EVENT_DEL, &::efl::eolian::free_callback_callback<" << parameter_no_ref_type(x._type, x._name) << ">, " << callback_tmp(x._name) << "));"; return out; diff --git a/src/tests/eolian_cxx/callback.c b/src/tests/eolian_cxx/callback.c index 4ad49ff..c08af89 100644 --- a/src/tests/eolian_cxx/callback.c +++ b/src/tests/eolian_cxx/callback.c @@ -17,11 +17,9 @@ typedef struct _Callback_Data Callback_Data; #define MY_CLASS CALLBACK_CLASS -static Eina_Bool _callback_callback_added(void* data EINA_UNUSED, Eo* obj EINA_UNUSED - , Eo_Event_Description const* e EINA_UNUSED - , void* event_info EINA_UNUSED) +static Eina_Bool _callback_callback_added(void* data EINA_UNUSED, Eo_Event2 const* event) { - Callback_Data* pd = event_info; + Callback_Data* pd = event->event_info; ++pd->callbacks; eo_event_callback_call(CALLBACK_EVENT_CALL_ON_ADD, >callbacks); return EINA_TRUE; --
[EGIT] [core/efl] master 02/03: eolian: add Eolian support for Eina Promises
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=dc954d8dba4538ef6cc70cb28bd6c622031825b5 commit dc954d8dba4538ef6cc70cb28bd6c622031825b5 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Fri Apr 1 22:50:28 2016 -0300 eolian: add Eolian support for Eina Promises Add a promise object to allows Eolian interface to include promises as a way to have asynchronous value return and composibility. The usage is like this in a .eo file: class Foo { methods { bar { params { @inout promise: Promise; } } } } Which will create the following API interface: void foo_bar(Eo* obj, Eina_Promise** promise); and a Eina_Promise_Owner for the implementation, like this: void _foo_bar(Eo* obj, Private_Data* pdata, Eina_Promise_Owner* promise); Signed-off-by: Cedric Bail <ced...@osg.samsung.com> --- src/Makefile_Eolian.am | 13 +--- src/bin/eolian/eo_generator.c | 48 ++--- src/lib/eina/eina_promise.h | 20 src/lib/eolian/eo_lexer.c | 3 +- src/lib/eolian/eo_lexer.h | 9 -- src/lib/eolian/eo_parser.c | 2 +- src/tests/eolian/eolian_generated_promise.c | 46 +++ src/tests/eolian/generated_promise.eo | 42 + 8 files changed, 170 insertions(+), 13 deletions(-) diff --git a/src/Makefile_Eolian.am b/src/Makefile_Eolian.am index 2f4554c..a542127 100644 --- a/src/Makefile_Eolian.am +++ b/src/Makefile_Eolian.am @@ -111,19 +111,24 @@ tests/eolian/eolian_suite tests_eolian_eolian_suite_SOURCES = \ tests/eolian/eolian_parsing.c \ tests/eolian/eolian_generation.c \ +tests/eolian/eolian_generated_promise.c \ tests/eolian/eolian_suite.c \ tests/eolian/eolian_suite.h -tests_eolian_eolian_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ +tests/eolian/tests_eolian_eolian_suite-eolian_generated_promise.$(OBJEXT): tests/eolian/generated_promise.eo.h tests/eolian/generated_promise.eo.c + +CLEANFILES += tests/eolian/generated_promise.eo.h tests/eolian/generated_promise.eo.c + +tests_eolian_eolian_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl -I$(top_builddir)/src/tests/eolian \ -DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eolian\" \ -DPACKAGE_DATA_DIR=\"$(top_srcdir)/src/tests/eolian\" \ -DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \ @CHECK_CFLAGS@ \ -@EOLIAN_CFLAGS@ +@EOLIAN_CFLAGS@ @EO_CFLAGS@ TESTS += tests/eolian/eolian_suite -tests_eolian_eolian_suite_LDADD = @CHECK_LIBS@ @USE_EOLIAN_LIBS@ -tests_eolian_eolian_suite_DEPENDENCIES = @USE_EOLIAN_INTERNAL_LIBS@ +tests_eolian_eolian_suite_LDADD = @CHECK_LIBS@ @USE_EOLIAN_LIBS@ @USE_EO_LIBS@ +tests_eolian_eolian_suite_DEPENDENCIES = @USE_EOLIAN_INTERNAL_LIBS@ @USE_EO_INTERNAL_LIBS@ tests_eolian_eolian_suite.$(OBJEXT): $(EOLIAN_TESTS_EOS_GENERATED) endif diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c index 22efb10..78e8108 100644 --- a/src/bin/eolian/eo_generator.c +++ b/src/bin/eolian/eo_generator.c @@ -311,6 +311,9 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, if (ftype != EOLIAN_PROP_GET && ftype != EOLIAN_PROP_SET) ftype = eolian_function_type_get(funcid); Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET); + Eina_Bool has_promise = EINA_FALSE; + const char* promise_param_name = NULL; + const char* promise_value_type = NULL; Eina_Bool need_implementation = EINA_TRUE; if (!impl_env && eolian_function_is_virtual_pure(funcid, ftype)) need_implementation = EINA_FALSE; @@ -318,6 +321,7 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eina_Strbuf *va_args = eina_strbuf_new(); Eina_Strbuf *params = eina_strbuf_new(); /* only variables names */ Eina_Strbuf *full_params = eina_strbuf_new(); /* variables types + names */ + Eina_Strbuf *impl_full_params = eina_strbuf_new(); /* variables types + names */ Eina_Strbuf *params_init = eina_strbuf_new(); /* init of variables to default */ rettypet = eolian_function_return_type_get(funcid, ftype); @@ -360,6 +364,8 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, eina_strbuf_append_printf(params, "%s", pname); eina_strbuf_append_printf(full_params, ", %s %s%s", ptype, pname, is_empty || is_auto?" EINA_UNUSED":""); +eina_strbuf_append_printf(impl_full_params, ", %s %s%s", + ptype, pname, is_empty || is_auto?" EINA_UNUSED":""); eina_stringshare_del(ptype); } eina_iterator_free(itr); @@ -3
[EGIT] [core/efl] master 01/03: eo: add before and after macro hooks for API generation functions
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=944e11559c34fd342550648c2dd9b3de270d3fa8 commit 944e11559c34fd342550648c2dd9b3de270d3fa8 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Fri Mar 11 17:22:59 2016 -0300 eo: add before and after macro hooks for API generation functions Add two parameters for macros that generate API functions in Eo so that the generation can be customized with macros used by Eolian. Signed-off-by: Cedric Bail <ced...@osg.samsung.com> --- src/bin/eolian/eo_generator.c | 2 +- src/bindings/eo_cxx/eo_inherit.hh | 2 +- src/lib/eo/Eo.h| 36 -- src/tests/eo/access/access_inherit.c | 2 +- src/tests/eo/access/access_simple.c| 2 +- .../composite_objects/composite_objects_simple.c | 132 ++--- src/tests/eo/constructors/constructors_mixin.c | 2 +- src/tests/eo/constructors/constructors_simple.c| 6 +- .../function_overrides_inherit2.c | 4 +- .../function_overrides/function_overrides_simple.c | 8 +- src/tests/eo/interface/interface_interface.c | 2 +- src/tests/eo/interface/interface_interface2.c | 2 +- src/tests/eo/interface/interface_simple.c | 4 +- src/tests/eo/mixin/mixin_mixin.c | 2 +- src/tests/eo/mixin/mixin_simple.c | 4 +- src/tests/eo/signals/signals_simple.c | 2 +- src/tests/eo/suite/eo_test_class_simple.c | 18 +-- src/tests/eo/suite/eo_test_general.c | 4 +- src/tests/eo/suite/eo_test_threaded_calls.c| 6 +- src/tests/eolian/data/class_simple_ref.c | 10 +- src/tests/eolian/data/override_ref.c | 18 +-- 21 files changed, 139 insertions(+), 129 deletions(-) diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c index d718775..22efb10 100644 --- a/src/bin/eolian/eo_generator.c +++ b/src/bin/eolian/eo_generator.c @@ -511,7 +511,7 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eina_Bool ret_is_void = (!rettype || !strcmp(rettype, "void")); _class_func_env_create(class, eolian_function_name_get(funcid), ftype, _env); eina_strbuf_append_printf(eo_func_decl, - "EOAPI EO_%sFUNC_BODY%s%s(%s", + "EOAPI EO_%sFUNC_BODY%s%s(%s, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK", ret_is_void?"VOID_":"", has_params?"V":"", (ftype == EOLIAN_PROP_GET || eolian_function_object_is_const(funcid) || diff --git a/src/bindings/eo_cxx/eo_inherit.hh b/src/bindings/eo_cxx/eo_inherit.hh index a05d11f..a73de37 100644 --- a/src/bindings/eo_cxx/eo_inherit.hh +++ b/src/bindings/eo_cxx/eo_inherit.hh @@ -30,7 +30,7 @@ Eo_Class const* create_class(eina::index_sequence); /// @param this_ The user data to be passed to the resolved function. /// @param args An heterogeneous sequence of arguments. /// -inline EO_VOID_FUNC_BODYV(inherit_constructor, EO_FUNC_CALL(this_), void* this_); +inline EO_VOID_FUNC_BODYV(inherit_constructor, _EO_EMPTY_HOOK, _EO_EMPTY_HOOK, EO_FUNC_CALL(this_), void* this_); } diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index f890b83..4992b21 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -515,60 +515,70 @@ typedef struct _Eo_Call_Cache __FILE__, __LINE__)) return DefRet; \ _Eo_##Name##_func _func_ = (_Eo_##Name##_func) ___call.func; \ +#define _EO_EMPTY_HOOK() + // to define an EAPI function -#define _EO_FUNC_BODY(Name, ObjType, Ret, DefRet) \ +#define _EO_FUNC_BODY(Name, ObjType, BeforeHook, AfterHook, Ret, DefRet) \ Ret \ Name(ObjType obj) \ { \ typedef Ret (*_Eo_##Name##_func)(Eo *, void *obj_data);\ Ret _r;\ EO_FUNC_COMMON_OP(obj, Name, DefRet); \ + BeforeHook() \ _r = _func_(___call.eo_id, ___call.data);\ _eo_call_end(&___call); \ + AfterHook() \ return _r; \ } -#define _EO_VOID_FUNC_BODY(Name, ObjType) \ +#define _EO_VOID_FUNC_BODY(Name, ObjType, BeforeHook, AfterHook)\ void
[EGIT] [core/efl] master 01/04: eina: add promise
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=09eea7bc01dd1381589eeab35e705cbd45820f1e commit 09eea7bc01dd1381589eeab35e705cbd45820f1e Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Fri Apr 1 14:49:58 2016 -0300 eina: add promise Add a promise object that will allows Eolian interface to include promises as a way to have asynchronous value return and composibility. To understand better, let see the coming usage in a .eo file: class Foo { methods { bar { params { @inout promise: Promise; } } } } Which will create the following API interface: void foo_bar(Eo* obj, Eina_Promise** promise); and the equivalent declaration for implementation. However, the API function will instantiate the Promise for the user and the implementer of the class automatically. So the user of this function will treat it as a @out parameter, while the developer of the function will treat it like a @inout parameter. So, the user will use this function like this: Eina_Promise* promise; // No need to instantiate foo_bar(obj, ); eina_promise_then(promise, callback); Signed-off-by: Cedric Bail <ced...@osg.samsung.com> --- src/Makefile_Eina.am| 2 + src/lib/eina/Eina.h | 1 + src/lib/eina/eina_promise.c | 640 src/lib/eina/eina_promise.h | 441 ++ 4 files changed, 1084 insertions(+) diff --git a/src/Makefile_Eina.am b/src/Makefile_Eina.am index 71d0330..da76e0a 100644 --- a/src/Makefile_Eina.am +++ b/src/Makefile_Eina.am @@ -96,6 +96,7 @@ lib/eina/eina_util.h \ lib/eina/eina_quaternion.h \ lib/eina/eina_vector.h \ lib/eina/eina_inline_vector.x \ +lib/eina/eina_promise.h \ lib/eina/eina_bezier.h lib_eina_libeina_la_SOURCES = \ @@ -166,6 +167,7 @@ lib/eina/eina_private.h \ lib/eina/eina_share_common.h \ lib/eina/eina_strbuf_common.h \ lib/eina/eina_quaternion.c \ +lib/eina/eina_promise.c \ lib/eina/eina_bezier.c if HAVE_WIN32 diff --git a/src/lib/eina/Eina.h b/src/lib/eina/Eina.h index db9260e..fe0a4ec 100644 --- a/src/lib/eina/Eina.h +++ b/src/lib/eina/Eina.h @@ -268,6 +268,7 @@ extern "C" { #include #include #include +#include #include #undef EAPI diff --git a/src/lib/eina/eina_promise.c b/src/lib/eina/eina_promise.c new file mode 100644 index 000..9a7c259 --- /dev/null +++ b/src/lib/eina/eina_promise.c @@ -0,0 +1,640 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +#include + +typedef struct _Eina_Promise_Then_Cb _Eina_Promise_Then_Cb; +typedef struct _Eina_Promise_Progress_Cb _Eina_Promise_Progress_Cb; +typedef struct _Eina_Promise_Cancel_Cb _Eina_Promise_Cancel_Cb; +typedef struct _Eina_Promise_Default _Eina_Promise_Default; +typedef struct _Eina_Promise_Default_Owner _Eina_Promise_Default_Owner; +typedef struct _Eina_Promise_Iterator _Eina_Promise_Iterator; +typedef struct _Eina_Promise_Success_Iterator _Eina_Promise_Success_Iterator; + +struct _Eina_Promise_Then_Cb +{ + EINA_INLIST; + + Eina_Promise_Cb callback; + Eina_Promise_Error_Cb error_cb; + void* data; +}; + +struct _Eina_Promise_Progress_Cb +{ + EINA_INLIST; + + Eina_Promise_Progress_Cb callback; + void* data; +}; + +struct _Eina_Promise_Cancel_Cb +{ + EINA_INLIST; + + Eina_Promise_Default_Cancel_Cb callback; + Eina_Promise_Free_Cb free; + void* data; +}; + +struct _Eina_Promise_Default +{ + Eina_Promise vtable; + Eina_Error error; + size_t value_size; + + Eina_Inlist *then_callbacks; + Eina_Inlist *progress_callbacks; + Eina_Inlist *cancel_callbacks; + Eina_Promise_Free_Cb value_free_cb; + + int ref; + + Eina_Bool has_finished : 1; + Eina_Bool has_errored : 1; + Eina_Bool is_cancelled : 1; + Eina_Bool is_manual_then : 1; + Eina_Bool is_first_then : 1; +}; + +struct _Eina_Promise_Default_Owner +{ + Eina_Promise_Owner owner_vtable; + _Eina_Promise_Default promise; + + char value[]; +}; + +#define EINA_PROMISE_GET_OWNER(p) (_Eina_Promise_Default_Owner*)((unsigned char*)p - offsetof(struct _Eina_Promise_Default_Owner, promise)) + +struct _Eina_Promise_Iterator +{ + Eina_Iterator* success_iterator; + struct _Eina_Promise_Success_Iterator + { + Eina_Iterator success_iterator_impl; + unsigned int promise_index; + unsigned int num_promises; + unsigned int promises_finished; + Eina_Promise* promises[]; + } data; +}; + +static void _eina_promise_finish(_Eina_Promise_Default_Owner* promise); +static void _eina_promise_ref(_Eina_Promise_Default* promise); +static void _eina_promise_unref(_Eina_Promise_Default* promise); + +static void _eina_promise_iterator_setup(_Eina_Promise_Iterator* iterator, Eina_Array* promises); + +static void +_eina_promise_then_calls(_Eina_Promise_
[EGIT] [core/efl] master 03/04: ecore: add promise for Ecore_Thread
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=887608e146b8e3952974182b2cc5a7009a711db5 commit 887608e146b8e3952974182b2cc5a7009a711db5 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Fri Apr 1 15:37:42 2016 -0300 ecore: add promise for Ecore_Thread Add ecore_thread_promise_run function that returns a Promise and runs function in another thread which you can set the value on a Eina_Promise_Owner. Eina_Promise* promise; Ecore_Thread* thread = ecore_thread_promise_run ( _heavy, _function, private_data, sizeof(ValueType), ); This calls function_heavy on another thread and returns the Ecore_Thread and a Eina_Promise as an out-parameter. Signed-off-by: Cedric Bail <ced...@osg.samsung.com> --- src/Makefile_Ecore.am| 1 + src/lib/ecore/Ecore_Common.h | 20 + src/lib/ecore/ecore_thread_promise.c | 137 +++ 3 files changed, 158 insertions(+) diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index e5d5efc..084256e 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -66,6 +66,7 @@ lib/ecore/ecore_poller.c \ lib/ecore/ecore_time.c \ lib/ecore/ecore_timer.c \ lib/ecore/ecore_thread.c \ +lib/ecore/ecore_thread_promise.c \ lib/ecore/ecore_throttle.c \ lib/ecore/ecore_exe.c \ lib/ecore/ecore_exe_private.h \ diff --git a/src/lib/ecore/Ecore_Common.h b/src/lib/ecore/Ecore_Common.h index fe2c5c9..711ea7a 100644 --- a/src/lib/ecore/Ecore_Common.h +++ b/src/lib/ecore/Ecore_Common.h @@ -3089,6 +3089,26 @@ typedef Eo Ecore_Job;/**< A job handle */ * @} */ + +#ifdef EFL_BETA_API_SUPPORT + +/* + * @brief Function callback type for when creating Ecore_Thread that + * uses Ecore_Promise for communication + */ +typedef void(*Ecore_Thread_Promise_Cb)(const void* data, Eina_Promise_Owner* promise, Ecore_Thread* thread); + +/* + * @brief Function that instantiates a Ecore_Promise and automatically + * executes func_blocking callback function in another thread + */ +EAPI Ecore_Thread* ecore_thread_promise_run(Ecore_Thread_Promise_Cb func_heavy, +Ecore_Thread_Promise_Cb func_cancel, +const void* data, size_t value_size, +Eina_Promise** promise); + +#endif + #ifdef __cplusplus } #endif diff --git a/src/lib/ecore/ecore_thread_promise.c b/src/lib/ecore/ecore_thread_promise.c new file mode 100644 index 000..dbc3ce9 --- /dev/null +++ b/src/lib/ecore/ecore_thread_promise.c @@ -0,0 +1,137 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include + +#include + +struct _Ecore_Thread_Data +{ + Ecore_Thread_Promise_Cb func_blocking; + Ecore_Thread_Promise_Cb func_cancel; + void const* data; + Ecore_Thread* thread; +}; +typedef struct _Ecore_Thread_Data _Ecore_Thread_Data; + +struct _Ecore_Thread_Promise_Owner +{ + Eina_Promise_Owner owner_vtable; + Eina_Promise_Owner* eina_owner; + _Ecore_Thread_Data thread_callback_data; +}; +typedef struct _Ecore_Thread_Promise_Owner _Ecore_Thread_Promise_Owner; + +static void _ecore_promise_thread_end(void* data, Ecore_Thread* thread EINA_UNUSED) +{ + _Ecore_Thread_Promise_Owner* p = data; + if(!eina_promise_owner_pending_is(p->eina_owner)) + { +eina_promise_owner_default_manual_then_set(p->eina_owner, EINA_FALSE); +eina_promise_owner_default_call_then(p->eina_owner); + } + else + { +eina_promise_owner_default_manual_then_set(p->eina_owner, EINA_FALSE); + } +} + +static void +_ecore_promise_thread_blocking(void* data, Ecore_Thread* thread EINA_UNUSED) +{ + _Ecore_Thread_Promise_Owner* promise = data; + (promise->thread_callback_data.func_blocking)(promise->thread_callback_data.data, >owner_vtable, thread); +} + +static void _ecore_promise_thread_notify(void* data, Ecore_Thread* thread EINA_UNUSED, void* msg_data) +{ + _Ecore_Thread_Promise_Owner* promise = data; + eina_promise_owner_progress(promise->eina_owner, msg_data); +} + +static void _ecore_promise_cancel(void* data, Eina_Promise_Owner* promise EINA_UNUSED) +{ + _Ecore_Thread_Promise_Owner* priv = data; + (priv->thread_callback_data.func_cancel)(priv->thread_callback_data.data, >owner_vtable, +priv->thread_callback_data.thread); +} + +static void _ecore_promise_thread_cancel(void* data, Ecore_Thread* thread EINA_UNUSED) +{ + _Ecore_Thread_Promise_Owner* owner = data; + Eina_Promise* promise; + + promise = eina_promise_owner_promise_get(owner->eina_owner); + eina_promise_cancel(promise); +} + +static void* _ecore_promise_owner_buffer_get(_Ecore_Thread_Promise_Owner* promise) +{ + return promise->eina_owner->buffer_get(promise->eina_owner); +} +static size_t _ecore_
[EGIT] [core/efl] master 02/04: eina: add tests for promises
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1d314828f7bfdcbe220e39ae8b2cc5487e002afb commit 1d314828f7bfdcbe220e39ae8b2cc5487e002afb Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Fri Apr 1 15:30:37 2016 -0300 eina: add tests for promises --- src/Makefile_Eina.am | 1 + src/tests/eina/eina_suite.c| 1 + src/tests/eina/eina_suite.h| 1 + src/tests/eina/eina_test_promise.c | 197 + 4 files changed, 200 insertions(+) diff --git a/src/Makefile_Eina.am b/src/Makefile_Eina.am index da76e0a..fe48662 100644 --- a/src/Makefile_Eina.am +++ b/src/Makefile_Eina.am @@ -325,6 +325,7 @@ tests/eina/eina_test_quad.c \ tests/eina/eina_test_matrix.c \ tests/eina/eina_test_quaternion.c \ tests/eina/eina_test_vector.c \ +tests/eina/eina_test_promise.c \ tests/eina/eina_test_bezier.c tests_eina_eina_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ diff --git a/src/tests/eina/eina_suite.c b/src/tests/eina/eina_suite.c index dc193ee..994d66d 100644 --- a/src/tests/eina/eina_suite.c +++ b/src/tests/eina/eina_suite.c @@ -77,6 +77,7 @@ static const Efl_Test_Case etc[] = { { "Matrix", eina_test_matrix }, { "Quaternion", eina_test_quaternion }, { "Vector", eina_test_vector }, + { "Promise", eina_test_promise }, { "Bezier", eina_test_bezier }, { NULL, NULL } }; diff --git a/src/tests/eina/eina_suite.h b/src/tests/eina/eina_suite.h index 7b05058..5e0a9e8 100644 --- a/src/tests/eina/eina_suite.h +++ b/src/tests/eina/eina_suite.h @@ -69,6 +69,7 @@ void eina_test_quad(TCase *tc); void eina_test_matrix(TCase *tc); void eina_test_quaternion(TCase *tc); void eina_test_vector(TCase *tc); +void eina_test_promise(TCase *tc); void eina_test_bezier(TCase *tc); #endif /* EINA_SUITE_H_ */ diff --git a/src/tests/eina/eina_test_promise.c b/src/tests/eina/eina_test_promise.c new file mode 100644 index 000..898a4ba --- /dev/null +++ b/src/tests/eina/eina_test_promise.c @@ -0,0 +1,197 @@ +/* EINA - EFL data type library + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; + * if not, see <http://www.gnu.org/licenses/>. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include + +#ifdef HAVE_EVIL +# include +#endif + +#include + +#include "eina_suite.h" + +static void +_eina_test_promise_cb(void* data, void* value EINA_UNUSED) +{ + *(Eina_Bool*)data = EINA_TRUE; +} + +START_TEST(eina_test_promise_normal_lifetime) +{ + Eina_Promise_Owner* promise_owner; + Eina_Promise* promise; + Eina_Bool ran = EINA_FALSE; + + eina_init(); + + promise_owner = eina_promise_default_add(0); + + promise = eina_promise_owner_promise_get(promise_owner); + + eina_promise_then(promise, &_eina_test_promise_cb, NULL, ); + eina_promise_owner_value_set(promise_owner, NULL, NULL); + + ck_assert(ran == EINA_TRUE); + + eina_shutdown(); +} +END_TEST + +START_TEST(eina_test_promise_normal_lifetime_all) +{ + Eina_Promise_Owner* promise_owner; + Eina_Promise* first[2] = {NULL, NULL}; + Eina_Promise* promise; + Eina_Bool ran = EINA_FALSE; + + eina_init(); + + promise_owner = eina_promise_default_add(0); + first[0] = eina_promise_owner_promise_get(promise_owner); + promise = eina_promise_all(eina_carray_iterator_new((void**)[0])); + + eina_promise_then(promise, &_eina_test_promise_cb, NULL, ); + eina_promise_owner_value_set(promise_owner, NULL, NULL); + + ck_assert(ran == EINA_TRUE); + + eina_shutdown(); +} +END_TEST + +START_TEST(eina_test_promise_immediate_set_lifetime) +{ + Eina_Promise_Owner* owner; + Eina_Promise* promise; + Eina_Bool ran = EINA_FALSE; + + eina_init(); + + owner = eina_promise_default_add(0); + promise = eina_promise_owner_promise_get(owner); + + eina_promise_owner_value_set(owner, NULL, NULL); + eina_promise_then(promise, &_eina_test_promise_cb, NULL, ); + + ck_assert(ran == EINA_TRUE); + + eina_shutdown(); +} +END_TEST + +START_TEST(eina_test_promise_immediate_set_lifetime_all) +{ + Eina_Promise_Owner* owner; + Eina_Promise* first[2] = {NULL, NULL}; + Eina_Promise* promise; + Eina_Bool ran = EINA_FALSE; + + eina_init(); + + owner = eina_promise_default_add(0); + first[0] = eina_promis
[EGIT] [core/efl] master 04/04: ecore: add tests for promises with ecore_thread_promise_run
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f534fb8943de67a259234a066a7555e9dd131dc6 commit f534fb8943de67a259234a066a7555e9dd131dc6 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Fri Apr 1 22:24:19 2016 -0300 ecore: add tests for promises with ecore_thread_promise_run Signed-off-by: Cedric Bail <ced...@osg.samsung.com> --- src/Makefile_Ecore.am| 1 + src/tests/ecore/ecore_suite.c| 1 + src/tests/ecore/ecore_suite.h| 1 + src/tests/ecore/ecore_test_promise.c | 403 +++ 4 files changed, 406 insertions(+) diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index 084256e..6fad329 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -196,6 +196,7 @@ tests/ecore/ecore_test_animator.c \ tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c \ tests/ecore/ecore_test_ecore_input.c \ tests/ecore/ecore_test_ecore_file.c \ +tests/ecore/ecore_test_promise.c \ tests/ecore/ecore_suite.h tests_ecore_ecore_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ diff --git a/src/tests/ecore/ecore_suite.c b/src/tests/ecore/ecore_suite.c index 787a455..04ad191 100644 --- a/src/tests/ecore/ecore_suite.c +++ b/src/tests/ecore/ecore_suite.c @@ -26,6 +26,7 @@ static const Efl_Test_Case etc[] = { #endif { "Ecore_Input", ecore_test_ecore_input }, { "Ecore_File", ecore_test_ecore_file }, + { "Ecore_Promise", ecore_test_ecore_promise }, { NULL, NULL } }; diff --git a/src/tests/ecore/ecore_suite.h b/src/tests/ecore/ecore_suite.h index f0e4c2a..558e610 100644 --- a/src/tests/ecore/ecore_suite.h +++ b/src/tests/ecore/ecore_suite.h @@ -15,5 +15,6 @@ void ecore_test_ecore_drm(TCase *tc); void ecore_test_ecore_fb(TCase *tc); void ecore_test_ecore_input(TCase *tc); void ecore_test_ecore_file(TCase *tc); +void ecore_test_ecore_promise(TCase *tc); #endif /* _ECORE_SUITE_H */ diff --git a/src/tests/ecore/ecore_test_promise.c b/src/tests/ecore/ecore_test_promise.c new file mode 100644 index 000..7db219c --- /dev/null +++ b/src/tests/ecore/ecore_test_promise.c @@ -0,0 +1,403 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "ecore_suite.h" +#include + +void promised_thread(const void* data EINA_UNUSED, Eina_Promise_Owner* promise, Ecore_Thread* thread EINA_UNUSED) +{ + eina_promise_owner_value_set(promise, NULL, NULL); +} + +void promise_callback(void* data EINA_UNUSED, void* value EINA_UNUSED) +{ + ecore_main_loop_quit(); +} + +START_TEST(ecore_test_promise) +{ + Eina_Promise* promise; + + ecore_init(); + + ecore_thread_promise_run(_thread, NULL, NULL, 0, ); + eina_promise_then(promise, _callback, NULL, NULL); + + ecore_main_loop_begin(); + + ecore_shutdown(); +} +END_TEST + +void promise_error_thread(const void* data EINA_UNUSED, Eina_Promise_Owner* promise, Ecore_Thread* thread EINA_UNUSED) +{ + eina_promise_owner_error_set(promise, EINA_ERROR_OUT_OF_MEMORY); +} + +void promise_error_callback(void* data EINA_UNUSED, Eina_Error const* error) +{ + ck_assert(*error == EINA_ERROR_OUT_OF_MEMORY); + ecore_main_loop_quit(); +} + +START_TEST(ecore_test_promise_error) +{ + Eina_Promise* promise; + + ecore_init(); + + ecore_thread_promise_run(_error_thread, NULL, NULL, 0, ); + eina_promise_then(promise, NULL, _error_callback, NULL); + + ecore_main_loop_begin(); + + ecore_shutdown(); +} +END_TEST + +START_TEST(ecore_test_promise_all) +{ + Eina_Promise* promise; + Eina_Promise* first[2] = { NULL, NULL }; + + ecore_init(); + + ecore_thread_promise_run(_thread, NULL, NULL, 0, [0]); + promise = eina_promise_all(eina_carray_iterator_new((void**)[0])); + eina_promise_then(promise, _callback, NULL, NULL); + + ecore_main_loop_begin(); + + ecore_shutdown(); +} +END_TEST + +void promise_callback2(void* data, void* value EINA_UNUSED) +{ + if(++(*(int*)data) == 2) +ecore_main_loop_quit(); +} + +START_TEST(ecore_test_promise_all_then_then) +{ + Eina_Promise* promise; + Eina_Promise* first[2] = { NULL, NULL }; + + ecore_init(); + + int i = 0; + + ecore_thread_promise_run(_thread, NULL, NULL, 0, [0]); + eina_promise_then(first[0], _callback2, NULL, ); + promise = eina_promise_all(eina_carray_iterator_new((void**)[0])); + eina_promise_then(promise, _callback2, NULL, ); + + ecore_main_loop_begin(); + + ecore_shutdown(); +} +END_TEST + +struct sync_data +{ + Eina_Lock lock; + Eina_Condition cond; + Eina_Bool var; +}; + +void promised_exit_thread(struct sync_data* data EINA_UNUSED, Eina_Promise_Owner* promise, Ecore_Thread* thread EINA_UNUSED) +{ + eina_promise_owner_value_set(promise, NULL, NULL); + eina_lock_take(>lock); + data->var = EINA_TRUE; + eina_condition_broadcast(>cond); + eina_lock_release(>lock); +} + +static void _ecore_test_promise_then_after_thread_finished_main_cb() +{ + Eina_Promi
[EGIT] [core/efl] master 01/01: eolian: Make promise eolian generation use macros for hooks
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=62841aee3ce838321149b329008a54185341f9f8 commit 62841aee3ce838321149b329008a54185341f9f8 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Mon Apr 11 00:53:03 2016 -0300 eolian: Make promise eolian generation use macros for hooks Modify the way hooks are defined and used by promise generation in Eolian in the Eo API. Instead of passing macro names as parameters to EO_FUNC_BODY macros, just re-define the actual hooks when it is needed. --- src/bin/eolian/eo_generator.c | 32 +++-- src/bindings/eo_cxx/eo_inherit.hh | 2 +- src/lib/eina/eina_promise.h| 19 +-- src/lib/eo/Eo.h| 52 src/tests/eo/access/access_inherit.c | 2 +- src/tests/eo/access/access_simple.c| 2 +- .../composite_objects/composite_objects_simple.c | 132 ++--- src/tests/eo/constructors/constructors_mixin.c | 2 +- src/tests/eo/constructors/constructors_simple.c| 6 +- .../function_overrides_inherit2.c | 4 +- .../function_overrides/function_overrides_simple.c | 8 +- src/tests/eo/interface/interface_interface.c | 2 +- src/tests/eo/interface/interface_interface2.c | 2 +- src/tests/eo/interface/interface_simple.c | 4 +- src/tests/eo/mixin/mixin_mixin.c | 2 +- src/tests/eo/mixin/mixin_simple.c | 4 +- src/tests/eo/signals/signals_simple.c | 2 +- src/tests/eo/suite/eo_test_class_simple.c | 18 +-- src/tests/eo/suite/eo_test_general.c | 4 +- src/tests/eo/suite/eo_test_threaded_calls.c| 6 +- src/tests/eolian/data/class_simple_ref.c | 10 +- src/tests/eolian/data/override_ref.c | 16 +-- 22 files changed, 174 insertions(+), 157 deletions(-) diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c index 78e8108..c367027 100644 --- a/src/bin/eolian/eo_generator.c +++ b/src/bin/eolian/eo_generator.c @@ -546,16 +546,6 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, (ftype == EOLIAN_PROP_GET || eolian_function_object_is_const(funcid) || eolian_function_is_class(funcid))?"_CONST":"", func_env.lower_eo_func); -if(has_promise) - { - eina_strbuf_append_printf(eo_func_decl, - ", _EINA_PROMISE_BEFORE_HOOK(%s, %s%s) _EO_EMPTY_HOOK, _EINA_PROMISE_AFTER_HOOK(%s) _EO_EMPTY_HOOK", - promise_value_type, !rettype ? "void" : rettype, - eina_strbuf_string_get(impl_full_params), - promise_param_name); - } -else - eina_strbuf_append_printf(eo_func_decl, ", _EO_EMPTY_HOOK, _EO_EMPTY_HOOK"); if (!ret_is_void) { const char *val_str = NULL; @@ -583,7 +573,29 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, eina_strbuf_string_get(full_params)); } eina_strbuf_append_printf(eo_func_decl, ");"); + +if(has_promise) + { + eina_strbuf_append_printf(fbody, + "#undef _EO_API_BEFORE_HOOK\n#undef _EO_API_AFTER_HOOK\n#undef _EO_API_CALL_HOOK\n" + "#define _EO_API_BEFORE_HOOK _EINA_PROMISE_BEFORE_HOOK(%s, %s%s)\n" + "#define _EO_API_AFTER_HOOK _EINA_PROMISE_AFTER_HOOK(%s)\n" + "#define _EO_API_CALL_HOOK(x) _EINA_PROMISE_CALL_HOOK(EO_FUNC_CALL(%s))\n\n", + promise_value_type, !rettype ? "void" : rettype, + eina_strbuf_string_get(impl_full_params), + promise_param_name, + eina_strbuf_string_get(params)); + } + eina_strbuf_append_printf(fbody, "%s\n", eina_strbuf_string_get(eo_func_decl)); + +if(has_promise) + { + eina_strbuf_append_printf(fbody, "\n#undef _EO_API_BEFORE_HOOK\n#undef _EO_API_AFTER_HOOK\n#undef _EO_API_CALL_HOOK\n" + "#define _EO_API_BEFORE_HOOK\n#define _EO_API_AFTER_HOOK\n" + "#define _EO_API_CALL_HOOK(x) x\n"); + } + eina_strbuf_free(eo_func_decl); } diff --git a/src/bindings/eo_cxx/eo_inherit.hh b/src/bindings/eo_cxx/eo_inherit.hh index a73de37..a05d11f 100644 --- a/src/bindings/eo_cxx/eo_inherit.h
[EGIT] [core/efl] master 02/02: ecore: Create Promises
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f9ba80ab33e0b94dad7ec103e6d261a644f7835f commit f9ba80ab33e0b94dad7ec103e6d261a644f7835f Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Sun Mar 6 17:39:20 2016 -0300 ecore: Create Promises Add a promise object that allows Eolian interface to include promises as a way to have asynchronous value return and composibility. The usage is like this in a .eo file: class Foo { methods { bar { params { promise: Promise; } } } } Which will create the following API interface: void foo_bar(Ecore_Promise** promise); and the equivalent declaration for implementation. However, the API function will instantiate the Promise for the user and the implementer of the class. --- src/Makefile_Ecore.am| 5 +- src/bin/eolian/eo_generator.c| 30 ++- src/lib/ecore/Ecore.h| 1 + src/lib/ecore/ecore_promise.c| 452 +++ src/lib/ecore/ecore_promise.h| 136 +++ src/lib/eo/Eo.h | 63 +++-- src/lib/eolian/eo_lexer.c| 3 +- src/lib/eolian/eo_lexer.h| 6 +- src/lib/eolian/eo_parser.c | 2 +- src/tests/ecore/ecore_suite.c| 1 + src/tests/ecore/ecore_suite.h| 1 + src/tests/ecore/ecore_test_promise.c | 364 12 files changed, 1042 insertions(+), 22 deletions(-) diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am index 49936af..79ac16c 100644 --- a/src/Makefile_Ecore.am +++ b/src/Makefile_Ecore.am @@ -47,7 +47,8 @@ lib/ecore/Ecore.h \ lib/ecore/Ecore_Common.h \ lib/ecore/Ecore_Legacy.h \ lib/ecore/Ecore_Eo.h \ -lib/ecore/Ecore_Getopt.h +lib/ecore/Ecore_Getopt.h \ +lib/ecore/ecore_promise.h nodist_installed_ecoremainheaders_DATA = \ $(ecore_eolian_h) @@ -72,6 +73,7 @@ lib/ecore/ecore_timer.c \ lib/ecore/ecore_thread.c \ lib/ecore/ecore_throttle.c \ lib/ecore/ecore_exe.c \ +lib/ecore/ecore_promise.c \ lib/ecore/ecore_exe_private.h \ lib/ecore/ecore_private.h @@ -199,6 +201,7 @@ tests/ecore/ecore_test_animator.c \ tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c \ tests/ecore/ecore_test_ecore_input.c \ tests/ecore/ecore_test_ecore_file.c \ +tests/ecore/ecore_test_promise.c \ tests/ecore/ecore_suite.h tests_ecore_ecore_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c index a97f2f0..4810658 100644 --- a/src/bin/eolian/eo_generator.c +++ b/src/bin/eolian/eo_generator.c @@ -311,6 +311,9 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, if (ftype != EOLIAN_PROP_GET && ftype != EOLIAN_PROP_SET) ftype = eolian_function_type_get(funcid); Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET); + Eina_Bool has_promise = EINA_FALSE; + const char* promise_param_name = NULL; + const char* promise_value_type = NULL; Eina_Bool need_implementation = EINA_TRUE; if (!impl_env && eolian_function_is_virtual_pure(funcid, ftype)) need_implementation = EINA_FALSE; @@ -337,9 +340,11 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, if (eina_iterator_next(itr, ) && !eina_iterator_next(itr, )) { Eolian_Function_Parameter *param = data; + const char* rettype_str = NULL; rettypet = eolian_parameter_type_get(param); var_as_ret = EINA_TRUE; default_ret_val = eolian_parameter_default_value_get(param); + eina_stringshare_del(rettype_str); } eina_iterator_free(itr); } @@ -375,9 +380,24 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, const char *ptype = eolian_type_c_type_get(ptypet); Eolian_Parameter_Dir pdir = eolian_parameter_direction_get(param); Eina_Bool had_star = !!strchr(ptype, '*'); + + if(!has_promise && !strcmp(ptype, "Ecore_Promise *")) + { + Eina_Iterator* promise_values; + has_promise = EINA_TRUE; + promise_param_name = eina_stringshare_add(pname); + promise_values = eolian_type_subtypes_get(eolian_type_base_type_get(ptypet)); + Eolian_Type* subtype; + if(eina_iterator_next(promise_values, (void**))) + promise_value_type = eolian_type_c_type_get(subtype); + } + if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHO
[EGIT] [core/efl] master 01/02: eolian-cxx: Partial fix for generation without eo_do
vitorsousa pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5c7d78d1040b5bdfe6430e84c90d36ab8bf27064 commit 5c7d78d1040b5bdfe6430e84c90d36ab8bf27064 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Wed Mar 2 11:32:16 2016 -0300 eolian-cxx: Partial fix for generation without eo_do --- src/bindings/eo_cxx/eo_event.hh| 2 +- src/bindings/eo_cxx/eo_inherit_bindings.hh | 4 +- src/bindings/eo_cxx/eo_ops.hh | 56 +++--- .../grammar/eo_class_constructors_generator.hh | 5 +- .../grammar/eo_class_events_generator.hh | 11 ++--- .../grammar/eo_class_functions_generator.hh| 29 +-- .../grammar/inheritance_base_generator.hh | 5 +- src/lib/eolian_cxx/grammar/parameters_generator.hh | 7 +-- src/tests/eolian_cxx/callback.c| 4 +- 9 files changed, 71 insertions(+), 52 deletions(-) diff --git a/src/bindings/eo_cxx/eo_event.hh b/src/bindings/eo_cxx/eo_event.hh index d0b335e..5fa6404 100644 --- a/src/bindings/eo_cxx/eo_event.hh +++ b/src/bindings/eo_cxx/eo_event.hh @@ -95,7 +95,7 @@ struct _event_deleter void operator()() const { -eo_do(_eo, ::eo_event_callback_del(_description, _cb, _data)); +::eo_event_callback_del(_eo, _description, _cb, _data); ::ecore_main_loop_thread_safe_call_async(&_deleter_call, _data); } diff --git a/src/bindings/eo_cxx/eo_inherit_bindings.hh b/src/bindings/eo_cxx/eo_inherit_bindings.hh index cbd2bc8..458036d 100644 --- a/src/bindings/eo_cxx/eo_inherit_bindings.hh +++ b/src/bindings/eo_cxx/eo_inherit_bindings.hh @@ -61,7 +61,9 @@ void inherit_constructor_impl(Eo*, Inherit_Private_Data* self, void* this_) /// @param this_ The user data to be passed to the resolved function. /// @param args An heterogeneous sequence of arguments. /// -inline EOAPI EO_VOID_FUNC_BODYV(inherit_constructor, EO_FUNC_CALL(this_), void* this_); +// inline EOAPI EO_VOID_FUNC_BODYV(inherit_constructor, EO_FUNC_CALL(this_), void* this_); +inline +void inherit_constructor(void* this_); template int initialize_operation_description(detail::tag, void*); diff --git a/src/bindings/eo_cxx/eo_ops.hh b/src/bindings/eo_cxx/eo_ops.hh index 47d920d..46a33c7 100644 --- a/src/bindings/eo_cxx/eo_ops.hh +++ b/src/bindings/eo_cxx/eo_ops.hh @@ -22,112 +22,112 @@ shutdown() } inline Eo* -ref(const Eo *obj) +ref(Eo *obj) { return ::eo_ref(obj); } inline void -unref(const Eo *obj) +unref(Eo *obj) { ::eo_unref(obj); } inline int -ref_get(const Eo *obj) +ref_get(Eo *obj) { return ::eo_ref_get(obj); } inline void -del(const Eo *obj) +del(Eo *obj) { ::eo_del(obj); } inline Eina_Bool -isa(const Eo *obj, const Eo_Class *klass) +isa(Eo *obj, Eo_Class *klass) { return eo_isa(obj, klass); } inline Eo* -add(const Eo_Class *klass, Eo *parent = NULL) +add(Eo_Class *klass, Eo *parent = NULL) { Eo *eo = eo_add_ref(klass, parent); return eo; } inline void -dbg_info_get(const Eo *obj, Eo_Dbg_Info *info) +dbg_info_get(Eo *obj, Eo_Dbg_Info *info) { - eo_do(obj, eo_dbg_info_get(info)); + eo_dbg_info_get(obj, info); } inline void -base_data_set(const Eo *obj, const char *key, const void *data) +base_data_set(Eo *obj, const char *key, const void *data) { - eo_do(obj, eo_key_data_set(key, data)); + eo_key_data_set(obj, key, data); } inline void* -base_data_get(const Eo *obj, const char *key) +base_data_get(Eo *obj, const char *key) { void *data; - eo_do(obj, data = eo_key_data_get(key)); + data = eo_key_data_get(obj, key); return data; } inline void -base_data_del(const Eo *obj, const char *key) +base_data_del(Eo *obj, const char *key) { - eo_do(obj, eo_key_data_del(key)); + eo_key_data_del(obj, key); } inline void -parent_set(const Eo *obj, Eo *parent) +parent_set(Eo *obj, Eo *parent) { - eo_do(obj, eo_parent_set(parent)); + eo_parent_set(obj, parent); } inline Eo* -parent_get(const Eo *obj) +parent_get(Eo *obj) { Eo *parent; - eo_do(obj, parent = eo_parent_get()); + parent = eo_parent_get(obj); return parent; } inline void -event_freeze(const Eo *obj) +event_freeze(Eo *obj) { - eo_do(obj, eo_event_freeze()); + eo_event_freeze(obj); } inline void -event_thaw(const Eo *obj) +event_thaw(Eo *obj) { - eo_do(obj, eo_event_thaw()); + eo_event_thaw(obj); } inline int -event_freeze_get(const Eo *obj) +event_freeze_get(Eo *obj) { int count = -1; - eo_do(obj, count = eo_event_freeze_count_get()); + count = eo_event_freeze_count_get(obj); return count; } inline void -wref_add(const Eo *obj, Eo **wref) +wref_add(Eo *obj, Eo **wref) { - eo_do(obj, eo_wref_add(wref)); + eo_wref_add(obj, wref); } inline void -wref_del(const Eo *obj, Eo **wref) +wref_del(Eo *obj, Eo **wref) { - eo_do(obj, eo_wref_del(wref)); + eo_wref_del(obj, wref); } } } } diff -
[EGIT] [core/efl] master 01/01: eolian-cxx: Remove deprecated examples
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bd5c1f72407c23f87f72556f5a3fe1b2cdcc079d commit bd5c1f72407c23f87f72556f5a3fe1b2cdcc079d Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Thu Apr 21 14:58:40 2016 -0300 eolian-cxx: Remove deprecated examples Removed deprecated and non-compilable examples for C++ using Evas. Users should look into C++ Elementary's examples instead. --- src/examples/eolian_cxx/Makefile.am| 10 +- .../eolian_cxx/eolian_cxx_complex_types_01.cc | 126 - src/examples/eolian_cxx/eolian_cxx_eo_events_01.cc | 109 -- 3 files changed, 1 insertion(+), 244 deletions(-) diff --git a/src/examples/eolian_cxx/Makefile.am b/src/examples/eolian_cxx/Makefile.am index ebc13c2..26e3e4b 100644 --- a/src/examples/eolian_cxx/Makefile.am +++ b/src/examples/eolian_cxx/Makefile.am @@ -97,17 +97,13 @@ SRCS = \ eolian_cxx_simple_01.cc \ eolian_cxx_inherit_01.cc \ eolian_cxx_callbacks_01.cc \ - eolian_cxx_eo_events_01.cc \ - eolian_cxx_complex_types_01.cc \ $(IMPL) EXTRA_PROGRAMS = \ eolian_cxx_simple_01 \ eolian_cxx_simple_01_cxx_impl \ eolian_cxx_inherit_01 \ - eolian_cxx_callbacks_01 \ - eolian_cxx_eo_events_01 \ - eolian_cxx_complex_types_01 + eolian_cxx_callbacks_01 DATA_FILES = Makefile.examples $(ECXX_EXAMPLE_EOS) EXTRA_DIST = $(DATA_FILES) @@ -136,10 +132,6 @@ eolian_cxx_inherit_01.$(OBJEXT): $(GENERATED) eolian_cxx_callbacks_01_SOURCES = eolian_cxx_callbacks_01.cc -eolian_cxx_eo_events_01_SOURCES = eolian_cxx_eo_events_01.cc - -eolian_cxx_complex_types_01_SOURCES = eolian_cxx_complex_types_01.cc - %.eo.hh: %.eo $(AM_V_EOLCXX)$(EOLIAN_CXX) $(EOLIAN_FLAGS) -I${abs_srcdir} -o $@ $< diff --git a/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc b/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc deleted file mode 100644 index 04ed7fe..000 --- a/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc +++ /dev/null @@ -1,126 +0,0 @@ -#include -#include -#include -#include - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include - -#include -#include -#include -#include - -#warning TEST CASE DISABLED: EVAS TYPES NO MORE IN EO API - -#if 0 -#include -#include -#include -#include -#include - -namespace efl { namespace evas { // XXX only while we don't have namespaces in EFL -using ::evas::canvas; -using ::evas::object; -using ::evas::text; -using ::evas::grid; -using ::evas::rectangle; -using ::evas::common_interface; -using ::evas::zoomable_interface; -} } - -namespace { - -// EFL Ecore-Evas doesn't have C++ bindings yet. -Ecore_Evas *ee; -void -_ecore_evas_init() -{ - if (!ee) - { -::ecore_evas_init(); -::evas_init(); -ee = ::ecore_evas_new(NULL, 0, 0, 500, 380, NULL); -::ecore_evas_show(ee); - } -} -void -_ecore_evas_shutdown() -{ - if (ee) - { -::ecore_evas_free(ee); -::ecore_evas_shutdown(); -ee = NULL; - } -} - -} - -void -example_complex_types() -{ - _ecore_evas_init(); - efl::evas::canvas canvas(::eo_ref(::ecore_evas_get(ee))); - - efl::evas::rectangle bg(efl::eo::parent = canvas); - bg.color_set(255, 255, 255, 255); - bg.position_set(0, 0); - bg.size_set(500, 250); - bg.visible_set(true); - - efl::evas::grid grid(efl::eo::parent = canvas); - grid.position_set(0, 0); - grid.object_smart::color_set(0, 0, 0, 255); - grid.size_set(5, 5); - grid.visible_set(true); - - efl::evas::text text1(efl::eo::parent = canvas); - text1.style_set(EVAS_TEXT_STYLE_OUTLINE); - text1.color_set(255, 0, 0, 255); - text1.font_set("DejaVu", 32); - text1.text_set("EFL++ Examples"); - text1.visible_set(true); - int t1w, t1h; - text1.size_get(, ); - grid.pack(text1, 1, 1, t1w, t1h); - - efl::evas::text text2(efl::eo::parent = canvas); - text2.style_set(EVAS_TEXT_STYLE_PLAIN); - text2.color_set(0, 120, 0, 255); - text2.position_set(t1w+50, t1h+50); - text2.font_set("Courier", 16); - std::stringstream ss; - ss << "version " << EFL_VERSION_MAJOR << "." << EFL_VERSION_MINOR; - text2.text_set(ss.str().c_str()); - text2.visible_set(true); - int t2w, t2h; - text2.size_get(, ); - - canvas.render(); - ::ecore_main_loop_begin(); - _ecore_evas_shutdown(); -} - -int main() -{ - efl::eina::eina_init eina_; - efl::eo::eo_init eo_; - efl::ecore::ecore_init ecore_; - - std::cerr << "[+] Running ELF++ example: Complex Types" << std::endl; - example_complex_types(); - - return 0; -} -#else -int main() { abort(); } -#endif - diff --git a/src/examples/eolian_cxx/eolian_cxx_eo_events_01.cc b/src/examples/eolian_cxx/eolian_cxx_eo_events_01.cc deleted file
[EGIT] [core/efl] master 02/02: eio: Fix unused variable warnings in test
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e69f41001baa664b6021362319810e3701e808b5 commit e69f41001baa664b6021362319810e3701e808b5 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Fri Apr 29 17:32:23 2016 -0300 eio: Fix unused variable warnings in test Use of EINA_UNUSED in unused parameters --- src/tests/eio/eio_model_test_file.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/tests/eio/eio_model_test_file.c b/src/tests/eio/eio_model_test_file.c index b09df89..63f7b93 100644 --- a/src/tests/eio/eio_model_test_file.c +++ b/src/tests/eio/eio_model_test_file.c @@ -58,16 +58,18 @@ static Eina_Bool } static void -promise_then_count(Eo* obj EINA_UNUSED, int *total) +promise_then_count(void *data EINA_UNUSED, void *p) { + int *total = p; ck_assert_ptr_ne(total, NULL); printf("efl_model_loaded count %d\n", *total); fflush(stdout); ecore_main_loop_quit(); } static void -promise_then_accessor(Eo* obj EINA_UNUSED, Eina_Accessor **accessor) +promise_then_accessor(void *data EINA_UNUSED, void* p) { + Eina_Accessor **accessor = (Eina_Accessor**)p; ck_assert_ptr_ne(accessor, NULL); printf("efl_model_loaded accessor %p\n", *accessor); fflush(stdout); @@ -82,8 +84,9 @@ promise_then_accessor(Eo* obj EINA_UNUSED, Eina_Accessor **accessor) } static void -promise_then_value(void *user EINA_UNUSED, Eina_Value *value) +promise_then_value(void *user EINA_UNUSED, void *p) { + Eina_Value* value = p; ck_assert_ptr_ne(value, NULL); char *str = eina_value_to_string(value); @@ -95,7 +98,7 @@ promise_then_value(void *user EINA_UNUSED, Eina_Value *value) } static void -error_promise_then(void* data, Eina_Error const* error) +error_promise_then(void* data EINA_UNUSED, Eina_Error const* error EINA_UNUSED) { ck_abort_msg(0, "Error Promise cb"); ecore_main_loop_quit(); @@ -104,8 +107,6 @@ error_promise_then(void* data, Eina_Error const* error) START_TEST(eio_model_test_test_file) { Eo *filemodel = NULL; - Eina_Array *properties_list = NULL; - unsigned int i; memset(, 0, sizeof(struct reqs_t)); --
[EGIT] [core/efl] master 01/02: eolian: Fix promise generation with multiple parameters
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=46903d76f5c5c9fa9834298edff509b4b82a2e5b commit 46903d76f5c5c9fa9834298edff509b4b82a2e5b Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Fri Apr 29 17:14:54 2016 -0300 eolian: Fix promise generation with multiple parameters When generating multiple parameters, they inadvertedly got replaced by __eo_promise. Replacing all arguments to the promise pointer. --- src/bin/eolian/eo_generator.c | 8 +++- src/tests/eolian/generated_promise.eo | 12 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c index 0d80cc2..aa73bcc 100644 --- a/src/bin/eolian/eo_generator.c +++ b/src/bin/eolian/eo_generator.c @@ -383,6 +383,7 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eina_Bool had_star = !!strchr(ptype, '*'); if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM || pdir == EOLIAN_INOUT_PARAM); + if (eina_strbuf_length_get(params)) eina_strbuf_append(params, ", "); if(!has_promise && !strcmp(ptype, "Eina_Promise *") && (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) && pdir == EOLIAN_INOUT_PARAM) @@ -396,18 +397,15 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, promise_value_type = eolian_type_c_type_get(subtype); eina_strbuf_append_printf(impl_full_params, ", Eina_Promise_Owner *%s%s", pname, is_empty && !dflt_value ?" EINA_UNUSED":""); + eina_strbuf_append_printf(params, "__eo_promise"); } else { eina_strbuf_append_printf(impl_full_params, ", %s%s%s%s%s", ptype, had_star?"":" ", add_star?"*":"", pname, is_empty && !dflt_value ?" EINA_UNUSED":""); + eina_strbuf_append_printf(params, "%s", pname); } - if (eina_strbuf_length_get(params)) eina_strbuf_append(params, ", "); - if(has_promise) - eina_strbuf_append_printf(params, "%s", "__eo_promise"); - else - eina_strbuf_append_printf(params, "%s", pname); eina_strbuf_append_printf(full_params, ", %s%s%s%s%s", ptype, had_star?"":" ", add_star?"*":"", pname, is_empty && !dflt_value ?" EINA_UNUSED":""); if (is_auto) diff --git a/src/tests/eolian/generated_promise.eo b/src/tests/eolian/generated_promise.eo index 66c1a68..60fbe3e 100644 --- a/src/tests/eolian/generated_promise.eo +++ b/src/tests/eolian/generated_promise.eo @@ -7,6 +7,18 @@ class Generated_Promise (Eo.Base) @inout promise1: promise*; } } + method_multiple_args_1 { + params { +@inout promise1: promise*; +@in data: void*; + } + } + method_multiple_args_2 { + params { +@in data: void*; +@inout promise1: promise*; + } + } method2 { params { @out promise1: promise*; --
[EGIT] [core/efl] master 01/01: eolian-cxx: Remove .Base requirement
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=535a069a2312acc7b217f8150e6c0cfc469fd5f2 commit 535a069a2312acc7b217f8150e6c0cfc469fd5f2 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Fri Mar 18 17:48:47 2016 -0300 eolian-cxx: Remove .Base requirement Remove requirement that class can't have the same name as another class's namespace. --- src/Makefile_Eolian_Cxx.am | 5 +++ src/bin/eolian_cxx/convert.cc | 6 ++- src/bin/eolian_cxx/eolian_wrappers.hh | 4 +- src/bin/eolian_cxx/type_lookup.hh | 46 +- src/bindings/eo_cxx/eo_private.hh | 8 ++-- src/tests/ecore_audio_cxx/cxx_compile_test.cc | 1 + src/tests/eina_cxx/eina_cxx_test_iterator.cc | 14 +++ src/tests/eolian_cxx/eolian_cxx_test_address_of.cc | 12 +++--- src/tests/eolian_cxx/eolian_cxx_test_binding.cc| 4 +- src/tests/eolian_cxx/eolian_cxx_test_callback.cc | 10 ++--- .../eolian_cxx/eolian_cxx_test_inheritance.cc | 4 +- src/tests/eolian_cxx/eolian_cxx_test_wrapper.cc| 2 +- src/tests/eolian_cxx/name_name.c | 8 src/tests/eolian_cxx/name_name.eo | 4 ++ src/tests/eolian_cxx/name_name_cxx.cc | 6 +++ 15 files changed, 94 insertions(+), 40 deletions(-) diff --git a/src/Makefile_Eolian_Cxx.am b/src/Makefile_Eolian_Cxx.am index 89111c1..c9da3f0 100644 --- a/src/Makefile_Eolian_Cxx.am +++ b/src/Makefile_Eolian_Cxx.am @@ -72,6 +72,8 @@ tests/eolian_cxx/eolian_cxx_test_callback.cc \ tests/eolian_cxx/eolian_cxx_test_address_of.cc \ tests/eolian_cxx/eolian_cxx_test_wrapper.cc \ tests/eolian_cxx/simple.c \ +tests/eolian_cxx/name_name.c \ +tests/eolian_cxx/name_name_cxx.cc \ tests/eolian_cxx/generic.c \ tests/eolian_cxx/eolian_cxx_test_inheritance.cc \ tests/eolian_cxx/eolian_cxx_test_generate.cc \ @@ -91,6 +93,9 @@ tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-b.$(OBJEXT): tests/eolian_cxx tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-c.$(OBJEXT): tests/eolian_cxx/c.eo.c tests/eolian_cxx/c.eo.h tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-d.$(OBJEXT): tests/eolian_cxx/d.eo.c tests/eolian_cxx/d.eo.h +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-name_name.$(OBJEXT): tests/eolian_cxx/name_name.eo.c tests/eolian_cxx/name_name.eo.h +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-name_name_cxx.$(OBJEXT): tests/eolian_cxx/name_name.eo.h tests/eolian_cxx/name_name.eo.hh + CLEANFILES += \ tests/eolian_cxx/callback.eo.hh \ tests/eolian_cxx/callback.eo.c \ diff --git a/src/bin/eolian_cxx/convert.cc b/src/bin/eolian_cxx/convert.cc index 1b42e66..97e88c9 100644 --- a/src/bin/eolian_cxx/convert.cc +++ b/src/bin/eolian_cxx/convert.cc @@ -38,7 +38,7 @@ add_ancestor_recursive(const char* klass_name, std::set& ancestor) return; } - ancestor.insert(class_format_cxx(safe_lower(klass_name))); + ancestor.insert(class_format_cxx(safe_str(klass_name))); Eina_Iterator* inheritances = ::eolian_class_inherits_get(klass); void* curr = 0; @@ -236,7 +236,7 @@ convert_eolian_inheritances(efl::eolian::eo_class& cls, Eolian_Class const& klas EINA_ITERATOR_FOREACH(inheritances, curr) { const char* klass_name = static_cast(curr); -cls.parents.push_back(class_format_cxx(safe_lower(klass_name))); +cls.parents.push_back(class_format_cxx(safe_str(klass_name))); add_ancestor_recursive(klass_name, ancestors); } eina_iterator_free(inheritances); @@ -275,6 +275,8 @@ convert_eolian_class_new(Eolian_Class const& klass) cls.type = class_type(klass); cls.name = class_name(klass); cls.name_space = class_namespace_full(klass); + if(cls.name_space.empty()) + cls.name_space = "nonamespace"; cls.eo_name = class_eo_name(klass); cls.comment = convert_comments_class(klass); return cls; diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh index 0b78020..8be5f9b 100644 --- a/src/bin/eolian_cxx/eolian_wrappers.hh +++ b/src/bin/eolian_cxx/eolian_wrappers.hh @@ -59,7 +59,7 @@ class_base_file(Eolian_Class const& klass) inline std::string class_name(Eolian_Class const& klass) { - return safe_lower(::eolian_class_name_get()); + return ::eolian_class_name_get(); } inline std::string @@ -347,7 +347,7 @@ event_create(Eolian_Class const& klass, const Eolian_Event *event_) event.is_beta = (::eolian_event_is_beta(event_) != EINA_FALSE); event.name = normalize_spaces(name_); event.eo_name = safe_upper - (find_replace(class_full_name(klass), ".", "_") + "_EVENT_" + event.name); + (find_replace(safe_lower(class_full_name(klass)), ".", "_") + "_EVENT_" + event.name
[EGIT] [core/efl] master 01/01: eina: Add progress notify callback feature for Promise Owners
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=236c13df34576c51473463d9f0ef5247810e89e3 commit 236c13df34576c51473463d9f0ef5247810e89e3 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Sun Apr 17 15:47:33 2016 -0300 eina: Add progress notify callback feature for Promise Owners Add a way for users of the promise owner to get notified when a promise progress is registered. Also added a convenience composition function that creates a promise which is fulfilled when another promise has a progress notification. --- src/lib/eina/eina_main.c | 3 ++ src/lib/eina/eina_promise.c| 101 + src/lib/eina/eina_promise.h| 44 src/tests/eina/eina_test_promise.c | 87 4 files changed, 235 insertions(+) diff --git a/src/lib/eina/eina_main.c b/src/lib/eina/eina_main.c index 8c084db..ffa9c98 100644 --- a/src/lib/eina/eina_main.c +++ b/src/lib/eina/eina_main.c @@ -87,6 +87,7 @@ static int _eina_main_count = 0; static int _eina_main_thread_count = 0; #endif static int _eina_log_dom = -1; +void _eina_promise_init(void); #ifdef ERR #undef ERR @@ -299,6 +300,8 @@ eina_init(void) } } + _eina_promise_init(); + eina_cpu_count_internal(); eina_log_timing(_eina_log_dom, EINA_LOG_STATE_STOP, EINA_LOG_STATE_INIT); diff --git a/src/lib/eina/eina_promise.c b/src/lib/eina/eina_promise.c index 459f686..2f83dc4 100644 --- a/src/lib/eina/eina_promise.c +++ b/src/lib/eina/eina_promise.c @@ -9,6 +9,7 @@ typedef struct _Eina_Promise_Then_Cb _Eina_Promise_Then_Cb; typedef struct _Eina_Promise_Progress_Cb _Eina_Promise_Progress_Cb; typedef struct _Eina_Promise_Cancel_Cb _Eina_Promise_Cancel_Cb; +typedef struct _Eina_Promise_Owner_Progress_Notify_Data _Eina_Promise_Owner_Progress_Notify_Data; typedef struct _Eina_Promise_Default _Eina_Promise_Default; typedef struct _Eina_Promise_Default_Owner _Eina_Promise_Default_Owner; typedef struct _Eina_Promise_Iterator _Eina_Promise_Iterator; @@ -40,6 +41,15 @@ struct _Eina_Promise_Cancel_Cb void* data; }; +struct _Eina_Promise_Owner_Progress_Notify_Data +{ + EINA_INLIST; + + Eina_Promise_Progress_Notify_Cb callback; + Eina_Promise_Free_Cb free_cb; + void* data; +}; + struct _Eina_Promise_Default { Eina_Promise vtable; @@ -49,6 +59,7 @@ struct _Eina_Promise_Default Eina_Inlist *then_callbacks; Eina_Inlist *progress_callbacks; Eina_Inlist *cancel_callbacks; + Eina_Inlist *progress_notify_callbacks; Eina_Promise_Free_Cb value_free_cb; int ref; @@ -89,6 +100,21 @@ static void _eina_promise_unref(_Eina_Promise_Default* promise); static void _eina_promise_iterator_setup(_Eina_Promise_Iterator* iterator, Eina_Array* promises); +static void _eina_promise_free_callback_list(Eina_Inlist** list, void(*free_cb)(void* node)) +{ + struct node + { +EINA_INLIST; + } *node; + Eina_Inlist *list2; + + EINA_INLIST_FOREACH_SAFE(*list, list2, node) +{ + free_cb(node); +} + *list = NULL; +} + static void _eina_promise_then_calls(_Eina_Promise_Default_Owner* promise) { @@ -188,6 +214,7 @@ _eina_promise_then(_Eina_Promise_Default* p, Eina_Promise_Cb callback, { _Eina_Promise_Default_Owner* promise; _Eina_Promise_Then_Cb* cb; + _Eina_Promise_Owner_Progress_Notify_Data* notify_data; promise = EINA_PROMISE_GET_OWNER(p); @@ -198,6 +225,12 @@ _eina_promise_then(_Eina_Promise_Default* p, Eina_Promise_Cb callback, cb->data = data; promise->promise.then_callbacks = eina_inlist_append(promise->promise.then_callbacks, EINA_INLIST_GET(cb)); + EINA_INLIST_FOREACH(promise->promise.progress_notify_callbacks, notify_data) + { +(*notify_data->callback)(notify_data->data, >owner_vtable); + } + _eina_promise_free_callback_list(>promise.progress_notify_callbacks, ); + if (!promise->promise.is_first_then) { _eina_promise_ref(p); @@ -263,11 +296,19 @@ static void _eina_promise_progress_cb_add(_Eina_Promise_Default* promise, Eina_Promise_Progress_Cb callback, void* data) { _Eina_Promise_Progress_Cb* cb; + _Eina_Promise_Owner_Progress_Notify_Data* notify_data; + _Eina_Promise_Default_Owner* owner = EINA_PROMISE_GET_OWNER(promise); cb = malloc(sizeof(struct _Eina_Promise_Progress_Cb)); cb->callback = callback; cb->data = data; promise->progress_callbacks = eina_inlist_append(promise->progress_callbacks, EINA_INLIST_GET(cb)); + + EINA_INLIST_FOREACH(owner->promise.progress_notify_callbacks, notify_data) + { + (*notify_data->callback)(notify_data->data, >owner_vtable); + } + _eina_promise_free_callback_list(>promise.progress_notify_callbacks, ); } static void @@ -356,6 +397,20 @@ _eina_promise_owne
[EGIT] [core/efl] master 01/01: eolian-cxx: Added test for the removal of the .Base class requirement
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6124039c8f11936f78c08fd9b8dfd9c128c05ea2 commit 6124039c8f11936f78c08fd9b8dfd9c128c05ea2 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Wed May 4 21:13:48 2016 -0300 eolian-cxx: Added test for the removal of the .Base class requirement Test creates class with the same name as the namespace of another class --- src/Makefile_Eolian_Cxx.am| 19 +++ src/tests/eolian_cxx/name_name.c | 10 ++ src/tests/eolian_cxx/name_name_cxx.cc | 4 src/tests/eolian_cxx/ns_name.eo | 4 src/tests/eolian_cxx/ns_name_other.eo | 4 5 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/Makefile_Eolian_Cxx.am b/src/Makefile_Eolian_Cxx.am index 5132a18..2e08a84 100644 --- a/src/Makefile_Eolian_Cxx.am +++ b/src/Makefile_Eolian_Cxx.am @@ -93,8 +93,8 @@ tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-b.$(OBJEXT): tests/eolian_cxx tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-c.$(OBJEXT): tests/eolian_cxx/c.eo.c tests/eolian_cxx/c.eo.h tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-d.$(OBJEXT): tests/eolian_cxx/d.eo.c tests/eolian_cxx/d.eo.h -tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-name_name.$(OBJEXT): tests/eolian_cxx/name_name.eo.c tests/eolian_cxx/name_name.eo.h -tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-name_name_cxx.$(OBJEXT): tests/eolian_cxx/name_name.eo.h tests/eolian_cxx/name_name.eo.hh +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-name_name.$(OBJEXT): tests/eolian_cxx/name_name.eo.c tests/eolian_cxx/name_name.eo.h tests/eolian_cxx/ns_name.eo.c tests/eolian_cxx/ns_name.eo.h tests/eolian_cxx/ns_name_other.eo.c tests/eolian_cxx/ns_name_other.eo.h +tests/eolian_cxx/tests_eolian_cxx_eolian_cxx_suite-name_name_cxx.$(OBJEXT): tests/eolian_cxx/name_name.eo.h tests/eolian_cxx/name_name.eo.hh tests/eolian_cxx/ns_name.eo.h tests/eolian_cxx/ns_name.eo.hh tests/eolian_cxx/ns_name_other.eo.h tests/eolian_cxx/ns_name_other.eo.hh CLEANFILES += \ tests/eolian_cxx/callback.eo.hh \ @@ -116,7 +116,16 @@ tests/eolian_cxx/d.eo.hh tests/eolian_cxx/d.eo.impl.hh tests/eolian_cxx/d.eo.c t tests/eolian_cxx/name_name.eo.hh \ tests/eolian_cxx/name_name.eo.c \ tests/eolian_cxx/name_name.eo.h \ -tests/eolian_cxx/name_name.eo.impl.hh +tests/eolian_cxx/name_name.eo.impl.hh \ +tests/eolian_cxx/ns_name.eo.hh \ +tests/eolian_cxx/ns_name.eo.c \ +tests/eolian_cxx/ns_name.eo.h \ +tests/eolian_cxx/ns_name.eo.impl.hh \ +tests/eolian_cxx/ns_name_other.eo.hh \ +tests/eolian_cxx/ns_name_other.eo.c \ +tests/eolian_cxx/ns_name_other.eo.h \ +tests/eolian_cxx/ns_name_other.eo.impl.hh + tests_eolian_cxx_eolian_cxx_suite_CXXFLAGS = \ -I$(top_builddir)/src/lib/efl \ @@ -147,7 +156,9 @@ tests/eolian_cxx/a.eo \ tests/eolian_cxx/b.eo \ tests/eolian_cxx/c.eo \ tests/eolian_cxx/d.eo \ -tests/eolian_cxx/name_name.eo +tests/eolian_cxx/name_name.eo \ +tests/eolian_cxx/ns_name.eo \ +tests/eolian_cxx/ns_name_other.eo include Makefile_Eolian_Cxx_Helper.am diff --git a/src/tests/eolian_cxx/name_name.c b/src/tests/eolian_cxx/name_name.c index 50b65d9..a4e9c06 100644 --- a/src/tests/eolian_cxx/name_name.c +++ b/src/tests/eolian_cxx/name_name.c @@ -4,5 +4,15 @@ struct Name_Name_Data {}; typedef struct Name_Name_Data Name_Name_Data; +struct Ns_Name_Data {}; +typedef struct Ns_Name_Data Ns_Name_Data; + +struct Ns_Name_Other_Data {}; +typedef struct Ns_Name_Other_Data Ns_Name_Other_Data; + #include "name_name.eo.h" #include "name_name.eo.c" +#include "ns_name.eo.h" +#include "ns_name.eo.c" +#include "ns_name_other.eo.h" +#include "ns_name_other.eo.c" diff --git a/src/tests/eolian_cxx/name_name_cxx.cc b/src/tests/eolian_cxx/name_name_cxx.cc index 9908754..d5669bc 100644 --- a/src/tests/eolian_cxx/name_name_cxx.cc +++ b/src/tests/eolian_cxx/name_name_cxx.cc @@ -3,4 +3,8 @@ #include "name_name.eo.h" #include "name_name.eo.hh" +#include "ns_name.eo.h" +#include "ns_name.eo.hh" +#include "ns_name_other.eo.h" +#include "ns_name_other.eo.hh" diff --git a/src/tests/eolian_cxx/ns_name.eo b/src/tests/eolian_cxx/ns_name.eo new file mode 100644 index 000..50ab890 --- /dev/null +++ b/src/tests/eolian_cxx/ns_name.eo @@ -0,0 +1,4 @@ +class Ns.Name { + legacy_prefix: null; +} + diff --git a/src/tests/eolian_cxx/ns_name_other.eo b/src/tests/eolian_cxx/ns_name_other.eo new file mode 100644 index 000..64a563f --- /dev/null +++ b/src/tests/eolian_cxx/ns_name_other.eo @@ -0,0 +1,4 @@ +class Ns.Name.Other { + legacy_prefix: null; +} + --
[EGIT] [core/efl] master 16/16: eolian: Add inarray and inlist to source generation
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=66eb8ddfebf65f944a44f8b8871a8628757fe74e commit 66eb8ddfebf65f944a44f8b8871a8628757fe74e Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Mon Dec 4 20:32:06 2017 -0200 eolian: Add inarray and inlist to source generation --- src/bin/eolian/sources.c | 28 ++-- src/tests/efl_mono/test_testing.eo | 4 ++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c index 2ba900c9bd..a8a349fa86 100644 --- a/src/bin/eolian/sources.c +++ b/src/bin/eolian/sources.c @@ -189,14 +189,20 @@ _generate_iterative_free(Eina_Strbuf **buf, const Eolian_Type *type, const Eolia iterator_header = eina_strbuf_new(); iter_param = eina_strbuf_new(); + Eolian_Type_Builtin_Type t = eolian_type_builtin_type_get(type); + eina_strbuf_append_printf(iter_param, "%s_iter", eolian_parameter_name_get(parameter)); //generate the field definition eina_strbuf_append_printf(*buf, " %s", eolian_type_c_type_get(inner_type, EOLIAN_C_TYPE_DEFAULT)); + if(t == EOLIAN_TYPE_BUILTIN_INARRAY + || t == EOLIAN_TYPE_BUILTIN_INLIST) + { + eina_strbuf_append(*buf, "*"); + } eina_strbuf_append_buffer(*buf, iter_param); eina_strbuf_append(*buf, ";\n"); - Eolian_Type_Builtin_Type t = eolian_type_builtin_type_get(type); if (t == EOLIAN_TYPE_BUILTIN_LIST) { @@ -207,6 +213,24 @@ _generate_iterative_free(Eina_Strbuf **buf, const Eolian_Type *type, const Eolia eina_strbuf_append(*buf, ")\n"); _generate_loop_content(buf, inner_type, iter_param); } + else if (t == EOLIAN_TYPE_BUILTIN_INARRAY) + { +eina_strbuf_append_printf(*buf, " EINA_INARRAY_FOREACH("); +eina_strbuf_append_buffer(*buf, param); +eina_strbuf_append_char(*buf, ','); +eina_strbuf_append_buffer(*buf, iter_param); +eina_strbuf_append(*buf, ")\n"); +_generate_loop_content(buf, inner_type, iter_param); + } + else if (t == EOLIAN_TYPE_BUILTIN_INLIST) + { +eina_strbuf_append_printf(*buf, " EINA_INLIST_FREE("); +eina_strbuf_append_buffer(*buf, param); +eina_strbuf_append_char(*buf, ','); +eina_strbuf_append_buffer(*buf, iter_param); +eina_strbuf_append(*buf, ")\n"); +_generate_loop_content(buf, inner_type, iter_param); + } else if (t == EOLIAN_TYPE_BUILTIN_ITERATOR) { eina_strbuf_append_printf(*buf, " EINA_ITERATOR_FOREACH("); @@ -237,7 +261,7 @@ _generate_iterative_free(Eina_Strbuf **buf, const Eolian_Type *type, const Eolia } else { -printf("Error, container unknown?!\n"); +printf("Error, container unknown?! %d\n", (int)t); } eina_strbuf_free(iterator_header); diff --git a/src/tests/efl_mono/test_testing.eo b/src/tests/efl_mono/test_testing.eo index db6f13bcf2..bf13a57283 100644 --- a/src/tests/efl_mono/test_testing.eo +++ b/src/tests/efl_mono/test_testing.eo @@ -370,7 +370,7 @@ class Test.Testing (Efl.Object) { /* Integer */ eina_inarray_int_in { params { -@in arr: inarray; +@in arr: inarray<ptr(int)>; } return: bool; } @@ -387,7 +387,7 @@ class Test.Testing (Efl.Object) { eina_inarray_int_out { params { -@out arr: inarray; +@out arr: inarray<ptr(int)>; } return: bool; } --
[EGIT] [core/efl] master 01/04: efl-cxx: Fixes in automake Makefiles
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f86906587359b890142d467e0b9641ca93570f6e commit f86906587359b890142d467e0b9641ca93570f6e Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Wed Dec 13 21:38:35 2017 -0200 efl-cxx: Fixes in automake Makefiles --- src/Makefile_Cxx.am | 2 +- src/examples/eolian_cxx/Makefile.am | 6 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Makefile_Cxx.am b/src/Makefile_Cxx.am index ab4b55204b..8f929d2f8e 100644 --- a/src/Makefile_Cxx.am +++ b/src/Makefile_Cxx.am @@ -105,7 +105,7 @@ nodist_installed_elementarycxxmainheaders_DATA = $(elementary_eolian_cxx_hh) $(e lib/elementary/Elementary.eo.hh nodist_installed_eldbuscxxmainheaders_DATA = $(eldbus_eolian_cxx_hh) $(eldbus_eolian_cxx_impl_hh) lib/eldbus/Eldbus_Model.eo.hh -CLEANFILES = $(eo_eolian_cxx_hh) $(eo_eolian_cxx_impl_hh) +CLEANFILES += $(eo_eolian_cxx_hh) $(eo_eolian_cxx_impl_hh) ### Elementary C++ diff --git a/src/examples/eolian_cxx/Makefile.am b/src/examples/eolian_cxx/Makefile.am index a908170856..fc9ec9045d 100644 --- a/src/examples/eolian_cxx/Makefile.am +++ b/src/examples/eolian_cxx/Makefile.am @@ -78,13 +78,9 @@ IMPL = \ SRCS = \ eolian_cxx_simple_01.cc \ eolian_cxx_callbacks_01.cc \ - $(IMPL) - -ECXX_EXAMPLE_EOS = \ ns_colourable.eo \ ns_colourablesquare.eo - -dist_example_eos_SOURCES = $(ECXX_EXAMPLE_EOS) + $(IMPL) if HAVE_CXX GENERATED = \ --
[EGIT] [core/efl] master 03/04: efl-mono: Add workaround for efl_ui_list
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=61af82f21de7a4e221df4e36d5fc84f6fa1dada4 commit 61af82f21de7a4e221df4e36d5fc84f6fa1dada4 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Thu Dec 14 18:04:14 2017 -0200 efl-mono: Add workaround for efl_ui_list Efl_Ui_List doesn't properly define, as it should, the class Efl_Ui_List_SegArray. This workaround allows the mono binding compilation in spite of this. --- src/bin/eolian_mono/eolian/mono/function_blacklist.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/eolian_mono/eolian/mono/function_blacklist.hh b/src/bin/eolian_mono/eolian/mono/function_blacklist.hh index 314235b5dc..b2d712c6ac 100644 --- a/src/bin/eolian_mono/eolian/mono/function_blacklist.hh +++ b/src/bin/eolian_mono/eolian/mono/function_blacklist.hh @@ -40,7 +40,10 @@ inline bool is_function_blacklisted(std::string const& c_name) || c_name == "efl_access_image_description_set" || c_name == "efl_access_component_layer_get" // duplicated signature || c_name == "efl_access_component_alpha_get" +|| c_name == "efl_access_component_size_get" || c_name == "efl_ui_spin_button_loop_get" +|| c_name == "efl_ui_list_model_size_get" +|| c_name == "efl_ui_list_relayout_layout_do" ; } --
[EGIT] [core/efl] master 04/04: eolian-cxx: Fix distributing eo files in examples
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0322ff14a6c8d037460085e16a0746e059c52dd4 commit 0322ff14a6c8d037460085e16a0746e059c52dd4 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Thu Dec 14 18:19:54 2017 -0200 eolian-cxx: Fix distributing eo files in examples --- src/examples/eolian_cxx/Makefile.am | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/examples/eolian_cxx/Makefile.am b/src/examples/eolian_cxx/Makefile.am index fc9ec9045d..16cddb3410 100644 --- a/src/examples/eolian_cxx/Makefile.am +++ b/src/examples/eolian_cxx/Makefile.am @@ -79,7 +79,7 @@ SRCS = \ eolian_cxx_simple_01.cc \ eolian_cxx_callbacks_01.cc \ ns_colourable.eo \ - ns_colourablesquare.eo + ns_colourablesquare.eo \ $(IMPL) if HAVE_CXX @@ -121,7 +121,9 @@ eolian_cxx_callbacks_01_SOURCES = eolian_cxx_callbacks_01.cc endif DATA_FILES = Makefile.examples $(ECXX_EXAMPLE_EOS) -EXTRA_DIST = $(DATA_FILES) +EXTRA_DIST = $(DATA_FILES) \ +ns_colourable.eo \ +ns_colourablesquare.eo %.eo.hh: %.eo $(AM_V_EOLCXX)$(EOLIAN_CXX) $(EOLIAN_FLAGS) -I${abs_srcdir} -o $@ $< --
[EGIT] [core/efl] master 01/01: efl-mono: Fix installation in out-of-tree compilation
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fe8c5f8269b06165a7c7b1da9a956ef0839bad52 commit fe8c5f8269b06165a7c7b1da9a956ef0839bad52 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Fri Dec 15 01:17:28 2017 -0200 efl-mono: Fix installation in out-of-tree compilation --- src/Makefile_Efl_Mono.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am index 247f053370..72a1916515 100644 --- a/src/Makefile_Efl_Mono.am +++ b/src/Makefile_Efl_Mono.am @@ -202,8 +202,9 @@ endif EFL_INSTALL_EXEC_HOOK += \ $(MKDIR_P) $(efl_mono_dll_dest); \ -cp -f $(srcdir)/lib/efl_mono/libefl_mono.dll $(efl_mono_dll_dest)/libefl_mono.dll; \ -cp -f $(srcdir)/bindings/mono/efl_mono/efl_libs.csv $(DESTDIR)$(datadir)/efl_mono/efl_libs.csv; +cp -f $(builddir)/lib/efl_mono/libefl_mono.dll $(efl_mono_dll_dest)/libefl_mono.dll; \ +$(MKDIR_P) $(DESTDIR)$(datadir)/efl_mono; \ +cp -f $(builddir)/bindings/mono/efl_mono/efl_libs.csv $(DESTDIR)$(datadir)/efl_mono/efl_libs.csv; all-local: lib/efl_mono/libefl_mono.dll --
[EGIT] [core/efl] master 01/01: elm: Fix typo in copy and paste in efl_ui_list precise layouter
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9a120e3e7268b0eb398a2302f14a4fd5a4412f3f commit 9a120e3e7268b0eb398a2302f14a4fd5a4412f3f Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Thu Dec 14 22:23:07 2017 -0200 elm: Fix typo in copy and paste in efl_ui_list precise layouter Fix comparison between height and width instead of width and width. CID 1383711 --- src/lib/elementary/efl_ui_list_precise_layouter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_list_precise_layouter.c b/src/lib/elementary/efl_ui_list_precise_layouter.c index ce66239be3..692317005f 100644 --- a/src/lib/elementary/efl_ui_list_precise_layouter.c +++ b/src/lib/elementary/efl_ui_list_precise_layouter.c @@ -129,7 +129,7 @@ _item_min_calc(Efl_Ui_List_Precise_Layouter_Data *pd, Efl_Ui_List_LayoutItem* it min.w += pad[0] + pad[1]; min.h += pad[2] + pad[3]; - if (item->min.h == min.h && item->min.w == min.h) + if (item->min.h == min.h && item->min.w == min.w) return; pd->min.h += min.h - item->min.h; --
[EGIT] [core/efl] master 01/02: elementary: Add efl_ui_list widget
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fd92dec358bf6d98b4b334e938140049b6f5f12e commit fd92dec358bf6d98b4b334e938140049b6f5f12e Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Tue Dec 12 22:59:48 2017 -0200 elementary: Add efl_ui_list widget --- config/default/base.src.in | 269 + config/mobile/base.src.in | 269 + config/standard/base.src.in| 269 + data/elementary/themes/Makefile.am | 1 + data/elementary/themes/default.edc | 1 + data/elementary/themes/edc/efl/list.edc| 8 + src/Makefile_Elementary.am | 15 +- src/examples/elementary/Makefile.am| 25 +- src/examples/elementary/efl_ui_list_example.edc| 280 + src/examples/elementary/efl_ui_list_example_1.c| 111 src/examples/elementary/efl_ui_list_example_2.c| 74 +++ src/examples/elementary/efl_ui_list_example_3.c| 329 ++ src/examples/elementary/layout_model_connect.c | 1 - src/lib/elementary/Elementary.h| 8 + src/lib/elementary/efl_ui_layout.c | 32 +- src/lib/elementary/efl_ui_layout_factory.c | 127 src/lib/elementary/efl_ui_layout_factory.eo| 22 + src/lib/elementary/efl_ui_list.c | 668 + src/lib/elementary/efl_ui_list.eo | 108 src/lib/elementary/efl_ui_list_model.eo| 48 ++ src/lib/elementary/efl_ui_list_pan.eo | 16 + src/lib/elementary/efl_ui_list_precise_layouter.c | 659 src/lib/elementary/efl_ui_list_precise_layouter.eo | 8 + src/lib/elementary/efl_ui_list_private.h | 132 src/lib/elementary/efl_ui_list_relayout.eo | 23 + src/lib/elementary/efl_ui_list_segarray.c | 427 + src/lib/elementary/efl_ui_list_segarray.h | 42 ++ src/lib/elementary/efl_ui_list_types.eot | 9 + src/lib/elementary/elm_widget_layout.h | 2 +- 29 files changed, 3973 insertions(+), 10 deletions(-) diff --git a/config/default/base.src.in b/config/default/base.src.in index 10d7d0e6a5..7e9444c10c 100644 --- a/config/default/base.src.in +++ b/config/default/base.src.in @@ -2796,5 +2796,274 @@ group "Elm_Config" struct { } } } + group "Elm_Config_Bindings_Widget" struct { +value "name" string: "Efl.Ui.List"; +group "key_bindings" list { + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "key" string: "Left"; + value "action" string: "move"; + value "params" string: "left"; + group "modifiers" list { + group "Elm_Config_Binding_Modifier" struct { +value "mod" string: "Shift"; +value "flag" uchar: 0; + } + } + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "key" string: "Left"; + value "action" string: "move"; + value "params" string: "left_multi"; + group "modifiers" list { + group "Elm_Config_Binding_Modifier" struct { +value "mod" string: "Shift"; +value "flag" uchar: 1; + } + } + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "key" string: "KP_Left"; + value "action" string: "move"; + value "params" string: "left"; + group "modifiers" list { + group "Elm_Config_Binding_Modifier" struct { +value "mod" string: "Shift"; +value "flag" uchar: 0; + } + } + } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "key" string: "KP_Left"; + value "action" string: "move"; + value "params" string: "left_multi"; + group "modifiers" list { + group "Elm_Config_Binding_Modifier" struct { +v
[EGIT] [core/efl] master 02/02: efl-cxx: Fixes to make dist
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e67d6484b8b5dd75904b6d2368663eab4886229b commit e67d6484b8b5dd75904b6d2368663eab4886229b Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Wed Dec 13 12:36:21 2017 -0200 efl-cxx: Fixes to make dist --- Makefile.am | 2 +- configure.ac | 2 +- src/Makefile.am | 15 +- src/Makefile_Cxx.am | 176 +++--- src/Makefile_Ecore.am | 2 +- src/Makefile_Edje.am | 2 +- src/Makefile_Efl.am | 2 +- src/Makefile_Efl_Mono.am | 91 +-- src/Makefile_Eldbus.am| 2 +- src/Makefile_Elementary.am| 2 +- src/Makefile_Eo.am| 2 +- src/Makefile_Eolian_Cxx.am| 9 +- src/Makefile_Evas.am | 2 +- src/examples/efl_mono/Makefile.am | 15 +- src/examples/eina_cxx/Makefile.am | 4 + src/examples/elementary/Makefile.am | 8 +- src/examples/eolian_cxx/Makefile.am | 48 +++--- src/examples/evas/Makefile.am | 2 +- src/lib/elementary/efl_ui_list.c | 18 +-- src/lib/elementary/efl_ui_list_precise_layouter.c | 3 +- src/lib/elementary/efl_ui_list_segarray.c | 1 - 21 files changed, 202 insertions(+), 206 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8fd7776ff6..35a0315270 100644 --- a/Makefile.am +++ b/Makefile.am @@ -162,7 +162,7 @@ pc/elocation.pc \ pc/elementary.pc \ pc/efl-ui.pc -if HAVE_CXX11 +if HAVE_CXX pkgconfig_DATA += \ pc/eina-cxx.pc \ pc/evas-cxx.pc \ diff --git a/configure.ac b/configure.ac index 69ea681848..b5ce7ccc27 100644 --- a/configure.ac +++ b/configure.ac @@ -1136,7 +1136,7 @@ else have_cxx11="no" fi -AM_CONDITIONAL([HAVE_CXX11], [test "x${have_cxx11}" = "xyes"]) +AM_CONDITIONAL([HAVE_CXX], [test "x${have_cxx11}" = "xyes"]) EFL_INTERNAL_DEPEND_PKG([EINA_CXX], [Eina]) EFL_ADD_CFLAGS([EINA_CXX], [${EFL_PTHREAD_CFLAGS}]) diff --git a/src/Makefile.am b/src/Makefile.am index 68e66b5ef1..b87c91c561 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -126,24 +126,15 @@ examples/emotion \ examples/emile \ examples/elocation \ examples/ethumb_client \ +examples/eina_cxx \ +examples/eolian_cxx \ +examples/efl_mono \ examples/elementary if HAVE_ELUA EXAMPLES_SUBDIRS += examples/elua endif -EXAMPLES_CXX = \ -examples/eina_cxx \ -examples/eolian_cxx - -if HAVE_CXX11 -EXAMPLES_SUBDIRS += $(EXAMPLES_CXX) -endif - -if HAVE_CSHARP -EXAMPLES_SUBDIRS += examples/efl_mono -endif - if ALWAYS_BUILD_EXAMPLES SUBDIRS += . $(EXAMPLES_SUBDIRS) endif diff --git a/src/Makefile_Cxx.am b/src/Makefile_Cxx.am index bc9f3749f7..ab4b55204b 100644 --- a/src/Makefile_Cxx.am +++ b/src/Makefile_Cxx.am @@ -1,10 +1,13 @@ -if HAVE_CXX11 ### Eo C++ -CLEANFILES += $(eo_eolian_cxx_hh) $(eo_eolian_cxx_impl_hh) +installed_eetcxxheadersdir = $(includedir)/eet-cxx-@VMAJ@ +dist_installed_eetcxxheaders_DATA = \ +bindings/cxx/eet_cxx/eet_composite.hh \ +bindings/cxx/eet_cxx/eet_register.hh \ +bindings/cxx/eet_cxx/eet_type.hh \ +bindings/cxx/eet_cxx/Eet.hh installed_eocxxheadersdir = $(includedir)/eo-cxx-@VMAJ@/ -nodist_installed_eocxxheaders_DATA = $(eo_eolian_cxx_hh) $(eo_eolian_cxx_impl_hh) dist_installed_eocxxheaders_DATA = \ bindings/cxx/eo_cxx/eo_concrete.hh \ bindings/cxx/eo_cxx/eo_cxx_interop.hh \ @@ -19,54 +22,16 @@ bindings/cxx/eo_cxx/eo_promise_meta.hh \ bindings/cxx/eo_cxx/eo_private.hh \ bindings/cxx/eo_cxx/efl_object_impl.hh -### Elementary C++ -installed_elementarycxxmainheadersdir = $(includedir)/elementary-cxx-@VMAJ@/ -nodist_installed_elementarycxxmainheaders_DATA = $(elementary_eolian_cxx_hh) $(elementary_eolian_cxx_impl_hh) \ -lib/elementary/Elementary.eo.hh -dist_installed_elementarycxxmainheaders_DATA = lib/elementary/Elementary.hh - -lib/elementary/Elementary.eo.hh: $(elm_public_eolian_files) $(_EOLIAN_CXX_DEP) - $(AM_V_EOLCXX) \ - $(MKDIR_P) $(dir $@); \ - $(EOLIAN_CXX) $(EOLIAN_FLAGS) -m -o $@ $(filter %.eo, $^) - -CLEANFILES += $(elementary_eolian_cxx_hh) $(elementary_eolian_cxx_impl_hh) lib/elementary/Elementary.eo.hh - -### Efl C++ installed_eflcxxmainheadersdir = $(includedir)/efl-cxx-@VMAJ@/ -nodist_installed_eflcxxmainheaders_DATA = $(efl_eolian_cxx_hh) $(efl_eolian_cxx_impl_hh) lib/efl/Efl.eo.hh dist_installed_eflcxxmainheaders_DATA = lib/efl/Efl.hh lib/efl/cxx/efl_part_impl.hh -lib/efl/Efl.eo.hh: $(efl_eolian_files) $(_EOLIAN_CXX_DEP) - $(AM_V_EOLCXX) \ - $(MKDIR_P) $(dir $@); \ - $(EOLIAN_CXX) $
[EGIT] [core/efl] master 01/01: efl-mono: Fix automake files in C# binding search with buggy mono version
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ff9293827f0770d9af54b2008a74fde6e083d383 commit ff9293827f0770d9af54b2008a74fde6e083d383 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Mon Dec 11 12:06:54 2017 -0200 efl-mono: Fix automake files in C# binding search with buggy mono version --- src/Makefile_Efl_Mono.am | 25 - src/examples/efl_mono/Makefile.am | 31 +-- src/tests/efl_mono/mono_test_driver.sh | 2 +- 3 files changed, 38 insertions(+), 20 deletions(-) diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am index 7b90e1834f..adbf893233 100644 --- a/src/Makefile_Efl_Mono.am +++ b/src/Makefile_Efl_Mono.am @@ -180,8 +180,8 @@ lib_efl_mono_libefl_mono_dll_SOURCES = \ $(efl_eldbus_mono_files) \ $(efl_ecore_evas_mono_files) -lib/efl_mono/libefl_mono.dll$(EXEEXT): $(lib_efl_mono_libefl_mono_dll_SOURCES) lib/efl_mono/$(am__dirstamp) $(efl_eolian_mono_files) - @rm -f lib/efl_mono/libefl_mono.dll$(EXEEXT) +lib/efl_mono/libefl_mono.dll: $(lib_efl_mono_libefl_mono_dll_SOURCES) lib/efl_mono/$(am__dirstamp) $(efl_eolian_mono_files) lib/efl_mono/libefl_mono.dll.config + @rm -f lib/efl_mono/libefl_mono.dll $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -out:$@ -t:library $(filter %.cs, $(^)) ### MSBuild @@ -319,9 +319,9 @@ tests/efl_mono/libefl_mono_native_test.c: tests/efl_mono/test_testing.eo.h tests efl_mono_test_eolian_mono_files = tests/efl_mono/test_testing.eo.cs \ tests/efl_mono/test_numberwrapper.eo.cs -tests/efl_mono/libefl_mono_test.dll$(EXEEXT): $(efl_mono_test_eolian_mono_files) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll$(EXEEXT) tests/efl_mono/libefl_mono_native_test.la - @rm -f tests/efl_mono/libefl_mono_test.dll$(EXEEXT) - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_builddir)/lib/efl_mono/libefl_mono.dll$(EXEEXT) -out:$@ -t:library $(filter %.cs, $(^)) +tests/efl_mono/libefl_mono_test.dll: $(efl_mono_test_eolian_mono_files) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll tests/efl_mono/libefl_mono_native_test.la + @rm -f tests/efl_mono/libefl_mono_test.dll + $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_builddir)/lib/efl_mono/libefl_mono.dll -out:$@ -t:library $(filter %.cs, $(^)) # C Sharp test executable AM_TESTS_ENVIRONMENT += MONO='mono'; export MONO; @@ -332,7 +332,6 @@ AM_TESTS_ENVIRONMENT += PATH='$(PATH):$(TEST_PATHS):$(WIN_ADD_TEST_PATHS)'; expo else AM_TESTS_ENVIRONMENT += LD_LIBRARY_PATH='$(LD_LIBRARY_PATH):$(TEST_PATHS)'; export LD_LIBRARY_PATH; endif -AM_TESTS_ENVIRONMENT += EXEEXT='$(EXEEXT)'; export EXEEXT; check_PROGRAMS += tests/efl_mono/efl_mono.exe TESTS += tests/efl_mono/mono_test_driver.sh @@ -351,9 +350,17 @@ tests_efl_mono_efl_mono_exe_SOURCES = \ tests/efl_mono/Value.cs \ tests/efl_mono/ValueEolian.cs -tests/efl_mono/efl_mono.exe$(EXEEXT): $(tests_efl_mono_efl_mono_exe_SOURCES) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll$(EXEEXT) tests/efl_mono/libefl_mono_test.dll$(EXEEXT) - @rm -f tests/efl_mono/efl_mono_exe$(EXEEXT) - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll$(EXEEXT) -r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll$(EXEEXT) -out:$@ $(filter %.cs, $(^)) +lib/efl_mono/libefl_mono.dll.config: + echo "" > $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo "" >> $@ + +tests/efl_mono/efl_mono.exe: $(tests_efl_mono_efl_mono_exe_SOURCES) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll tests/efl_mono/libefl_mono_test.dll + @rm -f tests/efl_mono/efl_mono_exe + $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll -out:$@ $(filter %.cs, $(^)) # Rule for generating the .cs files tests/efl_mono/%.eo.cs: tests/efl_mono/%.eo $(_EOLIAN_MONO_DEP) diff --git a/src/examples/efl_mono/Makefile.am b/src/examples/efl_mono/Makefile.am index 6bae1d9ee2..12c379eade 100644 --- a/src/examples/efl_mono/Makefile.am +++ b/src/examples/efl_mono/Makefile.am @@ -47,14 +47,16 @@ endif example_numberwrapper.c: example_numberwrapper.eo.h example_numberwrapper.eo.c -numberwrapper_lib_name = example_numberwrapper.out +noinst_lib_LTLIBRARIES = libexample_numberwrapper.la +noinst_libdir = $(abs_top_builddir) -$(numberwrapper_lib_name): example_numberwrapper.c - $(CC) -shared -o $@ $< -DEFL_BETA_API_SUPPORT -I. $(COMMON_FLAGS) +libexample_numberwrapper_la_SOURCES = example_numberwrapper.c +libexample_numberwrapper_la_LDFLAGS = -shared +libexample_numberwrapper_la_CFLAGS = $(COMMON_FLAGS) -DEFL_BETA_API_SUPPORT SRCS += exa
[EGIT] [core/efl] master 01/01: eolian-cxx: Fix multiple definitions in forward declaration
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f05a799daa6ec5e362a4376ee5d2b9ef011cd377 commit f05a799daa6ec5e362a4376ee5d2b9ef011cd377 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Wed Oct 25 18:00:50 2017 -0200 eolian-cxx: Fix multiple definitions in forward declaration --- src/lib/eolian_cxx/grammar/class_declaration.hpp | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/lib/eolian_cxx/grammar/class_declaration.hpp b/src/lib/eolian_cxx/grammar/class_declaration.hpp index 7c9957f07d..d448c31074 100644 --- a/src/lib/eolian_cxx/grammar/class_declaration.hpp +++ b/src/lib/eolian_cxx/grammar/class_declaration.hpp @@ -21,6 +21,19 @@ struct class_declaration_generator bool generate(OutputIterator sink, attributes::klass_def const& cls, Context const& context) const { std::vector cpp_namespaces = attributes::cpp_namespaces(cls.namespaces); + + std::string guard_symbol; + + if(!as_generator(*(string << "_") << string << "_FWD_GUARD") +.generate(std::back_inserter(guard_symbol) + , std::make_tuple(cpp_namespaces, cls.cxx_name), add_upper_case_context(context))) + return false; + + if(!as_generator( "#ifndef " << guard_symbol << "\n" + << "#define " << guard_symbol << "\n") +.generate(sink, std::make_tuple(), context)) + return false; + auto open_namespace = *("namespace " << string << " { ") << "\n"; if(!as_generator(open_namespace).generate(sink, cpp_namespaces, add_lower_case_context(context))) return false; @@ -32,7 +45,7 @@ struct class_declaration_generator auto close_namespace = *(lit("} ")) << "\n"; if(!as_generator(close_namespace).generate(sink, cpp_namespaces, context)) return false; - if(type_traits) + // if(type_traits) if(!as_generator ( "namespace efl { namespace eo { template<> struct is_eolian_object< " @@ -49,6 +62,10 @@ struct class_declaration_generator , cpp_namespaces, cls.cxx_name, cpp_namespaces, cls.cxx_name ), context)) return false; + if(!as_generator("#endif\n") +.generate(sink, std::make_tuple(), context)) + return false; + return true; } --
[EGIT] [core/efl] master 01/01: eo-cxx: Fix compilation error with any_value received by value
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=de349e1b9e8f34381747ed8d57c56577bd353a6b commit de349e1b9e8f34381747ed8d57c56577bd353a6b Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Mon Oct 30 21:05:39 2017 -0200 eo-cxx: Fix compilation error with any_value received by value --- src/bindings/cxx/eo_cxx/eo_cxx_interop.hh | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh index d77bcf21e0..17cc390270 100644 --- a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh +++ b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh @@ -292,7 +292,7 @@ template T convert_to_c(V&& object); template -void* data_function_ptr_to_c(T function) +void* data_function_ptr_to_c(T) { return nullptr; } @@ -437,6 +437,10 @@ inline Eina_Value* convert_to_c_impl( ::efl::eina::value_view const& v, tag(v.native_handle()); } +inline Eina_Value const& convert_to_c_impl( ::efl::eina::value_view const& v, tag<Eina_Value, in_traits::type>) +{ + return *v.native_handle(); +} inline Eina_Bool convert_to_c_impl( bool b, tag<Eina_Bool, bool>) { return b; --
[EGIT] [core/efl] master 03/03: efl-mono: Fix using right description pointer in event registration
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=481853e1edbba2536f0189335f564e6133644f84 commit 481853e1edbba2536f0189335f564e6133644f84 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Wed Dec 20 19:45:07 2017 -0200 efl-mono: Fix using right description pointer in event registration --- src/bin/eolian_mono/eolian/mono/klass.hh | 6 +++--- src/bindings/mono/eo_mono/iwrapper.cs| 8 +--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh index d8bea22024..119cd73d12 100644 --- a/src/bin/eolian_mono/eolian/mono/klass.hh +++ b/src/bin/eolian_mono/eolian/mono/klass.hh @@ -562,7 +562,7 @@ struct klass << scope_tab << scope_tab << "if (!event_cb_count.TryGetValue(key, out event_count))\n" << scope_tab << scope_tab << scope_tab << "event_cb_count[key] = event_count;\n" << scope_tab << scope_tab << "if (event_count == 0) {\n" -<< scope_tab << scope_tab << scope_tab << "efl.kw_event.Description desc = new efl.kw_event.Description(key);\n" +<< scope_tab << scope_tab << scope_tab << "IntPtr desc = efl.eo.Globals.dlsym(efl.eo.Globals.RTLD_DEFAULT, key);\n" << scope_tab << scope_tab << scope_tab << "bool result = efl.eo.Globals.efl_event_callback_priority_add(handle, desc, 0, evt_delegate, System.IntPtr.Zero);\n" << scope_tab << scope_tab << scope_tab << "if (!result) {\n" << scope_tab << scope_tab << scope_tab << scope_tab << "eina.Log.Error($\"Failed to add event proxy for event {key}\");\n" @@ -639,7 +639,7 @@ struct klass << scope_tab << "}\n" << scope_tab << "private void on_" << event_name << "_NativeCallback(System.IntPtr data, ref efl.Event evt)\n" << scope_tab << "{\n" -<< scope_tab << event_args +<< scope_tab << scope_tab << event_args << scope_tab << scope_tab << "try {\n" << scope_tab << scope_tab << scope_tab << "On_" << event_name << "(args);\n" << scope_tab << scope_tab << "} catch (Exception e) {\n" @@ -730,7 +730,7 @@ struct klass << scope_tab << "efl.Event_Cb evt_" << wrapper_evt_name << "_delegate;\n" << scope_tab << "private void on_" << wrapper_evt_name << "_NativeCallback(System.IntPtr data, ref efl.Event evt)" << scope_tab << "{\n" - << scope_tab << event_args + << scope_tab << scope_tab << event_args << scope_tab << scope_tab << "try {\n" << scope_tab << scope_tab << scope_tab << "On_" << wrapper_evt_name << "(args);\n" << scope_tab << scope_tab << "} catch (Exception e) {\n" diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs index 98e8f953ba..7812e06367 100644 --- a/src/bindings/mono/eo_mono/iwrapper.cs +++ b/src/bindings/mono/eo_mono/iwrapper.cs @@ -52,8 +52,9 @@ public class Globals { [DllImport(efl.Libs.Eo)] public static extern bool efl_event_callback_priority_add( System.IntPtr obj, // FIXME commented to allow passing null stuff during test - /* ref efl.kw_event.Description desc, */ - efl.kw_event.Description desc, + //ref efl.kw_event.Description desc, + //efl.kw_event.Description desc, + IntPtr desc, short priority, efl.Event_Cb cb, System.IntPtr data); @@ -62,7 +63,8 @@ public class Globals { efl.kw_event.Description desc, efl.Event_Cb cb, System.IntPtr data); - +[DllImport(efl.Libs.Eo)] public static extern IntPtr + efl_object_legacy_only_event_description_get([MarshalAs(UnmanagedType.LPStr)] String name); public const int RTLD_NOW = 2; --
[EGIT] [core/efl] master 01/02: efl-js: Fix dependency generation in JavaScript binding compilation
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c2b067453a06eeb0e6d88133dc34db93b617d9c8 commit c2b067453a06eeb0e6d88133dc34db93b617d9c8 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Tue Jan 2 12:00:31 2018 -0200 efl-js: Fix dependency generation in JavaScript binding compilation Use C++ as dependency in automake so concurrent builds will not fail to compile --- src/Makefile_Eolian_Js.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Makefile_Eolian_Js.am b/src/Makefile_Eolian_Js.am index b0e64de6da..834ea8fd01 100644 --- a/src/Makefile_Eolian_Js.am +++ b/src/Makefile_Eolian_Js.am @@ -21,6 +21,9 @@ bin_eolian_js_eolian_js_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ bin_eolian_js_eolian_js_LDADD = @USE_EO_LIBS@ @USE_EOLIAN_LIBS@ bin_eolian_js_eolian_js_DEPENDENCIES = @USE_EO_INTERNAL_LIBS@ @USE_EOLIAN_INTERNAL_LIBS@ +# generate C++ bindings before compiling C++ files for JS binding +bin/eolian_js/bin_eolian_js_eolian_js-main.$(OBJEXT): $(efl_eolian_cxx_hh) $(efl_eolian_cxx_impl_hh) + include Makefile_Eolian_Js_Helper.am ### Unit tests --
[EGIT] [core/efl] master 03/04: efl-mono: Fix using efl_add_ref instead of efl_ref
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=af80ec3716557e42452112eadfcea39d7bc87222 commit af80ec3716557e42452112eadfcea39d7bc87222 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Tue Apr 3 17:26:52 2018 -0300 efl-mono: Fix using efl_add_ref instead of efl_ref --- src/bin/eolian_mono/eolian/mono/klass.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh index 039485fe39..2bfdbea3d7 100644 --- a/src/bin/eolian_mono/eolian/mono/klass.hh +++ b/src/bin/eolian_mono/eolian/mono/klass.hh @@ -281,7 +281,7 @@ struct klass << scope_tab << scope_tab << "System.IntPtr parent_ptr = System.IntPtr.Zero;\n" << scope_tab << scope_tab << "if(parent != null)\n" << scope_tab << scope_tab << scope_tab << "parent_ptr = parent.raw_handle;\n" - << scope_tab << scope_tab << "handle = efl.eo.Globals._efl_add_internal_start(\"file\", 0, klass, parent_ptr, 0, 0);\n" + << scope_tab << scope_tab << "handle = efl.eo.Globals._efl_add_internal_start(\"file\", 0, klass, parent_ptr, 1, 0);\n" << scope_tab << scope_tab << "if (init_cb != null) {\n" << scope_tab << scope_tab << scope_tab << "init_cb(this);\n" << scope_tab << scope_tab << "}\n" --
[EGIT] [core/efl] master 02/04: efl-mono: Fix test not include'ing Ecore.h
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ca45ee9a9fe43120bb178d6167d55af3e2bb0381 commit ca45ee9a9fe43120bb178d6167d55af3e2bb0381 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Tue Apr 3 17:26:28 2018 -0300 efl-mono: Fix test not include'ing Ecore.h --- src/tests/efl_mono/libefl_mono_native_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c index b53582e44a..e68ec27730 100644 --- a/src/tests/efl_mono/libefl_mono_native_test.c +++ b/src/tests/efl_mono/libefl_mono_native_test.c @@ -3,6 +3,7 @@ #include "config.h" #endif +#include #include #undef EOAPI --
[EGIT] [core/efl] master 04/04: efl-cxx: Fix using efl_add_ref instead of efl_add
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=92f5383e3c983756e05bd11c7e7ad9d53a332b14 commit 92f5383e3c983756e05bd11c7e7ad9d53a332b14 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Tue Apr 3 17:27:05 2018 -0300 efl-cxx: Fix using efl_add_ref instead of efl_add --- src/bindings/cxx/eo_cxx/eo_cxx_interop.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh index a83688a3d9..5dac150b20 100644 --- a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh +++ b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh @@ -836,7 +836,7 @@ inline void do_eo_add(Eo*& object, P const& parent , Efl_Class const* klass , typename std::enable_if< eo::is_eolian_object::value>::type* = 0) { - bool is_ref = (parent._eo_ptr() != nullptr); + bool const is_ref = true; object = ::_efl_add_internal_start(__FILE__, __LINE__, klass, parent._eo_ptr(), is_ref, EINA_FALSE); object = ::_efl_add_end(object, is_ref, EINA_FALSE); } --
[EGIT] [core/efl] master 01/04: efl-mono: Fix compile flags, .config files and class_name in description
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=be06c277625da6618382fec8bcff07f9bf68a303 commit be06c277625da6618382fec8bcff07f9bf68a303 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Tue Apr 3 13:46:45 2018 -0300 efl-mono: Fix compile flags, .config files and class_name in description --- src/Makefile_Efl_Mono.am | 25 ++--- src/bin/eolian_mono/eolian/mono/klass.hh | 4 ++-- src/bindings/mono/eo_mono/iwrapper.cs| 7 --- src/examples/efl_mono/Makefile.am| 12 ++-- src/examples/eina/Makefile.am| 8 src/examples/elementary/Makefile.am | 8 src/examples/evas/Makefile.am| 12 ++-- 7 files changed, 44 insertions(+), 32 deletions(-) diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am index f608676fa9..ffd55a42e6 100644 --- a/src/Makefile_Efl_Mono.am +++ b/src/Makefile_Efl_Mono.am @@ -201,8 +201,8 @@ CLEANFILES += $(efl_mono_files_gen) $(efl_mono_blacklisted_files) \ if HAVE_WIN32 -MCS_FLAGS := $(MCS_FLAGS) -MCS_FLAGS += -define:WIN32 +MCSFLAGS ?= +MCSFLAGS += -define:WIN32 endif @@ -224,11 +224,11 @@ lib_efl_mono_libeflcustomexportsmono_la_DEPENDENCIES = @EFL_CUSTOM_EXPORTS_MONO_ #Efl Mono - C Sharp binding library -libefl_mono_dll_MCS_FLAGS = -doc:lib/efl_mono/libefl_mono.xml +libefl_mono_dll_MCSFLAGS = -doc:lib/efl_mono/libefl_mono.xml lib/efl_mono/libefl_mono.dll: $(efl_mono_files_dist) lib/efl_mono/$(am__dirstamp) $(lib_efl_mono_libefl_mono_dll_sources) $(efl_mono_files_gen) lib/efl_mono/libefl_mono.dll.config @rm -f lib/efl_mono/libefl_mono.dll - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) $(libefl_mono_dll_MCS_FLAGS) -out:$@ -t:library $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) $(libefl_mono_dll_MCSFLAGS) -out:$@ -t:library $(filter %.cs, $(^)) lib/efl_mono/libefl_mono.dll.config: echo "" > $@ @@ -387,9 +387,9 @@ tests/efl_mono/libefl_mono_native_test.c: tests/efl_mono/test_testing.eo.h tests efl_mono_test_eolian_mono_files = tests/efl_mono/test_testing.eo.cs \ tests/efl_mono/test_numberwrapper.eo.cs -tests/efl_mono/libefl_mono_test.dll: $(efl_mono_test_eolian_mono_files) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll tests/efl_mono/libefl_mono_native_test.la +tests/efl_mono/libefl_mono_test.dll: $(efl_mono_test_eolian_mono_files) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll tests/efl_mono/libefl_mono_native_test.la tests/efl_mono/libefl_mono_test.dll.config @rm -f tests/efl_mono/libefl_mono_test.dll - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_builddir)/lib/efl_mono/libefl_mono.dll -out:$@ -t:library $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_builddir)/lib/efl_mono/libefl_mono.dll -out:$@ -t:library $(filter %.cs, $(^)) tests/efl_mono/efl_mono$(EXEEXT).config: echo "" > $@ @@ -402,6 +402,17 @@ tests/efl_mono/efl_mono$(EXEEXT).config: echo " " >> $@ echo "" >> $@ +tests/efl_mono/libefl_mono_test.dll.config: + echo "" > $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo " " >> $@ + echo "" >> $@ + # C Sharp test executable AM_TESTS_ENVIRONMENT += MONO='mono' AM_TESTS_ENVIRONMENT += MONO_BUILDPATH='$(abs_top_builddir)' @@ -434,7 +445,7 @@ tests_efl_mono_efl_mono_SOURCES = \ tests/efl_mono/efl_mono$(EXEEXT): $(tests_efl_mono_efl_mono_SOURCES) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll tests/efl_mono/libefl_mono_test.dll tests/efl_mono/efl_mono$(EXEEXT).config @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCS_FLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll -out:$@ $(filter %.cs, $(^)) # Rule for generating the .cs files tests/efl_mono/%.eo.cs: tests/efl_mono/%.eo $(_EOLIAN_MONO_DEP) diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh index 7de2f2b47b..039485fe39 100644 --- a/src/bin/eolian_mono/eolian/mono/klass.hh +++ b/src/bin/eolian_mono/eolian/mono/klass.hh @@ -384,7 +384,7 @@ struct klass << scope_tab << scope_tab << "if (klass == System.IntPtr.Zero) {\n" << scope_tab << scope_tab << scope_tab << "lock (klassAllocLock) {\n"
[EGIT] [core/efl] master 01/01: efl-mono: Fix calling non-static methods with garbage collectable NativeInherits
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=50c41b1100d2dce33518e59ebaadc5cfcc63c69e commit 50c41b1100d2dce33518e59ebaadc5cfcc63c69e Author: Felipe Magno de Almeida Date: Fri Jan 18 09:37:26 2019 + efl-mono: Fix calling non-static methods with garbage collectable NativeInherits This fixes intermittent errors in C# classes with inheritance from Eo, just like a lot of unit tests. Reviewed-by: Xavi Artigas Differential Revision: https://phab.enlightenment.org/D7683 --- src/bin/eolian_mono/eolian/mono/function_definition.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh index 6917870074..5a78bc735f 100644 --- a/src/bin/eolian_mono/eolian/mono/function_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh @@ -79,7 +79,7 @@ struct native_function_definition_generator if(!as_generator (scope_tab -<< " private " +<< " private static " << eolian_mono::marshall_type(true) << " " << string << "(System.IntPtr obj, System.IntPtr pd" @@ -102,7 +102,7 @@ struct native_function_definition_generator << eolian_mono::native_function_definition_epilogue(*klass) << scope_tab << scope_tab << "} else {\n" << scope_tab << scope_tab << scope_tab << (return_type != " void" ? "return " : "") << string -<< "(Efl.Eo.Globals.efl_super(obj, " << "GetEflClass())" << *(", " << argument) << ");\n" +<< "(Efl.Eo.Globals.efl_super(obj, " << "Efl.Eo.Globals.efl_class_get(obj))" << *(", " << argument) << ");\n" << scope_tab << scope_tab << "}\n" << scope_tab << "}\n" ) --
[EGIT] [core/efl] master 01/01: efl-mono: Remove trailings from template file
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4858d9eb81f4aa5d24b9555b5caf0e058609d8ab commit 4858d9eb81f4aa5d24b9555b5caf0e058609d8ab Author: Felipe Magno de Almeida Date: Wed Jan 16 11:56:13 2019 +0900 efl-mono: Remove trailings from template file Summary: The trailings end up in the final version, which causes it to create a invalid XML file. Reviewers: bu5hm4n, woohyun, segfaultxavi Reviewed By: bu5hm4n Subscribers: cedric, segfaultxavi, woohyun, #reviewers, bu5hm4n, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7613 --- src/bindings/mono/efl_mono.dll.config.in | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bindings/mono/efl_mono.dll.config.in b/src/bindings/mono/efl_mono.dll.config.in index 0531b79523..b84883fda9 100644 --- a/src/bindings/mono/efl_mono.dll.config.in +++ b/src/bindings/mono/efl_mono.dll.config.in @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + --
[EGIT] [core/efl] master 01/03: efl-mono: Add proper test for interface inheritance
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=92aab7830cbc3e8697d56440972835b6d8c67aba commit 92aab7830cbc3e8697d56440972835b6d8c67aba Author: Felipe Magno de Almeida Date: Tue Jan 15 09:07:49 2019 +0900 efl-mono: Add proper test for interface inheritance Reviewers: segfaultxavi, bu5hm4n, woohyun, Jaehyun_Cho, lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7634 --- src/tests/efl_mono/Inheritance.cs| 53 src/tests/efl_mono/dummy_inherit_helper.eo | 17 + src/tests/efl_mono/dummy_inherit_iface.eo| 10 ++ src/tests/efl_mono/libefl_mono_native_test.c | 24 + src/tests/efl_mono/meson.build | 5 +-- 5 files changed, 107 insertions(+), 2 deletions(-) diff --git a/src/tests/efl_mono/Inheritance.cs b/src/tests/efl_mono/Inheritance.cs new file mode 100644 index 00..30ca391e87 --- /dev/null +++ b/src/tests/efl_mono/Inheritance.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; + +using EinaTestData; +using static EinaTestData.BaseData; + +namespace TestSuite +{ + +class TestInheritance +{ +internal class Inherit1 : Dummy.TestObject +{ +override public void IntOut (int x, out int y) +{ +y = 10*x; +} +} + +internal class Inherit2 : Dummy.TestObject, Dummy.InheritIface +{ +override public void IntOut (int x, out int y) +{ +y = 10*x; +} + +public string StringshareTest (string i) +{ +return "Hello World"; +} +} + +public static void test_inherit_from_regular_class() +{ +var obj = new Inherit1(); +int i = Dummy.InheritHelper.ReceiveDummyAndCallIntOut(obj); +Test.AssertEquals (50, i); +} + +public static void test_inherit_from_iface() +{ +var obj = new Inherit2(); +int i = Dummy.InheritHelper.ReceiveDummyAndCallIntOut(obj); +string s = Dummy.InheritHelper.ReceiveDummyAndCallInStringshare(obj); +Test.AssertEquals (50, i); +Test.AssertEquals ("Hello World", s); +} +} + +} diff --git a/src/tests/efl_mono/dummy_inherit_helper.eo b/src/tests/efl_mono/dummy_inherit_helper.eo new file mode 100644 index 00..101c759390 --- /dev/null +++ b/src/tests/efl_mono/dummy_inherit_helper.eo @@ -0,0 +1,17 @@ +class Dummy.Inherit_Helper extends Efl.Object +{ + methods { +receive_dummy_and_call_int_out @class { + params { +@in x: Dummy.Test_Object; + } + return: int; +} +receive_dummy_and_call_in_stringshare @class { + params { +@in x: Dummy.Inherit_Iface; + } + return: stringshare; +} + } +} diff --git a/src/tests/efl_mono/dummy_inherit_iface.eo b/src/tests/efl_mono/dummy_inherit_iface.eo new file mode 100644 index 00..6333a86f42 --- /dev/null +++ b/src/tests/efl_mono/dummy_inherit_iface.eo @@ -0,0 +1,10 @@ +interface Dummy.Inherit_Iface { + methods { + stringshare_test { + params { +@in v: stringshare; + } + return: stringshare @owned; + } + } +} diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c index fc4e3cbae6..d0109dbad2 100644 --- a/src/tests/efl_mono/libefl_mono_native_test.c +++ b/src/tests/efl_mono/libefl_mono_native_test.c @@ -39,6 +39,8 @@ #include "dummy_child.eo.h" #include "dummy_test_iface.eo.h" #include "dummy_another_iface.eo.h" +#include "dummy_inherit_iface.eo.h" +#include "dummy_inherit_helper.eo.h" #include @@ -71,6 +73,13 @@ typedef struct Dummy_Child_Data { } Dummy_Child_Data; +typedef struct Dummy_Inherit_Helper_Data +{ +} Dummy_Inherit_Helper_Data; + +typedef struct Dummy_Inherit_Iface_Data +{ +} Dummy_Inherit_Iface_Data; static void *_new_int(int v) @@ -3928,9 +3937,24 @@ _dummy_child_class_destructor(Efl_Class *klass) (void)klass; } +// Inherit +int _dummy_inherit_helper_receive_dummy_and_call_int_out(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Dummy_Test_Object *x) +{ + int v = 8; + dummy_test_object_int_out (x, 5, ); + return v; +} + +const char* _dummy_inherit_helper_receive_dummy_and_call_in_stringshare(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Dummy_Test_Object *x) +{ + return dummy_inherit_iface_stringshare_test (x, eina_stringshare_add("hello world")); +} + #include "dummy_test_object.eo.c" #include "dummy_numberwrapper.eo.c" #include "dummy_child.eo.c" #include "dummy_test_iface.eo.c" #include "dummy_another_iface.eo.c" +#include "dummy_inherit
[EGIT] [core/efl] master 03/03: eolian-mono: Add interface registration to inherited classes
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=adc2e674af528c01ca5bb11d56edc475bce5cc4d commit adc2e674af528c01ca5bb11d56edc475bce5cc4d Author: Felipe Magno de Almeida Date: Thu Jan 17 21:33:09 2019 +0900 eolian-mono: Add interface registration to inherited classes Summary: Depends on D7635, D7634 Reviewers: woohyun, bu5hm4n, segfaultxavi, lauromoura Reviewed By: woohyun Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7636 --- .../eolian_mono/eolian/mono/function_definition.hh | 10 +- .../eolian/mono/function_registration.hh | 30 ++-- src/bin/eolian_mono/eolian/mono/klass.hh | 178 + src/bin/eolian_mono/eolian/mono/name_helpers.hh| 12 -- src/bindings/mono/eo_mono/iwrapper.cs | 104 ++-- src/tests/efl_mono/Inheritance.cs | 4 +- 6 files changed, 196 insertions(+), 142 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh index 763bbc451f..2d9e1b5d5a 100644 --- a/src/bin/eolian_mono/eolian/mono/function_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh @@ -71,7 +71,11 @@ struct native_function_definition_generator if(!as_generator(eolian_mono::type(true)).generate(std::back_inserter(return_type), f.return_type, context)) return false; -std::string klass_inherit_name = name_helpers::klass_inherit_name(*klass); +std::string klass_cast_name; +if (klass->type != attributes::class_type::interface_) + klass_cast_name = name_helpers::klass_inherit_name(*klass); +else + klass_cast_name = name_helpers::klass_interface_name(*klass); if(!as_generator (scope_tab @@ -89,7 +93,7 @@ struct native_function_definition_generator << scope_tab << scope_tab << "if(wrapper != null) {\n" << scope_tab << scope_tab << scope_tab << eolian_mono::native_function_definition_preamble() << scope_tab << scope_tab << scope_tab << "try {\n" -<< scope_tab << scope_tab << scope_tab << scope_tab << (return_type != " void" ? "_ret_var = " : "") << "((" << klass_inherit_name << ")wrapper)." << string +<< scope_tab << scope_tab << scope_tab << scope_tab << (return_type != " void" ? "_ret_var = " : "") << "((" << klass_cast_name << ")wrapper)." << string << "(" << (native_argument_invocation % ", ") << ");\n" << scope_tab << scope_tab << scope_tab << "} catch (Exception e) {\n" << scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Log.Warning($\"Callback error: {e.ToString()}\");\n" @@ -98,7 +102,7 @@ struct native_function_definition_generator << eolian_mono::native_function_definition_epilogue(*klass) << scope_tab << scope_tab << "} else {\n" << scope_tab << scope_tab << scope_tab << (return_type != " void" ? "return " : "") << string -<< "(Efl.Eo.Globals.efl_super(obj, " << "EoKlass)" << *(", " << argument) << ");\n" +<< "(Efl.Eo.Globals.efl_super(obj, " << "GetEflClass())" << *(", " << argument) << ");\n" << scope_tab << scope_tab << "}\n" << scope_tab << "}\n" ) diff --git a/src/bin/eolian_mono/eolian/mono/function_registration.hh b/src/bin/eolian_mono/eolian/mono/function_registration.hh index 0b8da4a05a..78f2d718c7 100644 --- a/src/bin/eolian_mono/eolian/mono/function_registration.hh +++ b/src/bin/eolian_mono/eolian/mono/function_registration.hh @@ -20,10 +20,10 @@ namespace eolian_mono { -template +// template struct function_registration_generator { - I index_generator; + // I index_generator; attributes::klass_def const* klass; template @@ -34,7 +34,7 @@ struct function_registration_generator return true; else { -auto index = index_generator(); +// auto index = index_generator(); if(!as_generator( scope_tab << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" << @@ -43,12 +43,13 @@ struct f
[EGIT] [core/efl] master 02/03: efl-mono: Fix lots of warnings in tests
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fc48e19b564c7b056e950b2943e0f7f4045696a6 commit fc48e19b564c7b056e950b2943e0f7f4045696a6 Author: Felipe Magno de Almeida Date: Thu Jan 17 11:32:21 2019 + efl-mono: Fix lots of warnings in tests Reviewed-by: Marcel Hollerbach Reviewed-by: Xavi Artigas Differential Revision: https://phab.enlightenment.org/D7675 --- src/tests/efl_mono/libefl_mono_native_test.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c index 9e58ab3dac..4c46e1e8dc 100644 --- a/src/tests/efl_mono/libefl_mono_native_test.c +++ b/src/tests/efl_mono/libefl_mono_native_test.c @@ -3861,7 +3861,7 @@ Eina_Future* _dummy_test_object_get_future(EINA_UNUSED Eo *obj, Dummy_Test_Objec return eina_future_new(pd->promise); } -void _dummy_test_object_fulfill_promise(Eo *obj, Dummy_Test_Object_Data *pd, int data) +void _dummy_test_object_fulfill_promise(Eo *obj EINA_UNUSED, Dummy_Test_Object_Data *pd, int data) { if (pd->promise == NULL) { @@ -3874,7 +3874,7 @@ void _dummy_test_object_fulfill_promise(Eo *obj, Dummy_Test_Object_Data *pd, int eina_promise_resolve(pd->promise, v); } -void _dummy_test_object_reject_promise(Eo *obj, Dummy_Test_Object_Data *pd, Eina_Error err) +void _dummy_test_object_reject_promise(Eo *obj EINA_UNUSED, Dummy_Test_Object_Data *pd, Eina_Error err) { if (pd->promise == NULL) { @@ -3885,7 +3885,7 @@ void _dummy_test_object_reject_promise(Eo *obj, Dummy_Test_Object_Data *pd, Eina eina_promise_reject(pd->promise, err); } -Eina_Accessor *_dummy_test_object_clone_accessor(Eo *obj, Dummy_Test_Object_Data *pd, Eina_Accessor *acc) +Eina_Accessor *_dummy_test_object_clone_accessor(Eo *obj EINA_UNUSED, Dummy_Test_Object_Data *pd, Eina_Accessor *acc) { if (pd->list_for_accessor) eina_list_free(pd->list_for_accessor); @@ -3900,17 +3900,17 @@ Eina_Accessor *_dummy_test_object_clone_accessor(Eo *obj, Dummy_Test_Object_Data return eina_list_accessor_new(pd->list_for_accessor); } -void _dummy_test_object_dummy_test_iface_emit_test_conflicted(Eo *obj, Dummy_Test_Object_Data *pd) +void _dummy_test_object_dummy_test_iface_emit_test_conflicted(Eo *obj, Dummy_Test_Object_Data *pd EINA_UNUSED) { efl_event_callback_legacy_call(obj, DUMMY_TEST_IFACE_EVENT_CONFLICTED, NULL); } -void _dummy_test_object_dummy_test_iface_emit_nonconflicted(Eo *obj, Dummy_Test_Object_Data *pd) +void _dummy_test_object_dummy_test_iface_emit_nonconflicted(Eo *obj, Dummy_Test_Object_Data *pd EINA_UNUSED) { efl_event_callback_legacy_call(obj, DUMMY_TEST_IFACE_EVENT_NONCONFLICTED, NULL); } -void _dummy_test_object_dummy_another_iface_emit_another_conflicted(Eo *obj, Dummy_Test_Object_Data *pd) +void _dummy_test_object_dummy_another_iface_emit_another_conflicted(Eo *obj, Dummy_Test_Object_Data *pd EINA_UNUSED) { efl_event_callback_legacy_call(obj, DUMMY_ANOTHER_IFACE_EVENT_CONFLICTED, NULL); } --
[EGIT] [core/efl] master 01/03: eolian-cxx: Fix order of initialization
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d57a7df3b5ad731fe0bd4f9cd07b448955380e58 commit d57a7df3b5ad731fe0bd4f9cd07b448955380e58 Author: Felipe Magno de Almeida Date: Thu Jan 17 11:31:06 2019 + eolian-cxx: Fix order of initialization Make order of code the same as the order of initialization. This avoids warnings efl-mono: Fix lots of warnings in tests Reviewed-by: Xavi Artigas Differential Revision: https://phab.enlightenment.org/D7633 --- src/lib/eolian_cxx/grammar/klass_def.hpp | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp index f69fca29d3..fc9d09519a 100644 --- a/src/lib/eolian_cxx/grammar/klass_def.hpp +++ b/src/lib/eolian_cxx/grammar/klass_def.hpp @@ -1061,11 +1061,12 @@ struct klass_def , std::string klass_get_name) : eolian_name(_eolian_name), cxx_name(_cxx_name) , namespaces(_namespaces) -, functions(_functions), properties(_properties), inherits(_inherits), type(_type), unit(unit) -, klass_get_name(klass_get_name) +, functions(_functions), properties(_properties), inherits(_inherits), type(_type) +, klass_get_name(klass_get_name), unit(unit) {} - klass_def(Eolian_Class const* klass, Eolian_Unit const* unit) : unit(unit) -, klass_get_name( ::eolian_class_c_get_function_name_get(klass)) + klass_def(Eolian_Class const* klass, Eolian_Unit const* unit) +: klass_get_name( ::eolian_class_c_get_function_name_get(klass)) +, unit(unit) { for(efl::eina::iterator namespace_iterator( ::eolian_class_namespaces_get(klass)) , namespace_last; namespace_iterator != namespace_last; ++namespace_iterator) --
[EGIT] [core/efl] master 01/01: efl-cxx: Add -Wno-shadow to disable huge warnings in C++
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=65c6b158f928d25bdd9f3dfe2e90e335016982fa commit 65c6b158f928d25bdd9f3dfe2e90e335016982fa Author: Felipe Magno de Almeida Date: Mon Aug 13 11:12:44 2018 -0400 efl-cxx: Add -Wno-shadow to disable huge warnings in C++ Summary: -Wno-shadow warnings disable a improper warning directive for C++, this is made because it is common for people to use the same CFLAGS as CXXFLAGS, enabling, unadvertadly, the smae warning for C and C++. Reviewers: zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6821 --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 64ef40a779..aef7129967 100644 --- a/configure.ac +++ b/configure.ac @@ -23,6 +23,7 @@ AM_CONDITIONAL([HAVE_AM_16], [test $(echo "${am__api_version}"|cut -d. -f2) -ge AC_USE_SYSTEM_EXTENSIONS CFOPT_WARNING="" +CXXFLAGS="${CXXFLAGS} -Wno-shadow" # No shadow warnings Apply configuring with legacy api's only, eo api's or both. --
[EGIT] [core/efl] master 01/01: Efl.Ui.Layout.Factory: added missing factory_model_connect
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4fb9205a94759eb35dc2bb2965b0596d6f775a01 commit 4fb9205a94759eb35dc2bb2965b0596d6f775a01 Author: Felipe Magno de Almeida Date: Wed Aug 1 18:42:13 2018 -0300 Efl.Ui.Layout.Factory: added missing factory_model_connect Summary: connect factory to edje part name when create a new layout connect a factory to it change example to use the factory_model_connect Reviewers: felipealmeida Differential Revision: https://phab.enlightenment.org/D6667 --- .../elementary/efl_ui_view_list_example_2.c| 22 --- src/lib/elementary/efl_ui_layout_factory.c | 31 ++ src/lib/elementary/efl_ui_layout_factory.eo| 1 + src/lib/elementary/efl_ui_view_list_segarray.c | 12 ++--- 4 files changed, 45 insertions(+), 21 deletions(-) diff --git a/src/examples/elementary/efl_ui_view_list_example_2.c b/src/examples/elementary/efl_ui_view_list_example_2.c index de4d259962..310aa26976 100644 --- a/src/examples/elementary/efl_ui_view_list_example_2.c +++ b/src/examples/elementary/efl_ui_view_list_example_2.c @@ -14,25 +14,13 @@ #define EFL_MODEL_TEST_FILENAME_PATH "/tmp" -static void -_realized_cb(void *data, const Efl_Event *event) -{ - Efl_Ui_View_List_Item_Event *ie = event->info; - Eo *imf = data; - printf("realize %d\n", ie->index); - - evas_object_size_hint_weight_set(ie->layout, EVAS_HINT_EXPAND, 0); - evas_object_size_hint_align_set(ie->layout, EVAS_HINT_FILL, EVAS_HINT_FILL); - - efl_ui_factory_model_connect(ie->layout, "efl.icon", imf); -} - EAPI_MAIN int elm_main(int argc, char **argv) { Efl_Ui_Layout_Factory *factory; + Efl_Ui_Image_Factory *imgf; Evas_Object *win; - Eo *imf, *model, *li; + Eo *model, *li; char *dirname; win = elm_win_util_standard_add("viewlist", "Viewlist"); @@ -56,9 +44,9 @@ elm_main(int argc, char **argv) evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL); - imf = efl_add(EFL_UI_IMAGE_FACTORY_CLASS, win); - efl_ui_model_connect(imf, "", "path"); //connect to "path" property - efl_event_callback_add(li, EFL_UI_VIEW_LIST_EVENT_ITEM_REALIZED, _realized_cb, imf); + imgf = efl_add(EFL_UI_IMAGE_FACTORY_CLASS, win); + efl_ui_model_connect(imgf, "", "path"); //connect to "path" property + efl_ui_factory_model_connect(factory, "efl.icon", imgf); elm_win_resize_object_add(win, li); diff --git a/src/lib/elementary/efl_ui_layout_factory.c b/src/lib/elementary/efl_ui_layout_factory.c index 16621c53a0..73d18091f4 100644 --- a/src/lib/elementary/efl_ui_layout_factory.c +++ b/src/lib/elementary/efl_ui_layout_factory.c @@ -12,6 +12,7 @@ typedef struct _Efl_Ui_Layout_Factory_Data { Eina_Array *layouts; Eina_Hash *connects; +Eina_Hash *factory_connects; Eina_Stringshare *klass; Eina_Stringshare *group; Eina_Stringshare *style; @@ -29,6 +30,17 @@ _model_connect(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, v return EINA_TRUE; } +Eina_Bool +_factory_model_connect(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata) +{ + Eo *layout = fdata; + Eina_Stringshare *name = key; + Efl_Ui_Factory *factory = data; + + efl_ui_factory_model_connect(layout, name, factory); + return EINA_TRUE; +} + EOLIAN static Eo * _efl_ui_layout_factory_efl_object_constructor(Eo *obj, Efl_Ui_Layout_Factory_Data *pd) { @@ -39,6 +51,7 @@ _efl_ui_layout_factory_efl_object_constructor(Eo *obj, Efl_Ui_Layout_Factory_Dat pd->style = NULL; pd->layouts = eina_array_new(8); pd->connects = eina_hash_stringshared_new(EINA_FREE_CB(eina_stringshare_del)); + pd->factory_connects = eina_hash_stringshared_new(EINA_FREE_CB(efl_del)); return obj; } @@ -59,6 +72,7 @@ _efl_ui_layout_factory_efl_object_destructor(Eo *obj, Efl_Ui_Layout_Factory_Data eina_array_free(pd->layouts); eina_hash_free(pd->connects); + eina_hash_free(pd->factory_connects); efl_destructor(efl_super(obj, MY_CLASS)); } @@ -83,6 +97,7 @@ _efl_ui_layout_factory_efl_ui_factory_create(Eo *obj EINA_UNUSED, Efl_Ui_Layout_ efl_ui_layout_object_theme_set(efl_added, pd->klass, pd->group, pd->style)); eina_hash_foreach(pd->connects, _model_connect, layout); +eina_hash_foreach(pd->factory_connects, _factory_model_connect, layout); evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, 0); evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL); @@ -99,6 +114,22 @@ _efl_ui_layout_factory_efl_ui_factory_release(Eo *obj EINA_UNUSED, Efl_Ui_Layout } EOLIAN static void +_efl_ui_layout_factory_efl_ui_factory_model_connect
[EGIT] [core/efl] master 01/01: elementary: efl_ui_view_list cleanup
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=71d339579cb8fbbc1881dd3c30cc8e6ccde809f3 commit 71d339579cb8fbbc1881dd3c30cc8e6ccde809f3 Author: Felipe Magno de Almeida Date: Wed Aug 1 19:45:36 2018 -0300 elementary: efl_ui_view_list cleanup Summary: private data cleanup removed callbacks Reviewers: felipealmeida, SanghyeonLee Reviewed By: felipealmeida Subscribers: Hermet Differential Revision: https://phab.enlightenment.org/D6707 --- src/lib/elementary/efl_ui_view_list.c | 27 +- src/lib/elementary/efl_ui_view_list_private.h | 32 +++ 2 files changed, 9 insertions(+), 50 deletions(-) diff --git a/src/lib/elementary/efl_ui_view_list.c b/src/lib/elementary/efl_ui_view_list.c index ca31058401..08c8604e82 100644 --- a/src/lib/elementary/efl_ui_view_list.c +++ b/src/lib/elementary/efl_ui_view_list.c @@ -2,13 +2,10 @@ # include "elementary_config.h" #endif #define EFL_ACCESS_OBJECT_PROTECTED -#define EFL_ACCESS_WIDGET_ACTION_PROTECTED #define EFL_ACCESS_SELECTION_PROTECTED #define EFL_UI_SCROLL_MANAGER_PROTECTED #define EFL_UI_SCROLLBAR_PROTECTED #define EFL_UI_SCROLLBAR_BETA -#define EFL_GFX_SIZE_HINT_PROTECTED -#define EFL_UI_VIEW_LIST_PROTECTED #define EFL_UI_FOCUS_COMPOSITION_PROTECTED #define EFL_UI_WIDGET_FOCUS_MANAGER_PROTECTED @@ -400,12 +397,6 @@ _efl_ui_view_list_hbar_unpress_cb(void *data, } static void -_scroll_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) -{ - //scroll cb -} - -static void _efl_ui_view_list_bar_size_changed_cb(void *data, const Efl_Event *event EINA_UNUSED) { Eo *obj = data; @@ -490,8 +481,8 @@ _efl_ui_view_list_edje_object_attach(Eo *obj) (obj, "reload", "efl", _efl_ui_view_list_reload_cb, obj); //Vertical bar efl_layout_signal_callback_add - (obj, "drag", "efl.dragable.vbar", _efl_ui_view_list_vbar_drag_cb, - obj); + (obj, "drag", "efl.dragable.vbar", + _efl_ui_view_list_vbar_drag_cb, obj); efl_layout_signal_callback_add (obj, "drag,set", "efl.dragable.vbar", _efl_ui_view_list_edje_drag_cb, obj); @@ -516,8 +507,8 @@ _efl_ui_view_list_edje_object_attach(Eo *obj) //Horizontal bar efl_layout_signal_callback_add - (obj, "drag", "efl.dragable.hbar", _efl_ui_view_list_hbar_drag_cb, - obj); + (obj, "drag", "efl.dragable.hbar", + _efl_ui_view_list_hbar_drag_cb, obj); efl_layout_signal_callback_add (obj, "drag,set", "efl.dragable.hbar", _efl_ui_view_list_edje_drag_cb, obj); @@ -574,8 +565,8 @@ _efl_ui_view_list_edje_object_detach(Evas_Object *obj) //Horizontal bar efl_layout_signal_callback_del - (obj, "drag", "efl.dragable.hbar", _efl_ui_view_list_hbar_drag_cb, - obj); + (obj, "drag", "efl.dragable.hbar", + _efl_ui_view_list_hbar_drag_cb, obj); efl_layout_signal_callback_del (obj, "drag,set", "efl.dragable.hbar", _efl_ui_view_list_edje_drag_cb, obj); @@ -632,16 +623,12 @@ _efl_ui_view_list_efl_canvas_group_group_add(Eo *obj, Efl_Ui_View_List_Data *pd) edje_object_thaw(wd->resize_obj); efl_gfx_stack_raise((Eo *)o); - pd->mode = ELM_LIST_COMPRESS; - efl_gfx_entity_visible_set(pd->pan_obj, EINA_TRUE); - efl_access_object_access_type_set(obj, EFL_ACCESS_TYPE_DISABLED); edje_object_size_min_calc(wd->resize_obj, , ); efl_gfx_size_hint_restricted_min_set(obj, min); - efl_event_callback_add(obj, EFL_UI_EVENT_SCROLL, _scroll_cb, obj); efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_SIZE_CHANGED, _efl_ui_view_list_bar_size_changed_cb, obj); efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_POS_CHANGED, @@ -708,7 +695,6 @@ _efl_ui_view_list_efl_object_constructor(Eo *obj, Efl_Ui_View_List_Data *pd) pd->style = eina_stringshare_add(elm_widget_style_get(obj)); pd->factory = NULL; - pd->orient = EFL_ORIENT_DOWN; pd->min.w = 0; pd->min.h = 0; @@ -723,7 +709,6 @@ _efl_ui_view_list_efl_object_destructor(Eo *obj, Efl_Ui_View_List_Data *pd) efl_unref(pd->model); eina_stringshare_del(pd->style); - efl_event_callback_del(obj, EFL_UI_EVENT_SCROLL, _scroll_cb, obj); _efl_ui_view_list_edje_object_detach(obj); ELM_SAFE_FREE(pd->pan_obj, evas_object_del); diff --git a/src/lib/elementary/efl_ui_view_list_private.h b/src/lib/elementary/efl_ui_view_list_private.h index 7560870f14..94c5d894a8 100644 --- a/src/lib/elementary/efl_ui_view_list_private.h +++ b/src/lib/elementary/efl_ui_view_list_private.h @@ -5,26 +5,19 @@ # include "elementary_config.h" #endif -#define ELM_INTERFACE_ATSPI_ACCES
[EGIT] [core/efl] master 01/01: eo: Fix internal reference count wrongly 0 when constructor returns a different object
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4a60c605280db75b1fd21502e0f92dc095db3e1f commit 4a60c605280db75b1fd21502e0f92dc095db3e1f Author: Felipe Magno de Almeida Date: Mon Jun 18 14:49:43 2018 -0300 eo: Fix internal reference count wrongly 0 when constructor returns a different object The class's Eo constructor can return a different object, which makes the efl_add return that object instead. However, a bug was not initializing the internal reference count when a different object was returned. --- src/lib/eo/eo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 91e1730047..2df52d36df 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -927,6 +927,7 @@ ok_nomatch_back: ok_nomatch: { EO_OBJ_POINTER_GOTO_PROXY(eo_id, new_obj, err_newid); +_efl_ref(new_obj); efl_ref(eo_id); /* We might have two refs on the old object at this point. */ efl_parent_set((Eo *) obj->header.id, NULL); --
[EGIT] [admin/devs] master 01/01: Change Larry Lira public key
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/admin/devs.git/commit/?id=f2e884e1d838818c69a6483e7383e1950534d561 commit f2e884e1d838818c69a6483e7383e1950534d561 Author: Felipe Magno de Almeida Date: Wed Jun 20 16:07:50 2018 -0300 Change Larry Lira public key --- probies/larrylira/id_rsa.pub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/probies/larrylira/id_rsa.pub b/probies/larrylira/id_rsa.pub index d8a9a19..05334d4 100644 --- a/probies/larrylira/id_rsa.pub +++ b/probies/larrylira/id_rsa.pub @@ -1 +1 @@ -ssh-rsa B3NzaC1yc2EDAQABAAABAQCrlTpBrNy5ddO8XVKvXpcbSh1cq8BUDRUepuMhbpGQJJ65bPvoTK+GsaYRQ5vn9LmMxPgnkH2hEDBJGwC/PcHKoi6Qn+Luhw6zcDuVQAFvj6WccNOXlr6Pfschh+ddSwHvw36OsZd3QG7XaVQUIXS1guXuaZ0ea1gIZ1X57Yrc3V3spmmXIk7bQhuE1Uc6Fyd4ehruU3Is977d/YH5HbAiA1eHy/qjqIzS/J34FT5gqZ7C4QwJqbatynbDNETSpsG7xW1QAC4ttijUsXqEoa5V9sMYt+ww8/XJzAZAsIIt4HF55Y9y85IYRkK9IlAPIdnZotDiOoQt9RY0KupNxfa1 larry@larry-G46VW +ssh-rsa B3NzaC1yc2EDAQABAAACAQC7jGufpS5dEeKMjKUPsHIO0LPU3U6B9QS1GDyR6R+u/u2k7aTxCZwHasjzUqW4ostgh6o6Ekl1G/BWbnzcy7yA4Bcf7dCZyg/6TRmL4Tuc5TB1/oEJfUkHWSXYM5nH1hou2di9Uai1xx3CrRoxbm8v/9+kn/2Z1YP1DvXXiKtpnw+Jb72KEbGIi86DWteaOfLXjeCkdqh9tJR8nwZ5Zj6JUuwEGoLDcz6Kl90/5JtzURTinyU+Y84+KSrmFhSPqGzldlZqrbZxcCqlVufCcV6nVLAlPvTmRQJfSRm9OAj9uNck7AuRm7ZWkT7iikNmt5mM5SuwDE+0J5Ef/twqd9FR4sA1YPvWYI4ms8TlqW6HuDtAdpNHHSqFeaHo4vLGa3z/ImuI5X6uurZPCCNNBEkZbe1u5tVfLaTxTnN+k6aEavs/7tKKMYsikFvytPIbdU0mAeYK [...] --
[EGIT] [core/efl] master 01/02: eolian-cxx: Remove test that can't be implemented
stefan pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2032e7d787a19fff9688040a0713ca3e8ad15fda commit 2032e7d787a19fff9688040a0713ca3e8ad15fda Author: Felipe Magno de Almeida Date: Thu Aug 23 02:47:47 2018 + eolian-cxx: Remove test that can't be implemented The feature required by this test was removed. When the feature is reincluded with newer syntax the test will be rewritten and readded. Differential Revision: https://phab.enlightenment.org/D6897 --- src/examples/eolian_cxx/eolian_cxx_inherit_01.cc | 89 1 file changed, 89 deletions(-) diff --git a/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc b/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc deleted file mode 100644 index 5cd6b20596..00 --- a/src/examples/eolian_cxx/eolian_cxx_inherit_01.cc +++ /dev/null @@ -1,89 +0,0 @@ - -#include -#include - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "ns_colourable.eo.hh" -#include "ns_colourablesquare.eo.hh" -#include "ns_colourable.eo.impl.hh" -#include "ns_colourablesquare.eo.impl.hh" - -#include - -using namespace efl; - -struct ColourableCircle - : efl::eo::inherit -{ - ColourableCircle(int rgb) - : inherit_base(::ns::Colourable::rgb_24bits_constructor(rgb)) - {} - - int colour_get() - { - int rgb = 0; - rgb = ::ns_colourable_colour_get(eo_super(_eo_ptr(), _eo_class())); - std::cout << "ColourableCircle::colour_get(" << this << ") ==> " -<< std::hex << rgb << std::endl; - return rgb; - } -}; - -/* -struct ColourableFoo - : efl::eo::inherit -{ - ColourableFoo(int size, int rgb) - : inherit_base(efl::eo::args<::colourable>(size) - , efl::eo::args<::colourablesquare>(rgb)) - {} -};*/ - -struct ColourableBar - : efl::eo::inherit -{ - ColourableBar() - : inherit_base(::ns::Colourable::rgb_24bits_constructor(0)) - {} - - int colour_get() - { - int rgb = 0; - rgb = ::ns_colourable_colour_get(eo_super(_eo_ptr(), _eo_class())); - std::cout << "ColourableBar::colour_get(" << this << ") ==> " -<< std::hex << rgb << std::endl; - return rgb; - } - -}; - -int -main() -{ - efl::eo::eo_init init; - eina_log_domain_level_set("colourable", EINA_LOG_LEVEL_DBG); - - ColourableCircle obj1(0x0); - obj1.composite_colour_set(0xc0, 0xff, 0xee); - - ColourableCircle obj2(0xc0ffee); - int r, g, b; - obj2.composite_colour_get(, , ); - - - ColourableBar obj3; - obj3.composite_colour_get(, , ); - - assert(r == 0xc0); - assert(g == 0xff); - assert(b == 0xee); - - assert(obj1.colour_get() == obj2.colour_get()); - - return 0; -} --
[EGIT] [core/efl] master 03/03: efl-mono: Add efl_mono.dll.config file to run tests from within tree
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a8e23cc4005b45343f8902e25626a9e4116a66c9 commit a8e23cc4005b45343f8902e25626a9e4116a66c9 Author: Felipe Magno de Almeida Date: Thu Jan 3 21:06:53 2019 + efl-mono: Add efl_mono.dll.config file to run tests from within tree Required by some distros like Arch. Reviewed-by: Marcel Hollerbach Reviewed-by: Felipe Magno de Almeida Differential Revision: https://phab.enlightenment.org/D7527 --- src/bindings/mono/efl_mono.dll.config.in | 9 + src/bindings/mono/meson.build| 13 + 2 files changed, 22 insertions(+) diff --git a/src/bindings/mono/efl_mono.dll.config.in b/src/bindings/mono/efl_mono.dll.config.in new file mode 100644 index 00..0531b79523 --- /dev/null +++ b/src/bindings/mono/efl_mono.dll.config.in @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/bindings/mono/meson.build b/src/bindings/mono/meson.build index 4710e4c0cc..411c29f617 100644 --- a/src/bindings/mono/meson.build +++ b/src/bindings/mono/meson.build @@ -113,6 +113,19 @@ foreach mono_gen_file : legacy_evas_required_by_mono '@INPUT@']) endforeach +efl_mono_conf_data = configuration_data() +efl_mono_conf_data.set('EINA', eina_lib.full_path()) +efl_mono_conf_data.set('EFL', efl_lib.full_path()) +efl_mono_conf_data.set('ECORE', ecore_lib.full_path()) +efl_mono_conf_data.set('EO', eo_lib.full_path()) +efl_mono_conf_data.set('EVAS', evas_lib.full_path()) +efl_mono_conf_data.set('ELDBUS', eldbus_lib.full_path()) +efl_mono_conf_data.set('ELEMENTARY', elementary_lib.full_path()) + +configure_file(input : 'efl_mono.dll.config.in', + output : 'efl_mono.dll.config', + configuration : efl_mono_conf_data) + efl_mono = library('efl_mono', mono_generator_target + mono_files + [efl_src], install : true, --
[EGIT] [core/efl] master 01/01: eolian-cxx: Fix parallel compilation for eolian_cxx_test_wrapper.cc
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fb5431b7bcac3208a8ac196e16889561e6ce9099 commit fb5431b7bcac3208a8ac196e16889561e6ce9099 Author: Felipe Magno de Almeida Date: Tue Sep 4 09:10:56 2018 +0900 eolian-cxx: Fix parallel compilation for eolian_cxx_test_wrapper.cc Summary: Test wasn't defining its own dependencies explicitly, which caused race conditions. Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6959 --- src/Makefile_Eolian_Cxx.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Makefile_Eolian_Cxx.am b/src/Makefile_Eolian_Cxx.am index 5b0099a33e..c2c66a6d91 100644 --- a/src/Makefile_Eolian_Cxx.am +++ b/src/Makefile_Eolian_Cxx.am @@ -114,6 +114,8 @@ tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-eolian_cxx_test_bin tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-eolian_cxx_test_address_of.$(OBJEXT): tests/eolian_cxx/a.eo.hh tests/eolian_cxx/b.eo.hh tests/eolian_cxx/c.eo.hh tests/eolian_cxx/d.eo.hh tests/eolian_cxx/a.eo.h tests/eolian_cxx/b.eo.h tests/eolian_cxx/c.eo.h tests/eolian_cxx/d.eo.h tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-eolian_cxx_test_cyclic.$(OBJEXT): tests/eolian_cxx/cyclic1.eo.hh tests/eolian_cxx/cyclic2.eo.hh tests/eolian_cxx/cyclic1.eo.c tests/eolian_cxx/cyclic2.eo.c tests/eolian_cxx/cyclic1.eo.h tests/eolian_cxx/cyclic2.eo.h +tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-eolian_cxx_test_wrapper.$(OBJEXT): tests/eolian_cxx/a.eo.h tests/eolian_cxx/a.eo.c tests/eolian_cxx/a.eo.hh + tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-simple.$(OBJEXT): tests/eolian_cxx/simple.eo.c tests/eolian_cxx/simple.eo.h tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-generic.$(OBJEXT): tests/eolian_cxx/generic.eo.c tests/eolian_cxx/generic.eo.h tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-a.$(OBJEXT): tests/eolian_cxx/a.eo.c tests/eolian_cxx/a.eo.h --
[EGIT] [core/efl] efl-1.21 01/04: eolian-cxx: Fix parallel compilation for eolian_cxx_test_wrapper.cc
stefan pushed a commit to branch efl-1.21. http://git.enlightenment.org/core/efl.git/commit/?id=f1177a39a581653a4ac92160ba25ebcf12a6467a commit f1177a39a581653a4ac92160ba25ebcf12a6467a Author: Felipe Magno de Almeida Date: Tue Sep 4 09:10:56 2018 +0900 eolian-cxx: Fix parallel compilation for eolian_cxx_test_wrapper.cc Summary: Test wasn't defining its own dependencies explicitly, which caused race conditions. Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6959 --- src/Makefile_Eolian_Cxx.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Makefile_Eolian_Cxx.am b/src/Makefile_Eolian_Cxx.am index 5b0099a33e..c2c66a6d91 100644 --- a/src/Makefile_Eolian_Cxx.am +++ b/src/Makefile_Eolian_Cxx.am @@ -114,6 +114,8 @@ tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-eolian_cxx_test_bin tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-eolian_cxx_test_address_of.$(OBJEXT): tests/eolian_cxx/a.eo.hh tests/eolian_cxx/b.eo.hh tests/eolian_cxx/c.eo.hh tests/eolian_cxx/d.eo.hh tests/eolian_cxx/a.eo.h tests/eolian_cxx/b.eo.h tests/eolian_cxx/c.eo.h tests/eolian_cxx/d.eo.h tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-eolian_cxx_test_cyclic.$(OBJEXT): tests/eolian_cxx/cyclic1.eo.hh tests/eolian_cxx/cyclic2.eo.hh tests/eolian_cxx/cyclic1.eo.c tests/eolian_cxx/cyclic2.eo.c tests/eolian_cxx/cyclic1.eo.h tests/eolian_cxx/cyclic2.eo.h +tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-eolian_cxx_test_wrapper.$(OBJEXT): tests/eolian_cxx/a.eo.h tests/eolian_cxx/a.eo.c tests/eolian_cxx/a.eo.hh + tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-simple.$(OBJEXT): tests/eolian_cxx/simple.eo.c tests/eolian_cxx/simple.eo.h tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-generic.$(OBJEXT): tests/eolian_cxx/generic.eo.c tests/eolian_cxx/generic.eo.h tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-a.$(OBJEXT): tests/eolian_cxx/a.eo.c tests/eolian_cxx/a.eo.h --
[EGIT] [website/www-content] master 01/01: Wiki page start.md changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=f35ef7357bdbd73e09dd9cb17e36c92f79e9a8c5 commit f35ef7357bdbd73e09dd9cb17e36c92f79e9a8c5 Author: Felipe Magno de Almeida Date: Wed Sep 12 15:35:06 2018 -0700 Wiki page start.md changed with summary [] by Felipe Magno de Almeida --- pages/develop/setup/csharp/start.md.txt | 4 1 file changed, 4 insertions(+) diff --git a/pages/develop/setup/csharp/start.md.txt b/pages/develop/setup/csharp/start.md.txt index 2ef3ced6b..46ab4a777 100644 --- a/pages/develop/setup/csharp/start.md.txt +++ b/pages/develop/setup/csharp/start.md.txt @@ -59,6 +59,10 @@ sudo make install > Usually, reading the error message and installing the missing package solves > the problem. > If you cannot solve the problem by yourself, try [contacting the > community](/contact). +> **NOTE** +> If you are using Visual Studio to write EFL C# applications, you should copy to the build directory or have them in the PATH environment libraries: libeflcustomexportsmono.dll, libefl_mono.dll and if you want to use Intellisense also libefl_mono.xml. These libraries and XML file will be found at lib sub-directory of the prefix you install the library. + + ## Building EFL C# Applications ## With EFL installed, you can compile EFL applications using ``pkg-config`` to get the proper flags to use the C# bindings: --
[EGIT] [core/efl] master 01/01: eolian: Add @ctor_param parameter to constructors
q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1933735635aa72cf7be96c47b1e5b8a5ee318323 commit 1933735635aa72cf7be96c47b1e5b8a5ee318323 Author: Felipe Magno de Almeida Date: Wed Oct 31 02:47:58 2018 +0100 eolian: Add @ctor_param parameter to constructors Summary: This tagging keyword explicitly asks, for bindings that support it, that the constructor's parameters are added to the class constructor. Allowing the user to instantiate the class and call the constructor in a straightforward way. Reviewers: q66, woohyun, bu5hm4n, Jaehyun_Cho, segfaultxavi Reviewed By: q66 Subscribers: cedric, #reviewers, #committers, lauromoura Tags: #efl Differential Revision: https://phab.enlightenment.org/D7221 --- src/lib/eolian/Eolian.h | 10 ++ src/lib/eolian/database_constructor_api.c | 7 +++ src/lib/eolian/eo_lexer.h | 2 +- src/lib/eolian/eo_parser.c| 22 ++ src/lib/eolian/eolian_database.h | 1 + src/tests/eolian/data/ctor_dtor.eo| 6 ++ src/tests/eolian/eolian_parsing.c | 9 + 7 files changed, 52 insertions(+), 5 deletions(-) diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index b5241ead86..f626ce82ca 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -1988,6 +1988,16 @@ EAPI const Eolian_Function *eolian_constructor_function_get(const Eolian_Constru */ EAPI Eina_Bool eolian_constructor_is_optional(const Eolian_Constructor *ctor); +/* + * @brief Checks if a constructor is tagged as a constructor parameter. + * + * @param[in] ctor the handle of the constructor + * @return EINA_TRUE if a constructor parameter, EINA_FALSE if not (or if input is NULL). + * + * @ingroup Eolian + */ +EAPI Eina_Bool eolian_constructor_is_ctor_param(const Eolian_Constructor *ctor); + /* * @brief Get an iterator to the constructing functions defined in a class. * diff --git a/src/lib/eolian/database_constructor_api.c b/src/lib/eolian/database_constructor_api.c index bedf9ab7da..63b935cc6c 100644 --- a/src/lib/eolian/database_constructor_api.c +++ b/src/lib/eolian/database_constructor_api.c @@ -29,3 +29,10 @@ eolian_constructor_is_optional(const Eolian_Constructor *ctor) EINA_SAFETY_ON_NULL_RETURN_VAL(ctor, EINA_FALSE); return ctor->is_optional; } + +EAPI Eina_Bool +eolian_constructor_is_ctor_param(const Eolian_Constructor *ctor) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(ctor, EINA_FALSE); + return ctor->is_ctor_param; +} diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h index 846123937c..fc70a0c914 100644 --- a/src/lib/eolian/eo_lexer.h +++ b/src/lib/eolian/eo_lexer.h @@ -60,7 +60,7 @@ enum Tokens KW(function), \ KW(__undefined_type), \ \ -KW(true), KW(false), KW(null) +KW(true), KW(false), KW(null), KWAT(ctor_param) /* "regular" keyword and @ prefixed keyword */ #define KW(x) KW_##x diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 90b0db60ae..f55e3e1744 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -1655,10 +1655,17 @@ parse_constructor(Eo_Lexer *ls) ls->klass->base.name, ls->t.value.s); eo_lexer_get(ls); -if (ls->t.kw == KW_at_optional) +while (ls->t.kw == KW_at_optional || ls->t.kw == KW_at_ctor_param) { + if (ls->t.kw == KW_at_optional) + { + ctor->is_optional = EINA_TRUE; + } + if (ls->t.kw == KW_at_ctor_param) + { + ctor->is_ctor_param = EINA_TRUE; + } eo_lexer_get(ls); - ctor->is_optional = EINA_TRUE; } check_next(ls, ';'); return; @@ -1679,10 +1686,17 @@ parse_constructor(Eo_Lexer *ls) if (ls->t.token != '.') break; eo_lexer_get(ls); } - if (ls->t.kw == KW_at_optional) + while (ls->t.kw == KW_at_optional || ls->t.kw == KW_at_ctor_param) { +if (ls->t.kw == KW_at_optional) + { + ctor->is_optional = EINA_TRUE; + } +if (ls->t.kw == KW_at_ctor_param) + { + ctor->is_ctor_param = EINA_TRUE; + } eo_lexer_get(ls); -ctor->is_optional = EINA_TRUE; } check_next(ls, ';'); ctor->base.name = eina_stringshare_add(eina_strbuf_string_get(buf)); diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h index dfbad0c304..3f3ab61b18 100644 --- a/src/lib/eolian/eolian_database.h +++ b/src/lib/eolian/eolian_database.h @@ -309,6 +309,7 @@ struct _Eolian_Constructor Eolian_Object base; const Eol
[EGIT] [tools/examples] master 01/01: efl-mono: Fix examples based on new D7789
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/tools/examples.git/commit/?id=1d5a5322dfc5ad67c9d3c338d0622d736ade1554 commit 1d5a5322dfc5ad67c9d3c338d0622d736ade1554 Author: Felipe Magno de Almeida Date: Mon Jan 28 16:03:49 2019 +0900 efl-mono: Fix examples based on new D7789 --- apps/csharp/life/src/life_board.cs | 4 +--- apps/csharp/life/src/life_main.cs | 3 +-- reference/csharp/core/src/core_event.cs | 5 + reference/csharp/core/src/core_idler.cs | 5 + reference/csharp/core/src/core_poll.cs | 5 + 5 files changed, 5 insertions(+), 17 deletions(-) diff --git a/apps/csharp/life/src/life_board.cs b/apps/csharp/life/src/life_board.cs index 836c0169..26dbf62c 100644 --- a/apps/csharp/life/src/life_board.cs +++ b/apps/csharp/life/src/life_board.cs @@ -60,9 +60,7 @@ public class LifeBoard public void Run(Efl.Ui.Win win) { -lifeTimer = new Efl.LoopTimer(win, (Efl.LoopTimer etimer) => { -etimer.SetInterval(0.1); -}); +lifeTimer = new Efl.LoopTimer(win, 0.1); lifeTimer.TickEvt += (object sender, EventArgs ev) => { Nextgen(); diff --git a/apps/csharp/life/src/life_main.cs b/apps/csharp/life/src/life_main.cs index 4dd34dd6..11e2b816 100644 --- a/apps/csharp/life/src/life_main.cs +++ b/apps/csharp/life/src/life_main.cs @@ -37,8 +37,7 @@ public class LifeWindow public LifeWindow() { -Efl.Ui.Win win = new Efl.Ui.Win(null); -win.SetWinType(Efl.Ui.WinType.Basic); +Efl.Ui.Win win = new Efl.Ui.Win(null, null, Efl.Ui.WinType.Basic); win.SetText("EFL Life"); win.SetAutohide(true); diff --git a/reference/csharp/core/src/core_event.cs b/reference/csharp/core/src/core_event.cs index 2cb6d8e0..b0caac81 100644 --- a/reference/csharp/core/src/core_event.cs +++ b/reference/csharp/core/src/core_event.cs @@ -31,10 +31,7 @@ public class Example mainloop.PollHighEvt += PollCb; // This timer will control events fired by the main loop -var timer = new Efl.LoopTimer(mainloop, (Efl.LoopTimer etimer) => { -// Trigger every 100ms -etimer.SetInterval(0.1); -}); +var timer = new Efl.LoopTimer(mainloop, 0.1); timer.SetName("Timer"); // To count number of timer triggers int tick_count = 0; diff --git a/reference/csharp/core/src/core_idler.cs b/reference/csharp/core/src/core_idler.cs index e8853e51..7e272796 100644 --- a/reference/csharp/core/src/core_idler.cs +++ b/reference/csharp/core/src/core_idler.cs @@ -34,10 +34,7 @@ public class Example }; // Use a timer to exit the application -var timer = new Efl.LoopTimer(mainloop, (Efl.LoopTimer etimer) => { -// Trigger after 10ms -etimer.SetInterval(0.01); -}); +var timer = new Efl.LoopTimer(mainloop, 0.01); timer.TickEvt += (object sender, EventArgs e) => { Console.WriteLine("TIMER: timer callback called, exiting."); mainloop.Quit(new Eina.Value(0)); diff --git a/reference/csharp/core/src/core_poll.cs b/reference/csharp/core/src/core_poll.cs index 3ecf7bc1..522a36aa 100644 --- a/reference/csharp/core/src/core_poll.cs +++ b/reference/csharp/core/src/core_poll.cs @@ -33,10 +33,7 @@ public class Example }; // Use a timer to exit the application -var timer = new Efl.LoopTimer(mainloop, (Efl.LoopTimer etimer) => { -// Trigger after 30s -etimer.SetInterval(30); -}); +var timer = new Efl.LoopTimer(mainloop, 30); timer.TickEvt += (object sender, EventArgs e) => { Console.WriteLine("\nTIMER: timer callback called, exiting."); mainloop.Quit(new Eina.Value(0)); --
[EGIT] [core/efl] master 01/01: efl-mono: Add support for dotnet core
vitorsousa pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f392c5a4363cf09e8c0e50a42c46416a09a72c74 commit f392c5a4363cf09e8c0e50a42c46416a09a72c74 Author: Felipe Magno de Almeida Date: Wed Jan 16 16:29:56 2019 +0900 efl-mono: Add support for dotnet core Summary: This commits adds dotnet as a supported C# platform for EFL# bindings. Due to differences between Mono and Dotnet regarding DllImport, the bindings now are using an imperative approach to load the function pointers through the NativeModule and FunctionWrapper classes. These classes handle the dlopen/LoadLibrary and dlsym/GetProcAddress calls. Also, the previous caching of non-owned strings returned to native code was removed until further memory checks. We also had to create workaround for bool and chars in Structs for C# marshaling. Going through System.Byte instead and Marshaling manually to their respective types. In order to actually build efl_mono.dll with dotnet right now, issue #4782 from Meson should be fixed to make it properly detect and used the Dotnet compiler. Also use "-Ddotnet=true" when running meson. Fixes T7394 Reviewers: felipealmeida, vitor.sousa, bu5hm4n Reviewed By: vitor.sousa Subscribers: cedric Tags: #efl Maniphest Tasks: T7394 Differential Revision: https://phab.enlightenment.org/D8069 --- src/Makefile_Efl_Mono.am | 19 +- src/bin/eolian_mono/eolian/mono/events.hh | 5 +- .../eolian_mono/eolian/mono/function_definition.hh | 75 ++--- .../eolian_mono/eolian/mono/function_pointer.hh| 8 +- .../eolian/mono/function_registration.hh | 7 +- src/bin/eolian_mono/eolian/mono/klass.hh | 18 +- .../eolian_mono/eolian/mono/marshall_annotation.hh | 128 +--- src/bin/eolian_mono/eolian/mono/marshall_type.hh | 46 --- .../eolian_mono/eolian/mono/marshall_type_impl.hh | 26 +- src/bin/eolian_mono/eolian/mono/name_helpers.hh| 18 +- src/bin/eolian_mono/eolian/mono/parameter.hh | 8 +- src/bin/eolian_mono/eolian/mono/part_definition.hh | 2 +- .../eolian_mono/eolian/mono/struct_definition.hh | 44 +++ src/bindings/cxx/eina_cxx/eina_variant.hh | 16 + src/bindings/mono/efl_mono/efl_all.cs | 18 +- src/bindings/mono/efl_mono/efl_libs.cs.in | 16 + src/bindings/mono/eina_mono/eina_common.cs | 10 +- .../mono/eina_mono/eina_container_common.cs| 337 ++--- src/bindings/mono/eina_mono/eina_hash.cs | 151 +++-- src/bindings/mono/eina_mono/eina_inarray.cs| 29 +- src/bindings/mono/eo_mono/FunctionWrapper.cs | 95 ++ src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs | 21 ++ .../mono/eo_mono/FunctionWrapper_Windows.cs| 15 + src/bindings/mono/eo_mono/NativeModule.cs | 33 ++ src/bindings/mono/eo_mono/NativeModule_Unix.cs | 46 +++ src/bindings/mono/eo_mono/NativeModule_Windows.cs | 15 + src/bindings/mono/eo_mono/iwrapper.cs | 95 +++--- src/bindings/mono/eo_mono/meson.build | 10 +- src/bindings/mono/eo_mono/workaround.cs| 8 +- src/bindings/mono/meson.build | 43 ++- src/lib/eolian_cxx/grammar/klass_def.hpp | 67 src/tests/efl_mono/Eo.cs | 7 + src/tests/efl_mono/dummy_test_object.eo| 4 + .../efl_mono/efl-mono-suite.runtimeconfig.json | 10 + src/tests/efl_mono/libefl_mono_native_test.c | 5 + src/tests/efl_mono/meson.build | 37 +++ 36 files changed, 1024 insertions(+), 468 deletions(-) diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am index fe8c66efd4..56c03fbf77 100644 --- a/src/Makefile_Efl_Mono.am +++ b/src/Makefile_Efl_Mono.am @@ -4,8 +4,25 @@ efl_custom_exports_mono_files = \ efl_eo_mono_files = \ bindings/mono/eo_mono/iwrapper.cs \ + bindings/mono/eo_mono/FunctionWrapper.cs \ + bindings/mono/eo_mono/NativeModule.cs \ bindings/mono/eo_mono/workaround.cs +if HAVE_WIN32 + +efl_eo_mono_files += \ + bindings/mono/eo_mono/FunctionWrapper_Windows.cs \ + bindings/mono/eo_mono/NativeModule_Windows.cs + +else + +efl_eo_mono_files += \ + bindings/mono/eo_mono/FunctionWrapper_Unix.cs \ + bindings/mono/eo_mono/NativeModule_Unix.cs + +endif + + efl_eina_mono_files = \ bindings/mono/eina_mono/eina_config.cs \ bindings/mono/eina_mono/eina_array.cs \ @@ -293,7 +310,7 @@ msbuildcsprojs: ../libefl_mono.csproj done ### Some hard-coded runtime dependencies for tests and examples -TEST_PATHS = $(abs_top_builddir)/src/lib/efl_mono:$(abs_top_builddir)/src/lib/efl_mono/.libs:$(abs_top_builddir)/src/lib/eina/.libs:$(abs_top_builddir)/src/lib/ecore/.libs:$(abs_top_builddir)/src/lib/ecore_
[EGIT] [core/efl] master 01/01: efl-mono: Add new dependencies to autotools
woohyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=082d018041bea1a9a2e0ff0c47dcbe3631a227a2 commit 082d018041bea1a9a2e0ff0c47dcbe3631a227a2 Author: Felipe Magno de Almeida Date: Fri Jan 25 20:57:07 2019 +0900 efl-mono: Add new dependencies to autotools Summary: This fix make check for csharp bindings Reviewers: woohyun Reviewed By: woohyun Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7770 --- src/Makefile_Efl_Mono.am | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am index 8c7d2f0373..eb14af98b2 100644 --- a/src/Makefile_Efl_Mono.am +++ b/src/Makefile_Efl_Mono.am @@ -397,14 +397,20 @@ tests/efl_mono/libefl_mono_native_test.c: \ tests/efl_mono/dummy_child.eo.h \ tests/efl_mono/dummy_child.eo.c \ tests/efl_mono/dummy_numberwrapper.eo.h \ - tests/efl_mono/dummy_numberwrapper.eo.c + tests/efl_mono/dummy_numberwrapper.eo.c \ + tests/efl_mono/dummy_inherit_iface.eo.h \ + tests/efl_mono/dummy_inherit_iface.eo.c \ + tests/efl_mono/dummy_inherit_helper.eo.h \ + tests/efl_mono/dummy_inherit_helper.eo.c # Intermediate C Sharp test DLL efl_mono_test_eolian_mono_files = tests/efl_mono/dummy_test_object.eo.cs \ tests/efl_mono/dummy_test_iface.eo.cs \ tests/efl_mono/dummy_another_iface.eo.cs \ tests/efl_mono/dummy_child.eo.cs \ -tests/efl_mono/dummy_numberwrapper.eo.cs +tests/efl_mono/dummy_numberwrapper.eo.cs \ +tests/efl_mono/dummy_inherit_iface.eo.cs \ +tests/efl_mono/dummy_inherit_helper.eo.cs tests/efl_mono/libefl_mono_test.dll: $(efl_mono_test_eolian_mono_files) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll tests/efl_mono/libefl_mono_native_test.la tests/efl_mono/libefl_mono_test.dll.config @rm -f tests/efl_mono/libefl_mono_test.dll --
[EGIT] [core/efl] master 01/01: efl-cxx: Fix compilation error when using a ptr to const any_value
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=36286a23fe97e3667c1106116d1edbc301c7a9ba commit 36286a23fe97e3667c1106116d1edbc301c7a9ba Author: Felipe Magno de Almeida Date: Fri Feb 1 10:46:52 2019 + efl-cxx: Fix compilation error when using a ptr to const any_value Reviewers: lauromoura, cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7858 --- src/bindings/cxx/eo_cxx/eo_cxx_interop.hh | 4 1 file changed, 4 insertions(+) diff --git a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh index c0ed323c27..4af1c56efd 100644 --- a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh +++ b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh @@ -707,6 +707,10 @@ inline efl::eina::value_view convert_to_return(Eina_Value* value, tag) +{ + return efl::eina::value_view{const_cast(value)}; +} template T convert_to_return(U* value, tag, typename std::enable_if::value || is_container::value>::type* = 0) { --
[EGIT] [core/efl] master 01/02: eolian-mono: Provide constructor parameters based on the constructors section of the Eo files.
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0223bb29dfc4c1621ace044395196064c82b98de commit 0223bb29dfc4c1621ace044395196064c82b98de Author: Felipe Magno de Almeida Date: Fri Feb 1 14:03:02 2019 -0500 eolian-mono: Provide constructor parameters based on the constructors section of the Eo files. Reviewers: woohyun, segfaultxavi, bu5hm4n, felipealmeida Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7789 --- src/bin/eolian_mono/eolian/mono/documentation.hh | 48 + src/bin/eolian_mono/eolian/mono/helpers.hh | 6 ++ src/bin/eolian_mono/eolian/mono/klass.hh | 63 +--- src/bin/eolian_mono/eolian/mono/name_helpers.hh | 11 +++ src/bin/eolian_mono/eolian/mono/parameter.hh | 120 +++ src/bin/eolian_mono/eolian/mono/type.hh | 14 +-- src/bin/eolian_mono/eolian/mono/type_impl.hh | 72 ++ src/bindings/mono/eo_mono/iwrapper.cs| 17 src/tests/efl_mono/Eo.cs | 63 +--- src/tests/efl_mono/Events.cs | 9 +- src/tests/efl_mono/dummy_child.eo| 21 src/tests/efl_mono/libefl_mono_native_test.c | 40 12 files changed, 399 insertions(+), 85 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/documentation.hh b/src/bin/eolian_mono/eolian/mono/documentation.hh index 3acec94102..d2f4669b2c 100644 --- a/src/bin/eolian_mono/eolian/mono/documentation.hh +++ b/src/bin/eolian_mono/eolian/mono/documentation.hh @@ -84,6 +84,29 @@ struct documentation_generator return name; } + static std::string function_conversion(attributes::function_def const& func) + { + attributes::klass_def klass(get_klass(func.klass, func.unit), func.unit); + std::string name = name_helpers::klass_full_concrete_or_interface_name(klass); + switch (func.type) + { + // managed_method_name takes care of reordering the function name so the get/set goes first + // for properties + case attributes::function_type::method: + case attributes::function_type::prop_set: + case attributes::function_type::prop_get: +if (blacklist::is_function_blacklisted(func.c_name))return ""; +name += "."; +name += name_helpers::managed_method_name(klass.eolian_name, func.name); +break; + default: +// No need to deal with property as function_defs are converted to get/set when building a given klass_def. +break; + } + + return name; + } + // Turns an Eolian reference like @Efl.Input.Pointer.tool into a tag static std::string ref_conversion(const ::Eolian_Doc_Token *token, const Eolian_State *state, std::string name_tail) { @@ -299,6 +322,31 @@ struct documentation_generator { return generate_tag_summary(sink, doc.full_text, context); } + + template + bool generate(OutputIterator sink, attributes::constructor_def const& ctor, Context const& context) const + { + // Not sure if this is the best way to generate a reference outside the full doc generator. + auto unit = (const Eolian_Unit*) context_find_tag(context).state; + auto func = ctor.function; + auto eolian_klass = get_klass(func.klass, unit); + attributes::klass_def klass(eolian_klass, unit); + std::string summary; + + if (func.type == attributes::function_type::prop_set) + summary = func.property_documentation.summary; + else + summary = func.documentation.summary; + + for (auto & : ctor.function.parameters) +{ + if (!as_generator( + scope_tab << "///" << summary << " See \n" + ).generate(sink, param, context)) +return false; +} + return true; + } }; struct documentation_terminal diff --git a/src/bin/eolian_mono/eolian/mono/helpers.hh b/src/bin/eolian_mono/eolian/mono/helpers.hh index ed72345009..87a1e9db39 100644 --- a/src/bin/eolian_mono/eolian/mono/helpers.hh +++ b/src/bin/eolian_mono/eolian/mono/helpers.hh @@ -221,6 +221,12 @@ inline bool is_unique_event(attributes::event_def const& evt }); } +inline std::vector reorder_constructors(std::vector constructors) +{ + auto is_required = [](attributes::constructor_def const& ctr) { return !ctr.is_optional; }; + std::stable_partition(constructors.begin(), constructors.end(), is_required); + return constructors; +} } // namespace helpers diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh index 6a2c8186eb..d8f2e7e4f7 100644 --- a/src/bin/eolian_mono/eolian/mono/klass.hh
[EGIT] [core/efl] efl-1.22 13/57: efl-mono: Add test and fix problem with private dynamic types passed as parameters
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=715b382460a38ac9ac73b38ed455830e68645271 commit 715b382460a38ac9ac73b38ed455830e68645271 Author: Felipe Magno de Almeida Date: Tue Apr 9 18:37:01 2019 -0300 efl-mono: Add test and fix problem with private dynamic types passed as parameters Summary: The code that searches the type dynamically fails instead of falling back to Efl.Object. Now it fallbacks to Efl.Object. Fixes T7783 Reviewers: bu5hm4n, vitor.sousa, segfaultxavi, woohyun, Jaehyun_Cho, YOhoho, lauromoura Reviewed By: vitor.sousa, lauromoura Subscribers: lauromoura, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7783 Differential Revision: https://phab.enlightenment.org/D8574 --- src/bindings/mono/eo_mono/iwrapper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs index 83d8fd53ca..5850da8c5c 100644 --- a/src/bindings/mono/eo_mono/iwrapper.cs +++ b/src/bindings/mono/eo_mono/iwrapper.cs @@ -824,7 +824,7 @@ public static class ClassRegister if (t == null) { -throw new System.InvalidOperationException($"Could not find the C# binding class for the EFL class: {name}"); +return typeof(Efl.Object); } } --
[EGIT] [core/efl] efl-1.22 10/57: efl-mono: Fix --enable-mono-beta for tests
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=12acfd2840b3b65853cceb77543de34a8782af65 commit 12acfd2840b3b65853cceb77543de34a8782af65 Author: Felipe Magno de Almeida Date: Tue Apr 9 11:07:50 2019 -0300 efl-mono: Fix --enable-mono-beta for tests Reviewers: bu5hm4n, vitor.sousa, segfaultxavi, woohyun, Jaehyun_Cho, YOhoho, lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8573 --- src/Makefile_Efl_Mono.am | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am index d8c9dc55ab..43f2a1c6e2 100644 --- a/src/Makefile_Efl_Mono.am +++ b/src/Makefile_Efl_Mono.am @@ -495,9 +495,15 @@ tests_efl_mono_efl_mono_SOURCES = \ tests/efl_mono/EinaTestData.cs \ tests/efl_mono/StructHelpers.cs +beta_mono_flags = + +if HAVE_CSHARP_BETA +beta_mono_flags += -define:EFL_BETA +endif + tests/efl_mono/efl_mono$(EXEEXT): $(tests_efl_mono_efl_mono_SOURCES) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll tests/efl_mono/libefl_mono_test.dll tests/efl_mono/efl_mono$(EXEEXT).config @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll -out:$@ $(filter %.cs, $(^)) $(beta_mono_flags) # Rule for generating the .cs files tests/efl_mono/%.eo.cs: tests/efl_mono/%.eo $(_EOLIAN_MONO_DEP) --
[EGIT] [core/efl] efl-1.22 11/57: efl-mono: Make override of methods only for methods that are defined by the user
zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=06991872dd7fe19bf935f038ca6a1cb5f5c240c4 commit 06991872dd7fe19bf935f038ca6a1cb5f5c240c4 Author: Felipe Magno de Almeida Date: Tue Apr 9 11:16:17 2019 -0300 efl-mono: Make override of methods only for methods that are defined by the user Summary: Instead of overriding every method and making the callback to C, we just override the methods that are found by reflection on the type. Reviewers: bu5hm4n, vitor.sousa, segfaultxavi, woohyun, Jaehyun_Cho, YOhoho, lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8579 --- .../eolian/mono/function_registration.hh | 7 +-- src/bin/eolian_mono/eolian/mono/klass.hh | 1 + src/bindings/mono/eo_mono/iwrapper.cs | 23 ++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/function_registration.hh b/src/bin/eolian_mono/eolian/mono/function_registration.hh index 5898af9c27..fc044e6b72 100644 --- a/src/bin/eolian_mono/eolian/mono/function_registration.hh +++ b/src/bin/eolian_mono/eolian/mono/function_registration.hh @@ -44,7 +44,10 @@ struct function_registration_generator return false; if(!as_generator - (scope_tab << scope_tab << "descs.Add(new Efl_Op_Description() {" + (scope_tab << scope_tab +<< "if (methods.FirstOrDefault(m => m.Name == \"" << string << "\") != null)\n" +<< scope_tab << scope_tab << scope_tab +<< "descs.Add(new Efl_Op_Description() {" #ifdef _WIN32 << "api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\")" #else @@ -52,7 +55,7 @@ struct function_registration_generator #endif << ", func = Marshal.GetFunctionPointerForDelegate(" << string << "_static_delegate)});\n" ) - .generate(sink, std::make_tuple(f.c_name, f.c_name), context)) + .generate(sink, std::make_tuple(name_helpers::managed_method_name(f), f.c_name, f.c_name), context)) return false; return true; } diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh index e34a126321..87ad1bd5a7 100644 --- a/src/bin/eolian_mono/eolian/mono/klass.hh +++ b/src/bin/eolian_mono/eolian/mono/klass.hh @@ -369,6 +369,7 @@ struct klass << scope_tab << "public override System.Collections.Generic.List GetEoOps(System.Type type)\n" << scope_tab << "{\n" << scope_tab << scope_tab << "var descs = new System.Collections.Generic.List();\n" + << scope_tab << scope_tab << "var methods = Efl.Eo.Globals.GetUserMethods(type);\n" ) .generate(sink, attributes::unused, inative_cxt)) return false; diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs index 1aab776f26..f3696606d2 100644 --- a/src/bindings/mono/eo_mono/iwrapper.cs +++ b/src/bindings/mono/eo_mono/iwrapper.cs @@ -302,6 +302,29 @@ public class Globals return null; } +public static System.Collections.Generic.List +GetUserMethods(System.Type type) +{ +var r = new System.Collections.Generic.List(); +r.AddRange(type.GetMethods()); +var base_type = type.BaseType; + +for (;base_type != null; base_type = base_type.BaseType) +{ +var attrs = System.Attribute.GetCustomAttributes(type); +foreach (var attr in attrs) +{ +if (attr is Efl.Eo.NativeClass) +{ +return r; +} +} + +r.AddRange(base_type.GetMethods()); +} +return r; +} + public static byte class_initializer_call(IntPtr klass, System.Type type) { Eina.Log.Debug($"called with 0x{klass.ToInt64():x} {type}"); --
[EGIT] [core/efl] master 01/01: efl-mono: Add test and fix problem with private dynamic types passed as parameters
vitorsousa pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0afd19ba62f38567c12cb1bf953ffdd4d402f382 commit 0afd19ba62f38567c12cb1bf953ffdd4d402f382 Author: Felipe Magno de Almeida Date: Tue Apr 9 18:37:01 2019 -0300 efl-mono: Add test and fix problem with private dynamic types passed as parameters Summary: The code that searches the type dynamically fails instead of falling back to Efl.Object. Now it fallbacks to Efl.Object. Fixes T7783 Reviewers: bu5hm4n, vitor.sousa, segfaultxavi, woohyun, Jaehyun_Cho, YOhoho, lauromoura Reviewed By: vitor.sousa, lauromoura Subscribers: lauromoura, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7783 Differential Revision: https://phab.enlightenment.org/D8574 --- src/bindings/mono/eo_mono/iwrapper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs index 83d8fd53ca..5850da8c5c 100644 --- a/src/bindings/mono/eo_mono/iwrapper.cs +++ b/src/bindings/mono/eo_mono/iwrapper.cs @@ -824,7 +824,7 @@ public static class ClassRegister if (t == null) { -throw new System.InvalidOperationException($"Could not find the C# binding class for the EFL class: {name}"); +return typeof(Efl.Object); } } --
[EGIT] [core/efl] master 01/01: efl-mono: Fix --enable-mono-beta for tests
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b1f0031b55b356f9722ee643844fd055653c9678 commit b1f0031b55b356f9722ee643844fd055653c9678 Author: Felipe Magno de Almeida Date: Tue Apr 9 11:07:50 2019 -0300 efl-mono: Fix --enable-mono-beta for tests Reviewers: bu5hm4n, vitor.sousa, segfaultxavi, woohyun, Jaehyun_Cho, YOhoho, lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8573 --- src/Makefile_Efl_Mono.am | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am index d8c9dc55ab..43f2a1c6e2 100644 --- a/src/Makefile_Efl_Mono.am +++ b/src/Makefile_Efl_Mono.am @@ -495,9 +495,15 @@ tests_efl_mono_efl_mono_SOURCES = \ tests/efl_mono/EinaTestData.cs \ tests/efl_mono/StructHelpers.cs +beta_mono_flags = + +if HAVE_CSHARP_BETA +beta_mono_flags += -define:EFL_BETA +endif + tests/efl_mono/efl_mono$(EXEEXT): $(tests_efl_mono_efl_mono_SOURCES) tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll tests/efl_mono/libefl_mono_test.dll tests/efl_mono/efl_mono$(EXEEXT).config @rm -f $@ - $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll -out:$@ $(filter %.cs, $(^)) + $(AM_V_MCS) $(MCS) $(MCSFLAGS) -r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll -r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll -out:$@ $(filter %.cs, $(^)) $(beta_mono_flags) # Rule for generating the .cs files tests/efl_mono/%.eo.cs: tests/efl_mono/%.eo $(_EOLIAN_MONO_DEP) --
[EGIT] [core/efl] master 01/01: efl-mono: Make override of methods only for methods that are defined by the user
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=df3b28b0ab650beb5d0fede24b164d2cc9c40ba9 commit df3b28b0ab650beb5d0fede24b164d2cc9c40ba9 Author: Felipe Magno de Almeida Date: Tue Apr 9 11:16:17 2019 -0300 efl-mono: Make override of methods only for methods that are defined by the user Summary: Instead of overriding every method and making the callback to C, we just override the methods that are found by reflection on the type. Reviewers: bu5hm4n, vitor.sousa, segfaultxavi, woohyun, Jaehyun_Cho, YOhoho, lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8579 --- .../eolian/mono/function_registration.hh | 7 +-- src/bin/eolian_mono/eolian/mono/klass.hh | 1 + src/bindings/mono/eo_mono/iwrapper.cs | 23 ++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/function_registration.hh b/src/bin/eolian_mono/eolian/mono/function_registration.hh index 5898af9c27..fc044e6b72 100644 --- a/src/bin/eolian_mono/eolian/mono/function_registration.hh +++ b/src/bin/eolian_mono/eolian/mono/function_registration.hh @@ -44,7 +44,10 @@ struct function_registration_generator return false; if(!as_generator - (scope_tab << scope_tab << "descs.Add(new Efl_Op_Description() {" + (scope_tab << scope_tab +<< "if (methods.FirstOrDefault(m => m.Name == \"" << string << "\") != null)\n" +<< scope_tab << scope_tab << scope_tab +<< "descs.Add(new Efl_Op_Description() {" #ifdef _WIN32 << "api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\")" #else @@ -52,7 +55,7 @@ struct function_registration_generator #endif << ", func = Marshal.GetFunctionPointerForDelegate(" << string << "_static_delegate)});\n" ) - .generate(sink, std::make_tuple(f.c_name, f.c_name), context)) + .generate(sink, std::make_tuple(name_helpers::managed_method_name(f), f.c_name, f.c_name), context)) return false; return true; } diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh index e34a126321..87ad1bd5a7 100644 --- a/src/bin/eolian_mono/eolian/mono/klass.hh +++ b/src/bin/eolian_mono/eolian/mono/klass.hh @@ -369,6 +369,7 @@ struct klass << scope_tab << "public override System.Collections.Generic.List GetEoOps(System.Type type)\n" << scope_tab << "{\n" << scope_tab << scope_tab << "var descs = new System.Collections.Generic.List();\n" + << scope_tab << scope_tab << "var methods = Efl.Eo.Globals.GetUserMethods(type);\n" ) .generate(sink, attributes::unused, inative_cxt)) return false; diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs index 1aab776f26..f3696606d2 100644 --- a/src/bindings/mono/eo_mono/iwrapper.cs +++ b/src/bindings/mono/eo_mono/iwrapper.cs @@ -302,6 +302,29 @@ public class Globals return null; } +public static System.Collections.Generic.List +GetUserMethods(System.Type type) +{ +var r = new System.Collections.Generic.List(); +r.AddRange(type.GetMethods()); +var base_type = type.BaseType; + +for (;base_type != null; base_type = base_type.BaseType) +{ +var attrs = System.Attribute.GetCustomAttributes(type); +foreach (var attr in attrs) +{ +if (attr is Efl.Eo.NativeClass) +{ +return r; +} +} + +r.AddRange(base_type.GetMethods()); +} +return r; +} + public static byte class_initializer_call(IntPtr klass, System.Type type) { Eina.Log.Debug($"called with 0x{klass.ToInt64():x} {type}"); --
[EGIT] [core/efl] master 01/01: Fix invalid XML comment in efl_mono.dll.config
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3a385ccae02d7f5f83000beacb8fa7e4c987b378 commit 3a385ccae02d7f5f83000beacb8fa7e4c987b378 Author: Felipe Magno de Almeida Date: Wed Dec 4 01:27:56 2019 + Fix invalid XML comment in efl_mono.dll.config Use to comment the license files Reviewed-by: João Paulo Taylor Ienczak Zanette Differential Revision: https://phab.enlightenment.org/D10790 --- src/bindings/mono/efl_mono.dll.config.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bindings/mono/efl_mono.dll.config.in b/src/bindings/mono/efl_mono.dll.config.in index 4fe8699d10..25d216b1a0 100644 --- a/src/bindings/mono/efl_mono.dll.config.in +++ b/src/bindings/mono/efl_mono.dll.config.in @@ -1,3 +1,4 @@ + --
[EGIT] [core/efl] master 01/01: C#: Fix using beta for lists and hashes in tests
xartigas pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fdcc0053c609a021171db76a92a7ae36625154f6 commit fdcc0053c609a021171db76a92a7ae36625154f6 Author: Felipe Magno de Almeida Date: Wed Jan 29 16:22:15 2020 +0100 C#: Fix using beta for lists and hashes in tests Reviewers: segfaultxavi, bu5hm4n Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11235 --- src/tests/efl_mono/Eina.cs | 3 +- src/tests/efl_mono/dummy_test_object.eo | 50 - 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/tests/efl_mono/Eina.cs b/src/tests/efl_mono/Eina.cs index 461dee6759..162eac63ba 100644 --- a/src/tests/efl_mono/Eina.cs +++ b/src/tests/efl_mono/Eina.cs @@ -2050,7 +2050,7 @@ class TestEinaList // // Integer // - +#if EFL_BETA public static void test_eina_list_int_in() { var t = new Dummy.TestObject(); @@ -2330,6 +2330,7 @@ class TestEinaList a.Dispose(); t.Dispose(); } +#endif } class TestEinaInlist diff --git a/src/tests/efl_mono/dummy_test_object.eo b/src/tests/efl_mono/dummy_test_object.eo index ee24e5ef9b..41c947ee07 100644 --- a/src/tests/efl_mono/dummy_test_object.eo +++ b/src/tests/efl_mono/dummy_test_object.eo @@ -574,14 +574,14 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface { /* Eina List */ /* Integer */ - eina_list_int_in { + eina_list_int_in @beta { params { @in lst: list; } return: bool; } - eina_list_int_in_own { + eina_list_int_in_own @beta { params { @in lst: list @move; // } @@ -591,7 +591,7 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface { return: bool; } - eina_list_int_out { + eina_list_int_out @beta { params { @out lst: list; } @@ -601,33 +601,33 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface { return: bool; } - eina_list_int_out_own { + eina_list_int_out_own @beta { params { @out lst: list @move; // } return: bool; } - eina_list_int_return { + eina_list_int_return @beta { return: list; } check_eina_list_int_return { return: bool; } - eina_list_int_return_own { + eina_list_int_return_own @beta { return: list @move; // } /* String */ - eina_list_str_in { + eina_list_str_in @beta { params { @in lst: list; } return: bool; } - eina_list_str_in_own { + eina_list_str_in_own @beta { params { @in lst: list @move; } @@ -637,7 +637,7 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface { return: bool; } - eina_list_str_out { + eina_list_str_out @beta { params { @out lst: list; } @@ -647,33 +647,33 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface { return: bool; } - eina_list_str_out_own { + eina_list_str_out_own @beta { params { @out lst: list @move; } return: bool; } - eina_list_str_return { + eina_list_str_return @beta { return: list; } check_eina_list_str_return { return: bool; } - eina_list_str_return_own { + eina_list_str_return_own @beta { return: list @move; } /* Eina_Stringshare */ - eina_list_strshare_in { + eina_list_strshare_in @beta { params { @in lst: list; } return: bool; } - eina_list_strshare_in_own { + eina_list_strshare_in_own @beta { params { @in lst: list @move; } @@ -683,7 +683,7 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface { return: bool; } - eina_list_strshare_out { + eina_list_strshare_out @beta { params { @out lst: list; } @@ -693,33 +693,33 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface { return: bool; } - eina_list_strshare_out_own { + eina_list_strshare_out_own @beta { params { @out lst: list @move; } return: bool; } - eina_list_strshare_return { + eina_list_strshare_return @beta { return: list; } check_eina_list_strshare_return { return: bool; } - eina_list_strshare_return_own
[EGIT] [core/efl] master 01/01: C#: Add error checking for Eina.Success_Flag return type
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=df0715a9aa27903dd549c2b4516ab2cba0274413 commit df0715a9aa27903dd549c2b4516ab2cba0274413 Author: Felipe Magno de Almeida Date: Tue Feb 11 17:48:26 2020 + C#: Add error checking for Eina.Success_Flag return type When a get and/or set from property is defined to return, explicitly, a Eina.Success_Flag, the mono generator will check the return value and generate an exception if the call fails. Resolves T8383. Reviewed-by: João Paulo Taylor Ienczak Zanette Differential Revision: https://phab.enlightenment.org/D11281 --- .../eolian_mono/eolian/mono/function_definition.hh | 147 + .../eolian_mono/eolian/mono/property_definition.hh | 7 +- src/lib/eina/eina_error.h | 9 ++ src/lib/eo/eina_types.eot | 4 + src/lib/eolian_cxx/grammar/eps.hpp | 8 +- src/tests/efl_mono/Eo.cs | 21 +++ src/tests/efl_mono/dummy_test_object.c | 58 src/tests/efl_mono/dummy_test_object.eo| 58 +++- 8 files changed, 250 insertions(+), 62 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh index 6aeaadcedb..5fc0e84fbf 100644 --- a/src/bin/eolian_mono/eolian/mono/function_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh @@ -39,6 +39,7 @@ #include "using_decl.hh" #include "generation_contexts.hh" #include "blacklist.hh" +#include "grammar/eps.hpp" namespace eolian_mono { @@ -369,6 +370,7 @@ struct property_wrapper_definition_generator { using efl::eolian::grammar::attribute_reorder; using efl::eolian::grammar::counter; + using efl::eolian::grammar::eps; using efl::eolian::grammar::attributes::parameter_direction; using efl::eolian::grammar::attributes::parameter_def; @@ -457,6 +459,7 @@ struct property_wrapper_definition_generator bool is_get_public = get_scope == "public "; std::string set_scope = property.setter.is_engaged() ? eolian_mono::function_scope_get(*property.setter) : ""; bool is_set_public = set_scope == "public "; + bool get_has_return_error = false, set_has_return_error = false; // No need to generate this wrapper as no accessor is public. if (is_interface && (!is_get_public && !is_set_public)) @@ -490,6 +493,12 @@ struct property_wrapper_definition_generator set_scope = ""; } + if (property.getter && property.getter->explicit_return_type.c_type == "Eina_Success_Flag") + get_has_return_error = true; + + if (property.setter && property.setter->explicit_return_type.c_type == "Eina_Success_Flag") + set_has_return_error = true; + if (parameters.size() == 1) { if (!as_generator( @@ -510,73 +519,95 @@ struct property_wrapper_definition_generator return false; } - if (property.getter.is_engaged() && is_interface) + if (property.getter) { -if (is_get_public) +auto managed_getter_name = name_helpers::managed_method_name(*property.getter); +if (is_interface) +{ + if (is_get_public) + { +if (!as_generator(scope_tab(2) << scope_tab << set_scope << "get;\n" + ).generate(sink, attributes::unused, context)) + return false; + } +} +else if (get_params == 0) { - if (!as_generator(scope_tab(2) << scope_tab << set_scope << "get;\n" -).generate(sink, attributes::unused, context)) + if (!as_generator + (scope_tab(2) << scope_tab << get_scope + << "get " << "{ return " + managed_getter_name + "(); }\n" + ).generate(sink, attributes::unused, context)) return false; } - } - else if (property.getter.is_engaged() && get_params == 0/*parameters.size() == 1 && property.getter.is_engaged()*/) - { -if (!as_generator -(scope_tab(2) << scope_tab << get_scope - << "get " << "{ return " + name_helpers::managed_method_name(*property.getter) + "(); }\n" -).generate(sink, attributes::unused, context)) - return false; - } - else if (parameters.size() >= 1 && property.getter) - { -if (!as_generator - (scope_tab(2) << scope_tab << get_sc
[EGIT] [core/efl] master 01/01: eolian-mono: Make Get/Set internal for generated properties
felipealmeida pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=595cb754b3aa280cdbebcb5fa0c51f287099b713 commit 595cb754b3aa280cdbebcb5fa0c51f287099b713 Author: Felipe Magno de Almeida Date: Thu Jan 30 16:49:04 2020 -0300 eolian-mono: Make Get/Set internal for generated properties Make Get and Set methods internal for properties that get the property syntax generated. Reviewed-by: João Paulo Taylor Ienczak Zanette Differential Revision: https://phab.enlightenment.org/D11252 --- .../eolian/mono/async_function_definition.hh | 5 +- src/bin/eolian_mono/eolian/mono/documentation.hh | 174 -- .../eolian_mono/eolian/mono/function_definition.hh | 96 -- src/bin/eolian_mono/eolian/mono/helpers.hh | 106 ++ src/bin/eolian_mono/eolian/mono/klass.hh | 45 ++- src/bin/eolian_mono/eolian/mono/parameter.hh | 33 ++ .../eolian_mono/eolian/mono/property_definition.hh | 383 + src/bindings/cxx/eina_cxx/eina_variant.hh | 239 - src/bindings/mono/efl_mono/GenericModel.cs | 24 +- src/bindings/mono/eo_mono/EoWrapper.cs | 2 +- src/lib/eolian_cxx/grammar/context.hpp | 25 +- src/tests/efl_mono/Eina.cs | 258 +++--- src/tests/efl_mono/EinaTestData.cs | 30 +- src/tests/efl_mono/Eo.cs | 45 +-- src/tests/efl_mono/Events.cs | 8 +- src/tests/efl_mono/Model.cs| 2 +- src/tests/efl_mono/Parts.cs| 8 +- src/tests/efl_mono/StructHelpers.cs| 4 +- 18 files changed, 1200 insertions(+), 287 deletions(-) diff --git a/src/bin/eolian_mono/eolian/mono/async_function_definition.hh b/src/bin/eolian_mono/eolian/mono/async_function_definition.hh index bc0bb6863a..3fddb03780 100644 --- a/src/bin/eolian_mono/eolian/mono/async_function_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/async_function_definition.hh @@ -36,6 +36,7 @@ #include "using_decl.hh" #include "generation_contexts.hh" #include "blacklist.hh" +#include "documentation.hh" namespace eolian_mono { @@ -71,8 +72,10 @@ struct async_function_declaration_generator if(f.scope != attributes::member_scope::scope_public) return true; +auto ref = documentation_generator::function_conversion (f, context); + if (!as_generator( -scope_tab(2) << "/// Async wrapper for .\n" +scope_tab(2) << "/// Async wrapper for .\n" ).generate(sink, attributes::unused, context)) return false; diff --git a/src/bin/eolian_mono/eolian/mono/documentation.hh b/src/bin/eolian_mono/eolian/mono/documentation.hh index d15f91437d..eac5e1a179 100644 --- a/src/bin/eolian_mono/eolian/mono/documentation.hh +++ b/src/bin/eolian_mono/eolian/mono/documentation.hh @@ -23,6 +23,7 @@ #include "name_helpers.hh" #include "generation_contexts.hh" #include "blacklist.hh" +#include "property_definition.hh" #include @@ -76,7 +77,8 @@ struct documentation_generator // The name_tail parameter is the last 4 chars of the original string, which // could be ".set" or ".get" and in this case they are ignored by Eolian. // We want them to know what the documentation intended to reference. - static std::string function_conversion(const ::Eolian_Object *klass, const ::Eolian_Function *function, std::string name_tail) + template + static std::string function_conversion(const ::Eolian_Object *klass, const ::Eolian_Function *function, std::string name_tail, Context const& context) { ::Eolian_Function_Type ftype = ::eolian_function_type_get(function); const char* eo_name = ::eolian_function_name_get(function); @@ -113,26 +115,65 @@ struct documentation_generator name += name_helpers::managed_method_name({function, ftype, NULL, eolian_object_unit_get(EOLIAN_OBJECT(function))}); break; case ::EOLIAN_PROP_SET: - name += ".Set"; - name += name_helpers::property_managed_name(klass_d, eo_name); - break; case ::EOLIAN_PROP_GET: - name += ".Get"; - name += name_helpers::property_managed_name(klass_d, eo_name); - break; case ::EOLIAN_PROPERTY: + { + efl::eina::optional getter_func; + efl::eina::optional setter_func; + auto unit = (const Eolian_Unit*) context_find_tag(context).state; + if (ftype == ::EOLIAN_PROPERTY || ftype == ::EOLIAN_PROP_GET) + getter_func = attributes::function_def{function, ::EOLIAN_PROP_GET, nullptr, unit}; + if (ftype == ::EOLIAN_PROPERTY || ftype == ::EOLIAN_PROP_SET) + setter_func = attribut
[EGIT] [core/efl] master 01/01: c#: Remove warning about unused variable
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=77db0820e37b5a2b2f66562a00b8c689b5f2c022 commit 77db0820e37b5a2b2f66562a00b8c689b5f2c022 Author: Felipe Magno de Almeida Date: Tue Jan 14 11:02:05 2020 -0300 c#: Remove warning about unused variable Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D11097 --- src/bindings/mono/efl_mono/efl_csharp_application.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindings/mono/efl_mono/efl_csharp_application.cs b/src/bindings/mono/efl_mono/efl_csharp_application.cs index 9c2f7f0f06..c4abdfe76c 100644 --- a/src/bindings/mono/efl_mono/efl_csharp_application.cs +++ b/src/bindings/mono/efl_mono/efl_csharp_application.cs @@ -198,10 +198,10 @@ public abstract class Application { Init(components); Efl.App app = Efl.App.AppMain; +#if EFL_BETA var command_line = new List(); //command_line.Add(List.ConvertAll(Environment.GetCommandLineArgs(), s => (Eina.Stringshare)s)); //command_line.AddRange(Environment.GetCommandLineArgs()); -#if EFL_BETA app.SetCommandArray(command_line); #endif app.ArgumentsEvent += (object sender, LoopArgumentsEventArgs evt) => --
[EGIT] [core/efl] master 01/01: C++: Fix use of @c_type tag in struct definition
zmike pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=25e52f81066b79fdf758cbd97830a85fdb88c0a9 commit 25e52f81066b79fdf758cbd97830a85fdb88c0a9 Author: Felipe Magno de Almeida Date: Fri Jan 17 09:51:24 2020 -0500 C++: Fix use of @c_type tag in struct definition Summary: Depends on D11090 Reviewers: zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11099 --- src/lib/eolian_cxx/grammar/type_impl.hpp | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/eolian_cxx/grammar/type_impl.hpp b/src/lib/eolian_cxx/grammar/type_impl.hpp index 29d28857f9..b43641a052 100644 --- a/src/lib/eolian_cxx/grammar/type_impl.hpp +++ b/src/lib/eolian_cxx/grammar/type_impl.hpp @@ -283,7 +283,14 @@ struct visitor_generate } else { - if(as_generator + if(regular.type_type == attributes::typedecl_type::struct_ + || regular.type_type == attributes::typedecl_type::struct_opaque) + { +std::copy (c_type.begin(), c_type.end(), sink); +return true; + } + else +if(as_generator ( *(string << "_") << string --
[EGIT] [core/efl] master 01/01: eolian: inherit since information from struct and enum to field
woohyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b3cc7d403b4a9f69f2ad8c4bbd37e482f34e6deb commit b3cc7d403b4a9f69f2ad8c4bbd37e482f34e6deb Author: Felipe Magno de Almeida Date: Tue Dec 24 07:26:33 2019 +0900 eolian: inherit since information from struct and enum to field Summary: If a struct or enum field doesn't explicitly sets since information, then since is inherited from struct documentation if it is available. Reviewers: jptiz, Jaehyun_Cho, woohyun, q66 Reviewed By: q66 Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8359 Differential Revision: https://phab.enlightenment.org/D10948 --- src/lib/eolian/eo_parser.c| 4 src/tests/eolian/data/docs_ref.h | 18 ++ src/tests/eolian/data/eo_docs.eo | 4 +++- src/tests/eolian/eolian_parsing.c | 3 ++- src/tests/eolian_cxx/eolian_cxx_test_documentation.cc | 4 ++-- 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c index 96de7a77ec..253e99e929 100644 --- a/src/lib/eolian/eo_parser.c +++ b/src/lib/eolian/eo_parser.c @@ -536,6 +536,8 @@ parse_struct(Eo_Lexer *ls, const char *name, Eina_Bool is_extern, qual_end: check_next(ls, ';'); FILL_DOC(ls, fdef, doc); +if (def->doc && fdef->doc && def->doc->since && !fdef->doc->since) + fdef->doc->since = eina_stringshare_ref (def->doc->since); } check_match(ls, '}', '{', bline, bcolumn); FILL_BASE(def->base, ls, line, column, TYPEDECL); @@ -656,6 +658,8 @@ parse_enum(Eo_Lexer *ls, const char *name, Eina_Bool is_extern, if (want_next) eo_lexer_get(ls); FILL_DOC(ls, fdef, doc); +if (def->doc && fdef->doc && def->doc->since && !fdef->doc->since) + fdef->doc->since = eina_stringshare_ref (def->doc->since); if (!want_next || ls->t.token == '}') break; } diff --git a/src/tests/eolian/data/docs_ref.h b/src/tests/eolian/data/docs_ref.h index 158b814ae0..a00fafb5a5 100644 --- a/src/tests/eolian/data/docs_ref.h +++ b/src/tests/eolian/data/docs_ref.h @@ -29,20 +29,30 @@ typedef Eo Eo_Docs; */ typedef struct _Foo { - int field1; /**< Field documentation. */ + int field1; /**< Field documentation. + * + * @since 1.66 */ float field2; - short field3; /**< Another field documentation. */ + short field3; /**< Another field documentation. + * + * @since 1.66 */ } Foo; /** Docs for enum Bar. + * + * @since 1.55 * * @ingroup Bar */ typedef enum { BAR_BLAH = 0, - BAR_FOO = 1, /**< Docs for foo. */ - BAR_BAR = 2 /**< Docs for bar. */ + BAR_FOO = 1, /**< Docs for foo. +* +* @since 1.55 */ + BAR_BAR = 2 /**< Docs for bar. + * + * @since 1.55 */ } Bar; /** diff --git a/src/tests/eolian/data/eo_docs.eo b/src/tests/eolian/data/eo_docs.eo index d42cdfcd95..8c62559d5a 100644 --- a/src/tests/eolian/data/eo_docs.eo +++ b/src/tests/eolian/data/eo_docs.eo @@ -19,7 +19,9 @@ struct Foo { } enum Bar { -[[Docs for enum Bar.]] +[[Docs for enum Bar. + @since 1.55 +]] blah = 0, foo = 1, [[Docs for foo.]] bar = 2 [[Docs for bar.]] diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index ac06f99eba..9d137dcec3 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -1150,7 +1150,8 @@ EFL_START_TEST(eolian_docs) fail_if(strcmp(eolian_documentation_summary_get(doc), "Docs for enum Bar.")); fail_if(eolian_documentation_description_get(doc)); - fail_if(eolian_documentation_since_get(doc)); + fail_if(strcmp(eolian_documentation_since_get(doc), + "1.55")); fail_if(!(efl = eolian_typedecl_enum_field_get(tdl, "blah"))); fail_if(eolian_typedecl_enum_field_documentation_get(efl)); diff --git a/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc b/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc index 961519d16e..eb683e3312 100644 --- a/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc +++ b/src/tests/eolian_cxx/eolian_cxx_test_documentation.cc @@ -279,7 +279,7 @@ EFL_START_TEST(eolian_cxx_test_struct_docs) doc = field_iter->documentation; ck_assert_str_eq(doc.summary.c_str(), "Field documentation."); ck_assert_str_eq(doc.description.c_str(), ""); - ck_assert_str_eq(doc.since.c_str(), ""); + ck_assert_str_eq(doc.since.c_str(), "1.66"); field_iter++; @@ -293
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=65e824be3c94a4ae0d74031fd3fe35800d3a3957 commit 65e824be3c94a4ae0d74031fd3fe35800d3a3957 Author: Felipe Magno de Almeida Date: Wed Sep 9 22:35:55 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 287f7ec02..07eda410e 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -125,7 +125,7 @@ The cmake found by meson still has to find the dependencies, but vcpkg's install Create an environment ''env.bat'' file in EFL's root (e.g. ''C:/Users/Someone/efl/env.bat'') before calling ''configure.bat'', containing for example (considering vcpkg is installed in ''C:\Users\Someone\vcpkg''): -c:\efl-path> echo "set vcpkg_toolchain_file=C:\vcpkg-path\scripts\buildsystems\vcpkg.cmake" > env.bat +c:\efl-path> echo set vcpkg_toolchain_file=C:\vcpkg-path\scripts\buildsystems\vcpkg.cmake > env.bat This file is run everytime by ''configure.bat'' as a special way to set local custom environment variables. --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=62a3d52f3b7537a8cc207ab6033143b1439dd2d2 commit 62a3d52f3b7537a8cc207ab6033143b1439dd2d2 Author: Felipe Magno de Almeida Date: Wed Sep 9 20:19:27 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index cb32dda80..3e498c45f 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -131,5 +131,12 @@ path-to-efl> echo "set vcpkg_toolchain_file=C:/Users/Someone/vcpkg/scripts/build This file is run everytime by ''configure.bat'' as a special way to set local custom environment variables. +It is necessary to add the vcpkg-installed dependencies to PATH environment variable so EFL binaries built and used in efl's build can find its dependencies. + +efl-path> set "PATH=%PATH%;C:\path-to-vcpkg\installed\x64-windows\bin" + +Then we can configure and build and install + efl-path> configure.bat --prefix=C:\efl efl-path> build.bat +efl-path> install.bat --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=ba124fd62f39a71704c3658c0f99a39a8de63879 commit ba124fd62f39a71704c3658c0f99a39a8de63879 Author: Felipe Magno de Almeida Date: Wed Sep 9 20:00:24 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 96cd06c6d..5a8c67933 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -104,11 +104,13 @@ To manage dependencies with vcpkg: Or, in a single command line (considering vcpkg is in your PATH or that you're inside vcpkg's directory): - > vcpkg install openssl freetype check libpng zlib + > vcpkg install openssl:x64-windows freetype:x64-windows check:x64-windows libpng:x64-windows zlib:x64-windows This way vcpkg will download, setup and install all of those dependencies. +Check that all dependencies were installed at ''installed\ + === 7 - Compiling EFL === --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=9080b57a95bc09e1ef36e6d549628ed6b0ae3542 commit 9080b57a95bc09e1ef36e6d549628ed6b0ae3542 Author: Felipe Magno de Almeida Date: Wed Sep 9 20:09:41 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 5a8c67933..cb32dda80 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -109,7 +109,7 @@ To manage dependencies with vcpkg: This way vcpkg will download, setup and install all of those dependencies. -Check that all dependencies were installed at ''installed\ +Check that all dependencies were installed at ''installed\x64-windows\bin''. --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=6968eb5684d16b2126965f7d46ad1a8013520ef3 commit 6968eb5684d16b2126965f7d46ad1a8013520ef3 Author: Felipe Magno de Almeida Date: Wed Sep 9 21:48:17 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 18487f9f6..7745d6adf 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -95,6 +95,7 @@ To manage dependencies with vcpkg: 4.2. Install the following dependencies for x64 windows: + - Curl; - OpenSSL; - Freetype; - Check; @@ -103,7 +104,7 @@ To manage dependencies with vcpkg: - Zlib. -c:\path-to-vcpkg> vcpkg install openssl:x64-windows freetype:x64-windows check:x64-windows libpng:x64-windows zlib:x64-windows libjpeg-turbo:x64-windows +c:\path-to-vcpkg> vcpkg install openssl:x64-windows freetype:x64-windows check:x64-windows libpng:x64-windows zlib:x64-windows libjpeg-turbo:x64-windows curl:x64-windows This way vcpkg will download, setup and install all of those dependencies. --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=fe8db9f225b9b9ec0392dca2fa2686c2dc3501b7 commit fe8db9f225b9b9ec0392dca2fa2686c2dc3501b7 Author: Felipe Magno de Almeida Date: Wed Sep 9 20:34:36 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index cce756f27..578f9a4a9 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -93,7 +93,7 @@ To manage dependencies with vcpkg: 4.1. Follow the **Vcpkg Installation Guide** in [[https://github.com/microsoft/vcpkg|Vcpkg's Github Repository]]. -4.2. Install the following dependencies: +4.2. Install the following dependencies for x64 windows: - OpenSSL; - Freetype; @@ -101,10 +101,8 @@ To manage dependencies with vcpkg: - Libpng; - Zlib. - Or, in a single command line (considering vcpkg is in your PATH or that you're inside vcpkg's directory): - - > vcpkg install openssl:x64-windows freetype:x64-windows check:x64-windows libpng:x64-windows zlib:x64-windows +c:\path-to-vcpkg> vcpkg install openssl:x64-windows freetype:x64-windows check:x64-windows libpng:x64-windows zlib:x64-windows This way vcpkg will download, setup and install all of those dependencies. @@ -133,7 +131,7 @@ This file is run everytime by ''configure.bat'' as a special way to set local cu It is necessary to add the vcpkg-installed dependencies to PATH environment variable so EFL binaries built and used in efl's build can find its dependencies. -efl-path> set "PATH=%PATH%;C:\path-to-vcpkg\installed\x64-windows\bin" +c:\efl-path> set "PATH=%PATH%;C:\path-to-vcpkg\installed\x64-windows\bin" Then we can configure and build and install --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=a5724d669fc69bb34834b06fbf0c3d31c3dc0481 commit a5724d669fc69bb34834b06fbf0c3d31c3dc0481 Author: Felipe Magno de Almeida Date: Wed Sep 9 20:37:17 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 578f9a4a9..93b3ca44e 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -121,10 +121,10 @@ The cmake found by meson still has to find the dependencies, but vcpkg's install ''configure.bat'' uses the ''vcpkg_toolchain_file'' environment variable to pass the toolset as parameter to CMake from Meson. -Create an environment ''env.bat'' file in EFL's root (e.g. ''C:/Users/Someone/efl/env.bat'') before calling ''configure.bat'', containing for example (considering vcpkg is installed in ''C:/Users/Someone/vcpkg''): +Create an environment ''env.bat'' file in EFL's root (e.g. ''C:/Users/Someone/efl/env.bat'') before calling ''configure.bat'', containing for example (considering vcpkg is installed in ''C:\Users\Someone\vcpkg''): -c:\efl-path> echo "set vcpkg_toolchain_file=C:/Users/Someone/vcpkg/scripts/buildsystems/vcpkg.cmake" > env.bat +c:\efl-path> echo "set vcpkg_toolchain_file=C:\vcpkg-path\scripts\buildsystems\vcpkg.cmake" > env.bat This file is run everytime by ''configure.bat'' as a special way to set local custom environment variables. --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=b145db664f067945ea7e05f70543c1ada0e3fbce commit b145db664f067945ea7e05f70543c1ada0e3fbce Author: Felipe Magno de Almeida Date: Wed Sep 9 19:30:58 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 9c0d0ddf4..cfb95b9ad 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -109,21 +109,17 @@ To manage dependencies with vcpkg: This way vcpkg will download, setup and install all of those dependencies. -4.3. Send vcpkg toolchain file to meson +4.3. Set vcpkg toolchain file for meson The cmake found by meson still has to find the dependencies, but vcpkg's installed libraries aren't found by default. For that, [vcpkg's docummentation](https://github.com/microsoft/vcpkg#using-vcpkg-with-cmake) recommends using the cmake argument ''CMAKE_TOOLCHAIN_FILE'' to point to vcpkg's toolchain file. In current EFL build, to do that, you may set the variable ''VCPKG_TOOLCHAIN_FILE'' which is automatically sent to meson when calling ''configure.bat''. - -**[Hint]** - -You can create an environment ''env.bat'' file in EFL's root (e.g. ''C:/Users/Someone/efl/env.bat'') before calling ''configure.bat'', containing for example (considering vcpkg is installed in ''C:/Users/Someone/vcpkg''): +Create an environment ''env.bat'' file in EFL's root (e.g. ''C:/Users/Someone/efl/env.bat'') before calling ''configure.bat'', containing for example (considering vcpkg is installed in ''C:/Users/Someone/vcpkg''): set vcpkg_toolchain_file=C:/Users/Someone/vcpkg/scripts/buildsystems/vcpkg.cmake This file is run everytime by ''configure.bat'' as a special way to set local custom environment variables. - --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=3908d445aeef3842dbba4c5cf937848f6b0a0869 commit 3908d445aeef3842dbba4c5cf937848f6b0a0869 Author: Felipe Magno de Almeida Date: Wed Sep 9 19:41:55 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 201be5edf..0e8546ea1 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -116,7 +116,7 @@ The cmake found by meson still has to find the dependencies, but vcpkg's install Create an environment ''env.bat'' file in EFL's root (e.g. ''C:/Users/Someone/efl/env.bat'') before calling ''configure.bat'', containing for example (considering vcpkg is installed in ''C:/Users/Someone/vcpkg''): -set vcpkg_toolchain_file=C:/Users/Someone/vcpkg/scripts/buildsystems/vcpkg.cmake +path-to-efl> echo "set vcpkg_toolchain_file=C:/Users/Someone/vcpkg/scripts/buildsystems/vcpkg.cmake" > env.bat This file is run everytime by ''configure.bat'' as a special way to set local custom environment variables. --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=635eeb48cb09ebaca1396342b579b87b8341ddbe commit 635eeb48cb09ebaca1396342b579b87b8341ddbe Author: Felipe Magno de Almeida Date: Wed Sep 9 19:52:13 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 0e8546ea1..96cd06c6d 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -109,9 +109,17 @@ To manage dependencies with vcpkg: This way vcpkg will download, setup and install all of those dependencies. -4.3. Set vcpkg toolchain file for meson + + +=== 7 - Compiling EFL === + +Clone the [[https://github.com/expertisesolutions/efl.git|EFL Native Windows Repository]] repository. + + +The cmake found by meson still has to find the dependencies, but vcpkg's installed libraries aren't found by default. For that, [vcpkg's docummentation](https://github.com/microsoft/vcpkg#using-vcpkg-with-cmake) recommends using the cmake argument ''CMAKE_TOOLCHAIN_FILE'' to point to vcpkg's toolchain file. -The cmake found by meson still has to find the dependencies, but vcpkg's installed libraries aren't found by default. For that, [vcpkg's docummentation](https://github.com/microsoft/vcpkg#using-vcpkg-with-cmake) recommends using the cmake argument ''CMAKE_TOOLCHAIN_FILE'' to point to vcpkg's toolchain file. In current EFL build, to do that, you may set the variable ''VCPKG_TOOLCHAIN_FILE'' which is automatically sent to meson when calling ''configure.bat''. +''configure.bat'' uses the ''vcpkg_toolchain_file'' environment variable to pass the toolset as parameter to CMake from Meson. + Create an environment ''env.bat'' file in EFL's root (e.g. ''C:/Users/Someone/efl/env.bat'') before calling ''configure.bat'', containing for example (considering vcpkg is installed in ''C:/Users/Someone/vcpkg''): @@ -121,18 +129,5 @@ path-to-efl> echo "set vcpkg_toolchain_file=C:/Users/Someone/vcpkg/scripts/build This file is run everytime by ''configure.bat'' as a special way to set local custom environment variables. - - -=== 7 - Compiling EFL === - -* Choose a directory to clone **EFL** repository; -* Clone the [[https://github.com/expertisesolutions/efl.git|EFL Native Windows Repository]] repository. -* Open Visual Studio's **Developer Command Prompt** in the EFL directory and run the following command: -* > configure.bat -* If an error occurs in this step, it is generally due to opening a regular Command Prompt (instead of VS's Developer Command Prompt). In that case, you may manually setup the developer prompt by entering the following command: -* > "C:\Program Files (x86)\Microsoft Visual Studio\\\VC\Auxiliary\Build\vcvars64.bat" -* If it still does not work, try to: - - Delete the ''build'' directory; - - Delete every subdirectory inside ''subprojects'' (**NOTE: Do NOT delete the .wrap files!**) -* After you finish, rerun **configure.bat**, execute **build.bat**: - * > build.bat \ No newline at end of file +efl-path> configure.bat --prefix=C:\efl +efl-path> build.bat --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=ca6954a5c4ca1e0d635a11324b5a148a42c2e8df commit ca6954a5c4ca1e0d635a11324b5a148a42c2e8df Author: Felipe Magno de Almeida Date: Wed Sep 9 20:28:34 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 3e498c45f..cce756f27 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -126,7 +126,7 @@ The cmake found by meson still has to find the dependencies, but vcpkg's install Create an environment ''env.bat'' file in EFL's root (e.g. ''C:/Users/Someone/efl/env.bat'') before calling ''configure.bat'', containing for example (considering vcpkg is installed in ''C:/Users/Someone/vcpkg''): -path-to-efl> echo "set vcpkg_toolchain_file=C:/Users/Someone/vcpkg/scripts/buildsystems/vcpkg.cmake" > env.bat +c:\efl-path> echo "set vcpkg_toolchain_file=C:/Users/Someone/vcpkg/scripts/buildsystems/vcpkg.cmake" > env.bat This file is run everytime by ''configure.bat'' as a special way to set local custom environment variables. @@ -137,6 +137,6 @@ It is necessary to add the vcpkg-installed dependencies to PATH environment vari Then we can configure and build and install -efl-path> configure.bat --prefix=C:\efl -efl-path> build.bat -efl-path> install.bat +c:\efl-path> configure.bat --prefix=C:\efl +c:\efl-path> build.bat +c:\efl-path> install.bat --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=1c265362e911ca9f787c18d10e9246f3edf83154 commit 1c265362e911ca9f787c18d10e9246f3edf83154 Author: Felipe Magno de Almeida Date: Wed Sep 9 19:06:09 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 9d9cef857..9c0d0ddf4 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -32,9 +32,17 @@ Except for topic 6 (Environment variables) that can be consulted during the proc -=== 2 - Meson === +=== 2 - Python === -2.1. Install [[https://pypi.org/project/meson/|Meson]] using the following command on the terminal (CMD or Developer Command Prompt from Visual Studio): +Meson depends on Python, so we need to install Python first. + +Go to Python website and download the latest Python installation for Windows. + +When installing it, select the option to add python to environment variables so it can be used in command-line. + +=== 3 - Meson === + +3.1. Install [[https://pypi.org/project/meson/|Meson]] using the following command on the terminal (CMD or Developer Command Prompt from Visual Studio): > pip install --user meson @@ -46,7 +54,7 @@ Except for topic 6 (Environment variables) that can be consulted during the proc > Check the python version installed on your Windows. In this tutorial we are > using Python 3.8 - 2.2. At the end of the previous step, open a new terminal, type the command below and press enter: + 3.2. At the end of the previous step, open a new terminal, type the command below and press enter: > meson --version --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=c28568dc5331d4bc807a3c04d154ecf6baa8586d commit c28568dc5331d4bc807a3c04d154ecf6baa8586d Author: Felipe Magno de Almeida Date: Wed Sep 9 19:32:26 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 32 -- 1 file changed, 32 deletions(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index cfb95b9ad..201be5edf 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -123,38 +123,6 @@ This file is run everytime by ''configure.bat'' as a special way to set local cu -=== 7 Windows Environment Variables === - - * This module aims to check environment variables. - -==Python== - - -**[OBS]** - -Python paths in this tutorial consider that the current installed Python version is 3.8. Don't forget to check the respective paths according to the location of your current Python installation. - - -During python installation, you can select the option to add python environment variables automatically. If there is a problem with Meson, check the existing variables and add as shown below: -* Open the windows environment variable editor, for the variables corresponding to the user, locate **''path''** and double-click it (or click the Edit button). In the next window, click the "New" button and add the following directories: -* C:\Users\\AppData\Roaming\Python\Python38\Scripts -* C:\Python38 -* C:\Python38\Scripts - -==OpenSSL== - -In case you're using a custom OpenSSL installation (not the one from vcpkg), you may want to set ''OPENSSL_DIR'' environment variable in order to EFL search for your installation instead of vcpkg's. For this: -* Open the windows environment variable editor. In user's variable list, click **New**: -* Set **Variable name** to: -* OPENSSL_DIR -* Set **Variable value** to your OpenSSL installation path, for example: -* C:\Users\\AppData\Local\efl\openssl -* For clarification: ''OPENSSL_DIR'' must point to the directory where the file ''libssl.lib'' and the directory ''include/'' are located. - -The current build system will also warn you about this file. - - - === 7 - Compiling EFL === * Choose a directory to clone **EFL** repository; --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=10803d5bd464cbb72db95b1e1a600a2bd2ceb175 commit 10803d5bd464cbb72db95b1e1a600a2bd2ceb175 Author: Felipe Magno de Almeida Date: Wed Sep 9 21:45:30 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 93b3ca44e..18487f9f6 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -99,10 +99,11 @@ To manage dependencies with vcpkg: - Freetype; - Check; - Libpng; + - Libjpeg-turbo; - Zlib. -c:\path-to-vcpkg> vcpkg install openssl:x64-windows freetype:x64-windows check:x64-windows libpng:x64-windows zlib:x64-windows +c:\path-to-vcpkg> vcpkg install openssl:x64-windows freetype:x64-windows check:x64-windows libpng:x64-windows zlib:x64-windows libjpeg-turbo:x64-windows This way vcpkg will download, setup and install all of those dependencies. --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=75f00fadc4f89540c59b7f7aa5fde591cdda95d9 commit 75f00fadc4f89540c59b7f7aa5fde591cdda95d9 Author: Felipe Magno de Almeida Date: Wed Sep 9 22:33:53 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 7745d6adf..287f7ec02 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -15,7 +15,6 @@ Except for topic 6 (Environment variables) that can be consulted during the proc - Meson - LLVM - Vcpkg -- Environment variables - Compiling the EFL @@ -133,7 +132,7 @@ This file is run everytime by ''configure.bat'' as a special way to set local cu It is necessary to add the vcpkg-installed dependencies to PATH environment variable so EFL binaries built and used in efl's build can find its dependencies. -c:\efl-path> set "PATH=%PATH%;C:\path-to-vcpkg\installed\x64-windows\bin" +c:\efl-path> set "PATH=%PATH%;C:\path-to-vcpkg\installed\x64-windows\debug\bin;C:\path-to-vcpkg\installed\x64-windows\bin" Then we can configure and build and install --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=9845ade2327a236de7766569c54d217ec859d7ed commit 9845ade2327a236de7766569c54d217ec859d7ed Author: Felipe Magno de Almeida Date: Wed Sep 9 23:00:38 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 681e533e0..bb059b683 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -90,7 +90,9 @@ Vcpkg is not strictly necessary, since you could install each of the dependencie To manage dependencies with vcpkg: -4.1. Follow the **Vcpkg Installation Guide** in [[https://github.com/microsoft/vcpkg|Vcpkg's Github Repository]]. +4.1. Follow the **Vcpkg Installation Guide** in [[https://github.com/microsoft/vcpkg|Vcpkg's Github Repository]]. You should checkout a tag before bootstrapping like this: + +c:\vcpkg-path> git checkout 2020.07 4.2. Install the following dependencies for x64 windows: @@ -103,7 +105,7 @@ To manage dependencies with vcpkg: - Zlib. -c:\path-to-vcpkg> vcpkg install openssl:x64-windows freetype:x64-windows check:x64-windows libpng:x64-windows zlib:x64-windows libjpeg-turbo:x64-windows curl:x64-windows +c:\vcpkg-path> vcpkg install openssl:x64-windows freetype:x64-windows check:x64-windows libpng:x64-windows zlib:x64-windows libjpeg-turbo:x64-windows curl:x64-windows This way vcpkg will download, setup and install all of those dependencies. --
[EGIT] [website/www-content] master 01/01: Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida
WWW-www.enlightenment.org pushed a commit to branch master. http://git.enlightenment.org/website/www-content.git/commit/?id=538fa4d2002004235dba6f9d62a749dc84dc48af commit 538fa4d2002004235dba6f9d62a749dc84dc48af Author: Felipe Magno de Almeida Date: Wed Sep 9 22:53:48 2020 -0700 Wiki page Compiling_the_native_Windows_EFL changed with summary [] by Felipe Magno de Almeida --- pages/Compiling_the_native_Windows_EFL.txt | 4 1 file changed, 4 insertions(+) diff --git a/pages/Compiling_the_native_Windows_EFL.txt b/pages/Compiling_the_native_Windows_EFL.txt index 07eda410e..681e533e0 100644 --- a/pages/Compiling_the_native_Windows_EFL.txt +++ b/pages/Compiling_the_native_Windows_EFL.txt @@ -139,3 +139,7 @@ Then we can configure and build and install c:\efl-path> configure.bat --prefix=C:\efl c:\efl-path> build.bat c:\efl-path> install.bat + +c:\efl-path> cd efl-prefix-path +c:\efl-prefix-path> cd bin +c:\efl-prefix-path\bin> .\elementary_test.exe \ No newline at end of file --