aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/efl_mono/libefl_mono_native_test.c
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-03-11 15:46:12 -0300
committerVitor Sousa <vitorsousa@expertisesolutions.com.br>2019-03-11 16:08:04 -0300
commitf29ceef5002f7ab2a0f400adbed20299737bce20 (patch)
tree2324619326073a6a55f286723802553743feb3f9 /src/tests/efl_mono/libefl_mono_native_test.c
parenteolian-cxx: Add beta information to *_def (diff)
downloadefl-f29ceef5002f7ab2a0f400adbed20299737bce20.tar.gz
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 https://phab.enlightenment.org/T7730 Test Plan: Run tests Reviewers: vitor.sousa, segfaultxavi, felipealmeida, cedric, bu5hm4n, zmike Reviewed By: vitor.sousa Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: https://phab.enlightenment.org/T7730 Differential Revision: https://phab.enlightenment.org/D8268
Diffstat (limited to 'src/tests/efl_mono/libefl_mono_native_test.c')
-rw-r--r--src/tests/efl_mono/libefl_mono_native_test.c56
1 files changed, 36 insertions, 20 deletions
diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c
index e4c7d72e50..8968e46801 100644
--- a/src/tests/efl_mono/libefl_mono_native_test.c
+++ b/src/tests/efl_mono/libefl_mono_native_test.c
@@ -52,6 +52,7 @@
#include "dummy_another_iface.eo.h"
#include "dummy_inherit_iface.eo.h"
#include "dummy_inherit_helper.eo.h"
+#include "dummy_part_holder.eo.h"
#include <interfaces/efl_part.eo.h>
@@ -67,8 +68,6 @@ typedef struct Dummy_Test_Object_Data
Eina_Value *stored_value;
Dummy_StructSimple stored_struct;
int stored_int;
- Eo *part_one;
- Eo *part_two;
Eina_Promise *promise;
Eina_List *list_for_accessor;
int setter_only;
@@ -91,6 +90,12 @@ typedef struct Dummy_Child_Data
Eina_Bool optional_beta_ctor_was_called;
} Dummy_Child_Data;
+typedef struct Dummy_Part_Holder_Data
+{
+ Eo *part_one;
+ Eo *part_two;
+} Dummy_Part_Holder_Data;
+
typedef struct Dummy_Inherit_Helper_Data
{
} Dummy_Inherit_Helper_Data;
@@ -145,14 +150,6 @@ static Efl_Object*
_dummy_test_object_efl_object_constructor(Eo *obj, Dummy_Test_Object_Data *pd)
{
efl_constructor(efl_super(obj, DUMMY_TEST_OBJECT_CLASS));
-
- // To avoid an infinite loop calling the same constructor
- if (!efl_parent_get(obj))
- {
- pd->part_one = efl_add(DUMMY_TEST_OBJECT_CLASS, obj, efl_name_set(efl_added, "part_one"));
- pd->part_two = efl_add(DUMMY_TEST_OBJECT_CLASS, obj, efl_name_set(efl_added, "part_two"));
- }
-
pd->provider = efl_add(DUMMY_NUMBERWRAPPER_CLASS, obj);
dummy_numberwrapper_number_set(pd->provider, 1999);
@@ -3792,16 +3789,6 @@ void _dummy_test_object_emit_event_with_list(Eo *obj, EINA_UNUSED Dummy_Test_Obj
efl_event_callback_legacy_call(obj, DUMMY_TEST_OBJECT_EVENT_EVT_WITH_LIST, data);
}
-Efl_Object *_dummy_test_object_efl_part_part_get(EINA_UNUSED const Eo *obj, Dummy_Test_Object_Data *pd, const char *name)
-{
- if (!strcmp(name, "part_one"))
- return pd->part_one;
- else if (!strcmp(name, "part_two"))
- return pd->part_two;
- else
- return NULL;
-}
-
void _dummy_test_object_append_to_strbuf(EINA_UNUSED Eo *obj, EINA_UNUSED Dummy_Test_Object_Data *pd, Eina_Strbuf *buf, const char *str)
{
eina_strbuf_append(buf, str);
@@ -4024,6 +4011,34 @@ const char* _dummy_inherit_helper_receive_dummy_and_call_in_stringshare(Dummy_Te
return dummy_inherit_iface_stringshare_test (x, eina_stringshare_add("hello world"));
}
+// Part holder
+static Efl_Object*
+_dummy_part_holder_efl_object_constructor(Eo *obj, Dummy_Part_Holder_Data *pd)
+{
+ efl_constructor(efl_super(obj, DUMMY_PART_HOLDER_CLASS));
+
+ // To avoid an infinite loop calling the same constructor
+ if (!efl_parent_get(obj))
+ {
+ pd->part_one = efl_add(DUMMY_TEST_OBJECT_CLASS, obj, efl_name_set(efl_added, "part_one"));
+ pd->part_two = efl_add(DUMMY_TEST_OBJECT_CLASS, obj, efl_name_set(efl_added, "part_two"));
+ }
+
+ return obj;
+}
+
+Efl_Object *_dummy_part_holder_efl_part_part_get(EINA_UNUSED const Eo *obj, Dummy_Part_Holder_Data *pd, const char *name)
+{
+ if (!strcmp(name, "part_one"))
+ return pd->part_one;
+ else if (!strcmp(name, "part_two"))
+ return pd->part_two;
+ else
+ return NULL;
+}
+
+
+
#include "dummy_test_object.eo.c"
#include "dummy_numberwrapper.eo.c"
#include "dummy_child.eo.c"
@@ -4031,4 +4046,5 @@ const char* _dummy_inherit_helper_receive_dummy_and_call_in_stringshare(Dummy_Te
#include "dummy_another_iface.eo.c"
#include "dummy_inherit_helper.eo.c"
#include "dummy_inherit_iface.eo.c"
+#include "dummy_part_holder.eo.c"