summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/eo/Eo.h38
-rw-r--r--src/lib/eo/eo.c26
-rw-r--r--src/lib/eo/eo_base_class.c8
-rw-r--r--src/lib/eo/eo_private.h2
4 files changed, 37 insertions, 37 deletions
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 54aaca3..55f910e 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -45,7 +45,7 @@ typedef struct _Eo_Opaque Eo;
45 * The basic class type - should be removed, just for compat. 45 * The basic class type - should be removed, just for compat.
46 * @deprecated 46 * @deprecated
47 */ 47 */
48typedef struct _Eo_Opaque Eo_Class; 48typedef Eo Eo_Class;
49 49
50/** 50/**
51 * @typedef Eo_Callback_Priority 51 * @typedef Eo_Callback_Priority
@@ -329,13 +329,13 @@ typedef struct _Eo_Event_Description Eo_Event_Description;
329 * You must use this macro if you want thread safety in class creation. 329 * You must use this macro if you want thread safety in class creation.
330 */ 330 */
331#define EO_DEFINE_CLASS(class_get_func_name, class_desc, parent_class, ...) \ 331#define EO_DEFINE_CLASS(class_get_func_name, class_desc, parent_class, ...) \
332EAPI const Eo * \ 332EAPI const Eo_Class * \
333class_get_func_name(void) \ 333class_get_func_name(void) \
334{ \ 334{ \
335 const Eo *_tmp_parent_class; \ 335 const Eo_Class *_tmp_parent_class; \
336 static volatile char lk_init = 0; \ 336 static volatile char lk_init = 0; \
337 static Eina_Lock _my_lock; \ 337 static Eina_Lock _my_lock; \
338 static const Eo * volatile _my_class = NULL; \ 338 static const Eo_Class * volatile _my_class = NULL; \
339 if (EINA_LIKELY(!!_my_class)) return _my_class; \ 339 if (EINA_LIKELY(!!_my_class)) return _my_class; \
340 \ 340 \
341 eina_lock_take(&_eo_class_creation_lock); \ 341 eina_lock_take(&_eo_class_creation_lock); \
@@ -464,8 +464,8 @@ struct _Eo_Class_Description
464 } ops; /**< The ops description, should be filled using #EO_CLASS_DESCRIPTION_OPS */ 464 } ops; /**< The ops description, should be filled using #EO_CLASS_DESCRIPTION_OPS */
465 const Eo_Event_Description **events; /**< The event descriptions for this class. */ 465 const Eo_Event_Description **events; /**< The event descriptions for this class. */
466 size_t data_size; /**< The size of data (private + protected + public) this class needs per object. */ 466 size_t data_size; /**< The size of data (private + protected + public) this class needs per object. */
467 void (*class_constructor)(Eo *klass); /**< The constructor of the class. */ 467 void (*class_constructor)(Eo_Class *klass); /**< The constructor of the class. */
468 void (*class_destructor)(Eo *klass); /**< The destructor of the class. */ 468 void (*class_destructor)(Eo_Class *klass); /**< The destructor of the class. */
469}; 469};
470 470
471/** 471/**
@@ -540,7 +540,7 @@ typedef struct _Eo_Class_Description Eo_Class_Description;
540 * 540 *
541 * @see #EO_DEFINE_CLASS 541 * @see #EO_DEFINE_CLASS
542 */ 542 */
543EAPI const Eo *eo_class_new(const Eo_Class_Description *desc, const Eo *parent, ...); 543EAPI const Eo_Class *eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent, ...);
544 544
545/** 545/**
546 * @brief Check if an object "is a" klass. 546 * @brief Check if an object "is a" klass.
@@ -550,7 +550,7 @@ EAPI const Eo *eo_class_new(const Eo_Class_Description *desc, const Eo *parent,
550 * 550 *
551 * Notice: This function does not support composite objects. 551 * Notice: This function does not support composite objects.
552 */ 552 */
553EAPI Eina_Bool eo_isa(const Eo *obj, const Eo *klass); 553EAPI Eina_Bool eo_isa(const Eo *obj, const Eo_Class *klass);
554 554
555/** 555/**
556 * @brief Sets the OP functions for a class. 556 * @brief Sets the OP functions for a class.
@@ -559,7 +559,7 @@ EAPI Eina_Bool eo_isa(const Eo *obj, const Eo *klass);
559 * 559 *
560 * Should be called from within the class constructor. 560 * Should be called from within the class constructor.
561 */ 561 */
562EAPI void eo_class_funcs_set(Eo *klass, const Eo_Op_Func_Description *func_descs); 562EAPI void eo_class_funcs_set(Eo_Class *klass, const Eo_Op_Func_Description *func_descs);
563 563
564/** 564/**
565 * @brief Gets the name of the passed class. 565 * @brief Gets the name of the passed class.
@@ -568,7 +568,7 @@ EAPI void eo_class_funcs_set(Eo *klass, const Eo_Op_Func_Description *func_descs
568 * 568 *
569 * @see eo_class_get() 569 * @see eo_class_get()
570 */ 570 */
571EAPI const char *eo_class_name_get(const Eo *obj); 571EAPI const char *eo_class_name_get(const Eo_Class *klass);
572 572
573/** 573/**
574 * @} 574 * @}
@@ -676,7 +676,7 @@ EAPI Eina_Bool eo_vdo_internal(const char *file, int line, const Eo *obj, va_lis
676 * @see #eo_do 676 * @see #eo_do
677 * @see #eo_do_super 677 * @see #eo_do_super
678 */ 678 */
679EAPI Eina_Bool eo_do_super_internal(const char *file, int line, const Eo *obj, const Eo *cur_klass, Eo_Op op, ...); 679EAPI Eina_Bool eo_do_super_internal(const char *file, int line, const Eo *obj, const Eo_Class *cur_klass, Eo_Op op, ...);
680 680
681/** 681/**
682 * @brief Gets the class of the object. 682 * @brief Gets the class of the object.
@@ -685,7 +685,7 @@ EAPI Eina_Bool eo_do_super_internal(const char *file, int line, const Eo *obj, c
685 * 685 *
686 * @see eo_class_name_get() 686 * @see eo_class_name_get()
687 */ 687 */
688EAPI const Eo *eo_class_get(const Eo *obj); 688EAPI const Eo_Class *eo_class_get(const Eo *obj);
689 689
690/** 690/**
691 * @def eo_error_set 691 * @def eo_error_set
@@ -712,7 +712,7 @@ EAPI void eo_error_set_internal(const Eo *obj, const char *file, int line);
712 */ 712 */
713#define eo_add(klass, parent, ...) \ 713#define eo_add(klass, parent, ...) \
714 ({ \ 714 ({ \
715 const Eo *_tmp_klass = klass; \ 715 const Eo_Class *_tmp_klass = klass; \
716 eo_add_internal(__FILE__, __LINE__, _tmp_klass, parent, eo_constructor(), ## __VA_ARGS__, EO_NOOP); \ 716 eo_add_internal(__FILE__, __LINE__, _tmp_klass, parent, eo_constructor(), ## __VA_ARGS__, EO_NOOP); \
717 }) 717 })
718 718
@@ -728,7 +728,7 @@ EAPI void eo_error_set_internal(const Eo *obj, const char *file, int line);
728 */ 728 */
729#define eo_add_custom(klass, parent, ...) \ 729#define eo_add_custom(klass, parent, ...) \
730 ({ \ 730 ({ \
731 const Eo *_tmp_klass = klass; \ 731 const Eo_Class *_tmp_klass = klass; \
732 eo_add_internal(__FILE__, __LINE__, _tmp_klass, parent, ## __VA_ARGS__, EO_NOOP); \ 732 eo_add_internal(__FILE__, __LINE__, _tmp_klass, parent, ## __VA_ARGS__, EO_NOOP); \
733 }) 733 })
734 734
@@ -744,7 +744,7 @@ EAPI void eo_error_set_internal(const Eo *obj, const char *file, int line);
744 * 744 *
745 * @see #eo_add 745 * @see #eo_add
746 */ 746 */
747EAPI Eo *eo_add_internal(const char *file, int line, const Eo *klass, Eo *parent, ...); 747EAPI Eo *eo_add_internal(const char *file, int line, const Eo_Class *klass, Eo *parent, ...);
748 748
749/** 749/**
750 * @brief Get a pointer to the data of an object for a specific class. 750 * @brief Get a pointer to the data of an object for a specific class.
@@ -753,7 +753,7 @@ EAPI Eo *eo_add_internal(const char *file, int line, const Eo *klass, Eo *parent
753 * @return a pointer to the data. 753 * @return a pointer to the data.
754 * @deprecated use eo_data_scope_get or eo_data_ref instead. 754 * @deprecated use eo_data_scope_get or eo_data_ref instead.
755 */ 755 */
756EAPI void *eo_data_get(const Eo *obj, const Eo *klass) EINA_DEPRECATED; 756EAPI void *eo_data_get(const Eo *obj, const Eo_Class *klass) EINA_DEPRECATED;
757 757
758/** 758/**
759 * @brief Get a pointer to the data of an object for a specific class. 759 * @brief Get a pointer to the data of an object for a specific class.
@@ -766,7 +766,7 @@ EAPI void *eo_data_get(const Eo *obj, const Eo *klass) EINA_DEPRECATED;
766 * @see eo_data_ref() 766 * @see eo_data_ref()
767 * @see eo_data_unref() 767 * @see eo_data_unref()
768 */ 768 */
769EAPI void *eo_data_scope_get(const Eo *obj, const Eo *klass); 769EAPI void *eo_data_scope_get(const Eo *obj, const Eo_Class *klass);
770 770
771/** 771/**
772 * @def eo_data_xref(obj, klass, ref_obj) 772 * @def eo_data_xref(obj, klass, ref_obj)
@@ -794,7 +794,7 @@ EAPI void *eo_data_scope_get(const Eo *obj, const Eo *klass);
794 * 794 *
795 * @see eo_data_xunref_internal() 795 * @see eo_data_xunref_internal()
796 */ 796 */
797EAPI void *eo_data_xref_internal(const char *file, int line, const Eo *obj, const Eo *klass, const Eo *ref_obj); 797EAPI void *eo_data_xref_internal(const char *file, int line, const Eo *obj, const Eo_Class *klass, const Eo *ref_obj);
798 798
799/** 799/**
800 * @def eo_data_xunref(obj, data, ref_obj) 800 * @def eo_data_xunref(obj, data, ref_obj)
@@ -1003,7 +1003,7 @@ EAPI Eina_Bool eo_composite_is(const Eo *comp_obj);
1003 * @brief Use #EO_BASE_CLASS 1003 * @brief Use #EO_BASE_CLASS
1004 * @internal 1004 * @internal
1005 * */ 1005 * */
1006EAPI const Eo *eo_base_class_get(void); 1006EAPI const Eo_Class *eo_base_class_get(void);
1007 1007
1008/** 1008/**
1009 * @typedef eo_base_data_free_func 1009 * @typedef eo_base_data_free_func
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 1ce4a56..44461d2 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -149,7 +149,7 @@ _eo_is_a_class(const Eo *obj_id)
149} 149}
150 150
151static inline _Eo_Class * 151static inline _Eo_Class *
152_eo_class_pointer_get(const Eo *klass_id) 152_eo_class_pointer_get(const Eo_Class *klass_id)
153{ 153{
154#ifdef HAVE_EO_ID 154#ifdef HAVE_EO_ID
155 return ID_CLASS_GET((Eo_Id)klass_id); 155 return ID_CLASS_GET((Eo_Id)klass_id);
@@ -419,7 +419,7 @@ eo_vdo_internal(const char *file, int line, const Eo *obj_id, va_list *ops)
419} 419}
420 420
421EAPI Eina_Bool 421EAPI Eina_Bool
422eo_do_super_internal(const char *file, int line, const Eo *obj_id, const Eo *cur_klass_id, Eo_Op op, ...) 422eo_do_super_internal(const char *file, int line, const Eo *obj_id, const Eo_Class *cur_klass_id, Eo_Op op, ...)
423{ 423{
424 const _Eo_Class *nklass; 424 const _Eo_Class *nklass;
425 Eina_Bool op_ret = EINA_TRUE; 425 Eina_Bool op_ret = EINA_TRUE;
@@ -451,7 +451,7 @@ eo_do_super_internal(const char *file, int line, const Eo *obj_id, const Eo *cur
451 return (ret & op_ret); 451 return (ret & op_ret);
452} 452}
453 453
454EAPI const Eo * 454EAPI const Eo_Class *
455eo_class_get(const Eo *obj_id) 455eo_class_get(const Eo *obj_id)
456{ 456{
457 if (_eo_is_a_class(obj_id)) 457 if (_eo_is_a_class(obj_id))
@@ -468,7 +468,7 @@ eo_class_get(const Eo *obj_id)
468} 468}
469 469
470EAPI const char * 470EAPI const char *
471eo_class_name_get(const Eo *obj_id) 471eo_class_name_get(const Eo_Class *obj_id)
472{ 472{
473 const _Eo_Class *klass; 473 const _Eo_Class *klass;
474 474
@@ -636,7 +636,7 @@ _eo_class_constructor(_Eo_Class *klass)
636} 636}
637 637
638EAPI void 638EAPI void
639eo_class_funcs_set(Eo *klass_id, const Eo_Op_Func_Description *func_descs) 639eo_class_funcs_set(Eo_Class *klass_id, const Eo_Op_Func_Description *func_descs)
640{ 640{
641 EO_CLASS_POINTER_RETURN(klass_id, klass); 641 EO_CLASS_POINTER_RETURN(klass_id, klass);
642 642
@@ -751,8 +751,8 @@ _eo_class_isa_func(Eo *obj_id EINA_UNUSED, void *class_data EINA_UNUSED, va_list
751 /* Do nonthing. */ 751 /* Do nonthing. */
752} 752}
753 753
754EAPI const Eo * 754EAPI const Eo_Class *
755eo_class_new(const Eo_Class_Description *desc, const Eo *parent_id, ...) 755eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
756{ 756{
757 _Eo_Class *klass; 757 _Eo_Class *klass;
758 va_list p_list; 758 va_list p_list;
@@ -821,7 +821,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo *parent_id, ...)
821 extn_id = va_arg(p_list, Eo_Id *); 821 extn_id = va_arg(p_list, Eo_Id *);
822 while (extn_id) 822 while (extn_id)
823 { 823 {
824 extn = _eo_class_pointer_get((Eo *)extn_id); 824 extn = _eo_class_pointer_get((Eo_Class *)extn_id);
825 switch (extn->desc->type) 825 switch (extn->desc->type)
826 { 826 {
827 case EO_CLASS_TYPE_REGULAR: 827 case EO_CLASS_TYPE_REGULAR:
@@ -1019,7 +1019,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo *parent_id, ...)
1019} 1019}
1020 1020
1021EAPI Eina_Bool 1021EAPI Eina_Bool
1022eo_isa(const Eo *obj_id, const Eo *klass_id) 1022eo_isa(const Eo *obj_id, const Eo_Class *klass_id)
1023{ 1023{
1024 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, EINA_FALSE); 1024 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, EINA_FALSE);
1025 EO_CLASS_POINTER_RETURN_VAL(klass_id, klass, EINA_FALSE); 1025 EO_CLASS_POINTER_RETURN_VAL(klass_id, klass, EINA_FALSE);
@@ -1045,7 +1045,7 @@ _eo_parent_internal_set(_Eo_Object *obj, ...)
1045} 1045}
1046 1046
1047EAPI Eo * 1047EAPI Eo *
1048eo_add_internal(const char *file, int line, const Eo *klass_id, Eo *parent_id, ...) 1048eo_add_internal(const char *file, int line, const Eo_Class *klass_id, Eo *parent_id, ...)
1049{ 1049{
1050 Eina_Bool do_err; 1050 Eina_Bool do_err;
1051 _Eo_Object *obj; 1051 _Eo_Object *obj;
@@ -1326,13 +1326,13 @@ _eo_data_xunref_internal(_Eo_Object *obj, void *data, const _Eo_Object *ref_obj)
1326} 1326}
1327 1327
1328EAPI void * 1328EAPI void *
1329eo_data_get(const Eo *obj_id, const Eo *klass_id) 1329eo_data_get(const Eo *obj_id, const Eo_Class *klass_id)
1330{ 1330{
1331 return eo_data_scope_get(obj_id, klass_id); 1331 return eo_data_scope_get(obj_id, klass_id);
1332} 1332}
1333 1333
1334EAPI void * 1334EAPI void *
1335eo_data_scope_get(const Eo *obj_id, const Eo *klass_id) 1335eo_data_scope_get(const Eo *obj_id, const Eo_Class *klass_id)
1336{ 1336{
1337 void *ret; 1337 void *ret;
1338 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL); 1338 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL);
@@ -1359,7 +1359,7 @@ eo_data_scope_get(const Eo *obj_id, const Eo *klass_id)
1359} 1359}
1360 1360
1361EAPI void * 1361EAPI void *
1362eo_data_xref_internal(const char *file, int line, const Eo *obj_id, const Eo *klass_id, const Eo *ref_obj_id) 1362eo_data_xref_internal(const char *file, int line, const Eo *obj_id, const Eo_Class *klass_id, const Eo *ref_obj_id)
1363{ 1363{
1364 void *ret; 1364 void *ret;
1365 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL); 1365 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL);
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index fcec764..28b52d9 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -744,13 +744,13 @@ _ev_freeze_get(Eo *obj EINA_UNUSED, void *class_data, va_list *list)
744} 744}
745 745
746static void 746static void
747_ev_global_freeze(Eo *klass EINA_UNUSED, void *data EINA_UNUSED, va_list *list EINA_UNUSED) 747_ev_global_freeze(Eo_Class *klass EINA_UNUSED, void *data EINA_UNUSED, va_list *list EINA_UNUSED)
748{ 748{
749 event_freeze_count++; 749 event_freeze_count++;
750} 750}
751 751
752static void 752static void
753_ev_global_thaw(Eo *klass EINA_UNUSED, void *data EINA_UNUSED, va_list *list EINA_UNUSED) 753_ev_global_thaw(Eo_Class *klass EINA_UNUSED, void *data EINA_UNUSED, va_list *list EINA_UNUSED)
754{ 754{
755 if (event_freeze_count > 0) 755 if (event_freeze_count > 0)
756 { 756 {
@@ -763,7 +763,7 @@ _ev_global_thaw(Eo *klass EINA_UNUSED, void *data EINA_UNUSED, va_list *list EIN
763} 763}
764 764
765static void 765static void
766_ev_global_freeze_get(Eo *klass EINA_UNUSED, void *data EINA_UNUSED, va_list *list) 766_ev_global_freeze_get(Eo_Class *klass EINA_UNUSED, void *data EINA_UNUSED, va_list *list)
767{ 767{
768 EO_PARAMETER_GET(int *, ret, list); 768 EO_PARAMETER_GET(int *, ret, list);
769 769
@@ -905,7 +905,7 @@ _destructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
905} 905}
906 906
907static void 907static void
908_class_constructor(Eo *klass) 908_class_constructor(Eo_Class *klass)
909{ 909{
910 event_freeze_count = 0; 910 event_freeze_count = 0;
911 911
diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h
index aec22f1..d276575 100644
--- a/src/lib/eo/eo_private.h
+++ b/src/lib/eo/eo_private.h
@@ -184,7 +184,7 @@ Eo *_eo_header_id_get(const Eo_Base *header)
184} 184}
185 185
186static inline 186static inline
187Eo *_eo_class_id_get(const _Eo_Class *klass) 187Eo_Class *_eo_class_id_get(const _Eo_Class *klass)
188{ 188{
189 return _eo_header_id_get((Eo_Base *) klass); 189 return _eo_header_id_get((Eo_Base *) klass);
190} 190}