summaryrefslogtreecommitdiff
path: root/src/tests/eo/function_overrides/function_overrides_inherit3.c
blob: 2a66926f2d99eed7959cc2c2e91a49d87b47a534 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

#include "Eo.h"
#include "function_overrides_simple.h"
#include "function_overrides_inherit2.h"
#include "function_overrides_inherit3.h"

#define MY_CLASS INHERIT3_CLASS

static void
_a_set(Eo *obj, void *class_data EINA_UNUSED, int a)
{
   printf("%s %d\n", efl_class_name_get(MY_CLASS), a);
   simple_a_set(efl_super(obj, MY_CLASS), a + 1);
}

static Efl_Op_Description op_descs[] = {
     EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, _a_set),
};

static const Efl_Class_Description class_desc = {
     EO_VERSION,
     "Inherit3",
     EFL_CLASS_TYPE_REGULAR,
     EFL_CLASS_DESCRIPTION_OPS(op_descs),
     NULL,
     0,
     NULL,
     NULL
};

EFL_DEFINE_CLASS(inherit3_class_get, &class_desc, INHERIT2_CLASS, NULL);