Eobj: Rename to Eo.

Blame cedric.

SVN revision: 70566
This commit is contained in:
Tom Hacohen 2012-05-01 07:40:14 +00:00
parent cc87921515
commit 816a4ad71d
87 changed files with 3067 additions and 3065 deletions

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.6)
project(eobj)
project(eo)
set(VMAJ 0)
set(VMIN 1)
set(VMIC 0)
@ -53,10 +53,10 @@ add_subdirectory(doc)
# PKGCONFIG file.
CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/eobj.pc.in"
"${PROJECT_BINARY_DIR}/eobj.pc"
"${PROJECT_SOURCE_DIR}/eo.pc.in"
"${PROJECT_BINARY_DIR}/eo.pc"
@ONLY
)
INSTALL(FILES "${PROJECT_BINARY_DIR}/eobj.pc"
INSTALL(FILES "${PROJECT_BINARY_DIR}/eo.pc"
DESTINATION "lib/pkgconfig")

View File

@ -25,7 +25,7 @@ DOXYFILE_ENCODING = UTF-8
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
PROJECT_NAME = Eobj
PROJECT_NAME = Eo
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
@ -793,12 +793,12 @@ COLS_IN_ALPHA_INDEX = 2
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
# should be ignored while generating the index headers.
IGNORE_PREFIX = eobj_ \
_eobj_ \
Eobj_ \
_Eobj_ \
EOBJ_ \
_EOBJ_
IGNORE_PREFIX = eo_ \
_eo_ \
Eo_ \
_Eo_ \
EO_ \
_EO_
#---------------------------------------------------------------------------
# configuration options related to the HTML output
@ -912,13 +912,13 @@ DOCSET_FEEDNAME = "Doxygen generated docs"
# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
# will append .docset to the name.
DOCSET_BUNDLE_ID = org.enlightenment.Eobj
DOCSET_BUNDLE_ID = org.enlightenment.Eo
# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
# the documentation publisher. This should be a reverse domain-name style
# string, e.g. com.mycompany.MyDocSet.documentation.
DOCSET_PUBLISHER_ID = org.enlightenment.Eobj
DOCSET_PUBLISHER_ID = org.enlightenment.Eo
# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
@ -985,7 +985,7 @@ QCH_FILE =
# Qt Help Project output. For more information please see
# http://doc.trolltech.com/qthelpproject.html#namespace
QHP_NAMESPACE = org.enlightenment.Eobj
QHP_NAMESPACE = org.enlightenment.Eo
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
# Qt Help Project output. For more information please see
@ -1036,7 +1036,7 @@ GENERATE_ECLIPSEHELP = NO
# the directory name containing the HTML and XML files should also have
# this name.
ECLIPSE_DOC_ID = org.enlightenment.Eobj
ECLIPSE_DOC_ID = org.enlightenment.Eo
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
# top of each HTML page. The value NO (the default) enables the index and
@ -1418,14 +1418,16 @@ INCLUDE_FILE_PATTERNS =
# undefined via #undef or recursively expanded use the := operator
# instead of the = operator.
PREDEFINED = EOBJ_MAGIC_DEBUG \
PREDEFINED = EINA_MAGIC_DEBUG \
__UNUSED__= \
EOBJ_ARG_NONNULL()= \
EOBJ_MALLOC= \
EOBJ_WARN_UNUSED_RESULT= \
EINA_ARG_NONNULL()= \
EINA_MALLOC= \
EINA_WARN_UNUSED_RESULT= \
EAPI= \
EOBJ_PURE= \
EOBJ_CONST=
EINA_PURE= \
EINA_TRUE= \
EINA_FALSE= \
EINA_CONST=
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.

View File

@ -3,11 +3,11 @@ exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Eobj
Name: Eo
Description: EFL's generic object system library.
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -leobj
Libs: -L${libdir} -leo
Libs.private:
Cflags: -I${includedir}/eobj-@VMAJ@
Cflags: -I${includedir}/eo-@VMAJ@
~

View File

@ -12,13 +12,13 @@ include_directories(
add_executable(access ${ACCESS_CC_SOURCES})
get_target_property(eobj_LIB_FILE eobj LOCATION)
get_target_property(eo_LIB_FILE eo LOCATION)
target_link_libraries(access
${EINA_LIBRARIES}
${EINA_LDFLAGS_OTHER}
${eobj_LIB_FILE}
${eo_LIB_FILE}
)
add_dependencies(access eobj)
add_dependencies(access eo)
add_test(Example_access access)

View File

@ -1,4 +1,4 @@
#include "Eobj.h"
#include "Eo.h"
#include "simple.h"
#include "simple_protected.h"
@ -6,38 +6,38 @@
#include "config.h"
EAPI Eobj_Op INHERIT_BASE_ID = 0;
EAPI Eo_Op INHERIT_BASE_ID = 0;
#define MY_CLASS INHERIT_CLASS
static void
_prot_print(const Eobj *obj, const void *class_data EINA_UNUSED, va_list *list)
_prot_print(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list)
{
Simple_Protected_Data *pd = eobj_data_get(obj, SIMPLE_CLASS);
Simple_Protected_Data *pd = eo_data_get(obj, SIMPLE_CLASS);
(void) list;
printf("%s %d\n", __func__, pd->protected_x1);
}
static void
_class_constructor(Eobj_Class *klass)
_class_constructor(Eo_Class *klass)
{
const Eobj_Op_Func_Description func_desc[] = {
EOBJ_OP_FUNC_CONST(INHERIT_ID(INHERIT_SUB_ID_PROT_PRINT), _prot_print),
EOBJ_OP_FUNC_SENTINEL
const Eo_Op_Func_Description func_desc[] = {
EO_OP_FUNC_CONST(INHERIT_ID(INHERIT_SUB_ID_PROT_PRINT), _prot_print),
EO_OP_FUNC_SENTINEL
};
eobj_class_funcs_set(klass, func_desc);
eo_class_funcs_set(klass, func_desc);
}
static const Eobj_Op_Description op_desc[] = {
EOBJ_OP_DESCRIPTION_CONST(INHERIT_SUB_ID_PROT_PRINT, "", "Print protected var x1."),
EOBJ_OP_DESCRIPTION_SENTINEL
static const Eo_Op_Description op_desc[] = {
EO_OP_DESCRIPTION_CONST(INHERIT_SUB_ID_PROT_PRINT, "", "Print protected var x1."),
EO_OP_DESCRIPTION_SENTINEL
};
static const Eobj_Class_Description class_desc = {
static const Eo_Class_Description class_desc = {
"Inherit",
EOBJ_CLASS_TYPE_REGULAR,
EOBJ_CLASS_DESCRIPTION_OPS(&INHERIT_BASE_ID, op_desc, INHERIT_SUB_ID_LAST),
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&INHERIT_BASE_ID, op_desc, INHERIT_SUB_ID_LAST),
NULL,
0,
NULL,
@ -46,4 +46,4 @@ static const Eobj_Class_Description class_desc = {
NULL
};
EOBJ_DEFINE_CLASS(inherit_class_get, &class_desc, SIMPLE_CLASS, NULL)
EO_DEFINE_CLASS(inherit_class_get, &class_desc, SIMPLE_CLASS, NULL)

View File

@ -1,9 +1,9 @@
#ifndef INHERIT_H
#define INHERIT_H
#include "Eobj.h"
#include "Eo.h"
extern EAPI Eobj_Op INHERIT_BASE_ID;
extern EAPI Eo_Op INHERIT_BASE_ID;
enum {
INHERIT_SUB_ID_PROT_PRINT,
@ -15,6 +15,6 @@ enum {
#define inherit_prot_print() INHERIT_ID(INHERIT_SUB_ID_PROT_PRINT)
#define INHERIT_CLASS inherit_class_get()
const Eobj_Class *inherit_class_get(void) EINA_CONST;
const Eo_Class *inherit_class_get(void) EINA_CONST;
#endif

View File

@ -1,4 +1,4 @@
#include "Eobj.h"
#include "Eo.h"
#include "simple.h"
#include "inherit.h"
@ -7,17 +7,17 @@ main(int argc, char *argv[])
{
(void) argc;
(void) argv;
eobj_init();
eo_init();
Eobj *obj = eobj_add(INHERIT_CLASS, NULL);
Eo *obj = eo_add(INHERIT_CLASS, NULL);
eobj_do(obj, simple_a_set(1), inherit_prot_print());
eo_do(obj, simple_a_set(1), inherit_prot_print());
Simple_Public_Data *pd = eobj_data_get(obj, SIMPLE_CLASS);
Simple_Public_Data *pd = eo_data_get(obj, SIMPLE_CLASS);
printf("Pub: %d\n", pd->public_x2);
eobj_unref(obj);
eobj_shutdown();
eo_unref(obj);
eo_shutdown();
return 0;
}

View File

@ -1,8 +1,8 @@
#include "Eobj.h"
#include "Eo.h"
#include "simple.h"
#include "simple_protected.h"
EAPI Eobj_Op SIMPLE_BASE_ID = 0;
EAPI Eo_Op SIMPLE_BASE_ID = 0;
typedef struct
{
@ -10,13 +10,13 @@ typedef struct
int a;
} Private_Data;
EAPI const Eobj_Event_Description _SIG_A_CHANGED =
EOBJ_EVENT_DESCRIPTION("a,changed", "i", "Called when a has changed.");
EAPI const Eo_Event_Description _SIG_A_CHANGED =
EO_EVENT_DESCRIPTION("a,changed", "i", "Called when a has changed.");
#define MY_CLASS SIMPLE_CLASS
static void
_a_set(Eobj *obj, void *class_data, va_list *list)
_a_set(Eo *obj, void *class_data, va_list *list)
{
Private_Data *pd = class_data;
int a;
@ -27,34 +27,34 @@ _a_set(Eobj *obj, void *class_data, va_list *list)
pd->protected.protected_x1 = a + 1;
pd->protected.public.public_x2 = a + 2;
eobj_event_callback_call(obj, SIG_A_CHANGED, &pd->a);
eo_event_callback_call(obj, SIG_A_CHANGED, &pd->a);
}
static void
_class_constructor(Eobj_Class *klass)
_class_constructor(Eo_Class *klass)
{
const Eobj_Op_Func_Description func_desc[] = {
EOBJ_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set),
EOBJ_OP_FUNC_SENTINEL
const Eo_Op_Func_Description func_desc[] = {
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set),
EO_OP_FUNC_SENTINEL
};
eobj_class_funcs_set(klass, func_desc);
eo_class_funcs_set(klass, func_desc);
}
static const Eobj_Op_Description op_desc[] = {
EOBJ_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "i", "Set property A"),
EOBJ_OP_DESCRIPTION_SENTINEL
static const Eo_Op_Description op_desc[] = {
EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "i", "Set property A"),
EO_OP_DESCRIPTION_SENTINEL
};
static const Eobj_Event_Description *event_desc[] = {
static const Eo_Event_Description *event_desc[] = {
SIG_A_CHANGED,
NULL
};
static const Eobj_Class_Description class_desc = {
static const Eo_Class_Description class_desc = {
"Simple",
EOBJ_CLASS_TYPE_REGULAR,
EOBJ_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
event_desc,
sizeof(Private_Data),
NULL,
@ -63,5 +63,5 @@ static const Eobj_Class_Description class_desc = {
NULL
};
EOBJ_DEFINE_CLASS(simple_class_get, &class_desc, EOBJ_BASE_CLASS, NULL)
EO_DEFINE_CLASS(simple_class_get, &class_desc, EO_BASE_CLASS, NULL)

View File

@ -1,9 +1,9 @@
#ifndef SIMPLE_H
#define SIMPLE_H
#include "Eobj.h"
#include "Eo.h"
extern EAPI Eobj_Op SIMPLE_BASE_ID;
extern EAPI Eo_Op SIMPLE_BASE_ID;
enum {
SIMPLE_SUB_ID_A_SET,
@ -17,12 +17,12 @@ typedef struct
#define SIMPLE_ID(sub_id) (SIMPLE_BASE_ID + sub_id)
#define simple_a_set(a) SIMPLE_ID(SIMPLE_SUB_ID_A_SET), EOBJ_TYPECHECK(int, a)
#define simple_a_set(a) SIMPLE_ID(SIMPLE_SUB_ID_A_SET), EO_TYPECHECK(int, a)
extern const Eobj_Event_Description _SIG_A_CHANGED;
extern const Eo_Event_Description _SIG_A_CHANGED;
#define SIG_A_CHANGED (&(_SIG_A_CHANGED))
#define SIMPLE_CLASS simple_class_get()
const Eobj_Class *simple_class_get(void) EINA_CONST;
const Eo_Class *simple_class_get(void) EINA_CONST;
#endif

View File

@ -12,13 +12,13 @@ include_directories(
add_executable(composite_objects ${COMPOSITE_OBJECTS_CC_SOURCES})
get_target_property(eobj_LIB_FILE eobj LOCATION)
get_target_property(eo_LIB_FILE eo LOCATION)
target_link_libraries(composite_objects
${EINA_LIBRARIES}
${EINA_LDFLAGS_OTHER}
${eobj_LIB_FILE}
${eo_LIB_FILE}
)
add_dependencies(composite_objects eobj)
add_dependencies(composite_objects eo)
add_test(Example_composite_objects composite_objects)

View File

@ -1,4 +1,4 @@
#include "Eobj.h"
#include "Eo.h"
#include "simple.h"
#include "comp.h"
@ -6,50 +6,50 @@
#include "../eunit_tests.h"
EAPI Eobj_Op COMP_BASE_ID = 0;
EAPI Eo_Op COMP_BASE_ID = 0;
#define MY_CLASS COMP_CLASS
static void
_a_get(const Eobj *obj, const void *class_data EINA_UNUSED, va_list *list)
_a_get(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list)
{
int *a;
a = va_arg(*list, int *);
eobj_query_super(obj, simple_a_get(a));
eo_query_super(obj, simple_a_get(a));
}
static void
_constructor(Eobj *obj, void *class_data EINA_UNUSED)
_constructor(Eo *obj, void *class_data EINA_UNUSED)
{
eobj_constructor_super(obj);
eo_constructor_super(obj);
Eobj *simple = eobj_add(SIMPLE_CLASS, obj);
eobj_composite_object_attach(obj, simple);
eobj_event_callback_forwarder_add(simple, SIG_A_CHANGED, obj);
Eo *simple = eo_add(SIMPLE_CLASS, obj);
eo_composite_object_attach(obj, simple);
eo_event_callback_forwarder_add(simple, SIG_A_CHANGED, obj);
fail_if(eobj_composite_is(obj));
fail_if(!eobj_composite_is(simple));
fail_if(eo_composite_is(obj));
fail_if(!eo_composite_is(simple));
eobj_do(obj, eobj_base_data_set("simple-obj", simple, NULL));
eo_do(obj, eo_base_data_set("simple-obj", simple, NULL));
eobj_unref(simple);
eo_unref(simple);
}
static void
_class_constructor(Eobj_Class *klass)
_class_constructor(Eo_Class *klass)
{
const Eobj_Op_Func_Description func_desc[] = {
EOBJ_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
EOBJ_OP_FUNC_SENTINEL
const Eo_Op_Func_Description func_desc[] = {
EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
EO_OP_FUNC_SENTINEL
};
eobj_class_funcs_set(klass, func_desc);
eo_class_funcs_set(klass, func_desc);
}
static const Eobj_Class_Description class_desc = {
static const Eo_Class_Description class_desc = {
"Comp",
EOBJ_CLASS_TYPE_REGULAR,
EOBJ_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
NULL,
0,
_constructor,
@ -58,6 +58,6 @@ static const Eobj_Class_Description class_desc = {
NULL
};
EOBJ_DEFINE_CLASS(comp_class_get, &class_desc, EOBJ_BASE_CLASS,
EO_DEFINE_CLASS(comp_class_get, &class_desc, EO_BASE_CLASS,
SIMPLE_CLASS, NULL);

View File

@ -1,9 +1,9 @@
#ifndef COMP_H
#define COMP_H
#include "Eobj.h"
#include "Eo.h"
#define COMP_CLASS comp_class_get()
const Eobj_Class *comp_class_get(void) EINA_CONST;
const Eo_Class *comp_class_get(void) EINA_CONST;
#endif

View File

@ -1,4 +1,4 @@
#include "Eobj.h"
#include "Eo.h"
#include "simple.h"
#include "comp.h"
@ -7,7 +7,7 @@
static int cb_called = EINA_FALSE;
static Eina_Bool
_a_changed_cb(void *data, Eobj *obj, const Eobj_Event_Description *desc, void *event_info)
_a_changed_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info)
{
(void) desc;
(void) obj;
@ -16,7 +16,7 @@ _a_changed_cb(void *data, Eobj *obj, const Eobj_Event_Description *desc, void *e
cb_called = EINA_TRUE;
return EOBJ_CALLBACK_CONTINUE;
return EO_CALLBACK_CONTINUE;
}
int
@ -24,38 +24,38 @@ main(int argc, char *argv[])
{
(void) argc;
(void) argv;
eobj_init();
eo_init();
Eobj *obj = eobj_add(COMP_CLASS, NULL);
eobj_event_callback_add(obj, SIG_A_CHANGED, _a_changed_cb, NULL);
Eo *obj = eo_add(COMP_CLASS, NULL);
eo_event_callback_add(obj, SIG_A_CHANGED, _a_changed_cb, NULL);
int a;
eobj_do(obj, simple_a_set(1));
eo_do(obj, simple_a_set(1));
fail_if(!cb_called);
eobj_do(obj, simple_a_get(&a));
eo_do(obj, simple_a_get(&a));
fail_if(a != 1);
/* disable the callback forwarder, and fail if it's still called. */
Eobj *simple;
eobj_do(obj, eobj_base_data_get("simple-obj", (void **) &simple));
eobj_ref(simple);
eobj_event_callback_forwarder_del(simple, SIG_A_CHANGED, obj);
Eo *simple;
eo_do(obj, eo_base_data_get("simple-obj", (void **) &simple));
eo_ref(simple);
eo_event_callback_forwarder_del(simple, SIG_A_CHANGED, obj);
cb_called = EINA_FALSE;
eobj_do(obj, simple_a_set(2));
eo_do(obj, simple_a_set(2));
fail_if(cb_called);
fail_if(!eobj_composite_is(simple));
eobj_composite_object_detach(obj, simple);
fail_if(eobj_composite_is(simple));
eobj_composite_object_attach(obj, simple);
fail_if(!eobj_composite_is(simple));
fail_if(!eo_composite_is(simple));
eo_composite_object_detach(obj, simple);
fail_if(eo_composite_is(simple));
eo_composite_object_attach(obj, simple);
fail_if(!eo_composite_is(simple));
eobj_unref(simple);
eobj_unref(obj);
eo_unref(simple);
eo_unref(obj);
eobj_shutdown();
eo_shutdown();
return 0;
}

View File

@ -1,29 +1,29 @@
#include "Eobj.h"
#include "Eo.h"
#include "simple.h"
#include "config.h"
EAPI Eobj_Op SIMPLE_BASE_ID = 0;
EAPI Eo_Op SIMPLE_BASE_ID = 0;
EAPI const Eobj_Event_Description _SIG_A_CHANGED =
EOBJ_EVENT_DESCRIPTION("a,changed", "i", "Called when a has changed.");
EAPI const Eo_Event_Description _SIG_A_CHANGED =
EO_EVENT_DESCRIPTION("a,changed", "i", "Called when a has changed.");
#define MY_CLASS SIMPLE_CLASS
static void
_a_set(Eobj *obj, void *class_data, va_list *list)
_a_set(Eo *obj, void *class_data, va_list *list)
{
Simple_Public_Data *pd = class_data;
int a;
a = va_arg(*list, int);
printf("%s %d\n", eobj_class_name_get(MY_CLASS), a);
printf("%s %d\n", eo_class_name_get(MY_CLASS), a);
pd->a = a;
eobj_event_callback_call(obj, SIG_A_CHANGED, &pd->a);
eo_event_callback_call(obj, SIG_A_CHANGED, &pd->a);
}
static void
_a_get(const Eobj *obj EINA_UNUSED, const void *class_data, va_list *list)
_a_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list)
{
const Simple_Public_Data *pd = class_data;
int *a;
@ -32,32 +32,32 @@ _a_get(const Eobj *obj EINA_UNUSED, const void *class_data, va_list *list)
}
static void
_class_constructor(Eobj_Class *klass)
_class_constructor(Eo_Class *klass)
{
const Eobj_Op_Func_Description func_desc[] = {
EOBJ_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set),
EOBJ_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
EOBJ_OP_FUNC_SENTINEL
const Eo_Op_Func_Description func_desc[] = {
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set),
EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
EO_OP_FUNC_SENTINEL
};
eobj_class_funcs_set(klass, func_desc);
eo_class_funcs_set(klass, func_desc);
}
static const Eobj_Op_Description op_desc[] = {
EOBJ_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "i", "Set property A"),
EOBJ_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_GET, "i", "Get property A"),
EOBJ_OP_DESCRIPTION_SENTINEL
static const Eo_Op_Description op_desc[] = {
EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "i", "Set property A"),
EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_GET, "i", "Get property A"),
EO_OP_DESCRIPTION_SENTINEL
};
static const Eobj_Event_Description *event_desc[] = {
static const Eo_Event_Description *event_desc[] = {
SIG_A_CHANGED,
NULL
};
static const Eobj_Class_Description class_desc = {
static const Eo_Class_Description class_desc = {
"Simple",
EOBJ_CLASS_TYPE_REGULAR,
EOBJ_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
event_desc,
sizeof(Simple_Public_Data),
NULL,
@ -66,5 +66,5 @@ static const Eobj_Class_Description class_desc = {
NULL
};
EOBJ_DEFINE_CLASS(simple_class_get, &class_desc, EOBJ_BASE_CLASS, NULL);
EO_DEFINE_CLASS(simple_class_get, &class_desc, EO_BASE_CLASS, NULL);

View File

@ -1,9 +1,9 @@
#ifndef SIMPLE_H
#define SIMPLE_H
#include "Eobj.h"
#include "Eo.h"
extern EAPI Eobj_Op SIMPLE_BASE_ID;
extern EAPI Eo_Op SIMPLE_BASE_ID;
enum {
SIMPLE_SUB_ID_A_SET,
@ -18,13 +18,13 @@ typedef struct
#define SIMPLE_ID(sub_id) (SIMPLE_BASE_ID + sub_id)
#define simple_a_set(a) SIMPLE_ID(SIMPLE_SUB_ID_A_SET), EOBJ_TYPECHECK(int, a)
#define simple_a_get(a) SIMPLE_ID(SIMPLE_SUB_ID_A_GET), EOBJ_TYPECHECK(int *, a)
#define simple_a_set(a) SIMPLE_ID(SIMPLE_SUB_ID_A_SET), EO_TYPECHECK(int, a)
#define simple_a_get(a) SIMPLE_ID(SIMPLE_SUB_ID_A_GET), EO_TYPECHECK(int *, a)
extern const Eobj_Event_Description _SIG_A_CHANGED;
extern const Eo_Event_Description _SIG_A_CHANGED;
#define SIG_A_CHANGED (&(_SIG_A_CHANGED))
#define SIMPLE_CLASS simple_class_get()
const Eobj_Class *simple_class_get(void) EINA_CONST;
const Eo_Class *simple_class_get(void) EINA_CONST;
#endif

View File

@ -17,13 +17,13 @@ include_directories(
add_executable(constructors ${CONSTRUCTORS_CC_SOURCES})
get_target_property(eobj_LIB_FILE eobj LOCATION)
get_target_property(eo_LIB_FILE eo LOCATION)
target_link_libraries(constructors
${EINA_LIBRARIES}
${EINA_LDFLAGS_OTHER}
${eobj_LIB_FILE}
${eo_LIB_FILE}
)
add_dependencies(constructors eobj)
add_dependencies(constructors eo)
add_test(Example_constructors constructors)

View File

@ -1,4 +1,4 @@
#include "Eobj.h"
#include "Eo.h"
#include "simple.h"
#include "simple2.h"
#include "simple3.h"
@ -17,43 +17,43 @@ main(int argc, char *argv[])
int ret = 0;
(void) argc;
(void) argv;
eobj_init();
eo_init();
Eobj *obj = eobj_add(SIMPLE_CLASS, NULL);
Eo *obj = eo_add(SIMPLE_CLASS, NULL);
fail_if(my_init_count != 2);
eobj_do(obj, simple_a_set(1), simple_b_set(2));
eo_do(obj, simple_a_set(1), simple_b_set(2));
int a, b;
eobj_do(obj, simple_a_get(&a), simple_b_get(&b), mixin_add_and_print(5));
eo_do(obj, simple_a_get(&a), simple_b_get(&b), mixin_add_and_print(5));
eobj_unref(obj);
eo_unref(obj);
fail_if(my_init_count != 0);
obj = eobj_add(SIMPLE2_CLASS, NULL);
obj = eo_add(SIMPLE2_CLASS, NULL);
fail_if(obj);
obj = eobj_add(SIMPLE3_CLASS, NULL);
obj = eo_add(SIMPLE3_CLASS, NULL);
fail_if(obj);
my_init_count = 0;
obj = eobj_add(SIMPLE4_CLASS, NULL);
obj = eo_add(SIMPLE4_CLASS, NULL);
fail_if(my_init_count != 2);
eobj_unref(obj);
eo_unref(obj);
fail_if(my_init_count != 0);
obj = eobj_add(SIMPLE5_CLASS, NULL);
eobj_unref(obj);
obj = eo_add(SIMPLE5_CLASS, NULL);
eo_unref(obj);
obj = eobj_add(SIMPLE6_CLASS, NULL);
eobj_unref(obj);
obj = eo_add(SIMPLE6_CLASS, NULL);
eo_unref(obj);
eobj_shutdown();
eo_shutdown();
return ret;
}

View File

@ -1,18 +1,18 @@
#include "Eobj.h"
#include "Eo.h"
#include "mixin.h"
#include "simple.h"
#include "config.h"
EAPI Eobj_Op MIXIN_BASE_ID = 0;
EAPI Eo_Op MIXIN_BASE_ID = 0;
#define MY_CLASS MIXIN_CLASS
static void
_add_and_print_set(const Eobj *obj, const void *class_data EINA_UNUSED, va_list *list)
_add_and_print_set(const Eo *obj, const void *class_data EINA_UNUSED, va_list *list)
{
int a, b, x;
eobj_query(obj, simple_a_get(&a), simple_b_get(&b));
eo_query(obj, simple_a_get(&a), simple_b_get(&b));
x = va_arg(*list, const int);
printf("%s %d\n", __func__, a + b + x);
}
@ -20,41 +20,41 @@ _add_and_print_set(const Eobj *obj, const void *class_data EINA_UNUSED, va_list
extern int my_init_count;
static void
_constructor(Eobj *obj, void *class_data EINA_UNUSED)
_constructor(Eo *obj, void *class_data EINA_UNUSED)
{
eobj_constructor_super(obj);
eo_constructor_super(obj);
my_init_count++;
}
static void
_destructor(Eobj *obj, void *class_data EINA_UNUSED)
_destructor(Eo *obj, void *class_data EINA_UNUSED)
{
eobj_destructor_super(obj);
eo_destructor_super(obj);
my_init_count--;
}
static void
_class_constructor(Eobj_Class *klass)
_class_constructor(Eo_Class *klass)
{
const Eobj_Op_Func_Description func_desc[] = {
EOBJ_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_ADD_AND_SET), _add_and_print_set),
EOBJ_OP_FUNC_SENTINEL
const Eo_Op_Func_Description func_desc[] = {
EO_OP_FUNC_CONST(MIXIN_ID(MIXIN_SUB_ID_ADD_AND_SET), _add_and_print_set),
EO_OP_FUNC_SENTINEL
};
eobj_class_funcs_set(klass, func_desc);
eo_class_funcs_set(klass, func_desc);
}
static const Eobj_Op_Description op_desc[] = {
EOBJ_OP_DESCRIPTION_CONST(MIXIN_SUB_ID_ADD_AND_SET, "i", "Add A + B + param and print it"),
EOBJ_OP_DESCRIPTION_SENTINEL
static const Eo_Op_Description op_desc[] = {
EO_OP_DESCRIPTION_CONST(MIXIN_SUB_ID_ADD_AND_SET, "i", "Add A + B + param and print it"),
EO_OP_DESCRIPTION_SENTINEL
};
static const Eobj_Class_Description class_desc = {
static const Eo_Class_Description class_desc = {
"Mixin",
EOBJ_CLASS_TYPE_MIXIN,
EOBJ_CLASS_DESCRIPTION_OPS(&MIXIN_BASE_ID, op_desc, MIXIN_SUB_ID_LAST),
EO_CLASS_TYPE_MIXIN,
EO_CLASS_DESCRIPTION_OPS(&MIXIN_BASE_ID, op_desc, MIXIN_SUB_ID_LAST),
NULL,
0,
_constructor,
@ -63,5 +63,5 @@ static const Eobj_Class_Description class_desc = {
NULL
};
EOBJ_DEFINE_CLASS(mixin_class_get, &class_desc, NULL, NULL);
EO_DEFINE_CLASS(mixin_class_get, &class_desc, NULL, NULL);

View File

@ -1,9 +1,9 @@
#ifndef MIXIN_H
#define MIXIN_H
#include "Eobj.h"
#include "Eo.h"
extern EAPI Eobj_Op MIXIN_BASE_ID;
extern EAPI Eo_Op MIXIN_BASE_ID;
enum {
MIXIN_SUB_ID_ADD_AND_SET,
@ -12,9 +12,9 @@ enum {
#define MIXIN_ID(sub_id) (MIXIN_BASE_ID + sub_id)
#define mixin_add_and_print(x) MIXIN_ID(MIXIN_SUB_ID_ADD_AND_SET), EOBJ_TYPECHECK(int, x)
#define mixin_add_and_print(x) MIXIN_ID(MIXIN_SUB_ID_ADD_AND_SET), EO_TYPECHECK(int, x)
#define MIXIN_CLASS mixin_class_get()
const Eobj_Class *mixin_class_get(void) EINA_CONST;
const Eo_Class *mixin_class_get(void) EINA_CONST;
#endif

View File

@ -1,10 +1,10 @@
#include "Eobj.h"
#include "Eo.h"
#include "mixin.h"
#include "simple.h"
#include "config.h"
EAPI Eobj_Op SIMPLE_BASE_ID = 0;
EAPI Eo_Op SIMPLE_BASE_ID = 0;
typedef struct
{
@ -18,7 +18,7 @@ static char *class_var = NULL;
#define _GET_SET_FUNC(name) \
static void \
_##name##_get(const Eobj *obj EINA_UNUSED, const void *class_data, va_list *list) \
_##name##_get(const Eo *obj EINA_UNUSED, const void *class_data, va_list *list) \
{ \
const Private_Data *pd = class_data; \
int *name; \
@ -27,7 +27,7 @@ _##name##_get(const Eobj *obj EINA_UNUSED, const void *class_data, va_list *list
printf("%s %d\n", __func__, pd->name); \
} \
static void \
_##name##_set(Eobj *obj EINA_UNUSED, void *class_data, va_list *list) \
_##name##_set(Eo *obj EINA_UNUSED, void *class_data, va_list *list) \
{ \
Private_Data *pd = class_data; \
int name; \
@ -42,55 +42,55 @@ _GET_SET_FUNC(b)
extern int my_init_count;
static void
_constructor(Eobj *obj, void *class_data EINA_UNUSED)
_constructor(Eo *obj, void *class_data EINA_UNUSED)
{
eobj_constructor_super(obj);
eo_constructor_super(obj);
my_init_count++;
}
static void
_destructor(Eobj *obj, void *class_data EINA_UNUSED)
_destructor(Eo *obj, void *class_data EINA_UNUSED)
{
eobj_destructor_super(obj);
eo_destructor_super(obj);
my_init_count--;
}
static void
_class_constructor(Eobj_Class *klass)
_class_constructor(Eo_Class *klass)
{
const Eobj_Op_Func_Description func_desc[] = {
EOBJ_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set),
EOBJ_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
EOBJ_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_SET), _b_set),
EOBJ_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get),
EOBJ_OP_FUNC_SENTINEL
const Eo_Op_Func_Description func_desc[] = {
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set),
EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_SET), _b_set),
EO_OP_FUNC_CONST(SIMPLE_ID(SIMPLE_SUB_ID_B_GET), _b_get),
EO_OP_FUNC_SENTINEL
};
eobj_class_funcs_set(klass, func_desc);
eo_class_funcs_set(klass, func_desc);
class_var = malloc(10);
}
static void
_class_destructor(Eobj_Class *klass EINA_UNUSED)
_class_destructor(Eo_Class *klass EINA_UNUSED)
{
free(class_var);
}
static const Eobj_Op_Description op_desc[] = {
EOBJ_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "i", "Set property A"),
EOBJ_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_GET, "i", "Get property A"),
EOBJ_OP_DESCRIPTION(SIMPLE_SUB_ID_B_SET, "i", "Set property B"),
EOBJ_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_B_GET, "i", "Get property B"),
EOBJ_OP_DESCRIPTION_SENTINEL
static const Eo_Op_Description op_desc[] = {
EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "i", "Set property A"),
EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_A_GET, "i", "Get property A"),
EO_OP_DESCRIPTION(SIMPLE_SUB_ID_B_SET, "i", "Set property B"),
EO_OP_DESCRIPTION_CONST(SIMPLE_SUB_ID_B_GET, "i", "Get property B"),
EO_OP_DESCRIPTION_SENTINEL
};
static const Eobj_Class_Description class_desc = {
static const Eo_Class_Description class_desc = {
"Simple",
EOBJ_CLASS_TYPE_REGULAR,
EOBJ_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),
NULL,
sizeof(Private_Data),
_constructor,
@ -99,6 +99,6 @@ static const Eobj_Class_Description class_desc = {
_class_destructor
};
EOBJ_DEFINE_CLASS(simple_class_get, &class_desc, EOBJ_BASE_CLASS,
EO_DEFINE_CLASS(simple_class_get, &class_desc, EO_BASE_CLASS,
MIXIN_CLASS, NULL);

View File

@ -1,9 +1,9 @@
#ifndef SIMPLE_H
#define SIMPLE_H
#include "Eobj.h"
#include "Eo.h"
extern EAPI Eobj_Op SIMPLE_BASE_ID;
extern EAPI Eo_Op SIMPLE_BASE_ID;
enum {
SIMPLE_SUB_ID_A_SET,
@ -15,12 +15,12 @@ enum {
#define SIMPLE_ID(sub_id) (SIMPLE_BASE_ID + sub_id)
#define simple_a_set(a) SIMPLE_ID(SIMPLE_SUB_ID_A_SET), EOBJ_TYPECHECK(int, a)
#define simple_a_get(a) SIMPLE_ID(SIMPLE_SUB_ID_A_GET), EOBJ_TYPECHECK(int *, a)
#define simple_b_set(b) SIMPLE_ID(SIMPLE_SUB_ID_B_SET), EOBJ_TYPECHECK(int, b)
#define simple_b_get(b) SIMPLE_ID(SIMPLE_SUB_ID_B_GET), EOBJ_TYPECHECK(int *, b)
#define simple_a_set(a) SIMPLE_ID(SIMPLE_SUB_ID_A_SET), EO_TYPECHECK(int, a)
#define simple_a_get(a) SIMPLE_ID(SIMPLE_SUB_ID_A_GET), EO_TYPECHECK(int *, a)
#define simple_b_set(b) SIMPLE_ID(SIMPLE_SUB_ID_B_SET), EO_TYPECHECK(int, b)
#define simple_b_get(b) SIMPLE_ID(SIMPLE_SUB_ID_B_GET), EO_TYPECHECK(int *, b)
#define SIMPLE_CLASS simple_class_get()
const Eobj_Class *simple_class_get(void) EINA_CONST;
const Eo_Class *simple_class_get(void) EINA_CONST;
#endif

View File

@ -1,4 +1,4 @@
#include "Eobj.h"
#include "Eo.h"
#include "mixin.h"
#include "simple2.h"
@ -7,17 +7,17 @@
#define MY_CLASS SIMPLE2_CLASS
static void
_constructor(Eobj *obj, void *class_data EINA_UNUSED)
_constructor(Eo *obj, void *class_data EINA_UNUSED)
{
eobj_constructor_super(obj);
eo_constructor_super(obj);
eobj_constructor_error_set(obj);
eo_constructor_error_set(obj);
}
static const Eobj_Class_Description class_desc = {
static const Eo_Class_Description class_desc = {
"Simple2",
EOBJ_CLASS_TYPE_REGULAR,
EOBJ_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
NULL,
0,
_constructor,
@ -26,5 +26,5 @@ static const Eobj_Class_Description class_desc = {
NULL
};
EOBJ_DEFINE_CLASS(simple2_class_get, &class_desc, EOBJ_BASE_CLASS, NULL);
EO_DEFINE_CLASS(simple2_class_get, &class_desc, EO_BASE_CLASS, NULL);

View File

@ -1,9 +1,9 @@
#ifndef SIMPLE2_H
#define SIMPLE2_H
#include "Eobj.h"
#include "Eo.h"
#define SIMPLE2_CLASS simple2_class_get()
const Eobj_Class *simple2_class_get(void) EINA_CONST;
const Eo_Class *simple2_class_get(void) EINA_CONST;
#endif

View File

@ -1,4 +1,4 @@
#include "Eobj.h"
#include "Eo.h"
#include "mixin.h"
#include "simple3.h"
@ -7,15 +7,15 @@
#define MY_CLASS SIMPLE3_CLASS
static void
_constructor(Eobj *obj, void *class_data EINA_UNUSED)
_constructor(Eo *obj, void *class_data EINA_UNUSED)
{
(void) obj;
}
static const Eobj_Class_Description class_desc = {
static const Eo_Class_Description class_desc = {
"Simple3",
EOBJ_CLASS_TYPE_REGULAR,
EOBJ_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
NULL,
0,
_constructor,
@ -24,5 +24,5 @@ static const Eobj_Class_Description class_desc = {
NULL
};
EOBJ_DEFINE_CLASS(simple3_class_get, &class_desc, EOBJ_BASE_CLASS, NULL);
EO_DEFINE_CLASS(simple3_class_get, &class_desc, EO_BASE_CLASS, NULL);

View File

@ -1,9 +1,9 @@
#ifndef SIMPLE3_H
#define SIMPLE3_H
#include "Eobj.h"
#include "Eo.h"
#define SIMPLE3_CLASS simple3_class_get()
const Eobj_Class *simple3_class_get(void) EINA_CONST;
const Eo_Class *simple3_class_get(void) EINA_CONST;
#endif

View File

@ -1,14 +1,14 @@
#include "Eobj.h"
#include "Eo.h"
#include "mixin.h"
#include "simple.h"
#include "simple4.h"
#define MY_CLASS SIMPLE4_CLASS
static const Eobj_Class_Description class_desc = {
static const Eo_Class_Description class_desc = {
"Simple4",
EOBJ_CLASS_TYPE_REGULAR,
EOBJ_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
NULL,
0,
NULL,
@ -17,5 +17,5 @@ static const Eobj_Class_Description class_desc = {
NULL
};
EOBJ_DEFINE_CLASS(simple4_class_get, &class_desc, SIMPLE_CLASS, MIXIN_CLASS, NULL);
EO_DEFINE_CLASS(simple4_class_get, &class_desc, SIMPLE_CLASS, MIXIN_CLASS, NULL);

View File

@ -1,9 +1,9 @@
#ifndef SIMPLE4_H
#define SIMPLE4_H
#include "Eobj.h"
#include "Eo.h"
#define SIMPLE4_CLASS simple4_class_get()
const Eobj_Class *simple4_class_get(void) EINA_CONST;
const Eo_Class *simple4_class_get(void) EINA_CONST;
#endif

View File

@ -1,4 +1,4 @@
#include "Eobj.h"
#include "Eo.h"
#include "mixin.h"
#include "simple5.h"
@ -7,15 +7,15 @@
#define MY_CLASS SIMPLE5_CLASS
static void
_destructor(Eobj *obj, void *class_data EINA_UNUSED)
_destructor(Eo *obj, void *class_data EINA_UNUSED)
{
(void) obj;
}
static const Eobj_Class_Description class_desc = {
static const Eo_Class_Description class_desc = {
"Simple5",
EOBJ_CLASS_TYPE_REGULAR,
EOBJ_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
NULL,
0,
NULL,
@ -24,5 +24,5 @@ static const Eobj_Class_Description class_desc = {
NULL
};
EOBJ_DEFINE_CLASS(simple5_class_get, &class_desc, EOBJ_BASE_CLASS, NULL);
EO_DEFINE_CLASS(simple5_class_get, &class_desc, EO_BASE_CLASS, NULL);

View File

@ -1,9 +1,9 @@
#ifndef SIMPLE5_H
#define SIMPLE5_H
#include "Eobj.h"
#include "Eo.h"
#define SIMPLE5_CLASS simple5_class_get()
const Eobj_Class *simple5_class_get(void) EINA_CONST;
const Eo_Class *simple5_class_get(void) EINA_CONST;
#endif

View File

@ -1,4 +1,4 @@
#include "Eobj.h"
#include "Eo.h"
#include "mixin.h"
#include "simple6.h"
@ -7,17 +7,17 @@
#define MY_CLASS SIMPLE6_CLASS
static void
_destructor(Eobj *obj, void *class_data EINA_UNUSED)
_destructor(Eo *obj, void *class_data EINA_UNUSED)
{
eobj_constructor_super(obj);
eo_constructor_super(obj);
eobj_constructor_error_set(obj);
eo_constructor_error_set(obj);
}
static const Eobj_Class_Description class_desc = {
static const Eo_Class_Description class_desc = {
"Simple6",
EOBJ_CLASS_TYPE_REGULAR,
EOBJ_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
NULL,
0,
NULL,
@ -26,5 +26,5 @@ static const Eobj_Class_Description class_desc = {
NULL
};
EOBJ_DEFINE_CLASS(simple6_class_get, &class_desc, EOBJ_BASE_CLASS, NULL);
EO_DEFINE_CLASS(simple6_class_get, &class_desc, EO_BASE_CLASS, NULL);

View File

@ -1,9 +1,9 @@
#ifndef SIMPLE6_H
#define SIMPLE6_H
#include "Eobj.h"
#include "Eo.h"
#define SIMPLE6_CLASS simple6_class_get()
const Eobj_Class *simple6_class_get(void) EINA_CONST;
const Eo_Class *simple6_class_get(void) EINA_CONST;
#endif

View File

@ -15,13 +15,13 @@ include_directories(
)
add_executable(evas ${EVAS_CC_SOURCES})
get_target_property(eobj_LIB_FILE eobj LOCATION)
get_target_property(eo_LIB_FILE eo LOCATION)
target_link_libraries(evas
${EINA_LIBRARIES}
${EINA_LDFLAGS_OTHER}
${EVAS_LIBRARIES}
${ELEMENTARY_LIBRARIES}
${eobj_LIB_FILE}
${eo_LIB_FILE}
)
add_dependencies(evas eobj)
add_dependencies(evas eo)

View File

@ -1,12 +1,12 @@
#include <Elementary.h>
#include "Eobj.h"
#include "Eo.h"
#include "evas_obj.h"