2015-03-26 07:48:09 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <Eo.h>
|
|
|
|
#include <Ecore.h>
|
|
|
|
|
2016-06-15 08:19:10 -07:00
|
|
|
#define GENERIC_BETA
|
|
|
|
#define GENERIC_PROTECTED
|
|
|
|
|
2015-03-26 07:48:09 -07:00
|
|
|
#include "generic.eo.h"
|
|
|
|
|
2016-06-05 22:54:36 -07:00
|
|
|
#include <check.h>
|
|
|
|
|
2015-03-26 07:48:09 -07:00
|
|
|
struct _Generic_Data
|
|
|
|
{
|
|
|
|
int req_ctor_a_val;
|
2016-06-05 22:54:36 -07:00
|
|
|
int req_ctor_b_val;
|
2015-03-26 07:48:09 -07:00
|
|
|
int opt_ctor_a_val;
|
2016-06-05 22:54:36 -07:00
|
|
|
int opt_ctor_b_val;
|
2015-03-26 07:48:09 -07:00
|
|
|
};
|
|
|
|
typedef struct _Generic_Data Generic_Data;
|
|
|
|
|
|
|
|
#define MY_CLASS GENERIC_CLASS
|
|
|
|
|
2015-05-20 09:06:35 -07:00
|
|
|
static Eo *_generic_eo_base_constructor(Eo *obj, Generic_Data *pd)
|
2015-03-26 07:48:09 -07:00
|
|
|
{
|
|
|
|
pd->req_ctor_a_val = 0;
|
|
|
|
pd->opt_ctor_a_val = 0;
|
2016-03-01 10:06:28 -08:00
|
|
|
return eo_constructor(eo_super(obj, MY_CLASS));
|
2015-03-26 07:48:09 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void _generic_required_ctor_a(Eo *obj EINA_UNUSED, Generic_Data *pd, int value)
|
|
|
|
{
|
|
|
|
pd->req_ctor_a_val = value;
|
|
|
|
}
|
|
|
|
|
2016-06-05 22:54:36 -07:00
|
|
|
static void _generic_required_ctor_b(Eo *obj EINA_UNUSED, Generic_Data *pd EINA_UNUSED, int value)
|
2015-03-26 07:48:09 -07:00
|
|
|
{
|
2016-06-05 22:54:36 -07:00
|
|
|
pd->req_ctor_b_val = value;
|
2015-03-26 07:48:09 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void _generic_optional_ctor_a(Eo *obj EINA_UNUSED, Generic_Data *pd, int value)
|
|
|
|
{
|
|
|
|
pd->opt_ctor_a_val = value;
|
|
|
|
}
|
|
|
|
|
2016-06-05 22:54:36 -07:00
|
|
|
static void _generic_optional_ctor_b(Eo *obj EINA_UNUSED, Generic_Data *pd EINA_UNUSED, int value)
|
2015-03-26 07:48:09 -07:00
|
|
|
{
|
2016-06-05 22:54:36 -07:00
|
|
|
pd->opt_ctor_b_val = value;
|
2015-03-26 07:48:09 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static int _generic_req_ctor_a_value_get(Eo *obj EINA_UNUSED, Generic_Data *pd)
|
|
|
|
{
|
|
|
|
return pd->req_ctor_a_val;
|
|
|
|
}
|
|
|
|
|
2016-06-05 22:54:36 -07:00
|
|
|
static int _generic_req_ctor_b_value_get(Eo *obj EINA_UNUSED, Generic_Data *pd)
|
|
|
|
{
|
|
|
|
return pd->req_ctor_b_val;
|
|
|
|
}
|
|
|
|
|
2015-03-26 07:48:09 -07:00
|
|
|
static int _generic_opt_ctor_a_value_get(Eo *obj EINA_UNUSED, Generic_Data *pd)
|
|
|
|
{
|
|
|
|
return pd->opt_ctor_a_val;
|
|
|
|
}
|
|
|
|
|
2016-06-05 22:54:36 -07:00
|
|
|
static int _generic_opt_ctor_b_value_get(Eo *obj EINA_UNUSED, Generic_Data *pd)
|
|
|
|
{
|
|
|
|
return pd->opt_ctor_b_val;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* static void _generic_req_ctor_a_value_set(Eo *obj EINA_UNUSED, Generic_Data* pd EINA_UNUSED, int value EINA_UNUSED) */
|
|
|
|
/* { */
|
|
|
|
/* } */
|
|
|
|
|
|
|
|
/* static void _generic_opt_ctor_a_value_set(Eo *obj EINA_UNUSED, Generic_Data* pd EINA_UNUSED, int value EINA_UNUSED) */
|
|
|
|
/* { */
|
|
|
|
/* } */
|
|
|
|
|
|
|
|
static void _generic_out_required_ctor_a(Eo *obj EINA_UNUSED, Generic_Data* pd, int *value)
|
2015-03-26 07:48:09 -07:00
|
|
|
{
|
2016-06-05 22:54:36 -07:00
|
|
|
*value = pd->req_ctor_a_val;
|
2015-03-26 07:48:09 -07:00
|
|
|
}
|
|
|
|
|
2016-06-05 22:54:36 -07:00
|
|
|
static void _generic_out_required_ctor_b(Eo *obj EINA_UNUSED, Generic_Data* pd, int *value)
|
2015-03-26 07:48:09 -07:00
|
|
|
{
|
2016-06-05 22:54:36 -07:00
|
|
|
*value = pd->req_ctor_b_val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void _generic_out_optional_ctor_a(Eo *obj EINA_UNUSED, Generic_Data* pd, int *value)
|
|
|
|
{
|
|
|
|
*value = pd->opt_ctor_a_val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void _generic_out_optional_ctor_b(Eo *obj EINA_UNUSED, Generic_Data* pd, int *value)
|
|
|
|
{
|
|
|
|
*value = pd->opt_ctor_b_val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void _generic_call_event1(Eo *obj, Generic_Data* pd EINA_UNUSED)
|
|
|
|
{
|
|
|
|
eo_event_callback_call(obj, GENERIC_EVENT_PREFIX_EVENT1, NULL);
|
|
|
|
}
|
|
|
|
static void _generic_call_event2(Eo *obj, Generic_Data* pd EINA_UNUSED)
|
|
|
|
{
|
|
|
|
eo_event_callback_call(obj, GENERIC_EVENT_PREFIX_EVENT2, obj);
|
|
|
|
}
|
|
|
|
static void _generic_call_event3(Eo *obj, Generic_Data* pd EINA_UNUSED)
|
|
|
|
{
|
|
|
|
int p = 42;
|
|
|
|
eo_event_callback_call(obj, GENERIC_EVENT_PREFIX_EVENT3, &p);
|
|
|
|
}
|
|
|
|
static void _generic_call_event4(Eo *obj, Generic_Data* pd EINA_UNUSED)
|
|
|
|
{
|
|
|
|
int i = 42;
|
|
|
|
Eina_List* p = eina_list_append(NULL, &i);
|
|
|
|
ck_assert(p != NULL);
|
|
|
|
eo_event_callback_call(obj, GENERIC_EVENT_PREFIX_EVENT4, p);
|
|
|
|
eina_list_free(p);
|
|
|
|
}
|
|
|
|
static void _generic_call_event5(Eo *obj, Generic_Data* pd EINA_UNUSED)
|
|
|
|
{
|
|
|
|
int i = 42;
|
|
|
|
Eina_List* p = eina_list_append(NULL, &i);
|
|
|
|
|
|
|
|
Generic_Event e = {.field1 = 42, .field2 = p};
|
|
|
|
eo_event_callback_call(obj, GENERIC_EVENT_PREFIX_EVENT5, &e);
|
|
|
|
eina_list_free(p);
|
2015-03-26 07:48:09 -07:00
|
|
|
}
|
2016-06-15 08:19:10 -07:00
|
|
|
static void _generic_protected_method1(Eo *obj EINA_UNUSED, Generic_Data* pd EINA_UNUSED)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
static void _generic_protected_beta_method1(Eo *obj EINA_UNUSED, Generic_Data* pd EINA_UNUSED)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
static void _generic_beta_method1(Eo *obj EINA_UNUSED, Generic_Data* pd EINA_UNUSED)
|
|
|
|
{
|
|
|
|
}
|
2015-03-26 07:48:09 -07:00
|
|
|
#include "generic.eo.c"
|