2012-09-07 14:56:44 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
#include "Eo.h"
|
2012-09-25 23:56:52 -07:00
|
|
|
#include "mixin_mixin.h"
|
|
|
|
#include "mixin_mixin2.h"
|
|
|
|
#include "mixin_mixin3.h"
|
|
|
|
#include "mixin_simple.h"
|
2012-04-05 08:31:15 -07:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int a;
|
|
|
|
int b;
|
|
|
|
} Private_Data;
|
|
|
|
|
2012-04-23 01:09:54 -07:00
|
|
|
#define MY_CLASS SIMPLE_CLASS
|
2012-04-05 08:31:15 -07:00
|
|
|
|
|
|
|
#define _GET_SET_FUNC(name) \
|
2013-11-08 02:48:55 -08:00
|
|
|
static int \
|
|
|
|
_##name##_get(Eo *obj EINA_UNUSED, void *class_data) \
|
2012-04-05 08:31:15 -07:00
|
|
|
{ \
|
2012-04-24 01:04:14 -07:00
|
|
|
const Private_Data *pd = class_data; \
|
2012-04-05 08:31:15 -07:00
|
|
|
printf("%s %d\n", __func__, pd->name); \
|
2013-11-08 02:48:55 -08:00
|
|
|
return pd->name; \
|
2012-04-05 08:31:15 -07:00
|
|
|
} \
|
|
|
|
static void \
|
2013-11-08 02:48:55 -08:00
|
|
|
_##name##_set(Eo *obj EINA_UNUSED, void *class_data, int name) \
|
2012-04-05 08:31:15 -07:00
|
|
|
{ \
|
2012-04-12 06:52:13 -07:00
|
|
|
Private_Data *pd = class_data; \
|
2012-04-05 08:31:15 -07:00
|
|
|
pd->name = name; \
|
|
|
|
printf("%s %d\n", __func__, pd->name); \
|
2013-11-08 02:48:55 -08:00
|
|
|
} \
|
2016-04-10 20:53:03 -07:00
|
|
|
EO_VOID_FUNC_BODYV(simple_##name##_set, EO_FUNC_CALL(name), int name); \
|
|
|
|
EO_FUNC_BODY(simple_##name##_get, int, 0);
|
2012-04-05 08:31:15 -07:00
|
|
|
|
|
|
|
_GET_SET_FUNC(a)
|
|
|
|
_GET_SET_FUNC(b)
|
|
|
|
|
2016-08-10 07:23:04 -07:00
|
|
|
static Efl_Op_Description op_descs[] = {
|
2015-09-28 06:15:15 -07:00
|
|
|
EO_OP_FUNC(simple_a_set, _a_set),
|
|
|
|
EO_OP_FUNC(simple_a_get, _a_get),
|
|
|
|
EO_OP_FUNC(simple_b_set, _b_set),
|
|
|
|
EO_OP_FUNC(simple_b_get, _b_get),
|
2012-04-23 01:09:54 -07:00
|
|
|
};
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2016-08-10 07:23:04 -07:00
|
|
|
static const Efl_Class_Description class_desc = {
|
2014-04-02 01:46:34 -07:00
|
|
|
EO_VERSION,
|
2012-04-23 01:09:54 -07:00
|
|
|
"Simple",
|
2012-05-01 00:40:14 -07:00
|
|
|
EO_CLASS_TYPE_REGULAR,
|
2014-04-02 01:46:34 -07:00
|
|
|
EO_CLASS_DESCRIPTION_OPS(op_descs),
|
2012-04-23 01:09:54 -07:00
|
|
|
NULL,
|
|
|
|
sizeof(Private_Data),
|
2013-11-08 02:48:55 -08:00
|
|
|
NULL,
|
2012-04-23 01:09:54 -07:00
|
|
|
NULL
|
|
|
|
};
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2014-04-02 04:01:16 -07:00
|
|
|
EO_DEFINE_CLASS(simple_class_get, &class_desc, EO_CLASS,
|
2013-11-08 02:48:55 -08:00
|
|
|
MIXIN3_CLASS, MIXIN2_CLASS, NULL);
|
|
|
|
|