summaryrefslogtreecommitdiff
path: root/src/tests/eolian/data/function_as_argument_ref.c
blob: 742f8d8d4ee6bcb27d329469e07ad5025575be5a (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

void _function_as_argument_set_cb(Eo *obj, Function_As_Argument_Data *pd, void *cb_data, SimpleFunc cb, Eina_Free_Cb cb_free_cb);

EOAPI EFL_VOID_FUNC_BODYV(function_as_argument_set_cb, EFL_FUNC_CALL(cb_data, cb, cb_free_cb), void *cb_data, SimpleFunc cb, Eina_Free_Cb cb_free_cb);

void _function_as_argument_set_nonull_cb(Eo *obj, Function_As_Argument_Data *pd, void *cb_data, VoidFunc cb, Eina_Free_Cb cb_free_cb);

EOAPI EFL_VOID_FUNC_BODYV(function_as_argument_set_nonull_cb, EFL_FUNC_CALL(cb_data, cb, cb_free_cb), void *cb_data, VoidFunc cb, Eina_Free_Cb cb_free_cb);

const char *_function_as_argument_call_cb(Eo *obj, Function_As_Argument_Data *pd, int a, double b);

EOAPI EFL_FUNC_BODYV(function_as_argument_call_cb, const char *, NULL, EFL_FUNC_CALL(a, b), int a, double b);

static Eina_Bool
_function_as_argument_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL, *copsp = NULL;

#ifndef FUNCTION_AS_ARGUMENT_EXTRA_OPS
#define FUNCTION_AS_ARGUMENT_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(function_as_argument_set_cb, _function_as_argument_set_cb),
      EFL_OBJECT_OP_FUNC(function_as_argument_set_nonull_cb, _function_as_argument_set_nonull_cb),
      EFL_OBJECT_OP_FUNC(function_as_argument_call_cb, _function_as_argument_call_cb),
      FUNCTION_AS_ARGUMENT_EXTRA_OPS
   );
   opsp = &ops;

#ifdef FUNCTION_AS_ARGUMENT_EXTRA_CLASS_OPS
   EFL_OPS_DEFINE(cops, FUNCTION_AS_ARGUMENT_EXTRA_CLASS_OPS);
   copsp = &cops;
#endif

   return efl_class_functions_set(klass, opsp, copsp);
}

static const Efl_Class_Description _function_as_argument_class_desc = {
   EO_VERSION,
   "Function_As_Argument",
   EFL_CLASS_TYPE_REGULAR,
   sizeof(Function_As_Argument_Data),
   _function_as_argument_class_initializer,
   NULL,
   NULL
};

EFL_DEFINE_CLASS(function_as_argument_class_get, &_function_as_argument_class_desc, NULL, NULL);