summaryrefslogtreecommitdiff
path: root/src/tests/eolian/data/class_simple_ref.c
blob: 4fec41fb025fbd070124b783d70ee16b9d11f2dd (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
EWAPI float BAR = 10.300000f;

Eina_Bool _class_simple_a_set(Eo *obj, Evas_Simple_Data *pd, int value);


static Eina_Error
__eolian_class_simple_a_set_reflect(Eo *obj, Eina_Value val)
{
   Eina_Error r = 0;   int cval;
   if (!eina_value_int_convert(&val, &cval))
      {
         r = EINA_ERROR_VALUE_FAILED;
         goto end;
      }
   efl_canvas_object_simple_a_set(obj, cval);
 end:
   eina_value_flush(&val);
   return r;
}

EOAPI EFL_FUNC_BODYV(efl_canvas_object_simple_a_set, Eina_Bool, EINA_TRUE /* true */, EFL_FUNC_CALL(value), int value);

int _class_simple_a_get(const Eo *obj, Evas_Simple_Data *pd);


static Eina_Value
__eolian_class_simple_a_get_reflect(const Eo *obj)
{
   int val = efl_canvas_object_simple_a_get(obj);
   return eina_value_int_init(val);
}

EOAPI EFL_FUNC_BODY_CONST(efl_canvas_object_simple_a_get, int, 100);

char *_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, char *b, double *c, int *d);

static char *__eolian_class_simple_foo(Eo *obj, Evas_Simple_Data *pd, int a, char *b, double *c, int *d)
{
   if (c) *c = 1337.600000;
   return _class_simple_foo(obj, pd, a, b, c, d);
}

EOAPI EFL_FUNC_BODYV(efl_canvas_object_simple_foo, char *, NULL /* null */, EFL_FUNC_CALL(a, b, c, d), int a, char *b, double *c, int *d);

static Eina_Bool
_class_simple_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL;

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef CLASS_SIMPLE_EXTRA_OPS
#define CLASS_SIMPLE_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_a_set, _class_simple_a_set),
      EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_a_get, _class_simple_a_get),
      EFL_OBJECT_OP_FUNC(efl_canvas_object_simple_foo, __eolian_class_simple_foo),
      CLASS_SIMPLE_EXTRA_OPS
   );
   opsp = &ops;

   static const Efl_Object_Property_Reflection refl_table[] = {
      {"a", __eolian_class_simple_a_set_reflect, __eolian_class_simple_a_get_reflect},
   };
   static const Efl_Object_Property_Reflection_Ops rops = {
      refl_table, EINA_C_ARRAY_LENGTH(refl_table)
   };
   ropsp = &rops;

   return efl_class_functions_set(klass, opsp, ropsp);
}

static const Efl_Class_Description _class_simple_class_desc = {
   EO_VERSION,
   "Class_Simple",
   EFL_CLASS_TYPE_REGULAR,
   sizeof(Evas_Simple_Data),
   _class_simple_class_initializer,
   NULL,
   NULL
};

EFL_DEFINE_CLASS(class_simple_class_get, &_class_simple_class_desc, NULL, NULL);