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;
_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;
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);
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;
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;
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);
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 */
_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)
{
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);
}
}
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)
{
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);
{
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);
}
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);
}
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);
_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;
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;
_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
{
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;
{
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);
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);
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 *);
{
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 *);
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 **);
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 *);
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 *);
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 *);
{
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 *);
{
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);
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);
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());
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];
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;
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;
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 *);
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);
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)
{
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());
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];
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 *);
{
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 *);
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 **);
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 *);
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 *);
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());
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);
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;
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;
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;
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;
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;
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;
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*) */
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) \
_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);
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 *
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);
{
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
_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));
}
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 *);
{
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),
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;
{
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;
{
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)
{
{
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)
{
{
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)
{
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;
}
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)
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;
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);
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;
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;
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;
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);
}
}
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;
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;
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;
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;
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;
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;
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);
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)
{
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)
{
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);
}
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)
{
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;
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);
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);
}
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;
}
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);
{
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)))
{
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;
{
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);
}
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;
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;
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))
{
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);
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;
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) &&
{
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;
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;
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)
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;
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))
{
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;
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;
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;
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,
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;
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);
&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;
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;
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))
{
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;
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)) &&
&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);
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,
&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);
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;
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))
{
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;
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;
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;
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);
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))
{
}
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;
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;
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;
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;
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))
{
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;
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) &&
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;
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
/* 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))
{
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,
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
/* 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))
{
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;
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)
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;
}
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;
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;
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)) &&
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
{
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))
{
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);
}
}
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,
(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))
{
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);
}
}
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,
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,
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)
{
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 */
{
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)
{
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;
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;
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);
}
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;
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)
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)
{
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);
}
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);
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)
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;
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;
}
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)
{
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));
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)
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)
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;
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;
_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);
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.
{
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);
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)
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;
}
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)
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)
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;
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); \
};
#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); \
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);
}
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;
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);
#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
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);
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;
_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 *);
}
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);
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);
}
{
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;
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;
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)
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;
}
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);
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);
}
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);
}
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);
}
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);
}
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);
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 **);
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;
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);
}
// 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)
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 *);
}
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);
}
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);
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);
}
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))
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)
{
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 *);
_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;
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);
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);
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);
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);
_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);
_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);
{
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);
{
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 =
_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;
_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;
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 *);
_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 =
*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);
_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;
_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;
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;
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;
{
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);
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)
{
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);
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);
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;
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)
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;
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;
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);
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;
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 */
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;
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)
{
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;
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! */
/* 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? */
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 */
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;
}
/* 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)
{
// 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);
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 */
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;
*/
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)
{
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;
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) &&
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)
{
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);
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 ||
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);
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);
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);
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);
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);
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);
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);
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);
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);
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));
}
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) ||
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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;
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);
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) &&
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;
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;
{
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)));
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 */
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;
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 */
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;
}
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;
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;
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)
{
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;
}
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);
}
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;
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;
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;
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;
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++;
}
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;
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;
}
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;
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;
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);
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,
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;
{
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)));
}
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;
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;
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;
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());
}
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)
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;
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! */
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;
}
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;
{
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)));
}
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;
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;
}
{
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 *
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;
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;
}
{
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)
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;
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;
_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);
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);
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);
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)
}
}
- 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)
{
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),
{
// 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);
}
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);
}
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);
}
{
// 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);
}
{
// 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);
}
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);
}
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);
}
{
// 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);
}
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);
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, );
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)
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)
{
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;
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)
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
{
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;
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)
{
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);
/* 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);
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));
}
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;
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;
}
}
- 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;
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;
/* 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)
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,
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);
}
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;
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)
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;
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));
}
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));
}
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));
}
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));
}
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;
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;
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);
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;
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;
}
#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) \
};
#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); \
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)
_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
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)
{
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)));
}
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);
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;
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);
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);
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;
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);
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)
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;
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);
}
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);
}
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);
}
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);
}
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;
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());
}
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);
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] =
{
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;
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;
}
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;
}
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;
}
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;
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;
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);
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); \
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;
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);
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;
}
}
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));
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)
{
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);
{
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;
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;
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);
}
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);
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;
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;
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,
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;
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;
{
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);
{
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)
_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);
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);
}
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);
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);
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;
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)
{
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);
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);
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)
{
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)
{
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);
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(
{
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)
{
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;
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)
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)
{
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);
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;
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)
{
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)
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)
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,
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);
}
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);
}
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)
{
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);
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;
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))
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;
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;
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)
{
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);
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);
}
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)
{
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);
{
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] =
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! */
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;
}
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)))
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;
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;
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;
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);
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);
{
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++)
{
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);
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());
}
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);
/* 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)
{
/* 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 */
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;
}
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;
}
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;
}
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);
{
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)));
}
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);
}
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);
}
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;
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);
}
/* 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);
}
}
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);
}
{
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);
{
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);
#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
{
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)));
}
{
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;
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);
}
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;
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;
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)
{
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;
((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;
{
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)
{
{
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),
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;
}
}
{
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
{
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
{
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)
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 ;
}
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;
}
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);
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;
}
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
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)
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)
(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 */
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)
render_mode);
/* free obscuring objects list */
- eina_array_clean(&e->temporary_objects);
+ OBJS_ARRAY_CLEAN(&e->temporary_objects);
RD(" ---]\n");
}
*/
}
/* 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. */
}
}
- /* 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;
* 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
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)
{
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))
(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;
}
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
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;
}
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;
}
}
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);
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);
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 */
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;
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;
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;
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;
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;
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;
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;
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;
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
// 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)
{
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;
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;
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");
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;
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;
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;
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;
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
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 */