summaryrefslogtreecommitdiff
path: root/src/tests/efl_mono/libefl_mono_native_test.c
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-02-01 14:03:02 -0500
committerChristopher Michael <cp.michael@samsung.com>2019-02-01 14:03:02 -0500
commit0223bb29dfc4c1621ace044395196064c82b98de (patch)
treefc42c91c0461472391960afd14f232f941911f02 /src/tests/efl_mono/libefl_mono_native_test.c
parente4144504048ff2c9a3c1787b82c73a54e8d209a7 (diff)
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
Diffstat (limited to '')
-rw-r--r--src/tests/efl_mono/libefl_mono_native_test.c40
1 files changed, 40 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 986cd1fa53..51086216e3 100644
--- a/src/tests/efl_mono/libefl_mono_native_test.c
+++ b/src/tests/efl_mono/libefl_mono_native_test.c
@@ -82,6 +82,10 @@ typedef struct Dummy_Numberwrapper_Data
82 82
83typedef struct Dummy_Child_Data 83typedef struct Dummy_Child_Data
84{ 84{
85 int iface_prop;
86 const char* a;
87 double b;
88 Eina_Bool iface_was_set;
85} Dummy_Child_Data; 89} Dummy_Child_Data;
86 90
87typedef struct Dummy_Inherit_Helper_Data 91typedef struct Dummy_Inherit_Helper_Data
@@ -3936,6 +3940,42 @@ int _dummy_test_object_dummy_test_iface_iface_prop_get(EINA_UNUSED const Eo *obj
3936} 3940}
3937 3941
3938/// Dummy.Child 3942/// Dummy.Child
3943
3944static Efl_Object *
3945_dummy_child_efl_object_constructor(Eo *obj, Dummy_Child_Data *pd)
3946{
3947 efl_constructor(efl_super(obj, DUMMY_CHILD_CLASS));
3948
3949 pd->iface_prop = 1984;
3950 pd->iface_was_set = EINA_FALSE;
3951 return obj;
3952}
3953
3954void _dummy_child_dummy_test_iface_iface_prop_set(EINA_UNUSED Eo *obj, Dummy_Child_Data *pd, int value)
3955{
3956 pd->iface_prop = value;
3957 pd->iface_was_set = EINA_TRUE;
3958}
3959
3960int _dummy_child_dummy_test_iface_iface_prop_get(EINA_UNUSED const Eo *obj, Dummy_Child_Data *pd)
3961{
3962 return pd->iface_prop;
3963}
3964
3965void _dummy_child_double_params(EINA_UNUSED Eo* obj, Dummy_Child_Data *pd, const char* a, double b)
3966{
3967 if (pd->a)
3968 free((void*)pd->a);
3969 pd->a = malloc(sizeof(char)*(strlen(a) + 1));
3970 strcpy((char*)pd->a, a);
3971
3972 pd->b = b;
3973}
3974
3975Eina_Bool _dummy_child_iface_was_set_get(EINA_UNUSED const Eo* obj, Dummy_Child_Data *pd)
3976{
3977 return pd->iface_was_set;
3978}
3939EOLIAN static void 3979EOLIAN static void
3940_dummy_child_class_constructor(Efl_Class *klass) 3980_dummy_child_class_constructor(Efl_Class *klass)
3941{ 3981{