parent
195d31c73f
commit
3b5a3448b7
115 changed files with 772 additions and 114 deletions
@ -1,11 +1,14 @@ |
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
SUBDIRS = eina
|
||||
SUBDIRS = eina eo
|
||||
|
||||
.PHONY: benchmark benchmark-e17 |
||||
|
||||
benchmark: |
||||
@$(MAKE) $(AM_MAKEFLAGS) -C eina benchmark
|
||||
if EFL_BUILD_EO |
||||
@$(MAKE) $(AM_MAKEFLAGS) -C eo benchmark
|
||||
endif |
||||
|
||||
benchmark-e17: |
||||
@$(MAKE) $(AM_MAKEFLAGS) -C eina benchmark-e17
|
||||
|
@ -0,0 +1,29 @@ |
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/include/eina \ |
||||
-I$(top_srcdir)/src/lib/eo \ |
||||
-I$(top_builddir)/src/include/eina \ |
||||
-I$(top_builddir)/src/lib/eo \ |
||||
@EFL_EO_BUILD@ \ |
||||
@EO_CFLAGS@ |
||||
|
||||
EXTRA_PROGRAMS = eo_bench
|
||||
|
||||
benchmark: eo_bench |
||||
|
||||
eo_bench_SOURCES = \
|
||||
class_simple.c \ |
||||
class_simple.h \ |
||||
eo_bench.c \ |
||||
eo_bench.h \ |
||||
eo_bench_eo_do.c |
||||
|
||||
eo_bench_LDADD = \
|
||||
$(top_builddir)/src/lib/eo/libeo.la \ |
||||
$(top_builddir)/src/lib/eina/libeina.la \ |
||||
@EO_LIBS@ |
||||
|
||||
clean-local: |
||||
rm -rf *.gcno ..\#..\#src\#*.gcov *.gcda
|
@ -1,15 +1,21 @@ |
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
SUBDIRS = eina eet
|
||||
SUBDIRS = eina eet eo
|
||||
|
||||
examples: |
||||
@$(MAKE) $(AM_MAKEFLAGS) -C eina examples
|
||||
if EFL_BUILD_EET |
||||
@$(MAKE) $(AM_MAKEFLAGS) -C eet examples
|
||||
endif |
||||
if EFL_BUILD_EO |
||||
@$(MAKE) $(AM_MAKEFLAGS) -C eo examples
|
||||
endif |
||||
|
||||
install-examples: |
||||
@$(MAKE) $(AM_MAKEFLAGS) -C eina install-examples
|
||||
if EFL_BUILD_EET |
||||
@$(MAKE) $(AM_MAKEFLAGS) -C eet install-examples
|
||||
endif |
||||
if EFL_BUILD_EO |
||||
@$(MAKE) $(AM_MAKEFLAGS) -C eo install-examples
|
||||
endif |
||||
|
@ -0,0 +1,83 @@ |
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I. \ |
||||
-I$(top_srcdir)/src/lib/eo \ |
||||
-I$(top_builddir)/src/lib/eo \ |
||||
@EFL_EO_BUILD@ \ |
||||
@EO_CFLAGS@ |
||||
|
||||
EXTRA_PROGRAMS = eo_isa eo_simple
|
||||
|
||||
if EO_BUILD_EXAMPLE_EVAS |
||||
|
||||
EXTRA_PROGRAMS += eo_evas
|
||||
|
||||
endif |
||||
|
||||
eo_isa_SOURCES = \
|
||||
isa/eo_isa_complex.c \ |
||||
isa/eo_isa_complex.h \ |
||||
isa/eo_isa_interface.c \ |
||||
isa/eo_isa_interface.h \ |
||||
isa/eo_isa_main.c \ |
||||
isa/eo_isa_mixin.c \ |
||||
isa/eo_isa_mixin.h \ |
||||
isa/eo_isa_simple.c \ |
||||
isa/eo_isa_simple.h |
||||
|
||||
eo_isa_LDADD = $(top_builddir)/src/lib/eo/libeo.la @EO_LIBS@
|
||||
|
||||
if EO_BUILD_EXAMPLE_EVAS |
||||
|
||||
eo_evas_SOURCES = \
|
||||
evas/evas_elw_box.c \ |
||||
evas/evas_elw_box.h \ |
||||
evas/evas_elw_boxedbutton.c \ |
||||
evas/evas_elw_boxedbutton.h \ |
||||
evas/evas_elw_button.c \ |
||||
evas/evas_elw_button.h \ |
||||
evas/evas_elw_win.h \ |
||||
evas/evas_elw_win.c \ |
||||
evas/evas_evas_obj.c \ |
||||
evas/evas_evas_obj.h \ |
||||
evas/evas_test.c |
||||
|
||||
eo_evas_LDADD = $(top_builddir)/src/lib/eo/libeo.la @ELM_LIBS@ @EO_LIBS@
|
||||
|
||||
endif |
||||
|
||||
eo_simple_SOURCES = \
|
||||
simple/simple_interface.c \ |
||||
simple/simple_interface.h \ |
||||
simple/simple_main.c \ |
||||
simple/simple_mixin.c \ |
||||
simple/simple_mixin.h \ |
||||
simple/simple_simple.c \ |
||||
simple/simple_simple.h |
||||
|
||||
eo_simple_LDADD = $(top_builddir)/src/lib/eo/libeo.la @EO_LIBS@
|
||||
|
||||
examples: $(EXTRA_PROGRAMS) |
||||
|
||||
clean-local: |
||||
rm -f $(EXTRA_PROGRAMS)
|
||||
|
||||
install-examples: |
||||
mkdir -p $(pkgdatadir)/examples/eo/isa
|
||||
$(install_sh_DATA) -c $(eo_isa_SOURCES) $(pkgdatadir)/examples/eo/isa
|
||||
mkdir -p $(pkgdatadir)/examples/eo/evas
|
||||
$(install_sh_DATA) -c $(evas_SOURCES) $(pkgdatadir)/examples/eo/evas
|
||||
mkdir -p $(pkgdatadir)/examples/eo/simple
|
||||
$(install_sh_DATA) -c $(simple_SOURCES) $(pkgdatadir)/examples/eo/simple
|
||||
|
||||
uninstall-local: |
||||
for f in $(eo_isa_SOURCES) ; do \
|
||||
rm -f $(pkgdatadir)/examples/eo/isa/$$f ; \
|
||||
done
|
||||
for f in $(evas_SOURCES) ; do \
|
||||
rm -f $(pkgdatadir)/examples/eo/evas/$$f ; \
|
||||
done
|
||||
for f in $(simple_SOURCES) ; do \
|
||||
rm -f $(pkgdatadir)/examples/eo/simple/$$f ; \
|
||||
done
|
@ -0,0 +1,29 @@ |
||||
#ifdef HAVE_CONFIG_H |
||||
# include <config.h> |
||||
#endif |
||||
|
||||
#include "Eo.h" |
||||
#include "simple_interface.h" |
||||
|
||||
EAPI Eo_Op INTERFACE_BASE_ID = 0; |
||||
|
||||
#define MY_CLASS INTERFACE_CLASS |
||||
|
||||
static const Eo_Op_Description op_desc[] = { |
||||
EO_OP_DESCRIPTION(INTERFACE_SUB_ID_A_POWER_3_GET, "Get the a^3"), |
||||
EO_OP_DESCRIPTION_SENTINEL |
||||
}; |
||||
|
||||
static const Eo_Class_Description class_desc = { |
||||
EO_VERSION, |
||||
"Interface", |
||||
EO_CLASS_TYPE_INTERFACE, |
||||
EO_CLASS_DESCRIPTION_OPS(&INTERFACE_BASE_ID, op_desc, INTERFACE_SUB_ID_LAST), |
||||
NULL, |
||||
0, |
||||
NULL, |
||||
NULL |
||||
}; |
||||
|
||||
EO_DEFINE_CLASS(interface_class_get, &class_desc, NULL, NULL) |
||||
|
@ -0,0 +1,26 @@ |
||||
#ifndef INTERFACE_H |
||||
#define INTERFACE_H |
||||
|
||||
#include "Eo.h" |
||||
|
||||
extern EAPI Eo_Op INTERFACE_BASE_ID; |
||||
|
||||
enum { |
||||
INTERFACE_SUB_ID_A_POWER_3_GET, |
||||
INTERFACE_SUB_ID_LAST |
||||
}; |
||||
|
||||
#define INTERFACE_ID(sub_id) (INTERFACE_BASE_ID + sub_id) |
||||
|
||||
|
||||
/**
|
||||
* @def interface_a_power_3_get(ret) |
||||
* @brief Get a^3 |
||||
* @param[out] ret integer pointer to ret - value |
||||
*/ |
||||
#define interface_a_power_3_get(ret) INTERFACE_ID(INTERFACE_SUB_ID_A_POWER_3_GET), EO_TYPECHECK(int *, ret) |
||||
|
||||
#define INTERFACE_CLASS interface_class_get() |
||||
const Eo_Class *interface_class_get(void); |
||||
|
||||
#endif |
@ -0,0 +1,53 @@ |
||||
#ifdef HAVE_CONFIG_H |
||||
# include <config.h> |
||||
#endif |
||||
|
||||
#include "Eo.h" |
||||
#include "simple_mixin.h" |
||||
#include "simple_simple.h" |
||||
|
||||
EAPI Eo_Op MIXIN_BASE_ID = 0; |
||||
|
||||
#define MY_CLASS MIXIN_CLASS |
||||
|
||||
static void |
||||
_a_square_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list) |
||||
{ |
||||
int a; |
||||
eo_do(obj, simple_a_get(&a)); |
||||
int *ret = va_arg(*list, int *); |
||||
if (ret) |
||||
*ret = a * a; |
||||
printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__); |
||||
} |
||||
|
||||
static void |
||||
_class_constructor(Eo_Class *klass) |
||||
{ |
||||
const Eo_Op_Func_Description func_desc[] = { |
||||
EO_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_A_SQUARE_GET), _a_square_get), |
||||
EO_OP_FUNC_SENTINEL |
||||
}; |
||||
|
||||
eo_class_funcs_set(klass, func_desc); |
||||
} |
||||
|
||||
|
||||
static const Eo_Op_Description op_desc[] = { |
||||
EO_OP_DESCRIPTION(MIXIN_SUB_ID_A_SQUARE_GET, "Get the value of A^2"), |
||||
EO_OP_DESCRIPTION_SENTINEL |
||||
}; |
||||
|
||||
static const Eo_Class_Description class_desc = { |
||||
EO_VERSION, |
||||
"Mixin", |
||||
EO_CLASS_TYPE_MIXIN, |
||||
EO_CLASS_DESCRIPTION_OPS(&MIXIN_BASE_ID, op_desc, MIXIN_SUB_ID_LAST), |
||||
NULL, |
||||
0, |
||||
_class_constructor, |
||||
NULL |
||||
}; |
||||
|
||||
EO_DEFINE_CLASS(mixin_class_get, &class_desc, NULL, NULL) |
||||
|
@ -0,0 +1,26 @@ |
||||
#ifndef MIXIN_H |
||||
#define MIXIN_H |
||||
|
||||
#include "Eo.h" |
||||
|
||||
extern EAPI Eo_Op MIXIN_BASE_ID; |
||||
|
||||
enum { |
||||
MIXIN_SUB_ID_A_SQUARE_GET, |
||||
MIXIN_SUB_ID_LAST |
||||
}; |
||||
|
||||
#define MIXIN_ID(sub_id) (MIXIN_BASE_ID + sub_id) |
||||
|
||||
|
||||
/**
|
||||
* @def mixin_a_square_get(ret) |
||||
* @brief Get the square of a. |
||||
* @param[out] ret the square of a |
||||
*/ |
||||
#define mixin_a_square_get(ret) MIXIN_ID(MIXIN_SUB_ID_A_SQUARE_GET), EO_TYPECHECK(int *, ret) |
||||
|
||||
#define MIXIN_CLASS mixin_class_get() |
||||
const Eo_Class *mixin_class_get(void); |
||||
|
||||
#endif |
@ -0,0 +1,78 @@ |
||||
#ifdef HAVE_CONFIG_H |
||||
# include <config.h> |
||||
#endif |
||||
|
||||
#include "Eo.h" |
||||
#include "simple_simple.h" |
||||
|
||||
EAPI Eo_Op SIMPLE_BASE_ID = 0; |
||||
|
||||
typedef struct |
||||
{ |
||||
int a; |
||||
} Private_Data; |
||||
|
||||
#define MY_CLASS SIMPLE_CLASS |
||||
|
||||
static void |
||||
_a_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) |
||||
{ |
||||
const Private_Data *pd = class_data; |
||||
int *a; |
||||
a = va_arg(*list, int *); |
||||
*a = pd->a; |
||||
printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__); |
||||
} |
||||
|
||||
static void |
||||
_a_set(Eo *obj EINA_UNUSED, void *class_data, va_list *list) |
||||
{ |
||||
Private_Data *pd = class_data; |
||||
int a; |
||||
a = va_arg(*list, int); |
||||
pd->a = a; |
||||
printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__); |
||||
} |
||||
|
||||
static void |
||||
_a_power_3_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list) |
||||
{ |
||||
const Private_Data *pd = class_data; |
||||
int *ret; |
||||
ret = va_arg(*list, int *); |
||||
if (ret) |
||||
*ret = pd->a * pd->a * pd->a; |
||||
printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__); |
||||
} |
||||
|
||||
static void |
||||
_class_constructor(Eo_Class *klass) |
||||
{ |
||||
const Eo_Op_Func_Description func_desc[] = { |
||||
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set), |
||||
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get), |
||||
EO_OP_FUNC(INTERFACE_ID(INTERFACE_SUB_ID_A_POWER_3_GET), _a_power_3_get), |
||||
EO_OP_FUNC_SENTINEL |
||||
}; |
||||
|
||||
eo_class_funcs_set(klass, func_desc); |
||||
} |
||||
|
||||
static const Eo_Op_Description op_desc[] = { |
||||
EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"), |
||||
EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_GET, "Get property A"), |
||||
EO_OP_DESCRIPTION_SENTINEL |
||||
}; |
||||
|
||||
static const Eo_Class_Description class_desc = { |
||||
EO_VERSION, |
||||
"Simple", |
||||
EO_CLASS_TYPE_REGULAR, |
||||
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST), |
||||
NULL, |
||||
sizeof(Private_Data), |
||||
_class_constructor, |
||||
NULL |
||||
}; |
||||
|
||||
EO_DEFINE_CLASS(simple_class_get, &class_desc, EO_BASE_CLASS, INTERFACE_CLASS, MIXIN_CLASS, NULL); |
@ -0,0 +1,35 @@ |
||||
#ifndef SIMPLE_H |
||||
#define SIMPLE_H |
||||
|
||||
#include "Eo.h" |
||||
#include "simple_interface.h" |
||||
#include "simple_mixin.h" |
||||
|
||||
extern EAPI Eo_Op SIMPLE_BASE_ID; |
||||
|
||||
enum { |
||||
SIMPLE_SUB_ID_A_SET, |
||||
SIMPLE_SUB_ID_A_GET, |
||||
SIMPLE_SUB_ID_LAST |
||||
}; |
||||
|
||||
#define SIMPLE_ID(sub_id) (SIMPLE_BASE_ID + sub_id) |
||||
|
||||
/**
|
||||
* @def simple_a_set(a) |
||||
* @brief Set value to a-property |
||||
* @param[in] a integer value to set |
||||
*/ |
||||
#define simple_a_set(a) SIMPLE_ID(SIMPLE_SUB_ID_A_SET), EO_TYPECHECK(int, a) |
||||
|
||||
/**
|
||||
* @def simple_a_get(a) |
||||
* @brief Get value of a-property |
||||
* @param[out] integer pointer to a-value |
||||
*/ |
||||
#define simple_a_get(a) SIMPLE_ID(SIMPLE_SUB_ID_A_GET), EO_TYPECHECK(int *, a) |
||||
|
||||
#define SIMPLE_CLASS simple_class_get() |
||||
const Eo_Class *simple_class_get(void); |
||||
|
||||
#endif |
@ -0,0 +1,21 @@ |
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/include/eina \ |
||||
-I$(top_srcdir)/src/lib/eo \ |
||||
-I$(top_builddir)/src/include/eina \ |
||||
-I$(top_builddir)/src/lib/eo \ |
||||
@EFL_EO_BUILD@ \ |
||||
@EO_CFLAGS@ |
||||
|
||||
installed_headerdir = $(includedir)/eo-@VMAJ@
|
||||
dist_installed_header_DATA = Eo.h
|
||||
|
||||
lib_LTLIBRARIES = libeo.la
|
||||
|
||||
libeo_la_SOURCES = eo.c eo_base_class.c eo_private.h
|
||||
libeo_la_LIBADD = $(top_builddir)/src/lib/eina/libeina.la @EO_LIBS@
|
||||
libeo_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
|
||||
|
||||
clean-local: |
||||
rm -rf *.gcno
|
@ -0,0 +1,126 @@ |
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/lib/eo \ |
||||
-I$(top_builddir)/src/lib/eo \ |
||||
@EFL_EO_BUILD@ \ |
||||
@EO_CFLAGS@ \ |
||||
@CHECK_CFLAGS@ |
||||
|
||||
check_PROGRAMS = \
|
||||
test_access \ |
||||
test_composite_objects \ |
||||
test_constructors \ |
||||
test_function_overrides \ |
||||
test_interface \ |
||||
test_mixin \ |
||||
test_signals |
||||
|
||||
if EFL_ENABLE_TESTS |
||||
check_PROGRAMS += eo_suite
|
||||
endif |
||||
|
||||
test_access_SOURCES = \
|
||||
access/access_inherit.c \ |
||||
access/access_inherit.h \ |
||||
access/access_main.c \ |
||||
access/access_simple.c \ |
||||
access/access_simple.h \ |
||||
access/access_simple_protected.h |
||||
|
||||
test_access_LDADD = $(top_builddir)/src/lib/eo/libeo.la @EO_LIBS@
|
||||
|
||||
test_composite_objects_SOURCES = \
|
||||
composite_objects/composite_objects_comp.c \ |
||||
composite_objects/composite_objects_comp.h \ |
||||
composite_objects/composite_objects_main.c \ |
||||
composite_objects/composite_objects_simple.c \ |
||||
composite_objects/composite_objects_simple.h |
||||
|
||||
test_composite_objects_LDADD = $(top_builddir)/src/lib/eo/libeo.la @EO_LIBS@
|
||||
|
||||
test_constructors_SOURCES = \
|
||||
constructors/constructors_main.c \ |
||||
constructors/constructors_mixin.c \ |
||||
constructors/constructors_mixin.h \ |
||||
constructors/constructors_simple.c \ |
||||
constructors/constructors_simple.h \ |
||||
constructors/constructors_simple2.c \ |
||||
constructors/constructors_simple2.h \ |
||||
constructors/constructors_simple3.c \ |
||||
constructors/constructors_simple3.h \ |
||||
constructors/constructors_simple4.c \ |
||||
constructors/constructors_simple4.h \ |
||||
constructors/constructors_simple5.c \ |
||||
constructors/constructors_simple5.h \ |
||||
constructors/constructors_simple6.c \ |
||||
constructors/constructors_simple6.h \ |
||||
constructors/constructors_simple7.c \ |
||||
constructors/constructors_simple7.h |
||||
|
||||
test_constructors_LDADD = $(top_builddir)/src/lib/eo/libeo.la @EO_LIBS@
|
||||
|
||||
if EFL_ENABLE_TESTS |
||||
|
||||
eo_suite_SOURCES = \
|
||||
suite/eo_test_class_simple.c \ |
||||
suite/eo_test_class_simple.h \ |
||||
suite/eo_suite.c \ |
||||
suite/eo_suite.h \ |
||||
suite/eo_test_class_errors.c \ |
||||
suite/eo_test_general.c \ |
||||
suite/eo_test_init.c |
||||
|
||||
eo_suite_LDADD = $(top_builddir)/src/lib/eo/libeo.la @EO_LIBS@ @CHECK_LIBS@
|
||||
|
||||
endif |
||||
|
||||
test_function_overrides_SOURCES = \
|
||||
function_overrides/function_overrides_inherit.c \ |
||||
function_overrides/function_overrides_inherit.h \ |
||||
function_overrides/function_overrides_inherit2.c \ |
||||
function_overrides/function_overrides_inherit2.h \ |
||||
function_overrides/function_overrides_inherit3.c \ |
||||
function_overrides/function_overrides_inherit3.h \ |
||||
function_overrides/function_overrides_main.c \ |
||||
function_overrides/function_overrides_simple.c \ |
||||
function_overrides/function_overrides_simple.h |
||||
|
||||
test_function_overrides_LDADD = $(top_builddir)/src/lib/eo/libeo.la @EO_LIBS@
|
||||
|
||||
test_interface_SOURCES = \
|
||||
interface/interface_interface.c \ |
||||
interface/interface_interface.h \ |
||||
interface/interface_interface2.c \ |
||||
interface/interface_interface2.h \ |
||||
interface/interface_main.c \ |
||||
interface/interface_simple.c \ |
||||
interface/interface_simple.h |
||||
|
||||
test_interface_LDADD = $(top_builddir)/src/lib/eo/libeo.la @EO_LIBS@
|
||||
|
||||
test_mixin_SOURCES = \
|
||||
mixin/mixin_inherit.c \ |
||||
mixin/mixin_inherit.h \ |
||||
mixin/mixin_main.c \ |
||||
mixin/mixin_mixin.c \ |
||||
mixin/mixin_mixin.h \ |
||||
mixin/mixin_mixin2.c \ |
||||
mixin/mixin_mixin2.h \ |
||||
mixin/mixin_mixin3.c \ |
||||
mixin/mixin_mixin3.h \ |
||||
mixin/mixin_mixin4.c \ |
||||
mixin/mixin_mixin4.h \ |
||||
mixin/mixin_simple.c \ |
||||
mixin/mixin_simple.h |
||||
|
||||
test_mixin_LDADD = $(top_builddir)/src/lib/eo/libeo.la @EO_LIBS@
|
||||
|
||||
test_signals_SOURCES = \
|
||||
signals/signals_main.c \ |
||||
signals/signals_simple.c \ |
||||
signals/signals_simple.h |
||||
|
||||
test_signals_LDADD = $(top_builddir)/src/lib/eo/libeo.la @EO_LIBS@
|
||||
|
||||
EXTRA_DIST = eunit_tests.h
|