6 EAPI Eo_Op SIMPLE_BASE_ID = 0;
8 EAPI const Eo_Event_Description _EV_A_CHANGED =
9 EO_EVENT_DESCRIPTION("a,changed", "Called when a has changed.");
11 #define MY_CLASS SIMPLE_CLASS
14 _a_set(Eo *obj, void *class_data, va_list *list)
16 Simple_Public_Data *pd = class_data;
18 a = va_arg(*list, int);
19 printf("%s %d\n", eo_class_name_get(MY_CLASS), a);
22 eo_do(obj, eo_event_callback_call(EV_A_CHANGED, &pd->a, NULL));
26 _a_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list)
28 const Simple_Public_Data *pd = class_data;
30 a = va_arg(*list, int *);
35 _class_constructor(Eo_Class *klass)
37 const Eo_Op_Func_Description func_desc[] = {
38 EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set),
39 EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
43 eo_class_funcs_set(klass, func_desc);
46 static const Eo_Op_Description op_desc[] = {
47 EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"),
48 EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_GET, "Get property A"),
49 EO_OP_DESCRIPTION_SENTINEL
52 static const Eo_Event_Description *event_desc[] = {
57 static const Eo_Class_Description class_desc = {
59 EO_CLASS_TYPE_REGULAR,
60 EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
62 sizeof(Simple_Public_Data),
69 EO_DEFINE_CLASS(simple_class_get, &class_desc, EO_BASE_CLASS, NULL);