From f29ceef5002f7ab2a0f400adbed20299737bce20 Mon Sep 17 00:00:00 2001 From: Lauro Moura Date: Mon, 11 Mar 2019 15:46:12 -0300 Subject: efl-csharp: Respect beta for classes and other stuff. Summary: In order to work around an issue with Efl.App, which is stable but inherits from Efl.Core.Command_Line, @beta interfaces/mixins in the inheritance chain are simply skipped. Also changed the class used int test for inheritance from C# Efl.Loop is stable but internally it uses a @beta class as argument to its Register() method in the constructor. When instantiating a user-defined C# subclass, the binding calls the C# override in the NativeInherit class and the marshalling fails as no code is generated for the beta class. Also moved Efl.Part test to a beta class. Efl.Part is still beta. Regarding parts, they are skipped if its class is @beta too. Also rejected all elm_* files in elm public eo files. They should get back in as they are converted to Efl.Ui.* api. An exception is elm_interface_scrollable.eo, as efl_ui_panel depends on it. Fixes T7730 Test Plan: Run tests Reviewers: vitor.sousa, segfaultxavi, felipealmeida, cedric, bu5hm4n, zmike Reviewed By: vitor.sousa Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7730 Differential Revision: https://phab.enlightenment.org/D8268 --- src/bin/eolian_mono/eolian/mono/klass.hh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/bin/eolian_mono/eolian/mono/klass.hh') diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh index 0689648..a9f270d 100644 --- a/src/bin/eolian_mono/eolian/mono/klass.hh +++ b/src/bin/eolian_mono/eolian/mono/klass.hh @@ -95,6 +95,13 @@ struct klass bool generate(OutputIterator sink, attributes::klass_def const& cls, Context const& context) const { EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "klass_generator: " << cls.eolian_name << std::endl; + + if (blacklist::is_class_blacklisted(cls, context)) + { + EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "class " << cls.eolian_name << " is blacklisted. Skipping." << std::endl; + return true; + } + std::string suffix, class_type; switch(cls.type) { @@ -183,7 +190,7 @@ struct klass return false; bool root = !helpers::has_regular_ancestor(cls); - std::set inherit_interfaces = helpers::non_implemented_interfaces(cls); + std::set inherit_interfaces = helpers::non_implemented_interfaces(cls, context); std::vector inherit_classes; std::copy_if(cls.immediate_inherits.begin(), cls.immediate_inherits.end() , std::back_inserter(inherit_classes) @@ -268,7 +275,7 @@ struct klass if (!as_generator(*(property_wrapper_definition)).generate(sink, cls.properties, concrete_cxt)) return false; - for (auto&& klass : helpers::non_implemented_interfaces(cls)) + for (auto&& klass : helpers::non_implemented_interfaces(cls, concrete_cxt)) { attributes::klass_def c(get_klass(klass, cls.unit), cls.unit); if (!as_generator(*(property_wrapper_definition)).generate(sink, c.properties, concrete_cxt)) @@ -340,7 +347,7 @@ struct klass if (!as_generator(*(property_wrapper_definition)).generate(sink, cls.properties, inherit_cxt)) return false; - for (auto&& klass : helpers::non_implemented_interfaces(cls)) + for (auto&& klass : helpers::non_implemented_interfaces(cls, inherit_cxt)) { attributes::klass_def c(get_klass(klass, cls.unit), cls.unit); if (!as_generator(*(property_wrapper_definition)).generate(sink, c.properties, inherit_cxt)) @@ -644,7 +651,7 @@ struct klass if (!as_generator(*(event_registration(cls, cls))).generate(sink, cls.events, context)) return false; - for (auto&& c : helpers::non_implemented_interfaces(cls)) + for (auto&& c : helpers::non_implemented_interfaces(cls, context)) { // Only non-regular types (which declare events through interfaces) need to register them. if (c.type == attributes::class_type::regular) @@ -742,7 +749,7 @@ struct klass // Inherited events // For now, as mixins can inherit from regular classes, we can't filter out inherited events. - auto inherits = helpers::non_implemented_interfaces(cls); + auto inherits = helpers::non_implemented_interfaces(cls, context); for (auto&& c : inherits) { attributes::klass_def klass(get_klass(c, cls.unit), cls.unit); -- cgit v1.1