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-15 11:30:24 -0300
committerVitor Sousa <vitorsousa@expertisesolutions.com.br>2019-03-15 11:38:08 -0300
commit4acc7e066758eca4837df83ccf6262fb479cc4ff (patch)
tree95b0d5fcd4aa6363e8d9f8927cd3895cf46812e1 /src/tests/efl_mono/libefl_mono_native_test.c
parentefreet: Fix resource leak (diff)
downloadefl-4acc7e066758eca4837df83ccf6262fb479cc4ff.tar.gz
csharp: Support Efl.Class for interfaces
Summary: The `GetEflClassStatic` method for interface is in their Concrete sidekick. Previously, passing a valid Eo interface as a type caused the binding to complain that `Type is not an Efl.Object`. Test Plan: run test case Reviewers: vitor.sousa, felipealmeida Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8360
Diffstat (limited to 'src/tests/efl_mono/libefl_mono_native_test.c')
-rw-r--r--src/tests/efl_mono/libefl_mono_native_test.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c
index 11190c9124..b02abdefd4 100644
--- a/src/tests/efl_mono/libefl_mono_native_test.c
+++ b/src/tests/efl_mono/libefl_mono_native_test.c
@@ -73,6 +73,7 @@ typedef struct Dummy_Test_Object_Data
int setter_only;
int iface_prop;
Eo *provider;
+ Eo *iface_provider;
} Dummy_Test_Object_Data;
typedef struct Dummy_Numberwrapper_Data
@@ -151,6 +152,12 @@ _dummy_test_object_efl_object_constructor(Eo *obj, Dummy_Test_Object_Data *pd)
{
efl_constructor(efl_super(obj, DUMMY_TEST_OBJECT_CLASS));
pd->provider = efl_add(DUMMY_NUMBERWRAPPER_CLASS, obj);
+
+ if (efl_parent_get(obj) == NULL) { // Avoid recursion
+ pd->iface_provider = efl_add(DUMMY_TEST_OBJECT_CLASS, obj);
+ dummy_test_iface_prop_set(pd->iface_provider, 1997);
+ } else
+ pd->iface_provider = NULL;
dummy_numberwrapper_number_set(pd->provider, 1999);
return obj;
@@ -3928,6 +3935,8 @@ Eo * _dummy_test_object_efl_object_provider_find(EINA_UNUSED const Eo *obj, Dumm
EINA_LOG_ERR("klass: %p, NUMBERWRAPPER: %p", klass, DUMMY_NUMBERWRAPPER_CLASS);
if (klass == DUMMY_NUMBERWRAPPER_CLASS)
return pd->provider;
+ else if (klass == DUMMY_TEST_IFACE_INTERFACE)
+ return pd->iface_provider;
return efl_provider_find(efl_super(obj, DUMMY_TEST_OBJECT_CLASS), klass);
}