diff options
author | Daniel Zaoui <daniel.zaoui@samsung.com> | 2013-04-30 15:09:52 +0300 |
---|---|---|
committer | Daniel Zaoui <daniel.zaoui@samsung.com> | 2013-05-01 10:37:08 +0300 |
commit | 654a3f5f94c2464b8563d27da94a78398c112962 (patch) | |
tree | 498707d8bfd57e253fd9c12fbeea6710b7b04009 | |
parent | f6a37f88d26a4a00c50f38d078b4047c24992bcb (diff) | |
download | efl-654a3f5f94c2464b8563d27da94a78398c112962.tar.gz |
Efl: replace eo_data_get for objects data referencing.
59 files changed, 705 insertions, 653 deletions
diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c index a3797f08b4..39cc560a5e 100644 --- a/src/lib/ecore/ecore_anim.c +++ b/src/lib/ecore/ecore_anim.c @@ -400,7 +400,7 @@ ecore_animator_del(Ecore_Animator *obj) if (!obj) return NULL; EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); - Ecore_Animator_Private_Data *animator = eo_data_get(obj, MY_CLASS); + Ecore_Animator_Private_Data *animator = eo_data_scope_get(obj, MY_CLASS); _ecore_lock(); if (!animator) goto unlock; @@ -570,7 +570,7 @@ static Eina_Bool _ecore_animator_run(void *data) { Ecore_Animator *obj = data; - Ecore_Animator_Private_Data *animator = eo_data_get(obj, MY_CLASS); + Ecore_Animator_Private_Data *animator = eo_data_scope_get(obj, MY_CLASS); double pos = 0.0, t; Eina_Bool run_ret; diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c index 36ab9a6aca..d5753ae2a5 100644 --- a/src/lib/ecore/ecore_idle_enterer.c +++ b/src/lib/ecore/ecore_idle_enterer.c @@ -174,7 +174,7 @@ ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer) static void * _ecore_idle_enterer_del(Ecore_Idle_Enterer *obj) { - Ecore_Idle_Enterer_Private_Data *idle_enterer = eo_data_get(obj, MY_CLASS); + Ecore_Idle_Enterer_Private_Data *idle_enterer = eo_data_scope_get(obj, MY_CLASS); if (!idle_enterer) return NULL; EINA_SAFETY_ON_TRUE_RETURN_VAL(idle_enterer->delete_me, NULL); diff --git a/src/lib/ecore/ecore_idle_exiter.c b/src/lib/ecore/ecore_idle_exiter.c index fa93d1ca2e..cf76275027 100644 --- a/src/lib/ecore/ecore_idle_exiter.c +++ b/src/lib/ecore/ecore_idle_exiter.c @@ -125,7 +125,7 @@ ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter) static void * _ecore_idle_exiter_del(Ecore_Idle_Exiter *obj) { - Ecore_Idle_Exiter_Private_Data *idle_exiter = eo_data_get(obj, MY_CLASS); + Ecore_Idle_Exiter_Private_Data *idle_exiter = eo_data_scope_get(obj, MY_CLASS); EINA_SAFETY_ON_TRUE_RETURN_VAL(idle_exiter->delete_me, NULL); idle_exiter->delete_me = 1; idle_exiters_delete_me = 1; diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c index 0094e238e6..0495b4edfa 100644 --- a/src/lib/ecore/ecore_idler.c +++ b/src/lib/ecore/ecore_idler.c @@ -111,7 +111,7 @@ ecore_idler_del(Ecore_Idler *idler) static void * _ecore_idler_del(Ecore_Idler *obj) { - Ecore_Idler_Private_Data *idler = eo_data_get(obj, MY_CLASS); + Ecore_Idler_Private_Data *idler = eo_data_scope_get(obj, MY_CLASS); EINA_SAFETY_ON_TRUE_RETURN_VAL(idler->delete_me, NULL); idler->delete_me = 1; idlers_delete_me = 1; diff --git a/src/lib/ecore/ecore_job.c b/src/lib/ecore/ecore_job.c index e057af00e2..cfdb1d1891 100644 --- a/src/lib/ecore/ecore_job.c +++ b/src/lib/ecore/ecore_job.c @@ -124,7 +124,7 @@ ecore_job_del(Ecore_Job *obj) if (!obj) return NULL; EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); - Ecore_Job_Private_Data *job = eo_data_get(obj, MY_CLASS); + Ecore_Job_Private_Data *job = eo_data_scope_get(obj, MY_CLASS); data = job->data; ecore_event_del(job->event); eo_parent_set(obj, NULL); diff --git a/src/lib/ecore/ecore_poll.c b/src/lib/ecore/ecore_poll.c index 9057d992a7..886e6531cf 100644 --- a/src/lib/ecore/ecore_poll.c +++ b/src/lib/ecore/ecore_poll.c @@ -394,7 +394,7 @@ ecore_poller_del(Ecore_Poller *obj) if (!obj) return NULL; EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); - Ecore_Poller_Private_Data *poller = eo_data_get(obj, MY_CLASS); + Ecore_Poller_Private_Data *poller = eo_data_scope_get(obj, MY_CLASS); /* we are walking the poller list - a bad idea to remove from it while * walking it, so just flag it as delete_me and come back to it after * the loop has finished */ diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c index 2ecd67af7e..08396d6ae0 100644 --- a/src/lib/ecore/ecore_timer.c +++ b/src/lib/ecore/ecore_timer.c @@ -603,7 +603,7 @@ EAPI void _ecore_timer_delay(Ecore_Timer *obj, double add) { - Ecore_Timer_Private_Data *timer = eo_data_get(obj, MY_CLASS); + Ecore_Timer_Private_Data *timer = eo_data_scope_get(obj, MY_CLASS); if (timer->frozen) { @@ -612,6 +612,7 @@ _ecore_timer_delay(Ecore_Timer *obj, else { timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer)); + eo_data_unref(obj, timer); _ecore_timer_set(obj, timer->at + add, timer->in, timer->func, timer->data); } } @@ -619,12 +620,13 @@ _ecore_timer_delay(Ecore_Timer *obj, void * _ecore_timer_del(Ecore_Timer *obj) { - Ecore_Timer_Private_Data *timer = eo_data_get(obj, MY_CLASS); + Ecore_Timer_Private_Data *timer = eo_data_scope_get(obj, MY_CLASS); if (timer->frozen && !timer->references) { void *data = timer->data; + eo_data_unref(obj, timer); suspended = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer)); if (timer->delete_me) @@ -668,6 +670,7 @@ _ecore_timer_shutdown(void) { timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timers)); + eo_data_unref(timer->obj, timer); eo_parent_set(timer->obj, NULL); if (eo_destructed_is(timer->obj)) eo_manual_free(timer->obj); @@ -679,6 +682,7 @@ _ecore_timer_shutdown(void) { suspended = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(suspended)); + eo_data_unref(timer->obj, timer); eo_parent_set(timer->obj, NULL); if (eo_destructed_is(timer->obj)) eo_manual_free(timer->obj); @@ -710,6 +714,7 @@ _ecore_timer_cleanup(void) } timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer)); + eo_data_unref(timer->obj, timer); eo_parent_set(timer->obj, NULL); if (eo_destructed_is(timer->obj)) eo_manual_free(timer->obj); @@ -734,6 +739,7 @@ _ecore_timer_cleanup(void) } suspended = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer)); + eo_data_unref(timer->obj, timer); eo_parent_set(timer->obj, NULL); if (eo_destructed_is(timer->obj)) eo_manual_free(timer->obj); @@ -794,7 +800,7 @@ static inline Ecore_Timer * _ecore_timer_after_get(Ecore_Timer *obj) { Ecore_Timer *ret = NULL; - Ecore_Timer_Private_Data *base = eo_data_get(obj, MY_CLASS); + Ecore_Timer_Private_Data *base = eo_data_scope_get(obj, MY_CLASS); Ecore_Timer_Private_Data *timer = (Ecore_Timer_Private_Data *)EINA_INLIST_GET(base)->next; Ecore_Timer_Private_Data *valid_timer = NULL; @@ -826,7 +832,7 @@ _ecore_timer_next_get(void) second_obj = _ecore_timer_after_get(first_obj); if (second_obj) first_obj = second_obj; - first = eo_data_get(first_obj, MY_CLASS); + first = eo_data_scope_get(first_obj, MY_CLASS); now = ecore_loop_time_get(); in = first->at - now; @@ -838,10 +844,11 @@ static inline void _ecore_timer_reschedule(Ecore_Timer *obj, double when) { - Ecore_Timer_Private_Data *timer = eo_data_get(obj, MY_CLASS); + Ecore_Timer_Private_Data *timer = eo_data_scope_get(obj, MY_CLASS); if ((timer->delete_me) || (timer->frozen)) return; timers = (Ecore_Timer_Private_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer)); + eo_data_unref(obj, timer); /* if the timer would have gone off more than 15 seconds ago, * assume that the system hung and set the timer to go off @@ -932,7 +939,7 @@ _ecore_timer_set(Ecore_Timer *obj, { Ecore_Timer_Private_Data *t2; - Ecore_Timer_Private_Data *timer = eo_data_get(obj, MY_CLASS); + Ecore_Timer_Private_Data *timer = eo_data_ref(obj, MY_CLASS); timers_added = 1; timer->at = at; diff --git a/src/lib/ecore_audio/ecore_audio_obj_in.c b/src/lib/ecore_audio/ecore_audio_obj_in.c index b85837bf51..116fc50f9e 100644 --- a/src/lib/ecore_audio/ecore_audio_obj_in.c +++ b/src/lib/ecore_audio/ecore_audio_obj_in.c @@ -143,7 +143,7 @@ static void _read(Eo *eo_obj, void *_pd, va_list *list) { const Ecore_Audio_Input *obj = _pd; ssize_t len_read = 0; - const Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + const Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); void *buf = va_arg(*list, void *); size_t len = va_arg(*list, size_t); @@ -173,7 +173,7 @@ static void _read(Eo *eo_obj, void *_pd, va_list *list) static void _read_internal(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) { ssize_t len_read = 0; - const Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + const Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); void *buf = va_arg(*list, void *); size_t len = va_arg(*list, size_t); @@ -209,7 +209,7 @@ static void _free_vio(Ecore_Audio_Object *ea_obj) static void _vio_set(Eo *eo_obj, void *_pd, va_list *list) { Ecore_Audio_Input *obj = _pd; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); Ecore_Audio_Vio *vio = va_arg(*list, Ecore_Audio_Vio *); void *data = va_arg(*list, Ecore_Audio_Vio *); diff --git a/src/lib/ecore_audio/ecore_audio_obj_in_sndfile.c b/src/lib/ecore_audio/ecore_audio_obj_in_sndfile.c index 33aff76398..ae921eaabf 100644 --- a/src/lib/ecore_audio/ecore_audio_obj_in_sndfile.c +++ b/src/lib/ecore_audio/ecore_audio_obj_in_sndfile.c @@ -63,8 +63,8 @@ static void _source_set(Eo *eo_obj, void *_pd, va_list *list) { Ecore_Audio_Sndfile *obj = _pd; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); - Ecore_Audio_Input *in_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_IN_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Input *in_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_IN_CLASS); const char *source = va_arg(*list, const char *); Eina_Bool *ret = va_arg(*list, Eina_Bool *); @@ -111,7 +111,7 @@ static void _source_set(Eo *eo_obj, void *_pd, va_list *list) static void _source_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) { - Ecore_Audio_Object *obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); const char **ret = va_arg(*list, const char **); @@ -122,7 +122,7 @@ static void _source_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) static void _format_set(Eo *eo_obj, void *_pd, va_list *list) { Ecore_Audio_Sndfile *obj = _pd; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); Ecore_Audio_Format format= va_arg(*list, Ecore_Audio_Format); Eina_Bool *ret = va_arg(*list, Eina_Bool *); @@ -158,7 +158,7 @@ static void _format_set(Eo *eo_obj, void *_pd, va_list *list) static void _format_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) { - Ecore_Audio_Object *obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); Ecore_Audio_Format *ret = va_arg(*list, Ecore_Audio_Format *); @@ -178,8 +178,8 @@ static void _free_vio(Ecore_Audio_Object *ea_obj) static void _vio_set(Eo *eo_obj, void *_pd, va_list *list) { Ecore_Audio_Sndfile *obj = _pd; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); - Ecore_Audio_Input *in_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_IN_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Input *in_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_IN_CLASS); Ecore_Audio_Vio *vio = va_arg(*list, Ecore_Audio_Vio *); void *data = va_arg(*list, Ecore_Audio_Vio *); diff --git a/src/lib/ecore_audio/ecore_audio_obj_in_tone.c b/src/lib/ecore_audio/ecore_audio_obj_in_tone.c index f641b8a780..ed93f376bd 100644 --- a/src/lib/ecore_audio/ecore_audio_obj_in_tone.c +++ b/src/lib/ecore_audio/ecore_audio_obj_in_tone.c @@ -31,7 +31,7 @@ static void _read(Eo *eo_obj, void *_pd, va_list *list) { int i, remain; Ecore_Audio_Tone *obj = _pd; - Ecore_Audio_Input *in_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_IN_CLASS); + Ecore_Audio_Input *in_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_IN_CLASS); void *data = va_arg(*list, void *); @@ -58,7 +58,7 @@ static void _seek(Eo *eo_obj, void *_pd, va_list *list) { int tmp; Ecore_Audio_Tone *obj = _pd; - Ecore_Audio_Input *in_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_IN_CLASS); + Ecore_Audio_Input *in_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_IN_CLASS); double offs = va_arg(*list, double); int mode = va_arg(*list, int); @@ -93,7 +93,7 @@ err: static void _length_set(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) { - Ecore_Audio_Input *in_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_IN_CLASS); + Ecore_Audio_Input *in_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_IN_CLASS); double length= va_arg(*list, double); @@ -137,7 +137,7 @@ static void _data_get(Eo *eo_obj, void *_pd, va_list *list) static void _constructor(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) { Ecore_Audio_Tone *obj = _pd; - Ecore_Audio_Input *in_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_IN_CLASS); + Ecore_Audio_Input *in_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_IN_CLASS); eo_do_super(eo_obj, MY_CLASS, eo_constructor()); diff --git a/src/lib/ecore_audio/ecore_audio_obj_out.c b/src/lib/ecore_audio/ecore_audio_obj_out.c index 4707c4e551..e3822efca3 100644 --- a/src/lib/ecore_audio/ecore_audio_obj_out.c +++ b/src/lib/ecore_audio/ecore_audio_obj_out.c @@ -24,8 +24,8 @@ static Eina_Bool _write_cb(void *data) Eo *eo_obj = data; Eo *in; - Ecore_Audio_Output *out_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); ssize_t written, bread; float buf[1024]; @@ -56,12 +56,12 @@ static void _input_attach(Eo *eo_obj, void *_pd, va_list *list) Ecore_Audio_Output *obj = _pd; Ecore_Audio_Input *in; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); Eo *input = va_arg(*list, Eo *); Eina_Bool *ret = va_arg(*list, Eina_Bool *); - in = eo_data_get(input, ECORE_AUDIO_OBJ_IN_CLASS); + in = eo_data_scope_get(input, ECORE_AUDIO_OBJ_IN_CLASS); if (ret) *ret = EINA_FALSE; @@ -93,7 +93,7 @@ static void _input_detach(Eo *eo_obj, void *_pd, va_list *list) Eo *input = va_arg(*list, Eo *); Eina_Bool *ret = va_arg(*list, Eina_Bool *); - in = eo_data_get(input, ECORE_AUDIO_OBJ_IN_CLASS); + in = eo_data_scope_get(input, ECORE_AUDIO_OBJ_IN_CLASS); if (ret) *ret = EINA_FALSE; @@ -134,7 +134,7 @@ static void _free_vio(Ecore_Audio_Object *ea_obj) static void _vio_set(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) { - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); Ecore_Audio_Vio *vio = va_arg(*list, Ecore_Audio_Vio *); void *data = va_arg(*list, Ecore_Audio_Vio *); diff --git a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c index eebb9cb1d4..5c413050b7 100644 --- a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c +++ b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c @@ -53,7 +53,7 @@ static void _volume_set(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) Eina_List *input; uint32_t idx; pa_cvolume pa_volume; - Ecore_Audio_Output *out_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); + Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); double volume = va_arg(*list, double); @@ -114,7 +114,7 @@ static Eina_Bool _input_attach_internal(Eo *eo_obj, Eo *in) double speed; pa_stream *stream; Eina_Bool ret; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); eo_do_super(eo_obj, MY_CLASS, ecore_audio_obj_out_input_attach(in, &ret)); if (!ret) @@ -230,7 +230,7 @@ static void _constructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_U { int argc; char **argv; - Ecore_Audio_Output *out_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); + Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); eo_do_super(eo_obj, MY_CLASS, eo_constructor()); diff --git a/src/lib/ecore_audio/ecore_audio_obj_out_sndfile.c b/src/lib/ecore_audio/ecore_audio_obj_out_sndfile.c index 2545164c20..6d2d95c974 100644 --- a/src/lib/ecore_audio/ecore_audio_obj_out_sndfile.c +++ b/src/lib/ecore_audio/ecore_audio_obj_out_sndfile.c @@ -35,9 +35,9 @@ static Eina_Bool _write_cb(void *data) Eo *eo_obj = data; Eo *in; - Ecore_Audio_Sndfile *obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS); - Ecore_Audio_Output *out_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Sndfile *obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS); + Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); ssize_t written, bread; float buf[1024]; @@ -64,8 +64,8 @@ static Eina_Bool _write_cb(void *data) static void _input_attach(Eo *eo_obj, void *_pd, va_list *list) { Ecore_Audio_Sndfile *obj = _pd; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); - Ecore_Audio_Output *out_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); Eina_Bool ret2; Eo *in = va_arg(*list, Eo *); @@ -105,7 +105,7 @@ static void _source_set(Eo *eo_obj, void *_pd, va_list *list) { Ecore_Audio_Sndfile *obj = _pd; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); const char *source = va_arg(*list, const char *); Eina_Bool *ret = va_arg(*list, Eina_Bool *); @@ -132,7 +132,7 @@ static void _source_set(Eo *eo_obj, void *_pd, va_list *list) static void _source_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) { - Ecore_Audio_Object *obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); const char **ret = va_arg(*list, const char **); @@ -143,7 +143,7 @@ static void _source_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) static void _format_set(Eo *eo_obj, void *_pd, va_list *list) { Ecore_Audio_Sndfile *obj = _pd; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); Ecore_Audio_Format format= va_arg(*list, Ecore_Audio_Format); Eina_Bool *ret = va_arg(*list, Eina_Bool *); @@ -180,7 +180,7 @@ static void _format_set(Eo *eo_obj, void *_pd, va_list *list) static void _format_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) { - Ecore_Audio_Object *obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); Ecore_Audio_Format *ret = va_arg(*list, Ecore_Audio_Format *); @@ -190,7 +190,7 @@ static void _format_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) static void _constructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) { - Ecore_Audio_Output *out_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); + Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); eo_do_super(eo_obj, MY_CLASS, eo_constructor()); @@ -203,7 +203,7 @@ static void _constructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_U static void _destructor(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) { Ecore_Audio_Sndfile *obj = _pd; - Ecore_Audio_Output *out_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); + Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_OUT_CLASS); if (obj->handle) sf_close(obj->handle); diff --git a/src/lib/ecore_audio/ecore_audio_sndfile_vio.c b/src/lib/ecore_audio/ecore_audio_sndfile_vio.c index 06268069aa..7fc595677c 100644 --- a/src/lib/ecore_audio/ecore_audio_sndfile_vio.c +++ b/src/lib/ecore_audio/ecore_audio_sndfile_vio.c @@ -16,7 +16,7 @@ static sf_count_t _wrap_get_filelen(void *data) { Eo *eo_obj = data; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); if (!ea_obj->vio->vio) goto error; @@ -31,7 +31,7 @@ error: static sf_count_t _wrap_seek(sf_count_t offset, int whence, void *data) { Eo *eo_obj = data; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); if (!ea_obj->vio->vio) goto error; @@ -46,7 +46,7 @@ error: static sf_count_t _wrap_read(void *buffer, sf_count_t count, void *data) { Eo *eo_obj = data; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); if (!ea_obj->vio->vio) goto error; @@ -61,7 +61,7 @@ error: static sf_count_t _wrap_write(const void *buffer, sf_count_t count, void *data) { Eo *eo_obj = data; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); if (!ea_obj->vio->vio) goto error; @@ -76,7 +76,7 @@ error: static sf_count_t _wrap_tell(void *data) { Eo *eo_obj = data; - Ecore_Audio_Object *ea_obj = eo_data_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); + Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OBJ_CLASS); if (!ea_obj->vio->vio) goto error; diff --git a/src/lib/edje/edje_box_layout.c b/src/lib/edje/edje_box_layout.c index 5cf7d0a9e0..b006e3a5b8 100644 --- a/src/lib/edje/edje_box_layout.c +++ b/src/lib/edje/edje_box_layout.c @@ -171,7 +171,7 @@ _edje_box_recalc_apply(Edje *ed EINA_UNUSED, Edje_Real_Part *ep, Edje_Calc_Param ep->typedata.container->anim->end.align.x = param2_desc->box.align.x; ep->typedata.container->anim->end.align.y = param2_desc->box.align.y; - priv = eo_data_get(ep->object, EVAS_OBJ_BOX_CLASS); + priv = eo_data_scope_get(ep->object, EVAS_OBJ_BOX_CLASS); if (priv == NULL) return; diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index 7985da94ac..95842958f3 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -33,7 +33,7 @@ EAPI Eina_Error EDJE_EDIT_ERROR_GROUP_DOES_NOT_EXIST = 0; Edje_Edit *eed; \ if (!eo_isa(obj, MY_CLASS)) \ return RET; \ - eed = eo_data_get(obj, MY_CLASS); \ + eed = eo_data_scope_get(obj, MY_CLASS); \ if (!eed) return RET; /* Get ed(Edje*) from obj(Evas_Object*) */ @@ -41,7 +41,7 @@ EAPI Eina_Error EDJE_EDIT_ERROR_GROUP_DOES_NOT_EXIST = 0; Edje *ed; \ if (!eo_isa(obj, EDJE_OBJ_CLASS)) \ return RET; \ - ed = eo_data_get(obj, EDJE_OBJ_CLASS); \ + ed = eo_data_scope_get(obj, EDJE_OBJ_CLASS); \ /* Get rp(Edje_Real_Part*) from obj(Evas_Object*) and part(char*) */ #define GET_RP_OR_RETURN(RET) \ @@ -254,7 +254,7 @@ static void _edje_edit_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED) { Edje_Edit *eed = class_data; - eed->base = eo_data_get(obj, EDJE_OBJ_CLASS); + eed->base = eo_data_ref(obj, EDJE_OBJ_CLASS); eo_do_super(obj, MY_CLASS, eo_constructor()); eina_error_set(0); @@ -262,6 +262,13 @@ _edje_edit_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED) if (!EDJE_EDIT_ERROR_GROUP_DOES_NOT_EXIST) _edje_edit_error_register(); } + +static void +_edje_edit_destructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED) +{ + eo_do_super(obj, MY_CLASS, eo_destructor()); + eo_data_unref(obj, class_data); +} /* End of Edje_Edit smart stuff */ static Edje_Part_Description_Common * @@ -7191,7 +7198,7 @@ _edje_generate_source_of_group(Edje *ed, Edje_Part_Collection_Directory_Entry *p return EINA_FALSE; } - eed = eo_data_get(obj, MY_CLASS); + eed = eo_data_scope_get(obj, MY_CLASS); pc = eed->base->collection; BUF_APPENDF(I1"group { name: \"%s\";\n", group); @@ -7826,6 +7833,7 @@ _edje_edit_class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _edje_edit_constructor), + EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _edje_edit_destructor), EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _edje_edit_smart_del), EO_OP_FUNC(EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_FILE_SET), _edje_edit_smart_file_set), EO_OP_FUNC_SENTINEL diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c index 61ff75a85e..14f1493c14 100644 --- a/src/lib/edje/edje_smart.c +++ b/src/lib/edje/edje_smart.c @@ -29,7 +29,7 @@ static void _edje_smart_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED) { Edje *ed = class_data; - ed->base = eo_data_get(obj, EVAS_OBJ_SMART_CLIPPED_CLASS); + ed->base = eo_data_ref(obj, EVAS_OBJ_SMART_CLIPPED_CLASS); eo_do_super(obj, MY_CLASS, eo_constructor()); eo_do(obj, evas_obj_type_set(MY_CLASS_NAME)); @@ -37,6 +37,13 @@ _edje_smart_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED) } static void +_edje_smart_destructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED) +{ + eo_do_super(obj, MY_CLASS, eo_destructor()); + eo_data_unref(obj, class_data); +} + +static void _dbg_info_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) { Eo_Dbg_Info *root = (Eo_Dbg_Info *) va_arg(*list, Eo_Dbg_Info *); @@ -341,6 +348,7 @@ _edje_smart_class_constructor(Eo_Class *klass) { const Eo_Op_Func_Description func_desc[] = { EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _edje_smart_constructor), + EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _edje_smart_destructor), EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DBG_INFO_GET), _dbg_info_get), EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ADD), _edje_smart_add), EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _edje_smart_del), diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index 27539da3d0..5cbde36a09 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -5262,7 +5262,7 @@ _edje_real_part_box_remove_at(Edje *ed, Edje_Real_Part *rp, unsigned int pos) Evas_Object_Box_Data *priv; Evas_Object *child_obj; - priv = eo_data_get(rp->object, EVAS_OBJ_BOX_CLASS); + priv = eo_data_scope_get(rp->object, EVAS_OBJ_BOX_CLASS); opt = eina_list_nth(priv->children, pos); if (!opt) return NULL; child_obj = opt->obj; @@ -5485,7 +5485,7 @@ _edje_perspective_obj_del(void *data, EINA_UNUSED Evas *e, EINA_UNUSED Evas_Obje { Edje *ed; - ed = eo_data_get(o, EDJE_OBJ_CLASS); + ed = eo_data_scope_get(o, EDJE_OBJ_CLASS); if (!ed) continue; ed->persp = NULL; ed->dirty = EINA_TRUE; @@ -5538,7 +5538,7 @@ edje_perspective_set(Edje_Perspective *ps, Evas_Coord px, Evas_Coord py, Evas_Co { Edje *ed; - ed = eo_data_get(o, EDJE_OBJ_CLASS); + ed = eo_data_scope_get(o, EDJE_OBJ_CLASS); if (!ed) continue; if (!ed->persp) { @@ -5553,7 +5553,7 @@ edje_perspective_set(Edje_Perspective *ps, Evas_Coord px, Evas_Coord py, Evas_Co { Edje *ed; - ed = eo_data_get(o, EDJE_OBJ_CLASS); + ed = eo_data_scope_get(o, EDJE_OBJ_CLASS); if (!ed) continue; if (!ed->persp) { @@ -5587,7 +5587,7 @@ edje_perspective_global_set(Edje_Perspective *ps, Eina_Bool global) { Edje *ed; - ed = eo_data_get(o, EDJE_OBJ_CLASS); + ed = eo_data_scope_get(o, EDJE_OBJ_CLASS); if (!ed) continue; if (!ed->persp) { @@ -6185,7 +6185,7 @@ _edje_fetch(const Evas_Object *obj) if (!obj || !eo_isa(obj, EDJE_OBJ_CLASS)) return NULL; - ed = eo_data_get(obj, EDJE_OBJ_CLASS); + ed = eo_data_scope_get(obj, EDJE_OBJ_CLASS); if ((ed) && (ed->delete_me)) return NULL; return ed; } diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c index 4bda3357bf..34bceae0fd 100644 --- a/src/lib/evas/canvas/evas_callbacks.c +++ b/src/lib/evas/canvas/evas_callbacks.c @@ -140,7 +140,7 @@ _evas_post_event_callback_call(Evas *eo_e, Evas_Public_Data *e) void _evas_post_event_callback_free(Evas *eo_e) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Post_Callback *pc; EINA_LIST_FREE(e->post_events, pc) @@ -203,7 +203,7 @@ void evas_object_event_callback_all_del(Evas_Object *eo_obj) { Evas_Func_Node *fn; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj) return; if (!obj->callbacks) return; @@ -215,7 +215,7 @@ void evas_object_event_callback_cleanup(Evas_Object *eo_obj) { /* MEM OK */ - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj) return; if (!obj->callbacks) return; evas_event_callback_list_post_free(&obj->callbacks->callbacks); @@ -226,7 +226,7 @@ evas_object_event_callback_cleanup(Evas_Object *eo_obj) void evas_event_callback_all_del(Evas *eo_e) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Func_Node *fn; if (!e) return; @@ -238,7 +238,7 @@ evas_event_callback_all_del(Evas *eo_e) void evas_event_callback_cleanup(Evas *eo_e) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); /* MEM OK */ if (!e) return; if (!e->callbacks) return; @@ -250,7 +250,7 @@ evas_event_callback_cleanup(Evas *eo_e) void evas_event_callback_call(Evas *eo_e, Evas_Callback_Type type, void *event_info) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Eina_Inlist **l_mod = NULL, *l; if (!e) return; @@ -386,7 +386,7 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) && (type <= EVAS_CALLBACK_KEY_UP)) { - Evas_Object_Protected_Data *smart_parent = eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *smart_parent = eo_data_scope_get(obj->smart.parent, EVAS_OBJ_CLASS); evas_object_event_callback_call(obj->smart.parent, smart_parent, type, event_info, event_id); } } @@ -416,7 +416,7 @@ evas_object_event_callback_add(Evas_Object *eo_obj, Evas_Callback_Type type, Eva EAPI void evas_object_event_callback_priority_add(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); /* MEM OK */ Evas_Func_Node *fn; @@ -458,7 +458,7 @@ evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Eva MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj) return NULL; if (!func) return NULL; @@ -491,7 +491,7 @@ evas_object_event_callback_del_full(Evas_Object *eo_obj, Evas_Callback_Type type MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj) return NULL; if (!func) return NULL; @@ -525,7 +525,7 @@ evas_event_callback_add(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func, EAPI void evas_event_callback_priority_add(Evas *eo_e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); /* MEM OK */ Evas_Func_Node *fn; @@ -560,7 +560,7 @@ evas_event_callback_priority_add(Evas *eo_e, Evas_Callback_Type type, Evas_Callb EAPI void * evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); /* MEM OK */ Evas_Func_Node *fn; @@ -599,7 +599,7 @@ evas_event_callback_del_full(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); if (!e) return NULL; if (!func) return NULL; @@ -632,7 +632,7 @@ evas_post_event_callback_push(Evas *eo_e, Evas_Object_Event_Post_Cb func, const return; MAGIC_CHECK_END(); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); if (!e) return; EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, ); pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback); @@ -655,7 +655,7 @@ evas_post_event_callback_remove(Evas *eo_e, Evas_Object_Event_Post_Cb func) return; MAGIC_CHECK_END(); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); if (!e) return; EINA_LIST_FOREACH(e->post_events, l, pc) { @@ -677,7 +677,7 @@ evas_post_event_callback_remove_full(Evas *eo_e, Evas_Object_Event_Post_Cb func, return; MAGIC_CHECK_END(); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); if (!e) return; EINA_LIST_FOREACH(e->post_events, l, pc) { diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c index 2256e360b3..1d98dc9bfd 100644 --- a/src/lib/evas/canvas/evas_clip.c +++ b/src/lib/evas/canvas/evas_clip.c @@ -162,7 +162,7 @@ evas_object_mapped_clip_across_mark(Evas_Object *eo_obj, Evas_Object_Protected_D if (obj->smart.parent) { Evas_Object_Protected_Data *smart_parent_obj = - eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS); + eo_data_scope_get(obj->smart.parent, EVAS_OBJ_CLASS); evas_object_child_map_across_mark (eo_obj, obj, smart_parent_obj->map->cur.map_parent, 0); } @@ -204,7 +204,7 @@ _clip_set(Eo *eo_obj, void *_pd, va_list *list) return; MAGIC_CHECK_END(); - clip = eo_data_get(eo_clip, EVAS_OBJ_CLASS); + clip = eo_data_scope_get(eo_clip, EVAS_OBJ_CLASS); if (obj->cur->clipper && obj->cur->clipper->object == eo_clip) return; if (eo_obj == eo_clip) { diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c index 8ad46424b9..091c23a869 100644 --- a/src/lib/evas/canvas/evas_device.c +++ b/src/lib/evas/canvas/evas_device.c @@ -14,7 +14,7 @@ evas_device_add(Evas *eo_e) dev->magic = MAGIC_DEV; dev->evas = eo_e; dev->ref = 1; - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); e->devices = eina_list_append(e->devices, dev); evas_event_callback_call(eo_e, EVAS_CALLBACK_DEVICE_CHANGED, dev); return dev; @@ -54,7 +54,7 @@ evas_device_push(Evas *eo_e, Evas_Device *dev) MAGIC_CHECK(dev, Evas_Device, MAGIC_DEV); return; MAGIC_CHECK_END(); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); if (!e->cur_device) { e->cur_device = eina_array_new(4); @@ -72,7 +72,7 @@ evas_device_pop(Evas *eo_e) MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); dev = eina_array_pop(e->cur_device); if (dev) _evas_device_unref(dev); } @@ -90,7 +90,7 @@ evas_device_list(Evas *eo_e, const Evas_Device *dev) MAGIC_CHECK_END(); } if (dev) return dev->children; - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); return e->devices; } @@ -138,7 +138,7 @@ evas_device_parent_set(Evas_Device *dev, Evas_Device *parent) MAGIC_CHECK(dev, Evas_Device, MAGIC_DEV); return; MAGIC_CHECK_END(); - Evas_Public_Data *e = eo_data_get(dev->evas, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(dev->evas, EVAS_CLASS); if (parent) { MAGIC_CHECK(parent, Evas_Device, MAGIC_DEV); @@ -239,7 +239,7 @@ _evas_device_cleanup(Evas *eo_e) { Evas_Device *dev; - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); if (e->cur_device) { while ((dev = eina_array_pop(e->cur_device))) @@ -258,7 +258,7 @@ _evas_device_top_get(const Evas *eo_e) { int num; - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); if (!e->cur_device) return NULL; num = eina_array_count(e->cur_device); if (num < 1) return NULL; diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c index a1cc7aebef..7f71ddaf70 100644 --- a/src/lib/evas/canvas/evas_events.c +++ b/src/lib/evas/canvas/evas_events.c @@ -15,7 +15,7 @@ _evas_event_havemap_adjust(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protecte { if (obj->smart.parent) { - Evas_Object_Protected_Data *smart_parent_obj = eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *smart_parent_obj = eo_data_scope_get(obj->smart.parent, EVAS_OBJ_CLASS); _evas_event_havemap_adjust(obj->smart.parent, smart_parent_obj, x, y, mouse_grabbed); } @@ -34,7 +34,7 @@ _evas_event_havemap_adjust(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protecte static void _evas_event_framespace_adjust(Evas_Object *eo_obj, Evas_Coord *x, Evas_Coord *y) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Public_Data *evas; evas = obj->layer->evas; @@ -190,10 +190,10 @@ _transform_to_src_space(Evas_Object_Protected_Data *obj, Evas_Object_Protected_D static void _evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_Mouse_Down *ev, int event_id) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object *eo_src = _evas_object_image_source_get(eo_obj); - Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, EVAS_OBJ_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Coord_Point canvas = ev->canvas; Evas_Object_Protected_Data *child; Evas_Object *eo_child; @@ -230,7 +230,7 @@ _evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event EINA_LIST_FOREACH(src->proxy->src_event_in, l, eo_child) { - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); if ((child->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) || (child->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)) { @@ -249,7 +249,7 @@ _evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event copy = evas_event_list_copy(src->proxy->src_event_in); EINA_LIST_FOREACH(copy, l, eo_child) { - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); ev->canvas = point; _evas_event_framespace_adjust(eo_child, &ev->canvas.x, &ev->canvas.y); @@ -270,10 +270,10 @@ _evas_event_source_mouse_down_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event static void _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_Mouse_Move *ev, int event_id) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object *eo_src = _evas_object_image_source_get(eo_obj); - Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, EVAS_OBJ_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Coord_Point canvas = ev->cur.canvas; if (obj->delete_me || src->delete_me || e->is_frozen) return; @@ -294,7 +294,7 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event Eina_List *copy = evas_event_list_copy(src->proxy->src_event_in); EINA_LIST_FOREACH(copy, l, eo_child) { - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); if ((evas_object_clippers_is_visible(eo_child, child) || child->mouse_grabbed) && @@ -323,7 +323,7 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event { eo_child = outs->data; outs = eina_list_remove(outs, eo_child); - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); if ((child->mouse_grabbed == 0) && (!e->delete_me)) { if (child->mouse_in) continue; @@ -358,7 +358,7 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event EINA_LIST_FOREACH(copy, l, eo_child) { - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); ev->cur.canvas = point; @@ -406,7 +406,7 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event int event_id2 = _evas_event_counter; EINA_LIST_FOREACH(ins, l, eo_child) { - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); if (!eina_list_data_find(src->proxy->src_event_in, eo_child)) { if (!child->mouse_in) @@ -445,10 +445,10 @@ _evas_event_source_mouse_move_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event static void _evas_event_source_mouse_up_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_Mouse_Up *ev, int event_id) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object *eo_src = _evas_object_image_source_get(eo_obj); - Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, EVAS_OBJ_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Coord_Point canvas = ev->canvas; if (obj->delete_me || src->delete_me || e->is_frozen) return; @@ -466,7 +466,7 @@ _evas_event_source_mouse_up_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_M EINA_LIST_FOREACH(copy, l, eo_child) { if (src->delete_me) return; - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); if ((child->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) && (child->mouse_grabbed > 0)) { @@ -497,9 +497,9 @@ _evas_event_source_mouse_up_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_M static void _evas_event_source_hold_events(Evas_Object *eo_obj, Evas *eo_e EINA_UNUSED, void *ev, int event_id) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object *eo_src = _evas_object_image_source_get(eo_obj); - Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, EVAS_OBJ_CLASS); if (obj->layer->evas->is_frozen) return; @@ -509,7 +509,7 @@ _evas_event_source_hold_events(Evas_Object *eo_obj, Evas *eo_e EINA_UNUSED, void EINA_LIST_FOREACH(src->proxy->src_event_in, l, child_eo) { if (src->delete_me) return; - child = eo_data_get(child_eo, EVAS_OBJ_CLASS); + child = eo_data_scope_get(child_eo, EVAS_OBJ_CLASS); evas_object_event_callback_call(child_eo, child, EVAS_CALLBACK_HOLD, ev, event_id); if (src->layer->evas->delete_me) break; @@ -519,10 +519,10 @@ _evas_event_source_hold_events(Evas_Object *eo_obj, Evas *eo_e EINA_UNUSED, void static void _evas_event_source_wheel_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_Mouse_Wheel *ev, int event_id) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object *eo_src = _evas_object_image_source_get(eo_obj); - Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, EVAS_OBJ_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Coord_Point canvas = ev->canvas; if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return; @@ -538,7 +538,7 @@ _evas_event_source_wheel_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_Mous EINA_LIST_FOREACH(copy, l, eo_child) { if (src->delete_me) return; - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); ev->canvas = point; _evas_event_havemap_adjust(eo_child, child, &ev->canvas.x, @@ -555,10 +555,10 @@ _evas_event_source_wheel_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_Mous static void _evas_event_source_multi_down_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_Multi_Down *ev, int event_id) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object *eo_src = _evas_object_image_source_get(eo_obj); - Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, EVAS_OBJ_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Coord_Precision_Point canvas = ev->canvas; if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return; @@ -575,7 +575,7 @@ _evas_event_source_multi_down_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event EINA_LIST_FOREACH(src->proxy->src_event_in, l, eo_child) { - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); if (child->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) { child->mouse_grabbed += (addgrab + 1); @@ -593,7 +593,7 @@ _evas_event_source_multi_down_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event &ev->canvas.x, &ev->canvas.y, child->mouse_grabbed); - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MULTI_DOWN, ev, event_id); if (e->delete_me) break; @@ -606,10 +606,10 @@ _evas_event_source_multi_down_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event static void _evas_event_source_multi_up_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_Multi_Up *ev, int event_id) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object *eo_src = _evas_object_image_source_get(eo_obj); - Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, EVAS_OBJ_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Coord_Precision_Point canvas = ev->canvas; if (obj->delete_me || src->delete_me || obj->layer->evas->is_frozen) return; @@ -627,7 +627,7 @@ _evas_event_source_multi_up_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_M EINA_LIST_FOREACH(copy, l, eo_child) { ev->canvas = point; - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); if ((child->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) && (child->mouse_grabbed > 0)) { @@ -650,10 +650,10 @@ _evas_event_source_multi_up_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_M static void _evas_event_source_multi_move_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_Multi_Move *ev, int event_id) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object *eo_src = _evas_object_image_source_get(eo_obj); - Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, EVAS_OBJ_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Coord_Precision_Point canvas = ev->cur.canvas; if (obj->delete_me || src->delete_me || e->is_frozen) return; @@ -675,7 +675,7 @@ _evas_event_source_multi_move_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event Eina_List *copy = evas_event_list_copy(src->proxy->src_event_in); EINA_LIST_FOREACH(copy, l, eo_child) { - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); if (((evas_object_clippers_is_visible(eo_child, child)) || ((child->mouse_grabbed) && (!evas_event_passes_through(eo_child, child)) && @@ -687,7 +687,7 @@ _evas_event_source_multi_move_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event &ev->cur.canvas.x, &ev->cur.canvas.y, child->mouse_grabbed); - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MULTI_MOVE, ev, event_id); @@ -710,7 +710,7 @@ _evas_event_source_multi_move_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event Eina_List *copy = evas_event_list_copy(src->proxy->src_event_in); EINA_LIST_FOREACH(copy, l, eo_child) { - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); ev->cur.canvas = point; if (evas_object_is_in_output_rect(eo_child, child, @@ -730,7 +730,7 @@ _evas_event_source_multi_move_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event &ev->cur.canvas.x, &ev->cur.canvas.y, child->mouse_grabbed); - child = eo_data_get(eo_child, EVAS_OBJ_CLASS); + child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); evas_object_event_callback_call(eo_child, child, EVAS_CALLBACK_MULTI_MOVE, ev, event_id); @@ -757,10 +757,10 @@ _evas_event_source_multi_move_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event static void _evas_event_source_mouse_in_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_Mouse_In *ev, int event_id) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object *eo_src = _evas_object_image_source_get(eo_obj); - Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, EVAS_OBJ_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Coord_Point canvas = ev->canvas; Evas_Object *eo_child; Eina_List *ins = NULL; @@ -785,7 +785,7 @@ _evas_event_source_mouse_in_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_ point = ev->canvas; EINA_LIST_FOREACH(ins, l, eo_child) { - Evas_Object_Protected_Data *child = eo_data_get(eo_child, + Evas_Object_Protected_Data *child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); if (!eina_list_data_find(src->proxy->src_event_in, eo_child)) { @@ -817,10 +817,10 @@ _evas_event_source_mouse_in_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_ static void _evas_event_source_mouse_out_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_Mouse_Out *ev, int event_id) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object *eo_src = _evas_object_image_source_get(eo_obj); - Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, EVAS_OBJ_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Coord_Point canvas = ev->canvas; Evas_Object *eo_child; Eina_List *l; @@ -838,7 +838,7 @@ _evas_event_source_mouse_out_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Event_ EINA_LIST_FOREACH(copy, l, eo_child) { - Evas_Object_Protected_Data *child = eo_data_get(eo_child, + Evas_Object_Protected_Data *child = eo_data_scope_get(eo_child, EVAS_OBJ_CLASS); if (!child->mouse_in) continue; child->mouse_in = 0; @@ -876,7 +876,7 @@ _evas_event_object_list_in_get(Evas *eo_e, Eina_List *in, Eina_List * evas_event_objects_event_list(Evas *eo_e, Evas_Object *stop, int x, int y) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Layer *lay; Eina_List *in = NULL; @@ -1021,7 +1021,7 @@ evas_event_thaw_eval(Evas *eo_e) MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); if (0 == evas_event_freeze_get(eo_e)) { _canvas_event_thaw_eval_internal(eo_e, e); @@ -1100,7 +1100,7 @@ _canvas_event_feed_mouse_down(Eo *eo_e, void *_pd, va_list *list) copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) || (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)) { @@ -1115,7 +1115,7 @@ _canvas_event_feed_mouse_down(Eo *eo_e, void *_pd, va_list *list) } EINA_LIST_FOREACH(copy, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (obj->delete_me) continue; ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; @@ -1144,7 +1144,7 @@ _canvas_event_feed_mouse_down(Eo *eo_e, void *_pd, va_list *list) static int _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Eina_List *l, *copy, *ins, *ll; Evas_Event_Mouse_Out ev; Evas_Object *eo_obj; @@ -1173,7 +1173,7 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data) copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, ll, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if ((!eina_list_data_find(ins, eo_obj)) || (!e->pointer.inside)) { if (!obj->mouse_in) continue; @@ -1220,7 +1220,7 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data) EINA_LIST_FOREACH(ins, l, eo_obj_itr) { - Evas_Object_Protected_Data *obj_itr = eo_data_get(eo_obj_itr, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj_itr = eo_data_scope_get(eo_obj_itr, EVAS_OBJ_CLASS); if (!eina_list_data_find(e->pointer.object.in, eo_obj_itr)) { if (obj_itr->mouse_in) continue; @@ -1328,7 +1328,7 @@ _canvas_event_feed_mouse_up(Eo *eo_e, void *_pd, va_list *list) copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) && (obj->mouse_grabbed > 0)) { @@ -1464,7 +1464,7 @@ _canvas_event_feed_mouse_wheel(Eo *eo_e, void *_pd, va_list *list) EINA_LIST_FOREACH(copy, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!evas_event_freezes_through(eo_obj, obj)) { ev.canvas.x = e->pointer.x; @@ -1563,7 +1563,7 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list) copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if ((!e->is_frozen) && (evas_object_clippers_is_visible(eo_obj, obj) || obj->mouse_grabbed) && @@ -1632,7 +1632,7 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list) Evas_Object *eo_obj; eo_obj = outs->data; outs = eina_list_remove(outs, eo_obj); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if ((obj->mouse_grabbed == 0) && (!e->delete_me)) { if (!obj->mouse_in) continue; @@ -1719,7 +1719,7 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list) copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); /* if its under the pointer and its visible and its in the new */ /* in list */ // FIXME: i don't think we need this @@ -1783,7 +1783,7 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list) /* go thru our current list of ins */ EINA_LIST_FOREACH(ins, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); /* if its not in the old list of ins send an enter event */ if (!eina_list_data_find(e->pointer.object.in, eo_obj)) { @@ -1898,7 +1898,7 @@ nogrep: eo_below_obj = evas_object_below_get(nogrep_obj); if (eo_below_obj) { - Evas_Object_Protected_Data *below_obj = eo_data_get(eo_below_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *below_obj = eo_data_scope_get(eo_below_obj, EVAS_OBJ_CLASS); ins = _evas_event_object_list_raw_in_get(eo_e, NULL, EINA_INLIST_GET(below_obj), NULL, e->pointer.x, e->pointer.y, @@ -1916,7 +1916,7 @@ nogrep: EINA_LIST_FOREACH(lst, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); /* if its under the pointer and its visible and its in the new */ /* in list */ // FIXME: i don't think we need this @@ -1976,7 +1976,7 @@ nogrep: /* go thru our current list of ins */ EINA_LIST_FOREACH(newin, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); /* if its not in the old list of ins send an enter event */ if (!eina_list_data_find(e->pointer.object.in, eo_obj)) { @@ -2060,7 +2060,7 @@ _canvas_event_feed_mouse_in(Eo *eo_e, void *_pd, va_list *list) ins = evas_event_objects_event_list(eo_e, NULL, e->pointer.x, e->pointer.y); EINA_LIST_FOREACH(ins, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!eina_list_data_find(e->pointer.object.in, eo_obj)) { if (obj->mouse_in) continue; @@ -2138,7 +2138,7 @@ _canvas_event_feed_mouse_out(Eo *eo_e, void *_pd, va_list *list) copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj->mouse_in) continue; obj->mouse_in = 0; if (!obj->delete_me) @@ -2245,7 +2245,7 @@ _canvas_event_feed_multi_down(Eo *eo_e, void *_pd, va_list *list) copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) { obj->mouse_grabbed += addgrab + 1; @@ -2254,7 +2254,7 @@ _canvas_event_feed_multi_down(Eo *eo_e, void *_pd, va_list *list) } EINA_LIST_FOREACH(copy, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); ev.canvas.x = x; ev.canvas.y = y; ev.canvas.xsub = fx; @@ -2355,7 +2355,7 @@ _canvas_event_feed_multi_up(Eo *eo_e, void *_pd, va_list *list) copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); ev.canvas.x = x; ev.canvas.y = y; ev.canvas.xsub = fx; @@ -2463,7 +2463,7 @@ _canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list) copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if ((evas_object_clippers_is_visible(eo_obj, obj) || obj->mouse_grabbed) && (!evas_event_passes_through(eo_obj, obj)) && @@ -2531,7 +2531,7 @@ _canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list) copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); /* if its under the pointer and its visible and its in the new */ /* in list */ // FIXME: i don't think we need this @@ -2651,7 +2651,7 @@ _canvas_event_feed_key_down(Eo *eo_e, void *_pd, va_list *list) { if (!(e->modifiers.mask & g->not_modifiers)) { - Evas_Object_Protected_Data *object_obj = eo_data_get(g->object, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *object_obj = eo_data_scope_get(g->object, EVAS_OBJ_CLASS); if (!e->is_frozen && !evas_event_freezes_through(g->object, object_obj)) { @@ -2676,7 +2676,7 @@ _canvas_event_feed_key_down(Eo *eo_e, void *_pd, va_list *list) l = eina_list_next(l); if (g->delete_me) { - Evas_Object_Protected_Data *g_object_obj = eo_data_get(g->object, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *g_object_obj = eo_data_scope_get(g->object, EVAS_OBJ_CLASS); evas_key_grab_free(g->object, g_object_obj, g->keyname, g->modifiers, g->not_modifiers); } @@ -2686,7 +2686,7 @@ _canvas_event_feed_key_down(Eo *eo_e, void *_pd, va_list *list) } if ((e->focused) && (!exclusive)) { - Evas_Object_Protected_Data *focused_obj = eo_data_get(e->focused, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *focused_obj = eo_data_scope_get(e->focused, EVAS_OBJ_CLASS); if (!e->is_frozen && !evas_event_freezes_through(e->focused, focused_obj)) evas_object_event_callback_call(e->focused, focused_obj, EVAS_CALLBACK_KEY_DOWN, @@ -2763,7 +2763,7 @@ _canvas_event_feed_key_up(Eo *eo_e, void *_pd, va_list *list) (g->not_modifiers == ~e->modifiers.mask))) && (!strcmp(keyname, g->keyname))) { - Evas_Object_Protected_Data *object_obj = eo_data_get(g->object, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *object_obj = eo_data_scope_get(g->object, EVAS_OBJ_CLASS); if (!e->is_frozen && !evas_event_freezes_through(g->object, object_obj)) { @@ -2789,7 +2789,7 @@ _canvas_event_feed_key_up(Eo *eo_e, void *_pd, va_list *list) if (gr->delete_me) { Evas_Object_Protected_Data *gr_object_obj = - eo_data_get(gr->object, EVAS_OBJ_CLASS); + eo_data_scope_get(gr->object, EVAS_OBJ_CLASS); evas_key_grab_free(gr->object, gr_object_obj, gr->keyname, gr->modifiers, gr->not_modifiers); } @@ -2799,7 +2799,7 @@ _canvas_event_feed_key_up(Eo *eo_e, void *_pd, va_list *list) } if ((e->focused) && (!exclusive)) { - Evas_Object_Protected_Data *focused_obj = eo_data_get(e->focused, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *focused_obj = eo_data_scope_get(e->focused, EVAS_OBJ_CLASS); if (!e->is_frozen && !evas_event_freezes_through(e->focused, focused_obj)) evas_object_event_callback_call(e->focused, focused_obj, EVAS_CALLBACK_KEY_UP, @@ -2846,7 +2846,7 @@ _canvas_event_feed_hold(Eo *eo_e, void *_pd, va_list *list) copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if ( !evas_event_freezes_through(eo_obj, obj)) { evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HOLD, diff --git a/src/lib/evas/canvas/evas_font_dir.c b/src/lib/evas/canvas/evas_font_dir.c index bb6d36f1ed..cf68563d6d 100644 --- a/src/lib/evas/canvas/evas_font_dir.c +++ b/src/lib/evas/canvas/evas_font_dir.c @@ -115,7 +115,7 @@ void evas_fonts_zero_free(Evas *eo_evas) { Fndat *fd; - Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS); + Evas_Public_Data *evas = eo_data_scope_get(eo_evas, EVAS_CLASS); EINA_LIST_FREE(fonts_zero, fd) { @@ -134,7 +134,7 @@ void evas_fonts_zero_pressure(Evas *eo_evas) { Fndat *fd; - Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS); + Evas_Public_Data *evas = eo_data_scope_get(eo_evas, EVAS_CLASS); while (fonts_zero && eina_list_count(fonts_zero) > 4) /* 4 is arbitrary */ @@ -162,7 +162,7 @@ evas_font_free(Evas *eo_evas, void *font) { Eina_List *l; Fndat *fd; - Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS); + Evas_Public_Data *evas = eo_data_scope_get(eo_evas, EVAS_CLASS); EINA_LIST_FOREACH(fonts_cache, l, fd) { @@ -203,7 +203,7 @@ static Evas_Font_Set * evas_load_fontconfig(Evas *eo_evas, FcFontSet *set, int size, Font_Rend_Flags wanted_rend) { - Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS); + Evas_Public_Data *evas = eo_data_scope_get(eo_evas, EVAS_CLASS); Evas_Font_Set *font = NULL; int i; @@ -461,7 +461,7 @@ evas_font_name_parse(Evas_Font_Description *fdesc, const char *name) void * evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size) { - Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS); + Evas_Public_Data *evas = eo_data_scope_get(eo_evas, EVAS_CLASS); #ifdef HAVE_FONTCONFIG FcPattern *p_nm = NULL; FcFontSet *set = NULL; @@ -756,7 +756,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source, void evas_font_load_hinting_set(Evas *eo_evas, void *font, int hinting) { - Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS); + Evas_Public_Data *evas = eo_data_scope_get(eo_evas, EVAS_CLASS); evas->engine.func->font_hinting_set(evas->engine.data.output, font, hinting); } @@ -764,7 +764,7 @@ evas_font_load_hinting_set(Evas *eo_evas, void *font, int hinting) Eina_List * evas_font_dir_available_list(const Evas *eo_evas) { - const Evas_Public_Data *evas = eo_data_get(eo_evas, EVAS_CLASS); + const Evas_Public_Data *evas = eo_data_scope_get(eo_evas, EVAS_CLASS); Eina_List *l; Eina_List *ll; Eina_List *available = NULL; @@ -1252,7 +1252,7 @@ _canvas_font_path_list(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) void evas_font_object_rehint(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (obj->is_smart) { EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), obj) diff --git a/src/lib/evas/canvas/evas_gl.c b/src/lib/evas/canvas/evas_gl.c index faf5280a8f..14a4dd6130 100644 --- a/src/lib/evas/canvas/evas_gl.c +++ b/src/lib/evas/canvas/evas_gl.c @@ -35,7 +35,7 @@ evas_gl_new(Evas *e) if (!evas_gl) return NULL; evas_gl->magic = MAGIC_EVAS_GL; - evas_gl->evas = eo_data_get(e, EVAS_CLASS); + evas_gl->evas = eo_data_ref(e, EVAS_CLASS); if (!evas_gl->evas->engine.func->gl_context_create) { @@ -63,6 +63,7 @@ evas_gl_free(Evas_GL *evas_gl) while (evas_gl->contexts) evas_gl_context_destroy(evas_gl, evas_gl->contexts->data); + eo_data_unref(evas_gl->evas->evas, evas_gl->evas); evas_gl->magic = 0; free(evas_gl); } diff --git a/src/lib/evas/canvas/evas_key_grab.c b/src/lib/evas/canvas/evas_key_grab.c index 9f65c04cee..202c9bf615 100644 --- a/src/lib/evas/canvas/evas_key_grab.c +++ b/src/lib/evas/canvas/evas_key_grab.c @@ -125,7 +125,7 @@ evas_key_grab_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, const c g = evas_key_grab_find(eo_obj, obj, keyname, modifiers, not_modifiers, 0); if (!g) return; - Evas_Object_Protected_Data *g_object = eo_data_get(g->object, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *g_object = eo_data_scope_get(g->object, EVAS_OBJ_CLASS); g_object->grabs = eina_list_remove(g_object->grabs, g); obj->layer->evas->grabs = eina_list_remove(obj->layer->evas->grabs, g); if (g->keyname) free(g->keyname); @@ -200,7 +200,7 @@ _key_ungrab(Eo *eo_obj, void *_pd, va_list *list) Evas_Object_Protected_Data *obj = _pd; g = evas_key_grab_find(eo_obj, obj, keyname, modifiers, not_modifiers, 0); if (!g) return; - Evas_Object_Protected_Data *g_object = eo_data_get(g->object, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *g_object = eo_data_scope_get(g->object, EVAS_OBJ_CLASS); if (g_object->layer->evas->walking_grabs) { if (!g->delete_me) diff --git a/src/lib/evas/canvas/evas_layer.c b/src/lib/evas/canvas/evas_layer.c index 38a0c9efdb..b30ba66b2b 100644 --- a/src/lib/evas/canvas/evas_layer.c +++ b/src/lib/evas/canvas/evas_layer.c @@ -4,7 +4,7 @@ static void _evas_layer_free(Evas_Layer *lay); void -evas_object_inject(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas *e) +evas_object_inject(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas *e) { Evas_Layer *lay; @@ -18,6 +18,7 @@ evas_object_inject(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data * lay->layer = obj->cur->layer; evas_layer_add(lay); } + eo_data_ref(eo_obj, NULL); lay->objects = (Evas_Object_Protected_Data *)eina_inlist_append(EINA_INLIST_GET(lay->objects), EINA_INLIST_GET(obj)); lay->usage++; obj->layer = lay; @@ -25,10 +26,11 @@ evas_object_inject(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data * } void -evas_object_release(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, int clean_layer) +evas_object_release(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, int clean_layer) { if (!obj->in_layer) return; obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj)); + eo_data_unref(eo_obj, obj); obj->layer->usage--; if (clean_layer) { @@ -45,7 +47,7 @@ evas_object_release(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data Evas_Layer * evas_layer_new(Evas *eo_e) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_ref(eo_e, EVAS_CLASS); Evas_Layer *lay; lay = calloc(1, sizeof(Evas_Layer)); @@ -87,7 +89,7 @@ evas_layer_free_objects(Evas_Layer *lay) void evas_layer_clean(Evas *eo_e) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Layer *tmp; while (e->layers) @@ -101,7 +103,7 @@ evas_layer_clean(Evas *eo_e) Evas_Layer * evas_layer_find(Evas *eo_e, short layer_num) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Layer *layer; EINA_INLIST_FOREACH(e->layers, layer) @@ -136,13 +138,16 @@ evas_layer_del(Evas_Layer *lay) e = lay->evas; e->layers = (Evas_Layer *)eina_inlist_remove(EINA_INLIST_GET(e->layers), EINA_INLIST_GET(lay)); + + eo_data_unref(e->evas, e); + lay->evas = NULL; } static void _evas_object_layer_set_child(Evas_Object *eo_obj, Evas_Object *par, short l) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Protected_Data *par_obj = eo_data_get(par, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *par_obj = eo_data_scope_get(par, EVAS_OBJ_CLASS); if (obj->delete_me) return; if (obj->cur->layer == l) return; @@ -257,7 +262,7 @@ _layer_get(Eo *eo_obj EINA_UNUSED, void *_obj, va_list *list) const Evas_Object_Protected_Data *obj = _obj; if (obj->smart.parent) { - Evas_Object_Protected_Data *smart_parent_obj = eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *smart_parent_obj = eo_data_scope_get(obj->smart.parent, EVAS_OBJ_CLASS); *layer = smart_parent_obj->cur->layer; } *layer = obj->cur->layer; diff --git a/src/lib/evas/canvas/evas_map.c b/src/lib/evas/canvas/evas_map.c index e85e6cb9b9..d2b7e09277 100644 --- a/src/lib/evas/canvas/evas_map.c +++ b/src/lib/evas/canvas/evas_map.c @@ -6,7 +6,7 @@ static void _evas_map_calc_geom_change(Evas_Object *eo_obj) { int is, was = 0; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj) return; evas_object_change(eo_obj, obj); evas_object_clip_dirty(eo_obj, obj); @@ -37,7 +37,7 @@ _evas_map_calc_map_geometry(Evas_Object *eo_obj) const Evas_Map_Point *p, *p_end; Eina_Bool ch = EINA_FALSE; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj) return; if (!obj->map->cur.map) return; // WARN: Do not merge below code to SLP until it is fixed. @@ -173,7 +173,7 @@ _evas_map_free(Evas_Object *eo_obj, Evas_Map *m) { if (eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if ((obj) && (obj->map->spans)) { obj->layer->evas->engine.func->image_map_clean(obj->layer->evas->engine.data.output, obj->map->spans); @@ -416,7 +416,7 @@ _evas_object_map_parent_check(Evas_Object *eo_parent) const Evas_Object_Protected_Data *o; if (!eo_parent) return EINA_FALSE; - Evas_Object_Protected_Data *parent = eo_data_get(eo_parent, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *parent = eo_data_scope_get(eo_parent, EVAS_OBJ_CLASS); if (!parent) return EINA_FALSE; list = evas_object_smart_members_get_direct(parent->smart.parent); EINA_INLIST_FOREACH(list, o) @@ -495,7 +495,7 @@ _map_enable_set(Eo *eo_obj, void *_pd, va_list *list) Evas_Object_Protected_Data *parents = NULL; for (eo_parents = obj->smart.parent; eo_parents; eo_parents = parents->smart.parent) { - parents = eo_data_get(eo_parents, EVAS_OBJ_CLASS); + parents = eo_data_scope_get(eo_parents, EVAS_OBJ_CLASS); if (parents) parents->child_has_map = EINA_TRUE; } @@ -844,7 +844,7 @@ evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *e MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj) return; if (m->count != 4) @@ -866,7 +866,7 @@ evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *eo_obj MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj) return; if (m->count != 4) @@ -1223,7 +1223,7 @@ evas_object_map_update(Evas_Object *eo_obj, int imagew, int imageh, int uvw, int uvh) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); const Evas_Map_Point *p, *p_end; RGBA_Map_Point *pts, *pt; diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c index 47f04e9f6c..a07bd7bfbd 100644 --- a/src/lib/evas/canvas/evas_object_box.c +++ b/src/lib/evas/canvas/evas_object_box.c @@ -46,7 +46,7 @@ static const Evas_Smart_Cb_Description _signals[] = static void _sizing_eval(Evas_Object *obj); #define EVAS_OBJECT_BOX_DATA_GET(o, ptr) \ - Evas_Object_Box_Data *ptr = eo_data_get(o, MY_CLASS) + Evas_Object_Box_Data *ptr = eo_data_scope_get(o, MY_CLASS) #define EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, ptr) \ EVAS_OBJECT_BOX_DATA_GET(o, ptr); \ diff --git a/src/lib/evas/canvas/evas_object_grid.c b/src/lib/evas/canvas/evas_object_grid.c index 7fe2042698..f2a5779b27 100644 --- a/src/lib/evas/canvas/evas_object_grid.c +++ b/src/lib/evas/canvas/evas_object_grid.c @@ -47,7 +47,7 @@ struct _Evas_Object_Grid_Accessor }; #define EVAS_OBJECT_GRID_DATA_GET(o, ptr) \ - Evas_Object_Grid_Data *ptr = eo_data_get(o, MY_CLASS) + Evas_Object_Grid_Data *ptr = eo_data_scope_get(o, MY_CLASS) #define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, ptr) \ EVAS_OBJECT_GRID_DATA_GET(o, ptr); \ @@ -170,7 +170,7 @@ _evas_object_grid_smart_add(Evas_Object *o) priv = evas_object_smart_data_get(o); if (!priv) { - priv = eo_data_get(o, MY_CLASS); + priv = eo_data_ref(o, MY_CLASS); evas_object_smart_data_set(o, priv); } diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index c7e86e1bd9..61ee9e0615 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -296,7 +296,7 @@ _init_cow(Eo *eo_obj) static void _constructor(Eo *eo_obj, void *class_data, va_list *list EINA_UNUSED) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = class_data; Evas *eo_e = evas_object_evas_get(eo_parent_get(eo_obj)); Evas_Colorspace cspace; @@ -331,7 +331,7 @@ evas_object_image_add(Evas *eo_e) MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); EINA_SAFETY_ON_NULL_RETURN_VAL(e, NULL); EINA_SAFETY_ON_NULL_RETURN_VAL(e->engine.func, NULL); Evas_Object *eo_obj = eo_add(EVAS_OBJ_IMAGE_CLASS, eo_e); @@ -354,7 +354,7 @@ _cleanup_tmpf(Evas_Object *eo_obj) #ifdef HAVE_SYS_MMAN_H Evas_Object_Image *o; - o = eo_data_get(eo_obj, MY_CLASS); + o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o->pixels->tmpf) return; #ifdef __linux__ #else @@ -382,7 +382,7 @@ _create_tmpf(Evas_Object *eo_obj, void *data, int size, char *format EINA_UNUSED void *dst; int fd = -1; - o = eo_data_get(eo_obj, MY_CLASS); + o = eo_data_scope_get(eo_obj, MY_CLASS); #ifdef __linux__ snprintf(buf, sizeof(buf), "/dev/shm/.evas-tmpf-%i-%p-%i-XXXXXX", (int)getpid(), data, (int)size); @@ -495,7 +495,7 @@ evas_object_image_file_set(Evas_Object *eo_obj, const char *file, const char *ke static void _image_file_set(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = _pd; Evas_Image_Load_Opts lo; Eina_Bool resize_call = EINA_FALSE; @@ -655,7 +655,7 @@ static void _image_source_set(Eo *eo_obj, void *_pd, va_list *list) { Evas_Object_Image *o = _pd; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object *eo_src = va_arg(*list, Evas_Object *); Eina_Bool *result = va_arg(*list, Eina_Bool *); @@ -668,7 +668,7 @@ _image_source_set(Eo *eo_obj, void *_pd, va_list *list) } if (eo_src) { - Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, EVAS_OBJ_CLASS); if (src->delete_me) { WRN("Setting object %p to deleted image source %p", eo_src, eo_obj); @@ -759,7 +759,7 @@ _image_source_clip_set(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) if (!o->cur->source) return; - src_obj = eo_data_get(o->cur->source, EVAS_OBJ_CLASS); + src_obj = eo_data_scope_get(o->cur->source, EVAS_OBJ_CLASS); evas_object_change(o->cur->source, src_obj); } @@ -799,7 +799,7 @@ _image_source_events_set(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) { Evas_Object_Image *o = _pd; Eina_Bool source_events = va_arg(*list, int); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); source_events = !!source_events; if (obj->proxy->src_events == source_events) return; @@ -829,7 +829,7 @@ evas_object_image_source_events_get(const Evas_Object *eo_obj) static void _image_source_events_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Eina_Bool *source_events = va_arg(*list, Eina_Bool *); if (!source_events) return; *source_events = obj->proxy->src_events; @@ -878,7 +878,7 @@ _image_source_visible_set(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) if (!o->cur->source) return; visible = !!visible; - src_obj = eo_data_get(o->cur->source, EVAS_OBJ_CLASS); + src_obj = eo_data_scope_get(o->cur->source, EVAS_OBJ_CLASS); if (src_obj->proxy->src_invisible == !visible) return; EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, src_obj->proxy, Evas_Object_Proxy_Data, proxy_write) @@ -915,7 +915,7 @@ _image_source_visible_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) if (!visible) return; if (!o->cur->source) *visible = EINA_FALSE; - src_obj = eo_data_get(o->cur->source, EVAS_OBJ_CLASS); + src_obj = eo_data_scope_get(o->cur->source, EVAS_OBJ_CLASS); if (src_obj) *visible = !src_obj->proxy->src_invisible; else *visible = EINA_FALSE; } @@ -932,7 +932,7 @@ evas_object_image_border_set(Evas_Object *eo_obj, int l, int r, int t, int b) static void _image_border_set(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = _pd; int l = va_arg(*list, int); @@ -1008,7 +1008,7 @@ _image_border_center_fill_set(Eo *eo_obj, void *_pd, va_list *list) EINA_COW_IMAGE_STATE_WRITE_END(o, state_write); o->changed = EINA_TRUE; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } @@ -1108,7 +1108,7 @@ _image_border_scale_set(Eo *eo_obj, void *_pd, va_list *list) EINA_COW_IMAGE_STATE_WRITE_END(o, state_write); o->changed = EINA_TRUE; - obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } @@ -1172,7 +1172,7 @@ _image_fill_set(Eo *eo_obj, void *_pd, va_list *list) EINA_COW_IMAGE_STATE_WRITE_END(o, state_write); o->changed = EINA_TRUE; - obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } @@ -1229,7 +1229,7 @@ _image_fill_spread_set(Eo *eo_obj, void *_pd, va_list *list) EINA_COW_IMAGE_STATE_WRITE_END(o, state_write); o->changed = EINA_TRUE; - obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } @@ -1264,7 +1264,7 @@ evas_object_image_size_set(Evas_Object *eo_obj, int w, int h) static void _image_size_set(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); int w = va_arg(*list, int); int h = va_arg(*list, int); @@ -1406,7 +1406,7 @@ evas_object_image_data_convert(Evas_Object *eo_obj, Evas_Colorspace to_cspace) static void _image_data_convert(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = _pd; Evas_Colorspace to_cspace = va_arg(*list, Evas_Colorspace); void **ret_data = va_arg(*list, void **); @@ -1446,7 +1446,7 @@ evas_object_image_data_set(Evas_Object *eo_obj, void *data) static void _image_data_set(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = _pd; void *p_data; Eina_Bool resize_call = EINA_FALSE; @@ -1563,7 +1563,7 @@ _image_data_get(Eo *eo_obj, void *_pd, va_list *list) return; } - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (for_writing) evas_render_rendering_wait(obj->layer->evas); @@ -1637,7 +1637,7 @@ _image_preload_internal(Eo *eo_obj, void *_pd, Eina_Bool cancel) } // FIXME: if already busy preloading, then dont request again until // preload done - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (cancel) { if (o->preloading) @@ -1684,7 +1684,7 @@ evas_object_image_data_copy_set(Evas_Object *eo_obj, void *data) static void _image_data_copy_set(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = _pd; void *data = va_arg(*list, void *); @@ -1786,7 +1786,7 @@ _image_data_update_add(Eo *eo_obj, void *_pd, va_list *list) } o->changed = EINA_TRUE; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } @@ -1802,7 +1802,7 @@ evas_object_image_alpha_set(Evas_Object *eo_obj, Eina_Bool has_alpha) static void _image_alpha_set(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = _pd; Eina_Bool has_alpha = va_arg(*list, int); @@ -1899,7 +1899,7 @@ _image_smooth_scale_set(Eo *eo_obj, void *_pd, va_list *list) EINA_COW_IMAGE_STATE_WRITE_END(o, state_write); o->changed = EINA_TRUE; - obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } @@ -1934,7 +1934,7 @@ evas_object_image_reload(Evas_Object *eo_obj) static void _image_reload(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = _pd; if ((o->preloading) && (o->engine_data)) @@ -1987,7 +1987,7 @@ static void _image_save(Eo *eo_obj, void *_pd, va_list *list) RGBA_Image *im; Evas_Object_Image *o = _pd; if (!o->engine_data) return; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, o->engine_data, 0, &data, &o->load_error); if (flags) { @@ -2051,7 +2051,7 @@ evas_object_image_pixels_import(Evas_Object *eo_obj, Evas_Pixel_Import_Source *p static void _image_pixels_import(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = _pd; Evas_Pixel_Import_Source *pixels = va_arg(*list, Evas_Pixel_Import_Source *); @@ -2160,7 +2160,7 @@ static void _image_pixels_dirty_set(Eo *eo_obj, void *_pd, va_list *list) { Eina_Bool dirty = va_arg(*list, int); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = _pd; if (dirty) o->dirty_pixels = EINA_TRUE; @@ -2213,7 +2213,7 @@ _image_load_dpi_set(Eo *eo_obj, void *_pd, va_list *list) if (o->cur->file) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_image_unload(eo_obj, 0); evas_object_inform_call_image_unloaded(eo_obj); evas_object_image_load(eo_obj); @@ -2269,7 +2269,7 @@ _image_load_size_set(Eo *eo_obj, void *_pd, va_list *list) if (o->cur->file) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_image_unload(eo_obj, 0); evas_object_inform_call_image_unloaded(eo_obj); evas_object_image_load(eo_obj); @@ -2322,7 +2322,7 @@ _image_load_scale_down_set(Eo *eo_obj, void *_pd, va_list *list) if (o->cur->file) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_image_unload(eo_obj, 0); evas_object_inform_call_image_unloaded(eo_obj); evas_object_image_load(eo_obj); @@ -2383,7 +2383,7 @@ _image_load_region_set(Eo *eo_obj, void *_pd, va_list *list) if (o->cur->file) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_image_unload(eo_obj, 0); evas_object_inform_call_image_unloaded(eo_obj); evas_object_image_load(eo_obj); @@ -2470,7 +2470,7 @@ static void _image_colorspace_set(Eo *eo_obj, void *_pd, va_list *list) { Evas_Colorspace cspace = va_arg(*list, Evas_Colorspace); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = _pd; _evas_object_image_cleanup(eo_obj, obj, o); @@ -2515,7 +2515,7 @@ static void _image_video_surface_set(Eo *eo_obj, void *_pd, va_list *list) { Evas_Video_Surface *surf = va_arg(*list, Evas_Video_Surface *); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = _pd; _evas_object_image_cleanup(eo_obj, obj, o); @@ -2604,7 +2604,7 @@ _image_native_surface_set(Eo *eo_obj, void *_pd, va_list *list) { Evas_Native_Surface *surf = va_arg(*list, Evas_Native_Surface *); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = _pd; evas_render_rendering_wait(obj->layer->evas); @@ -2633,7 +2633,7 @@ _image_native_surface_get(Eo *eo_obj, void *_pd, va_list *list) { Evas_Native_Surface **surf = va_arg(*list, Evas_Native_Surface **); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); const Evas_Object_Image *o = _pd; *surf = @@ -2654,7 +2654,7 @@ static void _image_scale_hint_set(Eo *eo_obj, void *_pd, va_list *list) { Evas_Object_Image *o = _pd; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Image_Scale_Hint hint = va_arg(*list, Evas_Image_Scale_Hint); if (o->scale_hint == hint) return; o->scale_hint = hint; @@ -2714,7 +2714,7 @@ static void _image_content_hint_set(Eo *eo_obj, void *_pd, va_list *list) { Evas_Object_Image *o = _pd; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Image_Content_Hint hint = va_arg(*list, Evas_Image_Content_Hint); if (o->content_hint == hint) return; o->content_hint = hint; @@ -2790,7 +2790,7 @@ evas_object_image_region_support_get(const Evas_Object *eo_obj) static void _image_region_support_get(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); const Evas_Object_Image *o = _pd; Eina_Bool *region = va_arg(*list, Eina_Bool *); @@ -2815,7 +2815,7 @@ static void _image_animated_get(Eo *eo_obj, void *_pd, va_list *list) { Eina_Bool *animated = va_arg(*list, Eina_Bool *); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); const Evas_Object_Image *o = _pd; *animated = @@ -2843,7 +2843,7 @@ _image_animated_frame_count_get(Eo *eo_obj, void *_pd, va_list *list) *frame_count = -1; if (!evas_object_image_animated_get(eo_obj)) return; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (obj->layer->evas->engine.func->image_animated_frame_count_get) *frame_count = obj->layer->evas->engine.func->image_animated_frame_count_get(obj->layer->evas->engine.data.output, o->engine_data); @@ -2864,7 +2864,7 @@ static void _image_animated_loop_type_get(Eo *eo_obj, void *_pd, va_list *list) { const Evas_Object_Image *o = _pd; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Image_Animated_Loop_Hint *hint = va_arg(*list, Evas_Image_Animated_Loop_Hint *); *hint = EVAS_IMAGE_ANIMATED_HINT_NONE; @@ -2889,7 +2889,7 @@ static void _image_animated_loop_count_get(Eo *eo_obj, void *_pd, va_list *list) { const Evas_Object_Image *o = _pd; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); int *loop_count = va_arg(*list, int *); *loop_count = -1; @@ -2915,7 +2915,7 @@ evas_object_image_animated_frame_duration_get(const Evas_Object *eo_obj, int sta static void _image_animated_frame_duration_get(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); const Evas_Object_Image *o = _pd; int frame_count = 0; @@ -2945,7 +2945,7 @@ evas_object_image_animated_frame_set(Evas_Object *eo_obj, int frame_index) static void _image_animated_frame_set(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Image *o = _pd; int frame_count = 0; @@ -3030,7 +3030,7 @@ _canvas_image_cache_reload(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) { if (eo_isa(obj->object, MY_CLASS)) { - Evas_Object_Image *o = eo_data_get(obj->object, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(obj->object, MY_CLASS); evas_object_image_load(obj->object); o->changed = EINA_TRUE; evas_object_change(obj->object, obj); @@ -3112,14 +3112,14 @@ _canvas_image_max_size_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) static void _proxy_unset(Evas_Object *proxy) { - Evas_Object_Image *o = eo_data_get(proxy, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(proxy, MY_CLASS); Evas_Object_Protected_Data *cur_source; Evas_Object_Protected_Data *cur_proxy; if (!o->cur->source) return; - cur_source = eo_data_get(o->cur->source, EVAS_OBJ_CLASS); - cur_proxy = eo_data_get(proxy, EVAS_OBJ_CLASS); + cur_source = eo_data_scope_get(o->cur->source, EVAS_OBJ_CLASS); + cur_proxy = eo_data_scope_get(proxy, EVAS_OBJ_CLASS); EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, cur_source->proxy, Evas_Object_Proxy_Data, proxy_source_write) { @@ -3162,9 +3162,9 @@ _proxy_unset(Evas_Object *proxy) static void _proxy_set(Evas_Object *eo_proxy, Evas_Object *eo_src) { - Evas_Object_Protected_Data *src = eo_data_get(eo_src, EVAS_OBJ_CLASS); - Evas_Object_Protected_Data *proxy = eo_data_get(eo_proxy, EVAS_OBJ_CLASS); - Evas_Object_Image *o = eo_data_get(eo_proxy, MY_CLASS); + Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *proxy = eo_data_scope_get(eo_proxy, EVAS_OBJ_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_proxy, MY_CLASS); evas_object_image_file_set(eo_proxy, NULL, NULL); @@ -3195,12 +3195,12 @@ _proxy_error(Evas_Object *eo_proxy, void *context, void *output, void *surface, int x, int y, Eina_Bool do_async) { Evas_Func *func; - Evas_Object_Image *o = eo_data_get(eo_proxy, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_proxy, MY_CLASS); if (!o->proxyerror) printf("Err: Argh! Recursive proxies.\n"); o->proxyerror = 1; - Evas_Object_Protected_Data *proxy = eo_data_get(eo_proxy, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *proxy = eo_data_scope_get(eo_proxy, EVAS_OBJ_CLASS); func = proxy->layer->evas->engine.func; func->context_color_set(output, context, 0, 0, 0, 255); func->context_multiplier_unset(output, context); @@ -3256,14 +3256,14 @@ _proxy_subrender_recurse(Evas_Object *eo_obj, Evas_Object *clip, void *output, v static void _proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_proxy, Eina_Bool do_async) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Object_Protected_Data *source; void *ctx; /* Evas_Object *eo_obj2, *clip;*/ int w, h; if (!eo_source) return; - source = eo_data_get(eo_source, EVAS_OBJ_CLASS); + source = eo_data_scope_get(eo_source, EVAS_OBJ_CLASS); w = source->cur->geometry.w; h = source->cur->geometry.h; @@ -3352,11 +3352,11 @@ evas_object_image_unload(Evas_Object *eo_obj, Eina_Bool dirty) Evas_Object_Image *o; Eina_Bool resize_call = EINA_FALSE; - o = eo_data_get(eo_obj, MY_CLASS); + o = eo_data_scope_get(eo_obj, MY_CLASS); if ((!o->cur->file) || (o->pixels_checked_out > 0)) return; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (dirty) { if (o->engine_data) @@ -3397,12 +3397,12 @@ evas_object_image_unload(Evas_Object *eo_obj, Eina_Bool dirty) static void evas_object_image_load(Evas_Object *eo_obj) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); Evas_Image_Load_Opts lo; if (o->engine_data) return; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); lo.scale_down_by = o->load_opts->scale_down_by; lo.dpi = o->load_opts->dpi; lo.w = o->load_opts->w; @@ -3512,7 +3512,7 @@ evas_object_image_figure_y_fill(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Pro static void evas_object_image_init(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); /* set up methods (compulsory) */ obj->func = &object_func; obj->type = o_type; @@ -3521,7 +3521,7 @@ evas_object_image_init(Evas_Object *eo_obj) static void _destructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_image_video_surface_set(eo_obj, NULL); evas_object_image_free(eo_obj, obj); @@ -3535,7 +3535,7 @@ _evas_object_image_free(Evas_Object *obj) if (!eo_isa(obj, MY_CLASS)) return ; - o = eo_data_get(obj, MY_CLASS); + o = eo_data_scope_get(obj, MY_CLASS); eina_cow_free(evas_object_image_load_opts_cow, o->load_opts); o->load_opts = &default_load_opts; @@ -3550,7 +3550,7 @@ _evas_object_image_free(Evas_Object *obj) static void evas_object_image_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); Eina_Rectangle *r; /* free obj */ @@ -3645,7 +3645,7 @@ evas_draw_image_map_async_check(Evas_Object_Protected_Data *obj, static void evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); int imagew, imageh, uvw, uvh; void *pixels; @@ -3707,7 +3707,7 @@ evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, v Evas_Object_Protected_Data *source = (o->cur->source ? - eo_data_get(o->cur->source, EVAS_OBJ_CLASS): + eo_data_scope_get(o->cur->source, EVAS_OBJ_CLASS): NULL); if (!o->cur->source) { @@ -3726,10 +3726,10 @@ evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, v uvh = imageh; } else if (source->type == o_type && - ((Evas_Object_Image *)eo_data_get(o->cur->source, MY_CLASS))->engine_data) + ((Evas_Object_Image *)eo_data_scope_get(o->cur->source, MY_CLASS))->engine_data) { Evas_Object_Image *oi; - oi = eo_data_get(o->cur->source, MY_CLASS); + oi = eo_data_scope_get(o->cur->source, MY_CLASS); pixels = oi->engine_data; imagew = oi->cur->image.w; imageh = oi->cur->image.h; @@ -4036,7 +4036,7 @@ evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, v static void evas_object_image_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); int is_v = 0, was_v = 0; /* dont pre-render the obj twice! */ @@ -4067,7 +4067,7 @@ evas_object_image_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *ob /* Proxy: Do it early */ if (o->cur->source) { - Evas_Object_Protected_Data *source = eo_data_get(o->cur->source, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *source = eo_data_scope_get(o->cur->source, EVAS_OBJ_CLASS); if (source->proxy->redraw || source->changed) { /* XXX: Do I need to sort out the map here? */ @@ -4322,7 +4322,7 @@ evas_object_image_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *ob static void evas_object_image_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj EINA_UNUSED) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); Eina_Rectangle *r; /* this moves the current data to the previous state parts of the object */ @@ -4349,21 +4349,21 @@ evas_object_image_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *o static unsigned int evas_object_image_id_get(Evas_Object *eo_obj) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_IMAGE; } static unsigned int evas_object_image_visual_id_get(Evas_Object *eo_obj) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_IMAGE; } static void *evas_object_image_engine_data_get(Evas_Object *eo_obj) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return NULL; return o->engine_data; } @@ -4375,7 +4375,7 @@ evas_object_image_is_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj /* currently fully opaque over the entire rectangle it occupies */ /* disable caching due tyo maps screwing with this o->cur.opaque_valid = 0;*/ - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); if (o->cur->opaque_valid) { @@ -4404,7 +4404,7 @@ evas_object_image_is_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj // FIXME: use proxy if (o->cur->source) { - Evas_Object_Protected_Data *cur_source = eo_data_get(o->cur->source, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *cur_source = eo_data_scope_get(o->cur->source, EVAS_OBJ_CLASS); EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write) { state_write->opaque = evas_object_is_opaque(o->cur->source, cur_source); @@ -4475,7 +4475,7 @@ evas_object_image_is_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj static int evas_object_image_was_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); /* this returns 1 if the internal object data implies that the object was */ /* previously fully opaque over the entire rectangle it occupies */ @@ -4578,7 +4578,7 @@ evas_object_image_was_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *ob static int evas_object_image_is_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord px, Evas_Coord py) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); int imagew, imageh, uvw, uvh; void *pixels; Evas_Func *eng = obj->layer->evas->engine.func; @@ -4589,7 +4589,7 @@ evas_object_image_is_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj */ Evas_Object_Protected_Data *source = (o->cur->source ? - eo_data_get(o->cur->source, EVAS_OBJ_CLASS): + eo_data_scope_get(o->cur->source, EVAS_OBJ_CLASS): NULL); if (!o->cur->source) { @@ -4608,10 +4608,10 @@ evas_object_image_is_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj uvh = imageh; } else if (source->type == o_type && - ((Evas_Object_Image *)eo_data_get(o->cur->source, MY_CLASS))->engine_data) + ((Evas_Object_Image *)eo_data_scope_get(o->cur->source, MY_CLASS))->engine_data) { Evas_Object_Image *oi; - oi = eo_data_get(o->cur->source, MY_CLASS); + oi = eo_data_scope_get(o->cur->source, MY_CLASS); pixels = oi->engine_data; imagew = oi->cur->image.w; imageh = oi->cur->image.h; @@ -4931,7 +4931,7 @@ evas_object_image_is_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj static int evas_object_image_has_opaque_rect(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); if ((obj->map->cur.map) && (obj->map->cur.usemap)) return 0; if (((o->cur->border.l | o->cur->border.r | o->cur->border.t | o->cur->border.b) != 0) && @@ -4949,7 +4949,7 @@ evas_object_image_has_opaque_rect(Evas_Object *eo_obj, Evas_Object_Protected_Dat static int evas_object_image_get_opaque_rect(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); if (o->cur->border.scale == 1.0) { @@ -5048,29 +5048,29 @@ evas_object_image_filled_resize_listener(void *data EINA_UNUSED, Evas *e EINA_UN Evas_Object * _evas_object_image_source_get(Evas_Object *eo_obj) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); return o->cur->source; } Eina_Bool _evas_object_image_preloading_get(const Evas_Object *eo_obj) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); return o->preloading; } void _evas_object_image_preloading_set(Evas_Object *eo_obj, Eina_Bool preloading) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); o->preloading = preloading; } void _evas_object_image_preloading_check(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); if (obj->layer->evas->engine.func->image_load_error_get) o->load_error = obj->layer->evas->engine.func->image_load_error_get (obj->layer->evas->engine.data.output, o->engine_data); @@ -5079,15 +5079,15 @@ _evas_object_image_preloading_check(Evas_Object *eo_obj) Evas_Object * _evas_object_image_video_parent_get(Evas_Object *eo_obj) { - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); return o->video_surface ? o->pixels->video.parent : NULL; } void _evas_object_image_video_overlay_show(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); if (obj->cur->cache.clip.x != obj->prev->cache.clip.x || obj->cur->cache.clip.y != obj->prev->cache.clip.y || @@ -5122,8 +5122,8 @@ _evas_object_image_video_overlay_show(Evas_Object *eo_obj) void _evas_object_image_video_overlay_hide(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Image *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Image *o = eo_data_scope_get(eo_obj, MY_CLASS); if (o->video_visible || o->created) o->pixels->video.hide(o->pixels->video.data, eo_obj, &o->pixels->video); diff --git a/src/lib/evas/canvas/evas_object_inform.c b/src/lib/evas/canvas/evas_object_inform.c index 848012d98b..c48b07f1cc 100644 --- a/src/lib/evas/canvas/evas_object_inform.c +++ b/src/lib/evas/canvas/evas_object_inform.c @@ -6,7 +6,7 @@ void evas_object_inform_call_show(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); _evas_object_event_new(); evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_SHOW, NULL, _evas_event_counter); @@ -16,7 +16,7 @@ evas_object_inform_call_show(Evas_Object *eo_obj) void evas_object_inform_call_hide(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); _evas_object_event_new(); evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HIDE, NULL, _evas_event_counter); @@ -35,7 +35,7 @@ evas_object_inform_call_move(Evas_Object *eo_obj, Evas_Object_Protected_Data *ob void evas_object_inform_call_resize(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); _evas_object_event_new(); evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_RESIZE, NULL, _evas_event_counter); @@ -45,7 +45,7 @@ evas_object_inform_call_resize(Evas_Object *eo_obj) void evas_object_inform_call_restack(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); _evas_object_event_new(); evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_RESTACK, NULL, _evas_event_counter); @@ -55,7 +55,7 @@ evas_object_inform_call_restack(Evas_Object *eo_obj) void evas_object_inform_call_changed_size_hints(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); _evas_object_event_new(); evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, _evas_event_counter); @@ -65,7 +65,7 @@ evas_object_inform_call_changed_size_hints(Evas_Object *eo_obj) void evas_object_inform_call_image_preloaded(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!_evas_object_image_preloading_get(eo_obj)) return; _evas_object_image_preloading_check(eo_obj); _evas_object_image_preloading_set(eo_obj, 0); @@ -78,7 +78,7 @@ evas_object_inform_call_image_preloaded(Evas_Object *eo_obj) void evas_object_inform_call_image_unloaded(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); _evas_object_event_new(); evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL, _evas_event_counter); @@ -88,7 +88,7 @@ evas_object_inform_call_image_unloaded(Evas_Object *eo_obj) void evas_object_inform_call_image_resize(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); _evas_object_event_new(); evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_IMAGE_RESIZE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas); diff --git a/src/lib/evas/canvas/evas_object_intercept.c b/src/lib/evas/canvas/evas_object_intercept.c index 4c31cd8628..41418f1221 100644 --- a/src/lib/evas/canvas/evas_object_intercept.c +++ b/src/lib/evas/canvas/evas_object_intercept.c @@ -9,7 +9,7 @@ static void evas_object_intercept_deinit(Evas_Object *eo_obj); static void evas_object_intercept_init(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj->interceptors) obj->interceptors = evas_mem_calloc(sizeof(Evas_Intercept_Func)); } @@ -17,7 +17,7 @@ evas_object_intercept_init(Evas_Object *eo_obj) static void evas_object_intercept_deinit(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj->interceptors) return; if ((obj->interceptors->show.func) || (obj->interceptors->hide.func) || @@ -41,14 +41,14 @@ evas_object_intercept_deinit(Evas_Object *eo_obj) void evas_object_intercept_cleanup(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (obj->interceptors) free(obj->interceptors); } int evas_object_intercept_call_show(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); int ret; if (!obj->interceptors) return 0; @@ -64,7 +64,7 @@ evas_object_intercept_call_show(Evas_Object *eo_obj) int evas_object_intercept_call_hide(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); int ret; if (!obj->interceptors) return 0; @@ -95,7 +95,7 @@ evas_object_intercept_call_move(Evas_Object *eo_obj, Evas_Object_Protected_Data int evas_object_intercept_call_resize(Evas_Object *eo_obj, Evas_Coord w, Evas_Coord h) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); int ret; if (!obj->interceptors) return 0; @@ -111,7 +111,7 @@ evas_object_intercept_call_resize(Evas_Object *eo_obj, Evas_Coord w, Evas_Coord int evas_object_intercept_call_raise(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); int ret; if (!obj->interceptors) return 0; @@ -127,7 +127,7 @@ evas_object_intercept_call_raise(Evas_Object *eo_obj) int evas_object_intercept_call_lower(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); int ret; if (!obj->interceptors) return 0; @@ -143,7 +143,7 @@ evas_object_intercept_call_lower(Evas_Object *eo_obj) int evas_object_intercept_call_stack_above(Evas_Object *eo_obj, Evas_Object *above) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); int ret; if (!obj->interceptors) return 0; @@ -159,7 +159,7 @@ evas_object_intercept_call_stack_above(Evas_Object *eo_obj, Evas_Object *above) int evas_object_intercept_call_stack_below(Evas_Object *eo_obj, Evas_Object *below) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); int ret; if (!obj->interceptors) return 0; @@ -175,7 +175,7 @@ evas_object_intercept_call_stack_below(Evas_Object *eo_obj, Evas_Object *below) int evas_object_intercept_call_layer_set(Evas_Object *eo_obj, int l) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); int ret; if (!obj->interceptors) return 0; @@ -191,7 +191,7 @@ evas_object_intercept_call_layer_set(Evas_Object *eo_obj, int l) int evas_object_intercept_call_color_set(Evas_Object *eo_obj, int r, int g, int b, int a) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); int ret; if (!obj->interceptors) return 0; @@ -222,7 +222,7 @@ evas_object_intercept_call_clip_set(Evas_Object *eo_obj, Evas_Object_Protected_D int evas_object_intercept_call_clip_unset(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); int ret; if (!obj->interceptors) return 0; @@ -243,7 +243,7 @@ evas_object_intercept_show_callback_add(Evas_Object *eo_obj, Evas_Object_Interce MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!func) return; evas_object_intercept_init(eo_obj); if (!obj->interceptors) return; @@ -259,7 +259,7 @@ evas_object_intercept_show_callback_del(Evas_Object *eo_obj, Evas_Object_Interce MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->show.func = NULL; @@ -275,7 +275,7 @@ evas_object_intercept_hide_callback_add(Evas_Object *eo_obj, Evas_Object_Interce MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!func) return; evas_object_intercept_init(eo_obj); if (!obj->interceptors) return; @@ -286,7 +286,7 @@ evas_object_intercept_hide_callback_add(Evas_Object *eo_obj, Evas_Object_Interce EAPI void * evas_object_intercept_hide_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Hide_Cb func) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); void *data; MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); @@ -307,7 +307,7 @@ evas_object_intercept_move_callback_add(Evas_Object *eo_obj, Evas_Object_Interce MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!func) return; evas_object_intercept_init(eo_obj); if (!obj->interceptors) return; @@ -318,7 +318,7 @@ evas_object_intercept_move_callback_add(Evas_Object *eo_obj, Evas_Object_Interce EAPI void * evas_object_intercept_move_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Move_Cb func) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); void *data; MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); @@ -339,7 +339,7 @@ evas_object_intercept_resize_callback_add(Evas_Object *eo_obj, Evas_Object_Inter MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!func) return; evas_object_intercept_init(eo_obj); if (!obj->interceptors) return; @@ -350,7 +350,7 @@ evas_object_intercept_resize_callback_add(Evas_Object *eo_obj, Evas_Object_Inter EAPI void * evas_object_intercept_resize_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Resize_Cb func) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); void *data; MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); @@ -371,7 +371,7 @@ evas_object_intercept_raise_callback_add(Evas_Object *eo_obj, Evas_Object_Interc MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!func) return; evas_object_intercept_init(eo_obj); if (!obj->interceptors) return; @@ -382,7 +382,7 @@ evas_object_intercept_raise_callback_add(Evas_Object *eo_obj, Evas_Object_Interc EAPI void * evas_object_intercept_raise_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Raise_Cb func) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); void *data; MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); @@ -403,7 +403,7 @@ evas_object_intercept_lower_callback_add(Evas_Object *eo_obj, Evas_Object_Interc MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!func) return; evas_object_intercept_init(eo_obj); if (!obj->interceptors) return; @@ -414,7 +414,7 @@ evas_object_intercept_lower_callback_add(Evas_Object *eo_obj, Evas_Object_Interc EAPI void * evas_object_intercept_lower_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Lower_Cb func) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); void *data; MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); @@ -435,7 +435,7 @@ evas_object_intercept_stack_above_callback_add(Evas_Object *eo_obj, Evas_Object_ MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!func) return; evas_object_intercept_init(eo_obj); if (!obj->interceptors) return; @@ -446,7 +446,7 @@ evas_object_intercept_stack_above_callback_add(Evas_Object *eo_obj, Evas_Object_ EAPI void * evas_object_intercept_stack_above_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Stack_Above_Cb func) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); void *data; MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); @@ -467,7 +467,7 @@ evas_object_intercept_stack_below_callback_add(Evas_Object *eo_obj, Evas_Object_ MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!func) return; evas_object_intercept_init(eo_obj); if (!obj->interceptors) return; @@ -478,7 +478,7 @@ evas_object_intercept_stack_below_callback_add(Evas_Object *eo_obj, Evas_Object_ EAPI void * evas_object_intercept_stack_below_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Stack_Below_Cb func) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); void *data; MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); @@ -499,7 +499,7 @@ evas_object_intercept_layer_set_callback_add(Evas_Object *eo_obj, Evas_Object_In MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!func) return; evas_object_intercept_init(eo_obj); if (!obj->interceptors) return; @@ -510,7 +510,7 @@ evas_object_intercept_layer_set_callback_add(Evas_Object *eo_obj, Evas_Object_In EAPI void * evas_object_intercept_layer_set_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Layer_Set_Cb func) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); void *data; MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); @@ -531,7 +531,7 @@ evas_object_intercept_color_set_callback_add(Evas_Object *eo_obj, Evas_Object_In MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!func) return; evas_object_intercept_init(eo_obj); if (!obj->interceptors) return; @@ -542,7 +542,7 @@ evas_object_intercept_color_set_callback_add(Evas_Object *eo_obj, Evas_Object_In EAPI void * evas_object_intercept_color_set_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Color_Set_Cb func) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); void *data; MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); @@ -563,7 +563,7 @@ evas_object_intercept_clip_set_callback_add(Evas_Object *eo_obj, Evas_Object_Int MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!func) return; evas_object_intercept_init(eo_obj); if (!obj->interceptors) return; @@ -574,7 +574,7 @@ evas_object_intercept_clip_set_callback_add(Evas_Object *eo_obj, Evas_Object_Int EAPI void * evas_object_intercept_clip_set_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Clip_Set_Cb func) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); void *data; MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); @@ -595,7 +595,7 @@ evas_object_intercept_clip_unset_callback_add(Evas_Object *eo_obj, Evas_Object_I MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!func) return; evas_object_intercept_init(eo_obj); if (!obj->interceptors) return; @@ -606,7 +606,7 @@ evas_object_intercept_clip_unset_callback_add(Evas_Object *eo_obj, Evas_Object_I EAPI void * evas_object_intercept_clip_unset_callback_del(Evas_Object *eo_obj, Evas_Object_Intercept_Clip_Unset_Cb func) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); void *data; MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); diff --git a/src/lib/evas/canvas/evas_object_line.c b/src/lib/evas/canvas/evas_object_line.c index 95c3e0971c..10cf3661dc 100644 --- a/src/lib/evas/canvas/evas_object_line.c +++ b/src/lib/evas/canvas/evas_object_line.c @@ -109,7 +109,7 @@ _line_xy_set(Eo *eo_obj, void *_pd, va_list *list) if ((x1 == o->cur.x1) && (y1 == o->cur.y1) && (x2 == o->cur.x2) && (y2 == o->cur.y2)) return; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!(obj->layer->evas->is_frozen)) { if (!evas_event_passes_through(eo_obj, obj) && @@ -203,7 +203,7 @@ _line_xy_get(Eo *eo_obj, void *_pd, va_list *list) Evas_Coord *x2 = va_arg(*list, Evas_Coord *); Evas_Coord *y2 = va_arg(*list, Evas_Coord *); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (x1) *x1 = obj->cur->geometry.x + o->cur.x1; if (y1) *y1 = obj->cur->geometry.y + o->cur.y1; if (x2) *x2 = obj->cur->geometry.x + o->cur.x2; @@ -214,7 +214,7 @@ _line_xy_get(Eo *eo_obj, void *_pd, va_list *list) static void evas_object_line_init(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); /* set up methods (compulsory) */ obj->func = &object_func; obj->type = o_type; @@ -225,7 +225,7 @@ _constructor(Eo *eo_obj, void *class_data, va_list *list EINA_UNUSED) { eo_do_super(eo_obj, MY_CLASS, eo_constructor()); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_line_init(eo_obj); evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); @@ -247,7 +247,7 @@ _destructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) static void evas_object_line_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) { - Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Line *o = eo_data_scope_get(eo_obj, MY_CLASS); /* render object to surface with context, and offxet by x,y */ @@ -276,7 +276,7 @@ evas_object_line_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, vo static void evas_object_line_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Line *o = eo_data_scope_get(eo_obj, MY_CLASS); int is_v, was_v; Eina_Bool changed_color = EINA_FALSE; @@ -360,7 +360,7 @@ evas_object_line_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj static void evas_object_line_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj EINA_UNUSED) { - Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Line *o = eo_data_scope_get(eo_obj, MY_CLASS); /* this moves the current data to the previous state parts of the object */ /* in whatever way is safest for the object. also if we don't need object */ @@ -374,21 +374,21 @@ evas_object_line_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *ob static unsigned int evas_object_line_id_get(Evas_Object *eo_obj) { - Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Line *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_LINE; } static unsigned int evas_object_line_visual_id_get(Evas_Object *eo_obj) { - Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Line *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_SHAPE; } static void *evas_object_line_engine_data_get(Evas_Object *eo_obj) { - Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Line *o = eo_data_scope_get(eo_obj, MY_CLASS); return o->engine_data; } @@ -429,7 +429,7 @@ evas_object_line_was_inside(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protect static void evas_object_line_coords_recalc(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Line *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Line *o = eo_data_scope_get(eo_obj, MY_CLASS); o->cur.cache.x1 = obj->cur->geometry.x + o->cur.x1; o->cur.cache.y1 = obj->cur->geometry.y + o->cur.y1; diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index e51e9347cb..1ee41bb995 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -91,7 +91,7 @@ _constructor(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) void evas_object_change_reset(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); if (!obj) return; obj->changed = EINA_FALSE; obj->changed_move = EINA_FALSE; @@ -104,7 +104,7 @@ evas_object_change_reset(Evas_Object *eo_obj) void evas_object_cur_prev(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); if (!obj) return; if (!obj->map->prev.valid_map && obj->map->prev.map) { @@ -140,7 +140,7 @@ evas_object_cur_prev(Evas_Object *eo_obj) void evas_object_free(Evas_Object *eo_obj, int clean_layer) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); if (!obj) return; obj->clean_layer = clean_layer; @@ -228,14 +228,14 @@ evas_object_change(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) } EINA_LIST_FOREACH(obj->proxy->proxies, l, eo_obj2) { - obj2 = eo_data_get(eo_obj2, MY_CLASS); + obj2 = eo_data_scope_get(eo_obj2, MY_CLASS); if (!obj2) continue; evas_object_change(eo_obj2, obj2); } if (obj->smart.parent) { - Evas_Object_Protected_Data *smart_parent = eo_data_get(obj->smart.parent, MY_CLASS); + Evas_Object_Protected_Data *smart_parent = eo_data_scope_get(obj->smart.parent, MY_CLASS); if (!smart_parent) return; evas_object_change(obj->smart.parent, smart_parent); } @@ -264,7 +264,7 @@ evas_object_content_change(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *eo_obj, int is_v, int was_v) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); if (!obj) return; if (obj->is_smart) return; @@ -290,7 +290,7 @@ evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *eo_obj, in void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); if (!obj) return; if (obj->is_smart) return; @@ -382,7 +382,7 @@ evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *eo_obj EINA_ void evas_object_clip_changes_clean(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); if (!obj) return; Eina_Rectangle *r; @@ -394,7 +394,7 @@ evas_object_clip_changes_clean(Evas_Object *eo_obj) void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *eo_obj, int is_v, int was_v EINA_UNUSED) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); Eina_Rectangle *r; Eina_List *l; unsigned int i; @@ -551,7 +551,7 @@ evas_object_ref(Evas_Object *eo_obj) eo_ref(eo_obj); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); if (!obj) return; obj->ref++; } @@ -563,7 +563,7 @@ evas_object_unref(Evas_Object *eo_obj) return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); if (!obj) return; if (obj->ref == 0) return; @@ -580,7 +580,7 @@ evas_object_ref_get(const Evas_Object *eo_obj) return 0; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); if (!obj) return 0; return obj->ref; } @@ -593,7 +593,7 @@ evas_object_del(Evas_Object *eo_obj) return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); if (!obj) return; if (obj->delete_me || obj->eo_del_called) return; @@ -910,7 +910,7 @@ evas_object_size_hint_display_mode_get(const Evas_Object *eo_obj) MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return EVAS_DISPLAY_MODE_NONE; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); if (!obj) return EVAS_DISPLAY_MODE_NONE; if ((!obj->size_hints) || obj->delete_me) return EVAS_DISPLAY_MODE_NONE; @@ -923,7 +923,7 @@ evas_object_size_hint_display_mode_set(Evas_Object *eo_obj, Evas_Display_Mode di MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS); if (!obj) return; if (obj->delete_me) return; _evas_object_size_hint_alloc(eo_obj, obj); @@ -2005,7 +2005,7 @@ _canvas_object_top_at_xy_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list) EAPI Evas_Object * evas_object_top_at_pointer_get(const Evas *eo_e) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Object *ret = NULL; if (!e) return NULL; eo_do((Eo *)eo_e, evas_canvas_object_top_at_xy_get(e->pointer.x, e->pointer.y, EINA_TRUE, @@ -2361,7 +2361,7 @@ _is_frame_object_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) static void _smart_parent_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj) return; Evas_Object **smart_parent = va_arg(*list, Evas_Object **); if (smart_parent) *smart_parent = obj->smart.parent; diff --git a/src/lib/evas/canvas/evas_object_polygon.c b/src/lib/evas/canvas/evas_object_polygon.c index 4b21c088d2..ad4f9b290c 100644 --- a/src/lib/evas/canvas/evas_object_polygon.c +++ b/src/lib/evas/canvas/evas_object_polygon.c @@ -91,7 +91,7 @@ _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED { eo_do_super(eo_obj, MY_CLASS, eo_constructor()); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_polygon_init(eo_obj); evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); } @@ -108,7 +108,7 @@ evas_object_polygon_point_add(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y) static void _polygon_point_add(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Polygon *o = _pd; Evas_Polygon_Point *p; Evas_Coord min_x, max_x, min_y, max_y; @@ -226,7 +226,7 @@ evas_object_polygon_points_clear(Evas_Object *eo_obj) static void _polygon_points_clear(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Polygon *o = _pd; void *list_data; int is, was; @@ -270,7 +270,7 @@ _polygon_points_clear(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) static void evas_object_polygon_init(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); /* set up methods (compulsory) */ obj->func = &object_func; obj->type = o_type; @@ -279,7 +279,7 @@ evas_object_polygon_init(Evas_Object *eo_obj) static void _destructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_polygon_free(eo_obj, obj); eo_do_super(eo_obj, MY_CLASS, eo_destructor()); } @@ -287,7 +287,7 @@ _destructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) static void evas_object_polygon_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Polygon *o = eo_data_scope_get(eo_obj, MY_CLASS); void *list_data; /* free obj */ EINA_LIST_FREE(o->points, list_data) @@ -302,7 +302,7 @@ evas_object_polygon_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) static void evas_object_polygon_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) { - Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Polygon *o = eo_data_scope_get(eo_obj, MY_CLASS); Eina_List *l; Evas_Polygon_Point *p; @@ -345,7 +345,7 @@ evas_object_polygon_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, static void evas_object_polygon_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Polygon *o = eo_data_scope_get(eo_obj, MY_CLASS); int is_v, was_v; /* dont pre-render the obj twice! */ @@ -446,21 +446,21 @@ evas_object_polygon_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data static unsigned int evas_object_polygon_id_get(Evas_Object *eo_obj) { - Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Polygon *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_POLYGON; } static unsigned int evas_object_polygon_visual_id_get(Evas_Object *eo_obj) { - Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Polygon *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_SHAPE; } static void *evas_object_polygon_engine_data_get(Evas_Object *eo_obj) { - Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Polygon *o = eo_data_scope_get(eo_obj, MY_CLASS); return o->engine_data; } @@ -486,7 +486,7 @@ evas_object_polygon_was_opaque(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Prot static int evas_object_polygon_is_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj EINA_UNUSED, Evas_Coord x, Evas_Coord y) { - Evas_Object_Polygon *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Polygon *o = eo_data_scope_get(eo_obj, MY_CLASS); int num_edges = 0; /* Number of edges we crossed */ Eina_List *itr; Evas_Polygon_Point *p; diff --git a/src/lib/evas/canvas/evas_object_rectangle.c b/src/lib/evas/canvas/evas_object_rectangle.c index 1b97ef9b45..6c35155ae1 100644 --- a/src/lib/evas/canvas/evas_object_rectangle.c +++ b/src/lib/evas/canvas/evas_object_rectangle.c @@ -87,7 +87,7 @@ _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED { eo_do_super(eo_obj, MY_CLASS, eo_constructor()); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_rectangle_init(eo_obj); evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); } @@ -96,7 +96,7 @@ _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED static void evas_object_rectangle_init(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); /* set up methods (compulsory) */ obj->func = &object_func; obj->type = o_type; @@ -280,21 +280,21 @@ evas_object_rectangle_was_opaque(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Pr static unsigned int evas_object_rectangle_id_get(Evas_Object *eo_obj) { - Evas_Object_Rectangle *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Rectangle *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_RECTANGLE; } static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *eo_obj) { - Evas_Object_Rectangle *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Rectangle *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_SHAPE; } static void *evas_object_rectangle_engine_data_get(Evas_Object *eo_obj) { - Evas_Object_Rectangle *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Rectangle *o = eo_data_scope_get(eo_obj, MY_CLASS); return o->engine_data; } diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 737e8a1127..c6800bac1c 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -108,7 +108,9 @@ _smart_data_set(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list) { void *data = va_arg(*list, void *); Evas_Object_Smart *o = _pd; + if (o->data) eo_data_unref(eo_obj, o->data); o->data = data; + eo_data_ref(eo_obj, NULL); } EAPI void * @@ -174,7 +176,7 @@ evas_object_smart_interface_data_get(const Evas_Object *eo_obj, return NULL; MAGIC_CHECK_END(); - obj = eo_data_get(eo_obj, MY_CLASS); + obj = eo_data_scope_get(eo_obj, MY_CLASS); s = evas_object_smart_smart_get(eo_obj); if (!s) return NULL; @@ -204,7 +206,7 @@ evas_object_smart_smart_get(const Evas_Object *eo_obj) static void _smart_smart_get(Eo *eo_obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Smart **smart = va_arg(*list, Evas_Smart **); if (smart) *smart = obj->smart.smart; } @@ -223,8 +225,8 @@ _smart_member_add(Eo *smart_obj, void *_pd, va_list *list) { Evas_Object *eo_obj = va_arg(*list, Evas_Object *); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Protected_Data *smart = eo_data_get(smart_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *smart = eo_data_scope_get(smart_obj, EVAS_OBJ_CLASS); Evas_Object_Smart *o = _pd; if (obj->delete_me) @@ -269,6 +271,7 @@ _smart_member_add(Eo *smart_obj, void *_pd, va_list *list) obj->layer->usage++; obj->smart.parent = smart_obj; o->contained = eina_inlist_append(o->contained, EINA_INLIST_GET(obj)); + eo_data_ref(eo_obj, NULL); evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_TRUE, EINA_TRUE); obj->restack = 1; @@ -285,7 +288,7 @@ evas_object_smart_member_del(Evas_Object *eo_obj) MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj) return; if (!obj->smart.parent) return; Evas_Object *smart_obj = obj->smart.parent; @@ -297,16 +300,17 @@ static void _smart_member_del(Eo *smart_obj, void *_pd EINA_UNUSED, va_list *list) { Evas_Object *eo_obj = va_arg(*list, Evas_Object *); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj->smart.parent) return; - Evas_Object_Protected_Data *smart = eo_data_get(smart_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *smart = eo_data_scope_get(smart_obj, EVAS_OBJ_CLASS); if (smart->smart.smart && smart->smart.smart->smart_class->member_del) smart->smart.smart->smart_class->member_del(smart_obj, eo_obj); - Evas_Object_Smart *o = eo_data_get(smart_obj, MY_CLASS); + Evas_Object_Smart *o = eo_data_scope_get(smart_obj, MY_CLASS); o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(obj)); + eo_data_unref(eo_obj, obj); o->member_count--; obj->smart.parent = NULL; evas_object_smart_member_cache_invalidate(eo_obj, EINA_TRUE, EINA_TRUE, EINA_TRUE); @@ -356,7 +360,7 @@ _smart_type_check(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) const Evas_Smart_Class *sc; Eo_Class *klass; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj) return; klass = eina_hash_find(_evas_smart_class_names_hash_table, type); @@ -401,7 +405,7 @@ _smart_type_check_ptr(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) Eina_Bool *type_check = va_arg(*list, Eina_Bool *); *type_check = EINA_FALSE; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!obj) return; klass = eina_hash_find(_evas_smart_class_names_hash_table, type); @@ -467,14 +471,14 @@ evas_object_smart_members_get_direct(const Evas_Object *eo_obj) return NULL; MAGIC_CHECK_END(); if (!eo_isa(eo_obj, MY_CLASS)) return NULL; - Evas_Object_Smart *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Smart *o = eo_data_scope_get(eo_obj, MY_CLASS); return o->contained; } void _evas_object_smart_members_all_del(Evas_Object *eo_obj) { - Evas_Object_Smart *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Smart *o = eo_data_scope_get(eo_obj, MY_CLASS); Evas_Object_Protected_Data *memobj; Eina_Inlist *itrn; EINA_INLIST_FOREACH_SAFE(o->contained, itrn, memobj) @@ -517,7 +521,7 @@ _evas_smart_class_ifaces_private_data_alloc(Evas_Object *eo_obj, } } - obj = eo_data_get(eo_obj, MY_CLASS); + obj = eo_data_scope_get(eo_obj, MY_CLASS); obj->interface_privates = malloc(s->interfaces.size * sizeof(void *) + total_priv_sz); if (!obj->interface_privates) { @@ -573,7 +577,7 @@ _constructor(Eo *eo_obj, void *class_data, va_list *list EINA_UNUSED) eo_do_super(eo_obj, MY_CLASS, eo_constructor()); evas_object_smart_init(eo_obj); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); eo_do(eo_obj, evas_obj_type_set(MY_CLASS_NAME), @@ -585,7 +589,7 @@ _smart_add(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) { // If this function is reached, so we do nothing except trying to call // the function of the legacy smart class. - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Smart *s = obj->smart.smart; if (s && s->smart_class->add) s->smart_class->add(eo_obj); } @@ -602,7 +606,7 @@ _smart_resize(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) Evas_Coord h = va_arg(*list, Evas_Coord); // If this function is reached, so we do nothing except trying to call // the function of the legacy smart class. - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Smart *s = obj->smart.smart; if (s && s->smart_class->resize) s->smart_class->resize(eo_obj, w, h); } @@ -614,7 +618,7 @@ _smart_move(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) Evas_Coord y = va_arg(*list, Evas_Coord); // If this function is reached, so we do nothing except trying to call // the function of the legacy smart class. - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Smart *s = obj->smart.smart; if (s && s->smart_class->move) s->smart_class->move(eo_obj, x, y); } @@ -624,7 +628,7 @@ _smart_show(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) { // If this function is reached, so we do nothing except trying to call // the function of the legacy smart class. - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Smart *s = obj->smart.smart; if (s && s->smart_class->show) s->smart_class->show(eo_obj); } @@ -634,7 +638,7 @@ _smart_hide(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) { // If this function is reached, so we do nothing except trying to call // the function of the legacy smart class. - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Smart *s = obj->smart.smart; if (s && s->smart_class->hide) s->smart_class->hide(eo_obj); } @@ -648,7 +652,7 @@ _smart_color_set(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) int a = va_arg(*list, int); // If this function is reached, so we do nothing except trying to call // the function of the legacy smart class. - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Smart *s = obj->smart.smart; if (s && s->smart_class->color_set) s->smart_class->color_set(eo_obj, r, g, b, a); } @@ -659,7 +663,7 @@ _smart_clip_set(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) Evas_Object *clip = va_arg(*list, Evas_Object *); // If this function is reached, so we do nothing except trying to call // the function of the legacy smart class. - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Smart *s = obj->smart.smart; if (s && s->smart_class->clip_set) s->smart_class->clip_set(eo_obj, clip); } @@ -669,7 +673,7 @@ _smart_clip_unset(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) { // If this function is reached, so we do nothing except trying to call // the function of the legacy smart class. - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Smart *s = obj->smart.smart; if (s && s->smart_class->clip_unset) s->smart_class->clip_unset(eo_obj); } @@ -682,7 +686,7 @@ _smart_attach(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) return; MAGIC_CHECK_END(); unsigned int i; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); obj->smart.smart = s; obj->type = s->smart_class->name; evas_object_smart_use(s); @@ -736,7 +740,7 @@ evas_object_smart_callback_priority_add(Evas_Object *eo_obj, const char *event, MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - o = eo_data_get(eo_obj, MY_CLASS); + o = eo_data_scope_get(eo_obj, MY_CLASS); if (!event) return; if (!func) return; EVAS_MEMPOOL_INIT(_mp_cb, "evas_smart_callback", Evas_Smart_Callback, 32, ); @@ -761,7 +765,7 @@ evas_object_smart_callback_del(Evas_Object *eo_obj, const char *event, Evas_Smar MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); - o = eo_data_get(eo_obj, MY_CLASS); + o = eo_data_scope_get(eo_obj, MY_CLASS); if (!event) return NULL; EINA_LIST_FOREACH(o->callbacks, l, cb) @@ -791,7 +795,7 @@ evas_object_smart_callback_del_full(Evas_Object *eo_obj, const char *event, Evas MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); - o = eo_data_get(eo_obj, MY_CLASS); + o = eo_data_scope_get(eo_obj, MY_CLASS); if (!event) return NULL; EINA_LIST_FOREACH(o->callbacks, l, cb) { @@ -821,8 +825,8 @@ evas_object_smart_callback_call(Evas_Object *eo_obj, const char *event, void *ev MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - o = eo_data_get(eo_obj, MY_CLASS); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + o = eo_data_scope_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!event) return; if (obj->delete_me) return; @@ -912,7 +916,7 @@ _smart_callbacks_descriptions_get(Eo *eo_obj, void *_pd, va_list *list) if (class_descriptions) *class_descriptions = NULL; if (class_count) *class_count = 0; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (obj->smart.smart && class_descriptions) *class_descriptions = obj->smart.smart->callbacks.array; if (obj->smart.smart && class_count) @@ -949,7 +953,7 @@ _smart_callback_description_find(Eo *eo_obj, void *_pd, va_list *list) return; } - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); const Evas_Object_Smart *o = _pd; if (class_description) *class_description = evas_smart_cb_description_find @@ -974,7 +978,7 @@ _smart_need_recalculate_set(Eo *eo_obj, void *_pd, va_list *list) { Eina_Bool value = va_arg(*list, int); Evas_Object_Smart *o = _pd; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); // XXX: do i need this? if (obj->delete_me) return; @@ -1031,7 +1035,7 @@ evas_object_smart_calculate(Evas_Object *eo_obj) static void _smart_calculate(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Smart *o = _pd; if (!obj->smart.smart || !obj->smart.smart->smart_class->calculate) @@ -1082,7 +1086,7 @@ evas_call_smarts_calculate(Evas *eo_e) { Evas_Object_Smart *o; Eina_Clist *elem; - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); // printf("+CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALC-----------v\n"); evas_event_freeze(eo_e); @@ -1095,7 +1099,7 @@ evas_call_smarts_calculate(Evas *eo_e) /* move the item to the processed list */ o = EINA_CLIST_ENTRY(elem, Evas_Object_Smart, calc_entry); eina_clist_remove(&o->calc_entry); - obj = eo_data_get(o->object, EVAS_OBJ_CLASS); + obj = eo_data_scope_get(o->object, EVAS_OBJ_CLASS); if (obj->delete_me) continue; eina_clist_add_tail(&e->calc_done, &o->calc_entry); @@ -1135,7 +1139,7 @@ evas_object_smart_changed(Evas_Object *eo_obj) static void _smart_changed(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); eo_do(eo_obj, evas_obj_smart_need_recalculate_set(1)); } @@ -1148,7 +1152,7 @@ evas_object_smart_callbacks_clear(Evas_Object *eo_obj) Eina_List *l; Evas_Smart_Callback *cb; - o = eo_data_get(eo_obj, MY_CLASS); + o = eo_data_scope_get(eo_obj, MY_CLASS); if (o->walking_list) return; if (!o->deletions_waiting) return; @@ -1169,7 +1173,7 @@ evas_object_smart_callbacks_clear(Evas_Object *eo_obj) void evas_object_smart_del(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Smart *sobj; Evas_Smart *s; unsigned int i; @@ -1193,7 +1197,7 @@ evas_object_smart_del(Evas_Object *eo_obj) } } - sobj = eo_data_get(eo_obj, MY_CLASS); + sobj = eo_data_scope_get(eo_obj, MY_CLASS); free(sobj->interface_privates); sobj->interface_privates = NULL; @@ -1219,7 +1223,7 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data if (obj->is_smart) { - s = eo_data_get(eo_obj, MY_CLASS); + s = eo_data_scope_get(eo_obj, MY_CLASS); x = s->cur.bounding_box.x; y = s->cur.bounding_box.y; @@ -1245,8 +1249,8 @@ evas_object_update_bounding_box(Evas_Object *eo_obj, Evas_Object_Protected_Data /* We are not yet trying to find the smallest bounding box, but we want to find a good approximation quickly. * That's why we initialiaze min and max search to geometry of the parent object. */ - Evas_Object_Protected_Data *smart_obj = eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS); - Evas_Object_Smart *smart_parent = eo_data_get(obj->smart.parent, MY_CLASS); + Evas_Object_Protected_Data *smart_obj = eo_data_scope_get(obj->smart.parent, EVAS_OBJ_CLASS); + Evas_Object_Smart *smart_parent = eo_data_scope_get(obj->smart.parent, MY_CLASS); if (!smart_parent || !smart_obj) return; if (smart_obj->cur->valid_bounding_box) @@ -1340,7 +1344,7 @@ evas_object_smart_bounding_box_get(Evas_Object *eo_obj, Evas_Coord_Rectangle *cur_bounding_box, Evas_Coord_Rectangle *prev_bounding_box) { - Evas_Object_Smart *s = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Smart *s = eo_data_scope_get(eo_obj, MY_CLASS); if (cur_bounding_box) memcpy(cur_bounding_box, &s->cur.bounding_box, @@ -1353,14 +1357,14 @@ evas_object_smart_bounding_box_get(Evas_Object *eo_obj, void evas_object_smart_cleanup(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (obj->smart.parent) evas_object_smart_member_del(eo_obj); if (obj->is_smart) { - Evas_Object_Smart *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Smart *o = eo_data_scope_get(eo_obj, MY_CLASS); if (o->calc_entry.next) eina_clist_remove(&o->calc_entry); @@ -1380,7 +1384,7 @@ evas_object_smart_cleanup(Evas_Object *eo_obj) } evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0); - o->data = NULL; + eo_do(eo_obj, evas_obj_smart_data_set(NULL)); } obj->smart.parent = NULL; @@ -1397,7 +1401,7 @@ evas_object_smart_member_cache_invalidate(Evas_Object *eo_obj, return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Protected_Data *member; if (pass_events) @@ -1408,7 +1412,7 @@ evas_object_smart_member_cache_invalidate(Evas_Object *eo_obj, obj->parent_cache.src_invisible_valid = EINA_FALSE; if (!obj->is_smart) return; - Evas_Object_Smart *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Smart *o = eo_data_scope_get(eo_obj, MY_CLASS); EINA_INLIST_FOREACH(o->contained, member) { Evas_Object *eo_member = member->object; @@ -1422,8 +1426,8 @@ void evas_object_smart_member_raise(Evas_Object *eo_member) { Evas_Object_Smart *o; - Evas_Object_Protected_Data *member = eo_data_get(eo_member, EVAS_OBJ_CLASS); - o = eo_data_get(member->smart.parent, MY_CLASS); + Evas_Object_Protected_Data *member = eo_data_scope_get(eo_member, EVAS_OBJ_CLASS); + o = eo_data_scope_get(member->smart.parent, MY_CLASS); o->contained = eina_inlist_demote(o->contained, EINA_INLIST_GET(member)); } @@ -1431,8 +1435,8 @@ void evas_object_smart_member_lower(Evas_Object *eo_member) { Evas_Object_Smart *o; - Evas_Object_Protected_Data *member = eo_data_get(eo_member, EVAS_OBJ_CLASS); - o = eo_data_get(member->smart.parent, MY_CLASS); + Evas_Object_Protected_Data *member = eo_data_scope_get(eo_member, EVAS_OBJ_CLASS); + o = eo_data_scope_get(member->smart.parent, MY_CLASS); o->contained = eina_inlist_promote(o->contained, EINA_INLIST_GET(member)); } @@ -1440,9 +1444,9 @@ void evas_object_smart_member_stack_above(Evas_Object *eo_member, Evas_Object *eo_other) { Evas_Object_Smart *o; - Evas_Object_Protected_Data *member = eo_data_get(eo_member, EVAS_OBJ_CLASS); - Evas_Object_Protected_Data *other = eo_data_get(eo_other, EVAS_OBJ_CLASS); - o = eo_data_get(member->smart.parent, MY_CLASS); + Evas_Object_Protected_Data *member = eo_data_scope_get(eo_member, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *other = eo_data_scope_get(eo_other, EVAS_OBJ_CLASS); + o = eo_data_scope_get(member->smart.parent, MY_CLASS); o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(member)); o->contained = eina_inlist_append_relative(o->contained, EINA_INLIST_GET(member), EINA_INLIST_GET(other)); } @@ -1451,9 +1455,9 @@ void evas_object_smart_member_stack_below(Evas_Object *eo_member, Evas_Object *eo_other) { Evas_Object_Smart *o; - Evas_Object_Protected_Data *member = eo_data_get(eo_member, EVAS_OBJ_CLASS); - Evas_Object_Protected_Data *other = eo_data_get(eo_other, EVAS_OBJ_CLASS); - o = eo_data_get(member->smart.parent, MY_CLASS); + Evas_Object_Protected_Data *member = eo_data_scope_get(eo_member, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *other = eo_data_scope_get(eo_other, EVAS_OBJ_CLASS); + o = eo_data_scope_get(member->smart.parent, MY_CLASS); o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(member)); o->contained = eina_inlist_prepend_relative(o->contained, EINA_INLIST_GET(member), EINA_INLIST_GET(other)); } @@ -1464,8 +1468,8 @@ evas_object_smart_need_bounding_box_update(Evas_Object *eo_obj) MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Smart *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Smart *o = eo_data_scope_get(eo_obj, MY_CLASS); if (o->update_boundingbox_needed) return ; o->update_boundingbox_needed = EINA_TRUE; @@ -1488,7 +1492,7 @@ evas_object_smart_bounding_box_update(Evas_Object *eo_obj, Evas_Object_Protected return; MAGIC_CHECK_END(); - os = eo_data_get(eo_obj, MY_CLASS); + os = eo_data_scope_get(eo_obj, MY_CLASS); if (!os->update_boundingbox_needed) return ; os->update_boundingbox_needed = EINA_FALSE; @@ -1509,7 +1513,7 @@ evas_object_smart_bounding_box_update(Evas_Object *eo_obj, Evas_Object_Protected if (o->is_smart) { - Evas_Object_Smart *s = eo_data_get(o->object, MY_CLASS); + Evas_Object_Smart *s = eo_data_scope_get(o->object, MY_CLASS); evas_object_smart_bounding_box_update(o->object, o); @@ -1559,7 +1563,7 @@ evas_object_smart_bounding_box_update(Evas_Object *eo_obj, Evas_Object_Protected static void evas_object_smart_init(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); obj->is_smart = EINA_TRUE; /* set up methods (compulsory) */ obj->func = &object_func; @@ -1658,28 +1662,28 @@ evas_object_smart_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *ob static void evas_object_smart_render_post(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED) { - Evas_Object_Smart *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Smart *o = eo_data_scope_get(eo_obj, MY_CLASS); evas_object_cur_prev(eo_obj); o->prev = o->cur; } static unsigned int evas_object_smart_id_get(Evas_Object *eo_obj) { - Evas_Object_Smart *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Smart *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_SMART; } static unsigned int evas_object_smart_visual_id_get(Evas_Object *eo_obj) { - Evas_Object_Smart *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Smart *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_CONTAINER; } static void *evas_object_smart_engine_data_get(Evas_Object *eo_obj) { - Evas_Object_Smart *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Smart *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return NULL; return o->engine_data; } diff --git a/src/lib/evas/canvas/evas_object_smart_clipped.c b/src/lib/evas/canvas/evas_object_smart_clipped.c index d0a737242f..1656dc01ad 100644 --- a/src/lib/evas/canvas/evas_object_smart_clipped.c +++ b/src/lib/evas/canvas/evas_object_smart_clipped.c @@ -7,7 +7,7 @@ EAPI Eo_Op EVAS_OBJ_SMART_CLIPPED_BASE_ID = EO_NOOP; #define CSO_DATA_GET(eo_obj, ptr) \ Evas_Object_Smart_Clipped_Data *ptr = (eo_isa(eo_obj, MY_CLASS) ? \ - eo_data_get(eo_obj, MY_CLASS) : \ + eo_data_scope_get(eo_obj, MY_CLASS) : \ evas_object_smart_data_get(eo_obj)); #define CSO_DATA_GET_OR_RETURN(eo_obj, ptr) \ diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c index fcc0c95595..1d582d8894 100644 --- a/src/lib/evas/canvas/evas_object_table.c +++ b/src/lib/evas/canvas/evas_object_table.c @@ -97,7 +97,7 @@ struct _Evas_Object_Table_Accessor }; #define EVAS_OBJECT_TABLE_DATA_GET(o, ptr) \ - Evas_Object_Table_Data *ptr = eo_data_get(o, MY_CLASS) + Evas_Object_Table_Data *ptr = eo_data_scope_get(o, MY_CLASS) #define EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, ptr) \ EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \ diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c index 13646ed10b..fc2965b595 100644 --- a/src/lib/evas/canvas/evas_object_text.c +++ b/src/lib/evas/canvas/evas_object_text.c @@ -121,7 +121,7 @@ _evas_object_text_char_coords_get(const Evas_Object *eo_obj, const Evas_Object_Text *o, size_t pos, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Text_Item *it; EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) @@ -234,7 +234,7 @@ static int _evas_object_text_last_up_to_pos(const Evas_Object *eo_obj, const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Text_Item *it; #ifdef BIDI_SUPPORT @@ -289,7 +289,7 @@ _evas_object_text_char_at_coords(const Evas_Object *eo_obj, const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy, Evas_Coord *rx, Evas_Coord *ry, Evas_Coord *rw, Evas_Coord *rh) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Text_Item *it; EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) @@ -348,7 +348,7 @@ _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED { eo_do_super(eo_obj, MY_CLASS, eo_constructor()); evas_object_text_init(eo_obj); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); } @@ -445,7 +445,7 @@ _text_font_set(Eo *eo_obj, void *_pd, va_list *list) eina_stringshare_replace(&o->cur.font, font); o->prev.font = NULL; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (!(obj->layer->evas->is_frozen)) { pass = evas_event_passes_through(eo_obj, obj); @@ -684,7 +684,7 @@ _layout_text_item_trim(Evas_Object_Protected_Data *obj, Evas_Object_Text *o, Eva static void _evas_object_text_layout(Evas_Object *eo_obj, Evas_Object_Text *o, Eina_Unicode *text) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); EvasBiDiStrIndex *v_to_l = NULL; Evas_Coord advance = 0; size_t pos, visual_pos; @@ -925,7 +925,7 @@ _text_resize(void *data, static void _text_ellipsis_set(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Text *o = _pd; double ellipsis = va_arg(*list, double); @@ -1007,7 +1007,7 @@ _text_text_set(Eo *eo_obj, void *_pd, va_list *list) text = eina_unicode_utf8_to_unicode(_text, &len); if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); was = evas_object_is_in_output_rect(eo_obj, obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); @@ -1204,7 +1204,7 @@ evas_object_text_inset_get(const Evas_Object *eo_obj) static void _text_inset_get(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Coord *inset = va_arg(*list, Evas_Coord *); *inset = 0; const Evas_Object_Text *o = _pd; @@ -1290,7 +1290,7 @@ _text_char_pos_get(Eo *eo_obj, void *_pd, va_list *list) if (!o->font) return; if (!o->items || (pos < 0)) return; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Eina_Bool int_ret = _evas_object_text_char_coords_get(eo_obj, o, (size_t) pos, &x, &y, &w, &h); @@ -1386,7 +1386,7 @@ _text_char_coords_get(Eo *eo_obj, void *_pd, va_list *list) rw += rx; rx = 0; } - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if ((rx + rw) > obj->cur->geometry.w) rw = obj->cur->geometry.w - rx; if (rw < 0) rw = 0; if (ry < 0) @@ -1420,7 +1420,7 @@ _text_style_set(Eo *eo_obj, void *_pd, va_list *list) int pl = 0, pr = 0, pt = 0, pb = 0, l = 0, r = 0, t = 0, b = 0; if (o->cur.style == style) return; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_text_style_pad_get(o->cur.style, &pl, &pr, &pt, &pb); o->cur.style = style; @@ -1485,7 +1485,7 @@ _text_shadow_color_set(Eo *eo_obj, void *_pd, va_list *list) o->cur.shadow.b = b; o->cur.shadow.a = a; o->changed = 1; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } @@ -1539,7 +1539,7 @@ _text_glow_color_set(Eo *eo_obj, void *_pd, va_list *list) o->cur.glow.b = b; o->cur.glow.a = a; o->changed = 1; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } @@ -1596,7 +1596,7 @@ _text_glow2_color_set(Eo *eo_obj, void *_pd, va_list *list) o->cur.glow2.b = b; o->cur.glow2.a = a; o->changed = 1; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } @@ -1652,7 +1652,7 @@ _text_outline_color_set(Eo *eo_obj, void *_pd, va_list *list) o->cur.outline.b = b; o->cur.outline.a = a; o->changed = 1; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } @@ -1883,12 +1883,12 @@ evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int static void evas_object_text_init(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); /* set up methods (compulsory) */ obj->func = &object_func; obj->type = o_type; - Evas_Object_Text *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); /* alloc obj private data */ o->cur.ellipsis = -1.0; o->prev = o->cur; @@ -1900,7 +1900,7 @@ evas_object_text_init(Evas_Object *eo_obj) static void _destructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_text_free(eo_obj, obj); eo_do_super(eo_obj, MY_CLASS, eo_destructor()); } @@ -1908,7 +1908,7 @@ _destructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) static void evas_object_text_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Text *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); /* free obj */ if (o->items) _evas_object_text_items_clear(o); @@ -1947,7 +1947,7 @@ static void evas_object_text_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) { int i, j; - Evas_Object_Text *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); Evas_Object_Text_Item *it; const char vals[5][5] = { @@ -2194,7 +2194,7 @@ evas_object_text_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, vo static void evas_object_text_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Text *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); int is_v = 0, was_v = 0; /* dont pre-render the obj twice! */ if (obj->pre_render_done) return; @@ -2304,7 +2304,7 @@ evas_object_text_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *ob static unsigned int evas_object_text_id_get(Evas_Object *eo_obj) { - Evas_Object_Text *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_TEXT; } @@ -2312,7 +2312,7 @@ evas_object_text_id_get(Evas_Object *eo_obj) static unsigned int evas_object_text_visual_id_get(Evas_Object *eo_obj) { - Evas_Object_Text *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_SHAPE; } @@ -2320,7 +2320,7 @@ evas_object_text_visual_id_get(Evas_Object *eo_obj) static void * evas_object_text_engine_data_get(Evas_Object *eo_obj) { - Evas_Object_Text *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return NULL; return o->font; } @@ -2344,7 +2344,7 @@ evas_object_text_was_opaque(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protect static void evas_object_text_scale_update(Evas_Object *eo_obj) { - Evas_Object_Text *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); int size; const char *font; @@ -2361,8 +2361,8 @@ evas_object_text_scale_update(Evas_Object *eo_obj) void _evas_object_text_rehint(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Text *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); int is, was; if (!o->font) return; @@ -2392,8 +2392,8 @@ _evas_object_text_rehint(Evas_Object *eo_obj) static void _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Text *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Text *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING); diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 56d9389937..41fb804c92 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -557,7 +557,7 @@ static const Evas_Object_Func object_func = MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); \ return; \ MAGIC_CHECK_END(); \ - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); #define TB_HEAD_RETURN(x) \ MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); \ @@ -667,7 +667,7 @@ _style_match_tag(const Evas_Textblock_Style *ts, const char *s, size_t tag_len, static void _nodes_clear(const Evas_Object *eo_obj) { - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); while (o->text_nodes) { Evas_Object_Textblock_Node_Text *n; @@ -696,7 +696,7 @@ _nodes_clear(const Evas_Object *eo_obj) static void _format_unref_free(const Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); fmt->ref--; if (fmt->ref > 0) return; if (fmt->font.fdesc) evas_font_desc_unref(fmt->font.fdesc); @@ -2182,7 +2182,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch fmt->ellipsis = -1.0; else { - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); o->have_ellipsis = 1; } } @@ -2417,7 +2417,7 @@ _format_fill(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const char static Evas_Object_Textblock_Format * _format_dup(Evas_Object *eo_obj, const Evas_Object_Textblock_Format *fmt) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Textblock_Format *fmt2; fmt2 = calloc(1, sizeof(Evas_Object_Textblock_Format)); @@ -2497,7 +2497,7 @@ _layout_format_ascent_descent_adjust(const Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt) { int ascent, descent; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (fmt->font.font) { @@ -2740,7 +2740,7 @@ _paragraph_clear(const Evas_Object *obj EINA_UNUSED, static void _paragraph_free(const Evas_Object *eo_obj, Evas_Object_Textblock_Paragraph *par) { - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); _paragraph_clear(eo_obj, par); { @@ -2795,7 +2795,7 @@ _paragraphs_clear(const Evas_Object *eo_obj, Evas_Object_Textblock_Paragraph *pa static void _paragraphs_free(const Evas_Object *eo_obj, Evas_Object_Textblock_Paragraph *pars) { - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); o->num_paragraphs = 0; @@ -3090,7 +3090,7 @@ _layout_calculate_format_item_size(const Evas_Object *eo_obj, Evas_Coord *maxascent, Evas_Coord *maxdescent, Evas_Coord *_y, Evas_Coord *_w, Evas_Coord *_h) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); /* Adjust sizes according to current line height/scale */ Evas_Coord w, h; const char *p, *s; @@ -3331,7 +3331,7 @@ _layout_text_cutoff_get(Ctxt *c, Evas_Object_Textblock_Format *fmt, c->marginr - c->x - ti->x_adjustment; if (x < 0) x = 0; - Evas_Object_Protected_Data *obj = eo_data_get(c->obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(c->obj, EVAS_OBJ_CLASS); return ENFN->font_last_up_to_pos(ENDT, fmt->font.font, &ti->text_props, x, 0); } @@ -3439,7 +3439,7 @@ _text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti) int dx = 0, minx = 0, maxx = 0, shx1, shx2; tw = th = 0; - Evas_Object_Protected_Data *obj = eo_data_get(c->obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(c->obj, EVAS_OBJ_CLASS); if (fmt->font.font) ENFN->font_string_size_get(ENDT, fmt->font.font, &ti->text_props, &tw, &th); @@ -3647,7 +3647,7 @@ skip: script = evas_common_language_script_type_get(str, script_len); - Evas_Object_Protected_Data *obj = eo_data_get(c->obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(c->obj, EVAS_OBJ_CLASS); while (script_len > 0) { Evas_Font_Instance *cur_fi = NULL; @@ -3728,7 +3728,7 @@ _layout_format_item_add(Ctxt *c, Evas_Object_Textblock_Node_Format *n, const cha static void _format_finalize(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); void *of; of = fmt->font.font; @@ -4157,7 +4157,7 @@ _layout_ellipsis_item_new(Ctxt *c, const Evas_Object_Textblock_Item *cur_it) if (ellip_ti->parent.format->font.font) { - Evas_Object_Protected_Data *obj = eo_data_get(c->obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(c->obj, EVAS_OBJ_CLASS); /* It's only 1 char anyway, we don't need the run end. */ (void) ENFN->font_run_end_get(ENDT, ellip_ti->parent.format->font.font, &script_fi, &cur_fi, @@ -4859,8 +4859,8 @@ _layout_pre(Ctxt *c, int *style_pad_l, int *style_pad_r, int *style_pad_t, static void _layout(const Evas_Object *eo_obj, int w, int h, int *w_ret, int *h_ret) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Textblock *o = eo_data_ref(eo_obj, MY_CLASS); Ctxt ctxt, *c; int style_pad_l = 0, style_pad_r = 0, style_pad_t = 0, style_pad_b = 0; @@ -5038,8 +5038,8 @@ _layout(const Evas_Object *eo_obj, int w, int h, int *w_ret, int *h_ret) static void _relayout(const Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); _layout(eo_obj, obj->cur->geometry.w, obj->cur->geometry.h, &o->formatted.w, &o->formatted.h); o->formatted.valid = 1; @@ -5067,7 +5067,7 @@ _find_layout_item_line_match(Evas_Object *eo_obj, Evas_Object_Textblock_Node_Tex { Evas_Object_Textblock_Paragraph *found_par; Evas_Object_Textblock_Line *ln; - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o->formatted.valid) _relayout(eo_obj); @@ -5125,7 +5125,7 @@ _find_layout_line_num(const Evas_Object *eo_obj, int line) { Evas_Object_Textblock_Paragraph *par; Evas_Object_Textblock_Line *ln; - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); par = _layout_find_paragraph_by_line_no(o, line); if (par) @@ -5154,8 +5154,8 @@ static void _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED) { eo_do_super(eo_obj, MY_CLASS, eo_constructor()); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); o->cursor = calloc(1, sizeof(Evas_Textblock_Cursor)); _format_command_init(); evas_object_textblock_init(eo_obj); @@ -5198,7 +5198,7 @@ evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) EINA_LIST_FOREACH(ts->objects, l, eo_obj) { - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); _evas_textblock_invalidate_all(o); _evas_textblock_changed(o, eo_obj); } @@ -6409,7 +6409,7 @@ _evas_textblock_cursor_nodes_merge(Evas_Textblock_Cursor *cur) len = eina_ustrbuf_length_get(cur->node->unicode); - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); nnode = _NODE_TEXT(EINA_INLIST_GET(cur->node)->next); _evas_textblock_nodes_merge(o, cur->node); _evas_textblock_cursors_update_offset(cur, nnode, 0, len); @@ -6638,7 +6638,7 @@ EAPI void evas_textblock_cursor_free(Evas_Textblock_Cursor *cur) { if (!cur) return; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); if (cur == o->cursor) return; o->cursors = eina_list_remove(o->cursors, cur); free(cur); @@ -6846,7 +6846,7 @@ EAPI void evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur) { if (!cur) return; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); cur->node = o->text_nodes; cur->pos = 0; @@ -6858,7 +6858,7 @@ evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur) Evas_Object_Textblock_Node_Text *node; if (!cur) return; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); node = o->text_nodes; if (node) { @@ -7169,7 +7169,7 @@ evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur) if (!cur) return; TB_NULL_CHECK(cur->node); - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); if (!o->formatted.valid) _relayout(cur->obj); _find_layout_item_match(cur, &ln, &it); @@ -7202,7 +7202,7 @@ evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur) if (!cur) return; TB_NULL_CHECK(cur->node); - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); if (!o->formatted.valid) _relayout(cur->obj); _find_layout_item_match(cur, &ln, &it); @@ -7677,7 +7677,7 @@ evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) if (!cur) return -1; TB_NULL_CHECK(cur->node, 0); - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); n = o->text_nodes; while (n != cur->node) { @@ -7694,7 +7694,7 @@ evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int _pos) size_t pos; if (!cur) return; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); if (_pos < 0) { @@ -7739,7 +7739,7 @@ evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line) Evas_Object_Textblock_Item *it; if (!cur) return EINA_FALSE; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); if (!o->formatted.valid) _relayout(cur->obj); ln = _find_layout_line_num(cur->obj, line); @@ -7855,7 +7855,7 @@ _evas_textblock_cursor_break_paragraph(Evas_Textblock_Cursor *cur, Evas_Object_Textblock_Node_Text *n; if (!cur) return; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); n = _evas_textblock_node_text_new(); o->text_nodes = _NODE_TEXT(eina_inlist_append_relative( @@ -7959,7 +7959,7 @@ _evas_textblock_cursors_update_offset(const Evas_Textblock_Cursor *cur, { Eina_List *l; Evas_Textblock_Cursor *data; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); if (cur != o->cursor) { @@ -8011,7 +8011,7 @@ _evas_textblock_cursors_update_offset(const Evas_Textblock_Cursor *cur, static void _evas_textblock_changed(Evas_Object_Textblock *o, Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); o->formatted.valid = 0; o->native.valid = 0; o->content_changed = 1; @@ -8045,7 +8045,7 @@ evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *_text) if (!cur) return 0; text = eina_unicode_utf8_to_unicode(_text, &len); - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); n = cur->node; if (n) @@ -8266,7 +8266,7 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form if (!cur) return EINA_FALSE; if ((!format) || (format[0] == 0)) return EINA_FALSE; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); /* We should always have at least one text node */ if (!o->text_nodes) { @@ -8414,7 +8414,7 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) int chr, ind, ppos; if (!cur || !cur->node) return; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); n = cur->node; text = eina_ustrbuf_string_get(n->unicode); @@ -8491,7 +8491,7 @@ evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_C if (!cur1 || !cur1->node) return; if (!cur2 || !cur2->node) return; if (cur1->obj != cur2->obj) return; - Evas_Object_Textblock *o = eo_data_get(cur1->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur1->obj, MY_CLASS); if (evas_textblock_cursor_compare(cur1, cur2) > 0) { Evas_Textblock_Cursor *tc; @@ -8990,7 +8990,7 @@ EAPI Eina_Bool evas_textblock_cursor_geometry_bidi_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_Coord *cx2, Evas_Coord *cy2, Evas_Coord *cw2, Evas_Coord *ch2, Evas_Textblock_Cursor_Type ctype) { if (!cur) return EINA_FALSE; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); if (!o->formatted.valid) _relayout(cur->obj); if (ctype == EVAS_TEXTBLOCK_CURSOR_UNDER) @@ -9172,7 +9172,7 @@ evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord { int ret = -1; if (!cur) return -1; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); if (!o->formatted.valid) _relayout(cur->obj); if (ctype == EVAS_TEXTBLOCK_CURSOR_UNDER) @@ -9239,7 +9239,7 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat Eina_Bool previous_format; if (!cur) return -1; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); if (!o->formatted.valid) _relayout(cur->obj); if (!cur->node) @@ -9280,7 +9280,7 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat if (pos < 0) pos = 0; if (ti->parent.format->font.font) { - Evas_Object_Protected_Data *obj = eo_data_get(cur->obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJ_CLASS); query_func(ENDT, ti->parent.format->font.font, &ti->text_props, @@ -9346,7 +9346,7 @@ EAPI int evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) { if (!cur) return -1; - Evas_Object_Protected_Data *obj = eo_data_get(cur->obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJ_CLASS); return _evas_textblock_cursor_char_pen_geometry_common_get( ENFN->font_char_coords_get, cur, cx, cy, cw, ch); } @@ -9355,7 +9355,7 @@ EAPI int evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) { if (!cur) return -1; - Evas_Object_Protected_Data *obj = eo_data_get(cur->obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJ_CLASS); return _evas_textblock_cursor_char_pen_geometry_common_get( ENFN->font_pen_coords_get, cur, cx, cy, cw, ch); } @@ -9368,7 +9368,7 @@ evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C int x, y, w, h; if (!cur) return -1; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); if (!o->formatted.valid) _relayout(cur->obj); if (!cur->node) { @@ -9396,10 +9396,10 @@ evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textb Evas *eo_e; Evas_Coord cy, ch; Evas_Object *eo_obj = start->obj; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); TB_HEAD_RETURN(EINA_FALSE); eo_e = evas_object_evas_get(eo_obj); - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); cy = 0 - obj->cur->geometry.y; ch = e->viewport.h; evas_textblock_cursor_line_coord_set(start, cy); @@ -9417,7 +9417,7 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E Evas_Object_Textblock_Item *it = NULL; if (!cur) return EINA_FALSE; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); if (!o->formatted.valid) _relayout(cur->obj); x += o->style_pad.l; y += o->style_pad.t; @@ -9462,7 +9462,7 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E return EINA_TRUE; } - Evas_Object_Protected_Data *obj = eo_data_get(cur->obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJ_CLASS); EINA_INLIST_FOREACH(ln->items, it) { if (((it->x + ln->x) <= x) && (((it->x + ln->x) + it->adv) > x)) @@ -9524,7 +9524,7 @@ evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) Evas_Object_Textblock_Line *ln; if (!cur) return -1; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); if (!o->formatted.valid) _relayout(cur->obj); y += o->style_pad.t; @@ -9656,7 +9656,7 @@ _evas_textblock_cursor_range_in_line_geometry_get( cur = (cur1) ? cur1 : cur2; if (!cur) return NULL; - Evas_Object_Protected_Data *obj = eo_data_get(cur->obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, EVAS_OBJ_CLASS); /* Find the first and last items */ it1 = it2 = NULL; @@ -9912,7 +9912,7 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons if (!cur1 || !cur1->node) return NULL; if (!cur2 || !cur2->node) return NULL; if (cur1->obj != cur2->obj) return NULL; - Evas_Object_Textblock *o = eo_data_get(cur1->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur1->obj, MY_CLASS); if (!o->formatted.valid) _relayout(cur1->obj); if (evas_textblock_cursor_compare(cur1, cur2) > 0) { @@ -9982,7 +9982,7 @@ evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord x, y, w, h; if (!cur || !evas_textblock_cursor_format_is_visible_get(cur)) return EINA_FALSE; - Evas_Object_Textblock *o = eo_data_get(cur->obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(cur->obj, MY_CLASS); if (!o->formatted.valid) _relayout(cur->obj); if (!evas_textblock_cursor_format_is_visible_get(cur)) return EINA_FALSE; _find_layout_item_line_match(cur->obj, cur->node, cur->pos, &ln, &it); @@ -10338,7 +10338,7 @@ _dbg_info_get(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list) static void _workaround_object_coords_recalc(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *eo_obj, void *event_info EINA_UNUSED) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_textblock_coords_recalc(eo_obj, obj); } @@ -10346,8 +10346,8 @@ _workaround_object_coords_recalc(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Ev static void evas_object_textblock_init(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); static Eina_Bool linebreak_init = EINA_FALSE; if (!linebreak_init) { @@ -10378,7 +10378,7 @@ _destructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) static void evas_object_textblock_free(Evas_Object *eo_obj) { - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); _evas_object_textblock_clear_all(eo_obj); evas_object_textblock_style_set(eo_obj, NULL); @@ -10407,7 +10407,7 @@ evas_object_textblock_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *ob { Evas_Object_Textblock_Paragraph *par, *start = NULL; Evas_Object_Textblock_Line *ln; - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); int i, j; int cx, cy, cw, ch, clip; const char vals[5][5] = @@ -10802,7 +10802,7 @@ evas_object_textblock_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *ob static void evas_object_textblock_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); int is_v, was_v; /* dont pre-render the obj twice! */ @@ -10907,21 +10907,21 @@ evas_object_textblock_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Dat static unsigned int evas_object_textblock_id_get(Evas_Object *eo_obj) { - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_TEXTBLOCK; } static unsigned int evas_object_textblock_visual_id_get(Evas_Object *eo_obj) { - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_CUSTOM; } static void *evas_object_textblock_engine_data_get(Evas_Object *eo_obj) { - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return NULL; return o->engine_data; } @@ -10945,7 +10945,7 @@ evas_object_textblock_was_opaque(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Pr static void evas_object_textblock_coords_recalc(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); if ((obj->cur->geometry.w != o->last_w) || (((o->valign != 0.0) || (o->have_ellipsis)) && (obj->cur->geometry.h != o->last_h))) @@ -10958,7 +10958,7 @@ evas_object_textblock_coords_recalc(Evas_Object *eo_obj, Evas_Object_Protected_D static void evas_object_textblock_scale_update(Evas_Object *eo_obj) { - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); _evas_textblock_invalidate_all(o); _evas_textblock_changed(o, eo_obj); o->last_w = -1; @@ -10968,8 +10968,8 @@ evas_object_textblock_scale_update(Evas_Object *eo_obj) void _evas_object_textblock_rehint(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); Evas_Object_Textblock_Paragraph *par; Evas_Object_Textblock_Line *ln; @@ -11007,7 +11007,7 @@ _evas_object_textblock_rehint(Evas_Object *eo_obj) EAPI Eina_Bool _evas_textblock_check_item_node_link(Evas_Object *eo_obj) { - Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textblock *o = eo_data_scope_get(eo_obj, MY_CLASS); Evas_Object_Textblock_Paragraph *par; Evas_Object_Textblock_Line *ln; Evas_Object_Textblock_Item *it; diff --git a/src/lib/evas/canvas/evas_object_textgrid.c b/src/lib/evas/canvas/evas_object_textgrid.c index df56a0c440..a637290e98 100644 --- a/src/lib/evas/canvas/evas_object_textgrid.c +++ b/src/lib/evas/canvas/evas_object_textgrid.c @@ -170,7 +170,7 @@ evas_object_textgrid_textprop_get(Evas_Object *eo_obj, Evas_Object_Textgrid *o, Evas_Script_Type script; script = evas_common_language_script_type_get(&codepoint, 1); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); ENFN->font_run_end_get(ENDT, o->font, &script_fi, &cur_fi, script, &codepoint, 1); memset(&(glyph->props[idx]), 0, sizeof(Evas_Text_Props)); evas_common_text_props_script_set(&(glyph->props[idx]), script); @@ -341,12 +341,12 @@ evas_object_textgrid_textprop_int_to(Evas_Object_Textgrid *o, int props) static void evas_object_textgrid_init(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); /* set up methods (compulsory) */ obj->func = &object_func; obj->type = o_type; - Evas_Object_Textgrid *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textgrid *o = eo_data_scope_get(eo_obj, MY_CLASS); o->magic = MAGIC_OBJ_TEXTGRID; o->prev = o->cur; eina_array_step_set(&o->cur.palette_standard, sizeof (Eina_Array), 16); @@ -393,7 +393,7 @@ evas_object_textgrid_rows_clear(Evas_Object *eo_obj) { int i; - Evas_Object_Textgrid *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textgrid *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o->cur.rows) return; for (i = 0; i < o->cur.h; i++) { @@ -407,7 +407,7 @@ static void evas_object_textgrid_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) { Evas_Object_Textgrid_Color *c; - Evas_Object_Textgrid *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textgrid *o = eo_data_scope_get(eo_obj, MY_CLASS); /* free obj */ evas_object_textgrid_rows_clear(eo_obj); @@ -456,7 +456,7 @@ evas_object_textgrid_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) static void _destructor(Eo *eo_obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_textgrid_free(eo_obj, obj); eo_do_super(eo_obj, MY_CLASS, eo_destructor()); } @@ -564,7 +564,7 @@ evas_object_textgrid_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj int rr = 0, rg = 0, rb = 0, ra = 0, rx = 0, rw = 0, run; /* render object to surface with context, and offset by x,y */ - Evas_Object_Textgrid *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textgrid *o = eo_data_scope_get(eo_obj, MY_CLASS); ENFN->context_multiplier_unset(output, context); ENFN->context_render_op_set(output, context, obj->cur->render_op); @@ -789,7 +789,7 @@ evas_object_textgrid_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data /* elsewhere, decoding video etc. */ /* then when this is done the object needs to figure if it changed and */ /* if so what and where and add thr appropriate redraw rectangles */ - Evas_Object_Textgrid *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textgrid *o = eo_data_scope_get(eo_obj, MY_CLASS); /* if someone is clipping this obj - go calculate the clipper */ if (obj->cur->clipper) { @@ -907,7 +907,7 @@ evas_object_textgrid_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data /* this moves the current data to the previous state parts of the object */ /* in whatever way is safest for the object. also if we don't need object */ /* data anymore we can free it if the object deems this is a good idea */ - Evas_Object_Textgrid *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textgrid *o = eo_data_scope_get(eo_obj, MY_CLASS); /* remove those pesky changes */ evas_object_clip_changes_clean(eo_obj); /* move cur to prev safely for object data */ @@ -938,7 +938,7 @@ evas_object_textgrid_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data static unsigned int evas_object_textgrid_id_get(Evas_Object *eo_obj) { - Evas_Object_Textgrid *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textgrid *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_TEXTGRID; } @@ -946,7 +946,7 @@ evas_object_textgrid_id_get(Evas_Object *eo_obj) static unsigned int evas_object_textgrid_visual_id_get(Evas_Object *eo_obj) { - Evas_Object_Textgrid *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textgrid *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return 0; return MAGIC_OBJ_SHAPE; } @@ -954,7 +954,7 @@ evas_object_textgrid_visual_id_get(Evas_Object *eo_obj) static void * evas_object_textgrid_engine_data_get(Evas_Object *eo_obj) { - Evas_Object_Textgrid *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textgrid *o = eo_data_scope_get(eo_obj, MY_CLASS); if (!o) return NULL; return o->font; } @@ -981,7 +981,7 @@ evas_object_textgrid_scale_update(Evas_Object *eo_obj) int font_size; const char *font_name; - Evas_Object_Textgrid *o = eo_data_get(eo_obj, MY_CLASS); + Evas_Object_Textgrid *o = eo_data_scope_get(eo_obj, MY_CLASS); font_name = eina_stringshare_add(o->cur.font_name); font_size = o->cur.font_size; if (o->cur.font_name) eina_stringshare_del(o->cur.font_name); @@ -1012,7 +1012,7 @@ _constructor(Eo *eo_obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED { eo_do_super(eo_obj, MY_CLASS, eo_constructor()); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_textgrid_init(eo_obj); evas_object_inject(eo_obj, obj, evas_object_evas_get(eo_parent_get(eo_obj))); } @@ -1068,7 +1068,7 @@ _size_set(Eo *eo_obj, void *_pd, va_list *list) o->cur.h = h; o->changed = 1; o->core_change = 1; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } @@ -1122,7 +1122,7 @@ _font_source_set(Eo *eo_obj, void *_pd, va_list *list) eina_stringshare_replace(&o->cur.font_source, font_source); o->changed = 1; o->core_change = 1; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } @@ -1157,7 +1157,7 @@ evas_object_textgrid_font_set(Evas_Object *eo_obj, const char *font_name, Evas_F static void _font_set(Eo *eo_obj, void *_pd, va_list *list) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); const char *font_name = va_arg(*list, const char *); Evas_Font_Size font_size = va_arg(*list, Evas_Font_Size); Eina_Bool is, was = EINA_FALSE; @@ -1439,7 +1439,7 @@ _palette_set(Eo *eo_obj, void *_pd, va_list *list) o->changed = 1; o->pal_change = 1; evas_object_textgrid_rows_clear(eo_obj); - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } @@ -1513,7 +1513,7 @@ _supported_font_styles_set(Eo *eo_obj, void *_pd, va_list *list) /* FIXME: to do */ if (styles) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); o->changed = 1; evas_object_change(eo_obj, obj); } @@ -1623,7 +1623,7 @@ _update_add(Eo *eo_obj, void *_pd, va_list *list) } o->row_change = 1; o->changed = 1; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); evas_object_change(eo_obj, obj); } diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c index d03aeb7b26..3d22e52e48 100644 --- a/src/lib/evas/canvas/evas_out.c +++ b/src/lib/evas/canvas/evas_out.c @@ -32,7 +32,7 @@ _constructor(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) { Evas_Out_Public_Data *eo_dat = _pd; Eo *eo_parent = eo_parent_get(eo_obj); - Evas_Public_Data *e = eo_data_get(eo_parent, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_parent, EVAS_CLASS); eo_do_super(eo_obj, MY_CLASS, eo_constructor()); if (!e) return; e->outputs = eina_list_append(e->outputs, eo_obj); @@ -53,7 +53,7 @@ _destructor(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED) { Evas_Out_Public_Data *eo_dat = _pd; Eo *eo_parent = eo_parent_get(eo_obj); - Evas_Public_Data *e = eo_data_get(eo_parent, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_parent, EVAS_CLASS); // XXX: need to free output and context one they get allocated one day // e->engine.func->context_free(eo_dat->output, eo_dat->context); // e->engine.func->output_free(eo_dat->output); diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index 0e21ac3432..830af0b6a9 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -53,6 +53,33 @@ rend_dbg(const char *txt) #define RDI(x) #endif +#define OBJ_ARRAY_PUSH(array, obj) \ +do \ +{ \ + eina_array_push(array, obj); \ + eo_data_ref(obj->object, NULL); \ +} while (0) + +#define OBJS_ARRAY_CLEAN(array) \ +{ \ + Evas_Object_Protected_Data *item; \ + Eina_Array_Iterator iterator; \ + unsigned int idx; \ + EINA_ARRAY_ITER_NEXT(array, idx, item, iterator) \ + eo_data_unref(item->object, item); \ + eina_array_clean(array); \ +} + +#define OBJS_ARRAY_FLUSH(array) \ +{ \ + Evas_Object_Protected_Data *item; \ + Eina_Array_Iterator iterator; \ + unsigned int idx; \ + EINA_ARRAY_ITER_NEXT(array, idx, item, iterator) \ + eo_data_unref(item->object, item); \ + eina_array_flush(array); \ +} + typedef struct _Render_Updates Render_Updates; struct _Render_Updates { @@ -205,7 +232,7 @@ _evas_render_had_map(Evas_Object_Protected_Data *obj) static Eina_Bool _evas_render_is_relevant(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); return ((evas_object_is_visible(eo_obj, obj) && (!obj->cur->have_clipees)) || (evas_object_was_visible(eo_obj, obj) && (!obj->prev->have_clipees))); } @@ -277,7 +304,7 @@ _evas_render_phase1_direct(Evas_Public_Data *e, { Evas_Object_Protected_Data *proxy; - proxy = eo_data_get(eo_proxy, EVAS_OBJ_CLASS); + proxy = eo_data_scope_get(eo_proxy, EVAS_OBJ_CLASS); EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, proxy->proxy, Evas_Object_Proxy_Data, proxy_write) proxy_write->redraw = EINA_TRUE; @@ -307,7 +334,7 @@ _evas_render_phase1_direct(Evas_Public_Data *e, EINA_LIST_FOREACH(obj->proxy->proxies, l, eo_proxy) { - Evas_Object_Protected_Data *proxy = eo_data_get(eo_proxy, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *proxy = eo_data_scope_get(eo_proxy, EVAS_OBJ_CLASS); proxy->func->render_pre(eo_proxy, proxy); _evas_render_prev_cur_clip_cache_add(e, proxy); } @@ -363,7 +390,7 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj, int is_active; Eina_Bool map, hmap; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); //Need pre render for the children of mapped object. //But only when they have changed. if (mapped_parent && (!obj->changed)) return EINA_FALSE; @@ -372,7 +399,7 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj, obj->render_pre = EINA_FALSE; if (obj->delete_me == 2) - eina_array_push(delete_objects, obj); + OBJ_ARRAY_PUSH(delete_objects, obj); else if (obj->delete_me != 0) obj->delete_me++; /* If the object will be removed, we should not cache anything during this run. */ if (obj->delete_me != 0) clean_them = EINA_TRUE; @@ -386,7 +413,7 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj, RD(" [--- PROCESS [%p] '%s' active = %i, del = %i | %i %i %ix%i\n", obj, obj->type, is_active, obj->delete_me, obj->cur->geometry.x, obj->cur->geometry.y, obj->cur->geometry.w, obj->cur->geometry.h); if ((!mapped_parent) && ((is_active) || (obj->delete_me != 0))) - eina_array_push(active_objects, obj); + OBJ_ARRAY_PUSH(active_objects, obj); #ifdef REND_DBG if (!is_active) @@ -403,7 +430,7 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj, { if (!obj->changed) { - eina_array_push(&e->pending_objects, obj); + OBJ_ARRAY_PUSH(&e->pending_objects, obj); obj->changed = EINA_TRUE; } obj->restack = EINA_TRUE; @@ -422,7 +449,7 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj, ((evas_object_is_visible(eo_obj, obj) && (!obj->cur->have_clipees)) || (evas_object_was_visible(eo_obj, obj) && (!obj->prev->have_clipees)))) { - eina_array_push(render_objects, obj); + OBJ_ARRAY_PUSH(render_objects, obj); _evas_render_prev_cur_clip_cache_add(e, obj); obj->render_pre = EINA_TRUE; @@ -454,7 +481,7 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj, { RDI(level); RD(" had map - restack objs\n"); - // eina_array_push(restack_objects, obj); + // OBJ_ARRAY_PUSH(restack_objects, obj); _evas_render_prev_cur_clip_cache_add(e, obj); if (obj->changed) { @@ -476,7 +503,7 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj, { RDI(level); RD(" changed + smart - render ok\n"); - eina_array_push(render_objects, obj); + OBJ_ARRAY_PUSH(render_objects, obj); obj->render_pre = EINA_TRUE; Evas_Object_Protected_Data *obj2; EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), @@ -505,10 +532,10 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj, RDI(level); RD(" relevant + active\n"); if (obj->restack) - eina_array_push(restack_objects, obj); + OBJ_ARRAY_PUSH(restack_objects, obj); else { - eina_array_push(render_objects, obj); + OBJ_ARRAY_PUSH(render_objects, obj); obj->render_pre = EINA_TRUE; } } @@ -546,7 +573,7 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj, { RDI(level); RD(" smart + visible/was visible + not clip\n"); - eina_array_push(render_objects, obj); + OBJ_ARRAY_PUSH(render_objects, obj); obj->render_pre = EINA_TRUE; Evas_Object_Protected_Data *obj2; EINA_INLIST_FOREACH @@ -573,14 +600,14 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj, { RDI(level); RD(" opaque + visible\n"); - eina_array_push(render_objects, obj); + OBJ_ARRAY_PUSH(render_objects, obj); obj->rect_del = EINA_TRUE; } else if (evas_object_is_visible(eo_obj, obj)) { RDI(level); RD(" visible\n"); - eina_array_push(render_objects, obj); + OBJ_ARRAY_PUSH(render_objects, obj); obj->render_pre = EINA_TRUE; } else @@ -594,7 +621,7 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj, { RDI(level); RD(" smart + mot visible/was visible\n"); - eina_array_push(render_objects, obj); + OBJ_ARRAY_PUSH(render_objects, obj); obj->render_pre = 1; EINA_INLIST_FOREACH (evas_object_smart_members_get_direct(eo_obj), obj2) @@ -719,10 +746,10 @@ _evas_render_check_pending_objects(Eina_Array *pending_objects, Evas *eo_e EINA_ clean_stuff: if (!ok) { - eina_array_clean(&e->active_objects); - eina_array_clean(&e->render_objects); - eina_array_clean(&e->restack_objects); - eina_array_clean(&e->delete_objects); + OBJS_ARRAY_CLEAN(&e->active_objects); + OBJS_ARRAY_CLEAN(&e->render_objects); + OBJS_ARRAY_CLEAN(&e->restack_objects); + OBJS_ARRAY_CLEAN(&e->delete_objects); e->invalidate = EINA_TRUE; return ; } @@ -744,6 +771,7 @@ pending_change(void *data, void *gdata EINA_UNUSED) obj->pre_render_done = EINA_FALSE; evas_object_change_reset(eo_obj); } + if (!obj->changed) eo_data_unref(eo_obj, obj); return obj->changed ? EINA_TRUE : EINA_FALSE; } @@ -759,7 +787,7 @@ _evas_render_can_use_overlay(Evas_Public_Data *e, Evas_Object *eo_obj) Evas_Coord xc1, yc1, xc2, yc2; unsigned int i; Eina_Bool nooverlay; - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Protected_Data *tmp = NULL; video_parent = _evas_object_image_video_parent_get(eo_obj); @@ -768,7 +796,7 @@ _evas_render_can_use_overlay(Evas_Public_Data *e, Evas_Object *eo_obj) eo_tmp = eo_obj; while (tmp && !_evas_render_has_map(eo_tmp, tmp)) { - tmp = eo_data_get(eo_tmp, EVAS_OBJ_CLASS); + tmp = eo_data_scope_get(eo_tmp, EVAS_OBJ_CLASS); eo_tmp = tmp->smart.parent; } @@ -1386,7 +1414,7 @@ _evas_render_cutout_add(Evas_Public_Data *e, Evas_Object_Protected_Data *obj, in Evas_Object_Protected_Data *oo; eo_oo = obj->object; - oo = eo_data_get(eo_oo, EVAS_OBJ_CLASS); + oo = eo_data_scope_get(eo_oo, EVAS_OBJ_CLASS); while (oo->cur->clipper) { if ((oo->cur->clipper->map->cur.map_parent @@ -1486,7 +1514,7 @@ evas_render_updates_internal(Evas *eo_e, return EINA_FALSE; MAGIC_CHECK_END(); - e = eo_data_get(eo_e, EVAS_CLASS); + e = eo_data_scope_get(eo_e, EVAS_CLASS); if (!e->changed) return EINA_FALSE; if (e->rendering) @@ -1549,7 +1577,7 @@ evas_render_updates_internal(Evas *eo_e, obj->func->render_pre(eo_obj, obj); _evas_render_prev_cur_clip_cache_add(e, obj); } - eina_array_clean(&e->restack_objects); + OBJS_ARRAY_CLEAN(&e->restack_objects); /* phase 3. add exposes */ EINA_LIST_FREE(e->damages, r) @@ -1620,7 +1648,7 @@ evas_render_updates_internal(Evas *eo_e, (obj->cur->cache.clip.visible) && (!obj->is_smart))) /* obscuring_objects = eina_list_append(obscuring_objects, obj); */ - eina_array_push(&e->obscuring_objects, obj); + OBJ_ARRAY_PUSH(&e->obscuring_objects, obj); } /* save this list */ @@ -1677,7 +1705,7 @@ evas_render_updates_internal(Evas *eo_e, eo_obj = obj->object; if (evas_object_is_in_output_rect(eo_obj, obj, ux - fx, uy - fy, uw, uh)) { - eina_array_push(&e->temporary_objects, obj); + OBJ_ARRAY_PUSH(&e->temporary_objects, obj); /* reset the background of the area if needed (using cutout and engine alpha flag to help) */ if (alpha) @@ -1776,7 +1804,7 @@ evas_render_updates_internal(Evas *eo_e, render_mode); /* free obscuring objects list */ - eina_array_clean(&e->temporary_objects); + OBJS_ARRAY_CLEAN(&e->temporary_objects); RD(" ---]\n"); } @@ -1825,7 +1853,7 @@ evas_render_updates_internal(Evas *eo_e, */ } /* free our obscuring object list */ - eina_array_clean(&e->obscuring_objects); + OBJS_ARRAY_CLEAN(&e->obscuring_objects); /* If some object are still marked as changed, do not remove them from the pending list. */ @@ -1844,15 +1872,6 @@ evas_render_updates_internal(Evas *eo_e, } } - /* delete all objects flagged for deletion now */ - for (i = 0; i < e->delete_objects.count; ++i) - { - obj = eina_array_data_get(&e->delete_objects, i); - eo_obj = obj->object; - evas_object_free(eo_obj, 1); - } - eina_array_clean(&e->delete_objects); - e->changed = EINA_FALSE; e->viewport.changed = EINA_FALSE; e->output.changed = EINA_FALSE; @@ -1864,10 +1883,10 @@ evas_render_updates_internal(Evas *eo_e, * it's useless to keep the render object list around. */ if (clean_them) { - eina_array_clean(&e->active_objects); - eina_array_clean(&e->render_objects); - eina_array_clean(&e->restack_objects); - eina_array_clean(&e->temporary_objects); + OBJS_ARRAY_CLEAN(&e->active_objects); + OBJS_ARRAY_CLEAN(&e->render_objects); + OBJS_ARRAY_CLEAN(&e->restack_objects); + OBJS_ARRAY_CLEAN(&e->temporary_objects); eina_array_foreach(&e->clip_changes, _evas_clip_changes_free, NULL); eina_array_clean(&e->clip_changes); /* we should flush here and have a mempool system for this @@ -1923,7 +1942,7 @@ evas_render_wakeup(Evas *eo_e) Render_Updates *ru; Eina_Bool haveup = EINA_FALSE; Eina_List *ret_updates = NULL; - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); EINA_LIST_FREE(e->render.updates, ru) { @@ -2036,7 +2055,7 @@ evas_render_updates_internal_wait(Evas *eo_e, unsigned char do_draw) { Eina_List *ret = NULL; - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); if (!evas_render_updates_internal(eo_e, make_updates, do_draw, NULL, NULL, EINA_FALSE)) @@ -2119,14 +2138,14 @@ _canvas_render_idle_flush(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) (e->engine.data.output)) e->engine.func->output_idle_flush(e->engine.data.output); - eina_array_flush(&e->active_objects); - eina_array_flush(&e->render_objects); - eina_array_flush(&e->restack_objects); - eina_array_flush(&e->delete_objects); - eina_array_flush(&e->obscuring_objects); - eina_array_flush(&e->temporary_objects); + OBJS_ARRAY_FLUSH(&e->active_objects); + OBJS_ARRAY_FLUSH(&e->render_objects); + OBJS_ARRAY_FLUSH(&e->restack_objects); + OBJS_ARRAY_FLUSH(&e->delete_objects); + OBJS_ARRAY_FLUSH(&e->obscuring_objects); + OBJS_ARRAY_FLUSH(&e->temporary_objects); eina_array_foreach(&e->clip_changes, _evas_clip_changes_free, NULL); - eina_array_flush(&e->clip_changes); + eina_array_clean(&e->clip_changes); e->invalidate = EINA_TRUE; } @@ -2140,14 +2159,14 @@ evas_sync(Evas *eo_e) void _canvas_sync(Eo *eo_e, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); evas_render_rendering_wait(e); } void _evas_render_dump_map_surfaces(Evas_Object *eo_obj) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if ((obj->map->cur.map) && obj->map->surface) { obj->layer->evas->engine.func->image_map_surface_free @@ -2217,13 +2236,13 @@ evas_render_invalidate(Evas *eo_e) MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); - e = eo_data_get(eo_e, EVAS_CLASS); + e = eo_data_scope_get(eo_e, EVAS_CLASS); - eina_array_clean(&e->active_objects); - eina_array_clean(&e->render_objects); + OBJS_ARRAY_CLEAN(&e->active_objects); + OBJS_ARRAY_CLEAN(&e->render_objects); - eina_array_flush(&e->restack_objects); - eina_array_flush(&e->delete_objects); + OBJS_ARRAY_FLUSH(&e->restack_objects); + OBJS_ARRAY_FLUSH(&e->delete_objects); e->invalidate = EINA_TRUE; } @@ -2237,14 +2256,14 @@ evas_render_object_recalc(Evas_Object *eo_obj) return; MAGIC_CHECK_END(); - obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if ((!obj->changed) && (obj->delete_me < 2)) { Evas_Public_Data *e; e = obj->layer->evas; if ((!e) || (e->cleanup)) return; - eina_array_push(&e->pending_objects, obj); + OBJ_ARRAY_PUSH(&e->pending_objects, obj); obj->changed = EINA_TRUE; } } diff --git a/src/lib/evas/canvas/evas_stack.c b/src/lib/evas/canvas/evas_stack.c index 82db3d4e01..1f1f210d06 100644 --- a/src/lib/evas/canvas/evas_stack.c +++ b/src/lib/evas/canvas/evas_stack.c @@ -172,7 +172,7 @@ _stack_above(Eo *eo_obj, void *_pd, va_list *list) return; } Evas_Object_Protected_Data *obj = _pd; - Evas_Object_Protected_Data *above = eo_data_get(eo_above, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *above = eo_data_scope_get(eo_above, EVAS_OBJ_CLASS); if ((EINA_INLIST_GET(obj))->prev == EINA_INLIST_GET(above)) { evas_object_inform_call_restack(eo_obj); @@ -259,7 +259,7 @@ _stack_below(Eo *eo_obj, void *_pd, va_list *list) return; } Evas_Object_Protected_Data *obj = _pd; - Evas_Object_Protected_Data *below = eo_data_get(eo_below, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *below = eo_data_scope_get(eo_below, EVAS_OBJ_CLASS); if ((EINA_INLIST_GET(obj))->next == EINA_INLIST_GET(below)) { evas_object_inform_call_restack(eo_obj); diff --git a/src/lib/evas/canvas/evas_touch_point.c b/src/lib/evas/canvas/evas_touch_point.c index 603756a2f2..759ac8f908 100644 --- a/src/lib/evas/canvas/evas_touch_point.c +++ b/src/lib/evas/canvas/evas_touch_point.c @@ -4,7 +4,7 @@ void _evas_touch_point_append(Evas *eo_e, int id, Evas_Coord x, Evas_Coord y) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Coord_Touch_Point *point; /* create new Evas_Coord_Touch_Point */ @@ -19,7 +19,7 @@ _evas_touch_point_append(Evas *eo_e, int id, Evas_Coord x, Evas_Coord y) void _evas_touch_point_update(Evas *eo_e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Eina_List *l; Evas_Coord_Touch_Point *point = NULL; @@ -38,7 +38,7 @@ _evas_touch_point_update(Evas *eo_e, int id, Evas_Coord x, Evas_Coord y, Evas_To void _evas_touch_point_remove(Evas *eo_e, int id) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Eina_List *l; Evas_Coord_Touch_Point *point = NULL; diff --git a/src/lib/evas/include/evas_inline.x b/src/lib/evas/include/evas_inline.x index 88f047aea2..1ce86b847e 100644 --- a/src/lib/evas/include/evas_inline.x +++ b/src/lib/evas/include/evas_inline.x @@ -84,7 +84,7 @@ evas_event_freezes_through(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protecte if (obj->parent_cache.freeze_events_valid) return obj->parent_cache.freeze_events; if (!obj->smart.parent) return 0; - Evas_Object_Protected_Data *smart_parent_pd = eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *smart_parent_pd = eo_data_scope_get(obj->smart.parent, EVAS_OBJ_CLASS); obj->parent_cache.freeze_events = evas_event_freezes_through(obj->smart.parent, smart_parent_pd); obj->parent_cache.freeze_events_valid = EINA_TRUE; @@ -98,7 +98,7 @@ evas_event_passes_through(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected if (obj->parent_cache.pass_events_valid) return obj->parent_cache.pass_events; if (!obj->smart.parent) return 0; - Evas_Object_Protected_Data *smart_parent_pd = eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *smart_parent_pd = eo_data_scope_get(obj->smart.parent, EVAS_OBJ_CLASS); obj->parent_cache.pass_events = evas_event_passes_through(obj->smart.parent, smart_parent_pd); obj->parent_cache.pass_events_valid = EINA_TRUE; @@ -113,7 +113,7 @@ evas_object_is_source_invisible(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Pro if (obj->proxy->proxies && obj->proxy->src_invisible) return 1; if (!obj->smart.parent) return 0; Evas_Object_Protected_Data *smart_parent_pd = - eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS); + eo_data_scope_get(obj->smart.parent, EVAS_OBJ_CLASS); obj->parent_cache.src_invisible = evas_object_is_source_invisible(obj->smart.parent, smart_parent_pd); obj->parent_cache.src_invisible_valid = EINA_TRUE; diff --git a/src/modules/evas/engines/buffer/evas_engine.c b/src/modules/evas/engines/buffer/evas_engine.c index 036fb4b3ba..72df536168 100644 --- a/src/modules/evas/engines/buffer/evas_engine.c +++ b/src/modules/evas/engines/buffer/evas_engine.c @@ -146,7 +146,7 @@ eng_info_free(Evas *eo_e EINA_UNUSED, void *info) static int eng_setup(Evas *eo_e, void *in) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Render_Engine *re; Evas_Engine_Info_Buffer *info; diff --git a/src/modules/evas/engines/fb/evas_engine.c b/src/modules/evas/engines/fb/evas_engine.c index 3121c90948..3a1a11be75 100644 --- a/src/modules/evas/engines/fb/evas_engine.c +++ b/src/modules/evas/engines/fb/evas_engine.c @@ -95,7 +95,7 @@ eng_info_free(Evas *eo_e EINA_UNUSED, void *info) static int eng_setup(Evas *eo_e, void *in) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Render_Engine *re; Evas_Engine_Info_FB *info; diff --git a/src/modules/evas/engines/gl_cocoa/evas_engine.c b/src/modules/evas/engines/gl_cocoa/evas_engine.c index 2ea0b81ffd..36148889b7 100644 --- a/src/modules/evas/engines/gl_cocoa/evas_engine.c +++ b/src/modules/evas/engines/gl_cocoa/evas_engine.c @@ -85,7 +85,7 @@ eng_info_free(Evas *e EINA_UNUSED, void *info) static int eng_setup(Evas *eo_e, void *in) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Render_Engine *re; Evas_Engine_Info_GL_Cocoa *info; diff --git a/src/modules/evas/engines/gl_common/evas_gl_api.c b/src/modules/evas/engines/gl_common/evas_gl_api.c index 76ac6873c4..19e542245d 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_api.c +++ b/src/modules/evas/engines/gl_common/evas_gl_api.c @@ -160,7 +160,7 @@ compute_gl_coordinates(Evas_Object *obj, int rot, int clip, int x, int y, int width, int height, int imgc[4], int objc[4]) { - Evas_Object_Protected_Data *pd = eo_data_get(obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *pd = eo_data_scope_get(obj, EVAS_OBJ_CLASS); if (rot == 0) { // oringinal image object coordinate in gl coordinate @@ -365,7 +365,7 @@ _evgl_glGetIntegerv(GLenum pname, GLint* params) // Only need to handle it if it's directly rendering to the window if (!(rsc->current_ctx->current_fbo)) { - img = eo_data_get(rsc->direct_img_obj, EVAS_OBJ_CLASS); + img = eo_data_scope_get(rsc->direct_img_obj, EVAS_OBJ_CLASS); if (pname == GL_SCISSOR_BOX) { diff --git a/src/modules/evas/engines/gl_sdl/evas_engine.c b/src/modules/evas/engines/gl_sdl/evas_engine.c index ab02fe5f7e..18813ee35b 100644 --- a/src/modules/evas/engines/gl_sdl/evas_engine.c +++ b/src/modules/evas/engines/gl_sdl/evas_engine.c @@ -30,7 +30,7 @@ eng_info_free(Evas *e EINA_UNUSED, void *info) static int eng_setup(Evas *eo_e, void *in) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Render_Engine *re; Evas_Engine_Info_GL_SDL *info; diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c index b042b185fc..1785fa57b2 100644 --- a/src/modules/evas/engines/gl_x11/evas_engine.c +++ b/src/modules/evas/engines/gl_x11/evas_engine.c @@ -803,7 +803,7 @@ _re_winfree(Render_Engine *re) static int eng_setup(Evas *eo_e, void *in) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Render_Engine *re; Evas_Engine_Info_GL_X11 *info; const char *s; diff --git a/src/modules/evas/engines/psl1ght/evas_engine.c b/src/modules/evas/engines/psl1ght/evas_engine.c index ff506bbbaf..422db09cd7 100644 --- a/src/modules/evas/engines/psl1ght/evas_engine.c +++ b/src/modules/evas/engines/psl1ght/evas_engine.c @@ -165,7 +165,7 @@ eng_info_free(Evas *e EINA_UNUSED, void *info) static int eng_setup(Evas *eo_e, void *in) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Engine_Info_PSL1GHT *info; printf ("eng_setup called\n"); diff --git a/src/modules/evas/engines/software_ddraw/evas_engine.c b/src/modules/evas/engines/software_ddraw/evas_engine.c index db9023dd71..a1ab1cd1cb 100644 --- a/src/modules/evas/engines/software_ddraw/evas_engine.c +++ b/src/modules/evas/engines/software_ddraw/evas_engine.c @@ -112,7 +112,7 @@ eng_info_free(Evas *e, void *info) static int eng_setup(Evas *eo_e, void *in) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Render_Engine *re; Evas_Engine_Info_Software_DDraw *info; diff --git a/src/modules/evas/engines/software_gdi/evas_engine.c b/src/modules/evas/engines/software_gdi/evas_engine.c index fc2b5c2ea2..2f29867f77 100644 --- a/src/modules/evas/engines/software_gdi/evas_engine.c +++ b/src/modules/evas/engines/software_gdi/evas_engine.c @@ -113,7 +113,7 @@ eng_info_free(Evas *e EINA_UNUSED, void *info) static int eng_setup(Evas *eo_e, void *in) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Render_Engine *re; Evas_Engine_Info_Software_Gdi *info; diff --git a/src/modules/evas/engines/software_x11/evas_engine.c b/src/modules/evas/engines/software_x11/evas_engine.c index 57283edb35..6f836d6cb4 100644 --- a/src/modules/evas/engines/software_x11/evas_engine.c +++ b/src/modules/evas/engines/software_x11/evas_engine.c @@ -432,7 +432,7 @@ eng_info_free(Evas *eo_e EINA_UNUSED, void *info) static int eng_setup(Evas *eo_e, void *in) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Evas_Engine_Info_Software_X11 *info; Render_Engine *re = NULL; diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c index 5f6b31ded3..256f95de66 100644 --- a/src/modules/evas/engines/wayland_egl/evas_engine.c +++ b/src/modules/evas/engines/wayland_egl/evas_engine.c @@ -650,7 +650,7 @@ _destroy_internal_glue_resources(void *data) static int eng_setup(Evas *eo_e, void *in) { - Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); + Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS); Render_Engine *re; Evas_Engine_Info_Wayland_Egl *info; Evas_GL_Wl_Window *new_win = NULL; @@ -3050,7 +3050,7 @@ compute_gl_coordinates(Evas_Object *eo_obj, int rot, int clip, int x, int y, int width, int height, int imgc[4], int objc[4]) { - Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); if (rot == 0) { // oringinal image object coordinate in gl coordinate diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c b/src/modules/evas/engines/wayland_shm/evas_engine.c index c87e328536..21944249cd 100644 --- a/src/modules/evas/engines/wayland_shm/evas_engine.c +++ b/src/modules/evas/engines/wayland_shm/evas_engine.c @@ -205,7 +205,7 @@ eng_setup(Evas *eo_evas, void *einfo) return 0; /* try to get evas public data from the canvas */ - if (!(epd = eo_data_get(eo_evas, EVAS_CLASS))) + if (!(epd = eo_data_scope_get(eo_evas, EVAS_CLASS))) return 0; /* test for valid engine output */ |